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
9f80145574cfad56e91df9a598c311894d12a675
scratchpad/ncurses.py
scratchpad/ncurses.py
#!/usr/bin/env python3 from curses import wrapper import platform if platform.system() == "Darwin": # create mock class for Pi Camera class Camera: def __init__(self): self.brightness = 10 self.contrast = 24 else: import picamera properties = [ "brightness", "contrast" ] camera = Camera() def main(std...
#!/usr/bin/env python3 from curses import wrapper import platform if platform.system() == "Darwin": # create mock class for Pi Camera class PiCamera: def __init__(self): self.brightness = 10 self.contrast = 24 else: from picamera import PiCamera properties = [ "brightness", "contrast" ] camera = PiCame...
Fix name of Camera class
Fix name of Camera class
Python
mit
gizmo-cda/g2x,gizmo-cda/g2x,thelonious/g2x,gizmo-cda/g2x,gizmo-cda/g2x,thelonious/g2x
#!/usr/bin/env python3 from curses import wrapper import platform if platform.system() == "Darwin": # create mock class for Pi Camera class Camera: def __init__(self): self.brightness = 10 self.contrast = 24 else: import picamera properties = [ "brightness", "contrast" ] camera = Camera() def main(std...
#!/usr/bin/env python3 from curses import wrapper import platform if platform.system() == "Darwin": # create mock class for Pi Camera class PiCamera: def __init__(self): self.brightness = 10 self.contrast = 24 else: from picamera import PiCamera properties = [ "brightness", "contrast" ] camera = PiCame...
<commit_before>#!/usr/bin/env python3 from curses import wrapper import platform if platform.system() == "Darwin": # create mock class for Pi Camera class Camera: def __init__(self): self.brightness = 10 self.contrast = 24 else: import picamera properties = [ "brightness", "contrast" ] camera = Camera(...
#!/usr/bin/env python3 from curses import wrapper import platform if platform.system() == "Darwin": # create mock class for Pi Camera class PiCamera: def __init__(self): self.brightness = 10 self.contrast = 24 else: from picamera import PiCamera properties = [ "brightness", "contrast" ] camera = PiCame...
#!/usr/bin/env python3 from curses import wrapper import platform if platform.system() == "Darwin": # create mock class for Pi Camera class Camera: def __init__(self): self.brightness = 10 self.contrast = 24 else: import picamera properties = [ "brightness", "contrast" ] camera = Camera() def main(std...
<commit_before>#!/usr/bin/env python3 from curses import wrapper import platform if platform.system() == "Darwin": # create mock class for Pi Camera class Camera: def __init__(self): self.brightness = 10 self.contrast = 24 else: import picamera properties = [ "brightness", "contrast" ] camera = Camera(...
75c1dedb6eddfcb540ee29de5ae31b99d9927d07
reddit/admin.py
reddit/admin.py
from django.contrib import admin from reddit.models import RedditAccount from reddit.forms import RedditAccountForm from datetime import date class RedditAccountAdmin(admin.ModelAdmin): list_display = ('username', 'user', 'date_created', 'link_karma', 'comment_karma', 'last_update', 'is_valid') search_fields ...
from django.contrib import admin from reddit.models import RedditAccount from reddit.forms import RedditAccountForm from datetime import date class RedditAccountAdmin(admin.ModelAdmin): list_display = ('username', 'user', 'date_created', 'link_karma', 'comment_karma', 'last_update', 'validated', 'is_valid') s...
Add validation details to the Admin interface
Add validation details to the Admin interface
Python
bsd-3-clause
nikdoof/test-auth
from django.contrib import admin from reddit.models import RedditAccount from reddit.forms import RedditAccountForm from datetime import date class RedditAccountAdmin(admin.ModelAdmin): list_display = ('username', 'user', 'date_created', 'link_karma', 'comment_karma', 'last_update', 'is_valid') search_fields ...
from django.contrib import admin from reddit.models import RedditAccount from reddit.forms import RedditAccountForm from datetime import date class RedditAccountAdmin(admin.ModelAdmin): list_display = ('username', 'user', 'date_created', 'link_karma', 'comment_karma', 'last_update', 'validated', 'is_valid') s...
<commit_before>from django.contrib import admin from reddit.models import RedditAccount from reddit.forms import RedditAccountForm from datetime import date class RedditAccountAdmin(admin.ModelAdmin): list_display = ('username', 'user', 'date_created', 'link_karma', 'comment_karma', 'last_update', 'is_valid') ...
from django.contrib import admin from reddit.models import RedditAccount from reddit.forms import RedditAccountForm from datetime import date class RedditAccountAdmin(admin.ModelAdmin): list_display = ('username', 'user', 'date_created', 'link_karma', 'comment_karma', 'last_update', 'validated', 'is_valid') s...
from django.contrib import admin from reddit.models import RedditAccount from reddit.forms import RedditAccountForm from datetime import date class RedditAccountAdmin(admin.ModelAdmin): list_display = ('username', 'user', 'date_created', 'link_karma', 'comment_karma', 'last_update', 'is_valid') search_fields ...
<commit_before>from django.contrib import admin from reddit.models import RedditAccount from reddit.forms import RedditAccountForm from datetime import date class RedditAccountAdmin(admin.ModelAdmin): list_display = ('username', 'user', 'date_created', 'link_karma', 'comment_karma', 'last_update', 'is_valid') ...
ca09f3e4286be605e179f0b6ac742305d165b431
monasca_setup/detection/plugins/http_check.py
monasca_setup/detection/plugins/http_check.py
import logging import monasca_setup.agent_config import monasca_setup.detection log = logging.getLogger(__name__) class HttpCheck(monasca_setup.detection.ArgsPlugin): """ Setup an http_check according to the passed in args. Despite being a detection plugin this plugin does no detection and will be a noo...
import ast import logging import monasca_setup.agent_config import monasca_setup.detection log = logging.getLogger(__name__) class HttpCheck(monasca_setup.detection.ArgsPlugin): """ Setup an http_check according to the passed in args. Despite being a detection plugin this plugin does no detection and wi...
Allow additional customization of HttpCheck
Allow additional customization of HttpCheck Documentation on HttpCheck detection plugin refers to things that do not currently work in the plugin, like activating use_keystone. This change fixes that, and adds the ability to customize other http_check parameters which were missing. Change-Id: I2309b25f83f395dcd56914...
Python
bsd-3-clause
sapcc/monasca-agent,sapcc/monasca-agent,sapcc/monasca-agent
import logging import monasca_setup.agent_config import monasca_setup.detection log = logging.getLogger(__name__) class HttpCheck(monasca_setup.detection.ArgsPlugin): """ Setup an http_check according to the passed in args. Despite being a detection plugin this plugin does no detection and will be a noo...
import ast import logging import monasca_setup.agent_config import monasca_setup.detection log = logging.getLogger(__name__) class HttpCheck(monasca_setup.detection.ArgsPlugin): """ Setup an http_check according to the passed in args. Despite being a detection plugin this plugin does no detection and wi...
<commit_before>import logging import monasca_setup.agent_config import monasca_setup.detection log = logging.getLogger(__name__) class HttpCheck(monasca_setup.detection.ArgsPlugin): """ Setup an http_check according to the passed in args. Despite being a detection plugin this plugin does no detection an...
import ast import logging import monasca_setup.agent_config import monasca_setup.detection log = logging.getLogger(__name__) class HttpCheck(monasca_setup.detection.ArgsPlugin): """ Setup an http_check according to the passed in args. Despite being a detection plugin this plugin does no detection and wi...
import logging import monasca_setup.agent_config import monasca_setup.detection log = logging.getLogger(__name__) class HttpCheck(monasca_setup.detection.ArgsPlugin): """ Setup an http_check according to the passed in args. Despite being a detection plugin this plugin does no detection and will be a noo...
<commit_before>import logging import monasca_setup.agent_config import monasca_setup.detection log = logging.getLogger(__name__) class HttpCheck(monasca_setup.detection.ArgsPlugin): """ Setup an http_check according to the passed in args. Despite being a detection plugin this plugin does no detection an...
a61d50ff6f564112c04d3a9a8ac6e57d5b99da9d
heufybot/output.py
heufybot/output.py
class OutputHandler(object): def __init__(self, connection): self.connection = connection def cmdJOIN(self, channels, keys=None): chans = channels.split(",") for i in range(len(chans)): if chans[i][0] not in self.connection.supportHelper.chanTypes: chans[i] =...
class OutputHandler(object): def __init__(self, connection): self.connection = connection def cmdJOIN(self, channels, keys=[]): for i in range(len(channels)): if channels[i][0] not in self.connection.supportHelper.chanTypes: channels[i] = "#{}".format(channels[i]) ...
Use lists for the JOIN command and parse them before sending
Use lists for the JOIN command and parse them before sending
Python
mit
Heufneutje/PyHeufyBot,Heufneutje/PyHeufyBot
class OutputHandler(object): def __init__(self, connection): self.connection = connection def cmdJOIN(self, channels, keys=None): chans = channels.split(",") for i in range(len(chans)): if chans[i][0] not in self.connection.supportHelper.chanTypes: chans[i] =...
class OutputHandler(object): def __init__(self, connection): self.connection = connection def cmdJOIN(self, channels, keys=[]): for i in range(len(channels)): if channels[i][0] not in self.connection.supportHelper.chanTypes: channels[i] = "#{}".format(channels[i]) ...
<commit_before>class OutputHandler(object): def __init__(self, connection): self.connection = connection def cmdJOIN(self, channels, keys=None): chans = channels.split(",") for i in range(len(chans)): if chans[i][0] not in self.connection.supportHelper.chanTypes: ...
class OutputHandler(object): def __init__(self, connection): self.connection = connection def cmdJOIN(self, channels, keys=[]): for i in range(len(channels)): if channels[i][0] not in self.connection.supportHelper.chanTypes: channels[i] = "#{}".format(channels[i]) ...
class OutputHandler(object): def __init__(self, connection): self.connection = connection def cmdJOIN(self, channels, keys=None): chans = channels.split(",") for i in range(len(chans)): if chans[i][0] not in self.connection.supportHelper.chanTypes: chans[i] =...
<commit_before>class OutputHandler(object): def __init__(self, connection): self.connection = connection def cmdJOIN(self, channels, keys=None): chans = channels.split(",") for i in range(len(chans)): if chans[i][0] not in self.connection.supportHelper.chanTypes: ...
980492cb76d0d72a005269a4fb9c1ec9767c10de
symfit/api.py
symfit/api.py
# Overwrite behavior of sympy objects to make more sense for this project. import symfit.core.operators # Expose useful objects. from symfit.core.fit import ( Fit, Model, Constraint, ODEModel, ModelError, CallableModel, CallableNumericalModel, GradientModel ) from symfit.core.fit_results import FitResults from...
# Overwrite behavior of sympy objects to make more sense for this project. import symfit.core.operators # Expose useful objects. from symfit.core.fit import ( Fit, Model, ODEModel, ModelError, CallableModel, CallableNumericalModel, GradientModel ) from symfit.core.fit_results import FitResults from symfit.core...
Remove Constraint objects from the API
Remove Constraint objects from the API
Python
mit
tBuLi/symfit
# Overwrite behavior of sympy objects to make more sense for this project. import symfit.core.operators # Expose useful objects. from symfit.core.fit import ( Fit, Model, Constraint, ODEModel, ModelError, CallableModel, CallableNumericalModel, GradientModel ) from symfit.core.fit_results import FitResults from...
# Overwrite behavior of sympy objects to make more sense for this project. import symfit.core.operators # Expose useful objects. from symfit.core.fit import ( Fit, Model, ODEModel, ModelError, CallableModel, CallableNumericalModel, GradientModel ) from symfit.core.fit_results import FitResults from symfit.core...
<commit_before># Overwrite behavior of sympy objects to make more sense for this project. import symfit.core.operators # Expose useful objects. from symfit.core.fit import ( Fit, Model, Constraint, ODEModel, ModelError, CallableModel, CallableNumericalModel, GradientModel ) from symfit.core.fit_results import ...
# Overwrite behavior of sympy objects to make more sense for this project. import symfit.core.operators # Expose useful objects. from symfit.core.fit import ( Fit, Model, ODEModel, ModelError, CallableModel, CallableNumericalModel, GradientModel ) from symfit.core.fit_results import FitResults from symfit.core...
# Overwrite behavior of sympy objects to make more sense for this project. import symfit.core.operators # Expose useful objects. from symfit.core.fit import ( Fit, Model, Constraint, ODEModel, ModelError, CallableModel, CallableNumericalModel, GradientModel ) from symfit.core.fit_results import FitResults from...
<commit_before># Overwrite behavior of sympy objects to make more sense for this project. import symfit.core.operators # Expose useful objects. from symfit.core.fit import ( Fit, Model, Constraint, ODEModel, ModelError, CallableModel, CallableNumericalModel, GradientModel ) from symfit.core.fit_results import ...
d9334aee00ba0f7f7b6423d775a65ba6f40ac4d4
test_stack.py
test_stack.py
from stack import StackItem from stack import StackFrame import pytest def test_item_data(): # Tests that "Bacon" is returned when calling .data on item bacon = StackItem("Bacon") assert bacon.data == "Bacon" def test_stack_push(): # Tests that "Bacon" is first item when pushed to stack bacon = ...
Add initial push and pop tests for Stack
Add initial push and pop tests for Stack
Python
mit
jwarren116/data-structures
Add initial push and pop tests for Stack
from stack import StackItem from stack import StackFrame import pytest def test_item_data(): # Tests that "Bacon" is returned when calling .data on item bacon = StackItem("Bacon") assert bacon.data == "Bacon" def test_stack_push(): # Tests that "Bacon" is first item when pushed to stack bacon = ...
<commit_before><commit_msg>Add initial push and pop tests for Stack<commit_after>
from stack import StackItem from stack import StackFrame import pytest def test_item_data(): # Tests that "Bacon" is returned when calling .data on item bacon = StackItem("Bacon") assert bacon.data == "Bacon" def test_stack_push(): # Tests that "Bacon" is first item when pushed to stack bacon = ...
Add initial push and pop tests for Stackfrom stack import StackItem from stack import StackFrame import pytest def test_item_data(): # Tests that "Bacon" is returned when calling .data on item bacon = StackItem("Bacon") assert bacon.data == "Bacon" def test_stack_push(): # Tests that "Bacon" is firs...
<commit_before><commit_msg>Add initial push and pop tests for Stack<commit_after>from stack import StackItem from stack import StackFrame import pytest def test_item_data(): # Tests that "Bacon" is returned when calling .data on item bacon = StackItem("Bacon") assert bacon.data == "Bacon" def test_stack...
81cd197e95e89dd37797c489774f34496ecea259
server/pushlanding.py
server/pushlanding.py
import logging import os from django.http import HttpResponse, Http404 from django.views.decorators.csrf import csrf_exempt from twilio.rest import TwilioRestClient logger = logging.getLogger('django') @csrf_exempt def handle(request): if (request.method != 'POST'): raise Http404 return HttpResponse("Hello, ...
import logging import os import json from django.http import HttpResponse, Http404 from django.views.decorators.csrf import csrf_exempt from twilio.rest import TwilioRestClient logger = logging.getLogger('django') @csrf_exempt def handle(request): if (request.method != 'POST'): raise Http404 logger.info("Rec...
Add debug logging for push landing
Add debug logging for push landing
Python
mit
zackzachariah/scavenger,zackzachariah/scavenger
import logging import os from django.http import HttpResponse, Http404 from django.views.decorators.csrf import csrf_exempt from twilio.rest import TwilioRestClient logger = logging.getLogger('django') @csrf_exempt def handle(request): if (request.method != 'POST'): raise Http404 return HttpResponse("Hello, ...
import logging import os import json from django.http import HttpResponse, Http404 from django.views.decorators.csrf import csrf_exempt from twilio.rest import TwilioRestClient logger = logging.getLogger('django') @csrf_exempt def handle(request): if (request.method != 'POST'): raise Http404 logger.info("Rec...
<commit_before>import logging import os from django.http import HttpResponse, Http404 from django.views.decorators.csrf import csrf_exempt from twilio.rest import TwilioRestClient logger = logging.getLogger('django') @csrf_exempt def handle(request): if (request.method != 'POST'): raise Http404 return HttpRe...
import logging import os import json from django.http import HttpResponse, Http404 from django.views.decorators.csrf import csrf_exempt from twilio.rest import TwilioRestClient logger = logging.getLogger('django') @csrf_exempt def handle(request): if (request.method != 'POST'): raise Http404 logger.info("Rec...
import logging import os from django.http import HttpResponse, Http404 from django.views.decorators.csrf import csrf_exempt from twilio.rest import TwilioRestClient logger = logging.getLogger('django') @csrf_exempt def handle(request): if (request.method != 'POST'): raise Http404 return HttpResponse("Hello, ...
<commit_before>import logging import os from django.http import HttpResponse, Http404 from django.views.decorators.csrf import csrf_exempt from twilio.rest import TwilioRestClient logger = logging.getLogger('django') @csrf_exempt def handle(request): if (request.method != 'POST'): raise Http404 return HttpRe...
9729a77b9b8cbfe8a6960ded4b5931e3ed64fe10
discover/__init__.py
discover/__init__.py
import logging LOG_FORMAT = '%(asctime)s [%(name)s] %(levelname)s %(message)s' LOG_DATE = '%Y-%m-%d %I:%M:%S %p' logging.basicConfig(format=LOG_FORMAT, datefmt=LOG_DATE, level=logging.WARN) logger = logging.getLogger('yoda-discover') logger.level = logging.INFO
import logging LOG_FORMAT = '[%(name)s] %(levelname)s %(message)s' logging.basicConfig(format=LOG_FORMAT, level=logging.WARN) logger = logging.getLogger('yoda-discover') logger.level = logging.INFO
Remove date from log formatting (handled by syslog)
Remove date from log formatting (handled by syslog)
Python
mit
totem/yoda-discover
import logging LOG_FORMAT = '%(asctime)s [%(name)s] %(levelname)s %(message)s' LOG_DATE = '%Y-%m-%d %I:%M:%S %p' logging.basicConfig(format=LOG_FORMAT, datefmt=LOG_DATE, level=logging.WARN) logger = logging.getLogger('yoda-discover') logger.level = logging.INFO Remove date from log formatting (handled by syslog)
import logging LOG_FORMAT = '[%(name)s] %(levelname)s %(message)s' logging.basicConfig(format=LOG_FORMAT, level=logging.WARN) logger = logging.getLogger('yoda-discover') logger.level = logging.INFO
<commit_before>import logging LOG_FORMAT = '%(asctime)s [%(name)s] %(levelname)s %(message)s' LOG_DATE = '%Y-%m-%d %I:%M:%S %p' logging.basicConfig(format=LOG_FORMAT, datefmt=LOG_DATE, level=logging.WARN) logger = logging.getLogger('yoda-discover') logger.level = logging.INFO <commit_msg>Remove date from log formatt...
import logging LOG_FORMAT = '[%(name)s] %(levelname)s %(message)s' logging.basicConfig(format=LOG_FORMAT, level=logging.WARN) logger = logging.getLogger('yoda-discover') logger.level = logging.INFO
import logging LOG_FORMAT = '%(asctime)s [%(name)s] %(levelname)s %(message)s' LOG_DATE = '%Y-%m-%d %I:%M:%S %p' logging.basicConfig(format=LOG_FORMAT, datefmt=LOG_DATE, level=logging.WARN) logger = logging.getLogger('yoda-discover') logger.level = logging.INFO Remove date from log formatting (handled by syslog)impo...
<commit_before>import logging LOG_FORMAT = '%(asctime)s [%(name)s] %(levelname)s %(message)s' LOG_DATE = '%Y-%m-%d %I:%M:%S %p' logging.basicConfig(format=LOG_FORMAT, datefmt=LOG_DATE, level=logging.WARN) logger = logging.getLogger('yoda-discover') logger.level = logging.INFO <commit_msg>Remove date from log formatt...
99b72ab4e40a4ffca901b36d870947ffb5103da8
HadithHouseWebsite/textprocessing/regex.py
HadithHouseWebsite/textprocessing/regex.py
import re class DocScanner(object): """ A class used to find certain tokens in a given document. The tokens can be specified by regular expressions. """ def __init__(self, tokens_dict, callback): """ Initialize a new document scanner. :param tokens_dict: A dictionary whose keys are the types of...
import re class DocScanner(object): """ A class used to find certain tokens in a given document. The tokens can be specified by regular expressions. """ def __init__(self, tokens_dict, callback): """ Initialize a new document scanner. :param tokens_dict: A dictionary whose keys are the types of...
Support passing context to callback
feat(docscanner): Support passing context to callback It might be useful to send some additional parameters to the callback function. For example, you might want to write to a file in the callback. This commit allows the user to pass an optional context to the callback everytime it finds a match.
Python
mit
hadithhouse/hadithhouse,rafidka/hadithhouse,rafidka/hadithhouse,hadithhouse/hadithhouse,hadithhouse/hadithhouse,hadithhouse/hadithhouse,rafidka/hadithhouse,rafidka/hadithhouse,rafidka/hadithhouse,hadithhouse/hadithhouse,rafidka/hadithhouse,hadithhouse/hadithhouse
import re class DocScanner(object): """ A class used to find certain tokens in a given document. The tokens can be specified by regular expressions. """ def __init__(self, tokens_dict, callback): """ Initialize a new document scanner. :param tokens_dict: A dictionary whose keys are the types of...
import re class DocScanner(object): """ A class used to find certain tokens in a given document. The tokens can be specified by regular expressions. """ def __init__(self, tokens_dict, callback): """ Initialize a new document scanner. :param tokens_dict: A dictionary whose keys are the types of...
<commit_before>import re class DocScanner(object): """ A class used to find certain tokens in a given document. The tokens can be specified by regular expressions. """ def __init__(self, tokens_dict, callback): """ Initialize a new document scanner. :param tokens_dict: A dictionary whose keys a...
import re class DocScanner(object): """ A class used to find certain tokens in a given document. The tokens can be specified by regular expressions. """ def __init__(self, tokens_dict, callback): """ Initialize a new document scanner. :param tokens_dict: A dictionary whose keys are the types of...
import re class DocScanner(object): """ A class used to find certain tokens in a given document. The tokens can be specified by regular expressions. """ def __init__(self, tokens_dict, callback): """ Initialize a new document scanner. :param tokens_dict: A dictionary whose keys are the types of...
<commit_before>import re class DocScanner(object): """ A class used to find certain tokens in a given document. The tokens can be specified by regular expressions. """ def __init__(self, tokens_dict, callback): """ Initialize a new document scanner. :param tokens_dict: A dictionary whose keys a...
114382ff9b6dad3c9ba621014dd7cd63ad49bef6
django/santropolFeast/meal/models.py
django/santropolFeast/meal/models.py
from django.db import models from django.utils.translation import ugettext_lazy as _ class Meal(models.Model): class Meta: verbose_name_plural = _('meals') # Meal information nom = models.CharField(max_length=50, verbose_name=_('name')) description = models.TextField(verbose_name=_('descript...
from django.db import models from django.utils.translation import ugettext_lazy as _ class Meal(models.Model): class Meta: verbose_name_plural = _('meals') # Meal information nom = models.CharField(max_length=50, verbose_name=_('name')) description = models.TextField(verbose_name=_('descript...
Use string representation for objects
Use string representation for objects
Python
agpl-3.0
savoirfairelinux/santropol-feast,savoirfairelinux/sous-chef,savoirfairelinux/santropol-feast,savoirfairelinux/sous-chef,madmath/sous-chef,savoirfairelinux/sous-chef,madmath/sous-chef,savoirfairelinux/santropol-feast,madmath/sous-chef
from django.db import models from django.utils.translation import ugettext_lazy as _ class Meal(models.Model): class Meta: verbose_name_plural = _('meals') # Meal information nom = models.CharField(max_length=50, verbose_name=_('name')) description = models.TextField(verbose_name=_('descript...
from django.db import models from django.utils.translation import ugettext_lazy as _ class Meal(models.Model): class Meta: verbose_name_plural = _('meals') # Meal information nom = models.CharField(max_length=50, verbose_name=_('name')) description = models.TextField(verbose_name=_('descript...
<commit_before>from django.db import models from django.utils.translation import ugettext_lazy as _ class Meal(models.Model): class Meta: verbose_name_plural = _('meals') # Meal information nom = models.CharField(max_length=50, verbose_name=_('name')) description = models.TextField(verbose_n...
from django.db import models from django.utils.translation import ugettext_lazy as _ class Meal(models.Model): class Meta: verbose_name_plural = _('meals') # Meal information nom = models.CharField(max_length=50, verbose_name=_('name')) description = models.TextField(verbose_name=_('descript...
from django.db import models from django.utils.translation import ugettext_lazy as _ class Meal(models.Model): class Meta: verbose_name_plural = _('meals') # Meal information nom = models.CharField(max_length=50, verbose_name=_('name')) description = models.TextField(verbose_name=_('descript...
<commit_before>from django.db import models from django.utils.translation import ugettext_lazy as _ class Meal(models.Model): class Meta: verbose_name_plural = _('meals') # Meal information nom = models.CharField(max_length=50, verbose_name=_('name')) description = models.TextField(verbose_n...
31eadf6cdaf70621941a6c5d269ed33f46e27cd7
check.py
check.py
""" This script can be used to check if TM1py can connect to your TM1 instance """ import getpass from distutils.util import strtobool from TM1py.Services import TM1Service # Parameters for connection user = input("TM1 User (leave empty if SSO): ") password = getpass.getpass("Password (cmd doesn't show input, leave ...
""" This script can be used to check if TM1py can connect to your TM1 instance """ import getpass from distutils.util import strtobool from TM1py.Services import TM1Service # Parameters for connection user = input("TM1 User (leave empty if SSO): ") password = getpass.getpass("Password (leave empty if SSO): ") namesp...
Return error message instead of stack and add defaults to input
Return error message instead of stack and add defaults to input
Python
mit
cubewise-code/TM1py-samples
""" This script can be used to check if TM1py can connect to your TM1 instance """ import getpass from distutils.util import strtobool from TM1py.Services import TM1Service # Parameters for connection user = input("TM1 User (leave empty if SSO): ") password = getpass.getpass("Password (cmd doesn't show input, leave ...
""" This script can be used to check if TM1py can connect to your TM1 instance """ import getpass from distutils.util import strtobool from TM1py.Services import TM1Service # Parameters for connection user = input("TM1 User (leave empty if SSO): ") password = getpass.getpass("Password (leave empty if SSO): ") namesp...
<commit_before>""" This script can be used to check if TM1py can connect to your TM1 instance """ import getpass from distutils.util import strtobool from TM1py.Services import TM1Service # Parameters for connection user = input("TM1 User (leave empty if SSO): ") password = getpass.getpass("Password (cmd doesn't sho...
""" This script can be used to check if TM1py can connect to your TM1 instance """ import getpass from distutils.util import strtobool from TM1py.Services import TM1Service # Parameters for connection user = input("TM1 User (leave empty if SSO): ") password = getpass.getpass("Password (leave empty if SSO): ") namesp...
""" This script can be used to check if TM1py can connect to your TM1 instance """ import getpass from distutils.util import strtobool from TM1py.Services import TM1Service # Parameters for connection user = input("TM1 User (leave empty if SSO): ") password = getpass.getpass("Password (cmd doesn't show input, leave ...
<commit_before>""" This script can be used to check if TM1py can connect to your TM1 instance """ import getpass from distutils.util import strtobool from TM1py.Services import TM1Service # Parameters for connection user = input("TM1 User (leave empty if SSO): ") password = getpass.getpass("Password (cmd doesn't sho...
1addfaecb6210054480aa3c1c2a42878f526e1ed
axes/management/commands/axes_reset.py
axes/management/commands/axes_reset.py
from django.core.management.base import BaseCommand from axes.utils import reset class Command(BaseCommand): help = ("resets any lockouts or failed login records. If called with an " "IP, resets only for that IP") def add_arguments(self, parser): parser.add_argument('ip', nargs='+') ...
from django.core.management.base import BaseCommand from axes.utils import reset class Command(BaseCommand): help = ("resets any lockouts or failed login records. If called with an " "IP, resets only for that IP") def add_arguments(self, parser): parser.add_argument('ip', nargs='*') ...
Make ip positional argument optional
Make ip positional argument optional
Python
mit
jazzband/django-axes,svenhertle/django-axes,django-pci/django-axes
from django.core.management.base import BaseCommand from axes.utils import reset class Command(BaseCommand): help = ("resets any lockouts or failed login records. If called with an " "IP, resets only for that IP") def add_arguments(self, parser): parser.add_argument('ip', nargs='+') ...
from django.core.management.base import BaseCommand from axes.utils import reset class Command(BaseCommand): help = ("resets any lockouts or failed login records. If called with an " "IP, resets only for that IP") def add_arguments(self, parser): parser.add_argument('ip', nargs='*') ...
<commit_before>from django.core.management.base import BaseCommand from axes.utils import reset class Command(BaseCommand): help = ("resets any lockouts or failed login records. If called with an " "IP, resets only for that IP") def add_arguments(self, parser): parser.add_argument('ip', ...
from django.core.management.base import BaseCommand from axes.utils import reset class Command(BaseCommand): help = ("resets any lockouts or failed login records. If called with an " "IP, resets only for that IP") def add_arguments(self, parser): parser.add_argument('ip', nargs='*') ...
from django.core.management.base import BaseCommand from axes.utils import reset class Command(BaseCommand): help = ("resets any lockouts or failed login records. If called with an " "IP, resets only for that IP") def add_arguments(self, parser): parser.add_argument('ip', nargs='+') ...
<commit_before>from django.core.management.base import BaseCommand from axes.utils import reset class Command(BaseCommand): help = ("resets any lockouts or failed login records. If called with an " "IP, resets only for that IP") def add_arguments(self, parser): parser.add_argument('ip', ...
759e22f8d629f76d7fca0d0567603c9ae6835fa6
api_v3/serializers/profile.py
api_v3/serializers/profile.py
from django.conf import settings from rest_framework import fields from rest_framework_json_api import serializers from api_v3.models import Profile, Ticket class ProfileSerializer(serializers.ModelSerializer): tickets_count = fields.SerializerMethodField() class Meta: model = Profile read_...
from django.conf import settings from rest_framework import fields from rest_framework_json_api import serializers from api_v3.models import Profile, Ticket class ProfileSerializer(serializers.ModelSerializer): tickets_count = fields.SerializerMethodField() class Meta: model = Profile read_...
Return sorted member centers and expense scopes.
Return sorted member centers and expense scopes.
Python
mit
occrp/id-backend
from django.conf import settings from rest_framework import fields from rest_framework_json_api import serializers from api_v3.models import Profile, Ticket class ProfileSerializer(serializers.ModelSerializer): tickets_count = fields.SerializerMethodField() class Meta: model = Profile read_...
from django.conf import settings from rest_framework import fields from rest_framework_json_api import serializers from api_v3.models import Profile, Ticket class ProfileSerializer(serializers.ModelSerializer): tickets_count = fields.SerializerMethodField() class Meta: model = Profile read_...
<commit_before>from django.conf import settings from rest_framework import fields from rest_framework_json_api import serializers from api_v3.models import Profile, Ticket class ProfileSerializer(serializers.ModelSerializer): tickets_count = fields.SerializerMethodField() class Meta: model = Profil...
from django.conf import settings from rest_framework import fields from rest_framework_json_api import serializers from api_v3.models import Profile, Ticket class ProfileSerializer(serializers.ModelSerializer): tickets_count = fields.SerializerMethodField() class Meta: model = Profile read_...
from django.conf import settings from rest_framework import fields from rest_framework_json_api import serializers from api_v3.models import Profile, Ticket class ProfileSerializer(serializers.ModelSerializer): tickets_count = fields.SerializerMethodField() class Meta: model = Profile read_...
<commit_before>from django.conf import settings from rest_framework import fields from rest_framework_json_api import serializers from api_v3.models import Profile, Ticket class ProfileSerializer(serializers.ModelSerializer): tickets_count = fields.SerializerMethodField() class Meta: model = Profil...
ecfa18b7f05a23bdc6beab705dc748559eef2873
lockdown/decorators.py
lockdown/decorators.py
from django.utils.decorators import decorator_from_middleware_with_args from lockdown.middleware import LockdownMiddleware def lockdown(*args, **kwargs): """Define a decorator based on the LockdownMiddleware. This decorator takes the same arguments as the middleware, but allows a more granular locking t...
"""Provide a decorator based on the LockdownMiddleware. This module provides a decorator that takes the same arguments as the middleware, but allows more granular locking than the middleware. """ from django.utils.decorators import decorator_from_middleware_with_args from lockdown.middleware import LockdownMiddleware...
Remove wrapping of decorator in a func
Remove wrapping of decorator in a func Growing older, growing wiser ... This removes the unnecesary wrapping of the decorator in a function introduced in e4a04c6, as it's not necessary and is less performant than without.
Python
bsd-3-clause
Dunedan/django-lockdown,Dunedan/django-lockdown
from django.utils.decorators import decorator_from_middleware_with_args from lockdown.middleware import LockdownMiddleware def lockdown(*args, **kwargs): """Define a decorator based on the LockdownMiddleware. This decorator takes the same arguments as the middleware, but allows a more granular locking t...
"""Provide a decorator based on the LockdownMiddleware. This module provides a decorator that takes the same arguments as the middleware, but allows more granular locking than the middleware. """ from django.utils.decorators import decorator_from_middleware_with_args from lockdown.middleware import LockdownMiddleware...
<commit_before>from django.utils.decorators import decorator_from_middleware_with_args from lockdown.middleware import LockdownMiddleware def lockdown(*args, **kwargs): """Define a decorator based on the LockdownMiddleware. This decorator takes the same arguments as the middleware, but allows a more gra...
"""Provide a decorator based on the LockdownMiddleware. This module provides a decorator that takes the same arguments as the middleware, but allows more granular locking than the middleware. """ from django.utils.decorators import decorator_from_middleware_with_args from lockdown.middleware import LockdownMiddleware...
from django.utils.decorators import decorator_from_middleware_with_args from lockdown.middleware import LockdownMiddleware def lockdown(*args, **kwargs): """Define a decorator based on the LockdownMiddleware. This decorator takes the same arguments as the middleware, but allows a more granular locking t...
<commit_before>from django.utils.decorators import decorator_from_middleware_with_args from lockdown.middleware import LockdownMiddleware def lockdown(*args, **kwargs): """Define a decorator based on the LockdownMiddleware. This decorator takes the same arguments as the middleware, but allows a more gra...
23604efc203f62f1059c4bd18f233cccdaf045e6
server/app_factory/create_app.py
server/app_factory/create_app.py
import wtforms_json from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy db = SQLAlchemy() def create_app(): wtforms_json.init() # Define the WSGI Application object app = Flask( __name__, template_folder="../../", static_folder="../../static" ) # Configu...
import wtforms_json from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.login import LoginManager # Create db object so it can be shared throughout the application db = SQLAlchemy() # Create the login manager to be shared throughout the application login_manager = LoginManager() def c...
Add login manager initialization to app creation method
Add login manager initialization to app creation method
Python
mit
ganemone/ontheside,ganemone/ontheside,ganemone/ontheside
import wtforms_json from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy db = SQLAlchemy() def create_app(): wtforms_json.init() # Define the WSGI Application object app = Flask( __name__, template_folder="../../", static_folder="../../static" ) # Configu...
import wtforms_json from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.login import LoginManager # Create db object so it can be shared throughout the application db = SQLAlchemy() # Create the login manager to be shared throughout the application login_manager = LoginManager() def c...
<commit_before>import wtforms_json from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy db = SQLAlchemy() def create_app(): wtforms_json.init() # Define the WSGI Application object app = Flask( __name__, template_folder="../../", static_folder="../../static" )...
import wtforms_json from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.login import LoginManager # Create db object so it can be shared throughout the application db = SQLAlchemy() # Create the login manager to be shared throughout the application login_manager = LoginManager() def c...
import wtforms_json from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy db = SQLAlchemy() def create_app(): wtforms_json.init() # Define the WSGI Application object app = Flask( __name__, template_folder="../../", static_folder="../../static" ) # Configu...
<commit_before>import wtforms_json from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy db = SQLAlchemy() def create_app(): wtforms_json.init() # Define the WSGI Application object app = Flask( __name__, template_folder="../../", static_folder="../../static" )...
2d35e48b68ff51fae09369b4a1a00d7599c454c1
common/djangoapps/util/json_request.py
common/djangoapps/util/json_request.py
from functools import wraps import copy import json def expect_json(view_function): @wraps(view_function) def expect_json_with_cloned_request(request, *args, **kwargs): if request.META['CONTENT_TYPE'] == "application/json": cloned_request = copy.copy(request) cloned_request.POS...
from functools import wraps import copy import json def expect_json(view_function): @wraps(view_function) def expect_json_with_cloned_request(request, *args, **kwargs): # cdodge: fix postback errors in CMS. The POST 'content-type' header can include additional information # e.g. 'charset', so ...
Fix JSON postback error where the content-type header line can contain more info than just the application/json descriptor. Now we just to a compare on the start of the header value.
Fix JSON postback error where the content-type header line can contain more info than just the application/json descriptor. Now we just to a compare on the start of the header value.
Python
agpl-3.0
10clouds/edx-platform,chrisndodge/edx-platform,beacloudgenius/edx-platform,ahmadio/edx-platform,devs1991/test_edx_docmode,jzoldak/edx-platform,rismalrv/edx-platform,beacloudgenius/edx-platform,kmoocdev2/edx-platform,vismartltd/edx-platform,beni55/edx-platform,auferack08/edx-platform,adoosii/edx-platform,ferabra/edx-pla...
from functools import wraps import copy import json def expect_json(view_function): @wraps(view_function) def expect_json_with_cloned_request(request, *args, **kwargs): if request.META['CONTENT_TYPE'] == "application/json": cloned_request = copy.copy(request) cloned_request.POS...
from functools import wraps import copy import json def expect_json(view_function): @wraps(view_function) def expect_json_with_cloned_request(request, *args, **kwargs): # cdodge: fix postback errors in CMS. The POST 'content-type' header can include additional information # e.g. 'charset', so ...
<commit_before>from functools import wraps import copy import json def expect_json(view_function): @wraps(view_function) def expect_json_with_cloned_request(request, *args, **kwargs): if request.META['CONTENT_TYPE'] == "application/json": cloned_request = copy.copy(request) clo...
from functools import wraps import copy import json def expect_json(view_function): @wraps(view_function) def expect_json_with_cloned_request(request, *args, **kwargs): # cdodge: fix postback errors in CMS. The POST 'content-type' header can include additional information # e.g. 'charset', so ...
from functools import wraps import copy import json def expect_json(view_function): @wraps(view_function) def expect_json_with_cloned_request(request, *args, **kwargs): if request.META['CONTENT_TYPE'] == "application/json": cloned_request = copy.copy(request) cloned_request.POS...
<commit_before>from functools import wraps import copy import json def expect_json(view_function): @wraps(view_function) def expect_json_with_cloned_request(request, *args, **kwargs): if request.META['CONTENT_TYPE'] == "application/json": cloned_request = copy.copy(request) clo...
ed271823e5a5f957b17f00fd4823b6ae0b973e83
scripts/seam.py
scripts/seam.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Produces IPHAS Data Release 2 using an MPI computing cluster.""" from IPython import parallel from astropy import log __author__ = 'Geert Barentsen' # Create the cluster view client = parallel.Client('/home/gb/.config/ipython/profile_mpi/security/ipcontroller-seaming-c...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Produces IPHAS Data Release 2 using an MPI computing cluster.""" from IPython import parallel from astropy import log __author__ = 'Geert Barentsen' # Create the cluster view client = parallel.Client('/home/gb/.config/ipython/profile_mpi/security/ipcontroller-seaming-c...
Allow Glazebrook to be executed in a multi-pass fashion + parallelise
Allow Glazebrook to be executed in a multi-pass fashion + parallelise
Python
mit
barentsen/iphas-dr2,barentsen/iphas-dr2,barentsen/iphas-dr2
#!/usr/bin/env python # -*- coding: utf-8 -*- """Produces IPHAS Data Release 2 using an MPI computing cluster.""" from IPython import parallel from astropy import log __author__ = 'Geert Barentsen' # Create the cluster view client = parallel.Client('/home/gb/.config/ipython/profile_mpi/security/ipcontroller-seaming-c...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Produces IPHAS Data Release 2 using an MPI computing cluster.""" from IPython import parallel from astropy import log __author__ = 'Geert Barentsen' # Create the cluster view client = parallel.Client('/home/gb/.config/ipython/profile_mpi/security/ipcontroller-seaming-c...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """Produces IPHAS Data Release 2 using an MPI computing cluster.""" from IPython import parallel from astropy import log __author__ = 'Geert Barentsen' # Create the cluster view client = parallel.Client('/home/gb/.config/ipython/profile_mpi/security/ipcontr...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Produces IPHAS Data Release 2 using an MPI computing cluster.""" from IPython import parallel from astropy import log __author__ = 'Geert Barentsen' # Create the cluster view client = parallel.Client('/home/gb/.config/ipython/profile_mpi/security/ipcontroller-seaming-c...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Produces IPHAS Data Release 2 using an MPI computing cluster.""" from IPython import parallel from astropy import log __author__ = 'Geert Barentsen' # Create the cluster view client = parallel.Client('/home/gb/.config/ipython/profile_mpi/security/ipcontroller-seaming-c...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """Produces IPHAS Data Release 2 using an MPI computing cluster.""" from IPython import parallel from astropy import log __author__ = 'Geert Barentsen' # Create the cluster view client = parallel.Client('/home/gb/.config/ipython/profile_mpi/security/ipcontr...
b51c8d107b6da5d6d6b0cc5a1db525bff856a1cf
AgileCLU/tests/__init__.py
AgileCLU/tests/__init__.py
#!/usr/bin/env python import AgileCLU import unittest class AgileCLUTestCase(unittest.TestCase): def setup(self): self.agileclu = AgileCLU() def test_epwbasekey(self): return def test_e_pw_hash(self): return def test_e_pw_dehash(self): return if __name__ == "__main__": unittest.main()
#!/usr/bin/env python import unittest import AgileCLU class AgileCLUTestCase(unittest.TestCase): def test_epwbasekey(self): hash=AgileCLU.epwbasekey('test', 'test', 'test.example.com', '/') self.assertEqual(hash, 'AbiDicIBaEuvafIuegJWVP8j') def test_e_pw_hash(self): hash=AgileCLU.e_pw_hash('teststr',...
Add basic asserts for hashing helper functions.
Add basic asserts for hashing helper functions.
Python
bsd-2-clause
wylieswanson/AgileCLU
#!/usr/bin/env python import AgileCLU import unittest class AgileCLUTestCase(unittest.TestCase): def setup(self): self.agileclu = AgileCLU() def test_epwbasekey(self): return def test_e_pw_hash(self): return def test_e_pw_dehash(self): return if __name__ == "__main__": unittest.main() Add b...
#!/usr/bin/env python import unittest import AgileCLU class AgileCLUTestCase(unittest.TestCase): def test_epwbasekey(self): hash=AgileCLU.epwbasekey('test', 'test', 'test.example.com', '/') self.assertEqual(hash, 'AbiDicIBaEuvafIuegJWVP8j') def test_e_pw_hash(self): hash=AgileCLU.e_pw_hash('teststr',...
<commit_before>#!/usr/bin/env python import AgileCLU import unittest class AgileCLUTestCase(unittest.TestCase): def setup(self): self.agileclu = AgileCLU() def test_epwbasekey(self): return def test_e_pw_hash(self): return def test_e_pw_dehash(self): return if __name__ == "__main__": unitte...
#!/usr/bin/env python import unittest import AgileCLU class AgileCLUTestCase(unittest.TestCase): def test_epwbasekey(self): hash=AgileCLU.epwbasekey('test', 'test', 'test.example.com', '/') self.assertEqual(hash, 'AbiDicIBaEuvafIuegJWVP8j') def test_e_pw_hash(self): hash=AgileCLU.e_pw_hash('teststr',...
#!/usr/bin/env python import AgileCLU import unittest class AgileCLUTestCase(unittest.TestCase): def setup(self): self.agileclu = AgileCLU() def test_epwbasekey(self): return def test_e_pw_hash(self): return def test_e_pw_dehash(self): return if __name__ == "__main__": unittest.main() Add b...
<commit_before>#!/usr/bin/env python import AgileCLU import unittest class AgileCLUTestCase(unittest.TestCase): def setup(self): self.agileclu = AgileCLU() def test_epwbasekey(self): return def test_e_pw_hash(self): return def test_e_pw_dehash(self): return if __name__ == "__main__": unitte...
52c5f4ddfde8db6179f11c3bec2bc8be69eed238
flake8_docstrings.py
flake8_docstrings.py
# -*- coding: utf-8 -*- """pep257 docstrings convention needs error code and class parser for be included as module into flake8 """ import pep257 __version__ = '0.2.1.post1' class pep257Checker(object): """flake8 needs a class to check python file.""" name = 'pep257' version = __version__ def __in...
# -*- coding: utf-8 -*- """pep257 docstrings convention needs error code and class parser for be included as module into flake8 """ import io import pep8 import pep257 __version__ = '0.2.1.post1' class pep257Checker(object): """flake8 needs a class to check python file.""" name = 'pep257' version = __...
Handle stdin in the plugin
Handle stdin in the plugin Closes #2
Python
mit
PyCQA/flake8-docstrings
# -*- coding: utf-8 -*- """pep257 docstrings convention needs error code and class parser for be included as module into flake8 """ import pep257 __version__ = '0.2.1.post1' class pep257Checker(object): """flake8 needs a class to check python file.""" name = 'pep257' version = __version__ def __in...
# -*- coding: utf-8 -*- """pep257 docstrings convention needs error code and class parser for be included as module into flake8 """ import io import pep8 import pep257 __version__ = '0.2.1.post1' class pep257Checker(object): """flake8 needs a class to check python file.""" name = 'pep257' version = __...
<commit_before># -*- coding: utf-8 -*- """pep257 docstrings convention needs error code and class parser for be included as module into flake8 """ import pep257 __version__ = '0.2.1.post1' class pep257Checker(object): """flake8 needs a class to check python file.""" name = 'pep257' version = __version_...
# -*- coding: utf-8 -*- """pep257 docstrings convention needs error code and class parser for be included as module into flake8 """ import io import pep8 import pep257 __version__ = '0.2.1.post1' class pep257Checker(object): """flake8 needs a class to check python file.""" name = 'pep257' version = __...
# -*- coding: utf-8 -*- """pep257 docstrings convention needs error code and class parser for be included as module into flake8 """ import pep257 __version__ = '0.2.1.post1' class pep257Checker(object): """flake8 needs a class to check python file.""" name = 'pep257' version = __version__ def __in...
<commit_before># -*- coding: utf-8 -*- """pep257 docstrings convention needs error code and class parser for be included as module into flake8 """ import pep257 __version__ = '0.2.1.post1' class pep257Checker(object): """flake8 needs a class to check python file.""" name = 'pep257' version = __version_...
017ba0d18acb83a5135dd7a23c085b3c93d539b3
linkatos/message.py
linkatos/message.py
import re link_re = re.compile("https?://\S+(\s|$)") def extract_url(message): """ Returns the first url in a message. If there aren't any returns None """ answer = link_re.search(message) if answer is not None: answer = answer.group(0).strip() return answer
import re link_re = re.compile("(\s|^)<(https?://[\w./?+]+)>(\s|$)") def extract_url(message): """ Returns the first url in a message. If there aren't any returns None """ answer = link_re.search(message) if answer is not None: answer = answer.group(2).strip() return answer
Change regex to adapt to the <url> format
fix: Change regex to adapt to the <url> format
Python
mit
iwi/linkatos,iwi/linkatos
import re link_re = re.compile("https?://\S+(\s|$)") def extract_url(message): """ Returns the first url in a message. If there aren't any returns None """ answer = link_re.search(message) if answer is not None: answer = answer.group(0).strip() return answer fix: Change regex to ada...
import re link_re = re.compile("(\s|^)<(https?://[\w./?+]+)>(\s|$)") def extract_url(message): """ Returns the first url in a message. If there aren't any returns None """ answer = link_re.search(message) if answer is not None: answer = answer.group(2).strip() return answer
<commit_before>import re link_re = re.compile("https?://\S+(\s|$)") def extract_url(message): """ Returns the first url in a message. If there aren't any returns None """ answer = link_re.search(message) if answer is not None: answer = answer.group(0).strip() return answer <commit_m...
import re link_re = re.compile("(\s|^)<(https?://[\w./?+]+)>(\s|$)") def extract_url(message): """ Returns the first url in a message. If there aren't any returns None """ answer = link_re.search(message) if answer is not None: answer = answer.group(2).strip() return answer
import re link_re = re.compile("https?://\S+(\s|$)") def extract_url(message): """ Returns the first url in a message. If there aren't any returns None """ answer = link_re.search(message) if answer is not None: answer = answer.group(0).strip() return answer fix: Change regex to ada...
<commit_before>import re link_re = re.compile("https?://\S+(\s|$)") def extract_url(message): """ Returns the first url in a message. If there aren't any returns None """ answer = link_re.search(message) if answer is not None: answer = answer.group(0).strip() return answer <commit_m...
bfdd095d501c6760e6623aedf3525ba4e21d1637
jarviscli/tests/test_auto/test_lyrics.py
jarviscli/tests/test_auto/test_lyrics.py
import unittest import os from mock import call, patch from packages.lyrics import lyrics #TODO: add tests for PyLyricsClone class Lyrics_Test(unittest.TestCase): def setUp(self): self.song_name = "everybody dies" self.artist_name = "ayreon" self.complete_info = "everybody dies-ayreon" ...
import unittest import os from mock import call, patch from packages.lyrics import lyrics #TODO: add tests for PyLyricsClone class Lyrics_Test(unittest.TestCase): def setUp(self): self.song_name = "everybody dies" self.artist_name = "ayreon" self.complete_info = "everybody dies-ayreon" ...
Remove old assert that was wrong
Remove old assert that was wrong
Python
mit
sukeesh/Jarvis,appi147/Jarvis,sukeesh/Jarvis,appi147/Jarvis,sukeesh/Jarvis,sukeesh/Jarvis
import unittest import os from mock import call, patch from packages.lyrics import lyrics #TODO: add tests for PyLyricsClone class Lyrics_Test(unittest.TestCase): def setUp(self): self.song_name = "everybody dies" self.artist_name = "ayreon" self.complete_info = "everybody dies-ayreon" ...
import unittest import os from mock import call, patch from packages.lyrics import lyrics #TODO: add tests for PyLyricsClone class Lyrics_Test(unittest.TestCase): def setUp(self): self.song_name = "everybody dies" self.artist_name = "ayreon" self.complete_info = "everybody dies-ayreon" ...
<commit_before>import unittest import os from mock import call, patch from packages.lyrics import lyrics #TODO: add tests for PyLyricsClone class Lyrics_Test(unittest.TestCase): def setUp(self): self.song_name = "everybody dies" self.artist_name = "ayreon" self.complete_info = "everybody d...
import unittest import os from mock import call, patch from packages.lyrics import lyrics #TODO: add tests for PyLyricsClone class Lyrics_Test(unittest.TestCase): def setUp(self): self.song_name = "everybody dies" self.artist_name = "ayreon" self.complete_info = "everybody dies-ayreon" ...
import unittest import os from mock import call, patch from packages.lyrics import lyrics #TODO: add tests for PyLyricsClone class Lyrics_Test(unittest.TestCase): def setUp(self): self.song_name = "everybody dies" self.artist_name = "ayreon" self.complete_info = "everybody dies-ayreon" ...
<commit_before>import unittest import os from mock import call, patch from packages.lyrics import lyrics #TODO: add tests for PyLyricsClone class Lyrics_Test(unittest.TestCase): def setUp(self): self.song_name = "everybody dies" self.artist_name = "ayreon" self.complete_info = "everybody d...
4c4f4e3e5f1e92d0acdaf1598d4f9716bcd09727
app/users/models.py
app/users/models.py
from datetime import datetime from app import db, bcrypt from app.utils.misc import make_code class User(db.Model): id = db.Column(db.Integer(), primary_key=True) email = db.Column(db.String(255), unique=True) password = db.Column(db.String(255)) active = db.Column(db.Boolean()) is_admin = db.Co...
from datetime import datetime, timedelta from app import db, bcrypt from app.utils.misc import make_code def expiration_date(): return datetime.now() + timedelta(days=1) class User(db.Model): id = db.Column(db.Integer(), primary_key=True) email = db.Column(db.String(255), unique=True) password = d...
Put pw reset expiration date in future
Put pw reset expiration date in future
Python
mit
projectweekend/Flask-PostgreSQL-API-Seed
from datetime import datetime from app import db, bcrypt from app.utils.misc import make_code class User(db.Model): id = db.Column(db.Integer(), primary_key=True) email = db.Column(db.String(255), unique=True) password = db.Column(db.String(255)) active = db.Column(db.Boolean()) is_admin = db.Co...
from datetime import datetime, timedelta from app import db, bcrypt from app.utils.misc import make_code def expiration_date(): return datetime.now() + timedelta(days=1) class User(db.Model): id = db.Column(db.Integer(), primary_key=True) email = db.Column(db.String(255), unique=True) password = d...
<commit_before>from datetime import datetime from app import db, bcrypt from app.utils.misc import make_code class User(db.Model): id = db.Column(db.Integer(), primary_key=True) email = db.Column(db.String(255), unique=True) password = db.Column(db.String(255)) active = db.Column(db.Boolean()) i...
from datetime import datetime, timedelta from app import db, bcrypt from app.utils.misc import make_code def expiration_date(): return datetime.now() + timedelta(days=1) class User(db.Model): id = db.Column(db.Integer(), primary_key=True) email = db.Column(db.String(255), unique=True) password = d...
from datetime import datetime from app import db, bcrypt from app.utils.misc import make_code class User(db.Model): id = db.Column(db.Integer(), primary_key=True) email = db.Column(db.String(255), unique=True) password = db.Column(db.String(255)) active = db.Column(db.Boolean()) is_admin = db.Co...
<commit_before>from datetime import datetime from app import db, bcrypt from app.utils.misc import make_code class User(db.Model): id = db.Column(db.Integer(), primary_key=True) email = db.Column(db.String(255), unique=True) password = db.Column(db.String(255)) active = db.Column(db.Boolean()) i...
5f88686bdd089d67192f75eac9d3f46effad2983
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Sergey Margaritov # Copyright (c) 2013 Sergey Margaritov # # License: MIT # """This module exports the scss-lint plugin linter class.""" import os from SublimeLinter.lint import RubyLinter, util class Scss(RubyLin...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Sergey Margaritov # Copyright (c) 2013 Sergey Margaritov # # License: MIT # """This module exports the scss-lint plugin linter class.""" import os from SublimeLinter.lint import RubyLinter, util class Scss(RubyLin...
Fix regex for different output from scss-lint 0.49.0
Fix regex for different output from scss-lint 0.49.0
Python
mit
attenzione/SublimeLinter-scss-lint
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Sergey Margaritov # Copyright (c) 2013 Sergey Margaritov # # License: MIT # """This module exports the scss-lint plugin linter class.""" import os from SublimeLinter.lint import RubyLinter, util class Scss(RubyLin...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Sergey Margaritov # Copyright (c) 2013 Sergey Margaritov # # License: MIT # """This module exports the scss-lint plugin linter class.""" import os from SublimeLinter.lint import RubyLinter, util class Scss(RubyLin...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Sergey Margaritov # Copyright (c) 2013 Sergey Margaritov # # License: MIT # """This module exports the scss-lint plugin linter class.""" import os from SublimeLinter.lint import RubyLinter, util cla...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Sergey Margaritov # Copyright (c) 2013 Sergey Margaritov # # License: MIT # """This module exports the scss-lint plugin linter class.""" import os from SublimeLinter.lint import RubyLinter, util class Scss(RubyLin...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Sergey Margaritov # Copyright (c) 2013 Sergey Margaritov # # License: MIT # """This module exports the scss-lint plugin linter class.""" import os from SublimeLinter.lint import RubyLinter, util class Scss(RubyLin...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Sergey Margaritov # Copyright (c) 2013 Sergey Margaritov # # License: MIT # """This module exports the scss-lint plugin linter class.""" import os from SublimeLinter.lint import RubyLinter, util cla...
cbbb59aa42676a9adfe25344437cc4284afcac73
main.py
main.py
from flask import Flask, render_template, redirect import json app = Flask(__name__) with open("modules.json", 'r') as fp: layout = json.load(fp) @app.route('/') def main(): return redirect("content/start/", code=302) @app.route('/content/start/') def start(): return render_template("start.html", start_l...
from flask import Flask, render_template, redirect import json app = Flask(__name__) with open("modules.json", 'r') as fp: layout = json.load(fp) @app.route('/') def main(): return redirect("start/", code=302) @app.route('/start/') def start(): return render_template("start.html", start_link = layout["st...
Modify URLs for start and end
Modify URLs for start and end
Python
mit
grenmester/hunt-master,grenmester/hunt-master,grenmester/hunt-master,grenmester/hunt-master,grenmester/hunt-master
from flask import Flask, render_template, redirect import json app = Flask(__name__) with open("modules.json", 'r') as fp: layout = json.load(fp) @app.route('/') def main(): return redirect("content/start/", code=302) @app.route('/content/start/') def start(): return render_template("start.html", start_l...
from flask import Flask, render_template, redirect import json app = Flask(__name__) with open("modules.json", 'r') as fp: layout = json.load(fp) @app.route('/') def main(): return redirect("start/", code=302) @app.route('/start/') def start(): return render_template("start.html", start_link = layout["st...
<commit_before>from flask import Flask, render_template, redirect import json app = Flask(__name__) with open("modules.json", 'r') as fp: layout = json.load(fp) @app.route('/') def main(): return redirect("content/start/", code=302) @app.route('/content/start/') def start(): return render_template("start...
from flask import Flask, render_template, redirect import json app = Flask(__name__) with open("modules.json", 'r') as fp: layout = json.load(fp) @app.route('/') def main(): return redirect("start/", code=302) @app.route('/start/') def start(): return render_template("start.html", start_link = layout["st...
from flask import Flask, render_template, redirect import json app = Flask(__name__) with open("modules.json", 'r') as fp: layout = json.load(fp) @app.route('/') def main(): return redirect("content/start/", code=302) @app.route('/content/start/') def start(): return render_template("start.html", start_l...
<commit_before>from flask import Flask, render_template, redirect import json app = Flask(__name__) with open("modules.json", 'r') as fp: layout = json.load(fp) @app.route('/') def main(): return redirect("content/start/", code=302) @app.route('/content/start/') def start(): return render_template("start...
4f64f04a2fbbd2b25c38c9e0171be6eeaff070cf
main.py
main.py
#!/usr/bin/env python from blinkenlights import setup, cleanup from fourleds import light, clear from time import sleep pins = [32, 22, 18, 16] # blu grn red yel for p in pins: setup(p) for i in range(20): for p in [32, 22, 18, 16, 18, 22, 32]: clear(pins) light(p) sleep(0.07) ...
#!/usr/bin/env python from blinkenlights import setup, cleanup from fourleds import light, clear from time import sleep from random import randint pins = [32, 22, 18, 16] # blu grn red yel for p in pins: setup(p) for i in range(20): k1 = randint(5, 10) * 0.01 k2 = randint(5, 20) * 0.1 for p in...
Add pleasant surprises in timing
Add pleasant surprises in timing
Python
mit
zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie
#!/usr/bin/env python from blinkenlights import setup, cleanup from fourleds import light, clear from time import sleep pins = [32, 22, 18, 16] # blu grn red yel for p in pins: setup(p) for i in range(20): for p in [32, 22, 18, 16, 18, 22, 32]: clear(pins) light(p) sleep(0.07) ...
#!/usr/bin/env python from blinkenlights import setup, cleanup from fourleds import light, clear from time import sleep from random import randint pins = [32, 22, 18, 16] # blu grn red yel for p in pins: setup(p) for i in range(20): k1 = randint(5, 10) * 0.01 k2 = randint(5, 20) * 0.1 for p in...
<commit_before>#!/usr/bin/env python from blinkenlights import setup, cleanup from fourleds import light, clear from time import sleep pins = [32, 22, 18, 16] # blu grn red yel for p in pins: setup(p) for i in range(20): for p in [32, 22, 18, 16, 18, 22, 32]: clear(pins) light(p) ...
#!/usr/bin/env python from blinkenlights import setup, cleanup from fourleds import light, clear from time import sleep from random import randint pins = [32, 22, 18, 16] # blu grn red yel for p in pins: setup(p) for i in range(20): k1 = randint(5, 10) * 0.01 k2 = randint(5, 20) * 0.1 for p in...
#!/usr/bin/env python from blinkenlights import setup, cleanup from fourleds import light, clear from time import sleep pins = [32, 22, 18, 16] # blu grn red yel for p in pins: setup(p) for i in range(20): for p in [32, 22, 18, 16, 18, 22, 32]: clear(pins) light(p) sleep(0.07) ...
<commit_before>#!/usr/bin/env python from blinkenlights import setup, cleanup from fourleds import light, clear from time import sleep pins = [32, 22, 18, 16] # blu grn red yel for p in pins: setup(p) for i in range(20): for p in [32, 22, 18, 16, 18, 22, 32]: clear(pins) light(p) ...
1a150cb57171212358b84e351a0c073baa83d9fd
Home/xsOros.py
Home/xsOros.py
def checkio(array): if array[0][0] == array[0][1] == array[0][2] or array[0][0] == array[1][0] == array[2][0] or array[0][0] == array[1][1] == array[2][2]: return array[0][0] if array[1][0] == array[1][1] == array[1][2] or array[0][1] == array[1][1] == array[2][1] or array[2][0] == array[1][1] == array[...
def checkio(array): if (array[0][0] == array[0][1] == array[0][2] or array[0][0] == array[1][0] == array[2][0] or array[0][0] == array[1][1] == array[2][2]) and array[0][0] != '.': return array[0][0] if (array[1][0] == array[1][1] == array[1][2] or array[0][1] == array[1][1] == array[2][1] or array[2][0...
Fix the issue on Xs or Os problem.
Fix the issue on Xs or Os problem.
Python
mit
edwardzhu/checkio-solution
def checkio(array): if array[0][0] == array[0][1] == array[0][2] or array[0][0] == array[1][0] == array[2][0] or array[0][0] == array[1][1] == array[2][2]: return array[0][0] if array[1][0] == array[1][1] == array[1][2] or array[0][1] == array[1][1] == array[2][1] or array[2][0] == array[1][1] == array[...
def checkio(array): if (array[0][0] == array[0][1] == array[0][2] or array[0][0] == array[1][0] == array[2][0] or array[0][0] == array[1][1] == array[2][2]) and array[0][0] != '.': return array[0][0] if (array[1][0] == array[1][1] == array[1][2] or array[0][1] == array[1][1] == array[2][1] or array[2][0...
<commit_before>def checkio(array): if array[0][0] == array[0][1] == array[0][2] or array[0][0] == array[1][0] == array[2][0] or array[0][0] == array[1][1] == array[2][2]: return array[0][0] if array[1][0] == array[1][1] == array[1][2] or array[0][1] == array[1][1] == array[2][1] or array[2][0] == array[...
def checkio(array): if (array[0][0] == array[0][1] == array[0][2] or array[0][0] == array[1][0] == array[2][0] or array[0][0] == array[1][1] == array[2][2]) and array[0][0] != '.': return array[0][0] if (array[1][0] == array[1][1] == array[1][2] or array[0][1] == array[1][1] == array[2][1] or array[2][0...
def checkio(array): if array[0][0] == array[0][1] == array[0][2] or array[0][0] == array[1][0] == array[2][0] or array[0][0] == array[1][1] == array[2][2]: return array[0][0] if array[1][0] == array[1][1] == array[1][2] or array[0][1] == array[1][1] == array[2][1] or array[2][0] == array[1][1] == array[...
<commit_before>def checkio(array): if array[0][0] == array[0][1] == array[0][2] or array[0][0] == array[1][0] == array[2][0] or array[0][0] == array[1][1] == array[2][2]: return array[0][0] if array[1][0] == array[1][1] == array[1][2] or array[0][1] == array[1][1] == array[2][1] or array[2][0] == array[...
71e36134d23ecca8eacd9ae9549b75c460227e53
manifest-parser.py
manifest-parser.py
#!/usr/bin/env python import sys import re bugre = re.compile("bug\\s+(\\d+)", re.I); def searchFile(f, path): first = True section = '' for l in f.readlines(): # Skip trailing/leading whitespace s = l.strip() # We don't care about top-level comments if len(s) < 2 or s[0...
#!/usr/bin/env python import sys import re bugre = re.compile("bug\\s+(\\d+)", re.I); def searchFile(f): path = f.name first = True section = '' for l in f.readlines(): # Skip trailing/leading whitespace s = l.strip() # We don't care about top-level comments if len(s...
Stop passing redundant data around
Stop passing redundant data around
Python
mit
mrbkap/disabled-e10s-finder,mrbkap/disabled-e10s-finder
#!/usr/bin/env python import sys import re bugre = re.compile("bug\\s+(\\d+)", re.I); def searchFile(f, path): first = True section = '' for l in f.readlines(): # Skip trailing/leading whitespace s = l.strip() # We don't care about top-level comments if len(s) < 2 or s[0...
#!/usr/bin/env python import sys import re bugre = re.compile("bug\\s+(\\d+)", re.I); def searchFile(f): path = f.name first = True section = '' for l in f.readlines(): # Skip trailing/leading whitespace s = l.strip() # We don't care about top-level comments if len(s...
<commit_before>#!/usr/bin/env python import sys import re bugre = re.compile("bug\\s+(\\d+)", re.I); def searchFile(f, path): first = True section = '' for l in f.readlines(): # Skip trailing/leading whitespace s = l.strip() # We don't care about top-level comments if le...
#!/usr/bin/env python import sys import re bugre = re.compile("bug\\s+(\\d+)", re.I); def searchFile(f): path = f.name first = True section = '' for l in f.readlines(): # Skip trailing/leading whitespace s = l.strip() # We don't care about top-level comments if len(s...
#!/usr/bin/env python import sys import re bugre = re.compile("bug\\s+(\\d+)", re.I); def searchFile(f, path): first = True section = '' for l in f.readlines(): # Skip trailing/leading whitespace s = l.strip() # We don't care about top-level comments if len(s) < 2 or s[0...
<commit_before>#!/usr/bin/env python import sys import re bugre = re.compile("bug\\s+(\\d+)", re.I); def searchFile(f, path): first = True section = '' for l in f.readlines(): # Skip trailing/leading whitespace s = l.strip() # We don't care about top-level comments if le...
68c20c259834fa11b9e3e514c918c1776775ad12
src/geni/am/fakevm.py
src/geni/am/fakevm.py
#---------------------------------------------------------------------- # Copyright (c) 2011 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, including witho...
#---------------------------------------------------------------------- # Copyright (c) 2011 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, including witho...
Fix keyword arg in deallocate cascade.
Fix keyword arg in deallocate cascade.
Python
mit
ahelsing/geni-tools,tcmitchell/geni-tools,GENI-NSF/gram,plantigrade/geni-tools,GENI-NSF/gram,tcmitchell/geni-tools,ahelsing/geni-tools,GENI-NSF/gram,plantigrade/geni-tools
#---------------------------------------------------------------------- # Copyright (c) 2011 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, including witho...
#---------------------------------------------------------------------- # Copyright (c) 2011 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, including witho...
<commit_before>#---------------------------------------------------------------------- # Copyright (c) 2011 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, ...
#---------------------------------------------------------------------- # Copyright (c) 2011 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, including witho...
#---------------------------------------------------------------------- # Copyright (c) 2011 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, including witho...
<commit_before>#---------------------------------------------------------------------- # Copyright (c) 2011 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, ...
359cbd7b45289e364ad262f09dd3d3ef3932eb76
manage.py
manage.py
#!/usr/bin/env python import os import sys from website.app import init_app if __name__ == "__main__": os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.base.settings') from django.core.management import execute_from_command_line init_app(set_backends=True, routes=False, mfr=False, attach_request_han...
#!/usr/bin/env python import os import sys from website.app import init_app if __name__ == "__main__": os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.base.settings') from django.core.management import execute_from_command_line init_app(set_backends=True, routes=False, attach_request_handlers=False...
Remove mfr kwarg from app init so the API will run
Remove mfr kwarg from app init so the API will run
Python
apache-2.0
alexschiller/osf.io,Ghalko/osf.io,dplorimer/osf,mluo613/osf.io,CenterForOpenScience/osf.io,ZobairAlijan/osf.io,cldershem/osf.io,ticklemepierce/osf.io,chennan47/osf.io,aaxelb/osf.io,rdhyee/osf.io,abought/osf.io,crcresearch/osf.io,KAsante95/osf.io,mattclark/osf.io,lyndsysimon/osf.io,brianjgeiger/osf.io,amyshi188/osf.io,j...
#!/usr/bin/env python import os import sys from website.app import init_app if __name__ == "__main__": os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.base.settings') from django.core.management import execute_from_command_line init_app(set_backends=True, routes=False, mfr=False, attach_request_han...
#!/usr/bin/env python import os import sys from website.app import init_app if __name__ == "__main__": os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.base.settings') from django.core.management import execute_from_command_line init_app(set_backends=True, routes=False, attach_request_handlers=False...
<commit_before>#!/usr/bin/env python import os import sys from website.app import init_app if __name__ == "__main__": os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.base.settings') from django.core.management import execute_from_command_line init_app(set_backends=True, routes=False, mfr=False, att...
#!/usr/bin/env python import os import sys from website.app import init_app if __name__ == "__main__": os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.base.settings') from django.core.management import execute_from_command_line init_app(set_backends=True, routes=False, attach_request_handlers=False...
#!/usr/bin/env python import os import sys from website.app import init_app if __name__ == "__main__": os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.base.settings') from django.core.management import execute_from_command_line init_app(set_backends=True, routes=False, mfr=False, attach_request_han...
<commit_before>#!/usr/bin/env python import os import sys from website.app import init_app if __name__ == "__main__": os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api.base.settings') from django.core.management import execute_from_command_line init_app(set_backends=True, routes=False, mfr=False, att...
6a8753bcc8f1090e93b1f690bead4fda8e810d76
hackingweek/decorators.py
hackingweek/decorators.py
from django.contrib.auth.decorators import user_passes_test, login_required from hackingweek.models import Team has_no_team = user_passes_test(lambda u: u.team_set.all().count() == 0) def has_no_team_required(view_func): decorated_view_func = login_required(has_no_team(view_func)) return decorated_view_func ...
from django.contrib.auth.decorators import user_passes_test, login_required from hackingweek.models import Team has_no_team = user_passes_test(lambda u: u.team_set.all().count() == 0) def has_no_team_required(view_func): decorated_view_func = login_required(has_no_team(view_func)) return decorated_view_func ...
Allow users with more than one team to quit a team
Allow users with more than one team to quit a team
Python
bsd-2-clause
perror/hackingweek,perror/hackingweek,perror/hackingweek
from django.contrib.auth.decorators import user_passes_test, login_required from hackingweek.models import Team has_no_team = user_passes_test(lambda u: u.team_set.all().count() == 0) def has_no_team_required(view_func): decorated_view_func = login_required(has_no_team(view_func)) return decorated_view_func ...
from django.contrib.auth.decorators import user_passes_test, login_required from hackingweek.models import Team has_no_team = user_passes_test(lambda u: u.team_set.all().count() == 0) def has_no_team_required(view_func): decorated_view_func = login_required(has_no_team(view_func)) return decorated_view_func ...
<commit_before>from django.contrib.auth.decorators import user_passes_test, login_required from hackingweek.models import Team has_no_team = user_passes_test(lambda u: u.team_set.all().count() == 0) def has_no_team_required(view_func): decorated_view_func = login_required(has_no_team(view_func)) return decor...
from django.contrib.auth.decorators import user_passes_test, login_required from hackingweek.models import Team has_no_team = user_passes_test(lambda u: u.team_set.all().count() == 0) def has_no_team_required(view_func): decorated_view_func = login_required(has_no_team(view_func)) return decorated_view_func ...
from django.contrib.auth.decorators import user_passes_test, login_required from hackingweek.models import Team has_no_team = user_passes_test(lambda u: u.team_set.all().count() == 0) def has_no_team_required(view_func): decorated_view_func = login_required(has_no_team(view_func)) return decorated_view_func ...
<commit_before>from django.contrib.auth.decorators import user_passes_test, login_required from hackingweek.models import Team has_no_team = user_passes_test(lambda u: u.team_set.all().count() == 0) def has_no_team_required(view_func): decorated_view_func = login_required(has_no_team(view_func)) return decor...
f1957185f0d93861a8ed319223f574df8f4e838f
src/graphql_relay/node/plural.py
src/graphql_relay/node/plural.py
from typing import Any, Callable from graphql.type import ( GraphQLArgument, GraphQLField, GraphQLInputType, GraphQLOutputType, GraphQLList, GraphQLNonNull, GraphQLResolveInfo, ) def plural_identifying_root_field( arg_name: str, input_type: GraphQLInputType, output_type: Graph...
from typing import Any, Callable from graphql.type import ( GraphQLArgument, GraphQLField, GraphQLInputType, GraphQLOutputType, GraphQLList, GraphQLNonNull, GraphQLResolveInfo, is_non_null_type, ) def plural_identifying_root_field( arg_name: str, input_type: GraphQLInputType, ...
Use graphql's predicate function instead of 'isinstance'
Use graphql's predicate function instead of 'isinstance' Replicates graphql/graphql-relay-js@5b428507ef246be7ca3afb3589c410874a57f9bc
Python
mit
graphql-python/graphql-relay-py
from typing import Any, Callable from graphql.type import ( GraphQLArgument, GraphQLField, GraphQLInputType, GraphQLOutputType, GraphQLList, GraphQLNonNull, GraphQLResolveInfo, ) def plural_identifying_root_field( arg_name: str, input_type: GraphQLInputType, output_type: Graph...
from typing import Any, Callable from graphql.type import ( GraphQLArgument, GraphQLField, GraphQLInputType, GraphQLOutputType, GraphQLList, GraphQLNonNull, GraphQLResolveInfo, is_non_null_type, ) def plural_identifying_root_field( arg_name: str, input_type: GraphQLInputType, ...
<commit_before>from typing import Any, Callable from graphql.type import ( GraphQLArgument, GraphQLField, GraphQLInputType, GraphQLOutputType, GraphQLList, GraphQLNonNull, GraphQLResolveInfo, ) def plural_identifying_root_field( arg_name: str, input_type: GraphQLInputType, out...
from typing import Any, Callable from graphql.type import ( GraphQLArgument, GraphQLField, GraphQLInputType, GraphQLOutputType, GraphQLList, GraphQLNonNull, GraphQLResolveInfo, is_non_null_type, ) def plural_identifying_root_field( arg_name: str, input_type: GraphQLInputType, ...
from typing import Any, Callable from graphql.type import ( GraphQLArgument, GraphQLField, GraphQLInputType, GraphQLOutputType, GraphQLList, GraphQLNonNull, GraphQLResolveInfo, ) def plural_identifying_root_field( arg_name: str, input_type: GraphQLInputType, output_type: Graph...
<commit_before>from typing import Any, Callable from graphql.type import ( GraphQLArgument, GraphQLField, GraphQLInputType, GraphQLOutputType, GraphQLList, GraphQLNonNull, GraphQLResolveInfo, ) def plural_identifying_root_field( arg_name: str, input_type: GraphQLInputType, out...
e6d0c5dab7c24b223815aee65d58b4b5191213a9
docs/extensions/jira.py
docs/extensions/jira.py
import os import sys from docutils import nodes from docutils.parsers.rst import Directive def make_link_node(rawtext, app, type, slug, options): """Create a link to a JIRA ticket. :param rawtext: Text being replaced with link node. :param app: Sphinx application context :param type: Link type (issue...
import os import sys from docutils import nodes from docutils.parsers.rst import Directive def make_link_node(rawtext, app, type, slug, options): """Create a link to a JIRA ticket. :param rawtext: Text being replaced with link node. :param app: Sphinx application context :param type: Link type (issue...
Allow Jira tickets over 1000
HTCONDOR-1028: Allow Jira tickets over 1000 This used to double check between GitTrac and Jira ticket numbers. I was tempted to remove the check altogether. However, it would guard against and unfortunate key bounce. The change is going into stable, so adding a digit to the number is a minimal change.
Python
apache-2.0
htcondor/htcondor,htcondor/htcondor,htcondor/htcondor,htcondor/htcondor,htcondor/htcondor,htcondor/htcondor,htcondor/htcondor,htcondor/htcondor
import os import sys from docutils import nodes from docutils.parsers.rst import Directive def make_link_node(rawtext, app, type, slug, options): """Create a link to a JIRA ticket. :param rawtext: Text being replaced with link node. :param app: Sphinx application context :param type: Link type (issue...
import os import sys from docutils import nodes from docutils.parsers.rst import Directive def make_link_node(rawtext, app, type, slug, options): """Create a link to a JIRA ticket. :param rawtext: Text being replaced with link node. :param app: Sphinx application context :param type: Link type (issue...
<commit_before>import os import sys from docutils import nodes from docutils.parsers.rst import Directive def make_link_node(rawtext, app, type, slug, options): """Create a link to a JIRA ticket. :param rawtext: Text being replaced with link node. :param app: Sphinx application context :param type: L...
import os import sys from docutils import nodes from docutils.parsers.rst import Directive def make_link_node(rawtext, app, type, slug, options): """Create a link to a JIRA ticket. :param rawtext: Text being replaced with link node. :param app: Sphinx application context :param type: Link type (issue...
import os import sys from docutils import nodes from docutils.parsers.rst import Directive def make_link_node(rawtext, app, type, slug, options): """Create a link to a JIRA ticket. :param rawtext: Text being replaced with link node. :param app: Sphinx application context :param type: Link type (issue...
<commit_before>import os import sys from docutils import nodes from docutils.parsers.rst import Directive def make_link_node(rawtext, app, type, slug, options): """Create a link to a JIRA ticket. :param rawtext: Text being replaced with link node. :param app: Sphinx application context :param type: L...
9d93c74dbabdf776eabe25c36352628e73da5d66
drivers/python/setup.py
drivers/python/setup.py
# Copyright 2010-2012 RethinkDB, all rights reserved. from setuptools import setup setup(name="rethinkdb" ,version="1.4.0-2" ,description="This package provides the Python driver library for the RethinkDB database server." ,url="http://rethinkdb.com" ,maintainer="RethinkDB Inc." ,maintainer_em...
# Copyright 2010-2012 RethinkDB, all rights reserved. from setuptools import setup setup(name="rethinkdb" ,version="1.4.0-3" ,description="This package provides the Python driver library for the RethinkDB database server." ,url="http://rethinkdb.com" ,maintainer="RethinkDB Inc." ,maintainer_em...
Update python driver version to 1.4.0-3
Update python driver version to 1.4.0-3
Python
agpl-3.0
matthaywardwebdesign/rethinkdb,victorbriz/rethinkdb,jesseditson/rethinkdb,gdi2290/rethinkdb,wkennington/rethinkdb,bchavez/rethinkdb,sbusso/rethinkdb,mbroadst/rethinkdb,RubenKelevra/rethinkdb,gavioto/rethinkdb,ajose01/rethinkdb,ajose01/rethinkdb,Wilbeibi/rethinkdb,captainpete/rethinkdb,RubenKelevra/rethinkdb,victorbriz/...
# Copyright 2010-2012 RethinkDB, all rights reserved. from setuptools import setup setup(name="rethinkdb" ,version="1.4.0-2" ,description="This package provides the Python driver library for the RethinkDB database server." ,url="http://rethinkdb.com" ,maintainer="RethinkDB Inc." ,maintainer_em...
# Copyright 2010-2012 RethinkDB, all rights reserved. from setuptools import setup setup(name="rethinkdb" ,version="1.4.0-3" ,description="This package provides the Python driver library for the RethinkDB database server." ,url="http://rethinkdb.com" ,maintainer="RethinkDB Inc." ,maintainer_em...
<commit_before># Copyright 2010-2012 RethinkDB, all rights reserved. from setuptools import setup setup(name="rethinkdb" ,version="1.4.0-2" ,description="This package provides the Python driver library for the RethinkDB database server." ,url="http://rethinkdb.com" ,maintainer="RethinkDB Inc." ...
# Copyright 2010-2012 RethinkDB, all rights reserved. from setuptools import setup setup(name="rethinkdb" ,version="1.4.0-3" ,description="This package provides the Python driver library for the RethinkDB database server." ,url="http://rethinkdb.com" ,maintainer="RethinkDB Inc." ,maintainer_em...
# Copyright 2010-2012 RethinkDB, all rights reserved. from setuptools import setup setup(name="rethinkdb" ,version="1.4.0-2" ,description="This package provides the Python driver library for the RethinkDB database server." ,url="http://rethinkdb.com" ,maintainer="RethinkDB Inc." ,maintainer_em...
<commit_before># Copyright 2010-2012 RethinkDB, all rights reserved. from setuptools import setup setup(name="rethinkdb" ,version="1.4.0-2" ,description="This package provides the Python driver library for the RethinkDB database server." ,url="http://rethinkdb.com" ,maintainer="RethinkDB Inc." ...
6e2a484ac46279c6a077fb135d7e5f66605e9b88
mox/app.py
mox/app.py
from flask import Flask from flask.ext.mongoengine import MongoEngine from views import mocks import os app = Flask(__name__) app.config["MONGODB_SETTINGS"] = { "db": "mox" } app.config["SECRET_KEY"] = "KeepThisS3cr3t" if os.environ.get('PRODUCTION'): app.config["MONGODB_SETTINGS"]["host"] = os.environ.get("PROD_MO...
from flask import Flask from flask.ext.mongoengine import MongoEngine from views import mocks import os app = Flask(__name__) app.config["MONGODB_SETTINGS"] = { "db": "mox" } app.config["SECRET_KEY"] = "KeepThisS3cr3t" if os.environ.get('HEROKU') == 1: app.config["MONGODB_SETTINGS"]["host"] = os.environ.get("MONGOD...
Fix up settings for Heroku
Fix up settings for Heroku
Python
mit
abouzek/mox,abouzek/mox
from flask import Flask from flask.ext.mongoengine import MongoEngine from views import mocks import os app = Flask(__name__) app.config["MONGODB_SETTINGS"] = { "db": "mox" } app.config["SECRET_KEY"] = "KeepThisS3cr3t" if os.environ.get('PRODUCTION'): app.config["MONGODB_SETTINGS"]["host"] = os.environ.get("PROD_MO...
from flask import Flask from flask.ext.mongoengine import MongoEngine from views import mocks import os app = Flask(__name__) app.config["MONGODB_SETTINGS"] = { "db": "mox" } app.config["SECRET_KEY"] = "KeepThisS3cr3t" if os.environ.get('HEROKU') == 1: app.config["MONGODB_SETTINGS"]["host"] = os.environ.get("MONGOD...
<commit_before>from flask import Flask from flask.ext.mongoengine import MongoEngine from views import mocks import os app = Flask(__name__) app.config["MONGODB_SETTINGS"] = { "db": "mox" } app.config["SECRET_KEY"] = "KeepThisS3cr3t" if os.environ.get('PRODUCTION'): app.config["MONGODB_SETTINGS"]["host"] = os.envir...
from flask import Flask from flask.ext.mongoengine import MongoEngine from views import mocks import os app = Flask(__name__) app.config["MONGODB_SETTINGS"] = { "db": "mox" } app.config["SECRET_KEY"] = "KeepThisS3cr3t" if os.environ.get('HEROKU') == 1: app.config["MONGODB_SETTINGS"]["host"] = os.environ.get("MONGOD...
from flask import Flask from flask.ext.mongoengine import MongoEngine from views import mocks import os app = Flask(__name__) app.config["MONGODB_SETTINGS"] = { "db": "mox" } app.config["SECRET_KEY"] = "KeepThisS3cr3t" if os.environ.get('PRODUCTION'): app.config["MONGODB_SETTINGS"]["host"] = os.environ.get("PROD_MO...
<commit_before>from flask import Flask from flask.ext.mongoengine import MongoEngine from views import mocks import os app = Flask(__name__) app.config["MONGODB_SETTINGS"] = { "db": "mox" } app.config["SECRET_KEY"] = "KeepThisS3cr3t" if os.environ.get('PRODUCTION'): app.config["MONGODB_SETTINGS"]["host"] = os.envir...
2198e43a3701351085ac186a9a8574b788148fcf
mysite/mysite/tests/test_middleware.py
mysite/mysite/tests/test_middleware.py
from django.contrib.auth.models import User from django.test import TestCase from DjangoLibrary.middleware import FactoryBoyMiddleware from mock import Mock class TestFactoryBoyMiddleware(TestCase): def setUp(self): self.cm = FactoryBoyMiddleware() self.request = Mock() self.request.sessi...
from django.contrib.auth.models import User from django.test import TestCase from DjangoLibrary.middleware import FactoryBoyMiddleware from mock import Mock import json class TestFactoryBoyMiddleware(TestCase): def setUp(self): self.middleware = FactoryBoyMiddleware() self.request = Mock() ...
Add unit test for factory boy middleware.
Add unit test for factory boy middleware.
Python
apache-2.0
kitconcept/robotframework-djangolibrary
from django.contrib.auth.models import User from django.test import TestCase from DjangoLibrary.middleware import FactoryBoyMiddleware from mock import Mock class TestFactoryBoyMiddleware(TestCase): def setUp(self): self.cm = FactoryBoyMiddleware() self.request = Mock() self.request.sessi...
from django.contrib.auth.models import User from django.test import TestCase from DjangoLibrary.middleware import FactoryBoyMiddleware from mock import Mock import json class TestFactoryBoyMiddleware(TestCase): def setUp(self): self.middleware = FactoryBoyMiddleware() self.request = Mock() ...
<commit_before>from django.contrib.auth.models import User from django.test import TestCase from DjangoLibrary.middleware import FactoryBoyMiddleware from mock import Mock class TestFactoryBoyMiddleware(TestCase): def setUp(self): self.cm = FactoryBoyMiddleware() self.request = Mock() sel...
from django.contrib.auth.models import User from django.test import TestCase from DjangoLibrary.middleware import FactoryBoyMiddleware from mock import Mock import json class TestFactoryBoyMiddleware(TestCase): def setUp(self): self.middleware = FactoryBoyMiddleware() self.request = Mock() ...
from django.contrib.auth.models import User from django.test import TestCase from DjangoLibrary.middleware import FactoryBoyMiddleware from mock import Mock class TestFactoryBoyMiddleware(TestCase): def setUp(self): self.cm = FactoryBoyMiddleware() self.request = Mock() self.request.sessi...
<commit_before>from django.contrib.auth.models import User from django.test import TestCase from DjangoLibrary.middleware import FactoryBoyMiddleware from mock import Mock class TestFactoryBoyMiddleware(TestCase): def setUp(self): self.cm = FactoryBoyMiddleware() self.request = Mock() sel...
f176051094b5482f48781f0695835fed5727742c
src/webassets/filter/uglifyjs.py
src/webassets/filter/uglifyjs.py
"""Minify Javascript using `UglifyJS <https://github.com/mishoo/UglifyJS/>`_. UglifyJS is an external tool written for NodeJS; this filter assumes that the ``uglifyjs`` executable is in the path. Otherwise, you may define a ``UGLIFYJS_BIN`` setting. """ import subprocess from webassets.exceptions import FilterError f...
"""Minify Javascript using `UglifyJS <https://github.com/mishoo/UglifyJS/>`_. UglifyJS is an external tool written for NodeJS; this filter assumes that the ``uglifyjs`` executable is in the path. Otherwise, you may define a ``UGLIFYJS_BIN`` setting. Additional options may be passed to ``uglifyjs`` by setting ``UGLIFYJ...
Allow UglifyJS to accept additional command-line arguments
Allow UglifyJS to accept additional command-line arguments
Python
bsd-2-clause
JDeuce/webassets,scorphus/webassets,heynemann/webassets,scorphus/webassets,aconrad/webassets,JDeuce/webassets,glorpen/webassets,wijerasa/webassets,john2x/webassets,heynemann/webassets,aconrad/webassets,heynemann/webassets,wijerasa/webassets,glorpen/webassets,aconrad/webassets,0x1997/webassets,florianjacob/webassets,joh...
"""Minify Javascript using `UglifyJS <https://github.com/mishoo/UglifyJS/>`_. UglifyJS is an external tool written for NodeJS; this filter assumes that the ``uglifyjs`` executable is in the path. Otherwise, you may define a ``UGLIFYJS_BIN`` setting. """ import subprocess from webassets.exceptions import FilterError f...
"""Minify Javascript using `UglifyJS <https://github.com/mishoo/UglifyJS/>`_. UglifyJS is an external tool written for NodeJS; this filter assumes that the ``uglifyjs`` executable is in the path. Otherwise, you may define a ``UGLIFYJS_BIN`` setting. Additional options may be passed to ``uglifyjs`` by setting ``UGLIFYJ...
<commit_before>"""Minify Javascript using `UglifyJS <https://github.com/mishoo/UglifyJS/>`_. UglifyJS is an external tool written for NodeJS; this filter assumes that the ``uglifyjs`` executable is in the path. Otherwise, you may define a ``UGLIFYJS_BIN`` setting. """ import subprocess from webassets.exceptions impor...
"""Minify Javascript using `UglifyJS <https://github.com/mishoo/UglifyJS/>`_. UglifyJS is an external tool written for NodeJS; this filter assumes that the ``uglifyjs`` executable is in the path. Otherwise, you may define a ``UGLIFYJS_BIN`` setting. Additional options may be passed to ``uglifyjs`` by setting ``UGLIFYJ...
"""Minify Javascript using `UglifyJS <https://github.com/mishoo/UglifyJS/>`_. UglifyJS is an external tool written for NodeJS; this filter assumes that the ``uglifyjs`` executable is in the path. Otherwise, you may define a ``UGLIFYJS_BIN`` setting. """ import subprocess from webassets.exceptions import FilterError f...
<commit_before>"""Minify Javascript using `UglifyJS <https://github.com/mishoo/UglifyJS/>`_. UglifyJS is an external tool written for NodeJS; this filter assumes that the ``uglifyjs`` executable is in the path. Otherwise, you may define a ``UGLIFYJS_BIN`` setting. """ import subprocess from webassets.exceptions impor...
d97dd4a8f4c0581ce33ed5838dcc0329745041bf
pirate_add_shift_recurrence.py
pirate_add_shift_recurrence.py
#!/usr/bin/python import sys import os from tasklib.task import TaskWarrior time_attributes = ('wait', 'scheduled') def is_new_local_recurrence_child_task(task): # Do not affect tasks not spun by recurrence if not task['parent']: return False # Newly created recurrence tasks actually have # ...
#!/usr/bin/python import sys import os from tasklib import TaskWarrior time_attributes = ('wait', 'scheduled') def is_new_local_recurrence_child_task(task): # Do not affect tasks not spun by recurrence if not task['parent']: return False # Newly created recurrence tasks actually have # modif...
Fix old style import and config overrides
Fix old style import and config overrides
Python
mit
tbabej/task.shift-recurrence
#!/usr/bin/python import sys import os from tasklib.task import TaskWarrior time_attributes = ('wait', 'scheduled') def is_new_local_recurrence_child_task(task): # Do not affect tasks not spun by recurrence if not task['parent']: return False # Newly created recurrence tasks actually have # ...
#!/usr/bin/python import sys import os from tasklib import TaskWarrior time_attributes = ('wait', 'scheduled') def is_new_local_recurrence_child_task(task): # Do not affect tasks not spun by recurrence if not task['parent']: return False # Newly created recurrence tasks actually have # modif...
<commit_before>#!/usr/bin/python import sys import os from tasklib.task import TaskWarrior time_attributes = ('wait', 'scheduled') def is_new_local_recurrence_child_task(task): # Do not affect tasks not spun by recurrence if not task['parent']: return False # Newly created recurrence tasks actua...
#!/usr/bin/python import sys import os from tasklib import TaskWarrior time_attributes = ('wait', 'scheduled') def is_new_local_recurrence_child_task(task): # Do not affect tasks not spun by recurrence if not task['parent']: return False # Newly created recurrence tasks actually have # modif...
#!/usr/bin/python import sys import os from tasklib.task import TaskWarrior time_attributes = ('wait', 'scheduled') def is_new_local_recurrence_child_task(task): # Do not affect tasks not spun by recurrence if not task['parent']: return False # Newly created recurrence tasks actually have # ...
<commit_before>#!/usr/bin/python import sys import os from tasklib.task import TaskWarrior time_attributes = ('wait', 'scheduled') def is_new_local_recurrence_child_task(task): # Do not affect tasks not spun by recurrence if not task['parent']: return False # Newly created recurrence tasks actua...
c429abe7bee0461c8d2874ecb75093246565e58c
code/python/Gaussian.py
code/python/Gaussian.py
import numpy as np class Gaussian: """ An object of this class is a 2D elliptical gaussian """ def __init__(self): """ Constructor sets up a standard gaussian """ self.xc, self.yc, self.mass, self.width, self.q, self.theta =\ 0., 0., 1., 1., 1., 0. self.cos_theta, self.sin_theta = np.cos(self.theta...
import numpy as np class Gaussian: """ An object of this class is a 2D elliptical gaussian """ def __init__(self): """ Constructor sets up a standard gaussian """ self.xc, self.yc, self.mass, self.width, self.q, self.theta =\ 0., 0., 1., 1., 1., 0. def evaluate(self, x, y): """ Evaluate the den...
Make an image of a gaussian
Make an image of a gaussian
Python
mit
eggplantbren/MogTrack
import numpy as np class Gaussian: """ An object of this class is a 2D elliptical gaussian """ def __init__(self): """ Constructor sets up a standard gaussian """ self.xc, self.yc, self.mass, self.width, self.q, self.theta =\ 0., 0., 1., 1., 1., 0. self.cos_theta, self.sin_theta = np.cos(self.theta...
import numpy as np class Gaussian: """ An object of this class is a 2D elliptical gaussian """ def __init__(self): """ Constructor sets up a standard gaussian """ self.xc, self.yc, self.mass, self.width, self.q, self.theta =\ 0., 0., 1., 1., 1., 0. def evaluate(self, x, y): """ Evaluate the den...
<commit_before>import numpy as np class Gaussian: """ An object of this class is a 2D elliptical gaussian """ def __init__(self): """ Constructor sets up a standard gaussian """ self.xc, self.yc, self.mass, self.width, self.q, self.theta =\ 0., 0., 1., 1., 1., 0. self.cos_theta, self.sin_theta = np...
import numpy as np class Gaussian: """ An object of this class is a 2D elliptical gaussian """ def __init__(self): """ Constructor sets up a standard gaussian """ self.xc, self.yc, self.mass, self.width, self.q, self.theta =\ 0., 0., 1., 1., 1., 0. def evaluate(self, x, y): """ Evaluate the den...
import numpy as np class Gaussian: """ An object of this class is a 2D elliptical gaussian """ def __init__(self): """ Constructor sets up a standard gaussian """ self.xc, self.yc, self.mass, self.width, self.q, self.theta =\ 0., 0., 1., 1., 1., 0. self.cos_theta, self.sin_theta = np.cos(self.theta...
<commit_before>import numpy as np class Gaussian: """ An object of this class is a 2D elliptical gaussian """ def __init__(self): """ Constructor sets up a standard gaussian """ self.xc, self.yc, self.mass, self.width, self.q, self.theta =\ 0., 0., 1., 1., 1., 0. self.cos_theta, self.sin_theta = np...
bce7111c2b927290e054dffb765468c41b785947
bonspy/tests/test_features.py
bonspy/tests/test_features.py
from bonspy.features import _apply_operations def test_apply_operations_domain(): value = _apply_operations('domain', 'www.test.com') assert value == 'test.com' def test_apply_operations_segment(): value = _apply_operations('segment', 1) assert value == 1
from bonspy.features import _apply_operations def test_apply_operations_domain(): value = _apply_operations('domain', 'www.test.com') assert value == 'test.com' def test_apply_operations_other_feature(): value = _apply_operations('other_feature', 'www.test.com') assert value == 'www.test.com' de...
Test that stripping leading www is specific to domain feature
Test that stripping leading www is specific to domain feature
Python
bsd-3-clause
markovianhq/bonspy
from bonspy.features import _apply_operations def test_apply_operations_domain(): value = _apply_operations('domain', 'www.test.com') assert value == 'test.com' def test_apply_operations_segment(): value = _apply_operations('segment', 1) assert value == 1 Test that stripping leading www is specifi...
from bonspy.features import _apply_operations def test_apply_operations_domain(): value = _apply_operations('domain', 'www.test.com') assert value == 'test.com' def test_apply_operations_other_feature(): value = _apply_operations('other_feature', 'www.test.com') assert value == 'www.test.com' de...
<commit_before>from bonspy.features import _apply_operations def test_apply_operations_domain(): value = _apply_operations('domain', 'www.test.com') assert value == 'test.com' def test_apply_operations_segment(): value = _apply_operations('segment', 1) assert value == 1 <commit_msg>Test that strip...
from bonspy.features import _apply_operations def test_apply_operations_domain(): value = _apply_operations('domain', 'www.test.com') assert value == 'test.com' def test_apply_operations_other_feature(): value = _apply_operations('other_feature', 'www.test.com') assert value == 'www.test.com' de...
from bonspy.features import _apply_operations def test_apply_operations_domain(): value = _apply_operations('domain', 'www.test.com') assert value == 'test.com' def test_apply_operations_segment(): value = _apply_operations('segment', 1) assert value == 1 Test that stripping leading www is specifi...
<commit_before>from bonspy.features import _apply_operations def test_apply_operations_domain(): value = _apply_operations('domain', 'www.test.com') assert value == 'test.com' def test_apply_operations_segment(): value = _apply_operations('segment', 1) assert value == 1 <commit_msg>Test that strip...
077ee72d4febbfa336cf65f92225f0bae350febf
__openerp__.py
__openerp__.py
# -*- coding: utf-8 -*- { "name": "Alternate Ledger", "version": "1.2.1", "author": "XCG Consulting", "category": 'Accounting', "description": '''Allow the creation of new accounting ledgers that store separate transactions.''', 'website': 'http://www.openerp-experts.com', 'init_xml'...
# -*- coding: utf-8 -*- { "name": "Alternate Ledger", "version": "1.2.2", "author": "XCG Consulting", "category": 'Accounting', "description": '''Allow the creation of new accounting ledgers that store separate transactions.''', 'website': 'http://www.openerp-experts.com', 'init_xml'...
Change version to 1.2.2 (stable)
Change version to 1.2.2 (stable)
Python
agpl-3.0
xcgd/alternate_ledger,xcgd/alternate_ledger
# -*- coding: utf-8 -*- { "name": "Alternate Ledger", "version": "1.2.1", "author": "XCG Consulting", "category": 'Accounting', "description": '''Allow the creation of new accounting ledgers that store separate transactions.''', 'website': 'http://www.openerp-experts.com', 'init_xml'...
# -*- coding: utf-8 -*- { "name": "Alternate Ledger", "version": "1.2.2", "author": "XCG Consulting", "category": 'Accounting', "description": '''Allow the creation of new accounting ledgers that store separate transactions.''', 'website': 'http://www.openerp-experts.com', 'init_xml'...
<commit_before># -*- coding: utf-8 -*- { "name": "Alternate Ledger", "version": "1.2.1", "author": "XCG Consulting", "category": 'Accounting', "description": '''Allow the creation of new accounting ledgers that store separate transactions.''', 'website': 'http://www.openerp-experts.com',...
# -*- coding: utf-8 -*- { "name": "Alternate Ledger", "version": "1.2.2", "author": "XCG Consulting", "category": 'Accounting', "description": '''Allow the creation of new accounting ledgers that store separate transactions.''', 'website': 'http://www.openerp-experts.com', 'init_xml'...
# -*- coding: utf-8 -*- { "name": "Alternate Ledger", "version": "1.2.1", "author": "XCG Consulting", "category": 'Accounting', "description": '''Allow the creation of new accounting ledgers that store separate transactions.''', 'website': 'http://www.openerp-experts.com', 'init_xml'...
<commit_before># -*- coding: utf-8 -*- { "name": "Alternate Ledger", "version": "1.2.1", "author": "XCG Consulting", "category": 'Accounting', "description": '''Allow the creation of new accounting ledgers that store separate transactions.''', 'website': 'http://www.openerp-experts.com',...
9340b43508c4203c81e3feb9607c8a7fe5972eb5
tools/skp/page_sets/skia_intelwiki_desktop.py
tools/skp/page_sets/skia_intelwiki_desktop.py
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=W0401,W0614 from telemetry import story from telemetry.page import page as page_module from telemetry.page import shared_page_state clas...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=W0401,W0614 from telemetry import story from telemetry.page import page as page_module from telemetry.page import shared_page_state clas...
Remove anchor and increase wait time for desk_intelwiki.skp
Remove anchor and increase wait time for desk_intelwiki.skp No-Try: true Bug: skia:11804 Change-Id: Ib30df7f233bd3c2bcbfdf5c62e803be187a4ff01 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/389712 Commit-Queue: Ravi Mistry <9fa2e7438b8cb730f96b74865492597170561628@google.com> Reviewed-by: Robert Phillips <9...
Python
bsd-3-clause
google/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,goo...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=W0401,W0614 from telemetry import story from telemetry.page import page as page_module from telemetry.page import shared_page_state clas...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=W0401,W0614 from telemetry import story from telemetry.page import page as page_module from telemetry.page import shared_page_state clas...
<commit_before># Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=W0401,W0614 from telemetry import story from telemetry.page import page as page_module from telemetry.page import shared_pa...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=W0401,W0614 from telemetry import story from telemetry.page import page as page_module from telemetry.page import shared_page_state clas...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=W0401,W0614 from telemetry import story from telemetry.page import page as page_module from telemetry.page import shared_page_state clas...
<commit_before># Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=W0401,W0614 from telemetry import story from telemetry.page import page as page_module from telemetry.page import shared_pa...
d29fd721988fc9a75891a636afece63090f46295
taiga/projects/references/api.py
taiga/projects/references/api.py
# -*- coding: utf-8 -*- from django.db.models.loading import get_model from django.shortcuts import get_object_or_404 from rest_framework.response import Response from rest_framework import viewsets from rest_framework.permissions import IsAuthenticated from taiga.base import exceptions as exc from .serializers impo...
# -*- coding: utf-8 -*- from django.db.models.loading import get_model from django.shortcuts import get_object_or_404 from rest_framework.response import Response from rest_framework import viewsets from rest_framework.permissions import IsAuthenticated from taiga.base import exceptions as exc from .serializers impo...
Fix typo that raises KeyError in taskboard
Fix typo that raises KeyError in taskboard
Python
agpl-3.0
Tigerwhit4/taiga-back,bdang2012/taiga-back-casting,seanchen/taiga-back,gam-phon/taiga-back,bdang2012/taiga-back-casting,EvgeneOskin/taiga-back,Tigerwhit4/taiga-back,CoolCloud/taiga-back,astagi/taiga-back,obimod/taiga-back,gauravjns/taiga-back,bdang2012/taiga-back-casting,xdevelsistemas/taiga-back-community,astagi/taiga...
# -*- coding: utf-8 -*- from django.db.models.loading import get_model from django.shortcuts import get_object_or_404 from rest_framework.response import Response from rest_framework import viewsets from rest_framework.permissions import IsAuthenticated from taiga.base import exceptions as exc from .serializers impo...
# -*- coding: utf-8 -*- from django.db.models.loading import get_model from django.shortcuts import get_object_or_404 from rest_framework.response import Response from rest_framework import viewsets from rest_framework.permissions import IsAuthenticated from taiga.base import exceptions as exc from .serializers impo...
<commit_before># -*- coding: utf-8 -*- from django.db.models.loading import get_model from django.shortcuts import get_object_or_404 from rest_framework.response import Response from rest_framework import viewsets from rest_framework.permissions import IsAuthenticated from taiga.base import exceptions as exc from .s...
# -*- coding: utf-8 -*- from django.db.models.loading import get_model from django.shortcuts import get_object_or_404 from rest_framework.response import Response from rest_framework import viewsets from rest_framework.permissions import IsAuthenticated from taiga.base import exceptions as exc from .serializers impo...
# -*- coding: utf-8 -*- from django.db.models.loading import get_model from django.shortcuts import get_object_or_404 from rest_framework.response import Response from rest_framework import viewsets from rest_framework.permissions import IsAuthenticated from taiga.base import exceptions as exc from .serializers impo...
<commit_before># -*- coding: utf-8 -*- from django.db.models.loading import get_model from django.shortcuts import get_object_or_404 from rest_framework.response import Response from rest_framework import viewsets from rest_framework.permissions import IsAuthenticated from taiga.base import exceptions as exc from .s...
e5d16155364c1dae2db238506f236194e2dfb1dc
tripleo_common/filters/capabilities_filter.py
tripleo_common/filters/capabilities_filter.py
# Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
# Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
Add logging to capabilities filter
Add logging to capabilities filter The capabilities filter gets incorrectly blamed for a lot of deployment failures because on a retry of a node deployment the filter has to fail because there is only one node that can match when using predictable placement. However, we don't have any logging to help determine why th...
Python
apache-2.0
openstack/tripleo-common,openstack/tripleo-common
# Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
# Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
<commit_before># Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
# Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
<commit_before># Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
ad85d6495343d6089ede2bbf08540341ada93ca8
yolk/__init__.py
yolk/__init__.py
"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.8'
"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.8.1'
Increment patch version to 0.8.1
Increment patch version to 0.8.1
Python
bsd-3-clause
myint/yolk,myint/yolk
"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.8' Increment patch version to 0.8.1
"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.8.1'
<commit_before>"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.8' <commit_msg>Increment patch version to 0.8.1<commit_after>
"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.8.1'
"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.8' Increment patch version to 0.8.1"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.8.1'
<commit_before>"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.8' <commit_msg>Increment patch version to 0.8.1<commit_after>"""yolk. Author: Rob Cakebread <cakebread at gmail> License : BSD """ __version__ = '0.8.1'
1c5b70610a973ff90dab4253cb525acb7504d239
filer/tests/__init__.py
filer/tests/__init__.py
#-*- coding: utf-8 -*- from filer.tests.admin import * from filer.tests.fields import * from filer.tests.models import * from filer.tests.permissions import * from filer.tests.server_backends import * from filer.tests.tools import * from filer.tests.utils import *
#-*- coding: utf-8 -*- from filer.tests.admin import * from filer.tests.models import * from filer.tests.permissions import * from filer.tests.server_backends import * from filer.tests.tools import * from filer.tests.utils import *
Remove field tests import as they no loger exists
Remove field tests import as they no loger exists
Python
bsd-3-clause
SmithsonianEnterprises/django-filer,jrief/django-filer,kriwil/django-filer,jakob-o/django-filer,samastur/django-filer,o-zander/django-filer,mkoistinen/django-filer,nimbis/django-filer,belimawr/django-filer,webu/django-filer,kriwil/django-filer,DylannCordel/django-filer,o-zander/django-filer,webu/django-filer,vechorko/d...
#-*- coding: utf-8 -*- from filer.tests.admin import * from filer.tests.fields import * from filer.tests.models import * from filer.tests.permissions import * from filer.tests.server_backends import * from filer.tests.tools import * from filer.tests.utils import * Remove field tests import as they no loger exists
#-*- coding: utf-8 -*- from filer.tests.admin import * from filer.tests.models import * from filer.tests.permissions import * from filer.tests.server_backends import * from filer.tests.tools import * from filer.tests.utils import *
<commit_before>#-*- coding: utf-8 -*- from filer.tests.admin import * from filer.tests.fields import * from filer.tests.models import * from filer.tests.permissions import * from filer.tests.server_backends import * from filer.tests.tools import * from filer.tests.utils import * <commit_msg>Remove field tests import as...
#-*- coding: utf-8 -*- from filer.tests.admin import * from filer.tests.models import * from filer.tests.permissions import * from filer.tests.server_backends import * from filer.tests.tools import * from filer.tests.utils import *
#-*- coding: utf-8 -*- from filer.tests.admin import * from filer.tests.fields import * from filer.tests.models import * from filer.tests.permissions import * from filer.tests.server_backends import * from filer.tests.tools import * from filer.tests.utils import * Remove field tests import as they no loger exists#-*- c...
<commit_before>#-*- coding: utf-8 -*- from filer.tests.admin import * from filer.tests.fields import * from filer.tests.models import * from filer.tests.permissions import * from filer.tests.server_backends import * from filer.tests.tools import * from filer.tests.utils import * <commit_msg>Remove field tests import as...
018e76e5aa2a7ca8652af008a3b658017b3f178d
thefederation/tests/factories.py
thefederation/tests/factories.py
import factory from django.utils.timezone import utc, now from thefederation.models import Node, Platform, Protocol, Stat class PlatformFactory(factory.DjangoModelFactory): name = factory.Faker('word') class Meta: model = Platform class ProtocolFactory(factory.DjangoModelFactory): name = facto...
import factory from django.utils.timezone import utc, now from thefederation.models import Node, Platform, Protocol, Stat class PlatformFactory(factory.DjangoModelFactory): name = factory.Faker('pystr') class Meta: model = Platform class ProtocolFactory(factory.DjangoModelFactory): name = fact...
Make factory random names a bit more random to avoid clashes
Make factory random names a bit more random to avoid clashes
Python
agpl-3.0
jaywink/the-federation.info,jaywink/diaspora-hub,jaywink/diaspora-hub,jaywink/diaspora-hub,jaywink/the-federation.info,jaywink/the-federation.info
import factory from django.utils.timezone import utc, now from thefederation.models import Node, Platform, Protocol, Stat class PlatformFactory(factory.DjangoModelFactory): name = factory.Faker('word') class Meta: model = Platform class ProtocolFactory(factory.DjangoModelFactory): name = facto...
import factory from django.utils.timezone import utc, now from thefederation.models import Node, Platform, Protocol, Stat class PlatformFactory(factory.DjangoModelFactory): name = factory.Faker('pystr') class Meta: model = Platform class ProtocolFactory(factory.DjangoModelFactory): name = fact...
<commit_before>import factory from django.utils.timezone import utc, now from thefederation.models import Node, Platform, Protocol, Stat class PlatformFactory(factory.DjangoModelFactory): name = factory.Faker('word') class Meta: model = Platform class ProtocolFactory(factory.DjangoModelFactory): ...
import factory from django.utils.timezone import utc, now from thefederation.models import Node, Platform, Protocol, Stat class PlatformFactory(factory.DjangoModelFactory): name = factory.Faker('pystr') class Meta: model = Platform class ProtocolFactory(factory.DjangoModelFactory): name = fact...
import factory from django.utils.timezone import utc, now from thefederation.models import Node, Platform, Protocol, Stat class PlatformFactory(factory.DjangoModelFactory): name = factory.Faker('word') class Meta: model = Platform class ProtocolFactory(factory.DjangoModelFactory): name = facto...
<commit_before>import factory from django.utils.timezone import utc, now from thefederation.models import Node, Platform, Protocol, Stat class PlatformFactory(factory.DjangoModelFactory): name = factory.Faker('word') class Meta: model = Platform class ProtocolFactory(factory.DjangoModelFactory): ...
524ee1cd2f56f6fe968f409d37cbd2af1621e7f3
framework/guid/model.py
framework/guid/model.py
from framework import StoredObject, fields class Guid(StoredObject): _id = fields.StringField() referent = fields.AbstractForeignField() _meta = { 'optimistic': True, } class GuidStoredObject(StoredObject): # Redirect to content using URL redirect by default redirect_mode = 'redir...
from framework import StoredObject, fields class Guid(StoredObject): _id = fields.StringField() referent = fields.AbstractForeignField() _meta = { 'optimistic': True, } class GuidStoredObject(StoredObject): # Redirect to content using URL redirect by default redirect_mode = 'redir...
Fix last commit: Must ensure GUID before saving so that PK is defined
Fix last commit: Must ensure GUID before saving so that PK is defined
Python
apache-2.0
zkraime/osf.io,emetsger/osf.io,RomanZWang/osf.io,chennan47/osf.io,TomHeatwole/osf.io,adlius/osf.io,cwisecarver/osf.io,petermalcolm/osf.io,mfraezz/osf.io,wearpants/osf.io,HalcyonChimera/osf.io,baylee-d/osf.io,samanehsan/osf.io,CenterForOpenScience/osf.io,caseyrollins/osf.io,felliott/osf.io,monikagrabowska/osf.io,Johneto...
from framework import StoredObject, fields class Guid(StoredObject): _id = fields.StringField() referent = fields.AbstractForeignField() _meta = { 'optimistic': True, } class GuidStoredObject(StoredObject): # Redirect to content using URL redirect by default redirect_mode = 'redir...
from framework import StoredObject, fields class Guid(StoredObject): _id = fields.StringField() referent = fields.AbstractForeignField() _meta = { 'optimistic': True, } class GuidStoredObject(StoredObject): # Redirect to content using URL redirect by default redirect_mode = 'redir...
<commit_before>from framework import StoredObject, fields class Guid(StoredObject): _id = fields.StringField() referent = fields.AbstractForeignField() _meta = { 'optimistic': True, } class GuidStoredObject(StoredObject): # Redirect to content using URL redirect by default redirec...
from framework import StoredObject, fields class Guid(StoredObject): _id = fields.StringField() referent = fields.AbstractForeignField() _meta = { 'optimistic': True, } class GuidStoredObject(StoredObject): # Redirect to content using URL redirect by default redirect_mode = 'redir...
from framework import StoredObject, fields class Guid(StoredObject): _id = fields.StringField() referent = fields.AbstractForeignField() _meta = { 'optimistic': True, } class GuidStoredObject(StoredObject): # Redirect to content using URL redirect by default redirect_mode = 'redir...
<commit_before>from framework import StoredObject, fields class Guid(StoredObject): _id = fields.StringField() referent = fields.AbstractForeignField() _meta = { 'optimistic': True, } class GuidStoredObject(StoredObject): # Redirect to content using URL redirect by default redirec...
587c1490538c610cdd885667720d3ad27da7eb83
main.py
main.py
import praw import humanize from datetime import datetime from flask import Flask from flask import request, render_template from prawoauth2 import PrawOAuth2Mini from settings import (app_key, app_secret, access_token, refresh_token, user_agent, scopes) reddit_client = praw.Reddit(user_agent=us...
import praw import humanize from datetime import datetime from flask import Flask from flask import request, render_template from prawoauth2 import PrawOAuth2Mini from settings import (app_key, app_secret, access_token, refresh_token, user_agent, scopes) reddit_client = praw.Reddit(user_agent=us...
Use `username` instead of `redditor` in templates
Use `username` instead of `redditor` in templates
Python
mit
avinassh/kekday,avinassh/kekday
import praw import humanize from datetime import datetime from flask import Flask from flask import request, render_template from prawoauth2 import PrawOAuth2Mini from settings import (app_key, app_secret, access_token, refresh_token, user_agent, scopes) reddit_client = praw.Reddit(user_agent=us...
import praw import humanize from datetime import datetime from flask import Flask from flask import request, render_template from prawoauth2 import PrawOAuth2Mini from settings import (app_key, app_secret, access_token, refresh_token, user_agent, scopes) reddit_client = praw.Reddit(user_agent=us...
<commit_before>import praw import humanize from datetime import datetime from flask import Flask from flask import request, render_template from prawoauth2 import PrawOAuth2Mini from settings import (app_key, app_secret, access_token, refresh_token, user_agent, scopes) reddit_client = praw.Reddi...
import praw import humanize from datetime import datetime from flask import Flask from flask import request, render_template from prawoauth2 import PrawOAuth2Mini from settings import (app_key, app_secret, access_token, refresh_token, user_agent, scopes) reddit_client = praw.Reddit(user_agent=us...
import praw import humanize from datetime import datetime from flask import Flask from flask import request, render_template from prawoauth2 import PrawOAuth2Mini from settings import (app_key, app_secret, access_token, refresh_token, user_agent, scopes) reddit_client = praw.Reddit(user_agent=us...
<commit_before>import praw import humanize from datetime import datetime from flask import Flask from flask import request, render_template from prawoauth2 import PrawOAuth2Mini from settings import (app_key, app_secret, access_token, refresh_token, user_agent, scopes) reddit_client = praw.Reddi...
3992e424169a9ac6eb0d13c03045139403dc27cf
main.py
main.py
import hashlib import models import os import os.path import peewee def init(): models.db.connect() models.db.create_tables([models.Entry]) def digest(file_path): h = hashlib.sha1() file = open(file_path, 'rb') buf = file.read(8192) while len(buf) > 0: h.update(buf) buf = file....
import hashlib import models import os import os.path def init(): models.db.connect() models.db.create_tables([models.Entry]) def digest(file_path): h = hashlib.sha1() file = open(file_path, 'rb') buf = file.read(8192) while len(buf) > 0: h.update(buf) buf = file.read(8192) ...
Fix import and indent issue
Fix import and indent issue
Python
mit
rschiang/pineapple.py
import hashlib import models import os import os.path import peewee def init(): models.db.connect() models.db.create_tables([models.Entry]) def digest(file_path): h = hashlib.sha1() file = open(file_path, 'rb') buf = file.read(8192) while len(buf) > 0: h.update(buf) buf = file....
import hashlib import models import os import os.path def init(): models.db.connect() models.db.create_tables([models.Entry]) def digest(file_path): h = hashlib.sha1() file = open(file_path, 'rb') buf = file.read(8192) while len(buf) > 0: h.update(buf) buf = file.read(8192) ...
<commit_before>import hashlib import models import os import os.path import peewee def init(): models.db.connect() models.db.create_tables([models.Entry]) def digest(file_path): h = hashlib.sha1() file = open(file_path, 'rb') buf = file.read(8192) while len(buf) > 0: h.update(buf) ...
import hashlib import models import os import os.path def init(): models.db.connect() models.db.create_tables([models.Entry]) def digest(file_path): h = hashlib.sha1() file = open(file_path, 'rb') buf = file.read(8192) while len(buf) > 0: h.update(buf) buf = file.read(8192) ...
import hashlib import models import os import os.path import peewee def init(): models.db.connect() models.db.create_tables([models.Entry]) def digest(file_path): h = hashlib.sha1() file = open(file_path, 'rb') buf = file.read(8192) while len(buf) > 0: h.update(buf) buf = file....
<commit_before>import hashlib import models import os import os.path import peewee def init(): models.db.connect() models.db.create_tables([models.Entry]) def digest(file_path): h = hashlib.sha1() file = open(file_path, 'rb') buf = file.read(8192) while len(buf) > 0: h.update(buf) ...
2567e56c7c17754e18346b21bcad6eab713276ea
googlebot/middleware.py
googlebot/middleware.py
import socket from django.contrib.auth.models import AnonymousUser from django.contrib.auth.models import User class GooglebotMiddleware(object): """ Middleware to automatically log in the Googlebot with the user account 'googlebot' """ def process_request(self, request): request.is_googlebot...
import socket from django.contrib.auth.models import AnonymousUser from django.contrib.auth.models import User class GooglebotMiddleware(object): """ Middleware to automatically log in the Googlebot with the user account 'googlebot' """ def process_request(self, request): request.is_googlebot...
Check to see if request.META contains HTTP_USER_AGENT
Check to see if request.META contains HTTP_USER_AGENT
Python
bsd-3-clause
macropin/django-googlebot
import socket from django.contrib.auth.models import AnonymousUser from django.contrib.auth.models import User class GooglebotMiddleware(object): """ Middleware to automatically log in the Googlebot with the user account 'googlebot' """ def process_request(self, request): request.is_googlebot...
import socket from django.contrib.auth.models import AnonymousUser from django.contrib.auth.models import User class GooglebotMiddleware(object): """ Middleware to automatically log in the Googlebot with the user account 'googlebot' """ def process_request(self, request): request.is_googlebot...
<commit_before>import socket from django.contrib.auth.models import AnonymousUser from django.contrib.auth.models import User class GooglebotMiddleware(object): """ Middleware to automatically log in the Googlebot with the user account 'googlebot' """ def process_request(self, request): reque...
import socket from django.contrib.auth.models import AnonymousUser from django.contrib.auth.models import User class GooglebotMiddleware(object): """ Middleware to automatically log in the Googlebot with the user account 'googlebot' """ def process_request(self, request): request.is_googlebot...
import socket from django.contrib.auth.models import AnonymousUser from django.contrib.auth.models import User class GooglebotMiddleware(object): """ Middleware to automatically log in the Googlebot with the user account 'googlebot' """ def process_request(self, request): request.is_googlebot...
<commit_before>import socket from django.contrib.auth.models import AnonymousUser from django.contrib.auth.models import User class GooglebotMiddleware(object): """ Middleware to automatically log in the Googlebot with the user account 'googlebot' """ def process_request(self, request): reque...
a270b7ea7636cd70b38f7e3534871a76ea2cdae1
rejected/example.py
rejected/example.py
"""Example Rejected Consumer""" from rejected import consumer import random from tornado import gen from tornado import httpclient __version__ = '1.0.0' class ExampleConsumer(consumer.SmartConsumer): def process(self): self.logger.info('Message: %r', self.body) """ action = random.rand...
"""Example Rejected Consumer""" from rejected import consumer import random from tornado import gen from tornado import httpclient __version__ = '1.0.0' class ExampleConsumer(consumer.SmartConsumer): def process(self): self.logger.info('Message: %r', self.body) action = random.randint(0, 100) ...
Remove the commented out block
Remove the commented out block
Python
bsd-3-clause
gmr/rejected,gmr/rejected
"""Example Rejected Consumer""" from rejected import consumer import random from tornado import gen from tornado import httpclient __version__ = '1.0.0' class ExampleConsumer(consumer.SmartConsumer): def process(self): self.logger.info('Message: %r', self.body) """ action = random.rand...
"""Example Rejected Consumer""" from rejected import consumer import random from tornado import gen from tornado import httpclient __version__ = '1.0.0' class ExampleConsumer(consumer.SmartConsumer): def process(self): self.logger.info('Message: %r', self.body) action = random.randint(0, 100) ...
<commit_before>"""Example Rejected Consumer""" from rejected import consumer import random from tornado import gen from tornado import httpclient __version__ = '1.0.0' class ExampleConsumer(consumer.SmartConsumer): def process(self): self.logger.info('Message: %r', self.body) """ actio...
"""Example Rejected Consumer""" from rejected import consumer import random from tornado import gen from tornado import httpclient __version__ = '1.0.0' class ExampleConsumer(consumer.SmartConsumer): def process(self): self.logger.info('Message: %r', self.body) action = random.randint(0, 100) ...
"""Example Rejected Consumer""" from rejected import consumer import random from tornado import gen from tornado import httpclient __version__ = '1.0.0' class ExampleConsumer(consumer.SmartConsumer): def process(self): self.logger.info('Message: %r', self.body) """ action = random.rand...
<commit_before>"""Example Rejected Consumer""" from rejected import consumer import random from tornado import gen from tornado import httpclient __version__ = '1.0.0' class ExampleConsumer(consumer.SmartConsumer): def process(self): self.logger.info('Message: %r', self.body) """ actio...
5db17915435eb569bf7644019b9fdbf94f18114a
tests/conftest.py
tests/conftest.py
import StringIO import PIL import pytest from django.core.files.uploadedfile import InMemoryUploadedFile class Image: def __init__(self): self.dimensions = (100, 100) self.color = 'blue' self.name = 'image.jpg' @property def django_file(self): # Create a new Django file-...
import StringIO import PIL import pytest from django.core.files.uploadedfile import InMemoryUploadedFile class Image: def __init__(self): self.dimensions = (10, 10) self.color = 'blue' self.name = 'image.jpg' @property def django_file(self): # Create a new Django file-li...
Reduce size of testings images by default to speed up tests
Reduce size of testings images by default to speed up tests
Python
mit
saulshanabrook/django-simpleimages
import StringIO import PIL import pytest from django.core.files.uploadedfile import InMemoryUploadedFile class Image: def __init__(self): self.dimensions = (100, 100) self.color = 'blue' self.name = 'image.jpg' @property def django_file(self): # Create a new Django file-...
import StringIO import PIL import pytest from django.core.files.uploadedfile import InMemoryUploadedFile class Image: def __init__(self): self.dimensions = (10, 10) self.color = 'blue' self.name = 'image.jpg' @property def django_file(self): # Create a new Django file-li...
<commit_before>import StringIO import PIL import pytest from django.core.files.uploadedfile import InMemoryUploadedFile class Image: def __init__(self): self.dimensions = (100, 100) self.color = 'blue' self.name = 'image.jpg' @property def django_file(self): # Create a n...
import StringIO import PIL import pytest from django.core.files.uploadedfile import InMemoryUploadedFile class Image: def __init__(self): self.dimensions = (10, 10) self.color = 'blue' self.name = 'image.jpg' @property def django_file(self): # Create a new Django file-li...
import StringIO import PIL import pytest from django.core.files.uploadedfile import InMemoryUploadedFile class Image: def __init__(self): self.dimensions = (100, 100) self.color = 'blue' self.name = 'image.jpg' @property def django_file(self): # Create a new Django file-...
<commit_before>import StringIO import PIL import pytest from django.core.files.uploadedfile import InMemoryUploadedFile class Image: def __init__(self): self.dimensions = (100, 100) self.color = 'blue' self.name = 'image.jpg' @property def django_file(self): # Create a n...
35f59e256224b82c82b2be3af4cd22e43443bc9f
mgsv_names.py
mgsv_names.py
from __future__ import unicode_literals, print_function import sqlite3, os, random _select = 'select {} from {} order by random() limit 1' _uncommon_select = 'select value from uncommons where key=?' def generate_name(): conn = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'names.db')) cursor = conn...
from __future__ import unicode_literals, print_function import sqlite3, os, random _select = 'select {0} from {1} limit 1 offset abs(random()) % (select count({0}) from {1});' _uncommon_select = 'select value from uncommons where key=?;' def generate_name(): conn = sqlite3.connect(os.path.join(os.path.dirname(__f...
Update SQL for efficiency and semicolons.
Update SQL for efficiency and semicolons.
Python
unlicense
rotated8/mgsv_names
from __future__ import unicode_literals, print_function import sqlite3, os, random _select = 'select {} from {} order by random() limit 1' _uncommon_select = 'select value from uncommons where key=?' def generate_name(): conn = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'names.db')) cursor = conn...
from __future__ import unicode_literals, print_function import sqlite3, os, random _select = 'select {0} from {1} limit 1 offset abs(random()) % (select count({0}) from {1});' _uncommon_select = 'select value from uncommons where key=?;' def generate_name(): conn = sqlite3.connect(os.path.join(os.path.dirname(__f...
<commit_before>from __future__ import unicode_literals, print_function import sqlite3, os, random _select = 'select {} from {} order by random() limit 1' _uncommon_select = 'select value from uncommons where key=?' def generate_name(): conn = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'names.db')) ...
from __future__ import unicode_literals, print_function import sqlite3, os, random _select = 'select {0} from {1} limit 1 offset abs(random()) % (select count({0}) from {1});' _uncommon_select = 'select value from uncommons where key=?;' def generate_name(): conn = sqlite3.connect(os.path.join(os.path.dirname(__f...
from __future__ import unicode_literals, print_function import sqlite3, os, random _select = 'select {} from {} order by random() limit 1' _uncommon_select = 'select value from uncommons where key=?' def generate_name(): conn = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'names.db')) cursor = conn...
<commit_before>from __future__ import unicode_literals, print_function import sqlite3, os, random _select = 'select {} from {} order by random() limit 1' _uncommon_select = 'select value from uncommons where key=?' def generate_name(): conn = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'names.db')) ...
1a5a5268cea83a7d29346a677e9d10ec9e5411e8
cuteshop/downloaders/git.py
cuteshop/downloaders/git.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import subprocess from ..utils import DEVNULL, change_working_directory from .base import DOWNLOAD_CONTAINER def _checkout(name): with change_working_directory(DOWNLOAD_CONTAINER): subprocess.call( ('git', 'checkout', name), stdout=DEV...
#!/usr/bin/env python # -*- coding: utf-8 -*- import subprocess from ..utils import DEVNULL, change_working_directory from .base import DOWNLOAD_CONTAINER def _checkout(name): with change_working_directory(DOWNLOAD_CONTAINER): subprocess.call( ('git', 'checkout', name), stdout=DEV...
Allow submodules in lib repo
Allow submodules in lib repo
Python
mit
uranusjr/cuteshop
#!/usr/bin/env python # -*- coding: utf-8 -*- import subprocess from ..utils import DEVNULL, change_working_directory from .base import DOWNLOAD_CONTAINER def _checkout(name): with change_working_directory(DOWNLOAD_CONTAINER): subprocess.call( ('git', 'checkout', name), stdout=DEV...
#!/usr/bin/env python # -*- coding: utf-8 -*- import subprocess from ..utils import DEVNULL, change_working_directory from .base import DOWNLOAD_CONTAINER def _checkout(name): with change_working_directory(DOWNLOAD_CONTAINER): subprocess.call( ('git', 'checkout', name), stdout=DEV...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import subprocess from ..utils import DEVNULL, change_working_directory from .base import DOWNLOAD_CONTAINER def _checkout(name): with change_working_directory(DOWNLOAD_CONTAINER): subprocess.call( ('git', 'checkout', name), ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import subprocess from ..utils import DEVNULL, change_working_directory from .base import DOWNLOAD_CONTAINER def _checkout(name): with change_working_directory(DOWNLOAD_CONTAINER): subprocess.call( ('git', 'checkout', name), stdout=DEV...
#!/usr/bin/env python # -*- coding: utf-8 -*- import subprocess from ..utils import DEVNULL, change_working_directory from .base import DOWNLOAD_CONTAINER def _checkout(name): with change_working_directory(DOWNLOAD_CONTAINER): subprocess.call( ('git', 'checkout', name), stdout=DEV...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import subprocess from ..utils import DEVNULL, change_working_directory from .base import DOWNLOAD_CONTAINER def _checkout(name): with change_working_directory(DOWNLOAD_CONTAINER): subprocess.call( ('git', 'checkout', name), ...
6a9407d7cc4ac5555180a2ee331ff95eef131902
mitmproxy/platform/osx.py
mitmproxy/platform/osx.py
import subprocess from . import pf """ Doing this the "right" way by using DIOCNATLOOK on the pf device turns out to be a pain. Apple has made a number of modifications to the data structures returned, and compiling userspace tools to test and work with this turns out to be a pain in the ass. Parsing ...
import subprocess from . import pf """ Doing this the "right" way by using DIOCNATLOOK on the pf device turns out to be a pain. Apple has made a number of modifications to the data structures returned, and compiling userspace tools to test and work with this turns out to be a pain in the ass. Parsing ...
Make sudo pfctl error check Python 3 compatible
Make sudo pfctl error check Python 3 compatible In Python 3, subprocess.check_output() returns a sequence of bytes. This change ensures that it will be converted to a string, so the substring test for the sudo error message does not raise a TypeError. This fixes the code in Python 3 while remaining compatible with Pyt...
Python
mit
mitmproxy/mitmproxy,cortesi/mitmproxy,MatthewShao/mitmproxy,MatthewShao/mitmproxy,laurmurclar/mitmproxy,mosajjal/mitmproxy,cortesi/mitmproxy,vhaupert/mitmproxy,mhils/mitmproxy,dwfreed/mitmproxy,ddworken/mitmproxy,gzzhanghao/mitmproxy,StevenVanAcker/mitmproxy,ujjwal96/mitmproxy,StevenVanAcker/mitmproxy,xaxa89/mitmproxy,...
import subprocess from . import pf """ Doing this the "right" way by using DIOCNATLOOK on the pf device turns out to be a pain. Apple has made a number of modifications to the data structures returned, and compiling userspace tools to test and work with this turns out to be a pain in the ass. Parsing ...
import subprocess from . import pf """ Doing this the "right" way by using DIOCNATLOOK on the pf device turns out to be a pain. Apple has made a number of modifications to the data structures returned, and compiling userspace tools to test and work with this turns out to be a pain in the ass. Parsing ...
<commit_before>import subprocess from . import pf """ Doing this the "right" way by using DIOCNATLOOK on the pf device turns out to be a pain. Apple has made a number of modifications to the data structures returned, and compiling userspace tools to test and work with this turns out to be a pain in th...
import subprocess from . import pf """ Doing this the "right" way by using DIOCNATLOOK on the pf device turns out to be a pain. Apple has made a number of modifications to the data structures returned, and compiling userspace tools to test and work with this turns out to be a pain in the ass. Parsing ...
import subprocess from . import pf """ Doing this the "right" way by using DIOCNATLOOK on the pf device turns out to be a pain. Apple has made a number of modifications to the data structures returned, and compiling userspace tools to test and work with this turns out to be a pain in the ass. Parsing ...
<commit_before>import subprocess from . import pf """ Doing this the "right" way by using DIOCNATLOOK on the pf device turns out to be a pain. Apple has made a number of modifications to the data structures returned, and compiling userspace tools to test and work with this turns out to be a pain in th...
f7f6a8a1b1f019b45b9f3c3c9c6124469a335798
phildb_client/__init__.py
phildb_client/__init__.py
from client import PhilDBClient from ._version import get_versions __version__ = get_versions()['version'] del get_versions
from phildb_client.client import PhilDBClient from ._version import get_versions __version__ = get_versions()['version'] del get_versions
Make import of client module explicit
Make import of client module explicit
Python
bsd-3-clause
amacd31/phildb_client
from client import PhilDBClient from ._version import get_versions __version__ = get_versions()['version'] del get_versions Make import of client module explicit
from phildb_client.client import PhilDBClient from ._version import get_versions __version__ = get_versions()['version'] del get_versions
<commit_before>from client import PhilDBClient from ._version import get_versions __version__ = get_versions()['version'] del get_versions <commit_msg>Make import of client module explicit<commit_after>
from phildb_client.client import PhilDBClient from ._version import get_versions __version__ = get_versions()['version'] del get_versions
from client import PhilDBClient from ._version import get_versions __version__ = get_versions()['version'] del get_versions Make import of client module explicitfrom phildb_client.client import PhilDBClient from ._version import get_versions __version__ = get_versions()['version'] del get_versions
<commit_before>from client import PhilDBClient from ._version import get_versions __version__ = get_versions()['version'] del get_versions <commit_msg>Make import of client module explicit<commit_after>from phildb_client.client import PhilDBClient from ._version import get_versions __version__ = get_versions()['versi...
9f17fc03a79434b3d92e4dea00ea33567c806280
runner/update_manifest.py
runner/update_manifest.py
import json import os import sys here = os.path.abspath(os.path.split(__file__)[0]) root = os.path.abspath(os.path.join(here, "..", "..")) sys.path.insert(0, os.path.abspath(os.path.join(here, "..", "scripts"))) import manifest def main(request, response): manifest_path = os.path.join(root, "MANIFEST.json") ...
import json import os import sys here = os.path.abspath(os.path.split(__file__)[0]) root = os.path.abspath(os.path.join(here, "..", "..")) sys.path.insert(0, os.path.abspath(os.path.join(here, "..", "scripts"))) import manifest def main(request, response): path = os.path.join(root, "MANIFEST.json") manifest...
Update test runner for changes in the manifest API.
Update test runner for changes in the manifest API.
Python
bsd-3-clause
frewsxcv/wpt-tools,wpt-on-tv-tf/wpt-tools,wpt-on-tv-tf/wpt-tools,frewsxcv/wpt-tools,kaixinjxq/wpt-tools,UprootStaging/wpt-tools,UprootStaging/wpt-tools,wpt-on-tv-tf/wpt-tools,kaixinjxq/wpt-tools,vivliostyle/wpt-tools,UprootStaging/wpt-tools,frewsxcv/wpt-tools,vivliostyle/wpt-tools,kaixinjxq/wpt-tools,vivliostyle/wpt-to...
import json import os import sys here = os.path.abspath(os.path.split(__file__)[0]) root = os.path.abspath(os.path.join(here, "..", "..")) sys.path.insert(0, os.path.abspath(os.path.join(here, "..", "scripts"))) import manifest def main(request, response): manifest_path = os.path.join(root, "MANIFEST.json") ...
import json import os import sys here = os.path.abspath(os.path.split(__file__)[0]) root = os.path.abspath(os.path.join(here, "..", "..")) sys.path.insert(0, os.path.abspath(os.path.join(here, "..", "scripts"))) import manifest def main(request, response): path = os.path.join(root, "MANIFEST.json") manifest...
<commit_before>import json import os import sys here = os.path.abspath(os.path.split(__file__)[0]) root = os.path.abspath(os.path.join(here, "..", "..")) sys.path.insert(0, os.path.abspath(os.path.join(here, "..", "scripts"))) import manifest def main(request, response): manifest_path = os.path.join(root, "MANI...
import json import os import sys here = os.path.abspath(os.path.split(__file__)[0]) root = os.path.abspath(os.path.join(here, "..", "..")) sys.path.insert(0, os.path.abspath(os.path.join(here, "..", "scripts"))) import manifest def main(request, response): path = os.path.join(root, "MANIFEST.json") manifest...
import json import os import sys here = os.path.abspath(os.path.split(__file__)[0]) root = os.path.abspath(os.path.join(here, "..", "..")) sys.path.insert(0, os.path.abspath(os.path.join(here, "..", "scripts"))) import manifest def main(request, response): manifest_path = os.path.join(root, "MANIFEST.json") ...
<commit_before>import json import os import sys here = os.path.abspath(os.path.split(__file__)[0]) root = os.path.abspath(os.path.join(here, "..", "..")) sys.path.insert(0, os.path.abspath(os.path.join(here, "..", "scripts"))) import manifest def main(request, response): manifest_path = os.path.join(root, "MANI...
6fab7a8170cbd993400b097478f328024c3f9247
ezdaemon/__init__.py
ezdaemon/__init__.py
"""Daemonize makes Unix-y daemons real easy. Just import daemonize.daemonize and call the function before whatever you want the daemon to be. A couple gotchas: 1) It will disconnect your python process from stdin and stdout, so any print calls will not show up. This is because daemons are disconnected from...
"""ezdaemon makes Unix-y daemons real easy. Just import ezdaemon.daemonize and call it before whatever you want the daemon to be. A couple gotchas: 1. It will disconnect your python process from stdin and stdout, so any print calls will not show up. This is because daemons are disconnected from any controlling t...
Make init docstring reflect README
Make init docstring reflect README
Python
mit
cjeffers/ezdaemon
"""Daemonize makes Unix-y daemons real easy. Just import daemonize.daemonize and call the function before whatever you want the daemon to be. A couple gotchas: 1) It will disconnect your python process from stdin and stdout, so any print calls will not show up. This is because daemons are disconnected from...
"""ezdaemon makes Unix-y daemons real easy. Just import ezdaemon.daemonize and call it before whatever you want the daemon to be. A couple gotchas: 1. It will disconnect your python process from stdin and stdout, so any print calls will not show up. This is because daemons are disconnected from any controlling t...
<commit_before>"""Daemonize makes Unix-y daemons real easy. Just import daemonize.daemonize and call the function before whatever you want the daemon to be. A couple gotchas: 1) It will disconnect your python process from stdin and stdout, so any print calls will not show up. This is because daemons are discon...
"""ezdaemon makes Unix-y daemons real easy. Just import ezdaemon.daemonize and call it before whatever you want the daemon to be. A couple gotchas: 1. It will disconnect your python process from stdin and stdout, so any print calls will not show up. This is because daemons are disconnected from any controlling t...
"""Daemonize makes Unix-y daemons real easy. Just import daemonize.daemonize and call the function before whatever you want the daemon to be. A couple gotchas: 1) It will disconnect your python process from stdin and stdout, so any print calls will not show up. This is because daemons are disconnected from...
<commit_before>"""Daemonize makes Unix-y daemons real easy. Just import daemonize.daemonize and call the function before whatever you want the daemon to be. A couple gotchas: 1) It will disconnect your python process from stdin and stdout, so any print calls will not show up. This is because daemons are discon...
c0a41a602fb7fa2ef0a6472f8c6ca00a7acfc7f1
app/youtube.py
app/youtube.py
# Load data for videos in Youtube playlist # https://www.youtube.com/playlist?list=PLy7eek8wTbV9OtrbY3CJo5mRWnhuwTen0 ## TODO handle videos for multiple months # all_videos dict contains videos by day. import pafy from datetime import datetime # TODO import app key # pafy.set_api_key(key) print("Loading Youtube vid...
# Load data for videos in Youtube playlist # Uses video title as date, formatted as 20151230 ## TODO handle videos for multiple months # all_videos dict contains videos by day. import pafy from datetime import datetime # TODO import app key # pafy.set_api_key(key) print("Loading Youtube video playlist") playlist =...
Change playlist to a new.
Change playlist to a new.
Python
mit
jasalt/weatherlapse,jasalt/weatherlapse,jasalt/tiea207-demo,jasalt/tiea207-demo
# Load data for videos in Youtube playlist # https://www.youtube.com/playlist?list=PLy7eek8wTbV9OtrbY3CJo5mRWnhuwTen0 ## TODO handle videos for multiple months # all_videos dict contains videos by day. import pafy from datetime import datetime # TODO import app key # pafy.set_api_key(key) print("Loading Youtube vid...
# Load data for videos in Youtube playlist # Uses video title as date, formatted as 20151230 ## TODO handle videos for multiple months # all_videos dict contains videos by day. import pafy from datetime import datetime # TODO import app key # pafy.set_api_key(key) print("Loading Youtube video playlist") playlist =...
<commit_before># Load data for videos in Youtube playlist # https://www.youtube.com/playlist?list=PLy7eek8wTbV9OtrbY3CJo5mRWnhuwTen0 ## TODO handle videos for multiple months # all_videos dict contains videos by day. import pafy from datetime import datetime # TODO import app key # pafy.set_api_key(key) print("Load...
# Load data for videos in Youtube playlist # Uses video title as date, formatted as 20151230 ## TODO handle videos for multiple months # all_videos dict contains videos by day. import pafy from datetime import datetime # TODO import app key # pafy.set_api_key(key) print("Loading Youtube video playlist") playlist =...
# Load data for videos in Youtube playlist # https://www.youtube.com/playlist?list=PLy7eek8wTbV9OtrbY3CJo5mRWnhuwTen0 ## TODO handle videos for multiple months # all_videos dict contains videos by day. import pafy from datetime import datetime # TODO import app key # pafy.set_api_key(key) print("Loading Youtube vid...
<commit_before># Load data for videos in Youtube playlist # https://www.youtube.com/playlist?list=PLy7eek8wTbV9OtrbY3CJo5mRWnhuwTen0 ## TODO handle videos for multiple months # all_videos dict contains videos by day. import pafy from datetime import datetime # TODO import app key # pafy.set_api_key(key) print("Load...
b262d53e8347ea666cb5cd46bc9e19b7944cf7e6
core/data/DataWriter.py
core/data/DataWriter.py
""" DataWriter.py """ from DataController import DataController from DataReader import DataReader from vtk import vtkMetaImageWriter from vtk import vtkXMLImageDataWriter class DataWriter(DataController): """ DataWriter writes an image data object to disk using the provided format. """ def __init__(self): sup...
""" DataWriter.py """ from DataController import DataController from DataReader import DataReader from vtk import vtkMetaImageWriter from vtk import vtkXMLImageDataWriter class DataWriter(DataController): """ DataWriter writes an image data object to disk using the provided format. """ def __init__(self): sup...
Build in support for writing mha files.
Build in support for writing mha files.
Python
mit
berendkleinhaneveld/Registrationshop,berendkleinhaneveld/Registrationshop
""" DataWriter.py """ from DataController import DataController from DataReader import DataReader from vtk import vtkMetaImageWriter from vtk import vtkXMLImageDataWriter class DataWriter(DataController): """ DataWriter writes an image data object to disk using the provided format. """ def __init__(self): sup...
""" DataWriter.py """ from DataController import DataController from DataReader import DataReader from vtk import vtkMetaImageWriter from vtk import vtkXMLImageDataWriter class DataWriter(DataController): """ DataWriter writes an image data object to disk using the provided format. """ def __init__(self): sup...
<commit_before>""" DataWriter.py """ from DataController import DataController from DataReader import DataReader from vtk import vtkMetaImageWriter from vtk import vtkXMLImageDataWriter class DataWriter(DataController): """ DataWriter writes an image data object to disk using the provided format. """ def __init...
""" DataWriter.py """ from DataController import DataController from DataReader import DataReader from vtk import vtkMetaImageWriter from vtk import vtkXMLImageDataWriter class DataWriter(DataController): """ DataWriter writes an image data object to disk using the provided format. """ def __init__(self): sup...
""" DataWriter.py """ from DataController import DataController from DataReader import DataReader from vtk import vtkMetaImageWriter from vtk import vtkXMLImageDataWriter class DataWriter(DataController): """ DataWriter writes an image data object to disk using the provided format. """ def __init__(self): sup...
<commit_before>""" DataWriter.py """ from DataController import DataController from DataReader import DataReader from vtk import vtkMetaImageWriter from vtk import vtkXMLImageDataWriter class DataWriter(DataController): """ DataWriter writes an image data object to disk using the provided format. """ def __init...
a806d55b7cb2c554357895ca441f30c906aa1fc1
application.py
application.py
from canis import siriusxm, spotify, oauth def main(): try: current = siriusxm.get_currently_playing('siriusxmu') spotify_id = spotify.id_for_song(current) print(current, spotify_id) except Exception, e: print "Error {}".format(e) if __name__ == "__main__": oauth.app.run() ...
from time import sleep from datetime import datetime from canis import siriusxm, spotify, oauth def main(): channels = ['siriusxmu', 'altnation'] while True: if oauth.expiration > datetime.utcnow(): oauth.refresh() for channel in channels: try: current = ...
Restructure error handling a bit
Restructure error handling a bit
Python
mit
maxgoedjen/canis
from canis import siriusxm, spotify, oauth def main(): try: current = siriusxm.get_currently_playing('siriusxmu') spotify_id = spotify.id_for_song(current) print(current, spotify_id) except Exception, e: print "Error {}".format(e) if __name__ == "__main__": oauth.app.run() ...
from time import sleep from datetime import datetime from canis import siriusxm, spotify, oauth def main(): channels = ['siriusxmu', 'altnation'] while True: if oauth.expiration > datetime.utcnow(): oauth.refresh() for channel in channels: try: current = ...
<commit_before>from canis import siriusxm, spotify, oauth def main(): try: current = siriusxm.get_currently_playing('siriusxmu') spotify_id = spotify.id_for_song(current) print(current, spotify_id) except Exception, e: print "Error {}".format(e) if __name__ == "__main__": o...
from time import sleep from datetime import datetime from canis import siriusxm, spotify, oauth def main(): channels = ['siriusxmu', 'altnation'] while True: if oauth.expiration > datetime.utcnow(): oauth.refresh() for channel in channels: try: current = ...
from canis import siriusxm, spotify, oauth def main(): try: current = siriusxm.get_currently_playing('siriusxmu') spotify_id = spotify.id_for_song(current) print(current, spotify_id) except Exception, e: print "Error {}".format(e) if __name__ == "__main__": oauth.app.run() ...
<commit_before>from canis import siriusxm, spotify, oauth def main(): try: current = siriusxm.get_currently_playing('siriusxmu') spotify_id = spotify.id_for_song(current) print(current, spotify_id) except Exception, e: print "Error {}".format(e) if __name__ == "__main__": o...
cae43a00c1a9421194721601c0bebc3468f134e4
sekh/utils.py
sekh/utils.py
"""Utils for django-sekh""" import re from itertools import izip def remove_duplicates(items): """ Remove duplicates elements in a list preserving the order. """ seen = {} result = [] for item in items: item = item.strip() if not item or item in seen: continue ...
"""Utils for django-sekh""" from future_builtins import zip import re def remove_duplicates(items): """ Remove duplicates elements in a list preserving the order. """ seen = {} result = [] for item in items: item = item.strip() if not item or item in seen: continue...
Use zip from future_builtins for Python 2 and 3 compatibility
Use zip from future_builtins for Python 2 and 3 compatibility
Python
bsd-3-clause
Fantomas42/django-sekh
"""Utils for django-sekh""" import re from itertools import izip def remove_duplicates(items): """ Remove duplicates elements in a list preserving the order. """ seen = {} result = [] for item in items: item = item.strip() if not item or item in seen: continue ...
"""Utils for django-sekh""" from future_builtins import zip import re def remove_duplicates(items): """ Remove duplicates elements in a list preserving the order. """ seen = {} result = [] for item in items: item = item.strip() if not item or item in seen: continue...
<commit_before>"""Utils for django-sekh""" import re from itertools import izip def remove_duplicates(items): """ Remove duplicates elements in a list preserving the order. """ seen = {} result = [] for item in items: item = item.strip() if not item or item in seen: ...
"""Utils for django-sekh""" from future_builtins import zip import re def remove_duplicates(items): """ Remove duplicates elements in a list preserving the order. """ seen = {} result = [] for item in items: item = item.strip() if not item or item in seen: continue...
"""Utils for django-sekh""" import re from itertools import izip def remove_duplicates(items): """ Remove duplicates elements in a list preserving the order. """ seen = {} result = [] for item in items: item = item.strip() if not item or item in seen: continue ...
<commit_before>"""Utils for django-sekh""" import re from itertools import izip def remove_duplicates(items): """ Remove duplicates elements in a list preserving the order. """ seen = {} result = [] for item in items: item = item.strip() if not item or item in seen: ...
fc6acce0667d23c0f0b51d67c5899cf979d37516
kindred/pycorenlp.py
kindred/pycorenlp.py
# Temporary inclusion of pycorenlp code for easier edits # https://github.com/smilli/py-corenlp import json, requests import six class StanfordCoreNLP: useSessions = False sessions = {} def __init__(self, server_url): self.server_url = server_url if StanfordCoreNLP.useSessions: if not server_url in Stanfo...
# Temporary inclusion of pycorenlp code for easier edits # https://github.com/smilli/py-corenlp import json, requests import six class StanfordCoreNLP: def __init__(self, server_url): self.server_url = server_url def annotate(self, text, properties={}): assert isinstance(text, six.string_types),"text must be ...
Remove experimental CoreNLP session code
Remove experimental CoreNLP session code
Python
mit
jakelever/kindred,jakelever/kindred
# Temporary inclusion of pycorenlp code for easier edits # https://github.com/smilli/py-corenlp import json, requests import six class StanfordCoreNLP: useSessions = False sessions = {} def __init__(self, server_url): self.server_url = server_url if StanfordCoreNLP.useSessions: if not server_url in Stanfo...
# Temporary inclusion of pycorenlp code for easier edits # https://github.com/smilli/py-corenlp import json, requests import six class StanfordCoreNLP: def __init__(self, server_url): self.server_url = server_url def annotate(self, text, properties={}): assert isinstance(text, six.string_types),"text must be ...
<commit_before># Temporary inclusion of pycorenlp code for easier edits # https://github.com/smilli/py-corenlp import json, requests import six class StanfordCoreNLP: useSessions = False sessions = {} def __init__(self, server_url): self.server_url = server_url if StanfordCoreNLP.useSessions: if not serve...
# Temporary inclusion of pycorenlp code for easier edits # https://github.com/smilli/py-corenlp import json, requests import six class StanfordCoreNLP: def __init__(self, server_url): self.server_url = server_url def annotate(self, text, properties={}): assert isinstance(text, six.string_types),"text must be ...
# Temporary inclusion of pycorenlp code for easier edits # https://github.com/smilli/py-corenlp import json, requests import six class StanfordCoreNLP: useSessions = False sessions = {} def __init__(self, server_url): self.server_url = server_url if StanfordCoreNLP.useSessions: if not server_url in Stanfo...
<commit_before># Temporary inclusion of pycorenlp code for easier edits # https://github.com/smilli/py-corenlp import json, requests import six class StanfordCoreNLP: useSessions = False sessions = {} def __init__(self, server_url): self.server_url = server_url if StanfordCoreNLP.useSessions: if not serve...
3275d31861f9cccc623e7ae8c83198a48a75f82a
events/createMatchEvent.py
events/createMatchEvent.py
from common.log import logUtils as log from constants import clientPackets from constants import exceptions from objects import glob def handle(userToken, packetData): try: # get usertoken data userID = userToken.userID # Read packet data packetData = clientPackets.createMatch(packetData) # Create a matc...
from common.log import logUtils as log from constants import clientPackets, serverPackets from constants import exceptions from objects import glob def handle(userToken, packetData): try: # get usertoken data userID = userToken.userID # Read packet data packetData = clientPackets.createMatch(packetData) ...
Handle matches with no name
Handle matches with no name
Python
agpl-3.0
osuripple/pep.py,osuripple/pep.py
from common.log import logUtils as log from constants import clientPackets from constants import exceptions from objects import glob def handle(userToken, packetData): try: # get usertoken data userID = userToken.userID # Read packet data packetData = clientPackets.createMatch(packetData) # Create a matc...
from common.log import logUtils as log from constants import clientPackets, serverPackets from constants import exceptions from objects import glob def handle(userToken, packetData): try: # get usertoken data userID = userToken.userID # Read packet data packetData = clientPackets.createMatch(packetData) ...
<commit_before>from common.log import logUtils as log from constants import clientPackets from constants import exceptions from objects import glob def handle(userToken, packetData): try: # get usertoken data userID = userToken.userID # Read packet data packetData = clientPackets.createMatch(packetData) ...
from common.log import logUtils as log from constants import clientPackets, serverPackets from constants import exceptions from objects import glob def handle(userToken, packetData): try: # get usertoken data userID = userToken.userID # Read packet data packetData = clientPackets.createMatch(packetData) ...
from common.log import logUtils as log from constants import clientPackets from constants import exceptions from objects import glob def handle(userToken, packetData): try: # get usertoken data userID = userToken.userID # Read packet data packetData = clientPackets.createMatch(packetData) # Create a matc...
<commit_before>from common.log import logUtils as log from constants import clientPackets from constants import exceptions from objects import glob def handle(userToken, packetData): try: # get usertoken data userID = userToken.userID # Read packet data packetData = clientPackets.createMatch(packetData) ...
d04a0000d231b1a597992bd28ab4ab8de27667e2
cron/updateGameCache.py
cron/updateGameCache.py
import urllib2 urllib2.urlopen('http://www.gamingwithlemons.com/cron/update')
import urllib.request urllib.request.urlopen('http://www.gamingwithlemons.com/cron/update')
Update cron job to use python3
Update cron job to use python3
Python
mit
rewphus/tidbitsdev,Clidus/gwl,rewphus/tidbitsdev,Clidus/gwl,rewphus/tidbitsdev,rewphus/tidbitsdev,Clidus/gwl,Clidus/gwl
import urllib2 urllib2.urlopen('http://www.gamingwithlemons.com/cron/update')Update cron job to use python3
import urllib.request urllib.request.urlopen('http://www.gamingwithlemons.com/cron/update')
<commit_before>import urllib2 urllib2.urlopen('http://www.gamingwithlemons.com/cron/update')<commit_msg>Update cron job to use python3<commit_after>
import urllib.request urllib.request.urlopen('http://www.gamingwithlemons.com/cron/update')
import urllib2 urllib2.urlopen('http://www.gamingwithlemons.com/cron/update')Update cron job to use python3import urllib.request urllib.request.urlopen('http://www.gamingwithlemons.com/cron/update')
<commit_before>import urllib2 urllib2.urlopen('http://www.gamingwithlemons.com/cron/update')<commit_msg>Update cron job to use python3<commit_after>import urllib.request urllib.request.urlopen('http://www.gamingwithlemons.com/cron/update')
8e8545c024e307a4878cdb93a79b854afc84fad5
nyucal/cli.py
nyucal/cli.py
# -*- coding: utf-8 -*- """Console script for nyucal.""" import io import click from lxml import html from nyucal import nyucal import requests @click.group() def main(args=None): """Console script for nyucal.""" click.echo("Replace this message by putting your code into " "nyucal.cli.main")...
# -*- coding: utf-8 -*- """Console script for nyucal. See click documentation at http://click.pocoo.org/ """ import io import click from nyucal import nyucal import requests @click.group() def main(args=None): """Console script for nyucal.""" click.echo("cli for nyucal") @main.command() def list(source...
Use the module variable for source URL
Use the module variable for source URL
Python
mit
nyumathclinic/nyucal,nyumathclinic/nyucal
# -*- coding: utf-8 -*- """Console script for nyucal.""" import io import click from lxml import html from nyucal import nyucal import requests @click.group() def main(args=None): """Console script for nyucal.""" click.echo("Replace this message by putting your code into " "nyucal.cli.main")...
# -*- coding: utf-8 -*- """Console script for nyucal. See click documentation at http://click.pocoo.org/ """ import io import click from nyucal import nyucal import requests @click.group() def main(args=None): """Console script for nyucal.""" click.echo("cli for nyucal") @main.command() def list(source...
<commit_before># -*- coding: utf-8 -*- """Console script for nyucal.""" import io import click from lxml import html from nyucal import nyucal import requests @click.group() def main(args=None): """Console script for nyucal.""" click.echo("Replace this message by putting your code into " "ny...
# -*- coding: utf-8 -*- """Console script for nyucal. See click documentation at http://click.pocoo.org/ """ import io import click from nyucal import nyucal import requests @click.group() def main(args=None): """Console script for nyucal.""" click.echo("cli for nyucal") @main.command() def list(source...
# -*- coding: utf-8 -*- """Console script for nyucal.""" import io import click from lxml import html from nyucal import nyucal import requests @click.group() def main(args=None): """Console script for nyucal.""" click.echo("Replace this message by putting your code into " "nyucal.cli.main")...
<commit_before># -*- coding: utf-8 -*- """Console script for nyucal.""" import io import click from lxml import html from nyucal import nyucal import requests @click.group() def main(args=None): """Console script for nyucal.""" click.echo("Replace this message by putting your code into " "ny...
a94aa2d9aa58a7c2df289588eb4f16d83725ce8f
numba/exttypes/tests/test_vtables.py
numba/exttypes/tests/test_vtables.py
__author__ = 'mark'
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import import numba as nb from numba import * from numba.minivect.minitypes import FunctionType from numba.exttypes import virtual from numba.exttypes import ordering from numba.exttypes import methodtable from numba.exttypes.signatures ...
Add test for hash-based vtable creation
Add test for hash-based vtable creation
Python
bsd-2-clause
cpcloud/numba,ssarangi/numba,jriehl/numba,stuartarchibald/numba,pombredanne/numba,stefanseefeld/numba,stuartarchibald/numba,pitrou/numba,seibert/numba,cpcloud/numba,ssarangi/numba,IntelLabs/numba,IntelLabs/numba,sklam/numba,cpcloud/numba,seibert/numba,GaZ3ll3/numba,stonebig/numba,GaZ3ll3/numba,stonebig/numba,cpcloud/nu...
__author__ = 'mark' Add test for hash-based vtable creation
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import import numba as nb from numba import * from numba.minivect.minitypes import FunctionType from numba.exttypes import virtual from numba.exttypes import ordering from numba.exttypes import methodtable from numba.exttypes.signatures ...
<commit_before>__author__ = 'mark' <commit_msg>Add test for hash-based vtable creation<commit_after>
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import import numba as nb from numba import * from numba.minivect.minitypes import FunctionType from numba.exttypes import virtual from numba.exttypes import ordering from numba.exttypes import methodtable from numba.exttypes.signatures ...
__author__ = 'mark' Add test for hash-based vtable creation# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import import numba as nb from numba import * from numba.minivect.minitypes import FunctionType from numba.exttypes import virtual from numba.exttypes import ordering from numba....
<commit_before>__author__ = 'mark' <commit_msg>Add test for hash-based vtable creation<commit_after># -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import import numba as nb from numba import * from numba.minivect.minitypes import FunctionType from numba.exttypes import virtual from n...
8e9de7c0df2f37c40d40b32612aae8e351c748b4
class4/exercise1.py
class4/exercise1.py
#!/usr/bin/python from getpass import getpass import time import paramiko def main(): ip_addr = '50.76.53.27' username = 'pyclass' password = getpass() ssh_port = 8022 remote_conn_pre = paramiko.SSHClient() remote_conn_pre.set_missing_host_key_policy(paramiko.AutoAddPolicy()) remote_con...
# Use Paramiko to retrieve the entire 'show version' output from pynet-rtr2. #!/usr/bin/python from getpass import getpass import time import paramiko def main(): ip_addr = '50.76.53.27' username = 'pyclass' password = getpass() ssh_port = 8022 remote_conn_pre = paramiko.SSHClient() remote_...
Use Paramiko to retrieve the entire 'show version' output from pynet-rtr2.
Use Paramiko to retrieve the entire 'show version' output from pynet-rtr2.
Python
apache-2.0
linkdebian/pynet_course
#!/usr/bin/python from getpass import getpass import time import paramiko def main(): ip_addr = '50.76.53.27' username = 'pyclass' password = getpass() ssh_port = 8022 remote_conn_pre = paramiko.SSHClient() remote_conn_pre.set_missing_host_key_policy(paramiko.AutoAddPolicy()) remote_con...
# Use Paramiko to retrieve the entire 'show version' output from pynet-rtr2. #!/usr/bin/python from getpass import getpass import time import paramiko def main(): ip_addr = '50.76.53.27' username = 'pyclass' password = getpass() ssh_port = 8022 remote_conn_pre = paramiko.SSHClient() remote_...
<commit_before>#!/usr/bin/python from getpass import getpass import time import paramiko def main(): ip_addr = '50.76.53.27' username = 'pyclass' password = getpass() ssh_port = 8022 remote_conn_pre = paramiko.SSHClient() remote_conn_pre.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ...
# Use Paramiko to retrieve the entire 'show version' output from pynet-rtr2. #!/usr/bin/python from getpass import getpass import time import paramiko def main(): ip_addr = '50.76.53.27' username = 'pyclass' password = getpass() ssh_port = 8022 remote_conn_pre = paramiko.SSHClient() remote_...
#!/usr/bin/python from getpass import getpass import time import paramiko def main(): ip_addr = '50.76.53.27' username = 'pyclass' password = getpass() ssh_port = 8022 remote_conn_pre = paramiko.SSHClient() remote_conn_pre.set_missing_host_key_policy(paramiko.AutoAddPolicy()) remote_con...
<commit_before>#!/usr/bin/python from getpass import getpass import time import paramiko def main(): ip_addr = '50.76.53.27' username = 'pyclass' password = getpass() ssh_port = 8022 remote_conn_pre = paramiko.SSHClient() remote_conn_pre.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ...
81ca54adbfdb605cd63674134144e058c46bab5f
nalaf/features/embeddings.py
nalaf/features/embeddings.py
from nalaf.features import FeatureGenerator from gensim.models import Word2Vec class WordEmbeddingsFeatureGenerator(FeatureGenerator): """ DOCSTRING """ def __init__(self, model_file, weight=1): self.model = Word2Vec.load(model_file) self.weight = weight def generate(self, datase...
from nalaf.features import FeatureGenerator from gensim.models import Word2Vec class WordEmbeddingsFeatureGenerator(FeatureGenerator): """ DOCSTRING """ def __init__(self, model_file, additive=0, multiplicative=1): self.model = Word2Vec.load(model_file) self.additive = additive ...
Make WE use additive and multiplicative constants
Make WE use additive and multiplicative constants
Python
apache-2.0
Rostlab/nalaf
from nalaf.features import FeatureGenerator from gensim.models import Word2Vec class WordEmbeddingsFeatureGenerator(FeatureGenerator): """ DOCSTRING """ def __init__(self, model_file, weight=1): self.model = Word2Vec.load(model_file) self.weight = weight def generate(self, datase...
from nalaf.features import FeatureGenerator from gensim.models import Word2Vec class WordEmbeddingsFeatureGenerator(FeatureGenerator): """ DOCSTRING """ def __init__(self, model_file, additive=0, multiplicative=1): self.model = Word2Vec.load(model_file) self.additive = additive ...
<commit_before>from nalaf.features import FeatureGenerator from gensim.models import Word2Vec class WordEmbeddingsFeatureGenerator(FeatureGenerator): """ DOCSTRING """ def __init__(self, model_file, weight=1): self.model = Word2Vec.load(model_file) self.weight = weight def genera...
from nalaf.features import FeatureGenerator from gensim.models import Word2Vec class WordEmbeddingsFeatureGenerator(FeatureGenerator): """ DOCSTRING """ def __init__(self, model_file, additive=0, multiplicative=1): self.model = Word2Vec.load(model_file) self.additive = additive ...
from nalaf.features import FeatureGenerator from gensim.models import Word2Vec class WordEmbeddingsFeatureGenerator(FeatureGenerator): """ DOCSTRING """ def __init__(self, model_file, weight=1): self.model = Word2Vec.load(model_file) self.weight = weight def generate(self, datase...
<commit_before>from nalaf.features import FeatureGenerator from gensim.models import Word2Vec class WordEmbeddingsFeatureGenerator(FeatureGenerator): """ DOCSTRING """ def __init__(self, model_file, weight=1): self.model = Word2Vec.load(model_file) self.weight = weight def genera...
984d8626a146770fe93d54ae107cd33dc3d2f481
dbmigrator/commands/init_schema_migrations.py
dbmigrator/commands/init_schema_migrations.py
# -*- coding: utf-8 -*- # ### # Copyright (c) 2015, Rice University # This software is subject to the provisions of the GNU Affero General # Public License version 3 (AGPLv3). # See LICENCE.txt for details. # ### from .. import utils __all__ = ('cli_loader',) @utils.with_cursor def cli_command(cursor, migrations_d...
# -*- coding: utf-8 -*- # ### # Copyright (c) 2015, Rice University # This software is subject to the provisions of the GNU Affero General # Public License version 3 (AGPLv3). # See LICENCE.txt for details. # ### from .. import utils __all__ = ('cli_loader',) @utils.with_cursor def cli_command(cursor, migrations_d...
Add "applied" timestamp to schema migrations table
Add "applied" timestamp to schema migrations table
Python
agpl-3.0
karenc/db-migrator
# -*- coding: utf-8 -*- # ### # Copyright (c) 2015, Rice University # This software is subject to the provisions of the GNU Affero General # Public License version 3 (AGPLv3). # See LICENCE.txt for details. # ### from .. import utils __all__ = ('cli_loader',) @utils.with_cursor def cli_command(cursor, migrations_d...
# -*- coding: utf-8 -*- # ### # Copyright (c) 2015, Rice University # This software is subject to the provisions of the GNU Affero General # Public License version 3 (AGPLv3). # See LICENCE.txt for details. # ### from .. import utils __all__ = ('cli_loader',) @utils.with_cursor def cli_command(cursor, migrations_d...
<commit_before># -*- coding: utf-8 -*- # ### # Copyright (c) 2015, Rice University # This software is subject to the provisions of the GNU Affero General # Public License version 3 (AGPLv3). # See LICENCE.txt for details. # ### from .. import utils __all__ = ('cli_loader',) @utils.with_cursor def cli_command(curso...
# -*- coding: utf-8 -*- # ### # Copyright (c) 2015, Rice University # This software is subject to the provisions of the GNU Affero General # Public License version 3 (AGPLv3). # See LICENCE.txt for details. # ### from .. import utils __all__ = ('cli_loader',) @utils.with_cursor def cli_command(cursor, migrations_d...
# -*- coding: utf-8 -*- # ### # Copyright (c) 2015, Rice University # This software is subject to the provisions of the GNU Affero General # Public License version 3 (AGPLv3). # See LICENCE.txt for details. # ### from .. import utils __all__ = ('cli_loader',) @utils.with_cursor def cli_command(cursor, migrations_d...
<commit_before># -*- coding: utf-8 -*- # ### # Copyright (c) 2015, Rice University # This software is subject to the provisions of the GNU Affero General # Public License version 3 (AGPLv3). # See LICENCE.txt for details. # ### from .. import utils __all__ = ('cli_loader',) @utils.with_cursor def cli_command(curso...
8dbea15b789227d55972512307feb8f40f5d11a1
git_upstream_diff.py
git_upstream_diff.py
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import sys import subprocess2 from git_common import current_branch, get_or_create_merge_base, config_list from git_c...
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import sys import subprocess2 import git_common as git def main(args): default_args = git.config_list('depot-tools...
Make udiff print reasonable errors while not on a branch.
Make udiff print reasonable errors while not on a branch. R=agable@chromium.org BUG= Review URL: https://codereview.chromium.org/212493002 git-svn-id: bd64dd6fa6f3f0ed0c0666d1018379882b742947@259647 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Python
bsd-3-clause
svn2github/chromium-depot-tools,svn2github/chromium-depot-tools,svn2github/chromium-depot-tools
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import sys import subprocess2 from git_common import current_branch, get_or_create_merge_base, config_list from git_c...
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import sys import subprocess2 import git_common as git def main(args): default_args = git.config_list('depot-tools...
<commit_before>#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import sys import subprocess2 from git_common import current_branch, get_or_create_merge_base, config_...
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import sys import subprocess2 import git_common as git def main(args): default_args = git.config_list('depot-tools...
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import sys import subprocess2 from git_common import current_branch, get_or_create_merge_base, config_list from git_c...
<commit_before>#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import sys import subprocess2 from git_common import current_branch, get_or_create_merge_base, config_...
2a285104807b07eba3682796536903254a175170
images_of/connect.py
images_of/connect.py
import praw from images_of import settings class Reddit(praw.Reddit): def oauth(self, **kwargs): self.set_oauth_app_info( client_id = kwargs.get('client_id') or settings.CLIENT_ID, client_secret = kwargs.get('client_secret') or settings.CLIENT_SECRET, redirect_uri = kwa...
import praw from images_of import settings class Reddit(praw.Reddit): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.config.api_request_delay = 1.0 def oauth(self, **kwargs): self.set_oauth_app_info( client_id = kwargs.get('client_id') or setti...
Reduce oauth api-delay to 1s.
Reduce oauth api-delay to 1s.
Python
mit
amici-ursi/ImagesOfNetwork,scowcron/ImagesOfNetwork
import praw from images_of import settings class Reddit(praw.Reddit): def oauth(self, **kwargs): self.set_oauth_app_info( client_id = kwargs.get('client_id') or settings.CLIENT_ID, client_secret = kwargs.get('client_secret') or settings.CLIENT_SECRET, redirect_uri = kwa...
import praw from images_of import settings class Reddit(praw.Reddit): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.config.api_request_delay = 1.0 def oauth(self, **kwargs): self.set_oauth_app_info( client_id = kwargs.get('client_id') or setti...
<commit_before>import praw from images_of import settings class Reddit(praw.Reddit): def oauth(self, **kwargs): self.set_oauth_app_info( client_id = kwargs.get('client_id') or settings.CLIENT_ID, client_secret = kwargs.get('client_secret') or settings.CLIENT_SECRET, red...
import praw from images_of import settings class Reddit(praw.Reddit): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.config.api_request_delay = 1.0 def oauth(self, **kwargs): self.set_oauth_app_info( client_id = kwargs.get('client_id') or setti...
import praw from images_of import settings class Reddit(praw.Reddit): def oauth(self, **kwargs): self.set_oauth_app_info( client_id = kwargs.get('client_id') or settings.CLIENT_ID, client_secret = kwargs.get('client_secret') or settings.CLIENT_SECRET, redirect_uri = kwa...
<commit_before>import praw from images_of import settings class Reddit(praw.Reddit): def oauth(self, **kwargs): self.set_oauth_app_info( client_id = kwargs.get('client_id') or settings.CLIENT_ID, client_secret = kwargs.get('client_secret') or settings.CLIENT_SECRET, red...
cab3289827c859085dff9d492362d6648b52d23f
karma.py
karma.py
from brutal.core.plugin import cmd, match import collections karmas = collections.Counter() @match(regex=r'^([a-zA-Z0-9_]+)((:?\+)+)$') def karma_inc(event, name, pluses, *args): if name == event.meta['nick']: return 'Not in this universe, maggot!' else: karmas[name] += len(pluses)//2 ...
from brutal.core.plugin import cmd, match import collections karmas = collections.Counter() @match(regex=r'^([a-zA-Z0-9_]+)((:?\+)+)$') def karma_inc(event, name, pluses, *args): if name == event.meta['nick']: return 'Not in this universe, maggot!' else: karmas[name] += len(pluses)//2 ...
Split long line to make it more readable.
Karma: Split long line to make it more readable. Signed-off-by: Jakub Novak <3db738bfafc513cdba5d3154e6b5319945461327@gmail.com>
Python
apache-2.0
mrshu/brutal-plugins,Adman/brutal-plugins
from brutal.core.plugin import cmd, match import collections karmas = collections.Counter() @match(regex=r'^([a-zA-Z0-9_]+)((:?\+)+)$') def karma_inc(event, name, pluses, *args): if name == event.meta['nick']: return 'Not in this universe, maggot!' else: karmas[name] += len(pluses)//2 ...
from brutal.core.plugin import cmd, match import collections karmas = collections.Counter() @match(regex=r'^([a-zA-Z0-9_]+)((:?\+)+)$') def karma_inc(event, name, pluses, *args): if name == event.meta['nick']: return 'Not in this universe, maggot!' else: karmas[name] += len(pluses)//2 ...
<commit_before> from brutal.core.plugin import cmd, match import collections karmas = collections.Counter() @match(regex=r'^([a-zA-Z0-9_]+)((:?\+)+)$') def karma_inc(event, name, pluses, *args): if name == event.meta['nick']: return 'Not in this universe, maggot!' else: karmas[name] += len(pl...
from brutal.core.plugin import cmd, match import collections karmas = collections.Counter() @match(regex=r'^([a-zA-Z0-9_]+)((:?\+)+)$') def karma_inc(event, name, pluses, *args): if name == event.meta['nick']: return 'Not in this universe, maggot!' else: karmas[name] += len(pluses)//2 ...
from brutal.core.plugin import cmd, match import collections karmas = collections.Counter() @match(regex=r'^([a-zA-Z0-9_]+)((:?\+)+)$') def karma_inc(event, name, pluses, *args): if name == event.meta['nick']: return 'Not in this universe, maggot!' else: karmas[name] += len(pluses)//2 ...
<commit_before> from brutal.core.plugin import cmd, match import collections karmas = collections.Counter() @match(regex=r'^([a-zA-Z0-9_]+)((:?\+)+)$') def karma_inc(event, name, pluses, *args): if name == event.meta['nick']: return 'Not in this universe, maggot!' else: karmas[name] += len(pl...
51060b1def98a98bee0a401205116e2cac056299
test_core.py
test_core.py
#!/usr/bin/env python from ookoobah import core from ookoobah import utils grid = utils.make_grid_from_string(""" # # # # # # # > . . \ # # . # . | # # . / | o # # . \ . / # # # # # # # """) game = core.Game(grid=grid) game.start() print "hit <enter> to render next; ^C to abort" status = co...
#!/usr/bin/env python from ookoobah import core from ookoobah import session from ookoobah import utils grid = utils.make_grid_from_string(""" # # # # # # # > . . \ # # . # . | # # . / | o # # . \ . / # # # # # # # """) sess = session.Session(grid=grid) sess.start() print "<enter> to render ...
Switch to Session from a bare Game
test: Switch to Session from a bare Game
Python
mit
vickenty/ookoobah,vickenty/ookoobah,vickenty/ookoobah,vickenty/ookoobah,vickenty/ookoobah
#!/usr/bin/env python from ookoobah import core from ookoobah import utils grid = utils.make_grid_from_string(""" # # # # # # # > . . \ # # . # . | # # . / | o # # . \ . / # # # # # # # """) game = core.Game(grid=grid) game.start() print "hit <enter> to render next; ^C to abort" status = co...
#!/usr/bin/env python from ookoobah import core from ookoobah import session from ookoobah import utils grid = utils.make_grid_from_string(""" # # # # # # # > . . \ # # . # . | # # . / | o # # . \ . / # # # # # # # """) sess = session.Session(grid=grid) sess.start() print "<enter> to render ...
<commit_before>#!/usr/bin/env python from ookoobah import core from ookoobah import utils grid = utils.make_grid_from_string(""" # # # # # # # > . . \ # # . # . | # # . / | o # # . \ . / # # # # # # # """) game = core.Game(grid=grid) game.start() print "hit <enter> to render next; ^C to abor...
#!/usr/bin/env python from ookoobah import core from ookoobah import session from ookoobah import utils grid = utils.make_grid_from_string(""" # # # # # # # > . . \ # # . # . | # # . / | o # # . \ . / # # # # # # # """) sess = session.Session(grid=grid) sess.start() print "<enter> to render ...
#!/usr/bin/env python from ookoobah import core from ookoobah import utils grid = utils.make_grid_from_string(""" # # # # # # # > . . \ # # . # . | # # . / | o # # . \ . / # # # # # # # """) game = core.Game(grid=grid) game.start() print "hit <enter> to render next; ^C to abort" status = co...
<commit_before>#!/usr/bin/env python from ookoobah import core from ookoobah import utils grid = utils.make_grid_from_string(""" # # # # # # # > . . \ # # . # . | # # . / | o # # . \ . / # # # # # # # """) game = core.Game(grid=grid) game.start() print "hit <enter> to render next; ^C to abor...
a4beb8053780a9feb86fd85f0ce649717b9e7919
lib/disco/sysutil.py
lib/disco/sysutil.py
import sys, resource from ctypes import * import ctypes.util if sys.platform == "darwin": def available_memory(): libc = cdll.LoadLibrary(ctypes.util.find_library("libc")) mem = c_uint64(0) size = c_size_t(sizeof(mem)) libc.sysctlbyname.argtypes = [ c_char_p, c_void_p, c...
import sys, resource from ctypes import * import ctypes.util if sys.platform == "darwin": def available_memory(): libc = cdll.LoadLibrary(ctypes.util.find_library("libc")) mem = c_uint64(0) size = c_size_t(sizeof(mem)) libc.sysctlbyname.argtypes = [ c_char_p, c_void_p, c...
Make the passed arguments to sysctlbyname convertible to c_char_p.
Make the passed arguments to sysctlbyname convertible to c_char_p. In python3, the default type of strings are unicode which cannot be converted to c_char_p, resulting a type error from sysctlbyname, using a b prefix for the string makes it convertible to c_char_p.
Python
bsd-3-clause
ErikDubbelboer/disco,beni55/disco,mwilliams3/disco,oldmantaiter/disco,ktkt2009/disco,ErikDubbelboer/disco,oldmantaiter/disco,pooya/disco,beni55/disco,pombredanne/disco,ktkt2009/disco,beni55/disco,simudream/disco,mozilla/disco,ktkt2009/disco,simudream/disco,mozilla/disco,discoproject/disco,ErikDubbelboer/disco,pooya/dis...
import sys, resource from ctypes import * import ctypes.util if sys.platform == "darwin": def available_memory(): libc = cdll.LoadLibrary(ctypes.util.find_library("libc")) mem = c_uint64(0) size = c_size_t(sizeof(mem)) libc.sysctlbyname.argtypes = [ c_char_p, c_void_p, c...
import sys, resource from ctypes import * import ctypes.util if sys.platform == "darwin": def available_memory(): libc = cdll.LoadLibrary(ctypes.util.find_library("libc")) mem = c_uint64(0) size = c_size_t(sizeof(mem)) libc.sysctlbyname.argtypes = [ c_char_p, c_void_p, c...
<commit_before>import sys, resource from ctypes import * import ctypes.util if sys.platform == "darwin": def available_memory(): libc = cdll.LoadLibrary(ctypes.util.find_library("libc")) mem = c_uint64(0) size = c_size_t(sizeof(mem)) libc.sysctlbyname.argtypes = [ c_char...
import sys, resource from ctypes import * import ctypes.util if sys.platform == "darwin": def available_memory(): libc = cdll.LoadLibrary(ctypes.util.find_library("libc")) mem = c_uint64(0) size = c_size_t(sizeof(mem)) libc.sysctlbyname.argtypes = [ c_char_p, c_void_p, c...
import sys, resource from ctypes import * import ctypes.util if sys.platform == "darwin": def available_memory(): libc = cdll.LoadLibrary(ctypes.util.find_library("libc")) mem = c_uint64(0) size = c_size_t(sizeof(mem)) libc.sysctlbyname.argtypes = [ c_char_p, c_void_p, c...
<commit_before>import sys, resource from ctypes import * import ctypes.util if sys.platform == "darwin": def available_memory(): libc = cdll.LoadLibrary(ctypes.util.find_library("libc")) mem = c_uint64(0) size = c_size_t(sizeof(mem)) libc.sysctlbyname.argtypes = [ c_char...
2c7464e8428359bec607623bffa3418e58ec8f1d
funbox/itertools_compat.py
funbox/itertools_compat.py
"""itertools compatibility for Python 2 and 3, for imap, izip and ifilter. Just use: from funbox.itertools_compat import imap, izip, ifilter instead of: from itertools import imap, izip, ifilter, ifilterfalse >>> list(imap(int, ['1', '2', '3'])) [1, 2, 3] >>> is_even = lambda x: (x % 2 == 0) >>> list(ifil...
"""itertools compatibility for Python 2 and 3, for imap, izip and ifilter. Just use: from funbox.itertools_compat import imap, izip, ifilter, ifilterfalse instead of: from itertools import imap, izip, ifilter, ifilterfalse >>> list(imap(int, ['1', '2', '3'])) [1, 2, 3] >>> is_even = lambda x: (x % 2 == 0) ...
Fix small incompleteness in documentation.
Fix small incompleteness in documentation.
Python
mit
nmbooker/python-funbox,nmbooker/python-funbox
"""itertools compatibility for Python 2 and 3, for imap, izip and ifilter. Just use: from funbox.itertools_compat import imap, izip, ifilter instead of: from itertools import imap, izip, ifilter, ifilterfalse >>> list(imap(int, ['1', '2', '3'])) [1, 2, 3] >>> is_even = lambda x: (x % 2 == 0) >>> list(ifil...
"""itertools compatibility for Python 2 and 3, for imap, izip and ifilter. Just use: from funbox.itertools_compat import imap, izip, ifilter, ifilterfalse instead of: from itertools import imap, izip, ifilter, ifilterfalse >>> list(imap(int, ['1', '2', '3'])) [1, 2, 3] >>> is_even = lambda x: (x % 2 == 0) ...
<commit_before> """itertools compatibility for Python 2 and 3, for imap, izip and ifilter. Just use: from funbox.itertools_compat import imap, izip, ifilter instead of: from itertools import imap, izip, ifilter, ifilterfalse >>> list(imap(int, ['1', '2', '3'])) [1, 2, 3] >>> is_even = lambda x: (x % 2 == 0)...
"""itertools compatibility for Python 2 and 3, for imap, izip and ifilter. Just use: from funbox.itertools_compat import imap, izip, ifilter, ifilterfalse instead of: from itertools import imap, izip, ifilter, ifilterfalse >>> list(imap(int, ['1', '2', '3'])) [1, 2, 3] >>> is_even = lambda x: (x % 2 == 0) ...
"""itertools compatibility for Python 2 and 3, for imap, izip and ifilter. Just use: from funbox.itertools_compat import imap, izip, ifilter instead of: from itertools import imap, izip, ifilter, ifilterfalse >>> list(imap(int, ['1', '2', '3'])) [1, 2, 3] >>> is_even = lambda x: (x % 2 == 0) >>> list(ifil...
<commit_before> """itertools compatibility for Python 2 and 3, for imap, izip and ifilter. Just use: from funbox.itertools_compat import imap, izip, ifilter instead of: from itertools import imap, izip, ifilter, ifilterfalse >>> list(imap(int, ['1', '2', '3'])) [1, 2, 3] >>> is_even = lambda x: (x % 2 == 0)...
f7b8807bef552490227592827587f6d896a25a11
pulseguardian/mozdef.py
pulseguardian/mozdef.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import datetime import json import os import sys import pulseguardian.config # Severities DEBUG = 'DEBUG' INFO = 'INFO...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import datetime import json import os import sys import pulseguardian.config # Severities DEBUG = 'DEBUG' INFO = 'INFO...
Add more details to logging
Add more details to logging
Python
mpl-2.0
mozilla/pulseguardian,mozilla/pulseguardian,mozilla/pulseguardian,mozilla/pulseguardian
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import datetime import json import os import sys import pulseguardian.config # Severities DEBUG = 'DEBUG' INFO = 'INFO...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import datetime import json import os import sys import pulseguardian.config # Severities DEBUG = 'DEBUG' INFO = 'INFO...
<commit_before># This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import datetime import json import os import sys import pulseguardian.config # Severities DEBUG = 'DEBU...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import datetime import json import os import sys import pulseguardian.config # Severities DEBUG = 'DEBUG' INFO = 'INFO...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import datetime import json import os import sys import pulseguardian.config # Severities DEBUG = 'DEBUG' INFO = 'INFO...
<commit_before># This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import datetime import json import os import sys import pulseguardian.config # Severities DEBUG = 'DEBU...
da4c39696a71077b34d4ab9347f7d7b4c5ef1601
scripts/create_test_data_file_from_bt.py
scripts/create_test_data_file_from_bt.py
import serial import time import platform import csv import zephyr.protocol def main(): serial_port_dict = {"Darwin": "/dev/cu.BHBHT001931-iSerialPort1", "Windows": 23} serial_port = serial_port_dict[platform.system()] ser = serial.Serial(serial_port) ...
import serial import time import platform import csv import threading import zephyr.protocol import zephyr.message def callback(x): print x def reading_thread(protocol): start_time = time.time() while time.time() < start_time + 120: protocol.read_and_handle_bytes(1) ...
Refactor to support multiple devices for test data generation
Refactor to support multiple devices for test data generation
Python
bsd-2-clause
jpaalasm/zephyr-bt
import serial import time import platform import csv import zephyr.protocol def main(): serial_port_dict = {"Darwin": "/dev/cu.BHBHT001931-iSerialPort1", "Windows": 23} serial_port = serial_port_dict[platform.system()] ser = serial.Serial(serial_port) ...
import serial import time import platform import csv import threading import zephyr.protocol import zephyr.message def callback(x): print x def reading_thread(protocol): start_time = time.time() while time.time() < start_time + 120: protocol.read_and_handle_bytes(1) ...
<commit_before> import serial import time import platform import csv import zephyr.protocol def main(): serial_port_dict = {"Darwin": "/dev/cu.BHBHT001931-iSerialPort1", "Windows": 23} serial_port = serial_port_dict[platform.system()] ser = serial.Serial(serial_po...
import serial import time import platform import csv import threading import zephyr.protocol import zephyr.message def callback(x): print x def reading_thread(protocol): start_time = time.time() while time.time() < start_time + 120: protocol.read_and_handle_bytes(1) ...
import serial import time import platform import csv import zephyr.protocol def main(): serial_port_dict = {"Darwin": "/dev/cu.BHBHT001931-iSerialPort1", "Windows": 23} serial_port = serial_port_dict[platform.system()] ser = serial.Serial(serial_port) ...
<commit_before> import serial import time import platform import csv import zephyr.protocol def main(): serial_port_dict = {"Darwin": "/dev/cu.BHBHT001931-iSerialPort1", "Windows": 23} serial_port = serial_port_dict[platform.system()] ser = serial.Serial(serial_po...
a49cc6d6ca1ce22358292c00d847cb424306b229
wordsaladflask.py
wordsaladflask.py
import wordsalad from flask import Flask App = Flask(__name__) @App.route("salad/<int:n>/<string:corpus>") def _get(self, n, corpus="default"): """Generate n word salads from the given (optional) corpus.""" pass @App.route("salad/corpuses") def _get_corpuses(self): """Fetch a list of "corpus:es" we can u...
import wordsalad from flask import Flask App = Flask(__name__) @App.route("salad/<int:n>/<string:corpus>") def _get(self, n, corpus="default"): """Generate n word salads from the given (optional) corpus.""" pass @App.route("salad/corpuses") def _get_corpora(self): """Fetch a list of "corpora" we can use ...
Use the proper words ;)
Use the proper words ;)
Python
mit
skurmedel/wordsalad
import wordsalad from flask import Flask App = Flask(__name__) @App.route("salad/<int:n>/<string:corpus>") def _get(self, n, corpus="default"): """Generate n word salads from the given (optional) corpus.""" pass @App.route("salad/corpuses") def _get_corpuses(self): """Fetch a list of "corpus:es" we can u...
import wordsalad from flask import Flask App = Flask(__name__) @App.route("salad/<int:n>/<string:corpus>") def _get(self, n, corpus="default"): """Generate n word salads from the given (optional) corpus.""" pass @App.route("salad/corpuses") def _get_corpora(self): """Fetch a list of "corpora" we can use ...
<commit_before>import wordsalad from flask import Flask App = Flask(__name__) @App.route("salad/<int:n>/<string:corpus>") def _get(self, n, corpus="default"): """Generate n word salads from the given (optional) corpus.""" pass @App.route("salad/corpuses") def _get_corpuses(self): """Fetch a list of "corp...
import wordsalad from flask import Flask App = Flask(__name__) @App.route("salad/<int:n>/<string:corpus>") def _get(self, n, corpus="default"): """Generate n word salads from the given (optional) corpus.""" pass @App.route("salad/corpuses") def _get_corpora(self): """Fetch a list of "corpora" we can use ...
import wordsalad from flask import Flask App = Flask(__name__) @App.route("salad/<int:n>/<string:corpus>") def _get(self, n, corpus="default"): """Generate n word salads from the given (optional) corpus.""" pass @App.route("salad/corpuses") def _get_corpuses(self): """Fetch a list of "corpus:es" we can u...
<commit_before>import wordsalad from flask import Flask App = Flask(__name__) @App.route("salad/<int:n>/<string:corpus>") def _get(self, n, corpus="default"): """Generate n word salads from the given (optional) corpus.""" pass @App.route("salad/corpuses") def _get_corpuses(self): """Fetch a list of "corp...
fb20bd41b5373c994274aa8565ba579fa13c8c28
setup.py
setup.py
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='0.2.9', packages=['todoist', 'todoist.managers'], author='Doist Team'...
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='0.2.10', packages=['todoist', 'todoist.managers'], author='Doist Team...
Update the PyPI version to 0.2.10
Update the PyPI version to 0.2.10
Python
mit
Doist/todoist-python,electronick1/todoist-python
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='0.2.9', packages=['todoist', 'todoist.managers'], author='Doist Team'...
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='0.2.10', packages=['todoist', 'todoist.managers'], author='Doist Team...
<commit_before># -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='0.2.9', packages=['todoist', 'todoist.managers'], auth...
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='0.2.10', packages=['todoist', 'todoist.managers'], author='Doist Team...
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='0.2.9', packages=['todoist', 'todoist.managers'], author='Doist Team'...
<commit_before># -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='0.2.9', packages=['todoist', 'todoist.managers'], auth...
4bd13f0385dbac9855f6117afea0911bce1af3b3
setup.py
setup.py
#! /usr/bin/env python #-*- coding=utf-8 -*- from setuptools import setup setup(name='kitabu', author=u'Adrian Duraj & Marek Brzóska', author_email='adrian.duraj@gmail.com, brzoskamarek@gmail.com', description="Django library to build reservation application", license='MIT', version='de...
#! /usr/bin/env python #-*- coding=utf-8 -*- from setuptools import setup setup(name='kitabu', author=u'Adrian Duraj & Marek Brzóska', author_email='adrian.duraj@gmail.com, brzoskamarek@gmail.com', description="Django library to build reservation application", license='MIT', version='de...
Fix dependency link for Django 1.5rc1
Fix dependency link for Django 1.5rc1
Python
mit
mbad/kitabu,mbad/kitabu,mbad/kitabu
#! /usr/bin/env python #-*- coding=utf-8 -*- from setuptools import setup setup(name='kitabu', author=u'Adrian Duraj & Marek Brzóska', author_email='adrian.duraj@gmail.com, brzoskamarek@gmail.com', description="Django library to build reservation application", license='MIT', version='de...
#! /usr/bin/env python #-*- coding=utf-8 -*- from setuptools import setup setup(name='kitabu', author=u'Adrian Duraj & Marek Brzóska', author_email='adrian.duraj@gmail.com, brzoskamarek@gmail.com', description="Django library to build reservation application", license='MIT', version='de...
<commit_before>#! /usr/bin/env python #-*- coding=utf-8 -*- from setuptools import setup setup(name='kitabu', author=u'Adrian Duraj & Marek Brzóska', author_email='adrian.duraj@gmail.com, brzoskamarek@gmail.com', description="Django library to build reservation application", license='MIT', ...
#! /usr/bin/env python #-*- coding=utf-8 -*- from setuptools import setup setup(name='kitabu', author=u'Adrian Duraj & Marek Brzóska', author_email='adrian.duraj@gmail.com, brzoskamarek@gmail.com', description="Django library to build reservation application", license='MIT', version='de...
#! /usr/bin/env python #-*- coding=utf-8 -*- from setuptools import setup setup(name='kitabu', author=u'Adrian Duraj & Marek Brzóska', author_email='adrian.duraj@gmail.com, brzoskamarek@gmail.com', description="Django library to build reservation application", license='MIT', version='de...
<commit_before>#! /usr/bin/env python #-*- coding=utf-8 -*- from setuptools import setup setup(name='kitabu', author=u'Adrian Duraj & Marek Brzóska', author_email='adrian.duraj@gmail.com, brzoskamarek@gmail.com', description="Django library to build reservation application", license='MIT', ...
a333bb06a913ca87aac77775e22fdb00c320cbb6
setup.py
setup.py
#!/usr/bin/env python import pathlib from setuptools import setup setup( name="ipytest", version="0.8.0", description="Unit tests in IPython notebooks.", long_description=pathlib.Path("Readme.md").read_text(), long_description_content_type="text/markdown", author="Christopher Prohm", autho...
#!/usr/bin/env python import pathlib from setuptools import setup setup( name="ipytest", version="0.8.0", description="Unit tests in IPython notebooks.", long_description=pathlib.Path("Readme.md").read_text(), long_description_content_type="text/markdown", author="Christopher Prohm", autho...
Revert "Add URL to project"
Revert "Add URL to project"
Python
mit
chmp/ipytest
#!/usr/bin/env python import pathlib from setuptools import setup setup( name="ipytest", version="0.8.0", description="Unit tests in IPython notebooks.", long_description=pathlib.Path("Readme.md").read_text(), long_description_content_type="text/markdown", author="Christopher Prohm", autho...
#!/usr/bin/env python import pathlib from setuptools import setup setup( name="ipytest", version="0.8.0", description="Unit tests in IPython notebooks.", long_description=pathlib.Path("Readme.md").read_text(), long_description_content_type="text/markdown", author="Christopher Prohm", autho...
<commit_before>#!/usr/bin/env python import pathlib from setuptools import setup setup( name="ipytest", version="0.8.0", description="Unit tests in IPython notebooks.", long_description=pathlib.Path("Readme.md").read_text(), long_description_content_type="text/markdown", author="Christopher Pr...
#!/usr/bin/env python import pathlib from setuptools import setup setup( name="ipytest", version="0.8.0", description="Unit tests in IPython notebooks.", long_description=pathlib.Path("Readme.md").read_text(), long_description_content_type="text/markdown", author="Christopher Prohm", autho...
#!/usr/bin/env python import pathlib from setuptools import setup setup( name="ipytest", version="0.8.0", description="Unit tests in IPython notebooks.", long_description=pathlib.Path("Readme.md").read_text(), long_description_content_type="text/markdown", author="Christopher Prohm", autho...
<commit_before>#!/usr/bin/env python import pathlib from setuptools import setup setup( name="ipytest", version="0.8.0", description="Unit tests in IPython notebooks.", long_description=pathlib.Path("Readme.md").read_text(), long_description_content_type="text/markdown", author="Christopher Pr...
39ab8f61731a383ea1befd18df5483a25811c0ca
setup.py
setup.py
from setuptools import setup setup( name='rgkit', version='0.2', description='Robot Game Testing Kit', maintainer='Peter Wen', maintainer_email='peter@whitehalmos.org', url='https://github.com/WhiteHalmos/rgkit', packages=['rgkit'], package_data={'rgkit': ['maps/*.py']}, license='Un...
from setuptools import setup setup( name='rgkit', version='0.2.1', description='Robot Game Testing Kit', maintainer='Peter Wen', maintainer_email='peter@whitehalmos.org', url='https://github.com/WhiteHalmos/rgkit', packages=['rgkit'], package_data={'rgkit': ['maps/*.py']}, license='...
Increment version number. Forgot to commit before.
Increment version number. Forgot to commit before.
Python
unlicense
RobotGame/rgkit,RobotGame/rgkit,mpeterv/rgkit,mpeterv/rgkit
from setuptools import setup setup( name='rgkit', version='0.2', description='Robot Game Testing Kit', maintainer='Peter Wen', maintainer_email='peter@whitehalmos.org', url='https://github.com/WhiteHalmos/rgkit', packages=['rgkit'], package_data={'rgkit': ['maps/*.py']}, license='Un...
from setuptools import setup setup( name='rgkit', version='0.2.1', description='Robot Game Testing Kit', maintainer='Peter Wen', maintainer_email='peter@whitehalmos.org', url='https://github.com/WhiteHalmos/rgkit', packages=['rgkit'], package_data={'rgkit': ['maps/*.py']}, license='...
<commit_before>from setuptools import setup setup( name='rgkit', version='0.2', description='Robot Game Testing Kit', maintainer='Peter Wen', maintainer_email='peter@whitehalmos.org', url='https://github.com/WhiteHalmos/rgkit', packages=['rgkit'], package_data={'rgkit': ['maps/*.py']}, ...
from setuptools import setup setup( name='rgkit', version='0.2.1', description='Robot Game Testing Kit', maintainer='Peter Wen', maintainer_email='peter@whitehalmos.org', url='https://github.com/WhiteHalmos/rgkit', packages=['rgkit'], package_data={'rgkit': ['maps/*.py']}, license='...
from setuptools import setup setup( name='rgkit', version='0.2', description='Robot Game Testing Kit', maintainer='Peter Wen', maintainer_email='peter@whitehalmos.org', url='https://github.com/WhiteHalmos/rgkit', packages=['rgkit'], package_data={'rgkit': ['maps/*.py']}, license='Un...
<commit_before>from setuptools import setup setup( name='rgkit', version='0.2', description='Robot Game Testing Kit', maintainer='Peter Wen', maintainer_email='peter@whitehalmos.org', url='https://github.com/WhiteHalmos/rgkit', packages=['rgkit'], package_data={'rgkit': ['maps/*.py']}, ...
deca54d2b3481647abaa19d30dfc8f8e9a8b719e
setup.py
setup.py
from setuptools import setup install_requires = ['jsonref', 'schema', 'openpyxl>=2.6', 'pytz', 'xmltodict', 'lxml', 'odfpy'] setup( name='flattentool', version='0.10.0', author='Open Data Services', author_email='code@opendataservices.coop', packages=['flattentool'], scripts...
from setuptools import setup install_requires = ['jsonref', 'schema', 'openpyxl>=2.6,!=3.0.2', 'pytz', 'xmltodict', 'lxml', 'odfpy'] setup( name='flattentool', version='0.10.0', author='Open Data Services', author_email='code@opendataservices.coop', packages=['flattentool'], ...
Update openpyxl version restriction, because 3.0.3 is fine
Update openpyxl version restriction, because 3.0.3 is fine
Python
mit
OpenDataServices/flatten-tool
from setuptools import setup install_requires = ['jsonref', 'schema', 'openpyxl>=2.6', 'pytz', 'xmltodict', 'lxml', 'odfpy'] setup( name='flattentool', version='0.10.0', author='Open Data Services', author_email='code@opendataservices.coop', packages=['flattentool'], scripts...
from setuptools import setup install_requires = ['jsonref', 'schema', 'openpyxl>=2.6,!=3.0.2', 'pytz', 'xmltodict', 'lxml', 'odfpy'] setup( name='flattentool', version='0.10.0', author='Open Data Services', author_email='code@opendataservices.coop', packages=['flattentool'], ...
<commit_before>from setuptools import setup install_requires = ['jsonref', 'schema', 'openpyxl>=2.6', 'pytz', 'xmltodict', 'lxml', 'odfpy'] setup( name='flattentool', version='0.10.0', author='Open Data Services', author_email='code@opendataservices.coop', packages=['flattentool...
from setuptools import setup install_requires = ['jsonref', 'schema', 'openpyxl>=2.6,!=3.0.2', 'pytz', 'xmltodict', 'lxml', 'odfpy'] setup( name='flattentool', version='0.10.0', author='Open Data Services', author_email='code@opendataservices.coop', packages=['flattentool'], ...
from setuptools import setup install_requires = ['jsonref', 'schema', 'openpyxl>=2.6', 'pytz', 'xmltodict', 'lxml', 'odfpy'] setup( name='flattentool', version='0.10.0', author='Open Data Services', author_email='code@opendataservices.coop', packages=['flattentool'], scripts...
<commit_before>from setuptools import setup install_requires = ['jsonref', 'schema', 'openpyxl>=2.6', 'pytz', 'xmltodict', 'lxml', 'odfpy'] setup( name='flattentool', version='0.10.0', author='Open Data Services', author_email='code@opendataservices.coop', packages=['flattentool...
220d1e99988f29e69295c70ef8428fa2cb3aa6f6
setup.py
setup.py
from setuptools import setup, find_packages setup(name='aacrgenie', version='1.6.2', description='Processing and validation for GENIE', url='https://github.com/Sage-Bionetworks/Genie', author='Thomas Yu', author_email='thomasyu888@gmail.com', license='MIT', packages=find_packa...
from setuptools import setup, find_packages setup(name='aacrgenie', version='1.6.2', description='Processing and validation for GENIE', url='https://github.com/Sage-Bionetworks/Genie', author='Thomas Yu', author_email='thomasyu888@gmail.com', license='MIT', packages=find_packa...
Add yaml to installation requirements
Add yaml to installation requirements
Python
mit
thomasyu888/Genie,thomasyu888/Genie,thomasyu888/Genie,thomasyu888/Genie
from setuptools import setup, find_packages setup(name='aacrgenie', version='1.6.2', description='Processing and validation for GENIE', url='https://github.com/Sage-Bionetworks/Genie', author='Thomas Yu', author_email='thomasyu888@gmail.com', license='MIT', packages=find_packa...
from setuptools import setup, find_packages setup(name='aacrgenie', version='1.6.2', description='Processing and validation for GENIE', url='https://github.com/Sage-Bionetworks/Genie', author='Thomas Yu', author_email='thomasyu888@gmail.com', license='MIT', packages=find_packa...
<commit_before>from setuptools import setup, find_packages setup(name='aacrgenie', version='1.6.2', description='Processing and validation for GENIE', url='https://github.com/Sage-Bionetworks/Genie', author='Thomas Yu', author_email='thomasyu888@gmail.com', license='MIT', pack...
from setuptools import setup, find_packages setup(name='aacrgenie', version='1.6.2', description='Processing and validation for GENIE', url='https://github.com/Sage-Bionetworks/Genie', author='Thomas Yu', author_email='thomasyu888@gmail.com', license='MIT', packages=find_packa...
from setuptools import setup, find_packages setup(name='aacrgenie', version='1.6.2', description='Processing and validation for GENIE', url='https://github.com/Sage-Bionetworks/Genie', author='Thomas Yu', author_email='thomasyu888@gmail.com', license='MIT', packages=find_packa...
<commit_before>from setuptools import setup, find_packages setup(name='aacrgenie', version='1.6.2', description='Processing and validation for GENIE', url='https://github.com/Sage-Bionetworks/Genie', author='Thomas Yu', author_email='thomasyu888@gmail.com', license='MIT', pack...
4b253f3620c3bc108982fb3f362dbe81e3e7ab3d
setup.py
setup.py
from setuptools import setup import tamarin DESCRIPTION = "A Django app for monitoring AWS usage in Django's admin." LONG_DESCRIPTION = None try: LONG_DESCRIPTION = open('README.rst').read() except: pass version_str = '%d.%d' % (tamarin.VERSION[0], tamarin.VERSION[1]) CLASSIFIERS = [ 'Development Status...
from setuptools import setup import tamarin DESCRIPTION = "A Django app for monitoring AWS usage in Django's admin." LONG_DESCRIPTION = None try: LONG_DESCRIPTION = open('README.rst').read() except: pass version_str = '%d.%d' % (tamarin.VERSION[0], tamarin.VERSION[1]) CLASSIFIERS = [ 'Development Status...
Correct the trove categorization to say License = BSD.
Correct the trove categorization to say License = BSD.
Python
bsd-3-clause
duointeractive/tamarin,duointeractive/tamarin,duointeractive/tamarin
from setuptools import setup import tamarin DESCRIPTION = "A Django app for monitoring AWS usage in Django's admin." LONG_DESCRIPTION = None try: LONG_DESCRIPTION = open('README.rst').read() except: pass version_str = '%d.%d' % (tamarin.VERSION[0], tamarin.VERSION[1]) CLASSIFIERS = [ 'Development Status...
from setuptools import setup import tamarin DESCRIPTION = "A Django app for monitoring AWS usage in Django's admin." LONG_DESCRIPTION = None try: LONG_DESCRIPTION = open('README.rst').read() except: pass version_str = '%d.%d' % (tamarin.VERSION[0], tamarin.VERSION[1]) CLASSIFIERS = [ 'Development Status...
<commit_before>from setuptools import setup import tamarin DESCRIPTION = "A Django app for monitoring AWS usage in Django's admin." LONG_DESCRIPTION = None try: LONG_DESCRIPTION = open('README.rst').read() except: pass version_str = '%d.%d' % (tamarin.VERSION[0], tamarin.VERSION[1]) CLASSIFIERS = [ 'Dev...
from setuptools import setup import tamarin DESCRIPTION = "A Django app for monitoring AWS usage in Django's admin." LONG_DESCRIPTION = None try: LONG_DESCRIPTION = open('README.rst').read() except: pass version_str = '%d.%d' % (tamarin.VERSION[0], tamarin.VERSION[1]) CLASSIFIERS = [ 'Development Status...
from setuptools import setup import tamarin DESCRIPTION = "A Django app for monitoring AWS usage in Django's admin." LONG_DESCRIPTION = None try: LONG_DESCRIPTION = open('README.rst').read() except: pass version_str = '%d.%d' % (tamarin.VERSION[0], tamarin.VERSION[1]) CLASSIFIERS = [ 'Development Status...
<commit_before>from setuptools import setup import tamarin DESCRIPTION = "A Django app for monitoring AWS usage in Django's admin." LONG_DESCRIPTION = None try: LONG_DESCRIPTION = open('README.rst').read() except: pass version_str = '%d.%d' % (tamarin.VERSION[0], tamarin.VERSION[1]) CLASSIFIERS = [ 'Dev...
02b4f6a9513aa5213de0573b6a514a7221e7d625
setup.py
setup.py
#!/usr/bin/env python import os import re from setuptools import setup setup_dir = os.path.dirname(__file__) readme_contents = open(os.path.join(setup_dir, 'README.rst')).read() faucet_version = re.match(r'.+version: ([0-9\.]+)', readme_contents).group(1) os.environ["PBR_VERSION"] = faucet_version setup( name='...
#!/usr/bin/env python import io import os import re from setuptools import setup setup_dir = os.path.dirname(__file__) readme_contents = io.open(os.path.join(setup_dir, 'README.rst'), encoding="utf-8").read() faucet_version = re.match(r'.+version: ([0-9\.]+)', readme_contents).group(1) os.environ["PBR_VERSION"] = fa...
Use py2 and py3 compatible io.read() instead of read().
Use py2 and py3 compatible io.read() instead of read().
Python
apache-2.0
trentindav/faucet,wackerly/faucet,trentindav/faucet,gizmoguy/faucet,Bairdo/faucet,REANNZ/faucet,Bairdo/faucet,byllyfish/faucet,byllyfish/faucet,gizmoguy/faucet,shivarammysore/faucet,trungdtbk/faucet,mwutzke/faucet,shivarammysore/faucet,anarkiwi/faucet,REANNZ/faucet,faucetsdn/faucet,trungdtbk/faucet,anarkiwi/faucet,mwut...
#!/usr/bin/env python import os import re from setuptools import setup setup_dir = os.path.dirname(__file__) readme_contents = open(os.path.join(setup_dir, 'README.rst')).read() faucet_version = re.match(r'.+version: ([0-9\.]+)', readme_contents).group(1) os.environ["PBR_VERSION"] = faucet_version setup( name='...
#!/usr/bin/env python import io import os import re from setuptools import setup setup_dir = os.path.dirname(__file__) readme_contents = io.open(os.path.join(setup_dir, 'README.rst'), encoding="utf-8").read() faucet_version = re.match(r'.+version: ([0-9\.]+)', readme_contents).group(1) os.environ["PBR_VERSION"] = fa...
<commit_before>#!/usr/bin/env python import os import re from setuptools import setup setup_dir = os.path.dirname(__file__) readme_contents = open(os.path.join(setup_dir, 'README.rst')).read() faucet_version = re.match(r'.+version: ([0-9\.]+)', readme_contents).group(1) os.environ["PBR_VERSION"] = faucet_version se...
#!/usr/bin/env python import io import os import re from setuptools import setup setup_dir = os.path.dirname(__file__) readme_contents = io.open(os.path.join(setup_dir, 'README.rst'), encoding="utf-8").read() faucet_version = re.match(r'.+version: ([0-9\.]+)', readme_contents).group(1) os.environ["PBR_VERSION"] = fa...
#!/usr/bin/env python import os import re from setuptools import setup setup_dir = os.path.dirname(__file__) readme_contents = open(os.path.join(setup_dir, 'README.rst')).read() faucet_version = re.match(r'.+version: ([0-9\.]+)', readme_contents).group(1) os.environ["PBR_VERSION"] = faucet_version setup( name='...
<commit_before>#!/usr/bin/env python import os import re from setuptools import setup setup_dir = os.path.dirname(__file__) readme_contents = open(os.path.join(setup_dir, 'README.rst')).read() faucet_version = re.match(r'.+version: ([0-9\.]+)', readme_contents).group(1) os.environ["PBR_VERSION"] = faucet_version se...
fa4be57f00827ea452e0d7bc1c0b5b17f20a6d2d
test.py
test.py
import nltk import xml.dom.minidom as dom import codecs file = open("tweets.xml") tree = dom.parse(file) i = 0 e = 0 for tweet in tree.firstChild.childNodes: try: textNodes = tweet.getElementsByTagName("text") x = tree.createElement("foo") for textNode in textNodes: textValu...
import nltk import xml.dom.minidom as dom import codecs import nltk.data sent_detector = nltk.data.load('tokenizers/punkt/english.pickle') file = open("tweets.xml") tree = dom.parse(file) i = 0 e = 0 for tweet in tree.firstChild.childNodes: try: textNodes = tweet.getElementsByTagName("text") ...
Test implementation of xml.minidom / nltk
Test implementation of xml.minidom / nltk
Python
apache-2.0
markusmichel/Tworpus-Client,markusmichel/Tworpus-Client,markusmichel/Tworpus-Client
import nltk import xml.dom.minidom as dom import codecs file = open("tweets.xml") tree = dom.parse(file) i = 0 e = 0 for tweet in tree.firstChild.childNodes: try: textNodes = tweet.getElementsByTagName("text") x = tree.createElement("foo") for textNode in textNodes: textValu...
import nltk import xml.dom.minidom as dom import codecs import nltk.data sent_detector = nltk.data.load('tokenizers/punkt/english.pickle') file = open("tweets.xml") tree = dom.parse(file) i = 0 e = 0 for tweet in tree.firstChild.childNodes: try: textNodes = tweet.getElementsByTagName("text") ...
<commit_before>import nltk import xml.dom.minidom as dom import codecs file = open("tweets.xml") tree = dom.parse(file) i = 0 e = 0 for tweet in tree.firstChild.childNodes: try: textNodes = tweet.getElementsByTagName("text") x = tree.createElement("foo") for textNode in textNodes: ...
import nltk import xml.dom.minidom as dom import codecs import nltk.data sent_detector = nltk.data.load('tokenizers/punkt/english.pickle') file = open("tweets.xml") tree = dom.parse(file) i = 0 e = 0 for tweet in tree.firstChild.childNodes: try: textNodes = tweet.getElementsByTagName("text") ...
import nltk import xml.dom.minidom as dom import codecs file = open("tweets.xml") tree = dom.parse(file) i = 0 e = 0 for tweet in tree.firstChild.childNodes: try: textNodes = tweet.getElementsByTagName("text") x = tree.createElement("foo") for textNode in textNodes: textValu...
<commit_before>import nltk import xml.dom.minidom as dom import codecs file = open("tweets.xml") tree = dom.parse(file) i = 0 e = 0 for tweet in tree.firstChild.childNodes: try: textNodes = tweet.getElementsByTagName("text") x = tree.createElement("foo") for textNode in textNodes: ...
7205324a6081a73d2b332afd42e23cd0447e6617
setup.py
setup.py
from setuptools import setup setup( name='django-easymoney', version='0.5', author='Alexander Schepanovski', author_email='suor.web@gmail.com', description='An easy MoneyField for Django.', long_description=open('README.rst').read(), url='http://github.com/Suor/django-easymoney', licen...
from setuptools import setup setup( name='django-easymoney', version='0.5', author='Alexander Schepanovski', author_email='suor.web@gmail.com', description='An easy MoneyField for Django.', long_description=open('README.rst').read(), url='http://github.com/Suor/django-easymoney', licen...
Add Django version trove classifiers
Add Django version trove classifiers
Python
bsd-2-clause
Suor/django-easymoney
from setuptools import setup setup( name='django-easymoney', version='0.5', author='Alexander Schepanovski', author_email='suor.web@gmail.com', description='An easy MoneyField for Django.', long_description=open('README.rst').read(), url='http://github.com/Suor/django-easymoney', licen...
from setuptools import setup setup( name='django-easymoney', version='0.5', author='Alexander Schepanovski', author_email='suor.web@gmail.com', description='An easy MoneyField for Django.', long_description=open('README.rst').read(), url='http://github.com/Suor/django-easymoney', licen...
<commit_before>from setuptools import setup setup( name='django-easymoney', version='0.5', author='Alexander Schepanovski', author_email='suor.web@gmail.com', description='An easy MoneyField for Django.', long_description=open('README.rst').read(), url='http://github.com/Suor/django-easymo...
from setuptools import setup setup( name='django-easymoney', version='0.5', author='Alexander Schepanovski', author_email='suor.web@gmail.com', description='An easy MoneyField for Django.', long_description=open('README.rst').read(), url='http://github.com/Suor/django-easymoney', licen...
from setuptools import setup setup( name='django-easymoney', version='0.5', author='Alexander Schepanovski', author_email='suor.web@gmail.com', description='An easy MoneyField for Django.', long_description=open('README.rst').read(), url='http://github.com/Suor/django-easymoney', licen...
<commit_before>from setuptools import setup setup( name='django-easymoney', version='0.5', author='Alexander Schepanovski', author_email='suor.web@gmail.com', description='An easy MoneyField for Django.', long_description=open('README.rst').read(), url='http://github.com/Suor/django-easymo...
0276d0e5ccf8d63adb7dd4438d67c0ff2c5bc3ae
setup.py
setup.py
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.rst')).read() CHANGES = open(os.path.join(here, 'CHANGES.rst')).read() requires = [ 'caliopen.api.base', ] setup(name='caliopen.api.user', namespace_package...
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.rst')).read() CHANGES = open(os.path.join(here, 'CHANGES.rst')).read() requires = [ 'caliopen.api.base', ] extras_require = { 'dev': [], 'test': [], } se...
Add missing extras package declaration
Add missing extras package declaration
Python
agpl-3.0
ziir/caliopen.api.user
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.rst')).read() CHANGES = open(os.path.join(here, 'CHANGES.rst')).read() requires = [ 'caliopen.api.base', ] setup(name='caliopen.api.user', namespace_package...
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.rst')).read() CHANGES = open(os.path.join(here, 'CHANGES.rst')).read() requires = [ 'caliopen.api.base', ] extras_require = { 'dev': [], 'test': [], } se...
<commit_before>import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.rst')).read() CHANGES = open(os.path.join(here, 'CHANGES.rst')).read() requires = [ 'caliopen.api.base', ] setup(name='caliopen.api.user', na...
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.rst')).read() CHANGES = open(os.path.join(here, 'CHANGES.rst')).read() requires = [ 'caliopen.api.base', ] extras_require = { 'dev': [], 'test': [], } se...
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.rst')).read() CHANGES = open(os.path.join(here, 'CHANGES.rst')).read() requires = [ 'caliopen.api.base', ] setup(name='caliopen.api.user', namespace_package...
<commit_before>import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.rst')).read() CHANGES = open(os.path.join(here, 'CHANGES.rst')).read() requires = [ 'caliopen.api.base', ] setup(name='caliopen.api.user', na...
6e426e4ae0dd3841ea7d92b7434c858cf39e9ef4
setup.py
setup.py
#!/usr/bin/env python import os, sys, glob from setuptools import setup, find_packages setup( name='aegea', version='0.6.0', url='https://github.com/kislyuk/aegea', license=open('LICENSE.md').readline().strip(), author='Andrey Kislyuk', author_email='kislyuk@gmail.com', description='Amazon...
#!/usr/bin/env python import os, sys, glob, subprocess from setuptools import setup, find_packages try: version = subprocess.check_output(["git", "describe", "--tags", "--match", "v*.*.*"]).strip("v\n") except: version = "0.0.0" setup( name='aegea', version=version, url='https://github.com/kislyu...
Use git describe output for version
Use git describe output for version
Python
apache-2.0
kislyuk/aegea,wholebiome/aegea,wholebiome/aegea,kislyuk/aegea,wholebiome/aegea,kislyuk/aegea
#!/usr/bin/env python import os, sys, glob from setuptools import setup, find_packages setup( name='aegea', version='0.6.0', url='https://github.com/kislyuk/aegea', license=open('LICENSE.md').readline().strip(), author='Andrey Kislyuk', author_email='kislyuk@gmail.com', description='Amazon...
#!/usr/bin/env python import os, sys, glob, subprocess from setuptools import setup, find_packages try: version = subprocess.check_output(["git", "describe", "--tags", "--match", "v*.*.*"]).strip("v\n") except: version = "0.0.0" setup( name='aegea', version=version, url='https://github.com/kislyu...
<commit_before>#!/usr/bin/env python import os, sys, glob from setuptools import setup, find_packages setup( name='aegea', version='0.6.0', url='https://github.com/kislyuk/aegea', license=open('LICENSE.md').readline().strip(), author='Andrey Kislyuk', author_email='kislyuk@gmail.com', desc...
#!/usr/bin/env python import os, sys, glob, subprocess from setuptools import setup, find_packages try: version = subprocess.check_output(["git", "describe", "--tags", "--match", "v*.*.*"]).strip("v\n") except: version = "0.0.0" setup( name='aegea', version=version, url='https://github.com/kislyu...
#!/usr/bin/env python import os, sys, glob from setuptools import setup, find_packages setup( name='aegea', version='0.6.0', url='https://github.com/kislyuk/aegea', license=open('LICENSE.md').readline().strip(), author='Andrey Kislyuk', author_email='kislyuk@gmail.com', description='Amazon...
<commit_before>#!/usr/bin/env python import os, sys, glob from setuptools import setup, find_packages setup( name='aegea', version='0.6.0', url='https://github.com/kislyuk/aegea', license=open('LICENSE.md').readline().strip(), author='Andrey Kislyuk', author_email='kislyuk@gmail.com', desc...
70929aa10fb59ed25c8fc4e76ce60bd6d2934c3f
rcamp/rcamp/settings/auth.py
rcamp/rcamp/settings/auth.py
AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'lib.pam_backend.PamBackend', ) AUTH_USER_MODEL = 'accounts.User' LOGIN_URL = '/login' PAM_SERVICES = { 'default': 'login', 'csu': 'csu' }
AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'lib.pam_backend.PamBackend', ) AUTH_USER_MODEL = 'accounts.User' LOGIN_URL = '/login' PAM_SERVICES = { 'default': 'curc-twofactor-duo', 'csu': 'csu' }
Change the default pam login service
Change the default pam login service
Python
mit
ResearchComputing/RCAMP,ResearchComputing/RCAMP,ResearchComputing/RCAMP,ResearchComputing/RCAMP
AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'lib.pam_backend.PamBackend', ) AUTH_USER_MODEL = 'accounts.User' LOGIN_URL = '/login' PAM_SERVICES = { 'default': 'login', 'csu': 'csu' } Change the default pam login service
AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'lib.pam_backend.PamBackend', ) AUTH_USER_MODEL = 'accounts.User' LOGIN_URL = '/login' PAM_SERVICES = { 'default': 'curc-twofactor-duo', 'csu': 'csu' }
<commit_before>AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'lib.pam_backend.PamBackend', ) AUTH_USER_MODEL = 'accounts.User' LOGIN_URL = '/login' PAM_SERVICES = { 'default': 'login', 'csu': 'csu' } <commit_msg>Change the default pam login service<commit_after>
AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'lib.pam_backend.PamBackend', ) AUTH_USER_MODEL = 'accounts.User' LOGIN_URL = '/login' PAM_SERVICES = { 'default': 'curc-twofactor-duo', 'csu': 'csu' }
AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'lib.pam_backend.PamBackend', ) AUTH_USER_MODEL = 'accounts.User' LOGIN_URL = '/login' PAM_SERVICES = { 'default': 'login', 'csu': 'csu' } Change the default pam login serviceAUTHENTICATION_BACKENDS = ( 'django.contrib.auth....
<commit_before>AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'lib.pam_backend.PamBackend', ) AUTH_USER_MODEL = 'accounts.User' LOGIN_URL = '/login' PAM_SERVICES = { 'default': 'login', 'csu': 'csu' } <commit_msg>Change the default pam login service<commit_after>AUTHENTICATI...
db3cadcf3baa22efe65495aca2efe5352d5a89a5
nhs/gunicorn_conf.py
nhs/gunicorn_conf.py
bind = "127.0.0.1:4567" logfile = "/usr/local/ohc/log/op.gunicorn.log" workers = 3
bind = "127.0.0.1:4567" logfile = "/usr/local/ohc/log/op.gunicorn.log" workers = 3 timeout = 60
Extend Gunicorn worker timeout for long-running API calls.
Extend Gunicorn worker timeout for long-running API calls.
Python
agpl-3.0
openhealthcare/open-prescribing,openhealthcare/open-prescribing,openhealthcare/open-prescribing
bind = "127.0.0.1:4567" logfile = "/usr/local/ohc/log/op.gunicorn.log" workers = 3 Extend Gunicorn worker timeout for long-running API calls.
bind = "127.0.0.1:4567" logfile = "/usr/local/ohc/log/op.gunicorn.log" workers = 3 timeout = 60
<commit_before>bind = "127.0.0.1:4567" logfile = "/usr/local/ohc/log/op.gunicorn.log" workers = 3 <commit_msg>Extend Gunicorn worker timeout for long-running API calls.<commit_after>
bind = "127.0.0.1:4567" logfile = "/usr/local/ohc/log/op.gunicorn.log" workers = 3 timeout = 60
bind = "127.0.0.1:4567" logfile = "/usr/local/ohc/log/op.gunicorn.log" workers = 3 Extend Gunicorn worker timeout for long-running API calls.bind = "127.0.0.1:4567" logfile = "/usr/local/ohc/log/op.gunicorn.log" workers = 3 timeout = 60
<commit_before>bind = "127.0.0.1:4567" logfile = "/usr/local/ohc/log/op.gunicorn.log" workers = 3 <commit_msg>Extend Gunicorn worker timeout for long-running API calls.<commit_after>bind = "127.0.0.1:4567" logfile = "/usr/local/ohc/log/op.gunicorn.log" workers = 3 timeout = 60
2a6313e2ed7cfbd81e6779e6f014500d801ccc8c
xword/__init__.py
xword/__init__.py
__version__ = '2.0.0~rc1' __license__ = ''' Copyright (c) 2009-2011, Cameron Dale <camrdale@gmail.com> Copyright (c) 2005-2009, Bill McCloskey <bill.mccloskey@gmail.com> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following co...
__version__ = '2.0.0~rc2' __license__ = ''' Copyright (c) 2009-2011, Cameron Dale <camrdale@gmail.com> Copyright (c) 2005-2009, Bill McCloskey <bill.mccloskey@gmail.com> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following co...
Update the version for 2.0.0~rc2 release.
Update the version for 2.0.0~rc2 release.
Python
bsd-3-clause
dnrce/xword
__version__ = '2.0.0~rc1' __license__ = ''' Copyright (c) 2009-2011, Cameron Dale <camrdale@gmail.com> Copyright (c) 2005-2009, Bill McCloskey <bill.mccloskey@gmail.com> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following co...
__version__ = '2.0.0~rc2' __license__ = ''' Copyright (c) 2009-2011, Cameron Dale <camrdale@gmail.com> Copyright (c) 2005-2009, Bill McCloskey <bill.mccloskey@gmail.com> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following co...
<commit_before>__version__ = '2.0.0~rc1' __license__ = ''' Copyright (c) 2009-2011, Cameron Dale <camrdale@gmail.com> Copyright (c) 2005-2009, Bill McCloskey <bill.mccloskey@gmail.com> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that t...
__version__ = '2.0.0~rc2' __license__ = ''' Copyright (c) 2009-2011, Cameron Dale <camrdale@gmail.com> Copyright (c) 2005-2009, Bill McCloskey <bill.mccloskey@gmail.com> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following co...
__version__ = '2.0.0~rc1' __license__ = ''' Copyright (c) 2009-2011, Cameron Dale <camrdale@gmail.com> Copyright (c) 2005-2009, Bill McCloskey <bill.mccloskey@gmail.com> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following co...
<commit_before>__version__ = '2.0.0~rc1' __license__ = ''' Copyright (c) 2009-2011, Cameron Dale <camrdale@gmail.com> Copyright (c) 2005-2009, Bill McCloskey <bill.mccloskey@gmail.com> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that t...
078050de92362115ffa32f03478b6658bb4da63f
setup.py
setup.py
from setuptools import setup, find_packages setup(name='googleanalytics', description='A wrapper for the Google Analytics API.', long_description=open('README.rst').read(), author='Stijn Debrouwere', author_email='stijn@debrouwere.org', url='https://github.com/debrouwere/google-analytics/', dow...
from setuptools import setup, find_packages setup(name='googleanalytics', description='A wrapper for the Google Analytics API.', long_description=open('README.rst').read(), author='Stijn Debrouwere', author_email='stijn@debrouwere.org', url='https://github.com/debrouwere/google-analytics/', dow...
Allow for higher versions of werkzeug
Allow for higher versions of werkzeug Install fails when a version of `werkzeug` greater than `0.10` is already present in the environment (current version is `0.10.4`)
Python
isc
debrouwere/google-analytics
from setuptools import setup, find_packages setup(name='googleanalytics', description='A wrapper for the Google Analytics API.', long_description=open('README.rst').read(), author='Stijn Debrouwere', author_email='stijn@debrouwere.org', url='https://github.com/debrouwere/google-analytics/', dow...
from setuptools import setup, find_packages setup(name='googleanalytics', description='A wrapper for the Google Analytics API.', long_description=open('README.rst').read(), author='Stijn Debrouwere', author_email='stijn@debrouwere.org', url='https://github.com/debrouwere/google-analytics/', dow...
<commit_before>from setuptools import setup, find_packages setup(name='googleanalytics', description='A wrapper for the Google Analytics API.', long_description=open('README.rst').read(), author='Stijn Debrouwere', author_email='stijn@debrouwere.org', url='https://github.com/debrouwere/google-analy...
from setuptools import setup, find_packages setup(name='googleanalytics', description='A wrapper for the Google Analytics API.', long_description=open('README.rst').read(), author='Stijn Debrouwere', author_email='stijn@debrouwere.org', url='https://github.com/debrouwere/google-analytics/', dow...
from setuptools import setup, find_packages setup(name='googleanalytics', description='A wrapper for the Google Analytics API.', long_description=open('README.rst').read(), author='Stijn Debrouwere', author_email='stijn@debrouwere.org', url='https://github.com/debrouwere/google-analytics/', dow...
<commit_before>from setuptools import setup, find_packages setup(name='googleanalytics', description='A wrapper for the Google Analytics API.', long_description=open('README.rst').read(), author='Stijn Debrouwere', author_email='stijn@debrouwere.org', url='https://github.com/debrouwere/google-analy...
de1a11e770dc5e3639247cf94d1509ea73aa2554
setup.py
setup.py
from setuptools import setup, find_packages setup( name='byterestclient', version='0.1', packages=find_packages(exclude=['test*']), url='', license='', author='Allard Hoeve', author_email='allard@byte.nl', description='A generic REST client', install_requires=['requests>=2.2.1'], ...
from setuptools import setup, find_packages setup( name='byterestclient', version='0.1', packages=find_packages(exclude=['test*']), url='https:/github.com/ByteInternet/pythono-byterestclient', author='Allard Hoeve', author_email='allard@byte.nl', description='A generic REST client', ins...
Install any which requests you want
Install any which requests you want
Python
mit
ByteInternet/python-byterestclient,ByteInternet/python-byterestclient
from setuptools import setup, find_packages setup( name='byterestclient', version='0.1', packages=find_packages(exclude=['test*']), url='', license='', author='Allard Hoeve', author_email='allard@byte.nl', description='A generic REST client', install_requires=['requests>=2.2.1'], ...
from setuptools import setup, find_packages setup( name='byterestclient', version='0.1', packages=find_packages(exclude=['test*']), url='https:/github.com/ByteInternet/pythono-byterestclient', author='Allard Hoeve', author_email='allard@byte.nl', description='A generic REST client', ins...
<commit_before>from setuptools import setup, find_packages setup( name='byterestclient', version='0.1', packages=find_packages(exclude=['test*']), url='', license='', author='Allard Hoeve', author_email='allard@byte.nl', description='A generic REST client', install_requires=['reques...
from setuptools import setup, find_packages setup( name='byterestclient', version='0.1', packages=find_packages(exclude=['test*']), url='https:/github.com/ByteInternet/pythono-byterestclient', author='Allard Hoeve', author_email='allard@byte.nl', description='A generic REST client', ins...
from setuptools import setup, find_packages setup( name='byterestclient', version='0.1', packages=find_packages(exclude=['test*']), url='', license='', author='Allard Hoeve', author_email='allard@byte.nl', description='A generic REST client', install_requires=['requests>=2.2.1'], ...
<commit_before>from setuptools import setup, find_packages setup( name='byterestclient', version='0.1', packages=find_packages(exclude=['test*']), url='', license='', author='Allard Hoeve', author_email='allard@byte.nl', description='A generic REST client', install_requires=['reques...
ef86ea4a78c6a617c9872762e86198cad7d0a50e
setup.py
setup.py
# coding: utf-8 from setuptools import setup # lets prepare our initial setup setup_dict = {'name': 'PYSCSI', 'version': '1.0', 'license': 'LGPLv2.1', 'author': 'Ronnie Sahlberg', 'author_email': 'ronniesahlberg@gmail.com', 'description': 'Module f...
# coding: utf-8 from setuptools import find_packages, setup # lets prepare our initial setup setup_dict = {'name': 'PYSCSI', 'version': '1.0', 'license': 'LGPLv2.1', 'author': 'Ronnie Sahlberg', 'author_email': 'ronniesahlberg@gmail.com', 'descript...
Use find_packages instead of listing them manually.
Use find_packages instead of listing them manually.
Python
lgpl-2.1
rosjat/python-scsi
# coding: utf-8 from setuptools import setup # lets prepare our initial setup setup_dict = {'name': 'PYSCSI', 'version': '1.0', 'license': 'LGPLv2.1', 'author': 'Ronnie Sahlberg', 'author_email': 'ronniesahlberg@gmail.com', 'description': 'Module f...
# coding: utf-8 from setuptools import find_packages, setup # lets prepare our initial setup setup_dict = {'name': 'PYSCSI', 'version': '1.0', 'license': 'LGPLv2.1', 'author': 'Ronnie Sahlberg', 'author_email': 'ronniesahlberg@gmail.com', 'descript...
<commit_before># coding: utf-8 from setuptools import setup # lets prepare our initial setup setup_dict = {'name': 'PYSCSI', 'version': '1.0', 'license': 'LGPLv2.1', 'author': 'Ronnie Sahlberg', 'author_email': 'ronniesahlberg@gmail.com', 'descript...
# coding: utf-8 from setuptools import find_packages, setup # lets prepare our initial setup setup_dict = {'name': 'PYSCSI', 'version': '1.0', 'license': 'LGPLv2.1', 'author': 'Ronnie Sahlberg', 'author_email': 'ronniesahlberg@gmail.com', 'descript...
# coding: utf-8 from setuptools import setup # lets prepare our initial setup setup_dict = {'name': 'PYSCSI', 'version': '1.0', 'license': 'LGPLv2.1', 'author': 'Ronnie Sahlberg', 'author_email': 'ronniesahlberg@gmail.com', 'description': 'Module f...
<commit_before># coding: utf-8 from setuptools import setup # lets prepare our initial setup setup_dict = {'name': 'PYSCSI', 'version': '1.0', 'license': 'LGPLv2.1', 'author': 'Ronnie Sahlberg', 'author_email': 'ronniesahlberg@gmail.com', 'descript...
b786ae0b845374ca42db42ac64322d6aa9e894c5
setup.py
setup.py
from distutils.core import setup setup(name='TOPKAPI', version='0.2dev', description='SAHG TOPKAPI model implementation', author='Theo Vischel & Scott Sinclair', author_email='theo.vischel@hmg.inpg.fr; sinclaird@ukzn.ac.za', packages=['TOPKAPI', 'TOPKAPI.parameter_utils', 'TOPKAPI.results...
from distutils.core import setup setup(name='TOPKAPI', version='0.2dev', description='SAHG TOPKAPI model implementation', author='Theo Vischel & Scott Sinclair', author_email='theo.vischel@hmg.inpg.fr; sinclaird@ukzn.ac.za', packages=['TOPKAPI', 'TOPKAPI.parameter_utils', ...
Reformat to be more pleasing on the eye
STY: Reformat to be more pleasing on the eye
Python
bsd-3-clause
sahg/PyTOPKAPI,scottza/PyTOPKAPI
from distutils.core import setup setup(name='TOPKAPI', version='0.2dev', description='SAHG TOPKAPI model implementation', author='Theo Vischel & Scott Sinclair', author_email='theo.vischel@hmg.inpg.fr; sinclaird@ukzn.ac.za', packages=['TOPKAPI', 'TOPKAPI.parameter_utils', 'TOPKAPI.results...
from distutils.core import setup setup(name='TOPKAPI', version='0.2dev', description='SAHG TOPKAPI model implementation', author='Theo Vischel & Scott Sinclair', author_email='theo.vischel@hmg.inpg.fr; sinclaird@ukzn.ac.za', packages=['TOPKAPI', 'TOPKAPI.parameter_utils', ...
<commit_before>from distutils.core import setup setup(name='TOPKAPI', version='0.2dev', description='SAHG TOPKAPI model implementation', author='Theo Vischel & Scott Sinclair', author_email='theo.vischel@hmg.inpg.fr; sinclaird@ukzn.ac.za', packages=['TOPKAPI', 'TOPKAPI.parameter_utils', '...
from distutils.core import setup setup(name='TOPKAPI', version='0.2dev', description='SAHG TOPKAPI model implementation', author='Theo Vischel & Scott Sinclair', author_email='theo.vischel@hmg.inpg.fr; sinclaird@ukzn.ac.za', packages=['TOPKAPI', 'TOPKAPI.parameter_utils', ...
from distutils.core import setup setup(name='TOPKAPI', version='0.2dev', description='SAHG TOPKAPI model implementation', author='Theo Vischel & Scott Sinclair', author_email='theo.vischel@hmg.inpg.fr; sinclaird@ukzn.ac.za', packages=['TOPKAPI', 'TOPKAPI.parameter_utils', 'TOPKAPI.results...
<commit_before>from distutils.core import setup setup(name='TOPKAPI', version='0.2dev', description='SAHG TOPKAPI model implementation', author='Theo Vischel & Scott Sinclair', author_email='theo.vischel@hmg.inpg.fr; sinclaird@ukzn.ac.za', packages=['TOPKAPI', 'TOPKAPI.parameter_utils', '...
39235bffda1ac908a6b900432a6396d3522635e5
setup.py
setup.py
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspa...
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspa...
Bump version again. Descriptor emulation is more faithful.
Bump version again. Descriptor emulation is more faithful.
Python
mit
mwchase/class-namespaces,mwchase/class-namespaces
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspa...
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspa...
<commit_before>"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path he...
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspa...
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspa...
<commit_before>"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path he...
a15855f83d44eee4a8fac3aea97658d8d0051f96
setup.py
setup.py
from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages version_classifiers = ['Programming Language :: Python :: %s' % version for version in ['2', '2.5', '2.6', '2.7']] other_classifiers = [ 'Development Status :: 5 - Production/Stable', ...
from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages version_classifiers = ['Programming Language :: Python :: %s' % version for version in ['2', '2.5', '2.6', '2.7']] other_classifiers = [ 'Development Status :: 5 - Production/Stable', ...
Use context managers to build detailed_description.
Use context managers to build detailed_description.
Python
bsd-3-clause
dougbeal/nosy
from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages version_classifiers = ['Programming Language :: Python :: %s' % version for version in ['2', '2.5', '2.6', '2.7']] other_classifiers = [ 'Development Status :: 5 - Production/Stable', ...
from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages version_classifiers = ['Programming Language :: Python :: %s' % version for version in ['2', '2.5', '2.6', '2.7']] other_classifiers = [ 'Development Status :: 5 - Production/Stable', ...
<commit_before>from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages version_classifiers = ['Programming Language :: Python :: %s' % version for version in ['2', '2.5', '2.6', '2.7']] other_classifiers = [ 'Development Status :: 5 - Producti...
from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages version_classifiers = ['Programming Language :: Python :: %s' % version for version in ['2', '2.5', '2.6', '2.7']] other_classifiers = [ 'Development Status :: 5 - Production/Stable', ...
from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages version_classifiers = ['Programming Language :: Python :: %s' % version for version in ['2', '2.5', '2.6', '2.7']] other_classifiers = [ 'Development Status :: 5 - Production/Stable', ...
<commit_before>from distribute_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages version_classifiers = ['Programming Language :: Python :: %s' % version for version in ['2', '2.5', '2.6', '2.7']] other_classifiers = [ 'Development Status :: 5 - Producti...