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
45e3a01380cd5c4487a241aad14d69c88649d96e
bcelldb_init.py
bcelldb_init.py
#!/usr/bin/env python-2.7 """ Module for common processes in bcelldb computing: get information from config file """ import re def get_config(): """ Look for config file in . and than ../ Return config key value pairs in dictionary conf[]. """ # try to open config file in . try: config_file = open("config"...
#!/usr/bin/env python-2.7 """ Module for common processes in bcelldb computing: get information from config file """ import re re_key_value = re.compile("^\s*([_A-Za-z][_0-9A-Za-z]+)=(.*?)\s*;?\s*$") re_inline_comment = re.compile("^(.*?)(?<!\\\\)#.*") def get_config(): """ Look for config file in . and than ../ ...
Fix handling of separator characters by Python modules
Fix handling of separator characters by Python modules Currently the Python modules do not tolerate more than one equal sign ("=") in each line of the config file. However REs with look-ahead functionality require this character. Introduce new RE-based line-splitting mechanism. Fix handling of in-line comments.
Python
agpl-3.0
b-cell-immunology/sciReptor,b-cell-immunology/sciReptor,b-cell-immunology/sciReptor,b-cell-immunology/sciReptor
#!/usr/bin/env python-2.7 """ Module for common processes in bcelldb computing: get information from config file """ import re def get_config(): """ Look for config file in . and than ../ Return config key value pairs in dictionary conf[]. """ # try to open config file in . try: config_file = open("config"...
#!/usr/bin/env python-2.7 """ Module for common processes in bcelldb computing: get information from config file """ import re re_key_value = re.compile("^\s*([_A-Za-z][_0-9A-Za-z]+)=(.*?)\s*;?\s*$") re_inline_comment = re.compile("^(.*?)(?<!\\\\)#.*") def get_config(): """ Look for config file in . and than ../ ...
<commit_before>#!/usr/bin/env python-2.7 """ Module for common processes in bcelldb computing: get information from config file """ import re def get_config(): """ Look for config file in . and than ../ Return config key value pairs in dictionary conf[]. """ # try to open config file in . try: config_file ...
#!/usr/bin/env python-2.7 """ Module for common processes in bcelldb computing: get information from config file """ import re re_key_value = re.compile("^\s*([_A-Za-z][_0-9A-Za-z]+)=(.*?)\s*;?\s*$") re_inline_comment = re.compile("^(.*?)(?<!\\\\)#.*") def get_config(): """ Look for config file in . and than ../ ...
#!/usr/bin/env python-2.7 """ Module for common processes in bcelldb computing: get information from config file """ import re def get_config(): """ Look for config file in . and than ../ Return config key value pairs in dictionary conf[]. """ # try to open config file in . try: config_file = open("config"...
<commit_before>#!/usr/bin/env python-2.7 """ Module for common processes in bcelldb computing: get information from config file """ import re def get_config(): """ Look for config file in . and than ../ Return config key value pairs in dictionary conf[]. """ # try to open config file in . try: config_file ...
5a66aaa7b7640ef616bf1817a9e2999e10d97404
tests/test_wsgi_graphql.py
tests/test_wsgi_graphql.py
from webtest import TestApp as Client from wsgi_graphql import wsgi_graphql from graphql.core.type import ( GraphQLEnumType, GraphQLEnumValue, GraphQLInterfaceType, GraphQLObjectType, GraphQLField, GraphQLArgument, GraphQLList, GraphQLNonNull, GraphQLSchema, GraphQLString, ) d...
import json from webtest import TestApp as Client from wsgi_graphql import wsgi_graphql from graphql.core.type import ( GraphQLObjectType, GraphQLField, GraphQLArgument, GraphQLNonNull, GraphQLSchema, GraphQLString, ) def raises(*_): raise Exception("Raises!") TestSchema = GraphQLSchema...
Expand test to cover variables.
Expand test to cover variables.
Python
mit
ecreall/graphql-wsgi,faassen/graphql-wsgi,faassen/wsgi_graphql
from webtest import TestApp as Client from wsgi_graphql import wsgi_graphql from graphql.core.type import ( GraphQLEnumType, GraphQLEnumValue, GraphQLInterfaceType, GraphQLObjectType, GraphQLField, GraphQLArgument, GraphQLList, GraphQLNonNull, GraphQLSchema, GraphQLString, ) d...
import json from webtest import TestApp as Client from wsgi_graphql import wsgi_graphql from graphql.core.type import ( GraphQLObjectType, GraphQLField, GraphQLArgument, GraphQLNonNull, GraphQLSchema, GraphQLString, ) def raises(*_): raise Exception("Raises!") TestSchema = GraphQLSchema...
<commit_before>from webtest import TestApp as Client from wsgi_graphql import wsgi_graphql from graphql.core.type import ( GraphQLEnumType, GraphQLEnumValue, GraphQLInterfaceType, GraphQLObjectType, GraphQLField, GraphQLArgument, GraphQLList, GraphQLNonNull, GraphQLSchema, Graph...
import json from webtest import TestApp as Client from wsgi_graphql import wsgi_graphql from graphql.core.type import ( GraphQLObjectType, GraphQLField, GraphQLArgument, GraphQLNonNull, GraphQLSchema, GraphQLString, ) def raises(*_): raise Exception("Raises!") TestSchema = GraphQLSchema...
from webtest import TestApp as Client from wsgi_graphql import wsgi_graphql from graphql.core.type import ( GraphQLEnumType, GraphQLEnumValue, GraphQLInterfaceType, GraphQLObjectType, GraphQLField, GraphQLArgument, GraphQLList, GraphQLNonNull, GraphQLSchema, GraphQLString, ) d...
<commit_before>from webtest import TestApp as Client from wsgi_graphql import wsgi_graphql from graphql.core.type import ( GraphQLEnumType, GraphQLEnumValue, GraphQLInterfaceType, GraphQLObjectType, GraphQLField, GraphQLArgument, GraphQLList, GraphQLNonNull, GraphQLSchema, Graph...
f3937c77366dc5df4a1eb3b62a2f3452c539dbc4
cms/models/settingmodels.py
cms/models/settingmodels.py
# -*- coding: utf-8 -*- from django.contrib.auth.models import User from django.db import models from django.utils.translation import ugettext_lazy as _ from django.conf import settings from cms.utils.compat.dj import force_unicode, python_2_unicode_compatible @python_2_unicode_compatible class UserSettings(models.Mo...
# -*- coding: utf-8 -*- from django.contrib.auth.models import User from django.db import models from django.utils.translation import ugettext_lazy as _ from django.conf import settings from cms.utils.compat.dj import force_unicode, python_2_unicode_compatible @python_2_unicode_compatible class UserSettings(models.Mo...
Define a custom related_name in UserSettings->User relation
Define a custom related_name in UserSettings->User relation
Python
bsd-3-clause
vxsx/django-cms,netzkolchose/django-cms,owers19856/django-cms,MagicSolutions/django-cms,intip/django-cms,czpython/django-cms,Vegasvikk/django-cms,farhaadila/django-cms,saintbird/django-cms,astagi/django-cms,SachaMPS/django-cms,cyberintruder/django-cms,qnub/django-cms,stefanfoulis/django-cms,bittner/django-cms,AlexProfi...
# -*- coding: utf-8 -*- from django.contrib.auth.models import User from django.db import models from django.utils.translation import ugettext_lazy as _ from django.conf import settings from cms.utils.compat.dj import force_unicode, python_2_unicode_compatible @python_2_unicode_compatible class UserSettings(models.Mo...
# -*- coding: utf-8 -*- from django.contrib.auth.models import User from django.db import models from django.utils.translation import ugettext_lazy as _ from django.conf import settings from cms.utils.compat.dj import force_unicode, python_2_unicode_compatible @python_2_unicode_compatible class UserSettings(models.Mo...
<commit_before># -*- coding: utf-8 -*- from django.contrib.auth.models import User from django.db import models from django.utils.translation import ugettext_lazy as _ from django.conf import settings from cms.utils.compat.dj import force_unicode, python_2_unicode_compatible @python_2_unicode_compatible class UserSet...
# -*- coding: utf-8 -*- from django.contrib.auth.models import User from django.db import models from django.utils.translation import ugettext_lazy as _ from django.conf import settings from cms.utils.compat.dj import force_unicode, python_2_unicode_compatible @python_2_unicode_compatible class UserSettings(models.Mo...
# -*- coding: utf-8 -*- from django.contrib.auth.models import User from django.db import models from django.utils.translation import ugettext_lazy as _ from django.conf import settings from cms.utils.compat.dj import force_unicode, python_2_unicode_compatible @python_2_unicode_compatible class UserSettings(models.Mo...
<commit_before># -*- coding: utf-8 -*- from django.contrib.auth.models import User from django.db import models from django.utils.translation import ugettext_lazy as _ from django.conf import settings from cms.utils.compat.dj import force_unicode, python_2_unicode_compatible @python_2_unicode_compatible class UserSet...
2aef104da6bf6ce98619fe5bac5718533e2e7530
yunity/utils/tests/misc.py
yunity/utils/tests/misc.py
from importlib import import_module from json import dumps as dump_json from json import loads as load_json def json_stringify(data): return dump_json(data, sort_keys=True, separators=(',', ':')).encode("utf-8") if data else None def content_json(response): return load_json(response.content.decode("utf-8"))...
from importlib import import_module from json import dumps as dump_json from json import loads as load_json def json_stringify(data): return dump_json(data, sort_keys=True, separators=(',', ':')).encode("utf-8") if data else None def content_json(response): try: return load_json(response.content.dec...
Improve error on invalid JSON response content
Improve error on invalid JSON response content with @NerdyProjects
Python
agpl-3.0
yunity/yunity-core,yunity/foodsaving-backend,yunity/foodsaving-backend,yunity/yunity-core,yunity/foodsaving-backend
from importlib import import_module from json import dumps as dump_json from json import loads as load_json def json_stringify(data): return dump_json(data, sort_keys=True, separators=(',', ':')).encode("utf-8") if data else None def content_json(response): return load_json(response.content.decode("utf-8"))...
from importlib import import_module from json import dumps as dump_json from json import loads as load_json def json_stringify(data): return dump_json(data, sort_keys=True, separators=(',', ':')).encode("utf-8") if data else None def content_json(response): try: return load_json(response.content.dec...
<commit_before>from importlib import import_module from json import dumps as dump_json from json import loads as load_json def json_stringify(data): return dump_json(data, sort_keys=True, separators=(',', ':')).encode("utf-8") if data else None def content_json(response): return load_json(response.content.d...
from importlib import import_module from json import dumps as dump_json from json import loads as load_json def json_stringify(data): return dump_json(data, sort_keys=True, separators=(',', ':')).encode("utf-8") if data else None def content_json(response): try: return load_json(response.content.dec...
from importlib import import_module from json import dumps as dump_json from json import loads as load_json def json_stringify(data): return dump_json(data, sort_keys=True, separators=(',', ':')).encode("utf-8") if data else None def content_json(response): return load_json(response.content.decode("utf-8"))...
<commit_before>from importlib import import_module from json import dumps as dump_json from json import loads as load_json def json_stringify(data): return dump_json(data, sort_keys=True, separators=(',', ':')).encode("utf-8") if data else None def content_json(response): return load_json(response.content.d...
991b0da117956e4d523732edc03bc287edf6a680
identity/app.py
identity/app.py
from __future__ import unicode_literals, absolute_import import os from identity import app if __name__ == '__main__': port = int(os.environ.get('PORT', 5000)) app.run(host='0.0.0.0', port=port, debug=os.environ.get('DEBUG', False))
from __future__ import unicode_literals, absolute_import import os if os.environ.get('ENV') and os.path.exists(os.environ['ENV']): for line in open(os.environ['ENV']): var = line.strip().split('=') if len(var) == 2: os.environ[var[0]] = var[1] from identity import app if __name__ == ...
Load env-vars from a .env file
Load env-vars from a .env file
Python
mit
ErinCall/identity,ErinCall/identity
from __future__ import unicode_literals, absolute_import import os from identity import app if __name__ == '__main__': port = int(os.environ.get('PORT', 5000)) app.run(host='0.0.0.0', port=port, debug=os.environ.get('DEBUG', False)) Load env-vars from a .env file
from __future__ import unicode_literals, absolute_import import os if os.environ.get('ENV') and os.path.exists(os.environ['ENV']): for line in open(os.environ['ENV']): var = line.strip().split('=') if len(var) == 2: os.environ[var[0]] = var[1] from identity import app if __name__ == ...
<commit_before>from __future__ import unicode_literals, absolute_import import os from identity import app if __name__ == '__main__': port = int(os.environ.get('PORT', 5000)) app.run(host='0.0.0.0', port=port, debug=os.environ.get('DEBUG', False)) <commit_msg>Load env-vars from a .env ...
from __future__ import unicode_literals, absolute_import import os if os.environ.get('ENV') and os.path.exists(os.environ['ENV']): for line in open(os.environ['ENV']): var = line.strip().split('=') if len(var) == 2: os.environ[var[0]] = var[1] from identity import app if __name__ == ...
from __future__ import unicode_literals, absolute_import import os from identity import app if __name__ == '__main__': port = int(os.environ.get('PORT', 5000)) app.run(host='0.0.0.0', port=port, debug=os.environ.get('DEBUG', False)) Load env-vars from a .env filefrom __future__ import ...
<commit_before>from __future__ import unicode_literals, absolute_import import os from identity import app if __name__ == '__main__': port = int(os.environ.get('PORT', 5000)) app.run(host='0.0.0.0', port=port, debug=os.environ.get('DEBUG', False)) <commit_msg>Load env-vars from a .env ...
d9d9270f0577a6969f7cb2ccf48a8c0aa859b44a
circular-buffer/circular_buffer.py
circular-buffer/circular_buffer.py
# File: circular_buffer.py # Purpose: A data structure that uses a single, fixed-size buffer # as if it were connected end-to-end. # Programmer: Amal Shehu # Course: Exercism # Date: Thursday 29 September 2016, 10:48 PM class CircularBuffer(object): def __init__(self, size_ma...
# File: circular_buffer.py # Purpose: A data structure that uses a single, fixed-size buffer # as if it were connected end-to-end. # Programmer: Amal Shehu # Course: Exercism # Date: Thursday 29 September 2016, 10:48 PM class CircularBuffer(object): def __init__(self, size_ma...
Add functions to insert and clear data
Add functions to insert and clear data
Python
mit
amalshehu/exercism-python
# File: circular_buffer.py # Purpose: A data structure that uses a single, fixed-size buffer # as if it were connected end-to-end. # Programmer: Amal Shehu # Course: Exercism # Date: Thursday 29 September 2016, 10:48 PM class CircularBuffer(object): def __init__(self, size_ma...
# File: circular_buffer.py # Purpose: A data structure that uses a single, fixed-size buffer # as if it were connected end-to-end. # Programmer: Amal Shehu # Course: Exercism # Date: Thursday 29 September 2016, 10:48 PM class CircularBuffer(object): def __init__(self, size_ma...
<commit_before># File: circular_buffer.py # Purpose: A data structure that uses a single, fixed-size buffer # as if it were connected end-to-end. # Programmer: Amal Shehu # Course: Exercism # Date: Thursday 29 September 2016, 10:48 PM class CircularBuffer(object): def __init_...
# File: circular_buffer.py # Purpose: A data structure that uses a single, fixed-size buffer # as if it were connected end-to-end. # Programmer: Amal Shehu # Course: Exercism # Date: Thursday 29 September 2016, 10:48 PM class CircularBuffer(object): def __init__(self, size_ma...
# File: circular_buffer.py # Purpose: A data structure that uses a single, fixed-size buffer # as if it were connected end-to-end. # Programmer: Amal Shehu # Course: Exercism # Date: Thursday 29 September 2016, 10:48 PM class CircularBuffer(object): def __init__(self, size_ma...
<commit_before># File: circular_buffer.py # Purpose: A data structure that uses a single, fixed-size buffer # as if it were connected end-to-end. # Programmer: Amal Shehu # Course: Exercism # Date: Thursday 29 September 2016, 10:48 PM class CircularBuffer(object): def __init_...
d850f4785340f73a417653f46c4de275a6eeeb8c
utilities/ticker-update.py
utilities/ticker-update.py
import requests from bs4 import BeautifulSoup URL = 'https://finance.yahoo.com/quote/' securities = ['bgcp', 'cvx', 'f', 'ge', 'intc', 'lumn', 'src', 't'] for security in securities: query = URL + security page = requests.get(query) soup = BeautifulSoup(page.content, 'html.parser') span = soup.find('spa...
import requests from bs4 import BeautifulSoup URL = 'https://finance.yahoo.com/quote/' secutities = [] with open("ticker-updates,cong", r) as conf_file: securities = conf_file.readlines() securities = [s.strip() for s in securities] for security in securities: query = URL + security page = reques...
Read securities from conf file
Read securities from conf file
Python
mit
daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various
import requests from bs4 import BeautifulSoup URL = 'https://finance.yahoo.com/quote/' securities = ['bgcp', 'cvx', 'f', 'ge', 'intc', 'lumn', 'src', 't'] for security in securities: query = URL + security page = requests.get(query) soup = BeautifulSoup(page.content, 'html.parser') span = soup.find('spa...
import requests from bs4 import BeautifulSoup URL = 'https://finance.yahoo.com/quote/' secutities = [] with open("ticker-updates,cong", r) as conf_file: securities = conf_file.readlines() securities = [s.strip() for s in securities] for security in securities: query = URL + security page = reques...
<commit_before>import requests from bs4 import BeautifulSoup URL = 'https://finance.yahoo.com/quote/' securities = ['bgcp', 'cvx', 'f', 'ge', 'intc', 'lumn', 'src', 't'] for security in securities: query = URL + security page = requests.get(query) soup = BeautifulSoup(page.content, 'html.parser') span =...
import requests from bs4 import BeautifulSoup URL = 'https://finance.yahoo.com/quote/' secutities = [] with open("ticker-updates,cong", r) as conf_file: securities = conf_file.readlines() securities = [s.strip() for s in securities] for security in securities: query = URL + security page = reques...
import requests from bs4 import BeautifulSoup URL = 'https://finance.yahoo.com/quote/' securities = ['bgcp', 'cvx', 'f', 'ge', 'intc', 'lumn', 'src', 't'] for security in securities: query = URL + security page = requests.get(query) soup = BeautifulSoup(page.content, 'html.parser') span = soup.find('spa...
<commit_before>import requests from bs4 import BeautifulSoup URL = 'https://finance.yahoo.com/quote/' securities = ['bgcp', 'cvx', 'f', 'ge', 'intc', 'lumn', 'src', 't'] for security in securities: query = URL + security page = requests.get(query) soup = BeautifulSoup(page.content, 'html.parser') span =...
4c5b6217015610fe7cf3064b59e1b8de1fa41575
PyFloraBook/input_output/data_coordinator.py
PyFloraBook/input_output/data_coordinator.py
from pathlib import Path import json import inspect import sys import PyFloraBook OBSERVATIONS_FOLDER = "observation_data" RAW_DATA_FOLDER = "raw" def locate_project_folder() -> Path: """Locate top-level project folder Returns: Path of the project folder """ source_path = Path(inspect.gets...
from pathlib import Path import json import inspect import sys import PyFloraBook # Globals OBSERVATIONS_FOLDER = "observation_data" RAW_OBSERVATIONS_FOLDER = "raw_observations" RAW_COUNTS_FOLDER = "raw_counts" def locate_project_folder() -> Path: """Locate top-level project folder Returns: Path o...
Support separate folders for raw observations and raw counts
Support separate folders for raw observations and raw counts
Python
mit
jnfrye/local_plants_book
from pathlib import Path import json import inspect import sys import PyFloraBook OBSERVATIONS_FOLDER = "observation_data" RAW_DATA_FOLDER = "raw" def locate_project_folder() -> Path: """Locate top-level project folder Returns: Path of the project folder """ source_path = Path(inspect.gets...
from pathlib import Path import json import inspect import sys import PyFloraBook # Globals OBSERVATIONS_FOLDER = "observation_data" RAW_OBSERVATIONS_FOLDER = "raw_observations" RAW_COUNTS_FOLDER = "raw_counts" def locate_project_folder() -> Path: """Locate top-level project folder Returns: Path o...
<commit_before>from pathlib import Path import json import inspect import sys import PyFloraBook OBSERVATIONS_FOLDER = "observation_data" RAW_DATA_FOLDER = "raw" def locate_project_folder() -> Path: """Locate top-level project folder Returns: Path of the project folder """ source_path = Pa...
from pathlib import Path import json import inspect import sys import PyFloraBook # Globals OBSERVATIONS_FOLDER = "observation_data" RAW_OBSERVATIONS_FOLDER = "raw_observations" RAW_COUNTS_FOLDER = "raw_counts" def locate_project_folder() -> Path: """Locate top-level project folder Returns: Path o...
from pathlib import Path import json import inspect import sys import PyFloraBook OBSERVATIONS_FOLDER = "observation_data" RAW_DATA_FOLDER = "raw" def locate_project_folder() -> Path: """Locate top-level project folder Returns: Path of the project folder """ source_path = Path(inspect.gets...
<commit_before>from pathlib import Path import json import inspect import sys import PyFloraBook OBSERVATIONS_FOLDER = "observation_data" RAW_DATA_FOLDER = "raw" def locate_project_folder() -> Path: """Locate top-level project folder Returns: Path of the project folder """ source_path = Pa...
db32ee58b5247dbc281d5f4633f5b9c2fe704ad1
metaci/testresults/utils.py
metaci/testresults/utils.py
from django.core.exceptions import PermissionDenied from django.shortcuts import get_object_or_404 from metaci.build.models import Build from metaci.build.models import BuildFlow def find_buildflow(request, build_id, flow): """ given a build_id and flow name, find a single BuildFlow (ala tests/ urls patterns). ""...
from django.core.exceptions import PermissionDenied from django.shortcuts import get_object_or_404 from metaci.build.models import Build from metaci.build.models import BuildFlow def find_buildflow(request, build_id, flow): """ given a build_id and flow name, find a single BuildFlow (ala tests/ urls patterns). ""...
Use PlanRepository as the object for permission check instead of Build
Use PlanRepository as the object for permission check instead of Build
Python
bsd-3-clause
SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci,SalesforceFoundation/mrbelvedereci
from django.core.exceptions import PermissionDenied from django.shortcuts import get_object_or_404 from metaci.build.models import Build from metaci.build.models import BuildFlow def find_buildflow(request, build_id, flow): """ given a build_id and flow name, find a single BuildFlow (ala tests/ urls patterns). ""...
from django.core.exceptions import PermissionDenied from django.shortcuts import get_object_or_404 from metaci.build.models import Build from metaci.build.models import BuildFlow def find_buildflow(request, build_id, flow): """ given a build_id and flow name, find a single BuildFlow (ala tests/ urls patterns). ""...
<commit_before>from django.core.exceptions import PermissionDenied from django.shortcuts import get_object_or_404 from metaci.build.models import Build from metaci.build.models import BuildFlow def find_buildflow(request, build_id, flow): """ given a build_id and flow name, find a single BuildFlow (ala tests/ url...
from django.core.exceptions import PermissionDenied from django.shortcuts import get_object_or_404 from metaci.build.models import Build from metaci.build.models import BuildFlow def find_buildflow(request, build_id, flow): """ given a build_id and flow name, find a single BuildFlow (ala tests/ urls patterns). ""...
from django.core.exceptions import PermissionDenied from django.shortcuts import get_object_or_404 from metaci.build.models import Build from metaci.build.models import BuildFlow def find_buildflow(request, build_id, flow): """ given a build_id and flow name, find a single BuildFlow (ala tests/ urls patterns). ""...
<commit_before>from django.core.exceptions import PermissionDenied from django.shortcuts import get_object_or_404 from metaci.build.models import Build from metaci.build.models import BuildFlow def find_buildflow(request, build_id, flow): """ given a build_id and flow name, find a single BuildFlow (ala tests/ url...
ff5cc4bc97999572dfb1db5731fca307d32fb1a3
infi/pyutils/decorators.py
infi/pyutils/decorators.py
import functools import inspect def wraps(wrapped): """ a convenience function on top of functools.wraps: - adds the original function to the wrapped function as __wrapped__ attribute.""" def new_decorator(f): returned = functools.wraps(wrapped)(f) returned.__wrapped__ = wrapped re...
import functools import inspect def wraps(wrapped): """ a convenience function on top of functools.wraps: - adds the original function to the wrapped function as __wrapped__ attribute.""" def new_decorator(f): returned = functools.wraps(wrapped)(f) returned.__wrapped__ = wrapped re...
Support introspection hack for IPython
Support introspection hack for IPython
Python
bsd-3-clause
Infinidat/infi.pyutils
import functools import inspect def wraps(wrapped): """ a convenience function on top of functools.wraps: - adds the original function to the wrapped function as __wrapped__ attribute.""" def new_decorator(f): returned = functools.wraps(wrapped)(f) returned.__wrapped__ = wrapped re...
import functools import inspect def wraps(wrapped): """ a convenience function on top of functools.wraps: - adds the original function to the wrapped function as __wrapped__ attribute.""" def new_decorator(f): returned = functools.wraps(wrapped)(f) returned.__wrapped__ = wrapped re...
<commit_before>import functools import inspect def wraps(wrapped): """ a convenience function on top of functools.wraps: - adds the original function to the wrapped function as __wrapped__ attribute.""" def new_decorator(f): returned = functools.wraps(wrapped)(f) returned.__wrapped__ = wra...
import functools import inspect def wraps(wrapped): """ a convenience function on top of functools.wraps: - adds the original function to the wrapped function as __wrapped__ attribute.""" def new_decorator(f): returned = functools.wraps(wrapped)(f) returned.__wrapped__ = wrapped re...
import functools import inspect def wraps(wrapped): """ a convenience function on top of functools.wraps: - adds the original function to the wrapped function as __wrapped__ attribute.""" def new_decorator(f): returned = functools.wraps(wrapped)(f) returned.__wrapped__ = wrapped re...
<commit_before>import functools import inspect def wraps(wrapped): """ a convenience function on top of functools.wraps: - adds the original function to the wrapped function as __wrapped__ attribute.""" def new_decorator(f): returned = functools.wraps(wrapped)(f) returned.__wrapped__ = wra...
90ca5fdd66d11cb0d746fb4ab006445ded860d69
modoboa_webmail/__init__.py
modoboa_webmail/__init__.py
# -*- coding: utf-8 -*- """DMARC related tools for Modoboa.""" from __future__ import unicode_literals from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution(__name__).version except DistributionNotFound: # package is not installed pass default_app_config ...
# -*- coding: utf-8 -*- """DMARC related tools for Modoboa.""" from __future__ import unicode_literals from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution(__name__).version except DistributionNotFound: # package is not installed __version__ = '9.9.9' de...
Fix crash in development mode with python 3
Fix crash in development mode with python 3
Python
mit
modoboa/modoboa-webmail,modoboa/modoboa-webmail,modoboa/modoboa-webmail
# -*- coding: utf-8 -*- """DMARC related tools for Modoboa.""" from __future__ import unicode_literals from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution(__name__).version except DistributionNotFound: # package is not installed pass default_app_config ...
# -*- coding: utf-8 -*- """DMARC related tools for Modoboa.""" from __future__ import unicode_literals from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution(__name__).version except DistributionNotFound: # package is not installed __version__ = '9.9.9' de...
<commit_before># -*- coding: utf-8 -*- """DMARC related tools for Modoboa.""" from __future__ import unicode_literals from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution(__name__).version except DistributionNotFound: # package is not installed pass defa...
# -*- coding: utf-8 -*- """DMARC related tools for Modoboa.""" from __future__ import unicode_literals from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution(__name__).version except DistributionNotFound: # package is not installed __version__ = '9.9.9' de...
# -*- coding: utf-8 -*- """DMARC related tools for Modoboa.""" from __future__ import unicode_literals from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution(__name__).version except DistributionNotFound: # package is not installed pass default_app_config ...
<commit_before># -*- coding: utf-8 -*- """DMARC related tools for Modoboa.""" from __future__ import unicode_literals from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution(__name__).version except DistributionNotFound: # package is not installed pass defa...
a0c63a21114cd0d42a18235e7d6c9249b05e571e
availsim/dht/__init__.py
availsim/dht/__init__.py
import chord, dhash, oracle, totalrecall # For automatic use by availsim known_types = { 'chord': chord, 'dhash': dhash.dhash, 'fragments': dhash.dhash_fragments, 'replica': dhash.dhash_replica, 'cates': dhash.dhash_cates, 'replica_durability_oracle': oracle.durability_oracle, 'replica_avai...
import chord, dhash, oracle, totalrecall # For automatic use by availsim known_types = { 'chord': chord, 'dhash': dhash.dhash, 'fragments': dhash.dhash_fragments, 'replica': dhash.dhash_replica, 'cates': dhash.dhash_cates, 'durability_oracle_replica': oracle.durability_oracle, 'availability...
Rename oracle command line names for consistency and prefixfreeness.
Rename oracle command line names for consistency and prefixfreeness.
Python
mit
weidezhang/dht,sit/dht,sit/dht,sit/dht,weidezhang/dht,weidezhang/dht,sit/dht,weidezhang/dht,sit/dht,weidezhang/dht
import chord, dhash, oracle, totalrecall # For automatic use by availsim known_types = { 'chord': chord, 'dhash': dhash.dhash, 'fragments': dhash.dhash_fragments, 'replica': dhash.dhash_replica, 'cates': dhash.dhash_cates, 'replica_durability_oracle': oracle.durability_oracle, 'replica_avai...
import chord, dhash, oracle, totalrecall # For automatic use by availsim known_types = { 'chord': chord, 'dhash': dhash.dhash, 'fragments': dhash.dhash_fragments, 'replica': dhash.dhash_replica, 'cates': dhash.dhash_cates, 'durability_oracle_replica': oracle.durability_oracle, 'availability...
<commit_before>import chord, dhash, oracle, totalrecall # For automatic use by availsim known_types = { 'chord': chord, 'dhash': dhash.dhash, 'fragments': dhash.dhash_fragments, 'replica': dhash.dhash_replica, 'cates': dhash.dhash_cates, 'replica_durability_oracle': oracle.durability_oracle, ...
import chord, dhash, oracle, totalrecall # For automatic use by availsim known_types = { 'chord': chord, 'dhash': dhash.dhash, 'fragments': dhash.dhash_fragments, 'replica': dhash.dhash_replica, 'cates': dhash.dhash_cates, 'durability_oracle_replica': oracle.durability_oracle, 'availability...
import chord, dhash, oracle, totalrecall # For automatic use by availsim known_types = { 'chord': chord, 'dhash': dhash.dhash, 'fragments': dhash.dhash_fragments, 'replica': dhash.dhash_replica, 'cates': dhash.dhash_cates, 'replica_durability_oracle': oracle.durability_oracle, 'replica_avai...
<commit_before>import chord, dhash, oracle, totalrecall # For automatic use by availsim known_types = { 'chord': chord, 'dhash': dhash.dhash, 'fragments': dhash.dhash_fragments, 'replica': dhash.dhash_replica, 'cates': dhash.dhash_cates, 'replica_durability_oracle': oracle.durability_oracle, ...
129f85bda12d97ad5b51daa9a43e0990619ea496
fore/database.py
fore/database.py
import apikeys import psycopg2 import utils _conn = psycopg2.connect(apikeys.db_connect_string) class Track(object): def __init__(self, id, filename): self.id = id self.filename = filename self.obj = utils.Magic_Anything("Track_"+str(id)) def get_mp3(some_specifier): with _conn.cursor(): # TODO: Fetch an M...
import apikeys import psycopg2 import utils _conn = psycopg2.connect(apikeys.db_connect_string) class Track(object): def __init__(self, id, filename): self.id = id self.filename = filename # Add some stubby metadata (in an attribute that desperately # wants to be renamed to something mildly useful) self.ob...
Change the metadata object from a Magic_Anything to a straight dict
Change the metadata object from a Magic_Anything to a straight dict Lose the magic! Lose the magic! (That is *so* not what Anna said.)
Python
artistic-2.0
MikeiLL/appension,MikeiLL/appension,Rosuav/appension,Rosuav/appension,Rosuav/appension,Rosuav/appension,MikeiLL/appension,MikeiLL/appension
import apikeys import psycopg2 import utils _conn = psycopg2.connect(apikeys.db_connect_string) class Track(object): def __init__(self, id, filename): self.id = id self.filename = filename self.obj = utils.Magic_Anything("Track_"+str(id)) def get_mp3(some_specifier): with _conn.cursor(): # TODO: Fetch an M...
import apikeys import psycopg2 import utils _conn = psycopg2.connect(apikeys.db_connect_string) class Track(object): def __init__(self, id, filename): self.id = id self.filename = filename # Add some stubby metadata (in an attribute that desperately # wants to be renamed to something mildly useful) self.ob...
<commit_before>import apikeys import psycopg2 import utils _conn = psycopg2.connect(apikeys.db_connect_string) class Track(object): def __init__(self, id, filename): self.id = id self.filename = filename self.obj = utils.Magic_Anything("Track_"+str(id)) def get_mp3(some_specifier): with _conn.cursor(): # T...
import apikeys import psycopg2 import utils _conn = psycopg2.connect(apikeys.db_connect_string) class Track(object): def __init__(self, id, filename): self.id = id self.filename = filename # Add some stubby metadata (in an attribute that desperately # wants to be renamed to something mildly useful) self.ob...
import apikeys import psycopg2 import utils _conn = psycopg2.connect(apikeys.db_connect_string) class Track(object): def __init__(self, id, filename): self.id = id self.filename = filename self.obj = utils.Magic_Anything("Track_"+str(id)) def get_mp3(some_specifier): with _conn.cursor(): # TODO: Fetch an M...
<commit_before>import apikeys import psycopg2 import utils _conn = psycopg2.connect(apikeys.db_connect_string) class Track(object): def __init__(self, id, filename): self.id = id self.filename = filename self.obj = utils.Magic_Anything("Track_"+str(id)) def get_mp3(some_specifier): with _conn.cursor(): # T...
384d57efa59665f0dd47c07062a8177a2eedde9a
run_tests.py
run_tests.py
#!/usr/bin/python import optparse import sys # Install the Python unittest2 package before you run this script. import unittest2 USAGE = """%prog SDK_PATH Run unit tests for App Engine apps. The SDK Path is probably /usr/local/google_appengine on Mac OS SDK_PATH Path to the SDK installation""" def main(sdk_path,...
#!/usr/bin/python import optparse import sys import warnings # Install the Python unittest2 package before you run this script. import unittest2 USAGE = """%prog SDK_PATH Run unit tests for App Engine apps. The SDK Path is probably /usr/local/google_appengine on Mac OS SDK_PATH Path to the SDK installation""" d...
Replace print statement with `warnings.warn`.
Replace print statement with `warnings.warn`. Also so that it doesn't need to be converted for Python3 compat.
Python
mit
verycumbersome/the-blue-alliance,the-blue-alliance/the-blue-alliance,1fish2/the-blue-alliance,phil-lopreiato/the-blue-alliance,tsteward/the-blue-alliance,verycumbersome/the-blue-alliance,bdaroz/the-blue-alliance,verycumbersome/the-blue-alliance,bdaroz/the-blue-alliance,nwalters512/the-blue-alliance,synth3tk/the-blue-al...
#!/usr/bin/python import optparse import sys # Install the Python unittest2 package before you run this script. import unittest2 USAGE = """%prog SDK_PATH Run unit tests for App Engine apps. The SDK Path is probably /usr/local/google_appengine on Mac OS SDK_PATH Path to the SDK installation""" def main(sdk_path,...
#!/usr/bin/python import optparse import sys import warnings # Install the Python unittest2 package before you run this script. import unittest2 USAGE = """%prog SDK_PATH Run unit tests for App Engine apps. The SDK Path is probably /usr/local/google_appengine on Mac OS SDK_PATH Path to the SDK installation""" d...
<commit_before>#!/usr/bin/python import optparse import sys # Install the Python unittest2 package before you run this script. import unittest2 USAGE = """%prog SDK_PATH Run unit tests for App Engine apps. The SDK Path is probably /usr/local/google_appengine on Mac OS SDK_PATH Path to the SDK installation""" def...
#!/usr/bin/python import optparse import sys import warnings # Install the Python unittest2 package before you run this script. import unittest2 USAGE = """%prog SDK_PATH Run unit tests for App Engine apps. The SDK Path is probably /usr/local/google_appengine on Mac OS SDK_PATH Path to the SDK installation""" d...
#!/usr/bin/python import optparse import sys # Install the Python unittest2 package before you run this script. import unittest2 USAGE = """%prog SDK_PATH Run unit tests for App Engine apps. The SDK Path is probably /usr/local/google_appengine on Mac OS SDK_PATH Path to the SDK installation""" def main(sdk_path,...
<commit_before>#!/usr/bin/python import optparse import sys # Install the Python unittest2 package before you run this script. import unittest2 USAGE = """%prog SDK_PATH Run unit tests for App Engine apps. The SDK Path is probably /usr/local/google_appengine on Mac OS SDK_PATH Path to the SDK installation""" def...
04d7e76cf372802e99ff3108cccd836d7aada0df
games/views/installers.py
games/views/installers.py
from __future__ import absolute_import from rest_framework import generics from reversion.models import Version from common.permissions import IsAdminOrReadOnly from games import models, serializers class InstallerListView(generics.ListAPIView): serializer_class = serializers.InstallerSerializer queryset = ...
from __future__ import absolute_import from rest_framework import generics from reversion.models import Version from common.permissions import IsAdminOrReadOnly from games import models, serializers class InstallerListView(generics.ListAPIView): serializer_class = serializers.InstallerSerializer queryset = ...
Simplify Installer revision API views
Simplify Installer revision API views
Python
agpl-3.0
lutris/website,lutris/website,Turupawn/website,lutris/website,Turupawn/website,lutris/website,Turupawn/website,Turupawn/website
from __future__ import absolute_import from rest_framework import generics from reversion.models import Version from common.permissions import IsAdminOrReadOnly from games import models, serializers class InstallerListView(generics.ListAPIView): serializer_class = serializers.InstallerSerializer queryset = ...
from __future__ import absolute_import from rest_framework import generics from reversion.models import Version from common.permissions import IsAdminOrReadOnly from games import models, serializers class InstallerListView(generics.ListAPIView): serializer_class = serializers.InstallerSerializer queryset = ...
<commit_before>from __future__ import absolute_import from rest_framework import generics from reversion.models import Version from common.permissions import IsAdminOrReadOnly from games import models, serializers class InstallerListView(generics.ListAPIView): serializer_class = serializers.InstallerSerializer ...
from __future__ import absolute_import from rest_framework import generics from reversion.models import Version from common.permissions import IsAdminOrReadOnly from games import models, serializers class InstallerListView(generics.ListAPIView): serializer_class = serializers.InstallerSerializer queryset = ...
from __future__ import absolute_import from rest_framework import generics from reversion.models import Version from common.permissions import IsAdminOrReadOnly from games import models, serializers class InstallerListView(generics.ListAPIView): serializer_class = serializers.InstallerSerializer queryset = ...
<commit_before>from __future__ import absolute_import from rest_framework import generics from reversion.models import Version from common.permissions import IsAdminOrReadOnly from games import models, serializers class InstallerListView(generics.ListAPIView): serializer_class = serializers.InstallerSerializer ...
3f4844c61c4bb8d2e578727ed220de07b0385a74
speaker/appstore/review.py
speaker/appstore/review.py
import asyncio import json from helper.filter import remove_emoji from helper.lang import find_out_language from lxml import etree from datetime import datetime from helper.http_client import request from speaker.appstore import NAMESPACE, REGIONS @asyncio.coroutine def latest_reviews(code, region, buffer_size): ...
import asyncio import json from helper.filter import remove_emoji from helper.lang import find_out_language from lxml import etree from datetime import datetime from helper.http_client import request from speaker.appstore import NAMESPACE, REGIONS @asyncio.coroutine def latest_reviews(code, region, buffer_size): ...
Fix appstore json parsing process.
Fix appstore json parsing process.
Python
mit
oldsup/clerk
import asyncio import json from helper.filter import remove_emoji from helper.lang import find_out_language from lxml import etree from datetime import datetime from helper.http_client import request from speaker.appstore import NAMESPACE, REGIONS @asyncio.coroutine def latest_reviews(code, region, buffer_size): ...
import asyncio import json from helper.filter import remove_emoji from helper.lang import find_out_language from lxml import etree from datetime import datetime from helper.http_client import request from speaker.appstore import NAMESPACE, REGIONS @asyncio.coroutine def latest_reviews(code, region, buffer_size): ...
<commit_before>import asyncio import json from helper.filter import remove_emoji from helper.lang import find_out_language from lxml import etree from datetime import datetime from helper.http_client import request from speaker.appstore import NAMESPACE, REGIONS @asyncio.coroutine def latest_reviews(code, region, buf...
import asyncio import json from helper.filter import remove_emoji from helper.lang import find_out_language from lxml import etree from datetime import datetime from helper.http_client import request from speaker.appstore import NAMESPACE, REGIONS @asyncio.coroutine def latest_reviews(code, region, buffer_size): ...
import asyncio import json from helper.filter import remove_emoji from helper.lang import find_out_language from lxml import etree from datetime import datetime from helper.http_client import request from speaker.appstore import NAMESPACE, REGIONS @asyncio.coroutine def latest_reviews(code, region, buffer_size): ...
<commit_before>import asyncio import json from helper.filter import remove_emoji from helper.lang import find_out_language from lxml import etree from datetime import datetime from helper.http_client import request from speaker.appstore import NAMESPACE, REGIONS @asyncio.coroutine def latest_reviews(code, region, buf...
c9580f8d700308df2d3bf5710261314d402fc826
democracy_club/settings/testing.py
democracy_club/settings/testing.py
from .base import * # noqa DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'dc_website_test', 'USER': 'postgres', 'PASSWORD': '', 'HOST': '', 'PORT': '', } }
from .base import * # noqa DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'dc_website_test', 'USER': 'postgres', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } BACKLOG_TRELLO_BOARD_ID = "empty" BACKLOG_TRELLO_DEFAULT_LIST_...
Add placeholder values for trello items in tests
Add placeholder values for trello items in tests
Python
bsd-3-clause
DemocracyClub/Website,DemocracyClub/Website,DemocracyClub/Website,DemocracyClub/Website
from .base import * # noqa DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'dc_website_test', 'USER': 'postgres', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } Add placeholder values for trello items in tests
from .base import * # noqa DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'dc_website_test', 'USER': 'postgres', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } BACKLOG_TRELLO_BOARD_ID = "empty" BACKLOG_TRELLO_DEFAULT_LIST_...
<commit_before>from .base import * # noqa DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'dc_website_test', 'USER': 'postgres', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } <commit_msg>Add placeholder values for trello it...
from .base import * # noqa DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'dc_website_test', 'USER': 'postgres', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } BACKLOG_TRELLO_BOARD_ID = "empty" BACKLOG_TRELLO_DEFAULT_LIST_...
from .base import * # noqa DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'dc_website_test', 'USER': 'postgres', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } Add placeholder values for trello items in testsfrom .base impo...
<commit_before>from .base import * # noqa DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'dc_website_test', 'USER': 'postgres', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } <commit_msg>Add placeholder values for trello it...
fea2cbcbc80d76a75f41fb81ea6ded93312bd11b
imhotep_rubocop/plugin.py
imhotep_rubocop/plugin.py
from imhotep.tools import Tool from collections import defaultdict import json import os class RubyLintLinter(Tool): def invoke(self, dirname, filenames=set()): retval = defaultdict(lambda: defaultdict(list)) if len(filenames) == 0: cmd = "find %s -name '*.rb' | xargs rubocop -f j" %...
from imhotep.tools import Tool from collections import defaultdict import json import os class RubyLintLinter(Tool): def invoke(self, dirname, filenames=set(), linter_configs=set()): retval = defaultdict(lambda: defaultdict(list)) config = '' for config_file in linter_configs: ...
Update to support config files that are passed to it.
Update to support config files that are passed to it.
Python
mit
scottjab/imhotep_rubocop
from imhotep.tools import Tool from collections import defaultdict import json import os class RubyLintLinter(Tool): def invoke(self, dirname, filenames=set()): retval = defaultdict(lambda: defaultdict(list)) if len(filenames) == 0: cmd = "find %s -name '*.rb' | xargs rubocop -f j" %...
from imhotep.tools import Tool from collections import defaultdict import json import os class RubyLintLinter(Tool): def invoke(self, dirname, filenames=set(), linter_configs=set()): retval = defaultdict(lambda: defaultdict(list)) config = '' for config_file in linter_configs: ...
<commit_before>from imhotep.tools import Tool from collections import defaultdict import json import os class RubyLintLinter(Tool): def invoke(self, dirname, filenames=set()): retval = defaultdict(lambda: defaultdict(list)) if len(filenames) == 0: cmd = "find %s -name '*.rb' | xargs ...
from imhotep.tools import Tool from collections import defaultdict import json import os class RubyLintLinter(Tool): def invoke(self, dirname, filenames=set(), linter_configs=set()): retval = defaultdict(lambda: defaultdict(list)) config = '' for config_file in linter_configs: ...
from imhotep.tools import Tool from collections import defaultdict import json import os class RubyLintLinter(Tool): def invoke(self, dirname, filenames=set()): retval = defaultdict(lambda: defaultdict(list)) if len(filenames) == 0: cmd = "find %s -name '*.rb' | xargs rubocop -f j" %...
<commit_before>from imhotep.tools import Tool from collections import defaultdict import json import os class RubyLintLinter(Tool): def invoke(self, dirname, filenames=set()): retval = defaultdict(lambda: defaultdict(list)) if len(filenames) == 0: cmd = "find %s -name '*.rb' | xargs ...
7dc734641c1bc7006c9d382afa00c3a8c0b16c50
admin/common_auth/forms.py
admin/common_auth/forms.py
from __future__ import absolute_import from django import forms from django.contrib.auth.forms import UserCreationForm from django.contrib.admin.widgets import FilteredSelectMultiple from django.contrib.auth.models import Group from admin.common_auth.models import MyUser class LoginForm(forms.Form): email = for...
from __future__ import absolute_import from django import forms from django.contrib.auth.forms import UserCreationForm from django.contrib.admin.widgets import FilteredSelectMultiple from django.contrib.auth.models import Group from osf.models.user import OSFUser from admin.common_auth.models import AdminProfile cl...
Update desk form and add update form as well
Update desk form and add update form as well
Python
apache-2.0
aaxelb/osf.io,sloria/osf.io,erinspace/osf.io,baylee-d/osf.io,laurenrevere/osf.io,mattclark/osf.io,mfraezz/osf.io,CenterForOpenScience/osf.io,aaxelb/osf.io,mluo613/osf.io,aaxelb/osf.io,alexschiller/osf.io,binoculars/osf.io,alexschiller/osf.io,alexschiller/osf.io,icereval/osf.io,baylee-d/osf.io,saradbowman/osf.io,pattisd...
from __future__ import absolute_import from django import forms from django.contrib.auth.forms import UserCreationForm from django.contrib.admin.widgets import FilteredSelectMultiple from django.contrib.auth.models import Group from admin.common_auth.models import MyUser class LoginForm(forms.Form): email = for...
from __future__ import absolute_import from django import forms from django.contrib.auth.forms import UserCreationForm from django.contrib.admin.widgets import FilteredSelectMultiple from django.contrib.auth.models import Group from osf.models.user import OSFUser from admin.common_auth.models import AdminProfile cl...
<commit_before>from __future__ import absolute_import from django import forms from django.contrib.auth.forms import UserCreationForm from django.contrib.admin.widgets import FilteredSelectMultiple from django.contrib.auth.models import Group from admin.common_auth.models import MyUser class LoginForm(forms.Form): ...
from __future__ import absolute_import from django import forms from django.contrib.auth.forms import UserCreationForm from django.contrib.admin.widgets import FilteredSelectMultiple from django.contrib.auth.models import Group from osf.models.user import OSFUser from admin.common_auth.models import AdminProfile cl...
from __future__ import absolute_import from django import forms from django.contrib.auth.forms import UserCreationForm from django.contrib.admin.widgets import FilteredSelectMultiple from django.contrib.auth.models import Group from admin.common_auth.models import MyUser class LoginForm(forms.Form): email = for...
<commit_before>from __future__ import absolute_import from django import forms from django.contrib.auth.forms import UserCreationForm from django.contrib.admin.widgets import FilteredSelectMultiple from django.contrib.auth.models import Group from admin.common_auth.models import MyUser class LoginForm(forms.Form): ...
5d8dafb9bd6a6c5c5964f7076b7d398d285aaf8d
zeus/artifacts/__init__.py
zeus/artifacts/__init__.py
from __future__ import absolute_import, print_function from .manager import Manager from .checkstyle import CheckstyleHandler from .coverage import CoverageHandler from .pycodestyle import PyCodeStyleHandler from .xunit import XunitHandler manager = Manager() manager.register(CheckstyleHandler, [ 'ch...
from __future__ import absolute_import, print_function from .manager import Manager from .checkstyle import CheckstyleHandler from .coverage import CoverageHandler from .pycodestyle import PyCodeStyleHandler from .pylint import PyLintHandler from .xunit import XunitHandler manager = Manager() manager.register(Checkst...
Add PyLintHandler to artifact manager
fix: Add PyLintHandler to artifact manager
Python
apache-2.0
getsentry/zeus,getsentry/zeus,getsentry/zeus,getsentry/zeus
from __future__ import absolute_import, print_function from .manager import Manager from .checkstyle import CheckstyleHandler from .coverage import CoverageHandler from .pycodestyle import PyCodeStyleHandler from .xunit import XunitHandler manager = Manager() manager.register(CheckstyleHandler, [ 'ch...
from __future__ import absolute_import, print_function from .manager import Manager from .checkstyle import CheckstyleHandler from .coverage import CoverageHandler from .pycodestyle import PyCodeStyleHandler from .pylint import PyLintHandler from .xunit import XunitHandler manager = Manager() manager.register(Checkst...
<commit_before>from __future__ import absolute_import, print_function from .manager import Manager from .checkstyle import CheckstyleHandler from .coverage import CoverageHandler from .pycodestyle import PyCodeStyleHandler from .xunit import XunitHandler manager = Manager() manager.register(CheckstyleHandler, [ ...
from __future__ import absolute_import, print_function from .manager import Manager from .checkstyle import CheckstyleHandler from .coverage import CoverageHandler from .pycodestyle import PyCodeStyleHandler from .pylint import PyLintHandler from .xunit import XunitHandler manager = Manager() manager.register(Checkst...
from __future__ import absolute_import, print_function from .manager import Manager from .checkstyle import CheckstyleHandler from .coverage import CoverageHandler from .pycodestyle import PyCodeStyleHandler from .xunit import XunitHandler manager = Manager() manager.register(CheckstyleHandler, [ 'ch...
<commit_before>from __future__ import absolute_import, print_function from .manager import Manager from .checkstyle import CheckstyleHandler from .coverage import CoverageHandler from .pycodestyle import PyCodeStyleHandler from .xunit import XunitHandler manager = Manager() manager.register(CheckstyleHandler, [ ...
511561918ad5f7620211341ebda373d5dd928377
Rubik/event.py
Rubik/event.py
class Event: source = None event = None data = None def __init__(self, source, event, data=None): self.source = source self.event = event self.data = data SOURCE_OTHER = 0 SOURCE_GUI = 1 SOURCE_RUBIK = 2 SOURCE_SIMON = 3 SOURCE_GEARS = 4 EVENT_DEFAULT = 0 EVENT_BUTTON1 = 1 EV...
class Event: def __init__(self, source, event, data=None): self.source = source self.event = event self.data = data SOURCE_OTHER = 0 SOURCE_GUI = 1 SOURCE_RUBIK = 2 SOURCE_SIMON = 3 SOURCE_GEARS = 4 EVENT_DEFAULT = 0 EVENT_BUTTON1 = 1 EVENT_BUTTON2 = 2 EVENT_BUTTON3 = 3 EVENT_BUTTON4 = 4 ...
Fix Event class instance variables
Fix Event class instance variables
Python
apache-2.0
RoboErik/RUBIK,RoboErik/RUBIK,RoboErik/RUBIK
class Event: source = None event = None data = None def __init__(self, source, event, data=None): self.source = source self.event = event self.data = data SOURCE_OTHER = 0 SOURCE_GUI = 1 SOURCE_RUBIK = 2 SOURCE_SIMON = 3 SOURCE_GEARS = 4 EVENT_DEFAULT = 0 EVENT_BUTTON1 = 1 EV...
class Event: def __init__(self, source, event, data=None): self.source = source self.event = event self.data = data SOURCE_OTHER = 0 SOURCE_GUI = 1 SOURCE_RUBIK = 2 SOURCE_SIMON = 3 SOURCE_GEARS = 4 EVENT_DEFAULT = 0 EVENT_BUTTON1 = 1 EVENT_BUTTON2 = 2 EVENT_BUTTON3 = 3 EVENT_BUTTON4 = 4 ...
<commit_before>class Event: source = None event = None data = None def __init__(self, source, event, data=None): self.source = source self.event = event self.data = data SOURCE_OTHER = 0 SOURCE_GUI = 1 SOURCE_RUBIK = 2 SOURCE_SIMON = 3 SOURCE_GEARS = 4 EVENT_DEFAULT = 0 EVENT...
class Event: def __init__(self, source, event, data=None): self.source = source self.event = event self.data = data SOURCE_OTHER = 0 SOURCE_GUI = 1 SOURCE_RUBIK = 2 SOURCE_SIMON = 3 SOURCE_GEARS = 4 EVENT_DEFAULT = 0 EVENT_BUTTON1 = 1 EVENT_BUTTON2 = 2 EVENT_BUTTON3 = 3 EVENT_BUTTON4 = 4 ...
class Event: source = None event = None data = None def __init__(self, source, event, data=None): self.source = source self.event = event self.data = data SOURCE_OTHER = 0 SOURCE_GUI = 1 SOURCE_RUBIK = 2 SOURCE_SIMON = 3 SOURCE_GEARS = 4 EVENT_DEFAULT = 0 EVENT_BUTTON1 = 1 EV...
<commit_before>class Event: source = None event = None data = None def __init__(self, source, event, data=None): self.source = source self.event = event self.data = data SOURCE_OTHER = 0 SOURCE_GUI = 1 SOURCE_RUBIK = 2 SOURCE_SIMON = 3 SOURCE_GEARS = 4 EVENT_DEFAULT = 0 EVENT...
37669b43ba35767d28494848e2f1d10d662ddf47
joblib/test/test_logger.py
joblib/test/test_logger.py
""" Test the logger module. """ # Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # Copyright (c) 2009 Gael Varoquaux # License: BSD Style, 3 clauses. import shutil import os from tempfile import mkdtemp import nose from ..logger import PrintTime #################################################...
""" Test the logger module. """ # Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # Copyright (c) 2009 Gael Varoquaux # License: BSD Style, 3 clauses. import shutil import os from tempfile import mkdtemp import nose from ..logger import PrintTime #################################################...
Improve smoke test coverage for the logger.
Improve smoke test coverage for the logger.
Python
bsd-3-clause
lesteve/joblib,lesteve/joblib,tomMoral/joblib,aabadie/joblib,karandesai-96/joblib,joblib/joblib,joblib/joblib,karandesai-96/joblib,tomMoral/joblib,aabadie/joblib
""" Test the logger module. """ # Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # Copyright (c) 2009 Gael Varoquaux # License: BSD Style, 3 clauses. import shutil import os from tempfile import mkdtemp import nose from ..logger import PrintTime #################################################...
""" Test the logger module. """ # Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # Copyright (c) 2009 Gael Varoquaux # License: BSD Style, 3 clauses. import shutil import os from tempfile import mkdtemp import nose from ..logger import PrintTime #################################################...
<commit_before>""" Test the logger module. """ # Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # Copyright (c) 2009 Gael Varoquaux # License: BSD Style, 3 clauses. import shutil import os from tempfile import mkdtemp import nose from ..logger import PrintTime ##################################...
""" Test the logger module. """ # Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # Copyright (c) 2009 Gael Varoquaux # License: BSD Style, 3 clauses. import shutil import os from tempfile import mkdtemp import nose from ..logger import PrintTime #################################################...
""" Test the logger module. """ # Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # Copyright (c) 2009 Gael Varoquaux # License: BSD Style, 3 clauses. import shutil import os from tempfile import mkdtemp import nose from ..logger import PrintTime #################################################...
<commit_before>""" Test the logger module. """ # Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # Copyright (c) 2009 Gael Varoquaux # License: BSD Style, 3 clauses. import shutil import os from tempfile import mkdtemp import nose from ..logger import PrintTime ##################################...
e5d42af3e94869bb40225c808121b40ed8f94a29
tools/misc/python/test-data-in-out.py
tools/misc/python/test-data-in-out.py
# TOOL test-data-in-out.py: "Test data input and output in Python" (Data input output test.) # INPUT input TYPE GENERIC # OUTPUT output import shutil shutil.copyfile('input', 'output')
# TOOL test-data-in-out.py: "Test data input and output in Python" (Data input output test.) # INPUT input TYPE GENERIC # OUTPUT output # OUTPUT OPTIONAL missing_output.txt import shutil shutil.copyfile('input', 'output')
Test that missing optional outputs aren't created
Test that missing optional outputs aren't created
Python
mit
chipster/chipster-tools,chipster/chipster-tools,chipster/chipster-tools,chipster/chipster-tools
# TOOL test-data-in-out.py: "Test data input and output in Python" (Data input output test.) # INPUT input TYPE GENERIC # OUTPUT output import shutil shutil.copyfile('input', 'output') Test that missing optional outputs aren't created
# TOOL test-data-in-out.py: "Test data input and output in Python" (Data input output test.) # INPUT input TYPE GENERIC # OUTPUT output # OUTPUT OPTIONAL missing_output.txt import shutil shutil.copyfile('input', 'output')
<commit_before># TOOL test-data-in-out.py: "Test data input and output in Python" (Data input output test.) # INPUT input TYPE GENERIC # OUTPUT output import shutil shutil.copyfile('input', 'output') <commit_msg>Test that missing optional outputs aren't created<commit_after>
# TOOL test-data-in-out.py: "Test data input and output in Python" (Data input output test.) # INPUT input TYPE GENERIC # OUTPUT output # OUTPUT OPTIONAL missing_output.txt import shutil shutil.copyfile('input', 'output')
# TOOL test-data-in-out.py: "Test data input and output in Python" (Data input output test.) # INPUT input TYPE GENERIC # OUTPUT output import shutil shutil.copyfile('input', 'output') Test that missing optional outputs aren't created# TOOL test-data-in-out.py: "Test data input and output in Python" (Data input out...
<commit_before># TOOL test-data-in-out.py: "Test data input and output in Python" (Data input output test.) # INPUT input TYPE GENERIC # OUTPUT output import shutil shutil.copyfile('input', 'output') <commit_msg>Test that missing optional outputs aren't created<commit_after># TOOL test-data-in-out.py: "Test data in...
ca4dc41a350210ad54a9ef89d861fa1a1866cd5d
dailydevo/desiringgod_actions.py
dailydevo/desiringgod_actions.py
# coding=utf8 # Local modules from common import debug from common.action import action_classes from common.telegram import telegram_utils from dailydevo import desiringgod_utils from user import user_actions PROMPT = "Here are today's articles from desiringgod.org!\nTap on any one to get the article!" class DGDevo...
# coding=utf8 # Local modules from common import debug from common.action import action_classes from common.telegram import telegram_utils from dailydevo import desiringgod_utils from user import user_actions PROMPT = "Here are today's articles from desiringgod.org!\nTap on any one to get the article!" class DGDevo...
Fix for done action bug
Fix for done action bug
Python
mit
julwrites/biblicabot
# coding=utf8 # Local modules from common import debug from common.action import action_classes from common.telegram import telegram_utils from dailydevo import desiringgod_utils from user import user_actions PROMPT = "Here are today's articles from desiringgod.org!\nTap on any one to get the article!" class DGDevo...
# coding=utf8 # Local modules from common import debug from common.action import action_classes from common.telegram import telegram_utils from dailydevo import desiringgod_utils from user import user_actions PROMPT = "Here are today's articles from desiringgod.org!\nTap on any one to get the article!" class DGDevo...
<commit_before># coding=utf8 # Local modules from common import debug from common.action import action_classes from common.telegram import telegram_utils from dailydevo import desiringgod_utils from user import user_actions PROMPT = "Here are today's articles from desiringgod.org!\nTap on any one to get the article!...
# coding=utf8 # Local modules from common import debug from common.action import action_classes from common.telegram import telegram_utils from dailydevo import desiringgod_utils from user import user_actions PROMPT = "Here are today's articles from desiringgod.org!\nTap on any one to get the article!" class DGDevo...
# coding=utf8 # Local modules from common import debug from common.action import action_classes from common.telegram import telegram_utils from dailydevo import desiringgod_utils from user import user_actions PROMPT = "Here are today's articles from desiringgod.org!\nTap on any one to get the article!" class DGDevo...
<commit_before># coding=utf8 # Local modules from common import debug from common.action import action_classes from common.telegram import telegram_utils from dailydevo import desiringgod_utils from user import user_actions PROMPT = "Here are today's articles from desiringgod.org!\nTap on any one to get the article!...
e2cecaa99bae3635fcaa58ea57d67bce7dc83768
src/psd2svg/rasterizer/batik_rasterizer.py
src/psd2svg/rasterizer/batik_rasterizer.py
# -*- coding: utf-8 -*- """ Chromium-based rasterizer module. Prerequisite: sudo apt-get install -y chromedriver chromium """ from __future__ import absolute_import, unicode_literals from PIL import Image import logging import os import subprocess from psd2svg.utils import temporary_directory logger = logging....
# -*- coding: utf-8 -*- """ Chromium-based rasterizer module. Prerequisite: sudo apt-get install -y chromedriver chromium """ from __future__ import absolute_import, unicode_literals from PIL import Image import logging import os import subprocess from psd2svg.utils import temporary_directory logger = logging....
Add bg option in batik rasterizer
Add bg option in batik rasterizer
Python
mit
kyamagu/psd2svg
# -*- coding: utf-8 -*- """ Chromium-based rasterizer module. Prerequisite: sudo apt-get install -y chromedriver chromium """ from __future__ import absolute_import, unicode_literals from PIL import Image import logging import os import subprocess from psd2svg.utils import temporary_directory logger = logging....
# -*- coding: utf-8 -*- """ Chromium-based rasterizer module. Prerequisite: sudo apt-get install -y chromedriver chromium """ from __future__ import absolute_import, unicode_literals from PIL import Image import logging import os import subprocess from psd2svg.utils import temporary_directory logger = logging....
<commit_before># -*- coding: utf-8 -*- """ Chromium-based rasterizer module. Prerequisite: sudo apt-get install -y chromedriver chromium """ from __future__ import absolute_import, unicode_literals from PIL import Image import logging import os import subprocess from psd2svg.utils import temporary_directory lo...
# -*- coding: utf-8 -*- """ Chromium-based rasterizer module. Prerequisite: sudo apt-get install -y chromedriver chromium """ from __future__ import absolute_import, unicode_literals from PIL import Image import logging import os import subprocess from psd2svg.utils import temporary_directory logger = logging....
# -*- coding: utf-8 -*- """ Chromium-based rasterizer module. Prerequisite: sudo apt-get install -y chromedriver chromium """ from __future__ import absolute_import, unicode_literals from PIL import Image import logging import os import subprocess from psd2svg.utils import temporary_directory logger = logging....
<commit_before># -*- coding: utf-8 -*- """ Chromium-based rasterizer module. Prerequisite: sudo apt-get install -y chromedriver chromium """ from __future__ import absolute_import, unicode_literals from PIL import Image import logging import os import subprocess from psd2svg.utils import temporary_directory lo...
11485f52c8c89fb402d859b3f15068255109a0f5
website/user/middleware.py
website/user/middleware.py
import base64 from .models import Device class BasicAuthRemote(object): def __init__(self, get_response): self.get_response = get_response def get_user_token(self, email, token): try: device = Device.objects.get(token=token).select_related('user') if device.user.email ...
import base64 from .models import Device class BasicAuthRemote(object): def __init__(self, get_response): self.get_response = get_response def get_user_token(self, email, token): try: device = Device.objects.get(token=token) if device.user.email != email: ...
Fix 401 error for requests that require authentication
Fix 401 error for requests that require authentication
Python
mit
ava-project/ava-website,ava-project/ava-website,ava-project/ava-website
import base64 from .models import Device class BasicAuthRemote(object): def __init__(self, get_response): self.get_response = get_response def get_user_token(self, email, token): try: device = Device.objects.get(token=token).select_related('user') if device.user.email ...
import base64 from .models import Device class BasicAuthRemote(object): def __init__(self, get_response): self.get_response = get_response def get_user_token(self, email, token): try: device = Device.objects.get(token=token) if device.user.email != email: ...
<commit_before>import base64 from .models import Device class BasicAuthRemote(object): def __init__(self, get_response): self.get_response = get_response def get_user_token(self, email, token): try: device = Device.objects.get(token=token).select_related('user') if dev...
import base64 from .models import Device class BasicAuthRemote(object): def __init__(self, get_response): self.get_response = get_response def get_user_token(self, email, token): try: device = Device.objects.get(token=token) if device.user.email != email: ...
import base64 from .models import Device class BasicAuthRemote(object): def __init__(self, get_response): self.get_response = get_response def get_user_token(self, email, token): try: device = Device.objects.get(token=token).select_related('user') if device.user.email ...
<commit_before>import base64 from .models import Device class BasicAuthRemote(object): def __init__(self, get_response): self.get_response = get_response def get_user_token(self, email, token): try: device = Device.objects.get(token=token).select_related('user') if dev...
1a71fba6224a9757f19e702a3b9a1cebf496a754
src/loop+blkback/plugin.py
src/loop+blkback/plugin.py
#!/usr/bin/env python import os import sys import xapi import xapi.plugin from xapi.storage.datapath import log class Implementation(xapi.plugin.Plugin_skeleton): def query(self, dbg): return { "plugin": "loopdev+blkback", "name": "The loopdev+blkback kernel-space datapath plugin...
#!/usr/bin/env python import os import sys import xapi import xapi.storage.api.plugin from xapi.storage import log class Implementation(xapi.storage.api.plugin.Plugin_skeleton): def query(self, dbg): return { "plugin": "loopdev+blkback", "name": "The loopdev+blkback kernel-space ...
Use the new xapi.storage package hierarchy
Use the new xapi.storage package hierarchy Signed-off-by: David Scott <63c9eb0ea83039690fefa11afe17873ba8278a56@eu.citrix.com>
Python
lgpl-2.1
jjd27/xapi-storage-datapath-plugins,robertbreker/xapi-storage-datapath-plugins,djs55/xapi-storage-datapath-plugins,xapi-project/xapi-storage-datapath-plugins,stefanopanella/xapi-storage-plugins,stefanopanella/xapi-storage-plugins,stefanopanella/xapi-storage-plugins
#!/usr/bin/env python import os import sys import xapi import xapi.plugin from xapi.storage.datapath import log class Implementation(xapi.plugin.Plugin_skeleton): def query(self, dbg): return { "plugin": "loopdev+blkback", "name": "The loopdev+blkback kernel-space datapath plugin...
#!/usr/bin/env python import os import sys import xapi import xapi.storage.api.plugin from xapi.storage import log class Implementation(xapi.storage.api.plugin.Plugin_skeleton): def query(self, dbg): return { "plugin": "loopdev+blkback", "name": "The loopdev+blkback kernel-space ...
<commit_before>#!/usr/bin/env python import os import sys import xapi import xapi.plugin from xapi.storage.datapath import log class Implementation(xapi.plugin.Plugin_skeleton): def query(self, dbg): return { "plugin": "loopdev+blkback", "name": "The loopdev+blkback kernel-space ...
#!/usr/bin/env python import os import sys import xapi import xapi.storage.api.plugin from xapi.storage import log class Implementation(xapi.storage.api.plugin.Plugin_skeleton): def query(self, dbg): return { "plugin": "loopdev+blkback", "name": "The loopdev+blkback kernel-space ...
#!/usr/bin/env python import os import sys import xapi import xapi.plugin from xapi.storage.datapath import log class Implementation(xapi.plugin.Plugin_skeleton): def query(self, dbg): return { "plugin": "loopdev+blkback", "name": "The loopdev+blkback kernel-space datapath plugin...
<commit_before>#!/usr/bin/env python import os import sys import xapi import xapi.plugin from xapi.storage.datapath import log class Implementation(xapi.plugin.Plugin_skeleton): def query(self, dbg): return { "plugin": "loopdev+blkback", "name": "The loopdev+blkback kernel-space ...
cb6c73b59ddfdd01f6a2f75b65e8a9e06339c87d
src/setup.py
src/setup.py
import os from setuptools import setup, find_packages with open(os.path.join(os.path.dirname(__file__), 'README.txt')) as f: long_description = f.read() setup( name="pyshark", version="0.3.7.2", packages=find_packages(), package_data={'': ['*.ini', '*.pcapng']}, # Temporarily using trollis 1.0...
import os from setuptools import setup, find_packages with open(os.path.join(os.path.dirname(__file__), 'README.txt')) as f: long_description = f.read() setup( name="pyshark", version="0.3.7.2", packages=find_packages(), package_data={'': ['*.ini', '*.pcapng']}, # Temporarily using trollis 1.0...
Declare MIT license and support for Python 2 and 3
Declare MIT license and support for Python 2 and 3
Python
mit
KimiNewt/pyshark
import os from setuptools import setup, find_packages with open(os.path.join(os.path.dirname(__file__), 'README.txt')) as f: long_description = f.read() setup( name="pyshark", version="0.3.7.2", packages=find_packages(), package_data={'': ['*.ini', '*.pcapng']}, # Temporarily using trollis 1.0...
import os from setuptools import setup, find_packages with open(os.path.join(os.path.dirname(__file__), 'README.txt')) as f: long_description = f.read() setup( name="pyshark", version="0.3.7.2", packages=find_packages(), package_data={'': ['*.ini', '*.pcapng']}, # Temporarily using trollis 1.0...
<commit_before>import os from setuptools import setup, find_packages with open(os.path.join(os.path.dirname(__file__), 'README.txt')) as f: long_description = f.read() setup( name="pyshark", version="0.3.7.2", packages=find_packages(), package_data={'': ['*.ini', '*.pcapng']}, # Temporarily us...
import os from setuptools import setup, find_packages with open(os.path.join(os.path.dirname(__file__), 'README.txt')) as f: long_description = f.read() setup( name="pyshark", version="0.3.7.2", packages=find_packages(), package_data={'': ['*.ini', '*.pcapng']}, # Temporarily using trollis 1.0...
import os from setuptools import setup, find_packages with open(os.path.join(os.path.dirname(__file__), 'README.txt')) as f: long_description = f.read() setup( name="pyshark", version="0.3.7.2", packages=find_packages(), package_data={'': ['*.ini', '*.pcapng']}, # Temporarily using trollis 1.0...
<commit_before>import os from setuptools import setup, find_packages with open(os.path.join(os.path.dirname(__file__), 'README.txt')) as f: long_description = f.read() setup( name="pyshark", version="0.3.7.2", packages=find_packages(), package_data={'': ['*.ini', '*.pcapng']}, # Temporarily us...
18afda24f10e06bab6780beb9a489a34110dc482
aboutdialog.py
aboutdialog.py
# -*- coding: utf-8 -*- from PyQt4.QtGui import QDialog, qApp from ui.aboutdialog import Ui_AboutDialog from common import dataDirPath from version import VERSION class AboutDialog(QDialog, Ui_AboutDialog): def __init__(self, parent=None): super(AboutDialog, self).__init__(parent) self.setupUi(...
# -*- coding: utf-8 -*- from PyQt4.QtGui import QDialog, qApp from ui.aboutdialog import Ui_AboutDialog from common import dataDirPath from version import VERSION class AboutDialog(QDialog, Ui_AboutDialog): def __init__(self, parent=None): super(AboutDialog, self).__init__(parent) self.setupUi(...
Fix copyright year, it should start from 2016 :(
Fix copyright year, it should start from 2016 :(
Python
apache-2.0
timxx/gitc,timxx/gitc
# -*- coding: utf-8 -*- from PyQt4.QtGui import QDialog, qApp from ui.aboutdialog import Ui_AboutDialog from common import dataDirPath from version import VERSION class AboutDialog(QDialog, Ui_AboutDialog): def __init__(self, parent=None): super(AboutDialog, self).__init__(parent) self.setupUi(...
# -*- coding: utf-8 -*- from PyQt4.QtGui import QDialog, qApp from ui.aboutdialog import Ui_AboutDialog from common import dataDirPath from version import VERSION class AboutDialog(QDialog, Ui_AboutDialog): def __init__(self, parent=None): super(AboutDialog, self).__init__(parent) self.setupUi(...
<commit_before># -*- coding: utf-8 -*- from PyQt4.QtGui import QDialog, qApp from ui.aboutdialog import Ui_AboutDialog from common import dataDirPath from version import VERSION class AboutDialog(QDialog, Ui_AboutDialog): def __init__(self, parent=None): super(AboutDialog, self).__init__(parent) ...
# -*- coding: utf-8 -*- from PyQt4.QtGui import QDialog, qApp from ui.aboutdialog import Ui_AboutDialog from common import dataDirPath from version import VERSION class AboutDialog(QDialog, Ui_AboutDialog): def __init__(self, parent=None): super(AboutDialog, self).__init__(parent) self.setupUi(...
# -*- coding: utf-8 -*- from PyQt4.QtGui import QDialog, qApp from ui.aboutdialog import Ui_AboutDialog from common import dataDirPath from version import VERSION class AboutDialog(QDialog, Ui_AboutDialog): def __init__(self, parent=None): super(AboutDialog, self).__init__(parent) self.setupUi(...
<commit_before># -*- coding: utf-8 -*- from PyQt4.QtGui import QDialog, qApp from ui.aboutdialog import Ui_AboutDialog from common import dataDirPath from version import VERSION class AboutDialog(QDialog, Ui_AboutDialog): def __init__(self, parent=None): super(AboutDialog, self).__init__(parent) ...
625a0c88283d838093fdfd6601c7482a3cc003c9
cptm/experiment_calculate_perspective_jsd.py
cptm/experiment_calculate_perspective_jsd.py
import logging import argparse from utils.experiment import load_config, get_corpus from utils.controversialissues import perspective_jsd_matrix logging.basicConfig(format='%(levelname)s : %(message)s', level=logging.DEBUG) logger = logging.getLogger(__name__) parser = argparse.ArgumentParser() parser.add_argument('...
import logging import argparse import numpy as np from utils.experiment import load_config, get_corpus from utils.controversialissues import perspective_jsd_matrix logging.basicConfig(format='%(levelname)s : %(message)s', level=logging.DEBUG) logger = logging.getLogger(__name__) parser = argparse.ArgumentParser() pa...
Save results of perspective jsd calculation to file
Save results of perspective jsd calculation to file
Python
apache-2.0
NLeSC/cptm,NLeSC/cptm
import logging import argparse from utils.experiment import load_config, get_corpus from utils.controversialissues import perspective_jsd_matrix logging.basicConfig(format='%(levelname)s : %(message)s', level=logging.DEBUG) logger = logging.getLogger(__name__) parser = argparse.ArgumentParser() parser.add_argument('...
import logging import argparse import numpy as np from utils.experiment import load_config, get_corpus from utils.controversialissues import perspective_jsd_matrix logging.basicConfig(format='%(levelname)s : %(message)s', level=logging.DEBUG) logger = logging.getLogger(__name__) parser = argparse.ArgumentParser() pa...
<commit_before>import logging import argparse from utils.experiment import load_config, get_corpus from utils.controversialissues import perspective_jsd_matrix logging.basicConfig(format='%(levelname)s : %(message)s', level=logging.DEBUG) logger = logging.getLogger(__name__) parser = argparse.ArgumentParser() parser...
import logging import argparse import numpy as np from utils.experiment import load_config, get_corpus from utils.controversialissues import perspective_jsd_matrix logging.basicConfig(format='%(levelname)s : %(message)s', level=logging.DEBUG) logger = logging.getLogger(__name__) parser = argparse.ArgumentParser() pa...
import logging import argparse from utils.experiment import load_config, get_corpus from utils.controversialissues import perspective_jsd_matrix logging.basicConfig(format='%(levelname)s : %(message)s', level=logging.DEBUG) logger = logging.getLogger(__name__) parser = argparse.ArgumentParser() parser.add_argument('...
<commit_before>import logging import argparse from utils.experiment import load_config, get_corpus from utils.controversialissues import perspective_jsd_matrix logging.basicConfig(format='%(levelname)s : %(message)s', level=logging.DEBUG) logger = logging.getLogger(__name__) parser = argparse.ArgumentParser() parser...
683257082b9e2d0aba27e6124cd419a4cf19d2a9
docupload/htmlify.py
docupload/htmlify.py
''' HTMLify: Convert any fileformat supported by pandoc to HTML5 ''' import pypandoc def get_html(doc_file): '''Uses pypandoc to convert uploaded file to HTML5''' tmp_loc = '/tmp/uploaded_' + str(doc_file) with open(tmp_loc, 'wb') as tmp_file: for chunk in doc_file.chunks(): tmp_fil...
''' HTMLify: Convert any fileformat supported by pandoc to HTML5 ''' import os import pypandoc def get_html(doc_file): '''Uses pypandoc to convert uploaded file to HTML5''' tmp_loc = '/tmp/uploaded_' + str(doc_file) with open(tmp_loc, 'wb') as tmp_file: for chunk in doc_file.chunks(): ...
Remove tmp file after conversion
Remove tmp file after conversion
Python
mit
vaibhawW/oksp,vaibhawW/oksp
''' HTMLify: Convert any fileformat supported by pandoc to HTML5 ''' import pypandoc def get_html(doc_file): '''Uses pypandoc to convert uploaded file to HTML5''' tmp_loc = '/tmp/uploaded_' + str(doc_file) with open(tmp_loc, 'wb') as tmp_file: for chunk in doc_file.chunks(): tmp_fil...
''' HTMLify: Convert any fileformat supported by pandoc to HTML5 ''' import os import pypandoc def get_html(doc_file): '''Uses pypandoc to convert uploaded file to HTML5''' tmp_loc = '/tmp/uploaded_' + str(doc_file) with open(tmp_loc, 'wb') as tmp_file: for chunk in doc_file.chunks(): ...
<commit_before>''' HTMLify: Convert any fileformat supported by pandoc to HTML5 ''' import pypandoc def get_html(doc_file): '''Uses pypandoc to convert uploaded file to HTML5''' tmp_loc = '/tmp/uploaded_' + str(doc_file) with open(tmp_loc, 'wb') as tmp_file: for chunk in doc_file.chunks(): ...
''' HTMLify: Convert any fileformat supported by pandoc to HTML5 ''' import os import pypandoc def get_html(doc_file): '''Uses pypandoc to convert uploaded file to HTML5''' tmp_loc = '/tmp/uploaded_' + str(doc_file) with open(tmp_loc, 'wb') as tmp_file: for chunk in doc_file.chunks(): ...
''' HTMLify: Convert any fileformat supported by pandoc to HTML5 ''' import pypandoc def get_html(doc_file): '''Uses pypandoc to convert uploaded file to HTML5''' tmp_loc = '/tmp/uploaded_' + str(doc_file) with open(tmp_loc, 'wb') as tmp_file: for chunk in doc_file.chunks(): tmp_fil...
<commit_before>''' HTMLify: Convert any fileformat supported by pandoc to HTML5 ''' import pypandoc def get_html(doc_file): '''Uses pypandoc to convert uploaded file to HTML5''' tmp_loc = '/tmp/uploaded_' + str(doc_file) with open(tmp_loc, 'wb') as tmp_file: for chunk in doc_file.chunks(): ...
f66fc484cc11b212fc3db22d8956be5f4fd6c0b7
firecares/settings/production.py
firecares/settings/production.py
from firecares.settings.base import * INSTALLED_APPS = ( 'django_statsd', ) + INSTALLED_APPS STATSD_HOST = 'stats.garnertb.com' STATSD_PREFIX = 'firecares' STATSD_PATCHES = [ 'django_statsd.patches.db', 'django_statsd.patches.cache', ] MIDDLEWARE_CLASSES = ( 'django_statsd.middleware.GraphiteRequest...
from firecares.settings.base import * INSTALLED_APPS = ( 'django_statsd', ) + INSTALLED_APPS STATSD_HOST = 'stats.garnertb.com' STATSD_PREFIX = 'firecares' STATSD_PATCHES = [ 'django_statsd.patches.db', 'django_statsd.patches.cache', ] MIDDLEWARE_CLASSES = ( 'django_statsd.middleware.GraphiteRequest...
Disable query string auth for django compressor.
Disable query string auth for django compressor.
Python
mit
HunterConnelly/firecares,ROGUE-JCTD/vida,garnertb/firecares,HunterConnelly/firecares,FireCARES/firecares,ROGUE-JCTD/vida,garnertb/firecares,garnertb/firecares,FireCARES/firecares,meilinger/firecares,garnertb/firecares,ROGUE-JCTD/vida,HunterConnelly/firecares,meilinger/firecares,HunterConnelly/firecares,meilinger/fireca...
from firecares.settings.base import * INSTALLED_APPS = ( 'django_statsd', ) + INSTALLED_APPS STATSD_HOST = 'stats.garnertb.com' STATSD_PREFIX = 'firecares' STATSD_PATCHES = [ 'django_statsd.patches.db', 'django_statsd.patches.cache', ] MIDDLEWARE_CLASSES = ( 'django_statsd.middleware.GraphiteRequest...
from firecares.settings.base import * INSTALLED_APPS = ( 'django_statsd', ) + INSTALLED_APPS STATSD_HOST = 'stats.garnertb.com' STATSD_PREFIX = 'firecares' STATSD_PATCHES = [ 'django_statsd.patches.db', 'django_statsd.patches.cache', ] MIDDLEWARE_CLASSES = ( 'django_statsd.middleware.GraphiteRequest...
<commit_before>from firecares.settings.base import * INSTALLED_APPS = ( 'django_statsd', ) + INSTALLED_APPS STATSD_HOST = 'stats.garnertb.com' STATSD_PREFIX = 'firecares' STATSD_PATCHES = [ 'django_statsd.patches.db', 'django_statsd.patches.cache', ] MIDDLEWARE_CLASSES = ( 'django_statsd.middleware....
from firecares.settings.base import * INSTALLED_APPS = ( 'django_statsd', ) + INSTALLED_APPS STATSD_HOST = 'stats.garnertb.com' STATSD_PREFIX = 'firecares' STATSD_PATCHES = [ 'django_statsd.patches.db', 'django_statsd.patches.cache', ] MIDDLEWARE_CLASSES = ( 'django_statsd.middleware.GraphiteRequest...
from firecares.settings.base import * INSTALLED_APPS = ( 'django_statsd', ) + INSTALLED_APPS STATSD_HOST = 'stats.garnertb.com' STATSD_PREFIX = 'firecares' STATSD_PATCHES = [ 'django_statsd.patches.db', 'django_statsd.patches.cache', ] MIDDLEWARE_CLASSES = ( 'django_statsd.middleware.GraphiteRequest...
<commit_before>from firecares.settings.base import * INSTALLED_APPS = ( 'django_statsd', ) + INSTALLED_APPS STATSD_HOST = 'stats.garnertb.com' STATSD_PREFIX = 'firecares' STATSD_PATCHES = [ 'django_statsd.patches.db', 'django_statsd.patches.cache', ] MIDDLEWARE_CLASSES = ( 'django_statsd.middleware....
e9cb0bff470dc6bfc926f0b4ac6214ae8a028e61
vcr/files.py
vcr/files.py
import os import yaml from .cassette import Cassette def load_cassette(cassette_path): try: pc = yaml.load(open(cassette_path)) cassette = Cassette(pc) return cassette except IOError: return None def save_cassette(cassette_path, cassette): dirname, filename = os.path.spli...
import os import yaml from .cassette import Cassette # Use the libYAML versions if possible try: from yaml import CLoader as Loader, CDumper as Dumper except ImportError: from yaml import Loader, Dumper def load_cassette(cassette_path): try: pc = yaml.load(open(cassette_path), Loader=Loader) ...
Use the libYAML version of yaml if it's available
Use the libYAML version of yaml if it's available
Python
mit
ByteInternet/vcrpy,aclevy/vcrpy,ByteInternet/vcrpy,kevin1024/vcrpy,poussik/vcrpy,bcen/vcrpy,yarikoptic/vcrpy,agriffis/vcrpy,graingert/vcrpy,poussik/vcrpy,gwillem/vcrpy,mgeisler/vcrpy,kevin1024/vcrpy,IvanMalison/vcrpy,graingert/vcrpy
import os import yaml from .cassette import Cassette def load_cassette(cassette_path): try: pc = yaml.load(open(cassette_path)) cassette = Cassette(pc) return cassette except IOError: return None def save_cassette(cassette_path, cassette): dirname, filename = os.path.spli...
import os import yaml from .cassette import Cassette # Use the libYAML versions if possible try: from yaml import CLoader as Loader, CDumper as Dumper except ImportError: from yaml import Loader, Dumper def load_cassette(cassette_path): try: pc = yaml.load(open(cassette_path), Loader=Loader) ...
<commit_before>import os import yaml from .cassette import Cassette def load_cassette(cassette_path): try: pc = yaml.load(open(cassette_path)) cassette = Cassette(pc) return cassette except IOError: return None def save_cassette(cassette_path, cassette): dirname, filename...
import os import yaml from .cassette import Cassette # Use the libYAML versions if possible try: from yaml import CLoader as Loader, CDumper as Dumper except ImportError: from yaml import Loader, Dumper def load_cassette(cassette_path): try: pc = yaml.load(open(cassette_path), Loader=Loader) ...
import os import yaml from .cassette import Cassette def load_cassette(cassette_path): try: pc = yaml.load(open(cassette_path)) cassette = Cassette(pc) return cassette except IOError: return None def save_cassette(cassette_path, cassette): dirname, filename = os.path.spli...
<commit_before>import os import yaml from .cassette import Cassette def load_cassette(cassette_path): try: pc = yaml.load(open(cassette_path)) cassette = Cassette(pc) return cassette except IOError: return None def save_cassette(cassette_path, cassette): dirname, filename...
525a624047fecce2acf4484c39bc244ad16e11c5
src/state/objects/Learn.py
src/state/objects/Learn.py
import sys import os sys.path.append(os.path.dirname(__file__) + "/../../") from state import state from state.stateEnum import StateEnum from helpers import configHelper from helpers import processorHelper class Learn: current_word = 0 def __init__(self, level_number): self.number = level_number ...
import sys import os sys.path.append(os.path.dirname(__file__) + "/../../") from state import state from state.stateEnum import StateEnum from helpers import configHelper from helpers import processorHelper class Learn: current_word = 0 def __init__(self, level_number): self.number = level_number ...
Verify overflow in words array into the learn module
Verify overflow in words array into the learn module
Python
mit
Blindle/Raspberry
import sys import os sys.path.append(os.path.dirname(__file__) + "/../../") from state import state from state.stateEnum import StateEnum from helpers import configHelper from helpers import processorHelper class Learn: current_word = 0 def __init__(self, level_number): self.number = level_number ...
import sys import os sys.path.append(os.path.dirname(__file__) + "/../../") from state import state from state.stateEnum import StateEnum from helpers import configHelper from helpers import processorHelper class Learn: current_word = 0 def __init__(self, level_number): self.number = level_number ...
<commit_before>import sys import os sys.path.append(os.path.dirname(__file__) + "/../../") from state import state from state.stateEnum import StateEnum from helpers import configHelper from helpers import processorHelper class Learn: current_word = 0 def __init__(self, level_number): self.number = ...
import sys import os sys.path.append(os.path.dirname(__file__) + "/../../") from state import state from state.stateEnum import StateEnum from helpers import configHelper from helpers import processorHelper class Learn: current_word = 0 def __init__(self, level_number): self.number = level_number ...
import sys import os sys.path.append(os.path.dirname(__file__) + "/../../") from state import state from state.stateEnum import StateEnum from helpers import configHelper from helpers import processorHelper class Learn: current_word = 0 def __init__(self, level_number): self.number = level_number ...
<commit_before>import sys import os sys.path.append(os.path.dirname(__file__) + "/../../") from state import state from state.stateEnum import StateEnum from helpers import configHelper from helpers import processorHelper class Learn: current_word = 0 def __init__(self, level_number): self.number = ...
a3dbd77875ab33e17ecc44efccc9c99dfbc27a7c
comics/comics/mortenm.py
comics/comics/mortenm.py
# encoding: utf-8 from comics.aggregator.crawler import BaseComicCrawler from comics.meta.base import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Morten M (vg.no)' language = 'no' url = 'http://www.vg.no/spesial/mortenm/' start_date = '1978-01-01' history_capable_days = 120 schedule ...
# encoding: utf-8 from comics.aggregator.crawler import BaseComicCrawler from comics.meta.base import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Morten M (vg.no)' language = 'no' url = 'http://www.vg.no/spesial/mortenm/' start_date = '1978-01-01' history_capable_days = 120 schedule ...
Add missing chars in URL for 'Morten M' crawler
Add missing chars in URL for 'Morten M' crawler
Python
agpl-3.0
datagutten/comics,datagutten/comics,klette/comics,jodal/comics,klette/comics,jodal/comics,jodal/comics,klette/comics,jodal/comics,datagutten/comics,datagutten/comics
# encoding: utf-8 from comics.aggregator.crawler import BaseComicCrawler from comics.meta.base import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Morten M (vg.no)' language = 'no' url = 'http://www.vg.no/spesial/mortenm/' start_date = '1978-01-01' history_capable_days = 120 schedule ...
# encoding: utf-8 from comics.aggregator.crawler import BaseComicCrawler from comics.meta.base import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Morten M (vg.no)' language = 'no' url = 'http://www.vg.no/spesial/mortenm/' start_date = '1978-01-01' history_capable_days = 120 schedule ...
<commit_before># encoding: utf-8 from comics.aggregator.crawler import BaseComicCrawler from comics.meta.base import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Morten M (vg.no)' language = 'no' url = 'http://www.vg.no/spesial/mortenm/' start_date = '1978-01-01' history_capable_days = 12...
# encoding: utf-8 from comics.aggregator.crawler import BaseComicCrawler from comics.meta.base import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Morten M (vg.no)' language = 'no' url = 'http://www.vg.no/spesial/mortenm/' start_date = '1978-01-01' history_capable_days = 120 schedule ...
# encoding: utf-8 from comics.aggregator.crawler import BaseComicCrawler from comics.meta.base import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Morten M (vg.no)' language = 'no' url = 'http://www.vg.no/spesial/mortenm/' start_date = '1978-01-01' history_capable_days = 120 schedule ...
<commit_before># encoding: utf-8 from comics.aggregator.crawler import BaseComicCrawler from comics.meta.base import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Morten M (vg.no)' language = 'no' url = 'http://www.vg.no/spesial/mortenm/' start_date = '1978-01-01' history_capable_days = 12...
8e6670a554694e540c02c9528fc6b22d9f0d6e15
django_cron/admin.py
django_cron/admin.py
from django.contrib import admin from django_cron.models import CronJobLog class CronJobLogAdmin(admin.ModelAdmin): class Meta: model = CronJobLog search_fields = ('code', 'message') ordering = ('-start_time',) list_display = ('code', 'start_time', 'is_success') admin.site.register(CronJo...
from django.contrib import admin from django_cron.models import CronJobLog class CronJobLogAdmin(admin.ModelAdmin): class Meta: model = CronJobLog search_fields = ('code', 'message') ordering = ('-start_time',) list_display = ('code', 'start_time', 'is_success') def get_readonly_field...
Make cron job logs readonly for non-superuser
Make cron job logs readonly for non-superuser
Python
mit
mozillazg/django-cron,philippeowagner/django-cronium,eriktelepovsky/django-cron,Tivix/django-cron
from django.contrib import admin from django_cron.models import CronJobLog class CronJobLogAdmin(admin.ModelAdmin): class Meta: model = CronJobLog search_fields = ('code', 'message') ordering = ('-start_time',) list_display = ('code', 'start_time', 'is_success') admin.site.register(CronJo...
from django.contrib import admin from django_cron.models import CronJobLog class CronJobLogAdmin(admin.ModelAdmin): class Meta: model = CronJobLog search_fields = ('code', 'message') ordering = ('-start_time',) list_display = ('code', 'start_time', 'is_success') def get_readonly_field...
<commit_before>from django.contrib import admin from django_cron.models import CronJobLog class CronJobLogAdmin(admin.ModelAdmin): class Meta: model = CronJobLog search_fields = ('code', 'message') ordering = ('-start_time',) list_display = ('code', 'start_time', 'is_success') admin.site....
from django.contrib import admin from django_cron.models import CronJobLog class CronJobLogAdmin(admin.ModelAdmin): class Meta: model = CronJobLog search_fields = ('code', 'message') ordering = ('-start_time',) list_display = ('code', 'start_time', 'is_success') def get_readonly_field...
from django.contrib import admin from django_cron.models import CronJobLog class CronJobLogAdmin(admin.ModelAdmin): class Meta: model = CronJobLog search_fields = ('code', 'message') ordering = ('-start_time',) list_display = ('code', 'start_time', 'is_success') admin.site.register(CronJo...
<commit_before>from django.contrib import admin from django_cron.models import CronJobLog class CronJobLogAdmin(admin.ModelAdmin): class Meta: model = CronJobLog search_fields = ('code', 'message') ordering = ('-start_time',) list_display = ('code', 'start_time', 'is_success') admin.site....
d57a1b223b46923bfe5211d4f189b65cfcbffcad
msoffcrypto/format/base.py
msoffcrypto/format/base.py
import abc # For 2 and 3 compatibility # https://stackoverflow.com/questions/35673474/ ABC = abc.ABCMeta('ABC', (object,), {'__slots__': ()}) class BaseOfficeFile(ABC): def __init__(self): pass @abc.abstractmethod def load_key(self): pass @abc.abstractmethod def decrypt(self): ...
import abc # For 2 and 3 compatibility # https://stackoverflow.com/questions/35673474/ ABC = abc.ABCMeta('ABC', (object,), {'__slots__': ()}) class BaseOfficeFile(ABC): def __init__(self): pass @abc.abstractmethod def load_key(self): pass @abc.abstractmethod def decrypt(self): ...
Add is_encrypted() to abstract methods
Add is_encrypted() to abstract methods
Python
mit
nolze/ms-offcrypto-tool,nolze/ms-offcrypto-tool,nolze/msoffcrypto-tool,nolze/msoffcrypto-tool
import abc # For 2 and 3 compatibility # https://stackoverflow.com/questions/35673474/ ABC = abc.ABCMeta('ABC', (object,), {'__slots__': ()}) class BaseOfficeFile(ABC): def __init__(self): pass @abc.abstractmethod def load_key(self): pass @abc.abstractmethod def decrypt(self): ...
import abc # For 2 and 3 compatibility # https://stackoverflow.com/questions/35673474/ ABC = abc.ABCMeta('ABC', (object,), {'__slots__': ()}) class BaseOfficeFile(ABC): def __init__(self): pass @abc.abstractmethod def load_key(self): pass @abc.abstractmethod def decrypt(self): ...
<commit_before>import abc # For 2 and 3 compatibility # https://stackoverflow.com/questions/35673474/ ABC = abc.ABCMeta('ABC', (object,), {'__slots__': ()}) class BaseOfficeFile(ABC): def __init__(self): pass @abc.abstractmethod def load_key(self): pass @abc.abstractmethod def d...
import abc # For 2 and 3 compatibility # https://stackoverflow.com/questions/35673474/ ABC = abc.ABCMeta('ABC', (object,), {'__slots__': ()}) class BaseOfficeFile(ABC): def __init__(self): pass @abc.abstractmethod def load_key(self): pass @abc.abstractmethod def decrypt(self): ...
import abc # For 2 and 3 compatibility # https://stackoverflow.com/questions/35673474/ ABC = abc.ABCMeta('ABC', (object,), {'__slots__': ()}) class BaseOfficeFile(ABC): def __init__(self): pass @abc.abstractmethod def load_key(self): pass @abc.abstractmethod def decrypt(self): ...
<commit_before>import abc # For 2 and 3 compatibility # https://stackoverflow.com/questions/35673474/ ABC = abc.ABCMeta('ABC', (object,), {'__slots__': ()}) class BaseOfficeFile(ABC): def __init__(self): pass @abc.abstractmethod def load_key(self): pass @abc.abstractmethod def d...
f7ff5e6278acaecff7583518cc97bd945fceddc3
netmiko/aruba/aruba_ssh.py
netmiko/aruba/aruba_ssh.py
"""Aruba OS support""" from netmiko.cisco_base_connection import CiscoSSHConnection class ArubaSSH(CiscoSSHConnection): """Aruba OS support""" def session_preparation(self): """Aruba OS requires enable mode to disable paging.""" self.set_base_prompt() self.enable() self.disable...
"""Aruba OS support""" from netmiko.cisco_base_connection import CiscoSSHConnection class ArubaSSH(CiscoSSHConnection): """Aruba OS support""" def session_preparation(self): """Aruba OS requires enable mode to disable paging.""" delay_factor = self.select_delay_factor(delay_factor=0) t...
Increase aruba delay post login
Increase aruba delay post login
Python
mit
fooelisa/netmiko,ktbyers/netmiko,fooelisa/netmiko,isidroamv/netmiko,shamanu4/netmiko,isidroamv/netmiko,ktbyers/netmiko,shamanu4/netmiko
"""Aruba OS support""" from netmiko.cisco_base_connection import CiscoSSHConnection class ArubaSSH(CiscoSSHConnection): """Aruba OS support""" def session_preparation(self): """Aruba OS requires enable mode to disable paging.""" self.set_base_prompt() self.enable() self.disable...
"""Aruba OS support""" from netmiko.cisco_base_connection import CiscoSSHConnection class ArubaSSH(CiscoSSHConnection): """Aruba OS support""" def session_preparation(self): """Aruba OS requires enable mode to disable paging.""" delay_factor = self.select_delay_factor(delay_factor=0) t...
<commit_before>"""Aruba OS support""" from netmiko.cisco_base_connection import CiscoSSHConnection class ArubaSSH(CiscoSSHConnection): """Aruba OS support""" def session_preparation(self): """Aruba OS requires enable mode to disable paging.""" self.set_base_prompt() self.enable() ...
"""Aruba OS support""" from netmiko.cisco_base_connection import CiscoSSHConnection class ArubaSSH(CiscoSSHConnection): """Aruba OS support""" def session_preparation(self): """Aruba OS requires enable mode to disable paging.""" delay_factor = self.select_delay_factor(delay_factor=0) t...
"""Aruba OS support""" from netmiko.cisco_base_connection import CiscoSSHConnection class ArubaSSH(CiscoSSHConnection): """Aruba OS support""" def session_preparation(self): """Aruba OS requires enable mode to disable paging.""" self.set_base_prompt() self.enable() self.disable...
<commit_before>"""Aruba OS support""" from netmiko.cisco_base_connection import CiscoSSHConnection class ArubaSSH(CiscoSSHConnection): """Aruba OS support""" def session_preparation(self): """Aruba OS requires enable mode to disable paging.""" self.set_base_prompt() self.enable() ...
1dc376e811db2572581b6895536abb8cf0853076
drcli/plugins/apps/debug.py
drcli/plugins/apps/debug.py
import msgpack import pprint from drcli.api import App from drcli.appargs import ISTREAM_AP, OSTREAM_AP class DumpApp(App): """ Debug: unpack the stream and pretty-print it. """ arg_parsers = (ISTREAM_AP, OSTREAM_AP) def dump(self, obj): pprint.pprint(obj, self.args.out_stream) def __call__(self): ...
import msgpack import pprint import json from schwa import dr from schwa.dr.constants import FIELD_TYPE_NAME from drcli.api import App from drcli.appargs import ArgumentParser, ISTREAM_AP, OSTREAM_AP, DESERIALISE_AP META_TYPE = 0 class DumpApp(App): """ Debug: unpack the stream and pretty-print it. """ dump_...
Extend dr dump to interpret headers for human-readability
Extend dr dump to interpret headers for human-readability
Python
mit
schwa-lab/dr-apps-python
import msgpack import pprint from drcli.api import App from drcli.appargs import ISTREAM_AP, OSTREAM_AP class DumpApp(App): """ Debug: unpack the stream and pretty-print it. """ arg_parsers = (ISTREAM_AP, OSTREAM_AP) def dump(self, obj): pprint.pprint(obj, self.args.out_stream) def __call__(self): ...
import msgpack import pprint import json from schwa import dr from schwa.dr.constants import FIELD_TYPE_NAME from drcli.api import App from drcli.appargs import ArgumentParser, ISTREAM_AP, OSTREAM_AP, DESERIALISE_AP META_TYPE = 0 class DumpApp(App): """ Debug: unpack the stream and pretty-print it. """ dump_...
<commit_before> import msgpack import pprint from drcli.api import App from drcli.appargs import ISTREAM_AP, OSTREAM_AP class DumpApp(App): """ Debug: unpack the stream and pretty-print it. """ arg_parsers = (ISTREAM_AP, OSTREAM_AP) def dump(self, obj): pprint.pprint(obj, self.args.out_stream) def _...
import msgpack import pprint import json from schwa import dr from schwa.dr.constants import FIELD_TYPE_NAME from drcli.api import App from drcli.appargs import ArgumentParser, ISTREAM_AP, OSTREAM_AP, DESERIALISE_AP META_TYPE = 0 class DumpApp(App): """ Debug: unpack the stream and pretty-print it. """ dump_...
import msgpack import pprint from drcli.api import App from drcli.appargs import ISTREAM_AP, OSTREAM_AP class DumpApp(App): """ Debug: unpack the stream and pretty-print it. """ arg_parsers = (ISTREAM_AP, OSTREAM_AP) def dump(self, obj): pprint.pprint(obj, self.args.out_stream) def __call__(self): ...
<commit_before> import msgpack import pprint from drcli.api import App from drcli.appargs import ISTREAM_AP, OSTREAM_AP class DumpApp(App): """ Debug: unpack the stream and pretty-print it. """ arg_parsers = (ISTREAM_AP, OSTREAM_AP) def dump(self, obj): pprint.pprint(obj, self.args.out_stream) def _...
1ed41f3673ccef3955ac8d7feae23563f7454530
examples/dirwatch.py
examples/dirwatch.py
#!/usr/bin/env python """Directory Watch Example This example demonstrates the inotify I/O Component ``Notify`` which can be used for real-time monitoring of file system events. The example simply takes a path to watch as the first Command Line Argument and prints to stdour every file system event it sees. """ impor...
#!/usr/bin/env python """Directory Watch Example This example demonstrates the inotify I/O Component ``Notify`` which can be used for real-time monitoring of file system events. The example simply takes a path to watch as the first Command Line Argument and prints to stdour every file system event it sees. """ impor...
Use explicit registration in examples
Use explicit registration in examples
Python
mit
treemo/circuits,treemo/circuits,nizox/circuits,eriol/circuits,eriol/circuits,treemo/circuits,eriol/circuits
#!/usr/bin/env python """Directory Watch Example This example demonstrates the inotify I/O Component ``Notify`` which can be used for real-time monitoring of file system events. The example simply takes a path to watch as the first Command Line Argument and prints to stdour every file system event it sees. """ impor...
#!/usr/bin/env python """Directory Watch Example This example demonstrates the inotify I/O Component ``Notify`` which can be used for real-time monitoring of file system events. The example simply takes a path to watch as the first Command Line Argument and prints to stdour every file system event it sees. """ impor...
<commit_before>#!/usr/bin/env python """Directory Watch Example This example demonstrates the inotify I/O Component ``Notify`` which can be used for real-time monitoring of file system events. The example simply takes a path to watch as the first Command Line Argument and prints to stdour every file system event it s...
#!/usr/bin/env python """Directory Watch Example This example demonstrates the inotify I/O Component ``Notify`` which can be used for real-time monitoring of file system events. The example simply takes a path to watch as the first Command Line Argument and prints to stdour every file system event it sees. """ impor...
#!/usr/bin/env python """Directory Watch Example This example demonstrates the inotify I/O Component ``Notify`` which can be used for real-time monitoring of file system events. The example simply takes a path to watch as the first Command Line Argument and prints to stdour every file system event it sees. """ impor...
<commit_before>#!/usr/bin/env python """Directory Watch Example This example demonstrates the inotify I/O Component ``Notify`` which can be used for real-time monitoring of file system events. The example simply takes a path to watch as the first Command Line Argument and prints to stdour every file system event it s...
839cb6f1d1a04f420d818406652eb9ce51d290dd
epitran/bin/migraterules.py
epitran/bin/migraterules.py
#!/usr/bin/env Python # -*- coding: utf-8 -*- from __future__ import (print_function, unicode_literals, absolute_import) import glob import re import io import unicodecsv def build_rule(fields): try: a, b, X, Y = fields b = 0 if not b else b a = 0 if not a else a return '{} -> {...
#!/usr/bin/env Python # -*- coding: utf-8 -*- from __future__ import (print_function, unicode_literals, absolute_import) import glob import re import io import unicodecsv def build_rule(fields): try: a, b, X, Y = fields b = "0" if not b else b a = "0" if not a else a return '{} ...
Use strings instead of numerals for "0" in rules
Use strings instead of numerals for "0" in rules
Python
mit
dmort27/epitran,dmort27/epitran
#!/usr/bin/env Python # -*- coding: utf-8 -*- from __future__ import (print_function, unicode_literals, absolute_import) import glob import re import io import unicodecsv def build_rule(fields): try: a, b, X, Y = fields b = 0 if not b else b a = 0 if not a else a return '{} -> {...
#!/usr/bin/env Python # -*- coding: utf-8 -*- from __future__ import (print_function, unicode_literals, absolute_import) import glob import re import io import unicodecsv def build_rule(fields): try: a, b, X, Y = fields b = "0" if not b else b a = "0" if not a else a return '{} ...
<commit_before>#!/usr/bin/env Python # -*- coding: utf-8 -*- from __future__ import (print_function, unicode_literals, absolute_import) import glob import re import io import unicodecsv def build_rule(fields): try: a, b, X, Y = fields b = 0 if not b else b a = 0 if not a else a ...
#!/usr/bin/env Python # -*- coding: utf-8 -*- from __future__ import (print_function, unicode_literals, absolute_import) import glob import re import io import unicodecsv def build_rule(fields): try: a, b, X, Y = fields b = "0" if not b else b a = "0" if not a else a return '{} ...
#!/usr/bin/env Python # -*- coding: utf-8 -*- from __future__ import (print_function, unicode_literals, absolute_import) import glob import re import io import unicodecsv def build_rule(fields): try: a, b, X, Y = fields b = 0 if not b else b a = 0 if not a else a return '{} -> {...
<commit_before>#!/usr/bin/env Python # -*- coding: utf-8 -*- from __future__ import (print_function, unicode_literals, absolute_import) import glob import re import io import unicodecsv def build_rule(fields): try: a, b, X, Y = fields b = 0 if not b else b a = 0 if not a else a ...
68faeb845e50b4038157fc9fc5155bdeb6f3742b
common/apps.py
common/apps.py
from django.apps import AppConfig from django.conf import settings from common.helpers.db import db_is_initialized class CommonConfig(AppConfig): name = 'common' def ready(self): self.display_missing_environment_variables() from common.helpers.tags import import_tags_from_csv if db_is...
import sys from django.apps import AppConfig from django.conf import settings from common.helpers.db import db_is_initialized class CommonConfig(AppConfig): name = 'common' def ready(self): self.display_missing_environment_variables() from common.helpers.tags import import_tags_from_csv ...
Clean content types table and don't load tags when running loaddata
Clean content types table and don't load tags when running loaddata
Python
mit
DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange,DemocracyLab/CivicTechExchange
from django.apps import AppConfig from django.conf import settings from common.helpers.db import db_is_initialized class CommonConfig(AppConfig): name = 'common' def ready(self): self.display_missing_environment_variables() from common.helpers.tags import import_tags_from_csv if db_is...
import sys from django.apps import AppConfig from django.conf import settings from common.helpers.db import db_is_initialized class CommonConfig(AppConfig): name = 'common' def ready(self): self.display_missing_environment_variables() from common.helpers.tags import import_tags_from_csv ...
<commit_before>from django.apps import AppConfig from django.conf import settings from common.helpers.db import db_is_initialized class CommonConfig(AppConfig): name = 'common' def ready(self): self.display_missing_environment_variables() from common.helpers.tags import import_tags_from_csv ...
import sys from django.apps import AppConfig from django.conf import settings from common.helpers.db import db_is_initialized class CommonConfig(AppConfig): name = 'common' def ready(self): self.display_missing_environment_variables() from common.helpers.tags import import_tags_from_csv ...
from django.apps import AppConfig from django.conf import settings from common.helpers.db import db_is_initialized class CommonConfig(AppConfig): name = 'common' def ready(self): self.display_missing_environment_variables() from common.helpers.tags import import_tags_from_csv if db_is...
<commit_before>from django.apps import AppConfig from django.conf import settings from common.helpers.db import db_is_initialized class CommonConfig(AppConfig): name = 'common' def ready(self): self.display_missing_environment_variables() from common.helpers.tags import import_tags_from_csv ...
100260936d433cf468c0437b9cb135bc871d27d1
sphinx-plugin/pydispatch_sphinx/__init__.py
sphinx-plugin/pydispatch_sphinx/__init__.py
import typing as tp import pkg_resources try: __version__ = pkg_resources.require('python-dispatch-sphinx')[0].version except: # pragma: no cover __version__ = 'unknown' from sphinx.application import Sphinx from . import directives from . import documenters def setup(app: Sphinx) -> tp.Dict[str, tp.Any]: ...
import typing as tp import importlib.metadata __version__ = importlib.metadata.version('python-dispatch-sphinx') from sphinx.application import Sphinx from . import directives from . import documenters def setup(app: Sphinx) -> tp.Dict[str, tp.Any]: app.setup_extension(directives.__name__) app.setup_extensi...
Use importlib.metadata for version retrieval
Use importlib.metadata for version retrieval
Python
mit
nocarryr/python-dispatch
import typing as tp import pkg_resources try: __version__ = pkg_resources.require('python-dispatch-sphinx')[0].version except: # pragma: no cover __version__ = 'unknown' from sphinx.application import Sphinx from . import directives from . import documenters def setup(app: Sphinx) -> tp.Dict[str, tp.Any]: ...
import typing as tp import importlib.metadata __version__ = importlib.metadata.version('python-dispatch-sphinx') from sphinx.application import Sphinx from . import directives from . import documenters def setup(app: Sphinx) -> tp.Dict[str, tp.Any]: app.setup_extension(directives.__name__) app.setup_extensi...
<commit_before>import typing as tp import pkg_resources try: __version__ = pkg_resources.require('python-dispatch-sphinx')[0].version except: # pragma: no cover __version__ = 'unknown' from sphinx.application import Sphinx from . import directives from . import documenters def setup(app: Sphinx) -> tp.Dict[...
import typing as tp import importlib.metadata __version__ = importlib.metadata.version('python-dispatch-sphinx') from sphinx.application import Sphinx from . import directives from . import documenters def setup(app: Sphinx) -> tp.Dict[str, tp.Any]: app.setup_extension(directives.__name__) app.setup_extensi...
import typing as tp import pkg_resources try: __version__ = pkg_resources.require('python-dispatch-sphinx')[0].version except: # pragma: no cover __version__ = 'unknown' from sphinx.application import Sphinx from . import directives from . import documenters def setup(app: Sphinx) -> tp.Dict[str, tp.Any]: ...
<commit_before>import typing as tp import pkg_resources try: __version__ = pkg_resources.require('python-dispatch-sphinx')[0].version except: # pragma: no cover __version__ = 'unknown' from sphinx.application import Sphinx from . import directives from . import documenters def setup(app: Sphinx) -> tp.Dict[...
39b45111efdece4e68615ca123e0062b0d1edaae
organizations/__init__.py
organizations/__init__.py
""" edx-organizations app initialization module """ __version__ = '2.0.1' # pragma: no cover
""" edx-organizations app initialization module """ __version__ = '2.0.2' # pragma: no cover
Update the version so we can do another release once this is all done.
Update the version so we can do another release once this is all done.
Python
agpl-3.0
edx/edx-organizations
""" edx-organizations app initialization module """ __version__ = '2.0.1' # pragma: no cover Update the version so we can do another release once this is all done.
""" edx-organizations app initialization module """ __version__ = '2.0.2' # pragma: no cover
<commit_before>""" edx-organizations app initialization module """ __version__ = '2.0.1' # pragma: no cover <commit_msg>Update the version so we can do another release once this is all done.<commit_after>
""" edx-organizations app initialization module """ __version__ = '2.0.2' # pragma: no cover
""" edx-organizations app initialization module """ __version__ = '2.0.1' # pragma: no cover Update the version so we can do another release once this is all done.""" edx-organizations app initialization module """ __version__ = '2.0.2' # pragma: no cover
<commit_before>""" edx-organizations app initialization module """ __version__ = '2.0.1' # pragma: no cover <commit_msg>Update the version so we can do another release once this is all done.<commit_after>""" edx-organizations app initialization module """ __version__ = '2.0.2' # pragma: no cover
453ef9f96a2441f2835bfc514862ae7000e1fdc1
opalescence/__init__.py
opalescence/__init__.py
# -*- coding: utf-8 -*- """ Package containing the main opalescence application logic. """ __author__ = """Brian Houston Morrow""" __email__ = "bhm@brianmorrow.net" __version__ = "0.5.0" __year__ = "2021" import dataclasses @dataclasses.dataclass class AppConfig: use_cli: bool _AppConfig = AppConfig(False) ...
# -*- coding: utf-8 -*- """ Package containing the main opalescence application logic. """ __author__ = """Brian Houston Morrow""" __email__ = "bhm@brianmorrow.net" __version__ = "0.5.0" __year__ = "2021" import dataclasses # TODO: Remove ASAP @dataclasses.dataclass class AppConfig: use_cli: bool = False u...
Add a couple more pieces of info to app config.
Add a couple more pieces of info to app config.
Python
mit
killerbat00/opalescence
# -*- coding: utf-8 -*- """ Package containing the main opalescence application logic. """ __author__ = """Brian Houston Morrow""" __email__ = "bhm@brianmorrow.net" __version__ = "0.5.0" __year__ = "2021" import dataclasses @dataclasses.dataclass class AppConfig: use_cli: bool _AppConfig = AppConfig(False) ...
# -*- coding: utf-8 -*- """ Package containing the main opalescence application logic. """ __author__ = """Brian Houston Morrow""" __email__ = "bhm@brianmorrow.net" __version__ = "0.5.0" __year__ = "2021" import dataclasses # TODO: Remove ASAP @dataclasses.dataclass class AppConfig: use_cli: bool = False u...
<commit_before># -*- coding: utf-8 -*- """ Package containing the main opalescence application logic. """ __author__ = """Brian Houston Morrow""" __email__ = "bhm@brianmorrow.net" __version__ = "0.5.0" __year__ = "2021" import dataclasses @dataclasses.dataclass class AppConfig: use_cli: bool _AppConfig = App...
# -*- coding: utf-8 -*- """ Package containing the main opalescence application logic. """ __author__ = """Brian Houston Morrow""" __email__ = "bhm@brianmorrow.net" __version__ = "0.5.0" __year__ = "2021" import dataclasses # TODO: Remove ASAP @dataclasses.dataclass class AppConfig: use_cli: bool = False u...
# -*- coding: utf-8 -*- """ Package containing the main opalescence application logic. """ __author__ = """Brian Houston Morrow""" __email__ = "bhm@brianmorrow.net" __version__ = "0.5.0" __year__ = "2021" import dataclasses @dataclasses.dataclass class AppConfig: use_cli: bool _AppConfig = AppConfig(False) ...
<commit_before># -*- coding: utf-8 -*- """ Package containing the main opalescence application logic. """ __author__ = """Brian Houston Morrow""" __email__ = "bhm@brianmorrow.net" __version__ = "0.5.0" __year__ = "2021" import dataclasses @dataclasses.dataclass class AppConfig: use_cli: bool _AppConfig = App...
b088d21b91dbfda0f18b1e4886f6aa01f2c72cbe
os_vif/objects/route.py
os_vif/objects/route.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
Add a reminder to remove Route.interface field
Add a reminder to remove Route.interface field Nova never sets the Route.interface value to anything but None which fails with an error: "ValueError: Fieldinterface' cannot be None" This looks like a carry-over from the nova.network.model.Route class which has an interface field which is set to None by default but t...
Python
apache-2.0
openstack/os-vif
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
8fbd37c1858d84dbee9695999c719f60e6014ed5
kitchen/backends/plugins/virt_memory_usage.py
kitchen/backends/plugins/virt_memory_usage.py
"""Plugin that adds guest memory usage in GB""" MIN_HOST_MEM = 1000000 # kB def inject(node): """Adds guest RAM usage data to the host""" node.setdefault('kitchen', {}) node['kitchen'].setdefault('data', {}) node['kitchen']['data']['memory_usage'] = MIN_HOST_MEM for guest in node.get('virtualizat...
"""Plugin that adds guest memory usage in GB""" MIN_HOST_MEM = 1000000 # kB def inject(node): """Adds guest RAM usage data to the host""" node.setdefault('kitchen', {}) node['kitchen'].setdefault('data', {}) node['kitchen']['data']['memory_usage'] = MIN_HOST_MEM for guest in node.get('virtualizat...
Handle cases where memory key is not present
Handle cases where memory key is not present
Python
apache-2.0
edelight/kitchen,edelight/kitchen,edelight/kitchen,edelight/kitchen
"""Plugin that adds guest memory usage in GB""" MIN_HOST_MEM = 1000000 # kB def inject(node): """Adds guest RAM usage data to the host""" node.setdefault('kitchen', {}) node['kitchen'].setdefault('data', {}) node['kitchen']['data']['memory_usage'] = MIN_HOST_MEM for guest in node.get('virtualizat...
"""Plugin that adds guest memory usage in GB""" MIN_HOST_MEM = 1000000 # kB def inject(node): """Adds guest RAM usage data to the host""" node.setdefault('kitchen', {}) node['kitchen'].setdefault('data', {}) node['kitchen']['data']['memory_usage'] = MIN_HOST_MEM for guest in node.get('virtualizat...
<commit_before>"""Plugin that adds guest memory usage in GB""" MIN_HOST_MEM = 1000000 # kB def inject(node): """Adds guest RAM usage data to the host""" node.setdefault('kitchen', {}) node['kitchen'].setdefault('data', {}) node['kitchen']['data']['memory_usage'] = MIN_HOST_MEM for guest in node.g...
"""Plugin that adds guest memory usage in GB""" MIN_HOST_MEM = 1000000 # kB def inject(node): """Adds guest RAM usage data to the host""" node.setdefault('kitchen', {}) node['kitchen'].setdefault('data', {}) node['kitchen']['data']['memory_usage'] = MIN_HOST_MEM for guest in node.get('virtualizat...
"""Plugin that adds guest memory usage in GB""" MIN_HOST_MEM = 1000000 # kB def inject(node): """Adds guest RAM usage data to the host""" node.setdefault('kitchen', {}) node['kitchen'].setdefault('data', {}) node['kitchen']['data']['memory_usage'] = MIN_HOST_MEM for guest in node.get('virtualizat...
<commit_before>"""Plugin that adds guest memory usage in GB""" MIN_HOST_MEM = 1000000 # kB def inject(node): """Adds guest RAM usage data to the host""" node.setdefault('kitchen', {}) node['kitchen'].setdefault('data', {}) node['kitchen']['data']['memory_usage'] = MIN_HOST_MEM for guest in node.g...
027e4be84588e2ea62eea7e8f60ec2db1969e92c
testStats.py
testStats.py
import time import HTU21DF def median(x): m,r= divmod(len(x),2) if r: return sorted(x)[m] return sum(sorted(x)[m-1:m+1])/2 def average(x): return sum(x)/len(x) tempList = [] for x in range(100): HTU21DF.htu_reset tempList.append(HTU21DF.read_temperature()) print 'median is {0}'.format(median(t...
import time import HTU21DF def median(x): m,r= divmod(len(x),2) if r: return sorted(x)[m] return sum(sorted(x)[m-1:m+1])/2 def average(x): return sum(x)/len(x) tempList = [] for x in range(1000): HTU21DF.htu_reset tempList.append(HTU21DF.read_temperature()) print 'median is {0}'.format(median(...
Add difference and up range
Add difference and up range
Python
mit
khuisman/project-cool-attic
import time import HTU21DF def median(x): m,r= divmod(len(x),2) if r: return sorted(x)[m] return sum(sorted(x)[m-1:m+1])/2 def average(x): return sum(x)/len(x) tempList = [] for x in range(100): HTU21DF.htu_reset tempList.append(HTU21DF.read_temperature()) print 'median is {0}'.format(median(t...
import time import HTU21DF def median(x): m,r= divmod(len(x),2) if r: return sorted(x)[m] return sum(sorted(x)[m-1:m+1])/2 def average(x): return sum(x)/len(x) tempList = [] for x in range(1000): HTU21DF.htu_reset tempList.append(HTU21DF.read_temperature()) print 'median is {0}'.format(median(...
<commit_before>import time import HTU21DF def median(x): m,r= divmod(len(x),2) if r: return sorted(x)[m] return sum(sorted(x)[m-1:m+1])/2 def average(x): return sum(x)/len(x) tempList = [] for x in range(100): HTU21DF.htu_reset tempList.append(HTU21DF.read_temperature()) print 'median is {0}'....
import time import HTU21DF def median(x): m,r= divmod(len(x),2) if r: return sorted(x)[m] return sum(sorted(x)[m-1:m+1])/2 def average(x): return sum(x)/len(x) tempList = [] for x in range(1000): HTU21DF.htu_reset tempList.append(HTU21DF.read_temperature()) print 'median is {0}'.format(median(...
import time import HTU21DF def median(x): m,r= divmod(len(x),2) if r: return sorted(x)[m] return sum(sorted(x)[m-1:m+1])/2 def average(x): return sum(x)/len(x) tempList = [] for x in range(100): HTU21DF.htu_reset tempList.append(HTU21DF.read_temperature()) print 'median is {0}'.format(median(t...
<commit_before>import time import HTU21DF def median(x): m,r= divmod(len(x),2) if r: return sorted(x)[m] return sum(sorted(x)[m-1:m+1])/2 def average(x): return sum(x)/len(x) tempList = [] for x in range(100): HTU21DF.htu_reset tempList.append(HTU21DF.read_temperature()) print 'median is {0}'....
187026ce695dee79c4897c0e8e014bb208de5a83
gaia_tools/load/__init__.py
gaia_tools/load/__init__.py
import os, os.path import astropy.io.ascii from gaia_tools.load import path, download def galah(dr=1): filePath, ReadMePath= path.galahPath(dr=dr) if not os.path.exists(filePath): download.galah(dr=dr) data= astropy.io.ascii.read(filePath,readme=ReadMePath) return data
import os, os.path import numpy import astropy.io.ascii from gaia_tools.load import path, download def galah(dr=1): filePath, ReadMePath= path.galahPath(dr=dr) if not os.path.exists(filePath): download.galah(dr=dr) data= astropy.io.ascii.read(filePath,readme=ReadMePath) data['RA']._fill_value= n...
Set fill value of GALAH RA and Dec explicitly
Set fill value of GALAH RA and Dec explicitly
Python
mit
jobovy/gaia_tools
import os, os.path import astropy.io.ascii from gaia_tools.load import path, download def galah(dr=1): filePath, ReadMePath= path.galahPath(dr=dr) if not os.path.exists(filePath): download.galah(dr=dr) data= astropy.io.ascii.read(filePath,readme=ReadMePath) return data Set fill value of GALAH RA...
import os, os.path import numpy import astropy.io.ascii from gaia_tools.load import path, download def galah(dr=1): filePath, ReadMePath= path.galahPath(dr=dr) if not os.path.exists(filePath): download.galah(dr=dr) data= astropy.io.ascii.read(filePath,readme=ReadMePath) data['RA']._fill_value= n...
<commit_before>import os, os.path import astropy.io.ascii from gaia_tools.load import path, download def galah(dr=1): filePath, ReadMePath= path.galahPath(dr=dr) if not os.path.exists(filePath): download.galah(dr=dr) data= astropy.io.ascii.read(filePath,readme=ReadMePath) return data <commit_msg...
import os, os.path import numpy import astropy.io.ascii from gaia_tools.load import path, download def galah(dr=1): filePath, ReadMePath= path.galahPath(dr=dr) if not os.path.exists(filePath): download.galah(dr=dr) data= astropy.io.ascii.read(filePath,readme=ReadMePath) data['RA']._fill_value= n...
import os, os.path import astropy.io.ascii from gaia_tools.load import path, download def galah(dr=1): filePath, ReadMePath= path.galahPath(dr=dr) if not os.path.exists(filePath): download.galah(dr=dr) data= astropy.io.ascii.read(filePath,readme=ReadMePath) return data Set fill value of GALAH RA...
<commit_before>import os, os.path import astropy.io.ascii from gaia_tools.load import path, download def galah(dr=1): filePath, ReadMePath= path.galahPath(dr=dr) if not os.path.exists(filePath): download.galah(dr=dr) data= astropy.io.ascii.read(filePath,readme=ReadMePath) return data <commit_msg...
f4eea63ee7658a16733cce23a42aac8f5b7fe49a
handoverservice/handover_api/serializers.py
handoverservice/handover_api/serializers.py
from handover_api.models import Handover, Draft, User from rest_framework import serializers class HandoverSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Handover fields = ('project_id','from_user_id','to_user_id','state') class DraftSerializer(serializers.HyperlinkedMod...
from handover_api.models import Handover, Draft, User from rest_framework import serializers class HandoverSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Handover fields = ('id','url','project_id','from_user_id','to_user_id','state') class DraftSerializer(serializers.Hyp...
Include id and url in models
Include id and url in models
Python
mit
Duke-GCB/DukeDSHandoverService,Duke-GCB/DukeDSHandoverService,Duke-GCB/DukeDSHandoverService
from handover_api.models import Handover, Draft, User from rest_framework import serializers class HandoverSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Handover fields = ('project_id','from_user_id','to_user_id','state') class DraftSerializer(serializers.HyperlinkedMod...
from handover_api.models import Handover, Draft, User from rest_framework import serializers class HandoverSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Handover fields = ('id','url','project_id','from_user_id','to_user_id','state') class DraftSerializer(serializers.Hyp...
<commit_before>from handover_api.models import Handover, Draft, User from rest_framework import serializers class HandoverSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Handover fields = ('project_id','from_user_id','to_user_id','state') class DraftSerializer(serializers...
from handover_api.models import Handover, Draft, User from rest_framework import serializers class HandoverSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Handover fields = ('id','url','project_id','from_user_id','to_user_id','state') class DraftSerializer(serializers.Hyp...
from handover_api.models import Handover, Draft, User from rest_framework import serializers class HandoverSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Handover fields = ('project_id','from_user_id','to_user_id','state') class DraftSerializer(serializers.HyperlinkedMod...
<commit_before>from handover_api.models import Handover, Draft, User from rest_framework import serializers class HandoverSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Handover fields = ('project_id','from_user_id','to_user_id','state') class DraftSerializer(serializers...
d491aea2da5d52245001f4da24331f33e4a3a299
importlib_metadata/_meta.py
importlib_metadata/_meta.py
from ._compat import Protocol from typing import Any, Dict, Iterator, List, TypeVar, Union _T = TypeVar("_T") class PackageMetadata(Protocol): def __len__(self) -> int: ... # pragma: no cover def __contains__(self, item: str) -> bool: ... # pragma: no cover def __getitem__(self, key:...
from ._compat import Protocol from typing import Any, Dict, Iterator, List, TypeVar, Union _T = TypeVar("_T") class PackageMetadata(Protocol): def __len__(self) -> int: ... # pragma: no cover def __contains__(self, item: str) -> bool: ... # pragma: no cover def __getitem__(self, key:...
Add test purported to capture the failure, but it still passes.
Add test purported to capture the failure, but it still passes.
Python
apache-2.0
python/importlib_metadata
from ._compat import Protocol from typing import Any, Dict, Iterator, List, TypeVar, Union _T = TypeVar("_T") class PackageMetadata(Protocol): def __len__(self) -> int: ... # pragma: no cover def __contains__(self, item: str) -> bool: ... # pragma: no cover def __getitem__(self, key:...
from ._compat import Protocol from typing import Any, Dict, Iterator, List, TypeVar, Union _T = TypeVar("_T") class PackageMetadata(Protocol): def __len__(self) -> int: ... # pragma: no cover def __contains__(self, item: str) -> bool: ... # pragma: no cover def __getitem__(self, key:...
<commit_before>from ._compat import Protocol from typing import Any, Dict, Iterator, List, TypeVar, Union _T = TypeVar("_T") class PackageMetadata(Protocol): def __len__(self) -> int: ... # pragma: no cover def __contains__(self, item: str) -> bool: ... # pragma: no cover def __getit...
from ._compat import Protocol from typing import Any, Dict, Iterator, List, TypeVar, Union _T = TypeVar("_T") class PackageMetadata(Protocol): def __len__(self) -> int: ... # pragma: no cover def __contains__(self, item: str) -> bool: ... # pragma: no cover def __getitem__(self, key:...
from ._compat import Protocol from typing import Any, Dict, Iterator, List, TypeVar, Union _T = TypeVar("_T") class PackageMetadata(Protocol): def __len__(self) -> int: ... # pragma: no cover def __contains__(self, item: str) -> bool: ... # pragma: no cover def __getitem__(self, key:...
<commit_before>from ._compat import Protocol from typing import Any, Dict, Iterator, List, TypeVar, Union _T = TypeVar("_T") class PackageMetadata(Protocol): def __len__(self) -> int: ... # pragma: no cover def __contains__(self, item: str) -> bool: ... # pragma: no cover def __getit...
8cd319b59cb28e4ae2fe277205f586983dd4ed63
tst/utils.py
tst/utils.py
from __future__ import print_function import sys import string from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stdout, end='\n'): print(color + msg + RESE...
from __future__ import print_function import sys import string from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stdout, end='\n'): data = msg.__str__() if ...
Improve cprint to use __str__ method if available
Improve cprint to use __str__ method if available
Python
agpl-3.0
daltonserey/tst,daltonserey/tst
from __future__ import print_function import sys import string from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stdout, end='\n'): print(color + msg + RESE...
from __future__ import print_function import sys import string from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stdout, end='\n'): data = msg.__str__() if ...
<commit_before>from __future__ import print_function import sys import string from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stdout, end='\n'): print(col...
from __future__ import print_function import sys import string from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stdout, end='\n'): data = msg.__str__() if ...
from __future__ import print_function import sys import string from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stdout, end='\n'): print(color + msg + RESE...
<commit_before>from __future__ import print_function import sys import string from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stdout, end='\n'): print(col...
e8eb21a81587bb2f6c6b783f8345e6f167e15691
flycam.py
flycam.py
import capture from picamera import PiCamera def image_cap_loop(camera): """Set image parameters, capture image, set wait time, repeat""" images = 18 status = None resolution = (854, 480) latest = capture.cap(camera, resolution, status) status = latest[0] size = capture.image_size(latest...
import capture from picamera import PiCamera import time def image_cap_loop(camera): """Set image parameters, capture image, set wait time, repeat""" images = 18 status = None resolution = (854, 480) latest = capture.cap(camera, resolution, status) status = latest[0] size = capture.image...
Add time to imported modules.
Add time to imported modules.
Python
mit
gnfrazier/YardCam
import capture from picamera import PiCamera def image_cap_loop(camera): """Set image parameters, capture image, set wait time, repeat""" images = 18 status = None resolution = (854, 480) latest = capture.cap(camera, resolution, status) status = latest[0] size = capture.image_size(latest...
import capture from picamera import PiCamera import time def image_cap_loop(camera): """Set image parameters, capture image, set wait time, repeat""" images = 18 status = None resolution = (854, 480) latest = capture.cap(camera, resolution, status) status = latest[0] size = capture.image...
<commit_before>import capture from picamera import PiCamera def image_cap_loop(camera): """Set image parameters, capture image, set wait time, repeat""" images = 18 status = None resolution = (854, 480) latest = capture.cap(camera, resolution, status) status = latest[0] size = capture.im...
import capture from picamera import PiCamera import time def image_cap_loop(camera): """Set image parameters, capture image, set wait time, repeat""" images = 18 status = None resolution = (854, 480) latest = capture.cap(camera, resolution, status) status = latest[0] size = capture.image...
import capture from picamera import PiCamera def image_cap_loop(camera): """Set image parameters, capture image, set wait time, repeat""" images = 18 status = None resolution = (854, 480) latest = capture.cap(camera, resolution, status) status = latest[0] size = capture.image_size(latest...
<commit_before>import capture from picamera import PiCamera def image_cap_loop(camera): """Set image parameters, capture image, set wait time, repeat""" images = 18 status = None resolution = (854, 480) latest = capture.cap(camera, resolution, status) status = latest[0] size = capture.im...
a810493a9ccf26d25b467ab5f7d2b0a9718c1442
login/management/commands/demo_data_login.py
login/management/commands/demo_data_login.py
from django.core.management.base import BaseCommand from login.tests.model_maker import make_superuser from login.tests.model_maker import make_user class Command(BaseCommand): help = "Create demo data for 'login'" def handle(self, *args, **options): make_superuser('admin', 'admin') make_us...
from django.core.management.base import BaseCommand from login.tests.scenario import ( user_contractor, user_default, ) class Command(BaseCommand): help = "Create demo data for 'login'" def handle(self, *args, **options): user_contractor() user_default() print("Created 'logi...
Use the standard scenario for demo data
Use the standard scenario for demo data
Python
apache-2.0
pkimber/login,pkimber/login,pkimber/login
from django.core.management.base import BaseCommand from login.tests.model_maker import make_superuser from login.tests.model_maker import make_user class Command(BaseCommand): help = "Create demo data for 'login'" def handle(self, *args, **options): make_superuser('admin', 'admin') make_us...
from django.core.management.base import BaseCommand from login.tests.scenario import ( user_contractor, user_default, ) class Command(BaseCommand): help = "Create demo data for 'login'" def handle(self, *args, **options): user_contractor() user_default() print("Created 'logi...
<commit_before>from django.core.management.base import BaseCommand from login.tests.model_maker import make_superuser from login.tests.model_maker import make_user class Command(BaseCommand): help = "Create demo data for 'login'" def handle(self, *args, **options): make_superuser('admin', 'admin') ...
from django.core.management.base import BaseCommand from login.tests.scenario import ( user_contractor, user_default, ) class Command(BaseCommand): help = "Create demo data for 'login'" def handle(self, *args, **options): user_contractor() user_default() print("Created 'logi...
from django.core.management.base import BaseCommand from login.tests.model_maker import make_superuser from login.tests.model_maker import make_user class Command(BaseCommand): help = "Create demo data for 'login'" def handle(self, *args, **options): make_superuser('admin', 'admin') make_us...
<commit_before>from django.core.management.base import BaseCommand from login.tests.model_maker import make_superuser from login.tests.model_maker import make_user class Command(BaseCommand): help = "Create demo data for 'login'" def handle(self, *args, **options): make_superuser('admin', 'admin') ...
8762ae185d3febe06f6ef5acfa082b26063358a2
example_migration.py
example_migration.py
from metadatastore.mds import MDSRO from portable_mds.mongoquery.mds import MDS source_config = {'host': 'localhost', 'port': 27017, 'database': 'metadatastore_production_v1', 'timezone': 'US/Eastern'} dest_config = {'directory': 'some_directory'} source = MDSRO(sou...
from metadatastore.mds import MDSRO from portable_mds.mongoquery.mds import MDS source_config = {'host': 'localhost', 'port': 27017, 'database': 'metadatastore_production_v1', 'timezone': 'US/Eastern'} dest_config = {'directory': 'some_directory', 'tim...
Add timezone to example to keep Broker happy.
Add timezone to example to keep Broker happy.
Python
bsd-3-clause
ericdill/databroker,ericdill/databroker
from metadatastore.mds import MDSRO from portable_mds.mongoquery.mds import MDS source_config = {'host': 'localhost', 'port': 27017, 'database': 'metadatastore_production_v1', 'timezone': 'US/Eastern'} dest_config = {'directory': 'some_directory'} source = MDSRO(sou...
from metadatastore.mds import MDSRO from portable_mds.mongoquery.mds import MDS source_config = {'host': 'localhost', 'port': 27017, 'database': 'metadatastore_production_v1', 'timezone': 'US/Eastern'} dest_config = {'directory': 'some_directory', 'tim...
<commit_before>from metadatastore.mds import MDSRO from portable_mds.mongoquery.mds import MDS source_config = {'host': 'localhost', 'port': 27017, 'database': 'metadatastore_production_v1', 'timezone': 'US/Eastern'} dest_config = {'directory': 'some_directory'} sou...
from metadatastore.mds import MDSRO from portable_mds.mongoquery.mds import MDS source_config = {'host': 'localhost', 'port': 27017, 'database': 'metadatastore_production_v1', 'timezone': 'US/Eastern'} dest_config = {'directory': 'some_directory', 'tim...
from metadatastore.mds import MDSRO from portable_mds.mongoquery.mds import MDS source_config = {'host': 'localhost', 'port': 27017, 'database': 'metadatastore_production_v1', 'timezone': 'US/Eastern'} dest_config = {'directory': 'some_directory'} source = MDSRO(sou...
<commit_before>from metadatastore.mds import MDSRO from portable_mds.mongoquery.mds import MDS source_config = {'host': 'localhost', 'port': 27017, 'database': 'metadatastore_production_v1', 'timezone': 'US/Eastern'} dest_config = {'directory': 'some_directory'} sou...
ef7f732b9db4f0c835746d535f10e7e91e0484d7
l10n_br_zip/__openerp__.py
l10n_br_zip/__openerp__.py
# -*- coding: utf-8 -*- # Copyright (C) 2009 Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html { 'name': 'Brazilian Localisation ZIP Codes', 'license': 'AGPL-3', 'author': 'Akretion, Odoo Community Association (OCA)', 'version': '8.0.1.0.1', 'depends': [ ...
# -*- coding: utf-8 -*- # Copyright (C) 2009 Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html { 'name': 'Brazilian Localisation ZIP Codes', 'license': 'AGPL-3', 'author': 'Akretion, Odoo Community Association (OCA)', 'version': '9.0.1.0.0', 'depends': [ ...
Change the version of module.
[MIG] Change the version of module.
Python
agpl-3.0
odoo-brazil/l10n-brazil-wip,thinkopensolutions/l10n-brazil,odoo-brazil/l10n-brazil-wip,thinkopensolutions/l10n-brazil
# -*- coding: utf-8 -*- # Copyright (C) 2009 Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html { 'name': 'Brazilian Localisation ZIP Codes', 'license': 'AGPL-3', 'author': 'Akretion, Odoo Community Association (OCA)', 'version': '8.0.1.0.1', 'depends': [ ...
# -*- coding: utf-8 -*- # Copyright (C) 2009 Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html { 'name': 'Brazilian Localisation ZIP Codes', 'license': 'AGPL-3', 'author': 'Akretion, Odoo Community Association (OCA)', 'version': '9.0.1.0.0', 'depends': [ ...
<commit_before># -*- coding: utf-8 -*- # Copyright (C) 2009 Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html { 'name': 'Brazilian Localisation ZIP Codes', 'license': 'AGPL-3', 'author': 'Akretion, Odoo Community Association (OCA)', 'version': '8.0.1.0.1', 'de...
# -*- coding: utf-8 -*- # Copyright (C) 2009 Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html { 'name': 'Brazilian Localisation ZIP Codes', 'license': 'AGPL-3', 'author': 'Akretion, Odoo Community Association (OCA)', 'version': '9.0.1.0.0', 'depends': [ ...
# -*- coding: utf-8 -*- # Copyright (C) 2009 Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html { 'name': 'Brazilian Localisation ZIP Codes', 'license': 'AGPL-3', 'author': 'Akretion, Odoo Community Association (OCA)', 'version': '8.0.1.0.1', 'depends': [ ...
<commit_before># -*- coding: utf-8 -*- # Copyright (C) 2009 Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html { 'name': 'Brazilian Localisation ZIP Codes', 'license': 'AGPL-3', 'author': 'Akretion, Odoo Community Association (OCA)', 'version': '8.0.1.0.1', 'de...
d6c2b891e63655fd1106d20f83b1eda54fb87541
abilian/testing/__init__.py
abilian/testing/__init__.py
"""Base stuff for testing. """ import subprocess assert not 'twill' in subprocess.__file__ from flask.ext.testing import TestCase from abilian.application import Application from abilian.core.entities import db __all__ = ['TestConfig', 'BaseTestCase'] class TestConfig(object): SQLALCHEMY_DATABASE_URI = "sqlite:...
"""Base stuff for testing. """ import subprocess assert not 'twill' in subprocess.__file__ from flask.ext.testing import TestCase from abilian.application import Application __all__ = ['TestConfig', 'BaseTestCase'] class TestConfig(object): SQLALCHEMY_DATABASE_URI = "sqlite://" SQLALCHEMY_ECHO = False TEST...
Add convenience method on test case.
Add convenience method on test case.
Python
lgpl-2.1
abilian/abilian-core,abilian/abilian-core,abilian/abilian-core,abilian/abilian-core,abilian/abilian-core
"""Base stuff for testing. """ import subprocess assert not 'twill' in subprocess.__file__ from flask.ext.testing import TestCase from abilian.application import Application from abilian.core.entities import db __all__ = ['TestConfig', 'BaseTestCase'] class TestConfig(object): SQLALCHEMY_DATABASE_URI = "sqlite:...
"""Base stuff for testing. """ import subprocess assert not 'twill' in subprocess.__file__ from flask.ext.testing import TestCase from abilian.application import Application __all__ = ['TestConfig', 'BaseTestCase'] class TestConfig(object): SQLALCHEMY_DATABASE_URI = "sqlite://" SQLALCHEMY_ECHO = False TEST...
<commit_before>"""Base stuff for testing. """ import subprocess assert not 'twill' in subprocess.__file__ from flask.ext.testing import TestCase from abilian.application import Application from abilian.core.entities import db __all__ = ['TestConfig', 'BaseTestCase'] class TestConfig(object): SQLALCHEMY_DATABASE...
"""Base stuff for testing. """ import subprocess assert not 'twill' in subprocess.__file__ from flask.ext.testing import TestCase from abilian.application import Application __all__ = ['TestConfig', 'BaseTestCase'] class TestConfig(object): SQLALCHEMY_DATABASE_URI = "sqlite://" SQLALCHEMY_ECHO = False TEST...
"""Base stuff for testing. """ import subprocess assert not 'twill' in subprocess.__file__ from flask.ext.testing import TestCase from abilian.application import Application from abilian.core.entities import db __all__ = ['TestConfig', 'BaseTestCase'] class TestConfig(object): SQLALCHEMY_DATABASE_URI = "sqlite:...
<commit_before>"""Base stuff for testing. """ import subprocess assert not 'twill' in subprocess.__file__ from flask.ext.testing import TestCase from abilian.application import Application from abilian.core.entities import db __all__ = ['TestConfig', 'BaseTestCase'] class TestConfig(object): SQLALCHEMY_DATABASE...
8087a56b959ddb9371125dd2732550405df14e0f
src/webapp/cfg/config_example.py
src/webapp/cfg/config_example.py
# The secret key is used for signing the session and creating the csrf hmacs SECRET_KEY = "gocu5eYoosh8oocoozeeG9queeghae7ushahp9ufaighoo5gex1vulaexohtepha" # this is the dbapi connection string for sqlalchemy DB_CONNECTION = None # Turn this off in production! DEBUG = True SERVER_NAME = 'localhost:5000' APPLICATION...
# The secret key is used for signing the session and creating the csrf hmacs SECRET_KEY = "gocu5eYoosh8oocoozeeG9queeghae7ushahp9ufaighoo5gex1vulaexohtepha" # this is the dbapi connection string for sqlalchemy DB_CONNECTION = None # Turn this off in production! DEBUG = True SERVER_NAME = 'localhost:5000' APPLICATION...
Add end date to the config.
Add end date to the config.
Python
bsd-3-clause
janLo/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system
# The secret key is used for signing the session and creating the csrf hmacs SECRET_KEY = "gocu5eYoosh8oocoozeeG9queeghae7ushahp9ufaighoo5gex1vulaexohtepha" # this is the dbapi connection string for sqlalchemy DB_CONNECTION = None # Turn this off in production! DEBUG = True SERVER_NAME = 'localhost:5000' APPLICATION...
# The secret key is used for signing the session and creating the csrf hmacs SECRET_KEY = "gocu5eYoosh8oocoozeeG9queeghae7ushahp9ufaighoo5gex1vulaexohtepha" # this is the dbapi connection string for sqlalchemy DB_CONNECTION = None # Turn this off in production! DEBUG = True SERVER_NAME = 'localhost:5000' APPLICATION...
<commit_before># The secret key is used for signing the session and creating the csrf hmacs SECRET_KEY = "gocu5eYoosh8oocoozeeG9queeghae7ushahp9ufaighoo5gex1vulaexohtepha" # this is the dbapi connection string for sqlalchemy DB_CONNECTION = None # Turn this off in production! DEBUG = True SERVER_NAME = 'localhost:50...
# The secret key is used for signing the session and creating the csrf hmacs SECRET_KEY = "gocu5eYoosh8oocoozeeG9queeghae7ushahp9ufaighoo5gex1vulaexohtepha" # this is the dbapi connection string for sqlalchemy DB_CONNECTION = None # Turn this off in production! DEBUG = True SERVER_NAME = 'localhost:5000' APPLICATION...
# The secret key is used for signing the session and creating the csrf hmacs SECRET_KEY = "gocu5eYoosh8oocoozeeG9queeghae7ushahp9ufaighoo5gex1vulaexohtepha" # this is the dbapi connection string for sqlalchemy DB_CONNECTION = None # Turn this off in production! DEBUG = True SERVER_NAME = 'localhost:5000' APPLICATION...
<commit_before># The secret key is used for signing the session and creating the csrf hmacs SECRET_KEY = "gocu5eYoosh8oocoozeeG9queeghae7ushahp9ufaighoo5gex1vulaexohtepha" # this is the dbapi connection string for sqlalchemy DB_CONNECTION = None # Turn this off in production! DEBUG = True SERVER_NAME = 'localhost:50...
644ae4d4f204799160cd2a75f7a8be514d7735f1
gunicorn/__init__.py
gunicorn/__init__.py
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. version_info = (17, 6) __version__ = ".".join([str(v) for v in version_info]) SERVER_SOFTWARE = "gunicorn/%s" % __version__
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. version_info = (18, 0) __version__ = ".".join([str(v) for v in version_info]) SERVER_SOFTWARE = "gunicorn/%s" % __version__
Revert "oups this the 17.6 version"
Revert "oups this the 17.6 version" This reverts commit bb71bc841f7422333324b95c988ba0677779304d.
Python
mit
gtrdotmcs/gunicorn,zhoucen/gunicorn,GitHublong/gunicorn,ammaraskar/gunicorn,elelianghh/gunicorn,harrisonfeng/gunicorn,ccl0326/gunicorn,tejasmanohar/gunicorn,mvaled/gunicorn,alex/gunicorn,alex/gunicorn,mvaled/gunicorn,zhoucen/gunicorn,tempbottle/gunicorn,jamesblunt/gunicorn,wong2/gunicorn,prezi/gunicorn,malept/gunicorn,...
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. version_info = (17, 6) __version__ = ".".join([str(v) for v in version_info]) SERVER_SOFTWARE = "gunicorn/%s" % __version__ Revert "oups this the 17.6 version" This reverts commit bb71bc841f7...
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. version_info = (18, 0) __version__ = ".".join([str(v) for v in version_info]) SERVER_SOFTWARE = "gunicorn/%s" % __version__
<commit_before># -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. version_info = (17, 6) __version__ = ".".join([str(v) for v in version_info]) SERVER_SOFTWARE = "gunicorn/%s" % __version__ <commit_msg>Revert "oups this the 17.6 version" This...
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. version_info = (18, 0) __version__ = ".".join([str(v) for v in version_info]) SERVER_SOFTWARE = "gunicorn/%s" % __version__
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. version_info = (17, 6) __version__ = ".".join([str(v) for v in version_info]) SERVER_SOFTWARE = "gunicorn/%s" % __version__ Revert "oups this the 17.6 version" This reverts commit bb71bc841f7...
<commit_before># -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. version_info = (17, 6) __version__ = ".".join([str(v) for v in version_info]) SERVER_SOFTWARE = "gunicorn/%s" % __version__ <commit_msg>Revert "oups this the 17.6 version" This...
fa1b31785c52f0e4a14ed57663a3904d0ecd976d
akanda/horizon/overrides.py
akanda/horizon/overrides.py
from horizon.base import Horizon nova_dashboard = Horizon.get_dashboard('project') compute_panel_group = nova_dashboard.get_panel_group('compute') compute_panel_group.panels.append('networking')
from horizon.base import Horizon nova_dashboard = Horizon.get_dashboard('project') compute_panel_group = nova_dashboard.get_panel_group('network') compute_panel_group.panels.append('networking')
Move the Akanda Networking panel in the new Manage Network section
Move the Akanda Networking panel in the new Manage Network section In the Grizzly version of Horizon the navigation tree on the left is been split in two section, this fix move the Akanda Networking panel from the Manage Compute sections to the newly created Manage Network section. Change-Id: Iea6156bcc85496e3efac8c2...
Python
apache-2.0
dreamhost/akanda-horizon,dreamhost/akanda-horizon
from horizon.base import Horizon nova_dashboard = Horizon.get_dashboard('project') compute_panel_group = nova_dashboard.get_panel_group('compute') compute_panel_group.panels.append('networking') Move the Akanda Networking panel in the new Manage Network section In the Grizzly version of Horizon the navigation tree o...
from horizon.base import Horizon nova_dashboard = Horizon.get_dashboard('project') compute_panel_group = nova_dashboard.get_panel_group('network') compute_panel_group.panels.append('networking')
<commit_before>from horizon.base import Horizon nova_dashboard = Horizon.get_dashboard('project') compute_panel_group = nova_dashboard.get_panel_group('compute') compute_panel_group.panels.append('networking') <commit_msg>Move the Akanda Networking panel in the new Manage Network section In the Grizzly version of Ho...
from horizon.base import Horizon nova_dashboard = Horizon.get_dashboard('project') compute_panel_group = nova_dashboard.get_panel_group('network') compute_panel_group.panels.append('networking')
from horizon.base import Horizon nova_dashboard = Horizon.get_dashboard('project') compute_panel_group = nova_dashboard.get_panel_group('compute') compute_panel_group.panels.append('networking') Move the Akanda Networking panel in the new Manage Network section In the Grizzly version of Horizon the navigation tree o...
<commit_before>from horizon.base import Horizon nova_dashboard = Horizon.get_dashboard('project') compute_panel_group = nova_dashboard.get_panel_group('compute') compute_panel_group.panels.append('networking') <commit_msg>Move the Akanda Networking panel in the new Manage Network section In the Grizzly version of Ho...
bd7c5c5544a6d09062da05a4780524e8981f1737
captainhook/checkers/block_branches.py
captainhook/checkers/block_branches.py
# # # # # # # # # # # # # # # CAPTAINHOOK IDENTIFIER # # # # # # # # # # # # # # # import argparse from .utils import bash CHECK_NAME = 'block_branch' def run(files, temp_folder, arg=None): "Check we're not committing to a blocked branch" parser = get_parser() argos = parser.parse_args(arg.split()) ...
# # # # # # # # # # # # # # # CAPTAINHOOK IDENTIFIER # # # # # # # # # # # # # # # import argparse from .utils import bash CHECK_NAME = 'block_branch' def run(files, temp_folder, arg=None): "Check we're not committing to a blocked branch" parser = get_parser() argos = parser.parse_args(arg.split()) ...
Remove decode from block branches check
Remove decode from block branches check It’s now done by `bash()`.
Python
bsd-3-clause
alexcouper/captainhook
# # # # # # # # # # # # # # # CAPTAINHOOK IDENTIFIER # # # # # # # # # # # # # # # import argparse from .utils import bash CHECK_NAME = 'block_branch' def run(files, temp_folder, arg=None): "Check we're not committing to a blocked branch" parser = get_parser() argos = parser.parse_args(arg.split()) ...
# # # # # # # # # # # # # # # CAPTAINHOOK IDENTIFIER # # # # # # # # # # # # # # # import argparse from .utils import bash CHECK_NAME = 'block_branch' def run(files, temp_folder, arg=None): "Check we're not committing to a blocked branch" parser = get_parser() argos = parser.parse_args(arg.split()) ...
<commit_before># # # # # # # # # # # # # # # CAPTAINHOOK IDENTIFIER # # # # # # # # # # # # # # # import argparse from .utils import bash CHECK_NAME = 'block_branch' def run(files, temp_folder, arg=None): "Check we're not committing to a blocked branch" parser = get_parser() argos = parser.parse_args(a...
# # # # # # # # # # # # # # # CAPTAINHOOK IDENTIFIER # # # # # # # # # # # # # # # import argparse from .utils import bash CHECK_NAME = 'block_branch' def run(files, temp_folder, arg=None): "Check we're not committing to a blocked branch" parser = get_parser() argos = parser.parse_args(arg.split()) ...
# # # # # # # # # # # # # # # CAPTAINHOOK IDENTIFIER # # # # # # # # # # # # # # # import argparse from .utils import bash CHECK_NAME = 'block_branch' def run(files, temp_folder, arg=None): "Check we're not committing to a blocked branch" parser = get_parser() argos = parser.parse_args(arg.split()) ...
<commit_before># # # # # # # # # # # # # # # CAPTAINHOOK IDENTIFIER # # # # # # # # # # # # # # # import argparse from .utils import bash CHECK_NAME = 'block_branch' def run(files, temp_folder, arg=None): "Check we're not committing to a blocked branch" parser = get_parser() argos = parser.parse_args(a...
b1a562ea2105e4992fa51d7ba49a99c1955b01b3
stats/urls.py
stats/urls.py
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.front_page, name='front_page'), url(r'^engine/(?P<name>[ a-zA-Z]+)/$', views.engine_players, name='engine'), url(r'^engine/(?P<name>[ a-zA-Z]+)/wads/$', views.engine_wads, name='wads'), url(r'^engine/(?P<name>[ a-zA-Z...
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.front_page, name='front_page'), url(r'^engine/(?P<name>[ a-zA-Z0-9]+)/$', views.engine_players, name='engine'), url(r'^engine/(?P<name>[ a-zA-Z0-9]+)/wads/$', views.engine_wads, name='wads'), url(r'^engine/(?P<name>[ ...
Support game engines with numbers in name.
Support game engines with numbers in name.
Python
bsd-2-clause
Zalewa/doomstats,Zalewa/doomstats,Zalewa/doomstats,Zalewa/doomstats
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.front_page, name='front_page'), url(r'^engine/(?P<name>[ a-zA-Z]+)/$', views.engine_players, name='engine'), url(r'^engine/(?P<name>[ a-zA-Z]+)/wads/$', views.engine_wads, name='wads'), url(r'^engine/(?P<name>[ a-zA-Z...
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.front_page, name='front_page'), url(r'^engine/(?P<name>[ a-zA-Z0-9]+)/$', views.engine_players, name='engine'), url(r'^engine/(?P<name>[ a-zA-Z0-9]+)/wads/$', views.engine_wads, name='wads'), url(r'^engine/(?P<name>[ ...
<commit_before>from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.front_page, name='front_page'), url(r'^engine/(?P<name>[ a-zA-Z]+)/$', views.engine_players, name='engine'), url(r'^engine/(?P<name>[ a-zA-Z]+)/wads/$', views.engine_wads, name='wads'), url(r'^engine/(?...
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.front_page, name='front_page'), url(r'^engine/(?P<name>[ a-zA-Z0-9]+)/$', views.engine_players, name='engine'), url(r'^engine/(?P<name>[ a-zA-Z0-9]+)/wads/$', views.engine_wads, name='wads'), url(r'^engine/(?P<name>[ ...
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.front_page, name='front_page'), url(r'^engine/(?P<name>[ a-zA-Z]+)/$', views.engine_players, name='engine'), url(r'^engine/(?P<name>[ a-zA-Z]+)/wads/$', views.engine_wads, name='wads'), url(r'^engine/(?P<name>[ a-zA-Z...
<commit_before>from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.front_page, name='front_page'), url(r'^engine/(?P<name>[ a-zA-Z]+)/$', views.engine_players, name='engine'), url(r'^engine/(?P<name>[ a-zA-Z]+)/wads/$', views.engine_wads, name='wads'), url(r'^engine/(?...
c589fffe7834d7a187c25316f95a5d1ca12c5669
active-env.py
active-env.py
#! /usr/bin/env python # Author: Joseph Lisee <jlisee@gmail.com> import os import sys # Get the current directory cur_dir, _ = os.path.split(__file__) def main(): # Get our path env_dir = os.path.abspath(os.path.join(cur_dir, 'env')) # Set our path vars env_paths = { 'PATH' : os.path.join(...
#! /usr/bin/env python # Author: Joseph Lisee <jlisee@gmail.com> import os import sys # Get the current directory cur_dir, _ = os.path.split(__file__) def main(): # Get our path env_dir = os.path.abspath(os.path.join(cur_dir, 'env')) # Set our path vars env_paths = { 'PATH' : os.path.join(...
Make bash setup script actually work
Make bash setup script actually work Fixes call to exec and labels PS1 work as non working (over-ridden by bashrc).
Python
bsd-3-clause
jlisee/xpkg,jlisee/xpkg,jlisee/xpkg
#! /usr/bin/env python # Author: Joseph Lisee <jlisee@gmail.com> import os import sys # Get the current directory cur_dir, _ = os.path.split(__file__) def main(): # Get our path env_dir = os.path.abspath(os.path.join(cur_dir, 'env')) # Set our path vars env_paths = { 'PATH' : os.path.join(...
#! /usr/bin/env python # Author: Joseph Lisee <jlisee@gmail.com> import os import sys # Get the current directory cur_dir, _ = os.path.split(__file__) def main(): # Get our path env_dir = os.path.abspath(os.path.join(cur_dir, 'env')) # Set our path vars env_paths = { 'PATH' : os.path.join(...
<commit_before>#! /usr/bin/env python # Author: Joseph Lisee <jlisee@gmail.com> import os import sys # Get the current directory cur_dir, _ = os.path.split(__file__) def main(): # Get our path env_dir = os.path.abspath(os.path.join(cur_dir, 'env')) # Set our path vars env_paths = { 'PATH' ...
#! /usr/bin/env python # Author: Joseph Lisee <jlisee@gmail.com> import os import sys # Get the current directory cur_dir, _ = os.path.split(__file__) def main(): # Get our path env_dir = os.path.abspath(os.path.join(cur_dir, 'env')) # Set our path vars env_paths = { 'PATH' : os.path.join(...
#! /usr/bin/env python # Author: Joseph Lisee <jlisee@gmail.com> import os import sys # Get the current directory cur_dir, _ = os.path.split(__file__) def main(): # Get our path env_dir = os.path.abspath(os.path.join(cur_dir, 'env')) # Set our path vars env_paths = { 'PATH' : os.path.join(...
<commit_before>#! /usr/bin/env python # Author: Joseph Lisee <jlisee@gmail.com> import os import sys # Get the current directory cur_dir, _ = os.path.split(__file__) def main(): # Get our path env_dir = os.path.abspath(os.path.join(cur_dir, 'env')) # Set our path vars env_paths = { 'PATH' ...
85df3afc75f52a2183ef46560f57bb6993091238
trex/urls.py
trex/urls.py
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views import project urlpatterns = patterns( '', url(r"^admin/", include(a...
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views import project urlpatterns = patterns( '', url(r"^api/1/projects/$",...
Remove the admin url mapping
Remove the admin url mapping
Python
mit
bjoernricks/trex,bjoernricks/trex
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views import project urlpatterns = patterns( '', url(r"^admin/", include(a...
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views import project urlpatterns = patterns( '', url(r"^api/1/projects/$",...
<commit_before># -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views import project urlpatterns = patterns( '', url(r"^adm...
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views import project urlpatterns = patterns( '', url(r"^api/1/projects/$",...
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views import project urlpatterns = patterns( '', url(r"^admin/", include(a...
<commit_before># -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from django.conf.urls import patterns, include, url from django.contrib import admin from trex.views import project urlpatterns = patterns( '', url(r"^adm...
faf77acc7ddb6a5e2bc198fcfec129f83d2a7678
plotly/tests/test_core/test_file/test_file.py
plotly/tests/test_core/test_file/test_file.py
""" test_meta: ========== A module intended for use with Nose. """ from nose.tools import raises from nose import with_setup import random import string import requests import plotly.plotly as py import plotly.tools as tls from plotly.exceptions import PlotlyRequestError def _random_filename(): random_chars ...
""" test_meta: ========== A module intended for use with Nose. """ import random import string from unittest import TestCase import plotly.plotly as py from plotly.exceptions import PlotlyRequestError class FolderAPITestCase(TestCase): def setUp(self): py.sign_in('PythonTest', '9v9f20pext') def _...
Fix failing test and refact to TestCase.
Fix failing test and refact to TestCase.
Python
mit
ee-in/python-api,plotly/plotly.py,plotly/python-api,ee-in/python-api,plotly/python-api,plotly/python-api,plotly/plotly.py,plotly/plotly.py,ee-in/python-api
""" test_meta: ========== A module intended for use with Nose. """ from nose.tools import raises from nose import with_setup import random import string import requests import plotly.plotly as py import plotly.tools as tls from plotly.exceptions import PlotlyRequestError def _random_filename(): random_chars ...
""" test_meta: ========== A module intended for use with Nose. """ import random import string from unittest import TestCase import plotly.plotly as py from plotly.exceptions import PlotlyRequestError class FolderAPITestCase(TestCase): def setUp(self): py.sign_in('PythonTest', '9v9f20pext') def _...
<commit_before>""" test_meta: ========== A module intended for use with Nose. """ from nose.tools import raises from nose import with_setup import random import string import requests import plotly.plotly as py import plotly.tools as tls from plotly.exceptions import PlotlyRequestError def _random_filename(): ...
""" test_meta: ========== A module intended for use with Nose. """ import random import string from unittest import TestCase import plotly.plotly as py from plotly.exceptions import PlotlyRequestError class FolderAPITestCase(TestCase): def setUp(self): py.sign_in('PythonTest', '9v9f20pext') def _...
""" test_meta: ========== A module intended for use with Nose. """ from nose.tools import raises from nose import with_setup import random import string import requests import plotly.plotly as py import plotly.tools as tls from plotly.exceptions import PlotlyRequestError def _random_filename(): random_chars ...
<commit_before>""" test_meta: ========== A module intended for use with Nose. """ from nose.tools import raises from nose import with_setup import random import string import requests import plotly.plotly as py import plotly.tools as tls from plotly.exceptions import PlotlyRequestError def _random_filename(): ...
530bd321f38a0131eb250148bd0a67d9a59da34c
uno_image.py
uno_image.py
""" Example usage of UNO, graphic objects and networking in LO extension """ import unohelper from com.sun.star.task import XJobExecutor class ImageExample(unohelper.Base, XJobExecutor): '''Class that implements the service registered in LibreOffice''' def __init__(self, context): self.context = cont...
""" Example usage of UNO, graphic objects and networking in LO extension """ import unohelper from com.sun.star.task import XJobExecutor class ImageExample(unohelper.Base, XJobExecutor): '''Class that implements the service registered in LibreOffice''' def __init__(self, context): self.context = cont...
Add code to create needed uno services
Add code to create needed uno services
Python
mpl-2.0
JIghtuse/uno-image-manipulation-example
""" Example usage of UNO, graphic objects and networking in LO extension """ import unohelper from com.sun.star.task import XJobExecutor class ImageExample(unohelper.Base, XJobExecutor): '''Class that implements the service registered in LibreOffice''' def __init__(self, context): self.context = cont...
""" Example usage of UNO, graphic objects and networking in LO extension """ import unohelper from com.sun.star.task import XJobExecutor class ImageExample(unohelper.Base, XJobExecutor): '''Class that implements the service registered in LibreOffice''' def __init__(self, context): self.context = cont...
<commit_before>""" Example usage of UNO, graphic objects and networking in LO extension """ import unohelper from com.sun.star.task import XJobExecutor class ImageExample(unohelper.Base, XJobExecutor): '''Class that implements the service registered in LibreOffice''' def __init__(self, context): self...
""" Example usage of UNO, graphic objects and networking in LO extension """ import unohelper from com.sun.star.task import XJobExecutor class ImageExample(unohelper.Base, XJobExecutor): '''Class that implements the service registered in LibreOffice''' def __init__(self, context): self.context = cont...
""" Example usage of UNO, graphic objects and networking in LO extension """ import unohelper from com.sun.star.task import XJobExecutor class ImageExample(unohelper.Base, XJobExecutor): '''Class that implements the service registered in LibreOffice''' def __init__(self, context): self.context = cont...
<commit_before>""" Example usage of UNO, graphic objects and networking in LO extension """ import unohelper from com.sun.star.task import XJobExecutor class ImageExample(unohelper.Base, XJobExecutor): '''Class that implements the service registered in LibreOffice''' def __init__(self, context): self...
f2ce77ce713610ddd7ee1b08768d2a84121f0803
hunter/reviewsapi.py
hunter/reviewsapi.py
import requests import os from .endpoints import * class UnauthorizedToken(Exception): pass class ReviewsAPI: def __init__(self): token = os.environ['UDACITY_AUTH_TOKEN'] self.headers = {'Authorization': token, 'Content-Length': '0'} def execute(self, request): try: ...
import requests import os from .endpoints import * class UnauthorizedToken(Exception): pass class ReviewsAPI: def __init__(self): token = os.environ['UDACITY_AUTH_TOKEN'] self.headers = {'Authorization': token, 'Content-Length': '0'} def execute(self, request): try: ...
Fix a typo on error message
Fix a typo on error message
Python
mit
anapaulagomes/reviews-assigner
import requests import os from .endpoints import * class UnauthorizedToken(Exception): pass class ReviewsAPI: def __init__(self): token = os.environ['UDACITY_AUTH_TOKEN'] self.headers = {'Authorization': token, 'Content-Length': '0'} def execute(self, request): try: ...
import requests import os from .endpoints import * class UnauthorizedToken(Exception): pass class ReviewsAPI: def __init__(self): token = os.environ['UDACITY_AUTH_TOKEN'] self.headers = {'Authorization': token, 'Content-Length': '0'} def execute(self, request): try: ...
<commit_before>import requests import os from .endpoints import * class UnauthorizedToken(Exception): pass class ReviewsAPI: def __init__(self): token = os.environ['UDACITY_AUTH_TOKEN'] self.headers = {'Authorization': token, 'Content-Length': '0'} def execute(self, request): t...
import requests import os from .endpoints import * class UnauthorizedToken(Exception): pass class ReviewsAPI: def __init__(self): token = os.environ['UDACITY_AUTH_TOKEN'] self.headers = {'Authorization': token, 'Content-Length': '0'} def execute(self, request): try: ...
import requests import os from .endpoints import * class UnauthorizedToken(Exception): pass class ReviewsAPI: def __init__(self): token = os.environ['UDACITY_AUTH_TOKEN'] self.headers = {'Authorization': token, 'Content-Length': '0'} def execute(self, request): try: ...
<commit_before>import requests import os from .endpoints import * class UnauthorizedToken(Exception): pass class ReviewsAPI: def __init__(self): token = os.environ['UDACITY_AUTH_TOKEN'] self.headers = {'Authorization': token, 'Content-Length': '0'} def execute(self, request): t...
3a77de3c7d863041bea1366c50a95293d1cd2f7a
tests/functional/test_warning.py
tests/functional/test_warning.py
import pytest import textwrap @pytest.fixture def warnings_demo(tmpdir): demo = tmpdir.joinpath('warnings_demo.py') demo.write_text(textwrap.dedent(''' from logging import basicConfig from pip._internal.utils import deprecation deprecation.install_warning_logger() basicConfig(...
import pytest import textwrap @pytest.fixture def warnings_demo(tmpdir): demo = tmpdir.joinpath('warnings_demo.py') demo.write_text(textwrap.dedent(''' from logging import basicConfig from pip._internal.utils import deprecation deprecation.install_warning_logger() basicConfig(...
Split tests for different functionality
Split tests for different functionality
Python
mit
pypa/pip,pradyunsg/pip,xavfernandez/pip,rouge8/pip,pypa/pip,xavfernandez/pip,rouge8/pip,xavfernandez/pip,pfmoore/pip,sbidoul/pip,rouge8/pip,sbidoul/pip,pradyunsg/pip,pfmoore/pip
import pytest import textwrap @pytest.fixture def warnings_demo(tmpdir): demo = tmpdir.joinpath('warnings_demo.py') demo.write_text(textwrap.dedent(''' from logging import basicConfig from pip._internal.utils import deprecation deprecation.install_warning_logger() basicConfig(...
import pytest import textwrap @pytest.fixture def warnings_demo(tmpdir): demo = tmpdir.joinpath('warnings_demo.py') demo.write_text(textwrap.dedent(''' from logging import basicConfig from pip._internal.utils import deprecation deprecation.install_warning_logger() basicConfig(...
<commit_before>import pytest import textwrap @pytest.fixture def warnings_demo(tmpdir): demo = tmpdir.joinpath('warnings_demo.py') demo.write_text(textwrap.dedent(''' from logging import basicConfig from pip._internal.utils import deprecation deprecation.install_warning_logger() ...
import pytest import textwrap @pytest.fixture def warnings_demo(tmpdir): demo = tmpdir.joinpath('warnings_demo.py') demo.write_text(textwrap.dedent(''' from logging import basicConfig from pip._internal.utils import deprecation deprecation.install_warning_logger() basicConfig(...
import pytest import textwrap @pytest.fixture def warnings_demo(tmpdir): demo = tmpdir.joinpath('warnings_demo.py') demo.write_text(textwrap.dedent(''' from logging import basicConfig from pip._internal.utils import deprecation deprecation.install_warning_logger() basicConfig(...
<commit_before>import pytest import textwrap @pytest.fixture def warnings_demo(tmpdir): demo = tmpdir.joinpath('warnings_demo.py') demo.write_text(textwrap.dedent(''' from logging import basicConfig from pip._internal.utils import deprecation deprecation.install_warning_logger() ...
fe2f37c71f4c46997eb2d2e775bb928a2e7bcad1
contentdensity/textifai/modules/gic.py
contentdensity/textifai/modules/gic.py
from functools import reduce from ..models import User, Text, Insight, Comment, GeneralInsight class general_insight_calculator: name = None calc = lambda *_: None def __init__(self, name, calc): self.name = name self.calc = calc def do_calc(self): return self.calc() def...
from functools import reduce from ..models import User, Text, Insight, Comment, GeneralInsight class general_insight_calculator: name = None calc = lambda *_: None def __init__(self, name, calc): self.name = name self.calc = calc def do_calc(self): return self.calc() def...
Change from array to dictionary for general insight calculators
Change from array to dictionary for general insight calculators
Python
mit
CS326-important/space-deer,CS326-important/space-deer
from functools import reduce from ..models import User, Text, Insight, Comment, GeneralInsight class general_insight_calculator: name = None calc = lambda *_: None def __init__(self, name, calc): self.name = name self.calc = calc def do_calc(self): return self.calc() def...
from functools import reduce from ..models import User, Text, Insight, Comment, GeneralInsight class general_insight_calculator: name = None calc = lambda *_: None def __init__(self, name, calc): self.name = name self.calc = calc def do_calc(self): return self.calc() def...
<commit_before> from functools import reduce from ..models import User, Text, Insight, Comment, GeneralInsight class general_insight_calculator: name = None calc = lambda *_: None def __init__(self, name, calc): self.name = name self.calc = calc def do_calc(self): return self....
from functools import reduce from ..models import User, Text, Insight, Comment, GeneralInsight class general_insight_calculator: name = None calc = lambda *_: None def __init__(self, name, calc): self.name = name self.calc = calc def do_calc(self): return self.calc() def...
from functools import reduce from ..models import User, Text, Insight, Comment, GeneralInsight class general_insight_calculator: name = None calc = lambda *_: None def __init__(self, name, calc): self.name = name self.calc = calc def do_calc(self): return self.calc() def...
<commit_before> from functools import reduce from ..models import User, Text, Insight, Comment, GeneralInsight class general_insight_calculator: name = None calc = lambda *_: None def __init__(self, name, calc): self.name = name self.calc = calc def do_calc(self): return self....
0273fc0109d1ef4a4de0450998a6c420cb90217a
util_funcs.py
util_funcs.py
#!/usr/bin/env python """Collection of module netural utility functions""" from sys import stderr from ssl import SSLError try: from urllib.request import urlopen, HTTPError, URLError except ImportError: from urllib2 import urlopen, HTTPError, URLError class HTMLGetError(Exception): pass def get_html(url...
#!/usr/bin/env python """Collection of module netural utility functions""" from sys import stderr from ssl import SSLError from socket import timeout try: from urllib.request import urlopen, HTTPError, URLError except ImportError: from urllib2 import urlopen, HTTPError, URLError class HTMLGetError(Exception):...
Remove superfluous parens; catch timeout
Remove superfluous parens; catch timeout
Python
mit
jblakeman/apt-select,jblakeman/apt-select
#!/usr/bin/env python """Collection of module netural utility functions""" from sys import stderr from ssl import SSLError try: from urllib.request import urlopen, HTTPError, URLError except ImportError: from urllib2 import urlopen, HTTPError, URLError class HTMLGetError(Exception): pass def get_html(url...
#!/usr/bin/env python """Collection of module netural utility functions""" from sys import stderr from ssl import SSLError from socket import timeout try: from urllib.request import urlopen, HTTPError, URLError except ImportError: from urllib2 import urlopen, HTTPError, URLError class HTMLGetError(Exception):...
<commit_before>#!/usr/bin/env python """Collection of module netural utility functions""" from sys import stderr from ssl import SSLError try: from urllib.request import urlopen, HTTPError, URLError except ImportError: from urllib2 import urlopen, HTTPError, URLError class HTMLGetError(Exception): pass d...
#!/usr/bin/env python """Collection of module netural utility functions""" from sys import stderr from ssl import SSLError from socket import timeout try: from urllib.request import urlopen, HTTPError, URLError except ImportError: from urllib2 import urlopen, HTTPError, URLError class HTMLGetError(Exception):...
#!/usr/bin/env python """Collection of module netural utility functions""" from sys import stderr from ssl import SSLError try: from urllib.request import urlopen, HTTPError, URLError except ImportError: from urllib2 import urlopen, HTTPError, URLError class HTMLGetError(Exception): pass def get_html(url...
<commit_before>#!/usr/bin/env python """Collection of module netural utility functions""" from sys import stderr from ssl import SSLError try: from urllib.request import urlopen, HTTPError, URLError except ImportError: from urllib2 import urlopen, HTTPError, URLError class HTMLGetError(Exception): pass d...
3222fab1b026250d9aee863d068137b03c13a05b
tests/test_check_dependencies.py
tests/test_check_dependencies.py
#! /usr/bin/python from check_dependencies import CheckDependencies def test_default(): CheckDependencies(None) def test_hydrotrend(): CheckDependencies("hydrotrend")
#! /usr/bin/python from check_dependencies import CheckDependencies def test_default(): CheckDependencies(None) def test_hydrotrend(): CheckDependencies("hydrotrend") def test_cem(): CheckDependencies("cem")
Add dependency check test for CEM
Add dependency check test for CEM
Python
mit
csdms/rpm_models
#! /usr/bin/python from check_dependencies import CheckDependencies def test_default(): CheckDependencies(None) def test_hydrotrend(): CheckDependencies("hydrotrend") Add dependency check test for CEM
#! /usr/bin/python from check_dependencies import CheckDependencies def test_default(): CheckDependencies(None) def test_hydrotrend(): CheckDependencies("hydrotrend") def test_cem(): CheckDependencies("cem")
<commit_before>#! /usr/bin/python from check_dependencies import CheckDependencies def test_default(): CheckDependencies(None) def test_hydrotrend(): CheckDependencies("hydrotrend") <commit_msg>Add dependency check test for CEM<commit_after>
#! /usr/bin/python from check_dependencies import CheckDependencies def test_default(): CheckDependencies(None) def test_hydrotrend(): CheckDependencies("hydrotrend") def test_cem(): CheckDependencies("cem")
#! /usr/bin/python from check_dependencies import CheckDependencies def test_default(): CheckDependencies(None) def test_hydrotrend(): CheckDependencies("hydrotrend") Add dependency check test for CEM#! /usr/bin/python from check_dependencies import CheckDependencies def test_default(): CheckDependenci...
<commit_before>#! /usr/bin/python from check_dependencies import CheckDependencies def test_default(): CheckDependencies(None) def test_hydrotrend(): CheckDependencies("hydrotrend") <commit_msg>Add dependency check test for CEM<commit_after>#! /usr/bin/python from check_dependencies import CheckDependencies...
85605ab0c08528c772d53ad746eb5eadcd6e495c
hook-mcedit2.py
hook-mcedit2.py
""" hook-mcedit2.py Hook for pyinstaller to collect MCEdit's data files """ from __future__ import absolute_import, division, print_function#, unicode_literals import glob import logging import os from PyInstaller.hooks.hookutils import collect_data_files log = logging.getLogger(__name__) datas = collect_data...
""" hook-mcedit2.py Hook for pyinstaller to collect MCEdit's data files """ from __future__ import absolute_import, division, print_function#, unicode_literals import glob import logging import os from PyInstaller.hooks.hookutils import collect_data_files log = logging.getLogger(__name__) # Remove cython and ...
Exclude secondary cython outputs from pyi spec
Exclude secondary cython outputs from pyi spec
Python
bsd-3-clause
Rubisk/mcedit2,vorburger/mcedit2,Rubisk/mcedit2,vorburger/mcedit2
""" hook-mcedit2.py Hook for pyinstaller to collect MCEdit's data files """ from __future__ import absolute_import, division, print_function#, unicode_literals import glob import logging import os from PyInstaller.hooks.hookutils import collect_data_files log = logging.getLogger(__name__) datas = collect_data...
""" hook-mcedit2.py Hook for pyinstaller to collect MCEdit's data files """ from __future__ import absolute_import, division, print_function#, unicode_literals import glob import logging import os from PyInstaller.hooks.hookutils import collect_data_files log = logging.getLogger(__name__) # Remove cython and ...
<commit_before>""" hook-mcedit2.py Hook for pyinstaller to collect MCEdit's data files """ from __future__ import absolute_import, division, print_function#, unicode_literals import glob import logging import os from PyInstaller.hooks.hookutils import collect_data_files log = logging.getLogger(__name__) datas...
""" hook-mcedit2.py Hook for pyinstaller to collect MCEdit's data files """ from __future__ import absolute_import, division, print_function#, unicode_literals import glob import logging import os from PyInstaller.hooks.hookutils import collect_data_files log = logging.getLogger(__name__) # Remove cython and ...
""" hook-mcedit2.py Hook for pyinstaller to collect MCEdit's data files """ from __future__ import absolute_import, division, print_function#, unicode_literals import glob import logging import os from PyInstaller.hooks.hookutils import collect_data_files log = logging.getLogger(__name__) datas = collect_data...
<commit_before>""" hook-mcedit2.py Hook for pyinstaller to collect MCEdit's data files """ from __future__ import absolute_import, division, print_function#, unicode_literals import glob import logging import os from PyInstaller.hooks.hookutils import collect_data_files log = logging.getLogger(__name__) datas...
2da3f9cf12c340322f512585711ebc02097c72a1
tests/views/test_calls_for_comments_page.py
tests/views/test_calls_for_comments_page.py
from tests import PMGLiveServerTestCase from tests.fixtures import dbfixture, CallForCommentData import urllib.request, urllib.error, urllib.parse class TestCallsForCommentsPage(PMGLiveServerTestCase): def setUp(self): super(TestCallsForCommentsPage, self).setUp() self.fx = dbfixture.data(CallFor...
from tests import PMGLiveServerTestCase from tests.fixtures import dbfixture, CallForCommentData import urllib.request, urllib.error, urllib.parse class TestCallsForCommentsPage(PMGLiveServerTestCase): def setUp(self): super(TestCallsForCommentsPage, self).setUp() self.fx = dbfixture.data(CallFor...
Remove false assertion from test
Remove false assertion from test
Python
apache-2.0
Code4SA/pmg-cms-2,Code4SA/pmg-cms-2,Code4SA/pmg-cms-2
from tests import PMGLiveServerTestCase from tests.fixtures import dbfixture, CallForCommentData import urllib.request, urllib.error, urllib.parse class TestCallsForCommentsPage(PMGLiveServerTestCase): def setUp(self): super(TestCallsForCommentsPage, self).setUp() self.fx = dbfixture.data(CallFor...
from tests import PMGLiveServerTestCase from tests.fixtures import dbfixture, CallForCommentData import urllib.request, urllib.error, urllib.parse class TestCallsForCommentsPage(PMGLiveServerTestCase): def setUp(self): super(TestCallsForCommentsPage, self).setUp() self.fx = dbfixture.data(CallFor...
<commit_before>from tests import PMGLiveServerTestCase from tests.fixtures import dbfixture, CallForCommentData import urllib.request, urllib.error, urllib.parse class TestCallsForCommentsPage(PMGLiveServerTestCase): def setUp(self): super(TestCallsForCommentsPage, self).setUp() self.fx = dbfixtu...
from tests import PMGLiveServerTestCase from tests.fixtures import dbfixture, CallForCommentData import urllib.request, urllib.error, urllib.parse class TestCallsForCommentsPage(PMGLiveServerTestCase): def setUp(self): super(TestCallsForCommentsPage, self).setUp() self.fx = dbfixture.data(CallFor...
from tests import PMGLiveServerTestCase from tests.fixtures import dbfixture, CallForCommentData import urllib.request, urllib.error, urllib.parse class TestCallsForCommentsPage(PMGLiveServerTestCase): def setUp(self): super(TestCallsForCommentsPage, self).setUp() self.fx = dbfixture.data(CallFor...
<commit_before>from tests import PMGLiveServerTestCase from tests.fixtures import dbfixture, CallForCommentData import urllib.request, urllib.error, urllib.parse class TestCallsForCommentsPage(PMGLiveServerTestCase): def setUp(self): super(TestCallsForCommentsPage, self).setUp() self.fx = dbfixtu...
fcf3511a586b5efe4a86674ccd4c80c67ec2ed14
tracker/src/main/tracker/util/connection.py
tracker/src/main/tracker/util/connection.py
import os from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import sessionmaker from sqlalchemy import create_engine from sqlalchemy.orm.scoping import scoped_session DB_URL = os.environ['DB_URL'] Base = automap_base() engine = create_engine(DB_URL) Base.prepare(engine, reflect=True) session_factor...
import os from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import sessionmaker from sqlalchemy import create_engine from sqlalchemy.orm.scoping import scoped_session DB_URL = os.environ['DB_URL'] if not DB_URL: raise ValueError("DB_URL not present in the environment") Base = automap_base() en...
Test for DB_URL being present in environment.
Test for DB_URL being present in environment.
Python
mit
llevar/germline-regenotyper,llevar/germline-regenotyper
import os from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import sessionmaker from sqlalchemy import create_engine from sqlalchemy.orm.scoping import scoped_session DB_URL = os.environ['DB_URL'] Base = automap_base() engine = create_engine(DB_URL) Base.prepare(engine, reflect=True) session_factor...
import os from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import sessionmaker from sqlalchemy import create_engine from sqlalchemy.orm.scoping import scoped_session DB_URL = os.environ['DB_URL'] if not DB_URL: raise ValueError("DB_URL not present in the environment") Base = automap_base() en...
<commit_before>import os from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import sessionmaker from sqlalchemy import create_engine from sqlalchemy.orm.scoping import scoped_session DB_URL = os.environ['DB_URL'] Base = automap_base() engine = create_engine(DB_URL) Base.prepare(engine, reflect=True) ...
import os from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import sessionmaker from sqlalchemy import create_engine from sqlalchemy.orm.scoping import scoped_session DB_URL = os.environ['DB_URL'] if not DB_URL: raise ValueError("DB_URL not present in the environment") Base = automap_base() en...
import os from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import sessionmaker from sqlalchemy import create_engine from sqlalchemy.orm.scoping import scoped_session DB_URL = os.environ['DB_URL'] Base = automap_base() engine = create_engine(DB_URL) Base.prepare(engine, reflect=True) session_factor...
<commit_before>import os from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import sessionmaker from sqlalchemy import create_engine from sqlalchemy.orm.scoping import scoped_session DB_URL = os.environ['DB_URL'] Base = automap_base() engine = create_engine(DB_URL) Base.prepare(engine, reflect=True) ...
9339e0bd1197f8d599309eaff66b83c38721ab29
conference/management/commands/add_invoices_for_zero_amount_orders.py
conference/management/commands/add_invoices_for_zero_amount_orders.py
# -*- coding: UTF-8 -*- from __future__ import print_function from django.core.management.base import BaseCommand from assopy import models as amodels def generate_invoices_for_zero_amount_orders_for_year(year): orders = amodels.Order.objects.filter( created__year=year, method='bank', ) ...
# -*- coding: UTF-8 -*- from __future__ import print_function from django.core.management.base import BaseCommand from assopy import models as amodels def generate_invoices_for_zero_amount_orders_for_year(year): orders = amodels.Order.objects.filter( created__year=year, method='bank', ) ...
Make sure that only zero amount orders are modified.
Make sure that only zero amount orders are modified. Note really necessary, since we don't have real bank orders, but better safe than sorry.
Python
bsd-2-clause
EuroPython/epcon,EuroPython/epcon,EuroPython/epcon,EuroPython/epcon
# -*- coding: UTF-8 -*- from __future__ import print_function from django.core.management.base import BaseCommand from assopy import models as amodels def generate_invoices_for_zero_amount_orders_for_year(year): orders = amodels.Order.objects.filter( created__year=year, method='bank', ) ...
# -*- coding: UTF-8 -*- from __future__ import print_function from django.core.management.base import BaseCommand from assopy import models as amodels def generate_invoices_for_zero_amount_orders_for_year(year): orders = amodels.Order.objects.filter( created__year=year, method='bank', ) ...
<commit_before># -*- coding: UTF-8 -*- from __future__ import print_function from django.core.management.base import BaseCommand from assopy import models as amodels def generate_invoices_for_zero_amount_orders_for_year(year): orders = amodels.Order.objects.filter( created__year=year, method='bank...
# -*- coding: UTF-8 -*- from __future__ import print_function from django.core.management.base import BaseCommand from assopy import models as amodels def generate_invoices_for_zero_amount_orders_for_year(year): orders = amodels.Order.objects.filter( created__year=year, method='bank', ) ...
# -*- coding: UTF-8 -*- from __future__ import print_function from django.core.management.base import BaseCommand from assopy import models as amodels def generate_invoices_for_zero_amount_orders_for_year(year): orders = amodels.Order.objects.filter( created__year=year, method='bank', ) ...
<commit_before># -*- coding: UTF-8 -*- from __future__ import print_function from django.core.management.base import BaseCommand from assopy import models as amodels def generate_invoices_for_zero_amount_orders_for_year(year): orders = amodels.Order.objects.filter( created__year=year, method='bank...
7b01e17c03893f5a6470cdbac00948e95c216d45
keeper/exceptions.py
keeper/exceptions.py
"""Custom exceptions.""" __all__ = [ "ValidationError", "Route53Error", "S3Error", "FastlyError", "DasherError", ] class ValidationError(ValueError): """Use a ValidationError whenever a API user provides bad input for PUT, POST, or PATCH requests. """ class Route53Error(Exception): ...
"""Custom exceptions.""" __all__ = [ "ValidationError", "Route53Error", "S3Error", "FastlyError", "DasherError", ] class ValidationError(ValueError): """Use a ValidationError whenever a API user provides bad input for PUT, POST, or PATCH requests. """ class Route53Error(Exception): ...
Fix comment bug caught by latest black
Fix comment bug caught by latest black There were four open quotes instead of the intended three.
Python
mit
lsst-sqre/ltd-keeper,lsst-sqre/ltd-keeper
"""Custom exceptions.""" __all__ = [ "ValidationError", "Route53Error", "S3Error", "FastlyError", "DasherError", ] class ValidationError(ValueError): """Use a ValidationError whenever a API user provides bad input for PUT, POST, or PATCH requests. """ class Route53Error(Exception): ...
"""Custom exceptions.""" __all__ = [ "ValidationError", "Route53Error", "S3Error", "FastlyError", "DasherError", ] class ValidationError(ValueError): """Use a ValidationError whenever a API user provides bad input for PUT, POST, or PATCH requests. """ class Route53Error(Exception): ...
<commit_before>"""Custom exceptions.""" __all__ = [ "ValidationError", "Route53Error", "S3Error", "FastlyError", "DasherError", ] class ValidationError(ValueError): """Use a ValidationError whenever a API user provides bad input for PUT, POST, or PATCH requests. """ class Route53Err...
"""Custom exceptions.""" __all__ = [ "ValidationError", "Route53Error", "S3Error", "FastlyError", "DasherError", ] class ValidationError(ValueError): """Use a ValidationError whenever a API user provides bad input for PUT, POST, or PATCH requests. """ class Route53Error(Exception): ...
"""Custom exceptions.""" __all__ = [ "ValidationError", "Route53Error", "S3Error", "FastlyError", "DasherError", ] class ValidationError(ValueError): """Use a ValidationError whenever a API user provides bad input for PUT, POST, or PATCH requests. """ class Route53Error(Exception): ...
<commit_before>"""Custom exceptions.""" __all__ = [ "ValidationError", "Route53Error", "S3Error", "FastlyError", "DasherError", ] class ValidationError(ValueError): """Use a ValidationError whenever a API user provides bad input for PUT, POST, or PATCH requests. """ class Route53Err...
6bb43304fe08d299eadbd4977aa5db1f26eb90ce
build_tools/preseed_home.py
build_tools/preseed_home.py
import os import shutil import tempfile temphome = tempfile.mkdtemp() os.environ["KOLIBRI_HOME"] = temphome from kolibri.main import initialize # noqa E402 from kolibri.deployment.default.sqlite_db_names import ( # noqa E402 ADDITIONAL_SQLITE_DATABASES, ) from django.core.management import call_command # noqa ...
import os import shutil import tempfile temphome = tempfile.mkdtemp() os.environ["KOLIBRI_HOME"] = temphome from kolibri.main import initialize # noqa E402 from kolibri.deployment.default.sqlite_db_names import ( # noqa E402 ADDITIONAL_SQLITE_DATABASES, ) from django.conf import settings # noqa E402 from djang...
Make database preseeding sensitive to custom build options.
Make database preseeding sensitive to custom build options.
Python
mit
learningequality/kolibri,learningequality/kolibri,learningequality/kolibri,learningequality/kolibri
import os import shutil import tempfile temphome = tempfile.mkdtemp() os.environ["KOLIBRI_HOME"] = temphome from kolibri.main import initialize # noqa E402 from kolibri.deployment.default.sqlite_db_names import ( # noqa E402 ADDITIONAL_SQLITE_DATABASES, ) from django.core.management import call_command # noqa ...
import os import shutil import tempfile temphome = tempfile.mkdtemp() os.environ["KOLIBRI_HOME"] = temphome from kolibri.main import initialize # noqa E402 from kolibri.deployment.default.sqlite_db_names import ( # noqa E402 ADDITIONAL_SQLITE_DATABASES, ) from django.conf import settings # noqa E402 from djang...
<commit_before>import os import shutil import tempfile temphome = tempfile.mkdtemp() os.environ["KOLIBRI_HOME"] = temphome from kolibri.main import initialize # noqa E402 from kolibri.deployment.default.sqlite_db_names import ( # noqa E402 ADDITIONAL_SQLITE_DATABASES, ) from django.core.management import call_c...
import os import shutil import tempfile temphome = tempfile.mkdtemp() os.environ["KOLIBRI_HOME"] = temphome from kolibri.main import initialize # noqa E402 from kolibri.deployment.default.sqlite_db_names import ( # noqa E402 ADDITIONAL_SQLITE_DATABASES, ) from django.conf import settings # noqa E402 from djang...
import os import shutil import tempfile temphome = tempfile.mkdtemp() os.environ["KOLIBRI_HOME"] = temphome from kolibri.main import initialize # noqa E402 from kolibri.deployment.default.sqlite_db_names import ( # noqa E402 ADDITIONAL_SQLITE_DATABASES, ) from django.core.management import call_command # noqa ...
<commit_before>import os import shutil import tempfile temphome = tempfile.mkdtemp() os.environ["KOLIBRI_HOME"] = temphome from kolibri.main import initialize # noqa E402 from kolibri.deployment.default.sqlite_db_names import ( # noqa E402 ADDITIONAL_SQLITE_DATABASES, ) from django.core.management import call_c...
d559edb42f7a60958a4861e1cdb504e658f5f279
python2/setup.py
python2/setup.py
#!/usr/bin/env python from distutils.core import setup setup(name='futures', version='1.0', description='Java-style futures implementation in Python 2.x', author='Brian Quinlan', author_email='brian@sweetapp.com', url='http://code.google.com/p/pythonfutures', download_url='http://p...
#!/usr/bin/env python from distutils.core import setup setup(name='futures', version='2.0', description='Java-style futures implementation in Python 2.x', author='Brian Quinlan', author_email='brian@sweetapp.com', url='http://code.google.com/p/pythonfutures', download_url='http://p...
Bump version number for Python 3.2-matching release
Bump version number for Python 3.2-matching release
Python
bsd-2-clause
danielj7/pythonfutures,danielj7/pythonfutures
#!/usr/bin/env python from distutils.core import setup setup(name='futures', version='1.0', description='Java-style futures implementation in Python 2.x', author='Brian Quinlan', author_email='brian@sweetapp.com', url='http://code.google.com/p/pythonfutures', download_url='http://p...
#!/usr/bin/env python from distutils.core import setup setup(name='futures', version='2.0', description='Java-style futures implementation in Python 2.x', author='Brian Quinlan', author_email='brian@sweetapp.com', url='http://code.google.com/p/pythonfutures', download_url='http://p...
<commit_before>#!/usr/bin/env python from distutils.core import setup setup(name='futures', version='1.0', description='Java-style futures implementation in Python 2.x', author='Brian Quinlan', author_email='brian@sweetapp.com', url='http://code.google.com/p/pythonfutures', downloa...
#!/usr/bin/env python from distutils.core import setup setup(name='futures', version='2.0', description='Java-style futures implementation in Python 2.x', author='Brian Quinlan', author_email='brian@sweetapp.com', url='http://code.google.com/p/pythonfutures', download_url='http://p...
#!/usr/bin/env python from distutils.core import setup setup(name='futures', version='1.0', description='Java-style futures implementation in Python 2.x', author='Brian Quinlan', author_email='brian@sweetapp.com', url='http://code.google.com/p/pythonfutures', download_url='http://p...
<commit_before>#!/usr/bin/env python from distutils.core import setup setup(name='futures', version='1.0', description='Java-style futures implementation in Python 2.x', author='Brian Quinlan', author_email='brian@sweetapp.com', url='http://code.google.com/p/pythonfutures', downloa...
53331e43c2a95f45aaaa91f2c0fe204fd4d8d530
keras/constraints.py
keras/constraints.py
from __future__ import absolute_import import theano import theano.tensor as T import numpy as np class Constraint(object): def __call__(self, p): return p def get_config(self): return {"name":self.__class__.__name__} class MaxNorm(Constraint): def __init__(self, m=2): self.m = m ...
from __future__ import absolute_import import theano import theano.tensor as T import numpy as np class Constraint(object): def __call__(self, p): return p def get_config(self): return {"name":self.__class__.__name__} class MaxNorm(Constraint): def __init__(self, m=2): self.m = m ...
Allow constraint getter to take parameter dict
Allow constraint getter to take parameter dict
Python
mit
rudaoshi/keras,mikekestemont/keras,jonberliner/keras,xurantju/keras,Aureliu/keras,DLlearn/keras,cvfish/keras,stephenbalaban/keras,chenych11/keras,fmacias64/keras,kuza55/keras,ashhher3/keras,sjuvekar/keras,OlafLee/keras,keskarnitish/keras,iamtrask/keras,wubr2000/keras,rlkelly/keras,saurav111/keras,johmathe/keras,untom/k...
from __future__ import absolute_import import theano import theano.tensor as T import numpy as np class Constraint(object): def __call__(self, p): return p def get_config(self): return {"name":self.__class__.__name__} class MaxNorm(Constraint): def __init__(self, m=2): self.m = m ...
from __future__ import absolute_import import theano import theano.tensor as T import numpy as np class Constraint(object): def __call__(self, p): return p def get_config(self): return {"name":self.__class__.__name__} class MaxNorm(Constraint): def __init__(self, m=2): self.m = m ...
<commit_before>from __future__ import absolute_import import theano import theano.tensor as T import numpy as np class Constraint(object): def __call__(self, p): return p def get_config(self): return {"name":self.__class__.__name__} class MaxNorm(Constraint): def __init__(self, m=2): ...
from __future__ import absolute_import import theano import theano.tensor as T import numpy as np class Constraint(object): def __call__(self, p): return p def get_config(self): return {"name":self.__class__.__name__} class MaxNorm(Constraint): def __init__(self, m=2): self.m = m ...
from __future__ import absolute_import import theano import theano.tensor as T import numpy as np class Constraint(object): def __call__(self, p): return p def get_config(self): return {"name":self.__class__.__name__} class MaxNorm(Constraint): def __init__(self, m=2): self.m = m ...
<commit_before>from __future__ import absolute_import import theano import theano.tensor as T import numpy as np class Constraint(object): def __call__(self, p): return p def get_config(self): return {"name":self.__class__.__name__} class MaxNorm(Constraint): def __init__(self, m=2): ...
461dc9a54ae2eb8bc5f1a07557130d5251187573
install_deps.py
install_deps.py
#!/usr/bin/env python """ Install the packages you have listed in the requirements file you input as first argument. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import fileinput import subprocess from pip.req import parse_requirements ...
#!/usr/bin/env python """ Install the packages you have listed in the requirements file you input as first argument. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import fileinput import subprocess from pip.req import parse_requirements ...
Correct for None appearing in requirements list
Correct for None appearing in requirements list
Python
bsd-3-clause
Neurita/boyle
#!/usr/bin/env python """ Install the packages you have listed in the requirements file you input as first argument. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import fileinput import subprocess from pip.req import parse_requirements ...
#!/usr/bin/env python """ Install the packages you have listed in the requirements file you input as first argument. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import fileinput import subprocess from pip.req import parse_requirements ...
<commit_before>#!/usr/bin/env python """ Install the packages you have listed in the requirements file you input as first argument. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import fileinput import subprocess from pip.req import parse...
#!/usr/bin/env python """ Install the packages you have listed in the requirements file you input as first argument. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import fileinput import subprocess from pip.req import parse_requirements ...
#!/usr/bin/env python """ Install the packages you have listed in the requirements file you input as first argument. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import fileinput import subprocess from pip.req import parse_requirements ...
<commit_before>#!/usr/bin/env python """ Install the packages you have listed in the requirements file you input as first argument. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import fileinput import subprocess from pip.req import parse...
60abdfa788ef40b5bbd34ea3e332089b86b61c88
robokassa/migrations/0003_load_source_type.py
robokassa/migrations/0003_load_source_type.py
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): "Write your forwards methods here." # Note: Remember to use orm['appname.ModelName'] rather than "from appname.mo...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): pass def backwards(self, orm): pass models = { u'robokassa.successnotification': { ...
Remove code that depends on a current model state.
Remove code that depends on a current model state.
Python
mit
a-iv/django-oscar-robokassa
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): "Write your forwards methods here." # Note: Remember to use orm['appname.ModelName'] rather than "from appname.mo...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): pass def backwards(self, orm): pass models = { u'robokassa.successnotification': { ...
<commit_before># -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): "Write your forwards methods here." # Note: Remember to use orm['appname.ModelName'] rather than "...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): pass def backwards(self, orm): pass models = { u'robokassa.successnotification': { ...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): "Write your forwards methods here." # Note: Remember to use orm['appname.ModelName'] rather than "from appname.mo...
<commit_before># -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): "Write your forwards methods here." # Note: Remember to use orm['appname.ModelName'] rather than "...
f4a919b698788dcec8411665290a83537e962413
django_alexa/api/fields.py
django_alexa/api/fields.py
'''These are the only serializer fields support by the Alexa skills kit''' from rest_framework.serializers import CharField, IntegerField, DateField, TimeField, DurationField, ChoiceField # flake8: noqa # This maps serializer fields to the amazon intent slot types INTENT_SLOT_TYPES = { "CharField": "AMAZON.LITERAL...
'''These are the only serializer fields support by the Alexa skills kit''' from rest_framework.serializers import CharField, IntegerField, DateField, TimeField, DurationField, ChoiceField # flake8: noqa # This maps serializer fields to the amazon intent slot types INTENT_SLOT_TYPES = { "CharField": "AMAZON.LITERAL...
Add support for new slot types
Add support for new slot types
Python
mit
rocktavious/django-alexa,pycontribs/django-alexa
'''These are the only serializer fields support by the Alexa skills kit''' from rest_framework.serializers import CharField, IntegerField, DateField, TimeField, DurationField, ChoiceField # flake8: noqa # This maps serializer fields to the amazon intent slot types INTENT_SLOT_TYPES = { "CharField": "AMAZON.LITERAL...
'''These are the only serializer fields support by the Alexa skills kit''' from rest_framework.serializers import CharField, IntegerField, DateField, TimeField, DurationField, ChoiceField # flake8: noqa # This maps serializer fields to the amazon intent slot types INTENT_SLOT_TYPES = { "CharField": "AMAZON.LITERAL...
<commit_before>'''These are the only serializer fields support by the Alexa skills kit''' from rest_framework.serializers import CharField, IntegerField, DateField, TimeField, DurationField, ChoiceField # flake8: noqa # This maps serializer fields to the amazon intent slot types INTENT_SLOT_TYPES = { "CharField": ...
'''These are the only serializer fields support by the Alexa skills kit''' from rest_framework.serializers import CharField, IntegerField, DateField, TimeField, DurationField, ChoiceField # flake8: noqa # This maps serializer fields to the amazon intent slot types INTENT_SLOT_TYPES = { "CharField": "AMAZON.LITERAL...
'''These are the only serializer fields support by the Alexa skills kit''' from rest_framework.serializers import CharField, IntegerField, DateField, TimeField, DurationField, ChoiceField # flake8: noqa # This maps serializer fields to the amazon intent slot types INTENT_SLOT_TYPES = { "CharField": "AMAZON.LITERAL...
<commit_before>'''These are the only serializer fields support by the Alexa skills kit''' from rest_framework.serializers import CharField, IntegerField, DateField, TimeField, DurationField, ChoiceField # flake8: noqa # This maps serializer fields to the amazon intent slot types INTENT_SLOT_TYPES = { "CharField": ...
f908501860858311536a3fef03fda7a632ce5412
djohno/tests/test_utils.py
djohno/tests/test_utils.py
from django.core.exceptions import ValidationError from django.test import TestCase import djohno from djohno.utils import ( is_pretty_from_address, get_app_versions ) class DjohnoUtilTests(TestCase): def test_is_pretty_from_address_fails_on_bare_address(self): """ Ensure normal email addr...
from django.core.exceptions import ValidationError from django.test import TestCase import djohno from djohno.utils import ( is_pretty_from_address, get_app_versions ) class DjohnoUtilTests(TestCase): def test_is_pretty_from_address_fails_on_bare_address(self): """ Ensure normal email addr...
Add a missing test description
Add a missing test description
Python
bsd-2-clause
dominicrodger/djohno,dominicrodger/djohno
from django.core.exceptions import ValidationError from django.test import TestCase import djohno from djohno.utils import ( is_pretty_from_address, get_app_versions ) class DjohnoUtilTests(TestCase): def test_is_pretty_from_address_fails_on_bare_address(self): """ Ensure normal email addr...
from django.core.exceptions import ValidationError from django.test import TestCase import djohno from djohno.utils import ( is_pretty_from_address, get_app_versions ) class DjohnoUtilTests(TestCase): def test_is_pretty_from_address_fails_on_bare_address(self): """ Ensure normal email addr...
<commit_before>from django.core.exceptions import ValidationError from django.test import TestCase import djohno from djohno.utils import ( is_pretty_from_address, get_app_versions ) class DjohnoUtilTests(TestCase): def test_is_pretty_from_address_fails_on_bare_address(self): """ Ensure no...
from django.core.exceptions import ValidationError from django.test import TestCase import djohno from djohno.utils import ( is_pretty_from_address, get_app_versions ) class DjohnoUtilTests(TestCase): def test_is_pretty_from_address_fails_on_bare_address(self): """ Ensure normal email addr...
from django.core.exceptions import ValidationError from django.test import TestCase import djohno from djohno.utils import ( is_pretty_from_address, get_app_versions ) class DjohnoUtilTests(TestCase): def test_is_pretty_from_address_fails_on_bare_address(self): """ Ensure normal email addr...
<commit_before>from django.core.exceptions import ValidationError from django.test import TestCase import djohno from djohno.utils import ( is_pretty_from_address, get_app_versions ) class DjohnoUtilTests(TestCase): def test_is_pretty_from_address_fails_on_bare_address(self): """ Ensure no...
3a3d1f5b2c376de3e979aa17d11505dc66421852
test_journal.py
test_journal.py
# -*- coding: utf-8 -*- from contextlib import closing import pytest from journal import app from journal import connect_db from journal import get_database_connection from journal import init_db TEST_DSN = 'dbname=test_learning_journal' def clear_db(): with closing(connect_db()) as db: db.cursor().exec...
# -*- coding: utf-8 -*- from contextlib import closing import pytest from journal import app from journal import connect_db from journal import get_database_connection from journal import init_db TEST_DSN = 'dbname=test_learning_journal' def clear_db(): with closing(connect_db()) as db: db.cursor().exec...
Add db() to initialize a table and drop when finished
Add db() to initialize a table and drop when finished
Python
mit
sazlin/learning_journal
# -*- coding: utf-8 -*- from contextlib import closing import pytest from journal import app from journal import connect_db from journal import get_database_connection from journal import init_db TEST_DSN = 'dbname=test_learning_journal' def clear_db(): with closing(connect_db()) as db: db.cursor().exec...
# -*- coding: utf-8 -*- from contextlib import closing import pytest from journal import app from journal import connect_db from journal import get_database_connection from journal import init_db TEST_DSN = 'dbname=test_learning_journal' def clear_db(): with closing(connect_db()) as db: db.cursor().exec...
<commit_before># -*- coding: utf-8 -*- from contextlib import closing import pytest from journal import app from journal import connect_db from journal import get_database_connection from journal import init_db TEST_DSN = 'dbname=test_learning_journal' def clear_db(): with closing(connect_db()) as db: d...
# -*- coding: utf-8 -*- from contextlib import closing import pytest from journal import app from journal import connect_db from journal import get_database_connection from journal import init_db TEST_DSN = 'dbname=test_learning_journal' def clear_db(): with closing(connect_db()) as db: db.cursor().exec...
# -*- coding: utf-8 -*- from contextlib import closing import pytest from journal import app from journal import connect_db from journal import get_database_connection from journal import init_db TEST_DSN = 'dbname=test_learning_journal' def clear_db(): with closing(connect_db()) as db: db.cursor().exec...
<commit_before># -*- coding: utf-8 -*- from contextlib import closing import pytest from journal import app from journal import connect_db from journal import get_database_connection from journal import init_db TEST_DSN = 'dbname=test_learning_journal' def clear_db(): with closing(connect_db()) as db: d...
557fddcf26ef52ccea3761b000e5a94e3f551a78
pygraphc/optimization/SimulatedAnnealing.py
pygraphc/optimization/SimulatedAnnealing.py
from random import choice from pygraphc.evaluation.InternalEvaluation import InternalEvaluation class SimulatedAnnealing(object): def __init__(self, method, tmin, tmax, parameter, energy_type): """The constructor of Simulated Annealing method. Parameters ---------- method : s...
from random import choice from pygraphc.evaluation.InternalEvaluation import InternalEvaluation class SimulatedAnnealing(object): def __init__(self, tmin, tmax, alpha, parameters, energy_type, max_iteration): """The constructor of Simulated Annealing method. Parameters ---------- ...
Edit the parameters. Not fix yet
Edit the parameters. Not fix yet
Python
mit
studiawan/pygraphc
from random import choice from pygraphc.evaluation.InternalEvaluation import InternalEvaluation class SimulatedAnnealing(object): def __init__(self, method, tmin, tmax, parameter, energy_type): """The constructor of Simulated Annealing method. Parameters ---------- method : s...
from random import choice from pygraphc.evaluation.InternalEvaluation import InternalEvaluation class SimulatedAnnealing(object): def __init__(self, tmin, tmax, alpha, parameters, energy_type, max_iteration): """The constructor of Simulated Annealing method. Parameters ---------- ...
<commit_before>from random import choice from pygraphc.evaluation.InternalEvaluation import InternalEvaluation class SimulatedAnnealing(object): def __init__(self, method, tmin, tmax, parameter, energy_type): """The constructor of Simulated Annealing method. Parameters ---------- ...
from random import choice from pygraphc.evaluation.InternalEvaluation import InternalEvaluation class SimulatedAnnealing(object): def __init__(self, tmin, tmax, alpha, parameters, energy_type, max_iteration): """The constructor of Simulated Annealing method. Parameters ---------- ...
from random import choice from pygraphc.evaluation.InternalEvaluation import InternalEvaluation class SimulatedAnnealing(object): def __init__(self, method, tmin, tmax, parameter, energy_type): """The constructor of Simulated Annealing method. Parameters ---------- method : s...
<commit_before>from random import choice from pygraphc.evaluation.InternalEvaluation import InternalEvaluation class SimulatedAnnealing(object): def __init__(self, method, tmin, tmax, parameter, energy_type): """The constructor of Simulated Annealing method. Parameters ---------- ...
7d7dd781500328c0160ac59affc150f9323ee35d
examples/jupyter-output-area/server.py
examples/jupyter-output-area/server.py
#!/usr/bin/env python2 from SimpleHTTPServer import SimpleHTTPRequestHandler import BaseHTTPServer class CORSRequestHandler( SimpleHTTPRequestHandler ): def end_headers( self ): self.send_header( 'Access-Control-Allow-Origin', '*' ) SimpleHTTPRequestHandler.end_headers(self) if __name__ == '__main...
try: from http.server import SimpleHTTPRequestHandler import http.server as BaseHTTPServer except ImportError: from SimpleHTTPServer import SimpleHTTPRequestHandler import BaseHTTPServer class CORSRequestHandler( SimpleHTTPRequestHandler ): def end_headers( self ): self.send_header( 'Acces...
Add python3 support to stop Steve whinging
Add python3 support to stop Steve whinging
Python
bsd-3-clause
dwillmer/playground,dwillmer/playground,dwillmer/playground
#!/usr/bin/env python2 from SimpleHTTPServer import SimpleHTTPRequestHandler import BaseHTTPServer class CORSRequestHandler( SimpleHTTPRequestHandler ): def end_headers( self ): self.send_header( 'Access-Control-Allow-Origin', '*' ) SimpleHTTPRequestHandler.end_headers(self) if __name__ == '__main...
try: from http.server import SimpleHTTPRequestHandler import http.server as BaseHTTPServer except ImportError: from SimpleHTTPServer import SimpleHTTPRequestHandler import BaseHTTPServer class CORSRequestHandler( SimpleHTTPRequestHandler ): def end_headers( self ): self.send_header( 'Acces...
<commit_before>#!/usr/bin/env python2 from SimpleHTTPServer import SimpleHTTPRequestHandler import BaseHTTPServer class CORSRequestHandler( SimpleHTTPRequestHandler ): def end_headers( self ): self.send_header( 'Access-Control-Allow-Origin', '*' ) SimpleHTTPRequestHandler.end_headers(self) if __na...
try: from http.server import SimpleHTTPRequestHandler import http.server as BaseHTTPServer except ImportError: from SimpleHTTPServer import SimpleHTTPRequestHandler import BaseHTTPServer class CORSRequestHandler( SimpleHTTPRequestHandler ): def end_headers( self ): self.send_header( 'Acces...
#!/usr/bin/env python2 from SimpleHTTPServer import SimpleHTTPRequestHandler import BaseHTTPServer class CORSRequestHandler( SimpleHTTPRequestHandler ): def end_headers( self ): self.send_header( 'Access-Control-Allow-Origin', '*' ) SimpleHTTPRequestHandler.end_headers(self) if __name__ == '__main...
<commit_before>#!/usr/bin/env python2 from SimpleHTTPServer import SimpleHTTPRequestHandler import BaseHTTPServer class CORSRequestHandler( SimpleHTTPRequestHandler ): def end_headers( self ): self.send_header( 'Access-Control-Allow-Origin', '*' ) SimpleHTTPRequestHandler.end_headers(self) if __na...
9dee48fb0964b12780f57cef26c5b84072448232
ds/api/serializer/app.py
ds/api/serializer/app.py
from __future__ import absolute_import from ds.models import App from .base import Serializer from .manager import add @add(App) class AppSerializer(Serializer): def serialize(self, item, attrs): return { 'id': str(item.id), 'name': item.name, }
from __future__ import absolute_import from ds.models import App from .base import Serializer from .manager import add @add(App) class AppSerializer(Serializer): def serialize(self, item, attrs): return { 'id': str(item.id), 'name': item.name, 'provider': item.provide...
Add provider information to App
Add provider information to App
Python
apache-2.0
jkimbo/freight,rshk/freight,jkimbo/freight,getsentry/freight,jkimbo/freight,rshk/freight,klynton/freight,rshk/freight,getsentry/freight,klynton/freight,getsentry/freight,rshk/freight,klynton/freight,getsentry/freight,getsentry/freight,jkimbo/freight,klynton/freight
from __future__ import absolute_import from ds.models import App from .base import Serializer from .manager import add @add(App) class AppSerializer(Serializer): def serialize(self, item, attrs): return { 'id': str(item.id), 'name': item.name, } Add provider information t...
from __future__ import absolute_import from ds.models import App from .base import Serializer from .manager import add @add(App) class AppSerializer(Serializer): def serialize(self, item, attrs): return { 'id': str(item.id), 'name': item.name, 'provider': item.provide...
<commit_before>from __future__ import absolute_import from ds.models import App from .base import Serializer from .manager import add @add(App) class AppSerializer(Serializer): def serialize(self, item, attrs): return { 'id': str(item.id), 'name': item.name, } <commit_msg...
from __future__ import absolute_import from ds.models import App from .base import Serializer from .manager import add @add(App) class AppSerializer(Serializer): def serialize(self, item, attrs): return { 'id': str(item.id), 'name': item.name, 'provider': item.provide...
from __future__ import absolute_import from ds.models import App from .base import Serializer from .manager import add @add(App) class AppSerializer(Serializer): def serialize(self, item, attrs): return { 'id': str(item.id), 'name': item.name, } Add provider information t...
<commit_before>from __future__ import absolute_import from ds.models import App from .base import Serializer from .manager import add @add(App) class AppSerializer(Serializer): def serialize(self, item, attrs): return { 'id': str(item.id), 'name': item.name, } <commit_msg...
169d34c179a0878383edd7e2c4ba8f80aaabc7c8
zendesk_tickets_machine/tickets/services.py
zendesk_tickets_machine/tickets/services.py
import datetime from django.utils.timezone import utc from .models import Ticket class TicketServices(): def edit_ticket_once(self, **kwargs): id_list = kwargs.get('id_list') edit_tags = kwargs.get('edit_tags') edit_requester = kwargs.get('edit_requester') edit_subject = kwargs.g...
import datetime from django.utils.timezone import utc from .models import Ticket class TicketServices(): def edit_ticket_once(self, **kwargs): id_list = kwargs.get('id_list') edit_tags = kwargs.get('edit_tags') edit_requester = kwargs.get('edit_requester') edit_subject = kwargs.g...
Adjust code style to reduce lines of code :bear:
Adjust code style to reduce lines of code :bear:
Python
mit
prontotools/zendesk-tickets-machine,prontotools/zendesk-tickets-machine,prontotools/zendesk-tickets-machine,prontotools/zendesk-tickets-machine
import datetime from django.utils.timezone import utc from .models import Ticket class TicketServices(): def edit_ticket_once(self, **kwargs): id_list = kwargs.get('id_list') edit_tags = kwargs.get('edit_tags') edit_requester = kwargs.get('edit_requester') edit_subject = kwargs.g...
import datetime from django.utils.timezone import utc from .models import Ticket class TicketServices(): def edit_ticket_once(self, **kwargs): id_list = kwargs.get('id_list') edit_tags = kwargs.get('edit_tags') edit_requester = kwargs.get('edit_requester') edit_subject = kwargs.g...
<commit_before>import datetime from django.utils.timezone import utc from .models import Ticket class TicketServices(): def edit_ticket_once(self, **kwargs): id_list = kwargs.get('id_list') edit_tags = kwargs.get('edit_tags') edit_requester = kwargs.get('edit_requester') edit_sub...
import datetime from django.utils.timezone import utc from .models import Ticket class TicketServices(): def edit_ticket_once(self, **kwargs): id_list = kwargs.get('id_list') edit_tags = kwargs.get('edit_tags') edit_requester = kwargs.get('edit_requester') edit_subject = kwargs.g...
import datetime from django.utils.timezone import utc from .models import Ticket class TicketServices(): def edit_ticket_once(self, **kwargs): id_list = kwargs.get('id_list') edit_tags = kwargs.get('edit_tags') edit_requester = kwargs.get('edit_requester') edit_subject = kwargs.g...
<commit_before>import datetime from django.utils.timezone import utc from .models import Ticket class TicketServices(): def edit_ticket_once(self, **kwargs): id_list = kwargs.get('id_list') edit_tags = kwargs.get('edit_tags') edit_requester = kwargs.get('edit_requester') edit_sub...
6879ea37aaee51b7144234f855e0f4ff9fe0dd2c
models.py
models.py
import re class Phage: supported_databases = { # European Nucleotide Archive phage database "ENA": "^gi\|[0-9]+\|ref\|([^\|]+)\|\ ([^,]+)[^$]*$", # National Center for Biotechnology Information phage database "NCBI": "^ENA\|([^\|]+)\|[^\ ]+\ ([^,]+)[^$]*$", # Actinobacteriophage Database "A...
import re class Phage: supported_databases = { # European Nucleotide Archive phage database "ENA": r"^gi\|[0-9]+\|ref\|([^\|]+)\|\ ([^,]+)[^$]*$", # National Center for Biotechnology Information phage database "NCBI": r"^ENA\|([^\|]+)\|[^\ ]+\ ([^,]+)[^$]*$", # Actinobacteriophage Database ...
Use raw strings for regexes.
Use raw strings for regexes.
Python
mit
goyalsid/phageParser,phageParser/phageParser,phageParser/phageParser,mbonsma/phageParser,goyalsid/phageParser,phageParser/phageParser,mbonsma/phageParser,phageParser/phageParser,goyalsid/phageParser,mbonsma/phageParser,mbonsma/phageParser
import re class Phage: supported_databases = { # European Nucleotide Archive phage database "ENA": "^gi\|[0-9]+\|ref\|([^\|]+)\|\ ([^,]+)[^$]*$", # National Center for Biotechnology Information phage database "NCBI": "^ENA\|([^\|]+)\|[^\ ]+\ ([^,]+)[^$]*$", # Actinobacteriophage Database "A...
import re class Phage: supported_databases = { # European Nucleotide Archive phage database "ENA": r"^gi\|[0-9]+\|ref\|([^\|]+)\|\ ([^,]+)[^$]*$", # National Center for Biotechnology Information phage database "NCBI": r"^ENA\|([^\|]+)\|[^\ ]+\ ([^,]+)[^$]*$", # Actinobacteriophage Database ...
<commit_before>import re class Phage: supported_databases = { # European Nucleotide Archive phage database "ENA": "^gi\|[0-9]+\|ref\|([^\|]+)\|\ ([^,]+)[^$]*$", # National Center for Biotechnology Information phage database "NCBI": "^ENA\|([^\|]+)\|[^\ ]+\ ([^,]+)[^$]*$", # Actinobacteriophage ...
import re class Phage: supported_databases = { # European Nucleotide Archive phage database "ENA": r"^gi\|[0-9]+\|ref\|([^\|]+)\|\ ([^,]+)[^$]*$", # National Center for Biotechnology Information phage database "NCBI": r"^ENA\|([^\|]+)\|[^\ ]+\ ([^,]+)[^$]*$", # Actinobacteriophage Database ...
import re class Phage: supported_databases = { # European Nucleotide Archive phage database "ENA": "^gi\|[0-9]+\|ref\|([^\|]+)\|\ ([^,]+)[^$]*$", # National Center for Biotechnology Information phage database "NCBI": "^ENA\|([^\|]+)\|[^\ ]+\ ([^,]+)[^$]*$", # Actinobacteriophage Database "A...
<commit_before>import re class Phage: supported_databases = { # European Nucleotide Archive phage database "ENA": "^gi\|[0-9]+\|ref\|([^\|]+)\|\ ([^,]+)[^$]*$", # National Center for Biotechnology Information phage database "NCBI": "^ENA\|([^\|]+)\|[^\ ]+\ ([^,]+)[^$]*$", # Actinobacteriophage ...
2c41bfe7da9644b3a76adc5d2f1744107a3c40f4
core/git_mixins/rewrite.py
core/git_mixins/rewrite.py
from types import SimpleNamespace class ChangeTemplate(SimpleNamespace): # orig_hash do_commit = True msg = None datetime = None author = None class RewriteMixin(): ChangeTemplate = ChangeTemplate def rewrite_active_branch(self, base_commit, commit_chain): branch_name = self.ge...
from types import SimpleNamespace class ChangeTemplate(SimpleNamespace): # orig_hash do_commit = True msg = None datetime = None author = None class RewriteMixin(): ChangeTemplate = ChangeTemplate def rewrite_active_branch(self, base_commit, commit_chain): branch_name = self.ge...
Allow empty commit messages if explictly specified.
Allow empty commit messages if explictly specified.
Python
mit
theiviaxx/GitSavvy,jmanuel1/GitSavvy,dreki/GitSavvy,dvcrn/GitSavvy,dvcrn/GitSavvy,asfaltboy/GitSavvy,jmanuel1/GitSavvy,ddevlin/GitSavvy,ddevlin/GitSavvy,divmain/GitSavvy,stoivo/GitSavvy,stoivo/GitSavvy,divmain/GitSavvy,dreki/GitSavvy,ddevlin/GitSavvy,theiviaxx/GitSavvy,stoivo/GitSavvy,asfaltboy/GitSavvy,ralic/GitSavvy,...
from types import SimpleNamespace class ChangeTemplate(SimpleNamespace): # orig_hash do_commit = True msg = None datetime = None author = None class RewriteMixin(): ChangeTemplate = ChangeTemplate def rewrite_active_branch(self, base_commit, commit_chain): branch_name = self.ge...
from types import SimpleNamespace class ChangeTemplate(SimpleNamespace): # orig_hash do_commit = True msg = None datetime = None author = None class RewriteMixin(): ChangeTemplate = ChangeTemplate def rewrite_active_branch(self, base_commit, commit_chain): branch_name = self.ge...
<commit_before>from types import SimpleNamespace class ChangeTemplate(SimpleNamespace): # orig_hash do_commit = True msg = None datetime = None author = None class RewriteMixin(): ChangeTemplate = ChangeTemplate def rewrite_active_branch(self, base_commit, commit_chain): branch...
from types import SimpleNamespace class ChangeTemplate(SimpleNamespace): # orig_hash do_commit = True msg = None datetime = None author = None class RewriteMixin(): ChangeTemplate = ChangeTemplate def rewrite_active_branch(self, base_commit, commit_chain): branch_name = self.ge...
from types import SimpleNamespace class ChangeTemplate(SimpleNamespace): # orig_hash do_commit = True msg = None datetime = None author = None class RewriteMixin(): ChangeTemplate = ChangeTemplate def rewrite_active_branch(self, base_commit, commit_chain): branch_name = self.ge...
<commit_before>from types import SimpleNamespace class ChangeTemplate(SimpleNamespace): # orig_hash do_commit = True msg = None datetime = None author = None class RewriteMixin(): ChangeTemplate = ChangeTemplate def rewrite_active_branch(self, base_commit, commit_chain): branch...
cea1f24aa0862d2feab1150fbd667159ab4cbe3a
migrations/versions/0313_email_access_validated_at.py
migrations/versions/0313_email_access_validated_at.py
""" Revision ID: 0313_email_access_validated_at Revises: 0312_populate_returned_letters Create Date: 2020-01-28 18:03:22.237386 """ from alembic import op import sqlalchemy as sa revision = '0313_email_access_validated_at' down_revision = '0312_populate_returned_letters' def upgrade(): # ### commands auto gen...
""" Revision ID: 0313_email_access_validated_at Revises: 0312_populate_returned_letters Create Date: 2020-01-28 18:03:22.237386 """ from alembic import op import sqlalchemy as sa revision = '0313_email_access_validated_at' down_revision = '0312_populate_returned_letters' def upgrade(): # ### commands auto gen...
Simplify the first migration, we will do execute statements later
Simplify the first migration, we will do execute statements later
Python
mit
alphagov/notifications-api,alphagov/notifications-api
""" Revision ID: 0313_email_access_validated_at Revises: 0312_populate_returned_letters Create Date: 2020-01-28 18:03:22.237386 """ from alembic import op import sqlalchemy as sa revision = '0313_email_access_validated_at' down_revision = '0312_populate_returned_letters' def upgrade(): # ### commands auto gen...
""" Revision ID: 0313_email_access_validated_at Revises: 0312_populate_returned_letters Create Date: 2020-01-28 18:03:22.237386 """ from alembic import op import sqlalchemy as sa revision = '0313_email_access_validated_at' down_revision = '0312_populate_returned_letters' def upgrade(): # ### commands auto gen...
<commit_before>""" Revision ID: 0313_email_access_validated_at Revises: 0312_populate_returned_letters Create Date: 2020-01-28 18:03:22.237386 """ from alembic import op import sqlalchemy as sa revision = '0313_email_access_validated_at' down_revision = '0312_populate_returned_letters' def upgrade(): # ### co...
""" Revision ID: 0313_email_access_validated_at Revises: 0312_populate_returned_letters Create Date: 2020-01-28 18:03:22.237386 """ from alembic import op import sqlalchemy as sa revision = '0313_email_access_validated_at' down_revision = '0312_populate_returned_letters' def upgrade(): # ### commands auto gen...
""" Revision ID: 0313_email_access_validated_at Revises: 0312_populate_returned_letters Create Date: 2020-01-28 18:03:22.237386 """ from alembic import op import sqlalchemy as sa revision = '0313_email_access_validated_at' down_revision = '0312_populate_returned_letters' def upgrade(): # ### commands auto gen...
<commit_before>""" Revision ID: 0313_email_access_validated_at Revises: 0312_populate_returned_letters Create Date: 2020-01-28 18:03:22.237386 """ from alembic import op import sqlalchemy as sa revision = '0313_email_access_validated_at' down_revision = '0312_populate_returned_letters' def upgrade(): # ### co...
a3ee74b3b7cba17e013b549f0ed56587cfc65331
rnacentral/nhmmer/urls.py
rnacentral/nhmmer/urls.py
""" Copyright [2009-2014] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
""" Copyright [2009-2014] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
Use spaces instead of tabs
Use spaces instead of tabs
Python
apache-2.0
RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode
""" Copyright [2009-2014] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
""" Copyright [2009-2014] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
<commit_before>""" Copyright [2009-2014] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by appl...
""" Copyright [2009-2014] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
""" Copyright [2009-2014] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
<commit_before>""" Copyright [2009-2014] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by appl...
e548b18f223e2493472dcf393d21d1714d304216
median.py
median.py
def median(numbers): """Return the median of a list of numbers.""" length = len(numbers) numbers.sort() if length % 2 == 0: place = length / 2 calculated_median = (numbers[place] + numbers[place - 1]) / 2.0 else: place = (length - 1) / 2 calculated_median = numbe...
def median(numbers): """Return the median of a list of numbers.""" length = len(numbers) numbers.sort() if length % 2 == 0: place = int(length / 2) # index must be integer calculated_median = (numbers[place] + numbers[place - 1]) / 2.0 else: place = int((length - 1) / 2)...
Convert place to integer, for list index
Convert place to integer, for list index
Python
agpl-3.0
brylie/python-practice
def median(numbers): """Return the median of a list of numbers.""" length = len(numbers) numbers.sort() if length % 2 == 0: place = length / 2 calculated_median = (numbers[place] + numbers[place - 1]) / 2.0 else: place = (length - 1) / 2 calculated_median = numbe...
def median(numbers): """Return the median of a list of numbers.""" length = len(numbers) numbers.sort() if length % 2 == 0: place = int(length / 2) # index must be integer calculated_median = (numbers[place] + numbers[place - 1]) / 2.0 else: place = int((length - 1) / 2)...
<commit_before>def median(numbers): """Return the median of a list of numbers.""" length = len(numbers) numbers.sort() if length % 2 == 0: place = length / 2 calculated_median = (numbers[place] + numbers[place - 1]) / 2.0 else: place = (length - 1) / 2 calculated...
def median(numbers): """Return the median of a list of numbers.""" length = len(numbers) numbers.sort() if length % 2 == 0: place = int(length / 2) # index must be integer calculated_median = (numbers[place] + numbers[place - 1]) / 2.0 else: place = int((length - 1) / 2)...
def median(numbers): """Return the median of a list of numbers.""" length = len(numbers) numbers.sort() if length % 2 == 0: place = length / 2 calculated_median = (numbers[place] + numbers[place - 1]) / 2.0 else: place = (length - 1) / 2 calculated_median = numbe...
<commit_before>def median(numbers): """Return the median of a list of numbers.""" length = len(numbers) numbers.sort() if length % 2 == 0: place = length / 2 calculated_median = (numbers[place] + numbers[place - 1]) / 2.0 else: place = (length - 1) / 2 calculated...
302f5b586baccafbc2641d241312edb90e922074
mla_game/settings/stage.py
mla_game/settings/stage.py
from .base import * import os SECRET_KEY = os.environ['SECRET_KEY'] DEBUG = True LOG_DIRECTORY = '/home/wgbh/logs' STATIC_ROOT = '/home/wgbh/webroot/static' ALLOWED_HOSTS = [ 'mlagame-dev.wgbhdigital.org', 'mlagame.wgbhdigital.org', 'fixit.wgbhdigital.org', ] DATABASES = { 'default': { 'ENGINE...
from .base import * import os # how many data points are enough to calculate confidence? MINIMUM_SAMPLE_SIZE = 3 # original phrase is good enough for export TRANSCRIPT_PHRASE_POSITIVE_CONFIDENCE_LIMIT = .51 # original phrase needs correction TRANSCRIPT_PHRASE_NEGATIVE_CONFIDENCE_LIMIT = -.51 # correction is good eno...
Set the bar low on staging
Set the bar low on staging
Python
mit
WGBH/FixIt,WGBH/FixIt,WGBH/FixIt
from .base import * import os SECRET_KEY = os.environ['SECRET_KEY'] DEBUG = True LOG_DIRECTORY = '/home/wgbh/logs' STATIC_ROOT = '/home/wgbh/webroot/static' ALLOWED_HOSTS = [ 'mlagame-dev.wgbhdigital.org', 'mlagame.wgbhdigital.org', 'fixit.wgbhdigital.org', ] DATABASES = { 'default': { 'ENGINE...
from .base import * import os # how many data points are enough to calculate confidence? MINIMUM_SAMPLE_SIZE = 3 # original phrase is good enough for export TRANSCRIPT_PHRASE_POSITIVE_CONFIDENCE_LIMIT = .51 # original phrase needs correction TRANSCRIPT_PHRASE_NEGATIVE_CONFIDENCE_LIMIT = -.51 # correction is good eno...
<commit_before>from .base import * import os SECRET_KEY = os.environ['SECRET_KEY'] DEBUG = True LOG_DIRECTORY = '/home/wgbh/logs' STATIC_ROOT = '/home/wgbh/webroot/static' ALLOWED_HOSTS = [ 'mlagame-dev.wgbhdigital.org', 'mlagame.wgbhdigital.org', 'fixit.wgbhdigital.org', ] DATABASES = { 'default': { ...
from .base import * import os # how many data points are enough to calculate confidence? MINIMUM_SAMPLE_SIZE = 3 # original phrase is good enough for export TRANSCRIPT_PHRASE_POSITIVE_CONFIDENCE_LIMIT = .51 # original phrase needs correction TRANSCRIPT_PHRASE_NEGATIVE_CONFIDENCE_LIMIT = -.51 # correction is good eno...
from .base import * import os SECRET_KEY = os.environ['SECRET_KEY'] DEBUG = True LOG_DIRECTORY = '/home/wgbh/logs' STATIC_ROOT = '/home/wgbh/webroot/static' ALLOWED_HOSTS = [ 'mlagame-dev.wgbhdigital.org', 'mlagame.wgbhdigital.org', 'fixit.wgbhdigital.org', ] DATABASES = { 'default': { 'ENGINE...
<commit_before>from .base import * import os SECRET_KEY = os.environ['SECRET_KEY'] DEBUG = True LOG_DIRECTORY = '/home/wgbh/logs' STATIC_ROOT = '/home/wgbh/webroot/static' ALLOWED_HOSTS = [ 'mlagame-dev.wgbhdigital.org', 'mlagame.wgbhdigital.org', 'fixit.wgbhdigital.org', ] DATABASES = { 'default': { ...
48e340377ae06e962e043658b2dc8235b18f44e2
turbustat/statistics/base_statistic.py
turbustat/statistics/base_statistic.py
from astropy.io import fits import numpy as np from ..io import input_data class BaseStatisticMixIn(object): """ Common properties to all statistics """ # Disable this flag when a statistic does not need a header need_header_flag = True @property def header(self): return self._...
from astropy.io import fits import numpy as np from ..io import input_data class BaseStatisticMixIn(object): """ Common properties to all statistics """ # Disable this flag when a statistic does not need a header need_header_flag = True # Disable this when the data property will not be use...
Allow data property to not be use
Allow data property to not be use
Python
mit
e-koch/TurbuStat,Astroua/TurbuStat
from astropy.io import fits import numpy as np from ..io import input_data class BaseStatisticMixIn(object): """ Common properties to all statistics """ # Disable this flag when a statistic does not need a header need_header_flag = True @property def header(self): return self._...
from astropy.io import fits import numpy as np from ..io import input_data class BaseStatisticMixIn(object): """ Common properties to all statistics """ # Disable this flag when a statistic does not need a header need_header_flag = True # Disable this when the data property will not be use...
<commit_before> from astropy.io import fits import numpy as np from ..io import input_data class BaseStatisticMixIn(object): """ Common properties to all statistics """ # Disable this flag when a statistic does not need a header need_header_flag = True @property def header(self): ...
from astropy.io import fits import numpy as np from ..io import input_data class BaseStatisticMixIn(object): """ Common properties to all statistics """ # Disable this flag when a statistic does not need a header need_header_flag = True # Disable this when the data property will not be use...
from astropy.io import fits import numpy as np from ..io import input_data class BaseStatisticMixIn(object): """ Common properties to all statistics """ # Disable this flag when a statistic does not need a header need_header_flag = True @property def header(self): return self._...
<commit_before> from astropy.io import fits import numpy as np from ..io import input_data class BaseStatisticMixIn(object): """ Common properties to all statistics """ # Disable this flag when a statistic does not need a header need_header_flag = True @property def header(self): ...
1846ebff5c71a8c3bb0c9cccd29460f656f5a21b
oauthlib/__init__.py
oauthlib/__init__.py
""" oauthlib ~~~~~~~~ A generic, spec-compliant, thorough implementation of the OAuth request-signing logic. :copyright: (c) 2011 by Idan Gazit. :license: BSD, see LICENSE for details. """ __author__ = 'Idan Gazit <idan@gazit.me>' __version__ = '0.6.0'
Add meta info in oauthlib module
Add meta info in oauthlib module
Python
bsd-3-clause
hirokiky/oauthlib,skion/oauthlib-oidc,cyrilchaponeverysens/oauthlib,Blitzen/oauthlib,mick88/oauthlib,idan/oauthlib,barseghyanartur/oauthlib,masci/oauthlib,metatoaster/oauthlib,bjmc/oauthlib,oauthlib/oauthlib,flamusdiu/oauthlib,singingwolfboy/oauthlib,armersong/oauthlib,garciasolero/oauthlib,masci/oauthlib,flamusdiu/oau...
Add meta info in oauthlib module
""" oauthlib ~~~~~~~~ A generic, spec-compliant, thorough implementation of the OAuth request-signing logic. :copyright: (c) 2011 by Idan Gazit. :license: BSD, see LICENSE for details. """ __author__ = 'Idan Gazit <idan@gazit.me>' __version__ = '0.6.0'
<commit_before><commit_msg>Add meta info in oauthlib module<commit_after>
""" oauthlib ~~~~~~~~ A generic, spec-compliant, thorough implementation of the OAuth request-signing logic. :copyright: (c) 2011 by Idan Gazit. :license: BSD, see LICENSE for details. """ __author__ = 'Idan Gazit <idan@gazit.me>' __version__ = '0.6.0'
Add meta info in oauthlib module""" oauthlib ~~~~~~~~ A generic, spec-compliant, thorough implementation of the OAuth request-signing logic. :copyright: (c) 2011 by Idan Gazit. :license: BSD, see LICENSE for details. """ __author__ = 'Idan Gazit <idan@gazit.me>' __version__ = '0.6.0'
<commit_before><commit_msg>Add meta info in oauthlib module<commit_after>""" oauthlib ~~~~~~~~ A generic, spec-compliant, thorough implementation of the OAuth request-signing logic. :copyright: (c) 2011 by Idan Gazit. :license: BSD, see LICENSE for details. """ __author__ = 'Idan Gazit <idan@...
18000a73273a65a320513c5ca119bc07e1efb37d
octopenstack/view.py
octopenstack/view.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import pprint import json class View(object): def service_list(self, service_list): print('service LIST:') for service in service_list: print(service) print('') def service_information(self, action, name, *argv): print...
#!/usr/bin/env python # -*- coding: utf-8 -*- import pprint import json class View(object): def service_list(self, service_list): print('service LIST:') for service in service_list: print(service) print('') def service_information(self, action, name, *argv): print...
Fix Json error for Python3 compatibility
Fix Json error for Python3 compatibility
Python
apache-2.0
epheo/shaddock,epheo/shaddock
#!/usr/bin/env python # -*- coding: utf-8 -*- import pprint import json class View(object): def service_list(self, service_list): print('service LIST:') for service in service_list: print(service) print('') def service_information(self, action, name, *argv): print...
#!/usr/bin/env python # -*- coding: utf-8 -*- import pprint import json class View(object): def service_list(self, service_list): print('service LIST:') for service in service_list: print(service) print('') def service_information(self, action, name, *argv): print...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import pprint import json class View(object): def service_list(self, service_list): print('service LIST:') for service in service_list: print(service) print('') def service_information(self, action, name, *argv)...
#!/usr/bin/env python # -*- coding: utf-8 -*- import pprint import json class View(object): def service_list(self, service_list): print('service LIST:') for service in service_list: print(service) print('') def service_information(self, action, name, *argv): print...
#!/usr/bin/env python # -*- coding: utf-8 -*- import pprint import json class View(object): def service_list(self, service_list): print('service LIST:') for service in service_list: print(service) print('') def service_information(self, action, name, *argv): print...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import pprint import json class View(object): def service_list(self, service_list): print('service LIST:') for service in service_list: print(service) print('') def service_information(self, action, name, *argv)...
9982c25f3fade2cd411277f92761b8c560d36b61
morenines/ignores.py
morenines/ignores.py
import os from fnmatch import fnmatchcase import click class Ignores(object): def __init__(self, default_patterns=[]): self.patterns = default_patterns def read(cls, path): with open(path, 'r') as stream: self.patterns.extend([line.strip() for line in stream]) def match(s...
import os from fnmatch import fnmatchcase import click class Ignores(object): def __init__(self, default_patterns=[]): self.patterns = default_patterns def read(self, path): with open(path, 'r') as stream: self.patterns.extend([line.strip() for line in stream]) def match(...
Fix typo from making Ignores.read an instance method
Fix typo from making Ignores.read an instance method
Python
mit
mcgid/morenines,mcgid/morenines
import os from fnmatch import fnmatchcase import click class Ignores(object): def __init__(self, default_patterns=[]): self.patterns = default_patterns def read(cls, path): with open(path, 'r') as stream: self.patterns.extend([line.strip() for line in stream]) def match(s...
import os from fnmatch import fnmatchcase import click class Ignores(object): def __init__(self, default_patterns=[]): self.patterns = default_patterns def read(self, path): with open(path, 'r') as stream: self.patterns.extend([line.strip() for line in stream]) def match(...
<commit_before>import os from fnmatch import fnmatchcase import click class Ignores(object): def __init__(self, default_patterns=[]): self.patterns = default_patterns def read(cls, path): with open(path, 'r') as stream: self.patterns.extend([line.strip() for line in stream]) ...
import os from fnmatch import fnmatchcase import click class Ignores(object): def __init__(self, default_patterns=[]): self.patterns = default_patterns def read(self, path): with open(path, 'r') as stream: self.patterns.extend([line.strip() for line in stream]) def match(...
import os from fnmatch import fnmatchcase import click class Ignores(object): def __init__(self, default_patterns=[]): self.patterns = default_patterns def read(cls, path): with open(path, 'r') as stream: self.patterns.extend([line.strip() for line in stream]) def match(s...
<commit_before>import os from fnmatch import fnmatchcase import click class Ignores(object): def __init__(self, default_patterns=[]): self.patterns = default_patterns def read(cls, path): with open(path, 'r') as stream: self.patterns.extend([line.strip() for line in stream]) ...
89e196e86d3b337ff6addb9e0ba289cbd63950d5
netbox/extras/querysets.py
netbox/extras/querysets.py
from __future__ import unicode_literals from django.db.models import Q, QuerySet class ConfigContextQuerySet(QuerySet): def get_for_object(self, obj): """ Return all applicable ConfigContexts for a given object. Only active ConfigContexts will be included. """ # `device_role` fo...
from __future__ import unicode_literals from django.db.models import Q, QuerySet class ConfigContextQuerySet(QuerySet): def get_for_object(self, obj): """ Return all applicable ConfigContexts for a given object. Only active ConfigContexts will be included. """ # `device_role` fo...
Tweak ConfigContext manager to allow for objects with a regionless site
Tweak ConfigContext manager to allow for objects with a regionless site
Python
apache-2.0
digitalocean/netbox,lampwins/netbox,lampwins/netbox,lampwins/netbox,digitalocean/netbox,digitalocean/netbox,lampwins/netbox,digitalocean/netbox
from __future__ import unicode_literals from django.db.models import Q, QuerySet class ConfigContextQuerySet(QuerySet): def get_for_object(self, obj): """ Return all applicable ConfigContexts for a given object. Only active ConfigContexts will be included. """ # `device_role` fo...
from __future__ import unicode_literals from django.db.models import Q, QuerySet class ConfigContextQuerySet(QuerySet): def get_for_object(self, obj): """ Return all applicable ConfigContexts for a given object. Only active ConfigContexts will be included. """ # `device_role` fo...
<commit_before>from __future__ import unicode_literals from django.db.models import Q, QuerySet class ConfigContextQuerySet(QuerySet): def get_for_object(self, obj): """ Return all applicable ConfigContexts for a given object. Only active ConfigContexts will be included. """ # `...
from __future__ import unicode_literals from django.db.models import Q, QuerySet class ConfigContextQuerySet(QuerySet): def get_for_object(self, obj): """ Return all applicable ConfigContexts for a given object. Only active ConfigContexts will be included. """ # `device_role` fo...
from __future__ import unicode_literals from django.db.models import Q, QuerySet class ConfigContextQuerySet(QuerySet): def get_for_object(self, obj): """ Return all applicable ConfigContexts for a given object. Only active ConfigContexts will be included. """ # `device_role` fo...
<commit_before>from __future__ import unicode_literals from django.db.models import Q, QuerySet class ConfigContextQuerySet(QuerySet): def get_for_object(self, obj): """ Return all applicable ConfigContexts for a given object. Only active ConfigContexts will be included. """ # `...
6a7d741da6124ec3d8607b5780608b51b7aca8ba
editorconfig/exceptions.py
editorconfig/exceptions.py
"""EditorConfig exception classes Licensed under PSF License (see LICENSE.txt file). """ class EditorConfigError(Exception): """Parent class of all exceptions raised by EditorConfig""" from ConfigParser import ParsingError as _ParsingError class ParsingError(_ParsingError, EditorConfigError): """Error r...
"""EditorConfig exception classes Licensed under PSF License (see LICENSE.txt file). """ class EditorConfigError(Exception): """Parent class of all exceptions raised by EditorConfig""" try: from ConfigParser import ParsingError as _ParsingError except: from configparser import ParsingError as _Parsing...
Fix broken ConfigParser import for Python3
Fix broken ConfigParser import for Python3
Python
bsd-2-clause
benjifisher/editorconfig-vim,VictorBjelkholm/editorconfig-vim,johnfraney/editorconfig-vim,benjifisher/editorconfig-vim,pocke/editorconfig-vim,pocke/editorconfig-vim,pocke/editorconfig-vim,VictorBjelkholm/editorconfig-vim,johnfraney/editorconfig-vim,VictorBjelkholm/editorconfig-vim,benjifisher/editorconfig-vim,johnfrane...
"""EditorConfig exception classes Licensed under PSF License (see LICENSE.txt file). """ class EditorConfigError(Exception): """Parent class of all exceptions raised by EditorConfig""" from ConfigParser import ParsingError as _ParsingError class ParsingError(_ParsingError, EditorConfigError): """Error r...
"""EditorConfig exception classes Licensed under PSF License (see LICENSE.txt file). """ class EditorConfigError(Exception): """Parent class of all exceptions raised by EditorConfig""" try: from ConfigParser import ParsingError as _ParsingError except: from configparser import ParsingError as _Parsing...
<commit_before>"""EditorConfig exception classes Licensed under PSF License (see LICENSE.txt file). """ class EditorConfigError(Exception): """Parent class of all exceptions raised by EditorConfig""" from ConfigParser import ParsingError as _ParsingError class ParsingError(_ParsingError, EditorConfigError):...
"""EditorConfig exception classes Licensed under PSF License (see LICENSE.txt file). """ class EditorConfigError(Exception): """Parent class of all exceptions raised by EditorConfig""" try: from ConfigParser import ParsingError as _ParsingError except: from configparser import ParsingError as _Parsing...
"""EditorConfig exception classes Licensed under PSF License (see LICENSE.txt file). """ class EditorConfigError(Exception): """Parent class of all exceptions raised by EditorConfig""" from ConfigParser import ParsingError as _ParsingError class ParsingError(_ParsingError, EditorConfigError): """Error r...
<commit_before>"""EditorConfig exception classes Licensed under PSF License (see LICENSE.txt file). """ class EditorConfigError(Exception): """Parent class of all exceptions raised by EditorConfig""" from ConfigParser import ParsingError as _ParsingError class ParsingError(_ParsingError, EditorConfigError):...