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
e31b532b318851df8633c3464913029c463561e0
multivid.py
multivid.py
#!/usr/bin/env python import bottle import collections import itertools import search import tmap # the canonical list of search plugins used to do all the searches SEARCHERS = [ search.AmazonSearch(), search.HuluSearch(), search.NetflixSearch() ] # NOTE: we assume that all Search class implementors ar...
#!/usr/bin/env python import bottle import collections import itertools import search import tmap # the canonical list of search plugins used to do all the searches SEARCHERS = [ search.AmazonSearch(), search.HuluSearch(), search.NetflixSearch() ] # NOTE: we assume that all Search class implementors ar...
Change JSON response to find queries
Change JSON response to find queries
Python
mit
jasontbradshaw/multivid,jasontbradshaw/multivid
#!/usr/bin/env python import bottle import collections import itertools import search import tmap # the canonical list of search plugins used to do all the searches SEARCHERS = [ search.AmazonSearch(), search.HuluSearch(), search.NetflixSearch() ] # NOTE: we assume that all Search class implementors ar...
#!/usr/bin/env python import bottle import collections import itertools import search import tmap # the canonical list of search plugins used to do all the searches SEARCHERS = [ search.AmazonSearch(), search.HuluSearch(), search.NetflixSearch() ] # NOTE: we assume that all Search class implementors ar...
<commit_before>#!/usr/bin/env python import bottle import collections import itertools import search import tmap # the canonical list of search plugins used to do all the searches SEARCHERS = [ search.AmazonSearch(), search.HuluSearch(), search.NetflixSearch() ] # NOTE: we assume that all Search class ...
#!/usr/bin/env python import bottle import collections import itertools import search import tmap # the canonical list of search plugins used to do all the searches SEARCHERS = [ search.AmazonSearch(), search.HuluSearch(), search.NetflixSearch() ] # NOTE: we assume that all Search class implementors ar...
#!/usr/bin/env python import bottle import collections import itertools import search import tmap # the canonical list of search plugins used to do all the searches SEARCHERS = [ search.AmazonSearch(), search.HuluSearch(), search.NetflixSearch() ] # NOTE: we assume that all Search class implementors ar...
<commit_before>#!/usr/bin/env python import bottle import collections import itertools import search import tmap # the canonical list of search plugins used to do all the searches SEARCHERS = [ search.AmazonSearch(), search.HuluSearch(), search.NetflixSearch() ] # NOTE: we assume that all Search class ...
4184d968668ebd590d927aea7ecbaf7088473cb5
bot/action/util/reply_markup/inline_keyboard/button.py
bot/action/util/reply_markup/inline_keyboard/button.py
class InlineKeyboardButton: def __init__(self, data: dict): self.data = data @staticmethod def switch_inline_query(text: str, query: str = "", current_chat: bool = True): switch_inline_query_key = "switch_inline_query_current_chat" if current_chat else "switch_inline_query" return I...
class InlineKeyboardButton: def __init__(self, data: dict): self.data = data @staticmethod def create(text: str, url: str = None, callback_data: str = None, switch_inline_query: str = None, switch_inline_query_current_chat: str = None): ...
Add create static method to InlineKeyboardButton with all possible parameters
Add create static method to InlineKeyboardButton with all possible parameters
Python
agpl-3.0
alvarogzp/telegram-bot,alvarogzp/telegram-bot
class InlineKeyboardButton: def __init__(self, data: dict): self.data = data @staticmethod def switch_inline_query(text: str, query: str = "", current_chat: bool = True): switch_inline_query_key = "switch_inline_query_current_chat" if current_chat else "switch_inline_query" return I...
class InlineKeyboardButton: def __init__(self, data: dict): self.data = data @staticmethod def create(text: str, url: str = None, callback_data: str = None, switch_inline_query: str = None, switch_inline_query_current_chat: str = None): ...
<commit_before>class InlineKeyboardButton: def __init__(self, data: dict): self.data = data @staticmethod def switch_inline_query(text: str, query: str = "", current_chat: bool = True): switch_inline_query_key = "switch_inline_query_current_chat" if current_chat else "switch_inline_query" ...
class InlineKeyboardButton: def __init__(self, data: dict): self.data = data @staticmethod def create(text: str, url: str = None, callback_data: str = None, switch_inline_query: str = None, switch_inline_query_current_chat: str = None): ...
class InlineKeyboardButton: def __init__(self, data: dict): self.data = data @staticmethod def switch_inline_query(text: str, query: str = "", current_chat: bool = True): switch_inline_query_key = "switch_inline_query_current_chat" if current_chat else "switch_inline_query" return I...
<commit_before>class InlineKeyboardButton: def __init__(self, data: dict): self.data = data @staticmethod def switch_inline_query(text: str, query: str = "", current_chat: bool = True): switch_inline_query_key = "switch_inline_query_current_chat" if current_chat else "switch_inline_query" ...
60323c2944e81b8c0ff7b7e24de7aff28db238de
server/config.py
server/config.py
# Statement for enabling the development environment DEBUG = True TESTING = True # Define the application directory import os BASE_DIR = os.path.abspath(os.path.dirname(__file__)) # Define the database - we are working with # SQLite for this example SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:root@localhost/ont...
# Statement for enabling the development environment DEBUG = True TESTING = True # Define the application directory import os BASE_DIR = os.path.abspath(os.path.dirname(__file__)) # Define the database - we are working with # SQLite for this example SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:root@localhost/ont...
Add path for laptop for fixtures
Add path for laptop for fixtures
Python
mit
ganemone/ontheside,ganemone/ontheside,ganemone/ontheside
# Statement for enabling the development environment DEBUG = True TESTING = True # Define the application directory import os BASE_DIR = os.path.abspath(os.path.dirname(__file__)) # Define the database - we are working with # SQLite for this example SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:root@localhost/ont...
# Statement for enabling the development environment DEBUG = True TESTING = True # Define the application directory import os BASE_DIR = os.path.abspath(os.path.dirname(__file__)) # Define the database - we are working with # SQLite for this example SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:root@localhost/ont...
<commit_before># Statement for enabling the development environment DEBUG = True TESTING = True # Define the application directory import os BASE_DIR = os.path.abspath(os.path.dirname(__file__)) # Define the database - we are working with # SQLite for this example SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:roo...
# Statement for enabling the development environment DEBUG = True TESTING = True # Define the application directory import os BASE_DIR = os.path.abspath(os.path.dirname(__file__)) # Define the database - we are working with # SQLite for this example SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:root@localhost/ont...
# Statement for enabling the development environment DEBUG = True TESTING = True # Define the application directory import os BASE_DIR = os.path.abspath(os.path.dirname(__file__)) # Define the database - we are working with # SQLite for this example SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:root@localhost/ont...
<commit_before># Statement for enabling the development environment DEBUG = True TESTING = True # Define the application directory import os BASE_DIR = os.path.abspath(os.path.dirname(__file__)) # Define the database - we are working with # SQLite for this example SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://root:roo...
9c281ff44d6a28962897f4ca8013a539d7f08040
src/libcask/network.py
src/libcask/network.py
import subprocess class SetupNetworkMixin(object): def _setup_hostname(self): with self.get_attachment(['uts']).attach(): subprocess.check_call(['hostname', self.hostname]) def _setup_virtual_ethernet(self): veth_name = 'veth-{hostname}'.format(hostname=self.hostname) veth...
import subprocess class SetupNetworkMixin(object): def _setup_hostname(self): with self.get_attachment(['uts']).attach(): subprocess.check_call(['hostname', self.hostname]) def _setup_virtual_ethernet(self): veth_name = 'veth-{name}'.format(name=self.name) veth_host_name =...
Use container names, rather than hostnames, for virtual ethernet interface names
Use container names, rather than hostnames, for virtual ethernet interface names Container names are guaranteed to be unique, but hostnames are not
Python
mit
ianpreston/cask,ianpreston/cask
import subprocess class SetupNetworkMixin(object): def _setup_hostname(self): with self.get_attachment(['uts']).attach(): subprocess.check_call(['hostname', self.hostname]) def _setup_virtual_ethernet(self): veth_name = 'veth-{hostname}'.format(hostname=self.hostname) veth...
import subprocess class SetupNetworkMixin(object): def _setup_hostname(self): with self.get_attachment(['uts']).attach(): subprocess.check_call(['hostname', self.hostname]) def _setup_virtual_ethernet(self): veth_name = 'veth-{name}'.format(name=self.name) veth_host_name =...
<commit_before>import subprocess class SetupNetworkMixin(object): def _setup_hostname(self): with self.get_attachment(['uts']).attach(): subprocess.check_call(['hostname', self.hostname]) def _setup_virtual_ethernet(self): veth_name = 'veth-{hostname}'.format(hostname=self.hostnam...
import subprocess class SetupNetworkMixin(object): def _setup_hostname(self): with self.get_attachment(['uts']).attach(): subprocess.check_call(['hostname', self.hostname]) def _setup_virtual_ethernet(self): veth_name = 'veth-{name}'.format(name=self.name) veth_host_name =...
import subprocess class SetupNetworkMixin(object): def _setup_hostname(self): with self.get_attachment(['uts']).attach(): subprocess.check_call(['hostname', self.hostname]) def _setup_virtual_ethernet(self): veth_name = 'veth-{hostname}'.format(hostname=self.hostname) veth...
<commit_before>import subprocess class SetupNetworkMixin(object): def _setup_hostname(self): with self.get_attachment(['uts']).attach(): subprocess.check_call(['hostname', self.hostname]) def _setup_virtual_ethernet(self): veth_name = 'veth-{hostname}'.format(hostname=self.hostnam...
edd21fc76068894de1001a163885291c3b2cfadb
tests/factories.py
tests/factories.py
from django.conf import settings from django.contrib.auth.models import User import factory from website.models import Db, Query class TagsFactory(factory.DjangoModelFactory): class Meta: abstract = True @factory.post_generation def tags(self, create, extracted): if create and extracted:...
from django.conf import settings from django.contrib.auth.models import User import factory from website.models import Db, Query class TagsFactory(factory.DjangoModelFactory): class Meta: abstract = True @factory.post_generation def tags(self, create, extracted): if create and extracted:...
Make default QueryFactory return data (fixes test)
Make default QueryFactory return data (fixes test)
Python
mit
sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz,sqlviz/sqlviz
from django.conf import settings from django.contrib.auth.models import User import factory from website.models import Db, Query class TagsFactory(factory.DjangoModelFactory): class Meta: abstract = True @factory.post_generation def tags(self, create, extracted): if create and extracted:...
from django.conf import settings from django.contrib.auth.models import User import factory from website.models import Db, Query class TagsFactory(factory.DjangoModelFactory): class Meta: abstract = True @factory.post_generation def tags(self, create, extracted): if create and extracted:...
<commit_before>from django.conf import settings from django.contrib.auth.models import User import factory from website.models import Db, Query class TagsFactory(factory.DjangoModelFactory): class Meta: abstract = True @factory.post_generation def tags(self, create, extracted): if create...
from django.conf import settings from django.contrib.auth.models import User import factory from website.models import Db, Query class TagsFactory(factory.DjangoModelFactory): class Meta: abstract = True @factory.post_generation def tags(self, create, extracted): if create and extracted:...
from django.conf import settings from django.contrib.auth.models import User import factory from website.models import Db, Query class TagsFactory(factory.DjangoModelFactory): class Meta: abstract = True @factory.post_generation def tags(self, create, extracted): if create and extracted:...
<commit_before>from django.conf import settings from django.contrib.auth.models import User import factory from website.models import Db, Query class TagsFactory(factory.DjangoModelFactory): class Meta: abstract = True @factory.post_generation def tags(self, create, extracted): if create...
d698d4ce3002db3b518e061075f294cf9b0089a6
aspc/senate/urls.py
aspc/senate/urls.py
from django.conf.urls import patterns, include, url from aspc.senate.views import DocumentList, AppointmentList urlpatterns = patterns('', url(r'^documents/$', DocumentList.as_view(), name="document_list"), url(r'^documents/(?P<page>[0-9]+)/$', DocumentList.as_view(), name="document_list_page"), url(r'^pre...
from django.conf.urls import patterns, include, url from aspc.senate.views import DocumentList, AppointmentList urlpatterns = patterns('', url(r'^documents/$', DocumentList.as_view(), name="document_list"), url(r'^documents/(?P<page>[0-9]+)/$', DocumentList.as_view(), name="document_list_page"), url(r'^pos...
Remove the preview prefix from the positions URL pattern
Remove the preview prefix from the positions URL pattern
Python
mit
theworldbright/mainsite,aspc/mainsite,aspc/mainsite,aspc/mainsite,theworldbright/mainsite,aspc/mainsite,theworldbright/mainsite,theworldbright/mainsite
from django.conf.urls import patterns, include, url from aspc.senate.views import DocumentList, AppointmentList urlpatterns = patterns('', url(r'^documents/$', DocumentList.as_view(), name="document_list"), url(r'^documents/(?P<page>[0-9]+)/$', DocumentList.as_view(), name="document_list_page"), url(r'^pre...
from django.conf.urls import patterns, include, url from aspc.senate.views import DocumentList, AppointmentList urlpatterns = patterns('', url(r'^documents/$', DocumentList.as_view(), name="document_list"), url(r'^documents/(?P<page>[0-9]+)/$', DocumentList.as_view(), name="document_list_page"), url(r'^pos...
<commit_before>from django.conf.urls import patterns, include, url from aspc.senate.views import DocumentList, AppointmentList urlpatterns = patterns('', url(r'^documents/$', DocumentList.as_view(), name="document_list"), url(r'^documents/(?P<page>[0-9]+)/$', DocumentList.as_view(), name="document_list_page"),...
from django.conf.urls import patterns, include, url from aspc.senate.views import DocumentList, AppointmentList urlpatterns = patterns('', url(r'^documents/$', DocumentList.as_view(), name="document_list"), url(r'^documents/(?P<page>[0-9]+)/$', DocumentList.as_view(), name="document_list_page"), url(r'^pos...
from django.conf.urls import patterns, include, url from aspc.senate.views import DocumentList, AppointmentList urlpatterns = patterns('', url(r'^documents/$', DocumentList.as_view(), name="document_list"), url(r'^documents/(?P<page>[0-9]+)/$', DocumentList.as_view(), name="document_list_page"), url(r'^pre...
<commit_before>from django.conf.urls import patterns, include, url from aspc.senate.views import DocumentList, AppointmentList urlpatterns = patterns('', url(r'^documents/$', DocumentList.as_view(), name="document_list"), url(r'^documents/(?P<page>[0-9]+)/$', DocumentList.as_view(), name="document_list_page"),...
3fc45407eaba1452092a364eeb676bdaab6d5edc
polling_stations/apps/councils/migrations/0005_geom_not_geog.py
polling_stations/apps/councils/migrations/0005_geom_not_geog.py
# Generated by Django 2.2.10 on 2020-02-14 14:41 import django.contrib.gis.db.models.fields from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("councils", "0004_auto_20200203_1040"), ] operations = [ migrations.AlterField( model_name="c...
# Generated by Django 2.2.10 on 2020-02-14 14:41 # Amended by Will on 2021-04-11 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("councils", "0004_auto_20200203_1040"), ] operations = [ migrations.RunSQL( 'ALTER TABLE "councils_counc...
Fix council migration using explicit type cast
Fix council migration using explicit type cast The generated SQL for this doesn't include the 'USING' section. It seems like this is now needed.
Python
bsd-3-clause
DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations
# Generated by Django 2.2.10 on 2020-02-14 14:41 import django.contrib.gis.db.models.fields from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("councils", "0004_auto_20200203_1040"), ] operations = [ migrations.AlterField( model_name="c...
# Generated by Django 2.2.10 on 2020-02-14 14:41 # Amended by Will on 2021-04-11 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("councils", "0004_auto_20200203_1040"), ] operations = [ migrations.RunSQL( 'ALTER TABLE "councils_counc...
<commit_before># Generated by Django 2.2.10 on 2020-02-14 14:41 import django.contrib.gis.db.models.fields from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("councils", "0004_auto_20200203_1040"), ] operations = [ migrations.AlterField( ...
# Generated by Django 2.2.10 on 2020-02-14 14:41 # Amended by Will on 2021-04-11 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("councils", "0004_auto_20200203_1040"), ] operations = [ migrations.RunSQL( 'ALTER TABLE "councils_counc...
# Generated by Django 2.2.10 on 2020-02-14 14:41 import django.contrib.gis.db.models.fields from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("councils", "0004_auto_20200203_1040"), ] operations = [ migrations.AlterField( model_name="c...
<commit_before># Generated by Django 2.2.10 on 2020-02-14 14:41 import django.contrib.gis.db.models.fields from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("councils", "0004_auto_20200203_1040"), ] operations = [ migrations.AlterField( ...
653832ebc7b18599b9aab2f230b190b14e71cd3d
models.py
models.py
from google.appengine.ext import db class User(db.Model): name = db.UserProperty(auto_current_user = True, auto_current_user_add = True) date = db.DateTimeProperty(auto_now = True, auto_now_add = True) #token = db.StringProperty() services = db.StringListProperty()
class User(db.Model): name = db.UserProperty(auto_current_user = True, auto_current_user_add = True) date = db.DateTimeProperty(auto_now = True, auto_now_add = True) #token = db.StringProperty() services = db.StringListProperty()
Clean import modules hey hey.
Clean import modules hey hey.
Python
mpl-2.0
BYK/fb2goog,BYK/fb2goog,BYK/fb2goog
from google.appengine.ext import db class User(db.Model): name = db.UserProperty(auto_current_user = True, auto_current_user_add = True) date = db.DateTimeProperty(auto_now = True, auto_now_add = True) #token = db.StringProperty() services = db.StringListProperty() Clean import modules hey hey.
class User(db.Model): name = db.UserProperty(auto_current_user = True, auto_current_user_add = True) date = db.DateTimeProperty(auto_now = True, auto_now_add = True) #token = db.StringProperty() services = db.StringListProperty()
<commit_before>from google.appengine.ext import db class User(db.Model): name = db.UserProperty(auto_current_user = True, auto_current_user_add = True) date = db.DateTimeProperty(auto_now = True, auto_now_add = True) #token = db.StringProperty() services = db.StringListProperty() <commit_msg>Clean impo...
class User(db.Model): name = db.UserProperty(auto_current_user = True, auto_current_user_add = True) date = db.DateTimeProperty(auto_now = True, auto_now_add = True) #token = db.StringProperty() services = db.StringListProperty()
from google.appengine.ext import db class User(db.Model): name = db.UserProperty(auto_current_user = True, auto_current_user_add = True) date = db.DateTimeProperty(auto_now = True, auto_now_add = True) #token = db.StringProperty() services = db.StringListProperty() Clean import modules hey hey.class Us...
<commit_before>from google.appengine.ext import db class User(db.Model): name = db.UserProperty(auto_current_user = True, auto_current_user_add = True) date = db.DateTimeProperty(auto_now = True, auto_now_add = True) #token = db.StringProperty() services = db.StringListProperty() <commit_msg>Clean impo...
97b6894671c0906393aea5aa43e632a35bd2aa27
penchy/tests/test_util.py
penchy/tests/test_util.py
import os import unittest2 from penchy import util class ClasspathTest(unittest2.TestCase): def test_valid_options(self): expected = 'foo:bar:baz' options = ['-cp', expected] self.assertEquals(util.extract_classpath(options), expected) expected = 'foo:bar:baz' options = [...
import os import unittest2 from penchy import util class ClasspathTest(unittest2.TestCase): def test_valid_options(self): expected = 'foo:bar:baz' options = ['-cp', expected] self.assertEquals(util.extract_classpath(options), expected) expected = 'foo:bar:baz' options = [...
Check if tempdir returns to former cwd.
tests: Check if tempdir returns to former cwd. Signed-off-by: Michael Markert <5eb998b7ac86da375651a4cd767b88c9dad25896@googlemail.com>
Python
mit
fhirschmann/penchy,fhirschmann/penchy
import os import unittest2 from penchy import util class ClasspathTest(unittest2.TestCase): def test_valid_options(self): expected = 'foo:bar:baz' options = ['-cp', expected] self.assertEquals(util.extract_classpath(options), expected) expected = 'foo:bar:baz' options = [...
import os import unittest2 from penchy import util class ClasspathTest(unittest2.TestCase): def test_valid_options(self): expected = 'foo:bar:baz' options = ['-cp', expected] self.assertEquals(util.extract_classpath(options), expected) expected = 'foo:bar:baz' options = [...
<commit_before>import os import unittest2 from penchy import util class ClasspathTest(unittest2.TestCase): def test_valid_options(self): expected = 'foo:bar:baz' options = ['-cp', expected] self.assertEquals(util.extract_classpath(options), expected) expected = 'foo:bar:baz' ...
import os import unittest2 from penchy import util class ClasspathTest(unittest2.TestCase): def test_valid_options(self): expected = 'foo:bar:baz' options = ['-cp', expected] self.assertEquals(util.extract_classpath(options), expected) expected = 'foo:bar:baz' options = [...
import os import unittest2 from penchy import util class ClasspathTest(unittest2.TestCase): def test_valid_options(self): expected = 'foo:bar:baz' options = ['-cp', expected] self.assertEquals(util.extract_classpath(options), expected) expected = 'foo:bar:baz' options = [...
<commit_before>import os import unittest2 from penchy import util class ClasspathTest(unittest2.TestCase): def test_valid_options(self): expected = 'foo:bar:baz' options = ['-cp', expected] self.assertEquals(util.extract_classpath(options), expected) expected = 'foo:bar:baz' ...
ecd8d1ce0135e1c0a3901e73619d4f4d5bf1e6c7
astral/api/urls.py
astral/api/urls.py
from handlers.nodes import NodesHandler from handlers.node import NodeHandler from handlers.streams import StreamsHandler from handlers.stream import StreamHandler from handlers.ping import PingHandler from handlers.events import EventHandler from handlers.ticket import TicketHandler from handlers.tickets import Tick...
from handlers.nodes import NodesHandler from handlers.node import NodeHandler from handlers.streams import StreamsHandler from handlers.stream import StreamHandler from handlers.ping import PingHandler from handlers.events import EventHandler from handlers.ticket import TicketHandler from handlers.tickets import Tick...
Remove extra regexp group from URL pattern.
Remove extra regexp group from URL pattern.
Python
mit
peplin/astral
from handlers.nodes import NodesHandler from handlers.node import NodeHandler from handlers.streams import StreamsHandler from handlers.stream import StreamHandler from handlers.ping import PingHandler from handlers.events import EventHandler from handlers.ticket import TicketHandler from handlers.tickets import Tick...
from handlers.nodes import NodesHandler from handlers.node import NodeHandler from handlers.streams import StreamsHandler from handlers.stream import StreamHandler from handlers.ping import PingHandler from handlers.events import EventHandler from handlers.ticket import TicketHandler from handlers.tickets import Tick...
<commit_before>from handlers.nodes import NodesHandler from handlers.node import NodeHandler from handlers.streams import StreamsHandler from handlers.stream import StreamHandler from handlers.ping import PingHandler from handlers.events import EventHandler from handlers.ticket import TicketHandler from handlers.tick...
from handlers.nodes import NodesHandler from handlers.node import NodeHandler from handlers.streams import StreamsHandler from handlers.stream import StreamHandler from handlers.ping import PingHandler from handlers.events import EventHandler from handlers.ticket import TicketHandler from handlers.tickets import Tick...
from handlers.nodes import NodesHandler from handlers.node import NodeHandler from handlers.streams import StreamsHandler from handlers.stream import StreamHandler from handlers.ping import PingHandler from handlers.events import EventHandler from handlers.ticket import TicketHandler from handlers.tickets import Tick...
<commit_before>from handlers.nodes import NodesHandler from handlers.node import NodeHandler from handlers.streams import StreamsHandler from handlers.stream import StreamHandler from handlers.ping import PingHandler from handlers.events import EventHandler from handlers.ticket import TicketHandler from handlers.tick...
754f5c968ad1dff3ae7f602d23baac1299731062
update_filelist.py
update_filelist.py
#!/usr/bin/python3 import os import re import subprocess dir_path = os.path.dirname(os.path.realpath(__file__)) filename = 'chatterino.pro' data = "" with open(filename, 'r') as project: data = project.read() sources = subprocess.getoutput("find ./src -type f -regex '.*\.cpp' | sed 's_\./_ _g'") sourc...
#!/usr/bin/python3 import os import re import subprocess dir_path = os.path.dirname(os.path.realpath(__file__)) filename = 'chatterino.pro' data = "" with open(filename, 'r') as project: data = project.read() sources_list = subprocess.getoutput("find ./src -type f -regex '.*\.cpp' | sed 's_\./_ _g'").spli...
Sort file list before writing to project file
Sort file list before writing to project file Now using the built-in Python `list.sort` method to sort files. This should ensure consistent behavior on all systems and prevent unnecessary merge conflicts.
Python
mit
Cranken/chatterino2,hemirt/chatterino2,fourtf/chatterino2,Cranken/chatterino2,hemirt/chatterino2,Cranken/chatterino2,fourtf/chatterino2,Cranken/chatterino2,fourtf/chatterino2,hemirt/chatterino2,hemirt/chatterino2
#!/usr/bin/python3 import os import re import subprocess dir_path = os.path.dirname(os.path.realpath(__file__)) filename = 'chatterino.pro' data = "" with open(filename, 'r') as project: data = project.read() sources = subprocess.getoutput("find ./src -type f -regex '.*\.cpp' | sed 's_\./_ _g'") sourc...
#!/usr/bin/python3 import os import re import subprocess dir_path = os.path.dirname(os.path.realpath(__file__)) filename = 'chatterino.pro' data = "" with open(filename, 'r') as project: data = project.read() sources_list = subprocess.getoutput("find ./src -type f -regex '.*\.cpp' | sed 's_\./_ _g'").spli...
<commit_before>#!/usr/bin/python3 import os import re import subprocess dir_path = os.path.dirname(os.path.realpath(__file__)) filename = 'chatterino.pro' data = "" with open(filename, 'r') as project: data = project.read() sources = subprocess.getoutput("find ./src -type f -regex '.*\.cpp' | sed 's_\./_ ...
#!/usr/bin/python3 import os import re import subprocess dir_path = os.path.dirname(os.path.realpath(__file__)) filename = 'chatterino.pro' data = "" with open(filename, 'r') as project: data = project.read() sources_list = subprocess.getoutput("find ./src -type f -regex '.*\.cpp' | sed 's_\./_ _g'").spli...
#!/usr/bin/python3 import os import re import subprocess dir_path = os.path.dirname(os.path.realpath(__file__)) filename = 'chatterino.pro' data = "" with open(filename, 'r') as project: data = project.read() sources = subprocess.getoutput("find ./src -type f -regex '.*\.cpp' | sed 's_\./_ _g'") sourc...
<commit_before>#!/usr/bin/python3 import os import re import subprocess dir_path = os.path.dirname(os.path.realpath(__file__)) filename = 'chatterino.pro' data = "" with open(filename, 'r') as project: data = project.read() sources = subprocess.getoutput("find ./src -type f -regex '.*\.cpp' | sed 's_\./_ ...
65f7a8912a0a7b1f408c4ab429065aad8dba12fc
yourls/__init__.py
yourls/__init__.py
# coding: utf-8 from __future__ import absolute_import, division, print_function from .api import DBStats, ShortenedURL from .core import YOURLSAPIMixin, YOURLSClient, YOURLSClientBase from .exc import ( YOURLSAPIError, YOURLSHTTPError, YOURLSKeywordExistsError, YOURLSNoLoopError, YOURLSNoURLError, YOURLSURLEx...
# coding: utf-8 from __future__ import absolute_import, division, print_function from .api import DBStats, ShortenedURL from .core import YOURLSAPIMixin, YOURLSClient, YOURLSClientBase from .exc import ( YOURLSAPIError, YOURLSHTTPError, YOURLSKeywordExistsError, YOURLSNoLoopError, YOURLSNoURLError, YOURLSURLEx...
Bump version numer to 1.0.1
Bump version numer to 1.0.1
Python
mit
RazerM/yourls-python,RazerM/yourls-python
# coding: utf-8 from __future__ import absolute_import, division, print_function from .api import DBStats, ShortenedURL from .core import YOURLSAPIMixin, YOURLSClient, YOURLSClientBase from .exc import ( YOURLSAPIError, YOURLSHTTPError, YOURLSKeywordExistsError, YOURLSNoLoopError, YOURLSNoURLError, YOURLSURLEx...
# coding: utf-8 from __future__ import absolute_import, division, print_function from .api import DBStats, ShortenedURL from .core import YOURLSAPIMixin, YOURLSClient, YOURLSClientBase from .exc import ( YOURLSAPIError, YOURLSHTTPError, YOURLSKeywordExistsError, YOURLSNoLoopError, YOURLSNoURLError, YOURLSURLEx...
<commit_before># coding: utf-8 from __future__ import absolute_import, division, print_function from .api import DBStats, ShortenedURL from .core import YOURLSAPIMixin, YOURLSClient, YOURLSClientBase from .exc import ( YOURLSAPIError, YOURLSHTTPError, YOURLSKeywordExistsError, YOURLSNoLoopError, YOURLSNoURLErr...
# coding: utf-8 from __future__ import absolute_import, division, print_function from .api import DBStats, ShortenedURL from .core import YOURLSAPIMixin, YOURLSClient, YOURLSClientBase from .exc import ( YOURLSAPIError, YOURLSHTTPError, YOURLSKeywordExistsError, YOURLSNoLoopError, YOURLSNoURLError, YOURLSURLEx...
# coding: utf-8 from __future__ import absolute_import, division, print_function from .api import DBStats, ShortenedURL from .core import YOURLSAPIMixin, YOURLSClient, YOURLSClientBase from .exc import ( YOURLSAPIError, YOURLSHTTPError, YOURLSKeywordExistsError, YOURLSNoLoopError, YOURLSNoURLError, YOURLSURLEx...
<commit_before># coding: utf-8 from __future__ import absolute_import, division, print_function from .api import DBStats, ShortenedURL from .core import YOURLSAPIMixin, YOURLSClient, YOURLSClientBase from .exc import ( YOURLSAPIError, YOURLSHTTPError, YOURLSKeywordExistsError, YOURLSNoLoopError, YOURLSNoURLErr...
28cb04ae75a42e6b3ce10972e12166a6cbd84267
astroquery/sha/tests/test_sha.py
astroquery/sha/tests/test_sha.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst from ... import sha def test_query(): # Example queries for SHA API help page sha.query(ra=163.6136, dec=-11.784, size=0.5) sha.query(naifid=2003226) sha.query(pid=30080) sha.query(reqkey=21641216)
# Licensed under a 3-clause BSD style license - see LICENSE.rst from ... import sha def test_query(): # Example queries for SHA API help page pos_t = sha.query(ra=163.6136, dec=-11.784, size=0.5) nid_t = sha.query(naifid=2003226) pid_t = sha.query(pid=30080) rqk_t = sha.query(reqkey=21641216) #...
Update test for get file
Update test for get file Commented out the actual get_img calls because they would create a directoy and download files if run, potentially in parts of the file system where the user/process does not have the right permissions.
Python
bsd-3-clause
imbasimba/astroquery,ceb8/astroquery,imbasimba/astroquery,ceb8/astroquery
# Licensed under a 3-clause BSD style license - see LICENSE.rst from ... import sha def test_query(): # Example queries for SHA API help page sha.query(ra=163.6136, dec=-11.784, size=0.5) sha.query(naifid=2003226) sha.query(pid=30080) sha.query(reqkey=21641216) Update test for get file Commented...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from ... import sha def test_query(): # Example queries for SHA API help page pos_t = sha.query(ra=163.6136, dec=-11.784, size=0.5) nid_t = sha.query(naifid=2003226) pid_t = sha.query(pid=30080) rqk_t = sha.query(reqkey=21641216) #...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst from ... import sha def test_query(): # Example queries for SHA API help page sha.query(ra=163.6136, dec=-11.784, size=0.5) sha.query(naifid=2003226) sha.query(pid=30080) sha.query(reqkey=21641216) <commit_msg>Update t...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from ... import sha def test_query(): # Example queries for SHA API help page pos_t = sha.query(ra=163.6136, dec=-11.784, size=0.5) nid_t = sha.query(naifid=2003226) pid_t = sha.query(pid=30080) rqk_t = sha.query(reqkey=21641216) #...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from ... import sha def test_query(): # Example queries for SHA API help page sha.query(ra=163.6136, dec=-11.784, size=0.5) sha.query(naifid=2003226) sha.query(pid=30080) sha.query(reqkey=21641216) Update test for get file Commented...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst from ... import sha def test_query(): # Example queries for SHA API help page sha.query(ra=163.6136, dec=-11.784, size=0.5) sha.query(naifid=2003226) sha.query(pid=30080) sha.query(reqkey=21641216) <commit_msg>Update t...
b41ce2be52bc3aebf5ad9a737700da0753602670
parser.py
parser.py
import requests API_URL = 'https://api.github.com/users/{}/repos' def main(user): return parse(request(user)) def request(user): return requests.get(url=API_URL.format(user)) def parse(response): repos = response.json() data = [] if repos is None: return None for repo in repos: ...
import requests import collections API_URL = 'https://api.github.com/users/{}/repos' def main(user): return parse(request(user)) def request(user): return requests.get(url=API_URL.format(user)) def parse(response): repos = response.json() data = [] if repos is None: return None fo...
Use OrderedDict for repo data
Use OrderedDict for repo data
Python
mit
kshvmdn/github-list,kshvmdn/github-list,kshvmdn/github-list
import requests API_URL = 'https://api.github.com/users/{}/repos' def main(user): return parse(request(user)) def request(user): return requests.get(url=API_URL.format(user)) def parse(response): repos = response.json() data = [] if repos is None: return None for repo in repos: ...
import requests import collections API_URL = 'https://api.github.com/users/{}/repos' def main(user): return parse(request(user)) def request(user): return requests.get(url=API_URL.format(user)) def parse(response): repos = response.json() data = [] if repos is None: return None fo...
<commit_before>import requests API_URL = 'https://api.github.com/users/{}/repos' def main(user): return parse(request(user)) def request(user): return requests.get(url=API_URL.format(user)) def parse(response): repos = response.json() data = [] if repos is None: return None for re...
import requests import collections API_URL = 'https://api.github.com/users/{}/repos' def main(user): return parse(request(user)) def request(user): return requests.get(url=API_URL.format(user)) def parse(response): repos = response.json() data = [] if repos is None: return None fo...
import requests API_URL = 'https://api.github.com/users/{}/repos' def main(user): return parse(request(user)) def request(user): return requests.get(url=API_URL.format(user)) def parse(response): repos = response.json() data = [] if repos is None: return None for repo in repos: ...
<commit_before>import requests API_URL = 'https://api.github.com/users/{}/repos' def main(user): return parse(request(user)) def request(user): return requests.get(url=API_URL.format(user)) def parse(response): repos = response.json() data = [] if repos is None: return None for re...
471be725896b69439369143b6138f614a062aca5
dsub/_dsub_version.py
dsub/_dsub_version.py
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
Update dsub version to 0.4.1.dev0
Update dsub version to 0.4.1.dev0 PiperOrigin-RevId: 328627320
Python
apache-2.0
DataBiosphere/dsub,DataBiosphere/dsub
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
<commit_before># Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
<commit_before># Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
52a90e320355de503624edf714ff7999aafba062
blitz/io/signals.py
blitz/io/signals.py
__author__ = 'Will Hart' from blinker import signal # fired when a new web client device connects web_client_connected = signal('client_connected') # fired when a web client disconnects web_client_disconnected = signal('client_disconnected') # fired when a new TCP client device connects tcp_client_connected = signa...
__author__ = 'Will Hart' from blinker import signal # fired when a new web client device connects web_client_connected = signal('client_connected') # fired when a web client disconnects web_client_disconnected = signal('client_disconnected') # fired when a new TCP client device connects tcp_client_connected = signa...
Add a boards registering signal to allow the board manager to gather connected boards
Add a boards registering signal to allow the board manager to gather connected boards
Python
agpl-3.0
will-hart/blitz,will-hart/blitz
__author__ = 'Will Hart' from blinker import signal # fired when a new web client device connects web_client_connected = signal('client_connected') # fired when a web client disconnects web_client_disconnected = signal('client_disconnected') # fired when a new TCP client device connects tcp_client_connected = signa...
__author__ = 'Will Hart' from blinker import signal # fired when a new web client device connects web_client_connected = signal('client_connected') # fired when a web client disconnects web_client_disconnected = signal('client_disconnected') # fired when a new TCP client device connects tcp_client_connected = signa...
<commit_before>__author__ = 'Will Hart' from blinker import signal # fired when a new web client device connects web_client_connected = signal('client_connected') # fired when a web client disconnects web_client_disconnected = signal('client_disconnected') # fired when a new TCP client device connects tcp_client_co...
__author__ = 'Will Hart' from blinker import signal # fired when a new web client device connects web_client_connected = signal('client_connected') # fired when a web client disconnects web_client_disconnected = signal('client_disconnected') # fired when a new TCP client device connects tcp_client_connected = signa...
__author__ = 'Will Hart' from blinker import signal # fired when a new web client device connects web_client_connected = signal('client_connected') # fired when a web client disconnects web_client_disconnected = signal('client_disconnected') # fired when a new TCP client device connects tcp_client_connected = signa...
<commit_before>__author__ = 'Will Hart' from blinker import signal # fired when a new web client device connects web_client_connected = signal('client_connected') # fired when a web client disconnects web_client_disconnected = signal('client_disconnected') # fired when a new TCP client device connects tcp_client_co...
8292c4afe43ac636ebf23a0740eb06a25fbbb04d
backend/post_handler/__init__.py
backend/post_handler/__init__.py
from flask import Flask app = Flask(__name__) @app.route("/", methods=["GET", "POST"]) def hello(): from flask import request # print dir(request) # print request.values sdp_headers = request.form.get('sdp') with open('./stream.sdp', 'w') as f: f.write(sdp_headers) cmd = "ffmpeg -i s...
from flask import Flask app = Flask(__name__) @app.route("/", methods=["GET", "POST"]) def hello(): from flask import request # print dir(request) # print request.values sdp_headers = request.form.get('sdp') with open('./stream.sdp', 'w') as f: f.write(sdp_headers) import time t...
Add uniq filenames for videos
Add uniq filenames for videos
Python
mit
optimus-team/optimus-video,optimus-team/optimus-video,optimus-team/optimus-video,optimus-team/optimus-video
from flask import Flask app = Flask(__name__) @app.route("/", methods=["GET", "POST"]) def hello(): from flask import request # print dir(request) # print request.values sdp_headers = request.form.get('sdp') with open('./stream.sdp', 'w') as f: f.write(sdp_headers) cmd = "ffmpeg -i s...
from flask import Flask app = Flask(__name__) @app.route("/", methods=["GET", "POST"]) def hello(): from flask import request # print dir(request) # print request.values sdp_headers = request.form.get('sdp') with open('./stream.sdp', 'w') as f: f.write(sdp_headers) import time t...
<commit_before>from flask import Flask app = Flask(__name__) @app.route("/", methods=["GET", "POST"]) def hello(): from flask import request # print dir(request) # print request.values sdp_headers = request.form.get('sdp') with open('./stream.sdp', 'w') as f: f.write(sdp_headers) cmd...
from flask import Flask app = Flask(__name__) @app.route("/", methods=["GET", "POST"]) def hello(): from flask import request # print dir(request) # print request.values sdp_headers = request.form.get('sdp') with open('./stream.sdp', 'w') as f: f.write(sdp_headers) import time t...
from flask import Flask app = Flask(__name__) @app.route("/", methods=["GET", "POST"]) def hello(): from flask import request # print dir(request) # print request.values sdp_headers = request.form.get('sdp') with open('./stream.sdp', 'w') as f: f.write(sdp_headers) cmd = "ffmpeg -i s...
<commit_before>from flask import Flask app = Flask(__name__) @app.route("/", methods=["GET", "POST"]) def hello(): from flask import request # print dir(request) # print request.values sdp_headers = request.form.get('sdp') with open('./stream.sdp', 'w') as f: f.write(sdp_headers) cmd...
3202d2c067ce76f7e7e12f42b7531e7e082b1b88
python-dsl/buck_parser/json_encoder.py
python-dsl/buck_parser/json_encoder.py
from __future__ import absolute_import, division, print_function, with_statement import collections from json import JSONEncoder # A JSONEncoder subclass which handles map-like and list-like objects. class BuckJSONEncoder(JSONEncoder): def __init__(self): super(BuckJSONEncoder, self).__init__(self) ...
from __future__ import absolute_import, division, print_function, with_statement import collections from json import JSONEncoder # A JSONEncoder subclass which handles map-like and list-like objects. class BuckJSONEncoder(JSONEncoder): def __init__(self): super(BuckJSONEncoder, self).__init__() def ...
Fix Python 3 incompatible super constructor invocation.
Fix Python 3 incompatible super constructor invocation. Summary: Python is a mess and requires all sorts of hacks to work :( Reviewed By: philipjameson fbshipit-source-id: 12f3f59a0d
Python
apache-2.0
brettwooldridge/buck,brettwooldridge/buck,JoelMarcey/buck,brettwooldridge/buck,rmaz/buck,Addepar/buck,facebook/buck,rmaz/buck,romanoid/buck,nguyentruongtho/buck,rmaz/buck,facebook/buck,SeleniumHQ/buck,rmaz/buck,brettwooldridge/buck,rmaz/buck,romanoid/buck,nguyentruongtho/buck,Addepar/buck,SeleniumHQ/buck,Addepar/buck,b...
from __future__ import absolute_import, division, print_function, with_statement import collections from json import JSONEncoder # A JSONEncoder subclass which handles map-like and list-like objects. class BuckJSONEncoder(JSONEncoder): def __init__(self): super(BuckJSONEncoder, self).__init__(self) ...
from __future__ import absolute_import, division, print_function, with_statement import collections from json import JSONEncoder # A JSONEncoder subclass which handles map-like and list-like objects. class BuckJSONEncoder(JSONEncoder): def __init__(self): super(BuckJSONEncoder, self).__init__() def ...
<commit_before>from __future__ import absolute_import, division, print_function, with_statement import collections from json import JSONEncoder # A JSONEncoder subclass which handles map-like and list-like objects. class BuckJSONEncoder(JSONEncoder): def __init__(self): super(BuckJSONEncoder, self).__ini...
from __future__ import absolute_import, division, print_function, with_statement import collections from json import JSONEncoder # A JSONEncoder subclass which handles map-like and list-like objects. class BuckJSONEncoder(JSONEncoder): def __init__(self): super(BuckJSONEncoder, self).__init__() def ...
from __future__ import absolute_import, division, print_function, with_statement import collections from json import JSONEncoder # A JSONEncoder subclass which handles map-like and list-like objects. class BuckJSONEncoder(JSONEncoder): def __init__(self): super(BuckJSONEncoder, self).__init__(self) ...
<commit_before>from __future__ import absolute_import, division, print_function, with_statement import collections from json import JSONEncoder # A JSONEncoder subclass which handles map-like and list-like objects. class BuckJSONEncoder(JSONEncoder): def __init__(self): super(BuckJSONEncoder, self).__ini...
07e825b31912a821d116b2a2b394bd041321cd6d
molly/utils/management/commands/deploy.py
molly/utils/management/commands/deploy.py
import os from optparse import make_option from django.core.management import call_command from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--develop', action='store_true', dest='develo...
import os from optparse import make_option from django.core.management import call_command from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--develop', action='store_true', dest='develo...
Deploy should remember to generate markers
Deploy should remember to generate markers
Python
apache-2.0
mollyproject/mollyproject,mollyproject/mollyproject,mollyproject/mollyproject
import os from optparse import make_option from django.core.management import call_command from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--develop', action='store_true', dest='develo...
import os from optparse import make_option from django.core.management import call_command from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--develop', action='store_true', dest='develo...
<commit_before>import os from optparse import make_option from django.core.management import call_command from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--develop', action='store_true', ...
import os from optparse import make_option from django.core.management import call_command from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--develop', action='store_true', dest='develo...
import os from optparse import make_option from django.core.management import call_command from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--develop', action='store_true', dest='develo...
<commit_before>import os from optparse import make_option from django.core.management import call_command from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--develop', action='store_true', ...
9c6cb0943381271052e11d35df7c35c677c52cdf
vtimshow/vtimageviewer.py
vtimshow/vtimageviewer.py
#!/usr/bin/env python3 class VtImageViewer: def __init__(self): print("Woot!")
#!/usr/bin/env python3 from . import defaults from . import __version__ from PyQt4 import QtGui class VtImageViewer: """ """ UID = defaults.UID NAME = defaults.PLUGIN_NAME COMMENT = defaults.COMMENT def __init__(self, parent=None): #super(VtImageViewer, self).__init__(parent) d...
Add initial corrections to class
Add initial corrections to class Now the class loads and does not crash. I added the help information; however, it does not do anything yet.
Python
mit
kprussing/vtimshow
#!/usr/bin/env python3 class VtImageViewer: def __init__(self): print("Woot!") Add initial corrections to class Now the class loads and does not crash. I added the help information; however, it does not do anything yet.
#!/usr/bin/env python3 from . import defaults from . import __version__ from PyQt4 import QtGui class VtImageViewer: """ """ UID = defaults.UID NAME = defaults.PLUGIN_NAME COMMENT = defaults.COMMENT def __init__(self, parent=None): #super(VtImageViewer, self).__init__(parent) d...
<commit_before>#!/usr/bin/env python3 class VtImageViewer: def __init__(self): print("Woot!") <commit_msg>Add initial corrections to class Now the class loads and does not crash. I added the help information; however, it does not do anything yet.<commit_after>
#!/usr/bin/env python3 from . import defaults from . import __version__ from PyQt4 import QtGui class VtImageViewer: """ """ UID = defaults.UID NAME = defaults.PLUGIN_NAME COMMENT = defaults.COMMENT def __init__(self, parent=None): #super(VtImageViewer, self).__init__(parent) d...
#!/usr/bin/env python3 class VtImageViewer: def __init__(self): print("Woot!") Add initial corrections to class Now the class loads and does not crash. I added the help information; however, it does not do anything yet.#!/usr/bin/env python3 from . import defaults from . import __version__ from PyQt4...
<commit_before>#!/usr/bin/env python3 class VtImageViewer: def __init__(self): print("Woot!") <commit_msg>Add initial corrections to class Now the class loads and does not crash. I added the help information; however, it does not do anything yet.<commit_after>#!/usr/bin/env python3 from . import defau...
53204208c30780092f1e21ff0d4d66d7a12930ff
automat/_introspection.py
automat/_introspection.py
""" Python introspection helpers. """ from types import CodeType as code, FunctionType as function def copycode(template, changes): names = [ "argcount", "nlocals", "stacksize", "flags", "code", "consts", "names", "varnames", "filename", "name", "firstlineno", "lnotab", "freevars", "cellv...
""" Python introspection helpers. """ from types import CodeType as code, FunctionType as function def copycode(template, changes): names = [ "argcount", "nlocals", "stacksize", "flags", "code", "consts", "names", "varnames", "filename", "name", "firstlineno", "lnotab", "freevars", "cellv...
Add support for positional only arguments
Add support for positional only arguments PEP 570 adds "positional only" arguments to Python, which changes the code object constructor. This adds support for Python 3.8. Signed-off-by: Robert-André Mauchin <aa2d2b4191fcc92df7813016d4b511c37a1b9a82@gmail.com>
Python
mit
glyph/automat,glyph/Automat
""" Python introspection helpers. """ from types import CodeType as code, FunctionType as function def copycode(template, changes): names = [ "argcount", "nlocals", "stacksize", "flags", "code", "consts", "names", "varnames", "filename", "name", "firstlineno", "lnotab", "freevars", "cellv...
""" Python introspection helpers. """ from types import CodeType as code, FunctionType as function def copycode(template, changes): names = [ "argcount", "nlocals", "stacksize", "flags", "code", "consts", "names", "varnames", "filename", "name", "firstlineno", "lnotab", "freevars", "cellv...
<commit_before>""" Python introspection helpers. """ from types import CodeType as code, FunctionType as function def copycode(template, changes): names = [ "argcount", "nlocals", "stacksize", "flags", "code", "consts", "names", "varnames", "filename", "name", "firstlineno", "lnotab", "fr...
""" Python introspection helpers. """ from types import CodeType as code, FunctionType as function def copycode(template, changes): names = [ "argcount", "nlocals", "stacksize", "flags", "code", "consts", "names", "varnames", "filename", "name", "firstlineno", "lnotab", "freevars", "cellv...
""" Python introspection helpers. """ from types import CodeType as code, FunctionType as function def copycode(template, changes): names = [ "argcount", "nlocals", "stacksize", "flags", "code", "consts", "names", "varnames", "filename", "name", "firstlineno", "lnotab", "freevars", "cellv...
<commit_before>""" Python introspection helpers. """ from types import CodeType as code, FunctionType as function def copycode(template, changes): names = [ "argcount", "nlocals", "stacksize", "flags", "code", "consts", "names", "varnames", "filename", "name", "firstlineno", "lnotab", "fr...
4e15bc71205cf308c8338b2608213f439a48d5d6
swiftclient/version.py
swiftclient/version.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # # 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 ...
# Copyright 2012 OpenStack LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
Remove extraneous vim configuration comments
Remove extraneous vim configuration comments Remove line containing comment - # vim: tabstop=4 shiftwidth=4 softtabstop=4 Change-Id: I31e4ee4112285f0daa5f2dd50db0344f4876820d Closes-Bug:#1229324
Python
apache-2.0
ironsmile/python-swiftclient,varunarya10/python-swiftclient,pratikmallya/python-swiftclient,ironsmile/python-swiftclient,JioCloud/python-swiftclient,jeseem/python-swiftclient,krnflake/python-hubicclient,varunarya10/python-swiftclient,openstack/python-swiftclient,VyacheslavHashov/python-swiftclient,VyacheslavHashov/pyth...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # # 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 ...
# Copyright 2012 OpenStack LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # # 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/licens...
# Copyright 2012 OpenStack LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # # 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 ...
<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # # 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/licens...
52922fd4117640cc2a9ce6abd72079d43d5641f7
connected_components.py
connected_components.py
def get_connected_components(g): """ Return an array of arrays, each representing a connected component. :param dict g: graph represented as an adjacency list where all nodes are labeled 1 to n. :returns: array of arrays, each representing a connected component. """ connected_components = [] ...
from collections import deque def get_connected_components(g): """ Return an array of arrays, each representing a connected component. :param dict g: graph represented as an adjacency list where all nodes are labeled 1 to n. :returns: array of arrays, each representing a connected component. """ ...
Implement bfs for connected components
Implement bfs for connected components
Python
mit
stephtzhang/algorithms
def get_connected_components(g): """ Return an array of arrays, each representing a connected component. :param dict g: graph represented as an adjacency list where all nodes are labeled 1 to n. :returns: array of arrays, each representing a connected component. """ connected_components = [] ...
from collections import deque def get_connected_components(g): """ Return an array of arrays, each representing a connected component. :param dict g: graph represented as an adjacency list where all nodes are labeled 1 to n. :returns: array of arrays, each representing a connected component. """ ...
<commit_before>def get_connected_components(g): """ Return an array of arrays, each representing a connected component. :param dict g: graph represented as an adjacency list where all nodes are labeled 1 to n. :returns: array of arrays, each representing a connected component. """ connected_com...
from collections import deque def get_connected_components(g): """ Return an array of arrays, each representing a connected component. :param dict g: graph represented as an adjacency list where all nodes are labeled 1 to n. :returns: array of arrays, each representing a connected component. """ ...
def get_connected_components(g): """ Return an array of arrays, each representing a connected component. :param dict g: graph represented as an adjacency list where all nodes are labeled 1 to n. :returns: array of arrays, each representing a connected component. """ connected_components = [] ...
<commit_before>def get_connected_components(g): """ Return an array of arrays, each representing a connected component. :param dict g: graph represented as an adjacency list where all nodes are labeled 1 to n. :returns: array of arrays, each representing a connected component. """ connected_com...
dd1aa173c8d158f45af9eeff8d3cc58c0e272f12
solcast/radiation_estimated_actuals.py
solcast/radiation_estimated_actuals.py
from datetime import datetime, timedelta from urllib.parse import urljoin from isodate import parse_datetime, parse_duration import requests from solcast.base import Base class RadiationEstimatedActuals(Base): end_point = 'radiation/estimated_actuals' def __init__(self, latitude, longitude, *args, **kwargs...
from datetime import datetime, timedelta from urllib.parse import urljoin from isodate import parse_datetime, parse_duration import requests from solcast.base import Base class RadiationEstimatedActuals(Base): end_point = 'radiation/estimated_actuals' def __init__(self, latitude, longitude, *args, **kwargs...
Remove parameters that aren't required for an estimate actuals request
Remove parameters that aren't required for an estimate actuals request
Python
mit
cjtapper/solcast-py
from datetime import datetime, timedelta from urllib.parse import urljoin from isodate import parse_datetime, parse_duration import requests from solcast.base import Base class RadiationEstimatedActuals(Base): end_point = 'radiation/estimated_actuals' def __init__(self, latitude, longitude, *args, **kwargs...
from datetime import datetime, timedelta from urllib.parse import urljoin from isodate import parse_datetime, parse_duration import requests from solcast.base import Base class RadiationEstimatedActuals(Base): end_point = 'radiation/estimated_actuals' def __init__(self, latitude, longitude, *args, **kwargs...
<commit_before>from datetime import datetime, timedelta from urllib.parse import urljoin from isodate import parse_datetime, parse_duration import requests from solcast.base import Base class RadiationEstimatedActuals(Base): end_point = 'radiation/estimated_actuals' def __init__(self, latitude, longitude, ...
from datetime import datetime, timedelta from urllib.parse import urljoin from isodate import parse_datetime, parse_duration import requests from solcast.base import Base class RadiationEstimatedActuals(Base): end_point = 'radiation/estimated_actuals' def __init__(self, latitude, longitude, *args, **kwargs...
from datetime import datetime, timedelta from urllib.parse import urljoin from isodate import parse_datetime, parse_duration import requests from solcast.base import Base class RadiationEstimatedActuals(Base): end_point = 'radiation/estimated_actuals' def __init__(self, latitude, longitude, *args, **kwargs...
<commit_before>from datetime import datetime, timedelta from urllib.parse import urljoin from isodate import parse_datetime, parse_duration import requests from solcast.base import Base class RadiationEstimatedActuals(Base): end_point = 'radiation/estimated_actuals' def __init__(self, latitude, longitude, ...
7d14d51d138081c4f53ed185f54e975e0a074955
bookmarks/forms.py
bookmarks/forms.py
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField from wtforms.validators import DataRequired, Length, EqualTo, Email, URL class BookmarkForm(FlaskForm): b_id = StringField('Bookmark ID', [ Length(min=6, max=6, message='Bookmark ID m...
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField from wtforms.validators import (DataRequired, Length, EqualTo, Email, Regexp, URL) class BookmarkForm(FlaskForm): b_id = StringField('Bookmark ID', [ Length(min=6, ma...
Add regex validation check on bookmark form
Add regex validation check on bookmark form Checks that entry is only lowercase letters and numbers
Python
apache-2.0
byanofsky/bookmarks,byanofsky/bookmarks,byanofsky/bookmarks
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField from wtforms.validators import DataRequired, Length, EqualTo, Email, URL class BookmarkForm(FlaskForm): b_id = StringField('Bookmark ID', [ Length(min=6, max=6, message='Bookmark ID m...
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField from wtforms.validators import (DataRequired, Length, EqualTo, Email, Regexp, URL) class BookmarkForm(FlaskForm): b_id = StringField('Bookmark ID', [ Length(min=6, ma...
<commit_before>from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField from wtforms.validators import DataRequired, Length, EqualTo, Email, URL class BookmarkForm(FlaskForm): b_id = StringField('Bookmark ID', [ Length(min=6, max=6, message...
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField from wtforms.validators import (DataRequired, Length, EqualTo, Email, Regexp, URL) class BookmarkForm(FlaskForm): b_id = StringField('Bookmark ID', [ Length(min=6, ma...
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField from wtforms.validators import DataRequired, Length, EqualTo, Email, URL class BookmarkForm(FlaskForm): b_id = StringField('Bookmark ID', [ Length(min=6, max=6, message='Bookmark ID m...
<commit_before>from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField from wtforms.validators import DataRequired, Length, EqualTo, Email, URL class BookmarkForm(FlaskForm): b_id = StringField('Bookmark ID', [ Length(min=6, max=6, message...
f350b716157f787c7161b1e914e1210ff9ee4e2e
networkx/algorithms/traversal/__init__.py
networkx/algorithms/traversal/__init__.py
from .depth_first_search import * from .breadth_first_search import * from .edgedfs import edge_dfs
from .depth_first_search import * from .breadth_first_search import * from .edgedfs import *
Use import * in traversal submodule.
Use import * in traversal submodule.
Python
bsd-3-clause
ionanrozenfeld/networkx,RMKD/networkx,aureooms/networkx,beni55/networkx,wasade/networkx,ionanrozenfeld/networkx,jakevdp/networkx,ghdk/networkx,ghdk/networkx,ltiao/networkx,chrisnatali/networkx,jni/networkx,jni/networkx,dhimmel/networkx,michaelpacer/networkx,farhaanbukhsh/networkx,SanketDG/networkx,dhimmel/networkx,jake...
from .depth_first_search import * from .breadth_first_search import * from .edgedfs import edge_dfs Use import * in traversal submodule.
from .depth_first_search import * from .breadth_first_search import * from .edgedfs import *
<commit_before>from .depth_first_search import * from .breadth_first_search import * from .edgedfs import edge_dfs <commit_msg>Use import * in traversal submodule.<commit_after>
from .depth_first_search import * from .breadth_first_search import * from .edgedfs import *
from .depth_first_search import * from .breadth_first_search import * from .edgedfs import edge_dfs Use import * in traversal submodule.from .depth_first_search import * from .breadth_first_search import * from .edgedfs import *
<commit_before>from .depth_first_search import * from .breadth_first_search import * from .edgedfs import edge_dfs <commit_msg>Use import * in traversal submodule.<commit_after>from .depth_first_search import * from .breadth_first_search import * from .edgedfs import *
c4e0cc76e6051e59078e58e55647671f4acd75a3
neutron/conf/policies/floatingip_pools.py
neutron/conf/policies/floatingip_pools.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed u...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed u...
Implement secure RBAC for floating IP pools API
Implement secure RBAC for floating IP pools API This commit updates the policies for floating IP pools API to understand scope checking and account for a read-only role. This is part of a broader series of changes across OpenStack to provide a consistent RBAC experience and improve security. Partially-Implements blu...
Python
apache-2.0
mahak/neutron,openstack/neutron,openstack/neutron,mahak/neutron,mahak/neutron,openstack/neutron
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed u...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed u...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software #...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed u...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed u...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software #...
cb4eae7b76982c500817859b393cb9d4ea086685
gcframe/tests/urls.py
gcframe/tests/urls.py
# -*- coding: utf-8 -*- """ Simple urls for use in testing the gcframe app. """ from __future__ import unicode_literals from django.conf.urls.defaults import patterns, url from .views import normal, framed, exempt urlpatterns = patterns('', url(r'normal/$', normal, name='gcframe-test-normal'), url(r'frame...
# -*- coding: utf-8 -*- """ Simple urls for use in testing the gcframe app. """ from __future__ import unicode_literals # The defaults module is deprecated in Django 1.5, but necessary to # support Django 1.3. drop ``.defaults`` when dropping 1.3 support. from django.conf.urls.defaults import patterns, url from .vi...
Add note regarding URLs defaults module deprecation.
Add note regarding URLs defaults module deprecation.
Python
bsd-3-clause
benspaulding/django-gcframe
# -*- coding: utf-8 -*- """ Simple urls for use in testing the gcframe app. """ from __future__ import unicode_literals from django.conf.urls.defaults import patterns, url from .views import normal, framed, exempt urlpatterns = patterns('', url(r'normal/$', normal, name='gcframe-test-normal'), url(r'frame...
# -*- coding: utf-8 -*- """ Simple urls for use in testing the gcframe app. """ from __future__ import unicode_literals # The defaults module is deprecated in Django 1.5, but necessary to # support Django 1.3. drop ``.defaults`` when dropping 1.3 support. from django.conf.urls.defaults import patterns, url from .vi...
<commit_before># -*- coding: utf-8 -*- """ Simple urls for use in testing the gcframe app. """ from __future__ import unicode_literals from django.conf.urls.defaults import patterns, url from .views import normal, framed, exempt urlpatterns = patterns('', url(r'normal/$', normal, name='gcframe-test-normal'), ...
# -*- coding: utf-8 -*- """ Simple urls for use in testing the gcframe app. """ from __future__ import unicode_literals # The defaults module is deprecated in Django 1.5, but necessary to # support Django 1.3. drop ``.defaults`` when dropping 1.3 support. from django.conf.urls.defaults import patterns, url from .vi...
# -*- coding: utf-8 -*- """ Simple urls for use in testing the gcframe app. """ from __future__ import unicode_literals from django.conf.urls.defaults import patterns, url from .views import normal, framed, exempt urlpatterns = patterns('', url(r'normal/$', normal, name='gcframe-test-normal'), url(r'frame...
<commit_before># -*- coding: utf-8 -*- """ Simple urls for use in testing the gcframe app. """ from __future__ import unicode_literals from django.conf.urls.defaults import patterns, url from .views import normal, framed, exempt urlpatterns = patterns('', url(r'normal/$', normal, name='gcframe-test-normal'), ...
fbb9824e019b5211abd80ade9445afebc036bb27
reporting/shellReporter.py
reporting/shellReporter.py
#!/usr/bin/env python3 import json class ShellReporter: def report_categories(self, categories): to_dict = lambda x: { '{#TOOL}}': '{:s}'.format(x.tool), '{#TYPE}': '{:s}'.format(x.context) } category_dict_list = list(map(to_dict, categories)) print(json.dumps(category_dict_list)) def...
#!/usr/bin/env python3 import json class ShellReporter: def report_categories(self, categories): to_dict = lambda x: { 'TOOL': '{:s}'.format(x.tool), 'CONTEXT': '{:s}'.format(x.context) } category_dict_list = list(map(to_dict, categories)) print(json.dumps(category_dict_list)) def rep...
Rename category fields in shell reporter
Rename category fields in shell reporter
Python
mit
luigiberrettini/build-deploy-stats
#!/usr/bin/env python3 import json class ShellReporter: def report_categories(self, categories): to_dict = lambda x: { '{#TOOL}}': '{:s}'.format(x.tool), '{#TYPE}': '{:s}'.format(x.context) } category_dict_list = list(map(to_dict, categories)) print(json.dumps(category_dict_list)) def...
#!/usr/bin/env python3 import json class ShellReporter: def report_categories(self, categories): to_dict = lambda x: { 'TOOL': '{:s}'.format(x.tool), 'CONTEXT': '{:s}'.format(x.context) } category_dict_list = list(map(to_dict, categories)) print(json.dumps(category_dict_list)) def rep...
<commit_before>#!/usr/bin/env python3 import json class ShellReporter: def report_categories(self, categories): to_dict = lambda x: { '{#TOOL}}': '{:s}'.format(x.tool), '{#TYPE}': '{:s}'.format(x.context) } category_dict_list = list(map(to_dict, categories)) print(json.dumps(category_dict_...
#!/usr/bin/env python3 import json class ShellReporter: def report_categories(self, categories): to_dict = lambda x: { 'TOOL': '{:s}'.format(x.tool), 'CONTEXT': '{:s}'.format(x.context) } category_dict_list = list(map(to_dict, categories)) print(json.dumps(category_dict_list)) def rep...
#!/usr/bin/env python3 import json class ShellReporter: def report_categories(self, categories): to_dict = lambda x: { '{#TOOL}}': '{:s}'.format(x.tool), '{#TYPE}': '{:s}'.format(x.context) } category_dict_list = list(map(to_dict, categories)) print(json.dumps(category_dict_list)) def...
<commit_before>#!/usr/bin/env python3 import json class ShellReporter: def report_categories(self, categories): to_dict = lambda x: { '{#TOOL}}': '{:s}'.format(x.tool), '{#TYPE}': '{:s}'.format(x.context) } category_dict_list = list(map(to_dict, categories)) print(json.dumps(category_dict_...
0a7104680d1aeaa7096f9bb7603cd63d46efb480
wikitables/util.py
wikitables/util.py
import sys import json def ftag(t): return lambda node: node.tag == t def ustr(s): if sys.version_info < (3, 0): #py2 return unicode(s).encode('utf-8') else: return str(s) class TableJSONEncoder(json.JSONEncoder): def default(self, obj): if hasattr(obj, '__json__'): ...
import sys import json def ftag(t): return lambda node: node.tag == t def ustr(s): if sys.version_info < (3, 0): #py2 try: return unicode(s).encode('utf-8') except UnicodeDecodeError: return str(s) else: return str(s) class TableJSONEncoder(json.JSO...
Add try catch to avoid unicode decode exception in python 2.7.10
Add try catch to avoid unicode decode exception in python 2.7.10
Python
mit
bcicen/wikitables
import sys import json def ftag(t): return lambda node: node.tag == t def ustr(s): if sys.version_info < (3, 0): #py2 return unicode(s).encode('utf-8') else: return str(s) class TableJSONEncoder(json.JSONEncoder): def default(self, obj): if hasattr(obj, '__json__'): ...
import sys import json def ftag(t): return lambda node: node.tag == t def ustr(s): if sys.version_info < (3, 0): #py2 try: return unicode(s).encode('utf-8') except UnicodeDecodeError: return str(s) else: return str(s) class TableJSONEncoder(json.JSO...
<commit_before>import sys import json def ftag(t): return lambda node: node.tag == t def ustr(s): if sys.version_info < (3, 0): #py2 return unicode(s).encode('utf-8') else: return str(s) class TableJSONEncoder(json.JSONEncoder): def default(self, obj): if hasattr(obj, ...
import sys import json def ftag(t): return lambda node: node.tag == t def ustr(s): if sys.version_info < (3, 0): #py2 try: return unicode(s).encode('utf-8') except UnicodeDecodeError: return str(s) else: return str(s) class TableJSONEncoder(json.JSO...
import sys import json def ftag(t): return lambda node: node.tag == t def ustr(s): if sys.version_info < (3, 0): #py2 return unicode(s).encode('utf-8') else: return str(s) class TableJSONEncoder(json.JSONEncoder): def default(self, obj): if hasattr(obj, '__json__'): ...
<commit_before>import sys import json def ftag(t): return lambda node: node.tag == t def ustr(s): if sys.version_info < (3, 0): #py2 return unicode(s).encode('utf-8') else: return str(s) class TableJSONEncoder(json.JSONEncoder): def default(self, obj): if hasattr(obj, ...
560e441c64943500a032da8c4f81aef1c3354f84
hado/auth_backends.py
hado/auth_backends.py
from django.conf import settings from django.contrib.auth.backends import ModelBackend from django.core.exceptions import ImproperlyConfigured from django.db.models import get_model class UserModelBackend(ModelBackend): def authenticate(self, username=None, password=None): try: user = self.user_class.objects.get...
from django.conf import settings from django.contrib.auth.backends import ModelBackend from django.core.exceptions import ImproperlyConfigured from django.db.models import get_model from django.contrib.auth.models import User as oUser from hado.models import User as cUser class UserModelBackend(ModelBackend): def au...
Fix for createsuperuser not creating a custom User model, and hence breaking AdminSite logins on setup
Fix for createsuperuser not creating a custom User model, and hence breaking AdminSite logins on setup Since we're using a custom Auth Backend as well, we trap the authenticate() call. If we can't find the requested user in our custom User, we fall back to checking the vanilla Django Users. If we find one there, and i...
Python
mit
hackerspacesg/hackdo
from django.conf import settings from django.contrib.auth.backends import ModelBackend from django.core.exceptions import ImproperlyConfigured from django.db.models import get_model class UserModelBackend(ModelBackend): def authenticate(self, username=None, password=None): try: user = self.user_class.objects.get...
from django.conf import settings from django.contrib.auth.backends import ModelBackend from django.core.exceptions import ImproperlyConfigured from django.db.models import get_model from django.contrib.auth.models import User as oUser from hado.models import User as cUser class UserModelBackend(ModelBackend): def au...
<commit_before>from django.conf import settings from django.contrib.auth.backends import ModelBackend from django.core.exceptions import ImproperlyConfigured from django.db.models import get_model class UserModelBackend(ModelBackend): def authenticate(self, username=None, password=None): try: user = self.user_cl...
from django.conf import settings from django.contrib.auth.backends import ModelBackend from django.core.exceptions import ImproperlyConfigured from django.db.models import get_model from django.contrib.auth.models import User as oUser from hado.models import User as cUser class UserModelBackend(ModelBackend): def au...
from django.conf import settings from django.contrib.auth.backends import ModelBackend from django.core.exceptions import ImproperlyConfigured from django.db.models import get_model class UserModelBackend(ModelBackend): def authenticate(self, username=None, password=None): try: user = self.user_class.objects.get...
<commit_before>from django.conf import settings from django.contrib.auth.backends import ModelBackend from django.core.exceptions import ImproperlyConfigured from django.db.models import get_model class UserModelBackend(ModelBackend): def authenticate(self, username=None, password=None): try: user = self.user_cl...
c97339e3a121c48ec3eed38e1bf901e2bf1d323c
src/proposals/resources.py
src/proposals/resources.py
from import_export import fields, resources from .models import TalkProposal class TalkProposalResource(resources.ModelResource): name = fields.Field(attribute='submitter__speaker_name') email = fields.Field(attribute='submitter__email') class Meta: model = TalkProposal fields = [ ...
from import_export import fields, resources from .models import TalkProposal class TalkProposalResource(resources.ModelResource): name = fields.Field(attribute='submitter__speaker_name') email = fields.Field(attribute='submitter__email') class Meta: model = TalkProposal fields = [ ...
Add language field to proposal export
Add language field to proposal export
Python
mit
pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016
from import_export import fields, resources from .models import TalkProposal class TalkProposalResource(resources.ModelResource): name = fields.Field(attribute='submitter__speaker_name') email = fields.Field(attribute='submitter__email') class Meta: model = TalkProposal fields = [ ...
from import_export import fields, resources from .models import TalkProposal class TalkProposalResource(resources.ModelResource): name = fields.Field(attribute='submitter__speaker_name') email = fields.Field(attribute='submitter__email') class Meta: model = TalkProposal fields = [ ...
<commit_before>from import_export import fields, resources from .models import TalkProposal class TalkProposalResource(resources.ModelResource): name = fields.Field(attribute='submitter__speaker_name') email = fields.Field(attribute='submitter__email') class Meta: model = TalkProposal f...
from import_export import fields, resources from .models import TalkProposal class TalkProposalResource(resources.ModelResource): name = fields.Field(attribute='submitter__speaker_name') email = fields.Field(attribute='submitter__email') class Meta: model = TalkProposal fields = [ ...
from import_export import fields, resources from .models import TalkProposal class TalkProposalResource(resources.ModelResource): name = fields.Field(attribute='submitter__speaker_name') email = fields.Field(attribute='submitter__email') class Meta: model = TalkProposal fields = [ ...
<commit_before>from import_export import fields, resources from .models import TalkProposal class TalkProposalResource(resources.ModelResource): name = fields.Field(attribute='submitter__speaker_name') email = fields.Field(attribute='submitter__email') class Meta: model = TalkProposal f...
be7fded7f6c9fbc5d370849cc22113c30ab20fe7
astrobin_apps_premium/templatetags/astrobin_apps_premium_tags.py
astrobin_apps_premium/templatetags/astrobin_apps_premium_tags.py
# Python import urllib # Django from django.conf import settings from django.db.models import Q from django.template import Library, Node # Third party from subscription.models import Subscription, UserSubscription # This app from astrobin_apps_premium.utils import premium_get_valid_usersubscription register = Libr...
# Python import urllib # Django from django.conf import settings from django.db.models import Q from django.template import Library, Node # Third party from subscription.models import Subscription, UserSubscription # This app from astrobin_apps_premium.utils import premium_get_valid_usersubscription register = Libr...
Remove stray debug log message
Remove stray debug log message
Python
agpl-3.0
astrobin/astrobin,astrobin/astrobin,astrobin/astrobin,astrobin/astrobin
# Python import urllib # Django from django.conf import settings from django.db.models import Q from django.template import Library, Node # Third party from subscription.models import Subscription, UserSubscription # This app from astrobin_apps_premium.utils import premium_get_valid_usersubscription register = Libr...
# Python import urllib # Django from django.conf import settings from django.db.models import Q from django.template import Library, Node # Third party from subscription.models import Subscription, UserSubscription # This app from astrobin_apps_premium.utils import premium_get_valid_usersubscription register = Libr...
<commit_before># Python import urllib # Django from django.conf import settings from django.db.models import Q from django.template import Library, Node # Third party from subscription.models import Subscription, UserSubscription # This app from astrobin_apps_premium.utils import premium_get_valid_usersubscription ...
# Python import urllib # Django from django.conf import settings from django.db.models import Q from django.template import Library, Node # Third party from subscription.models import Subscription, UserSubscription # This app from astrobin_apps_premium.utils import premium_get_valid_usersubscription register = Libr...
# Python import urllib # Django from django.conf import settings from django.db.models import Q from django.template import Library, Node # Third party from subscription.models import Subscription, UserSubscription # This app from astrobin_apps_premium.utils import premium_get_valid_usersubscription register = Libr...
<commit_before># Python import urllib # Django from django.conf import settings from django.db.models import Q from django.template import Library, Node # Third party from subscription.models import Subscription, UserSubscription # This app from astrobin_apps_premium.utils import premium_get_valid_usersubscription ...
b40e1f42af2d392f821ec0da41717d9d14457f8d
src/serializer/__init__.py
src/serializer/__init__.py
from htmlserializer import HTMLSerializer from xhtmlserializer import XHTMLSerializer
import os.path __path__.append(os.path.dirname(__path__[0])) from htmlserializer import HTMLSerializer from xhtmlserializer import XHTMLSerializer
Fix imports now that the serializer is in its own sub-package.
Fix imports now that the serializer is in its own sub-package. --HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%40800
Python
mit
mgilson/html5lib-python,mgilson/html5lib-python,ordbogen/html5lib-python,html5lib/html5lib-python,alex/html5lib-python,alex/html5lib-python,dstufft/html5lib-python,dstufft/html5lib-python,mindw/html5lib-python,gsnedders/html5lib-python,mgilson/html5lib-python,ordbogen/html5lib-python,mindw/html5lib-python,gsnedders/htm...
from htmlserializer import HTMLSerializer from xhtmlserializer import XHTMLSerializer Fix imports now that the serializer is in its own sub-package. --HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%40800
import os.path __path__.append(os.path.dirname(__path__[0])) from htmlserializer import HTMLSerializer from xhtmlserializer import XHTMLSerializer
<commit_before>from htmlserializer import HTMLSerializer from xhtmlserializer import XHTMLSerializer <commit_msg>Fix imports now that the serializer is in its own sub-package. --HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%40800<commit_after>
import os.path __path__.append(os.path.dirname(__path__[0])) from htmlserializer import HTMLSerializer from xhtmlserializer import XHTMLSerializer
from htmlserializer import HTMLSerializer from xhtmlserializer import XHTMLSerializer Fix imports now that the serializer is in its own sub-package. --HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%40800 import os.path __path__.append(os.path.dirname(__path__[0])) from htmlserializer...
<commit_before>from htmlserializer import HTMLSerializer from xhtmlserializer import XHTMLSerializer <commit_msg>Fix imports now that the serializer is in its own sub-package. --HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%40800<commit_after> import os.path __path__.append(os.path.d...
4c4b5a99e2fd02eff3451bf6c3a761163794a8ce
imageofmodel/admin.py
imageofmodel/admin.py
# -*- coding: utf-8 -*- from django.contrib import admin from django import forms from django.contrib.contenttypes.generic import GenericTabularInline, BaseGenericInlineFormSet from models import ImageOfModel class ImageFormset(BaseGenericInlineFormSet): def clean(self): if not self.files.values() a...
# -*- coding: utf-8 -*- from django.contrib import admin from django import forms from django.contrib.contenttypes.generic import GenericTabularInline, BaseGenericInlineFormSet from models import ImageOfModel class ImageFormset(BaseGenericInlineFormSet): def clean(self): if not self.files.values() a...
Add class OptionalImageOfModelInline for optional images
[+] Add class OptionalImageOfModelInline for optional images
Python
bsd-3-clause
vixh/django-imageofmodel
# -*- coding: utf-8 -*- from django.contrib import admin from django import forms from django.contrib.contenttypes.generic import GenericTabularInline, BaseGenericInlineFormSet from models import ImageOfModel class ImageFormset(BaseGenericInlineFormSet): def clean(self): if not self.files.values() a...
# -*- coding: utf-8 -*- from django.contrib import admin from django import forms from django.contrib.contenttypes.generic import GenericTabularInline, BaseGenericInlineFormSet from models import ImageOfModel class ImageFormset(BaseGenericInlineFormSet): def clean(self): if not self.files.values() a...
<commit_before># -*- coding: utf-8 -*- from django.contrib import admin from django import forms from django.contrib.contenttypes.generic import GenericTabularInline, BaseGenericInlineFormSet from models import ImageOfModel class ImageFormset(BaseGenericInlineFormSet): def clean(self): if not self.f...
# -*- coding: utf-8 -*- from django.contrib import admin from django import forms from django.contrib.contenttypes.generic import GenericTabularInline, BaseGenericInlineFormSet from models import ImageOfModel class ImageFormset(BaseGenericInlineFormSet): def clean(self): if not self.files.values() a...
# -*- coding: utf-8 -*- from django.contrib import admin from django import forms from django.contrib.contenttypes.generic import GenericTabularInline, BaseGenericInlineFormSet from models import ImageOfModel class ImageFormset(BaseGenericInlineFormSet): def clean(self): if not self.files.values() a...
<commit_before># -*- coding: utf-8 -*- from django.contrib import admin from django import forms from django.contrib.contenttypes.generic import GenericTabularInline, BaseGenericInlineFormSet from models import ImageOfModel class ImageFormset(BaseGenericInlineFormSet): def clean(self): if not self.f...
7e80f197d6cd914b9d43f0bc1d9f84e3d226a480
fuse_util.py
fuse_util.py
import sublime import os def getSetting(key,default=None): s = sublime.load_settings("Fuse.sublime-settings") return s.get(key, default) def getFusePathFromSettings(): path = getSetting("fuse_path_override") if path == "" or path == None: return "fuse" else: return path+"/fuse" def setSetting(key,value): s...
import sublime import os def getSetting(key,default=None): s = sublime.load_settings("Fuse.sublime-settings") return s.get(key, default) def getFusePathFromSettings(): path = getSetting("fuse_path_override") if path == "" or path == None: return "fuse" else: return path+"/fuse" def setSetting(key,value): s...
Fix case where there are no extension.
Fix case where there are no extension.
Python
mit
fusetools/Fuse.SublimePlugin,fusetools/Fuse.SublimePlugin
import sublime import os def getSetting(key,default=None): s = sublime.load_settings("Fuse.sublime-settings") return s.get(key, default) def getFusePathFromSettings(): path = getSetting("fuse_path_override") if path == "" or path == None: return "fuse" else: return path+"/fuse" def setSetting(key,value): s...
import sublime import os def getSetting(key,default=None): s = sublime.load_settings("Fuse.sublime-settings") return s.get(key, default) def getFusePathFromSettings(): path = getSetting("fuse_path_override") if path == "" or path == None: return "fuse" else: return path+"/fuse" def setSetting(key,value): s...
<commit_before>import sublime import os def getSetting(key,default=None): s = sublime.load_settings("Fuse.sublime-settings") return s.get(key, default) def getFusePathFromSettings(): path = getSetting("fuse_path_override") if path == "" or path == None: return "fuse" else: return path+"/fuse" def setSetting...
import sublime import os def getSetting(key,default=None): s = sublime.load_settings("Fuse.sublime-settings") return s.get(key, default) def getFusePathFromSettings(): path = getSetting("fuse_path_override") if path == "" or path == None: return "fuse" else: return path+"/fuse" def setSetting(key,value): s...
import sublime import os def getSetting(key,default=None): s = sublime.load_settings("Fuse.sublime-settings") return s.get(key, default) def getFusePathFromSettings(): path = getSetting("fuse_path_override") if path == "" or path == None: return "fuse" else: return path+"/fuse" def setSetting(key,value): s...
<commit_before>import sublime import os def getSetting(key,default=None): s = sublime.load_settings("Fuse.sublime-settings") return s.get(key, default) def getFusePathFromSettings(): path = getSetting("fuse_path_override") if path == "" or path == None: return "fuse" else: return path+"/fuse" def setSetting...
a8a088828eee6938c56ce6f2aaecc7e776a8cb23
swift/obj/dedupe/fp_index.py
swift/obj/dedupe/fp_index.py
__author__ = 'mjwtom' import sqlite3 import unittest class fp_index: def __init__(self, name): if name.endswith('.db'): self.name = name else: self.name = name + '.db' self.conn = sqlite3.connect(name) self.c = self.conn.cursor() self.c.execute('''C...
__author__ = 'mjwtom' import sqlite3 import unittest class Fp_Index(object): def __init__(self, name): if name.endswith('.db'): self.name = name else: self.name = name + '.db' self.conn = sqlite3.connect(name) self.c = self.conn.cursor() self.c.exec...
Use database to detect the duplication. But the md5 value does not match. Need to add some code here
Use database to detect the duplication. But the md5 value does not match. Need to add some code here
Python
apache-2.0
mjwtom/swift,mjwtom/swift
__author__ = 'mjwtom' import sqlite3 import unittest class fp_index: def __init__(self, name): if name.endswith('.db'): self.name = name else: self.name = name + '.db' self.conn = sqlite3.connect(name) self.c = self.conn.cursor() self.c.execute('''C...
__author__ = 'mjwtom' import sqlite3 import unittest class Fp_Index(object): def __init__(self, name): if name.endswith('.db'): self.name = name else: self.name = name + '.db' self.conn = sqlite3.connect(name) self.c = self.conn.cursor() self.c.exec...
<commit_before>__author__ = 'mjwtom' import sqlite3 import unittest class fp_index: def __init__(self, name): if name.endswith('.db'): self.name = name else: self.name = name + '.db' self.conn = sqlite3.connect(name) self.c = self.conn.cursor() self...
__author__ = 'mjwtom' import sqlite3 import unittest class Fp_Index(object): def __init__(self, name): if name.endswith('.db'): self.name = name else: self.name = name + '.db' self.conn = sqlite3.connect(name) self.c = self.conn.cursor() self.c.exec...
__author__ = 'mjwtom' import sqlite3 import unittest class fp_index: def __init__(self, name): if name.endswith('.db'): self.name = name else: self.name = name + '.db' self.conn = sqlite3.connect(name) self.c = self.conn.cursor() self.c.execute('''C...
<commit_before>__author__ = 'mjwtom' import sqlite3 import unittest class fp_index: def __init__(self, name): if name.endswith('.db'): self.name = name else: self.name = name + '.db' self.conn = sqlite3.connect(name) self.c = self.conn.cursor() self...
8925c3a827659e1983827368948e95e764a40585
utf9/__init__.py
utf9/__init__.py
# -*- coding: utf-8 -*- from bitarray import bitarray as _bitarray def utf9encode(string): bits = _bitarray() for char in string: for idx, byte in enumerate(char.encode('utf-8')): bits.append(idx) bits.extend('{0:b}'.format(ord(byte)).zfill(8)) return bits.tobytes() def ut...
# -*- coding: utf-8 -*- """Encode and decode text with UTF-9. On April 1st 2005, IEEE released the RFC4042 "UTF-9 and UTF-18 Efficient Transformation Formats of Unicode" (https://www.ietf.org/rfc/rfc4042.txt) > The current representation formats for Unicode (UTF-7, UTF-8, UTF-16) > are not storage and computation eff...
Add module and functions docstring
Add module and functions docstring
Python
mit
enricobacis/utf9
# -*- coding: utf-8 -*- from bitarray import bitarray as _bitarray def utf9encode(string): bits = _bitarray() for char in string: for idx, byte in enumerate(char.encode('utf-8')): bits.append(idx) bits.extend('{0:b}'.format(ord(byte)).zfill(8)) return bits.tobytes() def ut...
# -*- coding: utf-8 -*- """Encode and decode text with UTF-9. On April 1st 2005, IEEE released the RFC4042 "UTF-9 and UTF-18 Efficient Transformation Formats of Unicode" (https://www.ietf.org/rfc/rfc4042.txt) > The current representation formats for Unicode (UTF-7, UTF-8, UTF-16) > are not storage and computation eff...
<commit_before># -*- coding: utf-8 -*- from bitarray import bitarray as _bitarray def utf9encode(string): bits = _bitarray() for char in string: for idx, byte in enumerate(char.encode('utf-8')): bits.append(idx) bits.extend('{0:b}'.format(ord(byte)).zfill(8)) return bits.to...
# -*- coding: utf-8 -*- """Encode and decode text with UTF-9. On April 1st 2005, IEEE released the RFC4042 "UTF-9 and UTF-18 Efficient Transformation Formats of Unicode" (https://www.ietf.org/rfc/rfc4042.txt) > The current representation formats for Unicode (UTF-7, UTF-8, UTF-16) > are not storage and computation eff...
# -*- coding: utf-8 -*- from bitarray import bitarray as _bitarray def utf9encode(string): bits = _bitarray() for char in string: for idx, byte in enumerate(char.encode('utf-8')): bits.append(idx) bits.extend('{0:b}'.format(ord(byte)).zfill(8)) return bits.tobytes() def ut...
<commit_before># -*- coding: utf-8 -*- from bitarray import bitarray as _bitarray def utf9encode(string): bits = _bitarray() for char in string: for idx, byte in enumerate(char.encode('utf-8')): bits.append(idx) bits.extend('{0:b}'.format(ord(byte)).zfill(8)) return bits.to...
7280bb895284986e141a4660d9f2616b7d2aa99c
runtests.py
runtests.py
import sys try: from django.conf import settings settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, ROOT_URLCONF="watchman.urls", INSTALLED_APPS=[ ...
import sys try: from django.conf import settings settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, ROOT_URLCONF="watchman.urls", INSTALLED_APPS=[ ...
Add newline at end of file
Add newline at end of file
Python
bsd-3-clause
blag/django-watchman,blag/django-watchman,mwarkentin/django-watchman,ulope/django-watchman,JBKahn/django-watchman,gerlachry/django-watchman,ulope/django-watchman,mwarkentin/django-watchman,JBKahn/django-watchman,gerlachry/django-watchman
import sys try: from django.conf import settings settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, ROOT_URLCONF="watchman.urls", INSTALLED_APPS=[ ...
import sys try: from django.conf import settings settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, ROOT_URLCONF="watchman.urls", INSTALLED_APPS=[ ...
<commit_before>import sys try: from django.conf import settings settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, ROOT_URLCONF="watchman.urls", INSTALLED_APP...
import sys try: from django.conf import settings settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, ROOT_URLCONF="watchman.urls", INSTALLED_APPS=[ ...
import sys try: from django.conf import settings settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, ROOT_URLCONF="watchman.urls", INSTALLED_APPS=[ ...
<commit_before>import sys try: from django.conf import settings settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, ROOT_URLCONF="watchman.urls", INSTALLED_APP...
8bdbcc235a4f7615c0ecbd22f5e6c764feb21e47
scripts/update_acq_stats.py
scripts/update_acq_stats.py
#!/usr/bin/env python import mica.stats.acq_stats mica.stats.acq_stats.update() import os table_file = mica.stats.acq_stats.table_file file_stat = os.stat(table_file) if file_stat.st_size > 50e6: print """ Warning: {tfile} is larger than 50MB and may need Warning: to be manually repacked (i.e.): Warning: Warning:...
#!/usr/bin/env python import mica.stats.acq_stats mica.stats.acq_stats.main() import os table_file = mica.stats.acq_stats.table_file file_stat = os.stat(table_file) if file_stat.st_size > 50e6: print """ Warning: {tfile} is larger than 50MB and may need Warning: to be manually repacked (i.e.): Warning: Warning: p...
Call main() to run update script
Call main() to run update script
Python
bsd-3-clause
sot/mica,sot/mica
#!/usr/bin/env python import mica.stats.acq_stats mica.stats.acq_stats.update() import os table_file = mica.stats.acq_stats.table_file file_stat = os.stat(table_file) if file_stat.st_size > 50e6: print """ Warning: {tfile} is larger than 50MB and may need Warning: to be manually repacked (i.e.): Warning: Warning:...
#!/usr/bin/env python import mica.stats.acq_stats mica.stats.acq_stats.main() import os table_file = mica.stats.acq_stats.table_file file_stat = os.stat(table_file) if file_stat.st_size > 50e6: print """ Warning: {tfile} is larger than 50MB and may need Warning: to be manually repacked (i.e.): Warning: Warning: p...
<commit_before>#!/usr/bin/env python import mica.stats.acq_stats mica.stats.acq_stats.update() import os table_file = mica.stats.acq_stats.table_file file_stat = os.stat(table_file) if file_stat.st_size > 50e6: print """ Warning: {tfile} is larger than 50MB and may need Warning: to be manually repacked (i.e.): Wa...
#!/usr/bin/env python import mica.stats.acq_stats mica.stats.acq_stats.main() import os table_file = mica.stats.acq_stats.table_file file_stat = os.stat(table_file) if file_stat.st_size > 50e6: print """ Warning: {tfile} is larger than 50MB and may need Warning: to be manually repacked (i.e.): Warning: Warning: p...
#!/usr/bin/env python import mica.stats.acq_stats mica.stats.acq_stats.update() import os table_file = mica.stats.acq_stats.table_file file_stat = os.stat(table_file) if file_stat.st_size > 50e6: print """ Warning: {tfile} is larger than 50MB and may need Warning: to be manually repacked (i.e.): Warning: Warning:...
<commit_before>#!/usr/bin/env python import mica.stats.acq_stats mica.stats.acq_stats.update() import os table_file = mica.stats.acq_stats.table_file file_stat = os.stat(table_file) if file_stat.st_size > 50e6: print """ Warning: {tfile} is larger than 50MB and may need Warning: to be manually repacked (i.e.): Wa...
15d2f98980b5a2baea5e6c55cc2d42c848a19e63
axes/tests/test_models.py
axes/tests/test_models.py
from django.test import TestCase class MigrationsCheck(TestCase): def setUp(self): from django.utils import translation self.saved_locale = translation.get_language() translation.deactivate_all() def tearDown(self): if self.saved_locale is not None: from django.uti...
from django.apps.registry import apps from django.db import connection from django.db.migrations.autodetector import MigrationAutodetector from django.db.migrations.executor import MigrationExecutor from django.db.migrations.state import ProjectState from django.test import TestCase from django.utils import translation...
Clean up database test case imports
Clean up database test case imports Signed-off-by: Aleksi Häkli <44cb6a94c0d20644d531e2be44779b52833cdcd2@iki.fi>
Python
mit
django-pci/django-axes,jazzband/django-axes
from django.test import TestCase class MigrationsCheck(TestCase): def setUp(self): from django.utils import translation self.saved_locale = translation.get_language() translation.deactivate_all() def tearDown(self): if self.saved_locale is not None: from django.uti...
from django.apps.registry import apps from django.db import connection from django.db.migrations.autodetector import MigrationAutodetector from django.db.migrations.executor import MigrationExecutor from django.db.migrations.state import ProjectState from django.test import TestCase from django.utils import translation...
<commit_before>from django.test import TestCase class MigrationsCheck(TestCase): def setUp(self): from django.utils import translation self.saved_locale = translation.get_language() translation.deactivate_all() def tearDown(self): if self.saved_locale is not None: ...
from django.apps.registry import apps from django.db import connection from django.db.migrations.autodetector import MigrationAutodetector from django.db.migrations.executor import MigrationExecutor from django.db.migrations.state import ProjectState from django.test import TestCase from django.utils import translation...
from django.test import TestCase class MigrationsCheck(TestCase): def setUp(self): from django.utils import translation self.saved_locale = translation.get_language() translation.deactivate_all() def tearDown(self): if self.saved_locale is not None: from django.uti...
<commit_before>from django.test import TestCase class MigrationsCheck(TestCase): def setUp(self): from django.utils import translation self.saved_locale = translation.get_language() translation.deactivate_all() def tearDown(self): if self.saved_locale is not None: ...
e0ffee5d5d6057a6dd776b02fea33c6509eb945c
signac/contrib/formats.py
signac/contrib/formats.py
# Copyright (c) 2016 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the BSD 3-Clause License. import logging logger = logging.getLogger(__name__) class BasicFormat(object): pass class FileFormat(BasicFormat): def __init__(self, file_object): self...
# Copyright (c) 2016 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the BSD 3-Clause License. TextFile = 'TextFile'
Replace TextFile class definition with str constant.
Replace TextFile class definition with str constant.
Python
bsd-3-clause
csadorf/signac,csadorf/signac
# Copyright (c) 2016 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the BSD 3-Clause License. import logging logger = logging.getLogger(__name__) class BasicFormat(object): pass class FileFormat(BasicFormat): def __init__(self, file_object): self...
# Copyright (c) 2016 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the BSD 3-Clause License. TextFile = 'TextFile'
<commit_before># Copyright (c) 2016 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the BSD 3-Clause License. import logging logger = logging.getLogger(__name__) class BasicFormat(object): pass class FileFormat(BasicFormat): def __init__(self, file_object...
# Copyright (c) 2016 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the BSD 3-Clause License. TextFile = 'TextFile'
# Copyright (c) 2016 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the BSD 3-Clause License. import logging logger = logging.getLogger(__name__) class BasicFormat(object): pass class FileFormat(BasicFormat): def __init__(self, file_object): self...
<commit_before># Copyright (c) 2016 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the BSD 3-Clause License. import logging logger = logging.getLogger(__name__) class BasicFormat(object): pass class FileFormat(BasicFormat): def __init__(self, file_object...
3d3319b96475f40de6dd4e4cf39cdae323fd3b3d
arcutils/templatetags/arc.py
arcutils/templatetags/arc.py
from bootstrapform.templatetags.bootstrap import * from django.template import Template, Context, Library from django.template.loader import get_template from django.utils.safestring import mark_safe register = Library()
from django import template from django.template.defaulttags import url from django.core.urlresolvers import reverse from django.conf import settings from django.template import Node, Variable, VariableDoesNotExist from django.utils.html import conditional_escape from django.utils.safestring import mark_safe register ...
Add a bunch of template tags
Add a bunch of template tags
Python
mit
PSU-OIT-ARC/django-arcutils,wylee/django-arcutils,PSU-OIT-ARC/django-arcutils,kfarr2/django-arcutils,wylee/django-arcutils,mdj2/django-arcutils,mdj2/django-arcutils
from bootstrapform.templatetags.bootstrap import * from django.template import Template, Context, Library from django.template.loader import get_template from django.utils.safestring import mark_safe register = Library() Add a bunch of template tags
from django import template from django.template.defaulttags import url from django.core.urlresolvers import reverse from django.conf import settings from django.template import Node, Variable, VariableDoesNotExist from django.utils.html import conditional_escape from django.utils.safestring import mark_safe register ...
<commit_before>from bootstrapform.templatetags.bootstrap import * from django.template import Template, Context, Library from django.template.loader import get_template from django.utils.safestring import mark_safe register = Library() <commit_msg>Add a bunch of template tags<commit_after>
from django import template from django.template.defaulttags import url from django.core.urlresolvers import reverse from django.conf import settings from django.template import Node, Variable, VariableDoesNotExist from django.utils.html import conditional_escape from django.utils.safestring import mark_safe register ...
from bootstrapform.templatetags.bootstrap import * from django.template import Template, Context, Library from django.template.loader import get_template from django.utils.safestring import mark_safe register = Library() Add a bunch of template tagsfrom django import template from django.template.defaulttags import ur...
<commit_before>from bootstrapform.templatetags.bootstrap import * from django.template import Template, Context, Library from django.template.loader import get_template from django.utils.safestring import mark_safe register = Library() <commit_msg>Add a bunch of template tags<commit_after>from django import template f...
89a95df295036a9fc55ae061eac8e5921f85e095
lib/py/src/metrics.py
lib/py/src/metrics.py
import os import datetime import tornado.gen import statsd if os.environ.get("STATSD_URL", None): ip, port = os.environ.get("STATSD_URL").split(':') statsd_client = statsd.Client(ip, int(port)) else: statsd_client = None def instrument(name): def instrument_wrapper(fn): @tornado.gen.coroutine...
import os import datetime import tornado.gen import statsd if os.environ.get("STATSD_URL", None): ip, port = os.environ.get("STATSD_URL").split(':') statsd_client = statsd.Client(ip, int(port)) else: statsd_client = None def instrument(name): def instrument_wrapper(fn): @tornado.gen.coroutine...
FIx issue with oneway methods
FIx issue with oneway methods
Python
apache-2.0
upfluence/thrift,upfluence/thrift,upfluence/thrift,upfluence/thrift,upfluence/thrift,upfluence/thrift,upfluence/thrift,upfluence/thrift,upfluence/thrift,upfluence/thrift,upfluence/thrift,upfluence/thrift
import os import datetime import tornado.gen import statsd if os.environ.get("STATSD_URL", None): ip, port = os.environ.get("STATSD_URL").split(':') statsd_client = statsd.Client(ip, int(port)) else: statsd_client = None def instrument(name): def instrument_wrapper(fn): @tornado.gen.coroutine...
import os import datetime import tornado.gen import statsd if os.environ.get("STATSD_URL", None): ip, port = os.environ.get("STATSD_URL").split(':') statsd_client = statsd.Client(ip, int(port)) else: statsd_client = None def instrument(name): def instrument_wrapper(fn): @tornado.gen.coroutine...
<commit_before>import os import datetime import tornado.gen import statsd if os.environ.get("STATSD_URL", None): ip, port = os.environ.get("STATSD_URL").split(':') statsd_client = statsd.Client(ip, int(port)) else: statsd_client = None def instrument(name): def instrument_wrapper(fn): @tornad...
import os import datetime import tornado.gen import statsd if os.environ.get("STATSD_URL", None): ip, port = os.environ.get("STATSD_URL").split(':') statsd_client = statsd.Client(ip, int(port)) else: statsd_client = None def instrument(name): def instrument_wrapper(fn): @tornado.gen.coroutine...
import os import datetime import tornado.gen import statsd if os.environ.get("STATSD_URL", None): ip, port = os.environ.get("STATSD_URL").split(':') statsd_client = statsd.Client(ip, int(port)) else: statsd_client = None def instrument(name): def instrument_wrapper(fn): @tornado.gen.coroutine...
<commit_before>import os import datetime import tornado.gen import statsd if os.environ.get("STATSD_URL", None): ip, port = os.environ.get("STATSD_URL").split(':') statsd_client = statsd.Client(ip, int(port)) else: statsd_client = None def instrument(name): def instrument_wrapper(fn): @tornad...
55d9da44e71985e8fa81ffa60ea07f6db8c5e81e
ircu/util.py
ircu/util.py
from ircu import consts def int_to_base64(n, count): buf = '' while count > 0: count -= 1 buf = consts.BASE64_INT_TO_NUM[n & consts.BASE64_NUMNICKMASK] + buf n >>= consts.BASE64_NUMNICKLOG return buf def base64_to_int(s): n = 0 for ii in range(0, len(s)): n = n <<...
from ircu import consts def int_to_base64(n, count): buf = '' while count: count -= 1 buf = consts.BASE64_INT_TO_NUM[n & consts.BASE64_NUMNICKMASK] + buf n >>= consts.BASE64_NUMNICKLOG return buf def base64_to_int(s): n = 0 for ii in range(0, len(s)): n = n << 6 ...
Add server/user numeric conversion methods
Add server/user numeric conversion methods
Python
mit
briancline/ircu-python
from ircu import consts def int_to_base64(n, count): buf = '' while count > 0: count -= 1 buf = consts.BASE64_INT_TO_NUM[n & consts.BASE64_NUMNICKMASK] + buf n >>= consts.BASE64_NUMNICKLOG return buf def base64_to_int(s): n = 0 for ii in range(0, len(s)): n = n <<...
from ircu import consts def int_to_base64(n, count): buf = '' while count: count -= 1 buf = consts.BASE64_INT_TO_NUM[n & consts.BASE64_NUMNICKMASK] + buf n >>= consts.BASE64_NUMNICKLOG return buf def base64_to_int(s): n = 0 for ii in range(0, len(s)): n = n << 6 ...
<commit_before>from ircu import consts def int_to_base64(n, count): buf = '' while count > 0: count -= 1 buf = consts.BASE64_INT_TO_NUM[n & consts.BASE64_NUMNICKMASK] + buf n >>= consts.BASE64_NUMNICKLOG return buf def base64_to_int(s): n = 0 for ii in range(0, len(s)): ...
from ircu import consts def int_to_base64(n, count): buf = '' while count: count -= 1 buf = consts.BASE64_INT_TO_NUM[n & consts.BASE64_NUMNICKMASK] + buf n >>= consts.BASE64_NUMNICKLOG return buf def base64_to_int(s): n = 0 for ii in range(0, len(s)): n = n << 6 ...
from ircu import consts def int_to_base64(n, count): buf = '' while count > 0: count -= 1 buf = consts.BASE64_INT_TO_NUM[n & consts.BASE64_NUMNICKMASK] + buf n >>= consts.BASE64_NUMNICKLOG return buf def base64_to_int(s): n = 0 for ii in range(0, len(s)): n = n <<...
<commit_before>from ircu import consts def int_to_base64(n, count): buf = '' while count > 0: count -= 1 buf = consts.BASE64_INT_TO_NUM[n & consts.BASE64_NUMNICKMASK] + buf n >>= consts.BASE64_NUMNICKLOG return buf def base64_to_int(s): n = 0 for ii in range(0, len(s)): ...
5df86afa64aafb4aee1adb066307910e0fb64256
jd2chm_utils.py
jd2chm_utils.py
import os import sys import jd2chm_log import jd2chm_conf logging = None config = None def getAppDir(): if hasattr(sys, "frozen"): # py2exe return os.path.dirname(sys.executable) return os.path.dirname(sys.argv[0]) def getLogging(level=2): global logging if not logging: logging = jd2chm_log.Jd2chmLo...
import os import sys import shutil import jd2chm_log as log import jd2chm_conf as conf import jd2chm_const as const logging = None config = None def get_app_dir(): if hasattr(sys, "frozen"): # py2exe return os.path.dirname(sys.executable) return os.path.dirname(sys.argv[0]) def get_logging(level=...
Reformat code. Added methods to pretty print messages.
Reformat code. Added methods to pretty print messages.
Python
mit
andreburgaud/jd2chm,andreburgaud/jd2chm
import os import sys import jd2chm_log import jd2chm_conf logging = None config = None def getAppDir(): if hasattr(sys, "frozen"): # py2exe return os.path.dirname(sys.executable) return os.path.dirname(sys.argv[0]) def getLogging(level=2): global logging if not logging: logging = jd2chm_log.Jd2chmLo...
import os import sys import shutil import jd2chm_log as log import jd2chm_conf as conf import jd2chm_const as const logging = None config = None def get_app_dir(): if hasattr(sys, "frozen"): # py2exe return os.path.dirname(sys.executable) return os.path.dirname(sys.argv[0]) def get_logging(level=...
<commit_before>import os import sys import jd2chm_log import jd2chm_conf logging = None config = None def getAppDir(): if hasattr(sys, "frozen"): # py2exe return os.path.dirname(sys.executable) return os.path.dirname(sys.argv[0]) def getLogging(level=2): global logging if not logging: logging = jd2c...
import os import sys import shutil import jd2chm_log as log import jd2chm_conf as conf import jd2chm_const as const logging = None config = None def get_app_dir(): if hasattr(sys, "frozen"): # py2exe return os.path.dirname(sys.executable) return os.path.dirname(sys.argv[0]) def get_logging(level=...
import os import sys import jd2chm_log import jd2chm_conf logging = None config = None def getAppDir(): if hasattr(sys, "frozen"): # py2exe return os.path.dirname(sys.executable) return os.path.dirname(sys.argv[0]) def getLogging(level=2): global logging if not logging: logging = jd2chm_log.Jd2chmLo...
<commit_before>import os import sys import jd2chm_log import jd2chm_conf logging = None config = None def getAppDir(): if hasattr(sys, "frozen"): # py2exe return os.path.dirname(sys.executable) return os.path.dirname(sys.argv[0]) def getLogging(level=2): global logging if not logging: logging = jd2c...
814782f5ef291728ecad6ce6bf430ce1fd82e5c4
core/tests/views.py
core/tests/views.py
from django.conf import settings from django.core.urlresolvers import reverse from django.template import TemplateDoesNotExist from django.test import TestCase from core.models import Image from core.tests import create_user from users.models import User __all__ = ['CreateImageTest'] class CreateImageTest(TestCase...
from django.conf import settings from django.core.urlresolvers import reverse from django.template import TemplateDoesNotExist from django.test import TestCase from core.models import Image from core.tests import create_user from users.models import User __all__ = ['CreateImageTest'] class CreateImageTest(TestCase...
Use rsponse.json() to fix test-failure on json-3.5
Fix: Use rsponse.json() to fix test-failure on json-3.5
Python
bsd-2-clause
pinry/pinry,pinry/pinry,pinry/pinry,lapo-luchini/pinry,pinry/pinry,lapo-luchini/pinry,lapo-luchini/pinry,lapo-luchini/pinry
from django.conf import settings from django.core.urlresolvers import reverse from django.template import TemplateDoesNotExist from django.test import TestCase from core.models import Image from core.tests import create_user from users.models import User __all__ = ['CreateImageTest'] class CreateImageTest(TestCase...
from django.conf import settings from django.core.urlresolvers import reverse from django.template import TemplateDoesNotExist from django.test import TestCase from core.models import Image from core.tests import create_user from users.models import User __all__ = ['CreateImageTest'] class CreateImageTest(TestCase...
<commit_before>from django.conf import settings from django.core.urlresolvers import reverse from django.template import TemplateDoesNotExist from django.test import TestCase from core.models import Image from core.tests import create_user from users.models import User __all__ = ['CreateImageTest'] class CreateIma...
from django.conf import settings from django.core.urlresolvers import reverse from django.template import TemplateDoesNotExist from django.test import TestCase from core.models import Image from core.tests import create_user from users.models import User __all__ = ['CreateImageTest'] class CreateImageTest(TestCase...
from django.conf import settings from django.core.urlresolvers import reverse from django.template import TemplateDoesNotExist from django.test import TestCase from core.models import Image from core.tests import create_user from users.models import User __all__ = ['CreateImageTest'] class CreateImageTest(TestCase...
<commit_before>from django.conf import settings from django.core.urlresolvers import reverse from django.template import TemplateDoesNotExist from django.test import TestCase from core.models import Image from core.tests import create_user from users.models import User __all__ = ['CreateImageTest'] class CreateIma...
49570c1b7dd5c62495a01db07fe070c34db18383
tests/test_BaseDataSet_uri_property.py
tests/test_BaseDataSet_uri_property.py
import os from . import tmp_dir_fixture # NOQA def test_uri_property(tmp_dir_fixture): # NOQA from dtoolcore import _BaseDataSet admin_metadata = { "name": os.path.basename(tmp_dir_fixture), "uuid": "1234", } base_ds = _BaseDataSet(tmp_dir_fixture, admin_metadata, None) expec...
import os from . import tmp_uri_fixture # NOQA def test_uri_property(tmp_uri_fixture): # NOQA from dtoolcore import _BaseDataSet admin_metadata = { "name": os.path.basename(tmp_uri_fixture), "uuid": "1234", } base_ds = _BaseDataSet(tmp_uri_fixture, admin_metadata, None) asser...
Fix windows issue with test_uri_property
Fix windows issue with test_uri_property
Python
mit
JIC-CSB/dtoolcore
import os from . import tmp_dir_fixture # NOQA def test_uri_property(tmp_dir_fixture): # NOQA from dtoolcore import _BaseDataSet admin_metadata = { "name": os.path.basename(tmp_dir_fixture), "uuid": "1234", } base_ds = _BaseDataSet(tmp_dir_fixture, admin_metadata, None) expec...
import os from . import tmp_uri_fixture # NOQA def test_uri_property(tmp_uri_fixture): # NOQA from dtoolcore import _BaseDataSet admin_metadata = { "name": os.path.basename(tmp_uri_fixture), "uuid": "1234", } base_ds = _BaseDataSet(tmp_uri_fixture, admin_metadata, None) asser...
<commit_before>import os from . import tmp_dir_fixture # NOQA def test_uri_property(tmp_dir_fixture): # NOQA from dtoolcore import _BaseDataSet admin_metadata = { "name": os.path.basename(tmp_dir_fixture), "uuid": "1234", } base_ds = _BaseDataSet(tmp_dir_fixture, admin_metadata, N...
import os from . import tmp_uri_fixture # NOQA def test_uri_property(tmp_uri_fixture): # NOQA from dtoolcore import _BaseDataSet admin_metadata = { "name": os.path.basename(tmp_uri_fixture), "uuid": "1234", } base_ds = _BaseDataSet(tmp_uri_fixture, admin_metadata, None) asser...
import os from . import tmp_dir_fixture # NOQA def test_uri_property(tmp_dir_fixture): # NOQA from dtoolcore import _BaseDataSet admin_metadata = { "name": os.path.basename(tmp_dir_fixture), "uuid": "1234", } base_ds = _BaseDataSet(tmp_dir_fixture, admin_metadata, None) expec...
<commit_before>import os from . import tmp_dir_fixture # NOQA def test_uri_property(tmp_dir_fixture): # NOQA from dtoolcore import _BaseDataSet admin_metadata = { "name": os.path.basename(tmp_dir_fixture), "uuid": "1234", } base_ds = _BaseDataSet(tmp_dir_fixture, admin_metadata, N...
2ecc676dd2521c727eb1d720bac6c2533f8337d9
barbican/model/migration/alembic_migrations/versions/d2780d5aa510_change_url_length.py
barbican/model/migration/alembic_migrations/versions/d2780d5aa510_change_url_length.py
"""change_url_length Revision ID: d2780d5aa510 Revises: dce488646127 Create Date: 2016-03-11 09:39:32.593231 """ # revision identifiers, used by Alembic. revision = 'd2780d5aa510' down_revision = 'dce488646127' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_column( 'ContainerCo...
"""change_url_length Revision ID: d2780d5aa510 Revises: dce488646127 Create Date: 2016-03-11 09:39:32.593231 """ # revision identifiers, used by Alembic. revision = 'd2780d5aa510' down_revision = 'dce488646127' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_column( 'container_c...
Change Table name to correct name
Change Table name to correct name The table name is currently wrong in this version and needs to be changed to the correct name. It is preventing the database migration script from running correctly. Closes-Bug: #1562091 Change-Id: I9be88a4385ab58b37be5842aaaefd8353a2f6f76
Python
apache-2.0
openstack/barbican,openstack/barbican
"""change_url_length Revision ID: d2780d5aa510 Revises: dce488646127 Create Date: 2016-03-11 09:39:32.593231 """ # revision identifiers, used by Alembic. revision = 'd2780d5aa510' down_revision = 'dce488646127' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_column( 'ContainerCo...
"""change_url_length Revision ID: d2780d5aa510 Revises: dce488646127 Create Date: 2016-03-11 09:39:32.593231 """ # revision identifiers, used by Alembic. revision = 'd2780d5aa510' down_revision = 'dce488646127' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_column( 'container_c...
<commit_before>"""change_url_length Revision ID: d2780d5aa510 Revises: dce488646127 Create Date: 2016-03-11 09:39:32.593231 """ # revision identifiers, used by Alembic. revision = 'd2780d5aa510' down_revision = 'dce488646127' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_column( ...
"""change_url_length Revision ID: d2780d5aa510 Revises: dce488646127 Create Date: 2016-03-11 09:39:32.593231 """ # revision identifiers, used by Alembic. revision = 'd2780d5aa510' down_revision = 'dce488646127' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_column( 'container_c...
"""change_url_length Revision ID: d2780d5aa510 Revises: dce488646127 Create Date: 2016-03-11 09:39:32.593231 """ # revision identifiers, used by Alembic. revision = 'd2780d5aa510' down_revision = 'dce488646127' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_column( 'ContainerCo...
<commit_before>"""change_url_length Revision ID: d2780d5aa510 Revises: dce488646127 Create Date: 2016-03-11 09:39:32.593231 """ # revision identifiers, used by Alembic. revision = 'd2780d5aa510' down_revision = 'dce488646127' from alembic import op import sqlalchemy as sa def upgrade(): op.alter_column( ...
5041862eafcd4b8799f8ab97c25df7d494d6c2ad
blockbuster/bb_logging.py
blockbuster/bb_logging.py
import config import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger("blockbuster") logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging....
import config import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger("blockbuster") logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging....
Change format of log lines
Change format of log lines
Python
mit
mattstibbs/blockbuster-server,mattstibbs/blockbuster-server
import config import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger("blockbuster") logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging....
import config import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger("blockbuster") logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging....
<commit_before>import config import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger("blockbuster") logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages...
import config import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger("blockbuster") logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging....
import config import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger("blockbuster") logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages tfh = logging....
<commit_before>import config import logging import logging.handlers # ######### Set up logging ########## # log.basicConfig(format="%(asctime)s - %(levelname)s: %(message)s", level=log.DEBUG) logger = logging.getLogger("blockbuster") logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages...
a0a93d1ccd2a2e339da59f6864c63b0fc9857886
mailchimp3/baseapi.py
mailchimp3/baseapi.py
from os import path class BaseApi(object): """ Simple class to buid path for entities """ def __init__(self, mc_client): """ Initialize the class with you user_id and secret_key """ super(BaseApi, self).__init__() self._mc_client = mc_client def _build_pa...
from os import path class BaseApi(object): """ Simple class to buid path for entities """ def __init__(self, mc_client): """ Initialize the class with you user_id and secret_key """ super(BaseApi, self).__init__() self._mc_client = mc_client def _build_pa...
Update path build function to work on Windows
Update path build function to work on Windows
Python
mit
s0x90/python-mailchimp,charlesthk/python-mailchimp
from os import path class BaseApi(object): """ Simple class to buid path for entities """ def __init__(self, mc_client): """ Initialize the class with you user_id and secret_key """ super(BaseApi, self).__init__() self._mc_client = mc_client def _build_pa...
from os import path class BaseApi(object): """ Simple class to buid path for entities """ def __init__(self, mc_client): """ Initialize the class with you user_id and secret_key """ super(BaseApi, self).__init__() self._mc_client = mc_client def _build_pa...
<commit_before>from os import path class BaseApi(object): """ Simple class to buid path for entities """ def __init__(self, mc_client): """ Initialize the class with you user_id and secret_key """ super(BaseApi, self).__init__() self._mc_client = mc_client ...
from os import path class BaseApi(object): """ Simple class to buid path for entities """ def __init__(self, mc_client): """ Initialize the class with you user_id and secret_key """ super(BaseApi, self).__init__() self._mc_client = mc_client def _build_pa...
from os import path class BaseApi(object): """ Simple class to buid path for entities """ def __init__(self, mc_client): """ Initialize the class with you user_id and secret_key """ super(BaseApi, self).__init__() self._mc_client = mc_client def _build_pa...
<commit_before>from os import path class BaseApi(object): """ Simple class to buid path for entities """ def __init__(self, mc_client): """ Initialize the class with you user_id and secret_key """ super(BaseApi, self).__init__() self._mc_client = mc_client ...
660fc35a1bb25e728ad86d2b0ce8d3af46645a99
base/apps/storage.py
base/apps/storage.py
import urlparse from django.conf import settings from ecstatic.storage import CachedStaticFilesMixin, StaticManifestMixin from s3_folder_storage.s3 import DefaultStorage, StaticStorage def domain(url): return urlparse.urlparse(url).hostname class MediaFilesStorage(DefaultStorage): def __init__(self, *args...
import urlparse from django.conf import settings from django.contrib.staticfiles.storage import ManifestFilesMixin from s3_folder_storage.s3 import DefaultStorage, StaticStorage def domain(url): return urlparse.urlparse(url).hostname class MediaFilesStorage(DefaultStorage): def __init__(self, *args, **kwa...
Switch out django-ecstatic for ManifestFilesMixin.
Switch out django-ecstatic for ManifestFilesMixin.
Python
apache-2.0
hello-base/web,hello-base/web,hello-base/web,hello-base/web
import urlparse from django.conf import settings from ecstatic.storage import CachedStaticFilesMixin, StaticManifestMixin from s3_folder_storage.s3 import DefaultStorage, StaticStorage def domain(url): return urlparse.urlparse(url).hostname class MediaFilesStorage(DefaultStorage): def __init__(self, *args...
import urlparse from django.conf import settings from django.contrib.staticfiles.storage import ManifestFilesMixin from s3_folder_storage.s3 import DefaultStorage, StaticStorage def domain(url): return urlparse.urlparse(url).hostname class MediaFilesStorage(DefaultStorage): def __init__(self, *args, **kwa...
<commit_before>import urlparse from django.conf import settings from ecstatic.storage import CachedStaticFilesMixin, StaticManifestMixin from s3_folder_storage.s3 import DefaultStorage, StaticStorage def domain(url): return urlparse.urlparse(url).hostname class MediaFilesStorage(DefaultStorage): def __ini...
import urlparse from django.conf import settings from django.contrib.staticfiles.storage import ManifestFilesMixin from s3_folder_storage.s3 import DefaultStorage, StaticStorage def domain(url): return urlparse.urlparse(url).hostname class MediaFilesStorage(DefaultStorage): def __init__(self, *args, **kwa...
import urlparse from django.conf import settings from ecstatic.storage import CachedStaticFilesMixin, StaticManifestMixin from s3_folder_storage.s3 import DefaultStorage, StaticStorage def domain(url): return urlparse.urlparse(url).hostname class MediaFilesStorage(DefaultStorage): def __init__(self, *args...
<commit_before>import urlparse from django.conf import settings from ecstatic.storage import CachedStaticFilesMixin, StaticManifestMixin from s3_folder_storage.s3 import DefaultStorage, StaticStorage def domain(url): return urlparse.urlparse(url).hostname class MediaFilesStorage(DefaultStorage): def __ini...
e23ba33c3a57cb384b93bf51a074a83711f0dea0
backend/breach/tests/base.py
backend/breach/tests/base.py
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ) ...
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ) ...
Add balance checking test victim
Add balance checking test victim
Python
mit
dionyziz/rupture,dionyziz/rupture,dimkarakostas/rupture,esarafianou/rupture,esarafianou/rupture,dimkarakostas/rupture,dimriou/rupture,dimkarakostas/rupture,dimriou/rupture,dionyziz/rupture,esarafianou/rupture,dionyziz/rupture,dimriou/rupture,esarafianou/rupture,dimriou/rupture,dimkarakostas/rupture,dimkarakostas/ruptur...
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ) ...
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ) ...
<commit_before>from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ...
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ) ...
from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ) ...
<commit_before>from django.test import TestCase from breach.models import SampleSet, Victim, Target, Round class RuptureTestCase(TestCase): def setUp(self): target = Target.objects.create( endpoint='https://di.uoa.gr/?breach=%s', prefix='test', alphabet='0123456789' ...
5d0a29a908a4019e7d7cf1edc17ca1e002e19c14
vumi/application/__init__.py
vumi/application/__init__.py
"""The vumi.application API.""" __all__ = ["ApplicationWorker", "SessionManager", "TagpoolManager", "MessageStore"] from vumi.application.base import ApplicationWorker from vumi.application.session import SessionManager from vumi.application.tagpool import TagpoolManager from vumi.application.message_store...
"""The vumi.application API.""" __all__ = ["ApplicationWorker", "SessionManager", "TagpoolManager", "MessageStore", "HTTPRelayApplication"] from vumi.application.base import ApplicationWorker from vumi.application.session import SessionManager from vumi.application.tagpool import TagpoolManager from vumi.a...
Add HTTPRelayApplication to vumi.application package API.
Add HTTPRelayApplication to vumi.application package API.
Python
bsd-3-clause
TouK/vumi,TouK/vumi,vishwaprakashmishra/xmatrix,harrissoerja/vumi,harrissoerja/vumi,TouK/vumi,vishwaprakashmishra/xmatrix,vishwaprakashmishra/xmatrix,harrissoerja/vumi
"""The vumi.application API.""" __all__ = ["ApplicationWorker", "SessionManager", "TagpoolManager", "MessageStore"] from vumi.application.base import ApplicationWorker from vumi.application.session import SessionManager from vumi.application.tagpool import TagpoolManager from vumi.application.message_store...
"""The vumi.application API.""" __all__ = ["ApplicationWorker", "SessionManager", "TagpoolManager", "MessageStore", "HTTPRelayApplication"] from vumi.application.base import ApplicationWorker from vumi.application.session import SessionManager from vumi.application.tagpool import TagpoolManager from vumi.a...
<commit_before>"""The vumi.application API.""" __all__ = ["ApplicationWorker", "SessionManager", "TagpoolManager", "MessageStore"] from vumi.application.base import ApplicationWorker from vumi.application.session import SessionManager from vumi.application.tagpool import TagpoolManager from vumi.applicatio...
"""The vumi.application API.""" __all__ = ["ApplicationWorker", "SessionManager", "TagpoolManager", "MessageStore", "HTTPRelayApplication"] from vumi.application.base import ApplicationWorker from vumi.application.session import SessionManager from vumi.application.tagpool import TagpoolManager from vumi.a...
"""The vumi.application API.""" __all__ = ["ApplicationWorker", "SessionManager", "TagpoolManager", "MessageStore"] from vumi.application.base import ApplicationWorker from vumi.application.session import SessionManager from vumi.application.tagpool import TagpoolManager from vumi.application.message_store...
<commit_before>"""The vumi.application API.""" __all__ = ["ApplicationWorker", "SessionManager", "TagpoolManager", "MessageStore"] from vumi.application.base import ApplicationWorker from vumi.application.session import SessionManager from vumi.application.tagpool import TagpoolManager from vumi.applicatio...
6381204585c64ed70bf23237731bdb92db445c05
cycy/parser/ast.py
cycy/parser/ast.py
class Node(object): def __eq__(self, other): return ( self.__class__ == other.__class__ and self.__dict__ == other.__dict__ ) def __ne__(self, other): return not self == other
class Node(object): def __eq__(self, other): return ( self.__class__ == other.__class__ and self.__dict__ == other.__dict__ ) def __ne__(self, other): return not self == other class BinaryOperation(Node): def __init__(self, operand, left, right): ass...
Add the basic AST nodes.
Add the basic AST nodes.
Python
mit
Magnetic/cycy,Magnetic/cycy,Magnetic/cycy
class Node(object): def __eq__(self, other): return ( self.__class__ == other.__class__ and self.__dict__ == other.__dict__ ) def __ne__(self, other): return not self == other Add the basic AST nodes.
class Node(object): def __eq__(self, other): return ( self.__class__ == other.__class__ and self.__dict__ == other.__dict__ ) def __ne__(self, other): return not self == other class BinaryOperation(Node): def __init__(self, operand, left, right): ass...
<commit_before>class Node(object): def __eq__(self, other): return ( self.__class__ == other.__class__ and self.__dict__ == other.__dict__ ) def __ne__(self, other): return not self == other <commit_msg>Add the basic AST nodes.<commit_after>
class Node(object): def __eq__(self, other): return ( self.__class__ == other.__class__ and self.__dict__ == other.__dict__ ) def __ne__(self, other): return not self == other class BinaryOperation(Node): def __init__(self, operand, left, right): ass...
class Node(object): def __eq__(self, other): return ( self.__class__ == other.__class__ and self.__dict__ == other.__dict__ ) def __ne__(self, other): return not self == other Add the basic AST nodes.class Node(object): def __eq__(self, other): return...
<commit_before>class Node(object): def __eq__(self, other): return ( self.__class__ == other.__class__ and self.__dict__ == other.__dict__ ) def __ne__(self, other): return not self == other <commit_msg>Add the basic AST nodes.<commit_after>class Node(object): ...
294b1c4d398c5f6a01323e18e53d9ab1d1e1a732
web/mooctracker/api/views.py
web/mooctracker/api/views.py
from django.http import HttpResponse from django.core.context_processors import csrf import json from students.models import Student STATUS_OK = { 'success' : 'API is running' } # status view def status(request): return HttpResponse( json.dumps(STATUS_OK), content_type = 'application/json' ) # stud...
from django.http import HttpResponse from django.core.context_processors import csrf import json from students.models import Student STATUS_OK = { 'success' : 'API is running' } # status view def status(request): return HttpResponse( json.dumps(STATUS_OK), content_type = 'application/json' ) # stud...
DELETE method added to api
DELETE method added to api
Python
mit
Jaaga/mooc-tracker,Jaaga/mooc-tracker,Jaaga/mooc-tracker,Jaaga/mooc-tracker,Jaaga/mooc-tracker,Jaaga/mooc-tracker
from django.http import HttpResponse from django.core.context_processors import csrf import json from students.models import Student STATUS_OK = { 'success' : 'API is running' } # status view def status(request): return HttpResponse( json.dumps(STATUS_OK), content_type = 'application/json' ) # stud...
from django.http import HttpResponse from django.core.context_processors import csrf import json from students.models import Student STATUS_OK = { 'success' : 'API is running' } # status view def status(request): return HttpResponse( json.dumps(STATUS_OK), content_type = 'application/json' ) # stud...
<commit_before>from django.http import HttpResponse from django.core.context_processors import csrf import json from students.models import Student STATUS_OK = { 'success' : 'API is running' } # status view def status(request): return HttpResponse( json.dumps(STATUS_OK), content_type = 'application/js...
from django.http import HttpResponse from django.core.context_processors import csrf import json from students.models import Student STATUS_OK = { 'success' : 'API is running' } # status view def status(request): return HttpResponse( json.dumps(STATUS_OK), content_type = 'application/json' ) # stud...
from django.http import HttpResponse from django.core.context_processors import csrf import json from students.models import Student STATUS_OK = { 'success' : 'API is running' } # status view def status(request): return HttpResponse( json.dumps(STATUS_OK), content_type = 'application/json' ) # stud...
<commit_before>from django.http import HttpResponse from django.core.context_processors import csrf import json from students.models import Student STATUS_OK = { 'success' : 'API is running' } # status view def status(request): return HttpResponse( json.dumps(STATUS_OK), content_type = 'application/js...
d95be5aa24e85937253025b4ee47d326e2d1d778
common/lib/xmodule/html_module.py
common/lib/xmodule/html_module.py
import json import logging from xmodule.x_module import XModule from xmodule.raw_module import RawDescriptor from lxml import etree from pkg_resources import resource_string log = logging.getLogger("mitx.courseware") class HtmlModule(XModule): def get_html(self): return self.html def __init__(self,...
import json import logging from xmodule.x_module import XModule from xmodule.raw_module import RawDescriptor from lxml import etree from pkg_resources import resource_string log = logging.getLogger("mitx.courseware") class HtmlModule(XModule): def get_html(self): return self.html def __init__(self,...
Fix html rendering after making it a RawDescriptor
Fix html rendering after making it a RawDescriptor
Python
agpl-3.0
vikas1885/test1,mbareta/edx-platform-ft,alexthered/kienhoc-platform,adoosii/edx-platform,edx/edx-platform,chudaol/edx-platform,chand3040/cloud_that,AkA84/edx-platform,ahmadiga/min_edx,MakeHer/edx-platform,atsolakid/edx-platform,cpennington/edx-platform,ak2703/edx-platform,rue89-tech/edx-platform,mtlchun/edx,ZLLab-Mooc/...
import json import logging from xmodule.x_module import XModule from xmodule.raw_module import RawDescriptor from lxml import etree from pkg_resources import resource_string log = logging.getLogger("mitx.courseware") class HtmlModule(XModule): def get_html(self): return self.html def __init__(self,...
import json import logging from xmodule.x_module import XModule from xmodule.raw_module import RawDescriptor from lxml import etree from pkg_resources import resource_string log = logging.getLogger("mitx.courseware") class HtmlModule(XModule): def get_html(self): return self.html def __init__(self,...
<commit_before>import json import logging from xmodule.x_module import XModule from xmodule.raw_module import RawDescriptor from lxml import etree from pkg_resources import resource_string log = logging.getLogger("mitx.courseware") class HtmlModule(XModule): def get_html(self): return self.html def...
import json import logging from xmodule.x_module import XModule from xmodule.raw_module import RawDescriptor from lxml import etree from pkg_resources import resource_string log = logging.getLogger("mitx.courseware") class HtmlModule(XModule): def get_html(self): return self.html def __init__(self,...
import json import logging from xmodule.x_module import XModule from xmodule.raw_module import RawDescriptor from lxml import etree from pkg_resources import resource_string log = logging.getLogger("mitx.courseware") class HtmlModule(XModule): def get_html(self): return self.html def __init__(self,...
<commit_before>import json import logging from xmodule.x_module import XModule from xmodule.raw_module import RawDescriptor from lxml import etree from pkg_resources import resource_string log = logging.getLogger("mitx.courseware") class HtmlModule(XModule): def get_html(self): return self.html def...
a298dd29bfb198804be5e77e0a47733764b4baaf
examples/open-existing.py
examples/open-existing.py
#!/usr/bin/python2 # This is a simple example program to show how to use PyCdlib to open up an # existing ISO passed on the command-line, and print out all of the file names # at the root of the ISO. # Import standard python modules. import sys # Import pycdlib itself. import pycdlib # Check that there are enough c...
#!/usr/bin/python2 # This is a simple example program to show how to use PyCdlib to open up an # existing ISO passed on the command-line, and print out all of the file names # at the root of the ISO. # Import standard python modules. import sys # Import pycdlib itself. import pycdlib # Check that there are enough c...
Stop using deprecated list_dir in the examples.
Stop using deprecated list_dir in the examples. Signed-off-by: Chris Lalancette <281cd07d7578d97c83271fbbf2faddb83ab3791c@gmail.com>
Python
lgpl-2.1
clalancette/pycdlib,clalancette/pyiso
#!/usr/bin/python2 # This is a simple example program to show how to use PyCdlib to open up an # existing ISO passed on the command-line, and print out all of the file names # at the root of the ISO. # Import standard python modules. import sys # Import pycdlib itself. import pycdlib # Check that there are enough c...
#!/usr/bin/python2 # This is a simple example program to show how to use PyCdlib to open up an # existing ISO passed on the command-line, and print out all of the file names # at the root of the ISO. # Import standard python modules. import sys # Import pycdlib itself. import pycdlib # Check that there are enough c...
<commit_before>#!/usr/bin/python2 # This is a simple example program to show how to use PyCdlib to open up an # existing ISO passed on the command-line, and print out all of the file names # at the root of the ISO. # Import standard python modules. import sys # Import pycdlib itself. import pycdlib # Check that the...
#!/usr/bin/python2 # This is a simple example program to show how to use PyCdlib to open up an # existing ISO passed on the command-line, and print out all of the file names # at the root of the ISO. # Import standard python modules. import sys # Import pycdlib itself. import pycdlib # Check that there are enough c...
#!/usr/bin/python2 # This is a simple example program to show how to use PyCdlib to open up an # existing ISO passed on the command-line, and print out all of the file names # at the root of the ISO. # Import standard python modules. import sys # Import pycdlib itself. import pycdlib # Check that there are enough c...
<commit_before>#!/usr/bin/python2 # This is a simple example program to show how to use PyCdlib to open up an # existing ISO passed on the command-line, and print out all of the file names # at the root of the ISO. # Import standard python modules. import sys # Import pycdlib itself. import pycdlib # Check that the...
0cdb7a0baa6e4f00b3b54cb49701175cdb3c8a05
entities/filters.py
entities/filters.py
from . import forms import django_filters as filters class Group(filters.FilterSet): name = filters.CharFilter(lookup_expr='icontains') class Meta: form = forms.GroupFilter
from . import forms import django_filters as filters from features.groups import models class Group(filters.FilterSet): name = filters.CharFilter(label='Name', lookup_expr='icontains') class Meta: model = models.Group fields = ['name'] form = forms.GroupFilter
Fix filter for django-filter 1.0
Fix filter for django-filter 1.0
Python
agpl-3.0
stadtgestalten/stadtgestalten,stadtgestalten/stadtgestalten,stadtgestalten/stadtgestalten
from . import forms import django_filters as filters class Group(filters.FilterSet): name = filters.CharFilter(lookup_expr='icontains') class Meta: form = forms.GroupFilter Fix filter for django-filter 1.0
from . import forms import django_filters as filters from features.groups import models class Group(filters.FilterSet): name = filters.CharFilter(label='Name', lookup_expr='icontains') class Meta: model = models.Group fields = ['name'] form = forms.GroupFilter
<commit_before>from . import forms import django_filters as filters class Group(filters.FilterSet): name = filters.CharFilter(lookup_expr='icontains') class Meta: form = forms.GroupFilter <commit_msg>Fix filter for django-filter 1.0<commit_after>
from . import forms import django_filters as filters from features.groups import models class Group(filters.FilterSet): name = filters.CharFilter(label='Name', lookup_expr='icontains') class Meta: model = models.Group fields = ['name'] form = forms.GroupFilter
from . import forms import django_filters as filters class Group(filters.FilterSet): name = filters.CharFilter(lookup_expr='icontains') class Meta: form = forms.GroupFilter Fix filter for django-filter 1.0from . import forms import django_filters as filters from features.groups import models class ...
<commit_before>from . import forms import django_filters as filters class Group(filters.FilterSet): name = filters.CharFilter(lookup_expr='icontains') class Meta: form = forms.GroupFilter <commit_msg>Fix filter for django-filter 1.0<commit_after>from . import forms import django_filters as filters fr...
939a95c2bf849509fd70356ad37c6645e2ca81e4
torchtext/data/pipeline.py
torchtext/data/pipeline.py
class Pipeline(object): """Defines a pipeline for transforming sequence data.""" def __init__(self, convert_token=None): if convert_token is None: self.convert_token = lambda x: x elif callable(convert_token): self.convert_token = convert_token else: ...
class Pipeline(object): """Defines a pipeline for transforming sequence data.""" def __init__(self, convert_token=None): if convert_token is None: self.convert_token = lambda x: x elif callable(convert_token): self.convert_token = convert_token else: ...
Fix forwarding positional args in Pipeline __call__
Fix forwarding positional args in Pipeline __call__
Python
bsd-3-clause
pytorch/text,pytorch/text,pytorch/text,pytorch/text
class Pipeline(object): """Defines a pipeline for transforming sequence data.""" def __init__(self, convert_token=None): if convert_token is None: self.convert_token = lambda x: x elif callable(convert_token): self.convert_token = convert_token else: ...
class Pipeline(object): """Defines a pipeline for transforming sequence data.""" def __init__(self, convert_token=None): if convert_token is None: self.convert_token = lambda x: x elif callable(convert_token): self.convert_token = convert_token else: ...
<commit_before>class Pipeline(object): """Defines a pipeline for transforming sequence data.""" def __init__(self, convert_token=None): if convert_token is None: self.convert_token = lambda x: x elif callable(convert_token): self.convert_token = convert_token els...
class Pipeline(object): """Defines a pipeline for transforming sequence data.""" def __init__(self, convert_token=None): if convert_token is None: self.convert_token = lambda x: x elif callable(convert_token): self.convert_token = convert_token else: ...
class Pipeline(object): """Defines a pipeline for transforming sequence data.""" def __init__(self, convert_token=None): if convert_token is None: self.convert_token = lambda x: x elif callable(convert_token): self.convert_token = convert_token else: ...
<commit_before>class Pipeline(object): """Defines a pipeline for transforming sequence data.""" def __init__(self, convert_token=None): if convert_token is None: self.convert_token = lambda x: x elif callable(convert_token): self.convert_token = convert_token els...
4a045eb12eb7931b2aad302450c4bca944b42f93
utcdatetime/utcdatetime.py
utcdatetime/utcdatetime.py
import datetime from .utc_timezone import UTC FORMAT_NO_FRACTION = '%Y-%m-%dT%H:%M:%SZ' FORMAT_WITH_FRACTION = '%Y-%m-%dT%H:%M:%S.%fZ' class utcdatetime(object): def __init__(self, year, month, day, hour=0, minute=0, second=0, microsecond=0): self.__dt = datetime.datetime(year, month, d...
import datetime from .utc_timezone import UTC FORMAT_NO_FRACTION = '%Y-%m-%dT%H:%M:%SZ' FORMAT_WITH_FRACTION = '%Y-%m-%dT%H:%M:%S.%fZ' class utcdatetime(object): def __init__(self, year, month, day, hour=0, minute=0, second=0, microsecond=0): self.__dt = datetime.datetime(year, month, d...
Fix format string on Python 2.6
Fix format string on Python 2.6
Python
mit
paulfurley/python-utcdatetime,paulfurley/python-utcdatetime
import datetime from .utc_timezone import UTC FORMAT_NO_FRACTION = '%Y-%m-%dT%H:%M:%SZ' FORMAT_WITH_FRACTION = '%Y-%m-%dT%H:%M:%S.%fZ' class utcdatetime(object): def __init__(self, year, month, day, hour=0, minute=0, second=0, microsecond=0): self.__dt = datetime.datetime(year, month, d...
import datetime from .utc_timezone import UTC FORMAT_NO_FRACTION = '%Y-%m-%dT%H:%M:%SZ' FORMAT_WITH_FRACTION = '%Y-%m-%dT%H:%M:%S.%fZ' class utcdatetime(object): def __init__(self, year, month, day, hour=0, minute=0, second=0, microsecond=0): self.__dt = datetime.datetime(year, month, d...
<commit_before>import datetime from .utc_timezone import UTC FORMAT_NO_FRACTION = '%Y-%m-%dT%H:%M:%SZ' FORMAT_WITH_FRACTION = '%Y-%m-%dT%H:%M:%S.%fZ' class utcdatetime(object): def __init__(self, year, month, day, hour=0, minute=0, second=0, microsecond=0): self.__dt = datetime.datetime...
import datetime from .utc_timezone import UTC FORMAT_NO_FRACTION = '%Y-%m-%dT%H:%M:%SZ' FORMAT_WITH_FRACTION = '%Y-%m-%dT%H:%M:%S.%fZ' class utcdatetime(object): def __init__(self, year, month, day, hour=0, minute=0, second=0, microsecond=0): self.__dt = datetime.datetime(year, month, d...
import datetime from .utc_timezone import UTC FORMAT_NO_FRACTION = '%Y-%m-%dT%H:%M:%SZ' FORMAT_WITH_FRACTION = '%Y-%m-%dT%H:%M:%S.%fZ' class utcdatetime(object): def __init__(self, year, month, day, hour=0, minute=0, second=0, microsecond=0): self.__dt = datetime.datetime(year, month, d...
<commit_before>import datetime from .utc_timezone import UTC FORMAT_NO_FRACTION = '%Y-%m-%dT%H:%M:%SZ' FORMAT_WITH_FRACTION = '%Y-%m-%dT%H:%M:%S.%fZ' class utcdatetime(object): def __init__(self, year, month, day, hour=0, minute=0, second=0, microsecond=0): self.__dt = datetime.datetime...
4e8043ef74d440d6ece751341664ab1bb3bddebd
scripts/ci/extract-changelog.py
scripts/ci/extract-changelog.py
#!/usr/bin/python import sys if len(sys.argv) < 2: print("Usage: %s <changelog> [<version>]" % (sys.argv[0],)) sys.exit(1) changelog = open(sys.argv[1]).readlines() version = "latest" if len(sys.argv) > 2: version = sys.argv[2] start = 0 end = -1 for i, line in enumerate(changelog): if line.startsw...
#!/usr/bin/python import sys if len(sys.argv) < 2: print("Usage: %s <changelog> [<version>]" % (sys.argv[0],)) sys.exit(1) changelog = open(sys.argv[1]).readlines() version = "latest" if len(sys.argv) > 2: version = sys.argv[2] start = 0 end = -1 for i, line in enumerate(changelog): if line.startsw...
Fix script to extract changelog for Python 3
Fix script to extract changelog for Python 3
Python
apache-2.0
skydive-project/skydive,skydive-project/skydive,skydive-project/skydive,skydive-project/skydive,skydive-project/skydive,skydive-project/skydive,skydive-project/skydive
#!/usr/bin/python import sys if len(sys.argv) < 2: print("Usage: %s <changelog> [<version>]" % (sys.argv[0],)) sys.exit(1) changelog = open(sys.argv[1]).readlines() version = "latest" if len(sys.argv) > 2: version = sys.argv[2] start = 0 end = -1 for i, line in enumerate(changelog): if line.startsw...
#!/usr/bin/python import sys if len(sys.argv) < 2: print("Usage: %s <changelog> [<version>]" % (sys.argv[0],)) sys.exit(1) changelog = open(sys.argv[1]).readlines() version = "latest" if len(sys.argv) > 2: version = sys.argv[2] start = 0 end = -1 for i, line in enumerate(changelog): if line.startsw...
<commit_before>#!/usr/bin/python import sys if len(sys.argv) < 2: print("Usage: %s <changelog> [<version>]" % (sys.argv[0],)) sys.exit(1) changelog = open(sys.argv[1]).readlines() version = "latest" if len(sys.argv) > 2: version = sys.argv[2] start = 0 end = -1 for i, line in enumerate(changelog): ...
#!/usr/bin/python import sys if len(sys.argv) < 2: print("Usage: %s <changelog> [<version>]" % (sys.argv[0],)) sys.exit(1) changelog = open(sys.argv[1]).readlines() version = "latest" if len(sys.argv) > 2: version = sys.argv[2] start = 0 end = -1 for i, line in enumerate(changelog): if line.startsw...
#!/usr/bin/python import sys if len(sys.argv) < 2: print("Usage: %s <changelog> [<version>]" % (sys.argv[0],)) sys.exit(1) changelog = open(sys.argv[1]).readlines() version = "latest" if len(sys.argv) > 2: version = sys.argv[2] start = 0 end = -1 for i, line in enumerate(changelog): if line.startsw...
<commit_before>#!/usr/bin/python import sys if len(sys.argv) < 2: print("Usage: %s <changelog> [<version>]" % (sys.argv[0],)) sys.exit(1) changelog = open(sys.argv[1]).readlines() version = "latest" if len(sys.argv) > 2: version = sys.argv[2] start = 0 end = -1 for i, line in enumerate(changelog): ...
543336f68dd96a9d19a6cc4598ddd99fd06ad026
warehouse/accounts/urls.py
warehouse/accounts/urls.py
# Copyright 2013 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
# Copyright 2013 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
Move from /~username/ to /user/username/
Move from /~username/ to /user/username/
Python
apache-2.0
mattrobenolt/warehouse,mattrobenolt/warehouse,techtonik/warehouse,robhudson/warehouse,techtonik/warehouse,robhudson/warehouse,mattrobenolt/warehouse
# Copyright 2013 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
# Copyright 2013 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
<commit_before># Copyright 2013 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
# Copyright 2013 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
# Copyright 2013 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
<commit_before># Copyright 2013 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
911a7a2fb68f4dcc64e88b65b758e4a06b2d7dcb
cloud_maker/py_version.py
cloud_maker/py_version.py
# vim: fileencoding=utf-8 from __future__ import print_function, absolute_import, unicode_literals import sys class VersionError (ValueError): pass def check_ex (): v = sys.version_info if v.major == 3: if v.minor < 3 or (v.minor == 3 and v.micro < 4): raise VersionError("Error: this i...
# vim: fileencoding=utf-8 from __future__ import print_function, absolute_import, unicode_literals import sys class VersionError (ValueError): pass def check_ex (): v = sys.version_info if v.major == 3: if v.minor < 3 or (v.minor == 3 and v.micro < 4): raise VersionError("Error: this i...
Print only the message, not the whole tuple.
Print only the message, not the whole tuple.
Python
mit
sapphirecat/cloud-maker,sapphirecat/cloud-maker
# vim: fileencoding=utf-8 from __future__ import print_function, absolute_import, unicode_literals import sys class VersionError (ValueError): pass def check_ex (): v = sys.version_info if v.major == 3: if v.minor < 3 or (v.minor == 3 and v.micro < 4): raise VersionError("Error: this i...
# vim: fileencoding=utf-8 from __future__ import print_function, absolute_import, unicode_literals import sys class VersionError (ValueError): pass def check_ex (): v = sys.version_info if v.major == 3: if v.minor < 3 or (v.minor == 3 and v.micro < 4): raise VersionError("Error: this i...
<commit_before># vim: fileencoding=utf-8 from __future__ import print_function, absolute_import, unicode_literals import sys class VersionError (ValueError): pass def check_ex (): v = sys.version_info if v.major == 3: if v.minor < 3 or (v.minor == 3 and v.micro < 4): raise VersionError...
# vim: fileencoding=utf-8 from __future__ import print_function, absolute_import, unicode_literals import sys class VersionError (ValueError): pass def check_ex (): v = sys.version_info if v.major == 3: if v.minor < 3 or (v.minor == 3 and v.micro < 4): raise VersionError("Error: this i...
# vim: fileencoding=utf-8 from __future__ import print_function, absolute_import, unicode_literals import sys class VersionError (ValueError): pass def check_ex (): v = sys.version_info if v.major == 3: if v.minor < 3 or (v.minor == 3 and v.micro < 4): raise VersionError("Error: this i...
<commit_before># vim: fileencoding=utf-8 from __future__ import print_function, absolute_import, unicode_literals import sys class VersionError (ValueError): pass def check_ex (): v = sys.version_info if v.major == 3: if v.minor < 3 or (v.minor == 3 and v.micro < 4): raise VersionError...
c8c68dfc05c4e661a147a32eccc27b3fd3e84174
tools/bootstrap_project.py
tools/bootstrap_project.py
# TODO: Implement!
# TODO: Implement! ''' We want a folder structure something like this: |-bin |-conf |-doc | \-paper |-experiments | \-2000-01-01-example | |-audit | |-bin | |-conf | |-data | |-doc | |-lib | |-log | |-raw | |-results | |-run | \-tmp |-lib |-raw |-results \-src '''
Add comments in boostrap script
Add comments in boostrap script
Python
mit
pharmbio/sciluigi,samuell/sciluigi,pharmbio/sciluigi
# TODO: Implement! Add comments in boostrap script
# TODO: Implement! ''' We want a folder structure something like this: |-bin |-conf |-doc | \-paper |-experiments | \-2000-01-01-example | |-audit | |-bin | |-conf | |-data | |-doc | |-lib | |-log | |-raw | |-results | |-run | \-tmp |-lib |-raw |-results \-src '''
<commit_before># TODO: Implement! <commit_msg>Add comments in boostrap script<commit_after>
# TODO: Implement! ''' We want a folder structure something like this: |-bin |-conf |-doc | \-paper |-experiments | \-2000-01-01-example | |-audit | |-bin | |-conf | |-data | |-doc | |-lib | |-log | |-raw | |-results | |-run | \-tmp |-lib |-raw |-results \-src '''
# TODO: Implement! Add comments in boostrap script# TODO: Implement! ''' We want a folder structure something like this: |-bin |-conf |-doc | \-paper |-experiments | \-2000-01-01-example | |-audit | |-bin | |-conf | |-data | |-doc | |-lib | |-log | |-raw | |-results | |-run | \-tmp |-lib |-raw |...
<commit_before># TODO: Implement! <commit_msg>Add comments in boostrap script<commit_after># TODO: Implement! ''' We want a folder structure something like this: |-bin |-conf |-doc | \-paper |-experiments | \-2000-01-01-example | |-audit | |-bin | |-conf | |-data | |-doc | |-lib | |-log | |-raw | |-...
911ae13f760d221f5477cb5d518d4a9719386b81
demo/demo_esutils/mappings.py
demo/demo_esutils/mappings.py
# -*- coding: utf-8 -*- from django.db.models.signals import post_save from django.db.models.signals import post_delete from django_esutils.mappings import SearchMappingType from demo_esutils.models import Article ARTICLE_MAPPING = { # author 'author__username': { 'type': 'string', }, 'autho...
# -*- coding: utf-8 -*- from django.db.models.signals import post_save from django.db.models.signals import post_delete from django_esutils.mappings import SearchMappingType from django_esutils.models import post_update from demo_esutils.models import Article ARTICLE_MAPPING = { # author 'author__username':...
Update signals methods to call and connects Article to post_update signal.
Update signals methods to call and connects Article to post_update signal.
Python
mit
novafloss/django-esutils,novafloss/django-esutils
# -*- coding: utf-8 -*- from django.db.models.signals import post_save from django.db.models.signals import post_delete from django_esutils.mappings import SearchMappingType from demo_esutils.models import Article ARTICLE_MAPPING = { # author 'author__username': { 'type': 'string', }, 'autho...
# -*- coding: utf-8 -*- from django.db.models.signals import post_save from django.db.models.signals import post_delete from django_esutils.mappings import SearchMappingType from django_esutils.models import post_update from demo_esutils.models import Article ARTICLE_MAPPING = { # author 'author__username':...
<commit_before># -*- coding: utf-8 -*- from django.db.models.signals import post_save from django.db.models.signals import post_delete from django_esutils.mappings import SearchMappingType from demo_esutils.models import Article ARTICLE_MAPPING = { # author 'author__username': { 'type': 'string', ...
# -*- coding: utf-8 -*- from django.db.models.signals import post_save from django.db.models.signals import post_delete from django_esutils.mappings import SearchMappingType from django_esutils.models import post_update from demo_esutils.models import Article ARTICLE_MAPPING = { # author 'author__username':...
# -*- coding: utf-8 -*- from django.db.models.signals import post_save from django.db.models.signals import post_delete from django_esutils.mappings import SearchMappingType from demo_esutils.models import Article ARTICLE_MAPPING = { # author 'author__username': { 'type': 'string', }, 'autho...
<commit_before># -*- coding: utf-8 -*- from django.db.models.signals import post_save from django.db.models.signals import post_delete from django_esutils.mappings import SearchMappingType from demo_esutils.models import Article ARTICLE_MAPPING = { # author 'author__username': { 'type': 'string', ...
b4578d34adaa641dab5082f9d2bffe14c69649c5
detour/__init__.py
detour/__init__.py
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals __version_info__ = '0.1.0' __version__ = '0.1.0' version = '0.1.0' VERSION = '0.1.0' def get_version(): return version # pragma: no cover
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals __version_info__ = '0.1.0' __version__ = '0.1.0' version = '0.1.0' VERSION = '0.1.0' def get_version(): return version # pragma: no cover class DetourException(NotImplementedError): pass
Add a root exception for use if necessary.
Add a root exception for use if necessary.
Python
bsd-2-clause
kezabelle/wsgi-detour
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals __version_info__ = '0.1.0' __version__ = '0.1.0' version = '0.1.0' VERSION = '0.1.0' def get_version(): return version # pragma: no cover Add a root exception for use if necessary.
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals __version_info__ = '0.1.0' __version__ = '0.1.0' version = '0.1.0' VERSION = '0.1.0' def get_version(): return version # pragma: no cover class DetourException(NotImplementedError): pass
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals __version_info__ = '0.1.0' __version__ = '0.1.0' version = '0.1.0' VERSION = '0.1.0' def get_version(): return version # pragma: no cover <commit_msg>Add a root exception for use if necessary.<co...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals __version_info__ = '0.1.0' __version__ = '0.1.0' version = '0.1.0' VERSION = '0.1.0' def get_version(): return version # pragma: no cover class DetourException(NotImplementedError): pass
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals __version_info__ = '0.1.0' __version__ = '0.1.0' version = '0.1.0' VERSION = '0.1.0' def get_version(): return version # pragma: no cover Add a root exception for use if necessary.# -*- coding: utf-8 -*- from _...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals __version_info__ = '0.1.0' __version__ = '0.1.0' version = '0.1.0' VERSION = '0.1.0' def get_version(): return version # pragma: no cover <commit_msg>Add a root exception for use if necessary.<co...
a135e5a0919f64984b1348c3956bd95dc183e874
scripts/test_deployment.py
scripts/test_deployment.py
import os import pytest import requests @pytest.fixture def url(): return os.getenv("SITE", "http://localhost:5000") def test_post_images(expect, url): params = {"key": "iw", "lines": ["test", "deployment"]} response = requests.post(f"{url}/api/images", json=params) expect(response.status_code) == ...
import os import pytest import requests @pytest.fixture def url(): return os.getenv("SITE", "http://localhost:5000") def test_post_images(expect, url): params = {"key": "iw", "lines": ["test", "deployment"]} response = requests.post(f"{url}/api/images", json=params) expect(response.status_code) == ...
Add test for custom images
Add test for custom images
Python
mit
jacebrowning/memegen,jacebrowning/memegen
import os import pytest import requests @pytest.fixture def url(): return os.getenv("SITE", "http://localhost:5000") def test_post_images(expect, url): params = {"key": "iw", "lines": ["test", "deployment"]} response = requests.post(f"{url}/api/images", json=params) expect(response.status_code) == ...
import os import pytest import requests @pytest.fixture def url(): return os.getenv("SITE", "http://localhost:5000") def test_post_images(expect, url): params = {"key": "iw", "lines": ["test", "deployment"]} response = requests.post(f"{url}/api/images", json=params) expect(response.status_code) == ...
<commit_before>import os import pytest import requests @pytest.fixture def url(): return os.getenv("SITE", "http://localhost:5000") def test_post_images(expect, url): params = {"key": "iw", "lines": ["test", "deployment"]} response = requests.post(f"{url}/api/images", json=params) expect(response.s...
import os import pytest import requests @pytest.fixture def url(): return os.getenv("SITE", "http://localhost:5000") def test_post_images(expect, url): params = {"key": "iw", "lines": ["test", "deployment"]} response = requests.post(f"{url}/api/images", json=params) expect(response.status_code) == ...
import os import pytest import requests @pytest.fixture def url(): return os.getenv("SITE", "http://localhost:5000") def test_post_images(expect, url): params = {"key": "iw", "lines": ["test", "deployment"]} response = requests.post(f"{url}/api/images", json=params) expect(response.status_code) == ...
<commit_before>import os import pytest import requests @pytest.fixture def url(): return os.getenv("SITE", "http://localhost:5000") def test_post_images(expect, url): params = {"key": "iw", "lines": ["test", "deployment"]} response = requests.post(f"{url}/api/images", json=params) expect(response.s...
ffb1dcff764b7494e0990f85f3af5f2354de0657
zou/app/models/serializer.py
zou/app/models/serializer.py
from sqlalchemy.inspection import inspect from zou.app.utils.fields import serialize_value class SerializerMixin(object): def serialize(self): attrs = inspect(self).attrs.keys() return { attr: serialize_value(getattr(self, attr)) for attr in attrs } @staticmethod def ...
from sqlalchemy.inspection import inspect from zou.app.utils.fields import serialize_value class SerializerMixin(object): def serialize(self, obj_type=None): attrs = inspect(self).attrs.keys() obj_dict = { attr: serialize_value(getattr(self, attr)) for attr in attrs } ...
Add object type to dict serialization
Add object type to dict serialization
Python
agpl-3.0
cgwire/zou
from sqlalchemy.inspection import inspect from zou.app.utils.fields import serialize_value class SerializerMixin(object): def serialize(self): attrs = inspect(self).attrs.keys() return { attr: serialize_value(getattr(self, attr)) for attr in attrs } @staticmethod def ...
from sqlalchemy.inspection import inspect from zou.app.utils.fields import serialize_value class SerializerMixin(object): def serialize(self, obj_type=None): attrs = inspect(self).attrs.keys() obj_dict = { attr: serialize_value(getattr(self, attr)) for attr in attrs } ...
<commit_before>from sqlalchemy.inspection import inspect from zou.app.utils.fields import serialize_value class SerializerMixin(object): def serialize(self): attrs = inspect(self).attrs.keys() return { attr: serialize_value(getattr(self, attr)) for attr in attrs } @static...
from sqlalchemy.inspection import inspect from zou.app.utils.fields import serialize_value class SerializerMixin(object): def serialize(self, obj_type=None): attrs = inspect(self).attrs.keys() obj_dict = { attr: serialize_value(getattr(self, attr)) for attr in attrs } ...
from sqlalchemy.inspection import inspect from zou.app.utils.fields import serialize_value class SerializerMixin(object): def serialize(self): attrs = inspect(self).attrs.keys() return { attr: serialize_value(getattr(self, attr)) for attr in attrs } @staticmethod def ...
<commit_before>from sqlalchemy.inspection import inspect from zou.app.utils.fields import serialize_value class SerializerMixin(object): def serialize(self): attrs = inspect(self).attrs.keys() return { attr: serialize_value(getattr(self, attr)) for attr in attrs } @static...
e4559636b7b95414fef10d40cce1c104712c432e
entrypoint.py
entrypoint.py
#!/usr/bin/python3 # # Define containerized environment for running Diosix on Qemu # # On Google Cloud Run: Creates HTTP server on port 8080 # or whatever was specified using the PORT system variable. # Outputs via the HTTP port. This requires K_SERVICE to be set. # # On all other environments: Log to stdout # # syntax...
#!/usr/bin/python3 # # Define containerized environment for running Diosix on Qemu # # On Google Cloud Run: Creates HTTP server on port 8080 # or whatever was specified using the PORT system variable. # Outputs via the HTTP port. This requires K_SERVICE to be set. # # On all other environments: Log to stdout # # syntax...
Debug Google Cloud Run support
Debug Google Cloud Run support
Python
mit
diodesign/diosix
#!/usr/bin/python3 # # Define containerized environment for running Diosix on Qemu # # On Google Cloud Run: Creates HTTP server on port 8080 # or whatever was specified using the PORT system variable. # Outputs via the HTTP port. This requires K_SERVICE to be set. # # On all other environments: Log to stdout # # syntax...
#!/usr/bin/python3 # # Define containerized environment for running Diosix on Qemu # # On Google Cloud Run: Creates HTTP server on port 8080 # or whatever was specified using the PORT system variable. # Outputs via the HTTP port. This requires K_SERVICE to be set. # # On all other environments: Log to stdout # # syntax...
<commit_before>#!/usr/bin/python3 # # Define containerized environment for running Diosix on Qemu # # On Google Cloud Run: Creates HTTP server on port 8080 # or whatever was specified using the PORT system variable. # Outputs via the HTTP port. This requires K_SERVICE to be set. # # On all other environments: Log to st...
#!/usr/bin/python3 # # Define containerized environment for running Diosix on Qemu # # On Google Cloud Run: Creates HTTP server on port 8080 # or whatever was specified using the PORT system variable. # Outputs via the HTTP port. This requires K_SERVICE to be set. # # On all other environments: Log to stdout # # syntax...
#!/usr/bin/python3 # # Define containerized environment for running Diosix on Qemu # # On Google Cloud Run: Creates HTTP server on port 8080 # or whatever was specified using the PORT system variable. # Outputs via the HTTP port. This requires K_SERVICE to be set. # # On all other environments: Log to stdout # # syntax...
<commit_before>#!/usr/bin/python3 # # Define containerized environment for running Diosix on Qemu # # On Google Cloud Run: Creates HTTP server on port 8080 # or whatever was specified using the PORT system variable. # Outputs via the HTTP port. This requires K_SERVICE to be set. # # On all other environments: Log to st...
9ef3e6d884566b514be50dd468665cd65e939a9f
akhet/urlgenerator.py
akhet/urlgenerator.py
""" Contributed by Michael Mericikel. """ from pyramid.decorator import reify import pyramid.url as url class URLGenerator(object): def __init__(self, context, request): self.context = context self.request = request @reify def context(self): return url.resource_url(self.context, s...
""" Contributed by Michael Mericikel. """ from pyramid.decorator import reify import pyramid.url as url class URLGenerator(object): def __init__(self, context, request): self.context = context self.request = request @reify def context(self): return url.resource_url(self.context, s...
Comment out 'static' and 'deform' methods; disagreements on long-term API.
Comment out 'static' and 'deform' methods; disagreements on long-term API.
Python
mit
koansys/akhet,koansys/akhet
""" Contributed by Michael Mericikel. """ from pyramid.decorator import reify import pyramid.url as url class URLGenerator(object): def __init__(self, context, request): self.context = context self.request = request @reify def context(self): return url.resource_url(self.context, s...
""" Contributed by Michael Mericikel. """ from pyramid.decorator import reify import pyramid.url as url class URLGenerator(object): def __init__(self, context, request): self.context = context self.request = request @reify def context(self): return url.resource_url(self.context, s...
<commit_before>""" Contributed by Michael Mericikel. """ from pyramid.decorator import reify import pyramid.url as url class URLGenerator(object): def __init__(self, context, request): self.context = context self.request = request @reify def context(self): return url.resource_url(...
""" Contributed by Michael Mericikel. """ from pyramid.decorator import reify import pyramid.url as url class URLGenerator(object): def __init__(self, context, request): self.context = context self.request = request @reify def context(self): return url.resource_url(self.context, s...
""" Contributed by Michael Mericikel. """ from pyramid.decorator import reify import pyramid.url as url class URLGenerator(object): def __init__(self, context, request): self.context = context self.request = request @reify def context(self): return url.resource_url(self.context, s...
<commit_before>""" Contributed by Michael Mericikel. """ from pyramid.decorator import reify import pyramid.url as url class URLGenerator(object): def __init__(self, context, request): self.context = context self.request = request @reify def context(self): return url.resource_url(...
369f607df1efa7cd715a1d5ed4d86b972f44d23b
project/home/views.py
project/home/views.py
# imports from flask import render_template, Blueprint from project import db # pragma: no cover from project.models import Person # pragma: no cover # config home_blueprint = Blueprint( 'home', __name__, template_folder='templates' ) # pragma: no cover # routes # use decorators to link the function...
# imports from flask import render_template, Blueprint from project import db # pragma: no cover from project.models import Person # pragma: no cover import random # config home_blueprint = Blueprint( 'home', __name__, template_folder='templates' ) # pragma: no cover MAX_GRID_SIZE_HOMEPAGE_PEOPLE = 6...
Select MAX people randomly, else all.
Select MAX people randomly, else all.
Python
isc
dhmncivichacks/timewebsite,mikeputnam/timewebsite,mikeputnam/timewebsite,dhmncivichacks/timewebsite,dhmncivichacks/timewebsite,mikeputnam/timewebsite
# imports from flask import render_template, Blueprint from project import db # pragma: no cover from project.models import Person # pragma: no cover # config home_blueprint = Blueprint( 'home', __name__, template_folder='templates' ) # pragma: no cover # routes # use decorators to link the function...
# imports from flask import render_template, Blueprint from project import db # pragma: no cover from project.models import Person # pragma: no cover import random # config home_blueprint = Blueprint( 'home', __name__, template_folder='templates' ) # pragma: no cover MAX_GRID_SIZE_HOMEPAGE_PEOPLE = 6...
<commit_before> # imports from flask import render_template, Blueprint from project import db # pragma: no cover from project.models import Person # pragma: no cover # config home_blueprint = Blueprint( 'home', __name__, template_folder='templates' ) # pragma: no cover # routes # use decorators to li...
# imports from flask import render_template, Blueprint from project import db # pragma: no cover from project.models import Person # pragma: no cover import random # config home_blueprint = Blueprint( 'home', __name__, template_folder='templates' ) # pragma: no cover MAX_GRID_SIZE_HOMEPAGE_PEOPLE = 6...
# imports from flask import render_template, Blueprint from project import db # pragma: no cover from project.models import Person # pragma: no cover # config home_blueprint = Blueprint( 'home', __name__, template_folder='templates' ) # pragma: no cover # routes # use decorators to link the function...
<commit_before> # imports from flask import render_template, Blueprint from project import db # pragma: no cover from project.models import Person # pragma: no cover # config home_blueprint = Blueprint( 'home', __name__, template_folder='templates' ) # pragma: no cover # routes # use decorators to li...
42869823b4af024906606c5caf50e5dc5de69a57
api/mcapi/user/projects.py
api/mcapi/user/projects.py
from ..mcapp import app from ..decorators import apikey, jsonp from flask import g import rethinkdb as r #from .. import dmutil from .. import args from ..utils import error_response @app.route('/v1.0/user/<user>/projects', methods=['GET']) @apikey @jsonp def get_all_projects(user): rr = r.table('projects').filter...
from ..mcapp import app from ..decorators import apikey, jsonp from flask import g import rethinkdb as r #from .. import dmutil from .. import args from ..utils import error_response @app.route('/v1.0/user/<user>/projects', methods=['GET']) @apikey @jsonp def get_all_projects(user): rr = r.table('projects').filter...
Add call to get datadirs for a project.
Add call to get datadirs for a project.
Python
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
from ..mcapp import app from ..decorators import apikey, jsonp from flask import g import rethinkdb as r #from .. import dmutil from .. import args from ..utils import error_response @app.route('/v1.0/user/<user>/projects', methods=['GET']) @apikey @jsonp def get_all_projects(user): rr = r.table('projects').filter...
from ..mcapp import app from ..decorators import apikey, jsonp from flask import g import rethinkdb as r #from .. import dmutil from .. import args from ..utils import error_response @app.route('/v1.0/user/<user>/projects', methods=['GET']) @apikey @jsonp def get_all_projects(user): rr = r.table('projects').filter...
<commit_before>from ..mcapp import app from ..decorators import apikey, jsonp from flask import g import rethinkdb as r #from .. import dmutil from .. import args from ..utils import error_response @app.route('/v1.0/user/<user>/projects', methods=['GET']) @apikey @jsonp def get_all_projects(user): rr = r.table('pr...
from ..mcapp import app from ..decorators import apikey, jsonp from flask import g import rethinkdb as r #from .. import dmutil from .. import args from ..utils import error_response @app.route('/v1.0/user/<user>/projects', methods=['GET']) @apikey @jsonp def get_all_projects(user): rr = r.table('projects').filter...
from ..mcapp import app from ..decorators import apikey, jsonp from flask import g import rethinkdb as r #from .. import dmutil from .. import args from ..utils import error_response @app.route('/v1.0/user/<user>/projects', methods=['GET']) @apikey @jsonp def get_all_projects(user): rr = r.table('projects').filter...
<commit_before>from ..mcapp import app from ..decorators import apikey, jsonp from flask import g import rethinkdb as r #from .. import dmutil from .. import args from ..utils import error_response @app.route('/v1.0/user/<user>/projects', methods=['GET']) @apikey @jsonp def get_all_projects(user): rr = r.table('pr...
3d6577432444c46f0b35bd4b39e0a05f39c37e7f
gittaggers.py
gittaggers.py
from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_tag(self): ...
from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_tag(self): ...
Fix Python packaging to use correct git log for package time/version stamps.
Fix Python packaging to use correct git log for package time/version stamps.
Python
apache-2.0
jeremiahsavage/cwltool,SciDAP/cwltool,chapmanb/cwltool,common-workflow-language/cwltool,dleehr/cwltool,jeremiahsavage/cwltool,chapmanb/cwltool,common-workflow-language/cwltool,dleehr/cwltool,jeremiahsavage/cwltool,common-workflow-language/cwltool,chapmanb/cwltool,SciDAP/cwltool,chapmanb/cwltool,SciDAP/cwltool,dleehr/cw...
from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_tag(self): ...
from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_tag(self): ...
<commit_before>from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_t...
from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_tag(self): ...
from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_tag(self): ...
<commit_before>from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_t...
2c999f4a6bea1da70bf35f06283428ea0e196087
python/getmonotime.py
python/getmonotime.py
import getopt, sys if __name__ == '__main__': sippy_path = None try: opts, args = getopt.getopt(sys.argv[1:], 's:S:i:o:b') except getopt.GetoptError: usage() for o, a in opts: if o == '-S': sippy_path = a.strip() continue if sippy_path != None: ...
import getopt, sys if __name__ == '__main__': sippy_path = None try: opts, args = getopt.getopt(sys.argv[1:], 'rS:') except getopt.GetoptError: usage() out_realtime = False for o, a in opts: if o == '-S': sippy_path = a.strip() continue if o...
Add an option to also output realtime along with monotime.
Add an option to also output realtime along with monotime.
Python
bsd-2-clause
sippy/b2bua,sippy/b2bua
import getopt, sys if __name__ == '__main__': sippy_path = None try: opts, args = getopt.getopt(sys.argv[1:], 's:S:i:o:b') except getopt.GetoptError: usage() for o, a in opts: if o == '-S': sippy_path = a.strip() continue if sippy_path != None: ...
import getopt, sys if __name__ == '__main__': sippy_path = None try: opts, args = getopt.getopt(sys.argv[1:], 'rS:') except getopt.GetoptError: usage() out_realtime = False for o, a in opts: if o == '-S': sippy_path = a.strip() continue if o...
<commit_before>import getopt, sys if __name__ == '__main__': sippy_path = None try: opts, args = getopt.getopt(sys.argv[1:], 's:S:i:o:b') except getopt.GetoptError: usage() for o, a in opts: if o == '-S': sippy_path = a.strip() continue if sippy_pa...
import getopt, sys if __name__ == '__main__': sippy_path = None try: opts, args = getopt.getopt(sys.argv[1:], 'rS:') except getopt.GetoptError: usage() out_realtime = False for o, a in opts: if o == '-S': sippy_path = a.strip() continue if o...
import getopt, sys if __name__ == '__main__': sippy_path = None try: opts, args = getopt.getopt(sys.argv[1:], 's:S:i:o:b') except getopt.GetoptError: usage() for o, a in opts: if o == '-S': sippy_path = a.strip() continue if sippy_path != None: ...
<commit_before>import getopt, sys if __name__ == '__main__': sippy_path = None try: opts, args = getopt.getopt(sys.argv[1:], 's:S:i:o:b') except getopt.GetoptError: usage() for o, a in opts: if o == '-S': sippy_path = a.strip() continue if sippy_pa...
fa22d91e053f301498d9d09a950558758bf9b40f
patroni/exceptions.py
patroni/exceptions.py
class PatroniException(Exception): pass class DCSError(PatroniException): """Parent class for all kind of exceptions related to selected distributed configuration store""" def __init__(self, value): self.value = value def __str__(self): """ >>> str(DCSError('foo')) "...
class PatroniException(Exception): """Parent class for all kind of exceptions related to selected distributed configuration store""" def __init__(self, value): self.value = value def __str__(self): """ >>> str(DCSError('foo')) "'foo'" """ return repr(self.v...
Move some basic methods implementation into parent exception class
Move some basic methods implementation into parent exception class
Python
mit
sean-/patroni,pgexperts/patroni,zalando/patroni,sean-/patroni,jinty/patroni,jinty/patroni,zalando/patroni,pgexperts/patroni
class PatroniException(Exception): pass class DCSError(PatroniException): """Parent class for all kind of exceptions related to selected distributed configuration store""" def __init__(self, value): self.value = value def __str__(self): """ >>> str(DCSError('foo')) "...
class PatroniException(Exception): """Parent class for all kind of exceptions related to selected distributed configuration store""" def __init__(self, value): self.value = value def __str__(self): """ >>> str(DCSError('foo')) "'foo'" """ return repr(self.v...
<commit_before>class PatroniException(Exception): pass class DCSError(PatroniException): """Parent class for all kind of exceptions related to selected distributed configuration store""" def __init__(self, value): self.value = value def __str__(self): """ >>> str(DCSError('f...
class PatroniException(Exception): """Parent class for all kind of exceptions related to selected distributed configuration store""" def __init__(self, value): self.value = value def __str__(self): """ >>> str(DCSError('foo')) "'foo'" """ return repr(self.v...
class PatroniException(Exception): pass class DCSError(PatroniException): """Parent class for all kind of exceptions related to selected distributed configuration store""" def __init__(self, value): self.value = value def __str__(self): """ >>> str(DCSError('foo')) "...
<commit_before>class PatroniException(Exception): pass class DCSError(PatroniException): """Parent class for all kind of exceptions related to selected distributed configuration store""" def __init__(self, value): self.value = value def __str__(self): """ >>> str(DCSError('f...
f0ede3d2c32d4d3adce98cd3b762b672f7af91a9
relay_api/__main__.py
relay_api/__main__.py
from relay_api.api.server import server from relay_api.core.relay import relay from relay_api.conf.config import relays import relay_api.api.server as api for r in relays: relays[r]["instance"] = relay(relays[r]["gpio"], relays[r]["NC"]) @server.route("/relay-api/relays", metho...
from relay_api.api.server import server from relay_api.core.relay import relay from relay_api.conf.config import relays import relay_api.api.server as api relays_dict = {} for r in relays: relays_dict[r] = relay(relays[r]["gpio"], relays[r]["NC"]) @server.route("/relay-api/relays", methods=["GET"]) def get_rela...
Update to generate a dict with the relay instances
Update to generate a dict with the relay instances
Python
mit
pahumadad/raspi-relay-api
from relay_api.api.server import server from relay_api.core.relay import relay from relay_api.conf.config import relays import relay_api.api.server as api for r in relays: relays[r]["instance"] = relay(relays[r]["gpio"], relays[r]["NC"]) @server.route("/relay-api/relays", metho...
from relay_api.api.server import server from relay_api.core.relay import relay from relay_api.conf.config import relays import relay_api.api.server as api relays_dict = {} for r in relays: relays_dict[r] = relay(relays[r]["gpio"], relays[r]["NC"]) @server.route("/relay-api/relays", methods=["GET"]) def get_rela...
<commit_before>from relay_api.api.server import server from relay_api.core.relay import relay from relay_api.conf.config import relays import relay_api.api.server as api for r in relays: relays[r]["instance"] = relay(relays[r]["gpio"], relays[r]["NC"]) @server.route("/relay-api...
from relay_api.api.server import server from relay_api.core.relay import relay from relay_api.conf.config import relays import relay_api.api.server as api relays_dict = {} for r in relays: relays_dict[r] = relay(relays[r]["gpio"], relays[r]["NC"]) @server.route("/relay-api/relays", methods=["GET"]) def get_rela...
from relay_api.api.server import server from relay_api.core.relay import relay from relay_api.conf.config import relays import relay_api.api.server as api for r in relays: relays[r]["instance"] = relay(relays[r]["gpio"], relays[r]["NC"]) @server.route("/relay-api/relays", metho...
<commit_before>from relay_api.api.server import server from relay_api.core.relay import relay from relay_api.conf.config import relays import relay_api.api.server as api for r in relays: relays[r]["instance"] = relay(relays[r]["gpio"], relays[r]["NC"]) @server.route("/relay-api...
90a6d5be4e328a4ee9a2c05c40188d639e191be5
wsgi.py
wsgi.py
#!/usr/bin/python import os if os.environ.get('OPENSHIFT_PYTHON_DIR'): # on Openshift virtenv = os.environ.get('OPENSHIFT_PYTHON_DIR') + '/virtenv/' virtualenv = os.path.join(virtenv, 'bin/activate_this.py') try: execfile(virtualenv, dict(__file__=virtualenv)) except IOError: pass ...
#!/usr/bin/python import os from rtrss import config if os.environ.get('OPENSHIFT_PYTHON_DIR'): # on Openshift virtenv = os.environ.get('OPENSHIFT_PYTHON_DIR') + '/virtenv/' virtualenv = os.path.join(virtenv, 'bin/activate_this.py') try: execfile(virtualenv, dict(__file__=virtualenv)) exc...
Read IP and PORT from configuration
Read IP and PORT from configuration
Python
apache-2.0
notapresent/rtrss,notapresent/rtrss,notapresent/rtrss,notapresent/rtrss
#!/usr/bin/python import os if os.environ.get('OPENSHIFT_PYTHON_DIR'): # on Openshift virtenv = os.environ.get('OPENSHIFT_PYTHON_DIR') + '/virtenv/' virtualenv = os.path.join(virtenv, 'bin/activate_this.py') try: execfile(virtualenv, dict(__file__=virtualenv)) except IOError: pass ...
#!/usr/bin/python import os from rtrss import config if os.environ.get('OPENSHIFT_PYTHON_DIR'): # on Openshift virtenv = os.environ.get('OPENSHIFT_PYTHON_DIR') + '/virtenv/' virtualenv = os.path.join(virtenv, 'bin/activate_this.py') try: execfile(virtualenv, dict(__file__=virtualenv)) exc...
<commit_before>#!/usr/bin/python import os if os.environ.get('OPENSHIFT_PYTHON_DIR'): # on Openshift virtenv = os.environ.get('OPENSHIFT_PYTHON_DIR') + '/virtenv/' virtualenv = os.path.join(virtenv, 'bin/activate_this.py') try: execfile(virtualenv, dict(__file__=virtualenv)) except IOError...
#!/usr/bin/python import os from rtrss import config if os.environ.get('OPENSHIFT_PYTHON_DIR'): # on Openshift virtenv = os.environ.get('OPENSHIFT_PYTHON_DIR') + '/virtenv/' virtualenv = os.path.join(virtenv, 'bin/activate_this.py') try: execfile(virtualenv, dict(__file__=virtualenv)) exc...
#!/usr/bin/python import os if os.environ.get('OPENSHIFT_PYTHON_DIR'): # on Openshift virtenv = os.environ.get('OPENSHIFT_PYTHON_DIR') + '/virtenv/' virtualenv = os.path.join(virtenv, 'bin/activate_this.py') try: execfile(virtualenv, dict(__file__=virtualenv)) except IOError: pass ...
<commit_before>#!/usr/bin/python import os if os.environ.get('OPENSHIFT_PYTHON_DIR'): # on Openshift virtenv = os.environ.get('OPENSHIFT_PYTHON_DIR') + '/virtenv/' virtualenv = os.path.join(virtenv, 'bin/activate_this.py') try: execfile(virtualenv, dict(__file__=virtualenv)) except IOError...
200c6bd9f5cbee49c52b1598cac42dd6a4e0b273
helpers/s3.py
helpers/s3.py
import threading import boto3 import objects.glob from common.log import logUtils as log def getClient(): return objects.glob.s3Connections[threading.get_ident()] def getWriteReplayBucketName(): return objects.glob.db.fetch("SELECT `name` FROM s3_replay_buckets WHERE max_score_id IS NULL LIMIT 1")["name"]...
import threading import boto3 import objects.glob from common.log import logUtils as log def getClient(): return objects.glob.s3Connections[threading.get_ident()] def getWriteReplayBucketName(): r = objects.glob.db.fetch("SELECT `name` FROM s3_replay_buckets WHERE max_score_id IS NULL LIMIT 1") if r i...
Add write bucket exists check also when getting its name
Add write bucket exists check also when getting its name
Python
agpl-3.0
osuripple/lets,osuripple/lets
import threading import boto3 import objects.glob from common.log import logUtils as log def getClient(): return objects.glob.s3Connections[threading.get_ident()] def getWriteReplayBucketName(): return objects.glob.db.fetch("SELECT `name` FROM s3_replay_buckets WHERE max_score_id IS NULL LIMIT 1")["name"]...
import threading import boto3 import objects.glob from common.log import logUtils as log def getClient(): return objects.glob.s3Connections[threading.get_ident()] def getWriteReplayBucketName(): r = objects.glob.db.fetch("SELECT `name` FROM s3_replay_buckets WHERE max_score_id IS NULL LIMIT 1") if r i...
<commit_before>import threading import boto3 import objects.glob from common.log import logUtils as log def getClient(): return objects.glob.s3Connections[threading.get_ident()] def getWriteReplayBucketName(): return objects.glob.db.fetch("SELECT `name` FROM s3_replay_buckets WHERE max_score_id IS NULL LI...
import threading import boto3 import objects.glob from common.log import logUtils as log def getClient(): return objects.glob.s3Connections[threading.get_ident()] def getWriteReplayBucketName(): r = objects.glob.db.fetch("SELECT `name` FROM s3_replay_buckets WHERE max_score_id IS NULL LIMIT 1") if r i...
import threading import boto3 import objects.glob from common.log import logUtils as log def getClient(): return objects.glob.s3Connections[threading.get_ident()] def getWriteReplayBucketName(): return objects.glob.db.fetch("SELECT `name` FROM s3_replay_buckets WHERE max_score_id IS NULL LIMIT 1")["name"]...
<commit_before>import threading import boto3 import objects.glob from common.log import logUtils as log def getClient(): return objects.glob.s3Connections[threading.get_ident()] def getWriteReplayBucketName(): return objects.glob.db.fetch("SELECT `name` FROM s3_replay_buckets WHERE max_score_id IS NULL LI...
f0ed93d51980856daa1d7bff8bf76909fabe5b65
urls.py
urls.py
from django.conf.urls.defaults import * from django.contrib import admin from django.conf import settings admin.autodiscover() urlpatterns = patterns('', (r'^admin/(.*)', admin.site.root), (r'^', include('blangoblog.blango.urls')), ) handler500 = 'blango.views.server_error' handler404 = 'blango.views.page_not...
from django.conf.urls.defaults import * from django.contrib import admin from django.conf import settings admin.autodiscover() urlpatterns = patterns('', (r'^admin/(.*)', admin.site.root), (r'^', include('blangoblog.blango.urls')), ) handler500 = 'blango.views.server_error' handler404 = 'blango.views.page_not...
Use a relative path for serving static files in development
Use a relative path for serving static files in development
Python
bsd-3-clause
fiam/blangoblog,fiam/blangoblog,fiam/blangoblog
from django.conf.urls.defaults import * from django.contrib import admin from django.conf import settings admin.autodiscover() urlpatterns = patterns('', (r'^admin/(.*)', admin.site.root), (r'^', include('blangoblog.blango.urls')), ) handler500 = 'blango.views.server_error' handler404 = 'blango.views.page_not...
from django.conf.urls.defaults import * from django.contrib import admin from django.conf import settings admin.autodiscover() urlpatterns = patterns('', (r'^admin/(.*)', admin.site.root), (r'^', include('blangoblog.blango.urls')), ) handler500 = 'blango.views.server_error' handler404 = 'blango.views.page_not...
<commit_before>from django.conf.urls.defaults import * from django.contrib import admin from django.conf import settings admin.autodiscover() urlpatterns = patterns('', (r'^admin/(.*)', admin.site.root), (r'^', include('blangoblog.blango.urls')), ) handler500 = 'blango.views.server_error' handler404 = 'blango...
from django.conf.urls.defaults import * from django.contrib import admin from django.conf import settings admin.autodiscover() urlpatterns = patterns('', (r'^admin/(.*)', admin.site.root), (r'^', include('blangoblog.blango.urls')), ) handler500 = 'blango.views.server_error' handler404 = 'blango.views.page_not...
from django.conf.urls.defaults import * from django.contrib import admin from django.conf import settings admin.autodiscover() urlpatterns = patterns('', (r'^admin/(.*)', admin.site.root), (r'^', include('blangoblog.blango.urls')), ) handler500 = 'blango.views.server_error' handler404 = 'blango.views.page_not...
<commit_before>from django.conf.urls.defaults import * from django.contrib import admin from django.conf import settings admin.autodiscover() urlpatterns = patterns('', (r'^admin/(.*)', admin.site.root), (r'^', include('blangoblog.blango.urls')), ) handler500 = 'blango.views.server_error' handler404 = 'blango...
a406334f0fcc26f235141e1d453c4aa5b632fdaf
nbconvert/utils/exceptions.py
nbconvert/utils/exceptions.py
"""Contains all of the exceptions used in NBConvert explicitly""" #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed w...
"""NbConvert specific exceptions""" #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----------...
Comment & Refactor, utils and nbconvert main.
Comment & Refactor, utils and nbconvert main.
Python
bsd-3-clause
jupyter-widgets/ipywidgets,cornhundred/ipywidgets,cornhundred/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets,cornhundred/ipywidgets,SylvainCorlay/ipywidgets,SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets,cornhundred/ipywidgets,cornhundred/ipywi...
"""Contains all of the exceptions used in NBConvert explicitly""" #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed w...
"""NbConvert specific exceptions""" #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----------...
<commit_before>"""Contains all of the exceptions used in NBConvert explicitly""" #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt...
"""NbConvert specific exceptions""" #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----------...
"""Contains all of the exceptions used in NBConvert explicitly""" #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed w...
<commit_before>"""Contains all of the exceptions used in NBConvert explicitly""" #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt...
bc0193a3a32521512b77e6149e91eab805836f8d
django_dbq/management/commands/queue_depth.py
django_dbq/management/commands/queue_depth.py
from django.core.management.base import BaseCommand from django_dbq.models import Job class Command(BaseCommand): help = "Print the current depth of the given queue" def add_arguments(self, parser): parser.add_argument("queue_name", nargs="*", default=["default"], type=str) def handle(self, *ar...
from django.core.management.base import BaseCommand from django_dbq.models import Job class Command(BaseCommand): help = "Print the current depth of the given queue" def add_arguments(self, parser): parser.add_argument("queue_name", nargs="*", default=["default"], type=str) def handle(self, *ar...
Convert f-string to .format call
Convert f-string to .format call
Python
bsd-2-clause
dabapps/django-db-queue
from django.core.management.base import BaseCommand from django_dbq.models import Job class Command(BaseCommand): help = "Print the current depth of the given queue" def add_arguments(self, parser): parser.add_argument("queue_name", nargs="*", default=["default"], type=str) def handle(self, *ar...
from django.core.management.base import BaseCommand from django_dbq.models import Job class Command(BaseCommand): help = "Print the current depth of the given queue" def add_arguments(self, parser): parser.add_argument("queue_name", nargs="*", default=["default"], type=str) def handle(self, *ar...
<commit_before>from django.core.management.base import BaseCommand from django_dbq.models import Job class Command(BaseCommand): help = "Print the current depth of the given queue" def add_arguments(self, parser): parser.add_argument("queue_name", nargs="*", default=["default"], type=str) def h...
from django.core.management.base import BaseCommand from django_dbq.models import Job class Command(BaseCommand): help = "Print the current depth of the given queue" def add_arguments(self, parser): parser.add_argument("queue_name", nargs="*", default=["default"], type=str) def handle(self, *ar...
from django.core.management.base import BaseCommand from django_dbq.models import Job class Command(BaseCommand): help = "Print the current depth of the given queue" def add_arguments(self, parser): parser.add_argument("queue_name", nargs="*", default=["default"], type=str) def handle(self, *ar...
<commit_before>from django.core.management.base import BaseCommand from django_dbq.models import Job class Command(BaseCommand): help = "Print the current depth of the given queue" def add_arguments(self, parser): parser.add_argument("queue_name", nargs="*", default=["default"], type=str) def h...
b493073ec6978b6291cc66491bb3406179013d3d
create_variants_databases.py
create_variants_databases.py
#!/usr/bin/env python import argparse import getpass from cassandra import query from cassandra.cqlengine.management import sync_table from cassandra.cqlengine.management import create_keyspace_simple from cassandra.cluster import Cluster from cassandra.cqlengine import connection from cassandra.auth import PlainTextA...
#!/usr/bin/env python import argparse import getpass from cassandra import query from cassandra.cqlengine.management import sync_table from cassandra.cqlengine.management import create_keyspace_simple from cassandra.cluster import Cluster from cassandra.cqlengine import connection from cassandra.auth import PlainTextA...
Add additional table to cassandra variant store
Add additional table to cassandra variant store
Python
mit
dgaston/ddb-datastore,dgaston/ddb-variantstore,dgaston/ddbio-variantstore,GastonLab/ddb-datastore
#!/usr/bin/env python import argparse import getpass from cassandra import query from cassandra.cqlengine.management import sync_table from cassandra.cqlengine.management import create_keyspace_simple from cassandra.cluster import Cluster from cassandra.cqlengine import connection from cassandra.auth import PlainTextA...
#!/usr/bin/env python import argparse import getpass from cassandra import query from cassandra.cqlengine.management import sync_table from cassandra.cqlengine.management import create_keyspace_simple from cassandra.cluster import Cluster from cassandra.cqlengine import connection from cassandra.auth import PlainTextA...
<commit_before>#!/usr/bin/env python import argparse import getpass from cassandra import query from cassandra.cqlengine.management import sync_table from cassandra.cqlengine.management import create_keyspace_simple from cassandra.cluster import Cluster from cassandra.cqlengine import connection from cassandra.auth im...
#!/usr/bin/env python import argparse import getpass from cassandra import query from cassandra.cqlengine.management import sync_table from cassandra.cqlengine.management import create_keyspace_simple from cassandra.cluster import Cluster from cassandra.cqlengine import connection from cassandra.auth import PlainTextA...
#!/usr/bin/env python import argparse import getpass from cassandra import query from cassandra.cqlengine.management import sync_table from cassandra.cqlengine.management import create_keyspace_simple from cassandra.cluster import Cluster from cassandra.cqlengine import connection from cassandra.auth import PlainTextA...
<commit_before>#!/usr/bin/env python import argparse import getpass from cassandra import query from cassandra.cqlengine.management import sync_table from cassandra.cqlengine.management import create_keyspace_simple from cassandra.cluster import Cluster from cassandra.cqlengine import connection from cassandra.auth im...
0a7fa2d65f2d563fbf36a2b39636dd8068cd4934
PyInstallerUtils.py
PyInstallerUtils.py
import os import sys def pyInstallerResourcePath(relativePath): basePath = getattr(sys, '_MEIPASS', os.path.abspath('./src')) return os.path.join(basePath, relativePath)
import os import sys def pyInstallerResourcePath(relativePath): basePath = getattr(sys, '_MEIPASS', os.path.abspath('.')) return os.path.join(basePath, relativePath)
Fix default file path location
Fix default file path location
Python
mit
JustinShenk/sensei
import os import sys def pyInstallerResourcePath(relativePath): basePath = getattr(sys, '_MEIPASS', os.path.abspath('./src')) return os.path.join(basePath, relativePath) Fix default file path location
import os import sys def pyInstallerResourcePath(relativePath): basePath = getattr(sys, '_MEIPASS', os.path.abspath('.')) return os.path.join(basePath, relativePath)
<commit_before>import os import sys def pyInstallerResourcePath(relativePath): basePath = getattr(sys, '_MEIPASS', os.path.abspath('./src')) return os.path.join(basePath, relativePath) <commit_msg>Fix default file path location<commit_after>
import os import sys def pyInstallerResourcePath(relativePath): basePath = getattr(sys, '_MEIPASS', os.path.abspath('.')) return os.path.join(basePath, relativePath)
import os import sys def pyInstallerResourcePath(relativePath): basePath = getattr(sys, '_MEIPASS', os.path.abspath('./src')) return os.path.join(basePath, relativePath) Fix default file path locationimport os import sys def pyInstallerResourcePath(relativePath): basePath = getattr(sys, '_MEIPASS', os.p...
<commit_before>import os import sys def pyInstallerResourcePath(relativePath): basePath = getattr(sys, '_MEIPASS', os.path.abspath('./src')) return os.path.join(basePath, relativePath) <commit_msg>Fix default file path location<commit_after>import os import sys def pyInstallerResourcePath(relativePath): ...
d46d896b63ac24759a21c49e30ff9b3dc5c81595
TS/Utils.py
TS/Utils.py
# Copyright (C) 2016 Antoine Carme <Antoine.Carme@Laposte.net> # All rights reserved. # This file is part of the Python Automatic Forecasting (PyAF) library and is made available under # the terms of the 3 Clause BSD license import sys, os def createDirIfNeeded(dirname): try: os.mkdir(dirname); excep...
# Copyright (C) 2016 Antoine Carme <Antoine.Carme@Laposte.net> # All rights reserved. # This file is part of the Python Automatic Forecasting (PyAF) library and is made available under # the terms of the 3 Clause BSD license import sys, os def createDirIfNeeded(dirname): try: os.mkdir(dirname); excep...
Enable default logging (not sure if this is OK)
Enable default logging (not sure if this is OK)
Python
bsd-3-clause
antoinecarme/pyaf,antoinecarme/pyaf,antoinecarme/pyaf
# Copyright (C) 2016 Antoine Carme <Antoine.Carme@Laposte.net> # All rights reserved. # This file is part of the Python Automatic Forecasting (PyAF) library and is made available under # the terms of the 3 Clause BSD license import sys, os def createDirIfNeeded(dirname): try: os.mkdir(dirname); excep...
# Copyright (C) 2016 Antoine Carme <Antoine.Carme@Laposte.net> # All rights reserved. # This file is part of the Python Automatic Forecasting (PyAF) library and is made available under # the terms of the 3 Clause BSD license import sys, os def createDirIfNeeded(dirname): try: os.mkdir(dirname); excep...
<commit_before># Copyright (C) 2016 Antoine Carme <Antoine.Carme@Laposte.net> # All rights reserved. # This file is part of the Python Automatic Forecasting (PyAF) library and is made available under # the terms of the 3 Clause BSD license import sys, os def createDirIfNeeded(dirname): try: os.mkdir(dirn...
# Copyright (C) 2016 Antoine Carme <Antoine.Carme@Laposte.net> # All rights reserved. # This file is part of the Python Automatic Forecasting (PyAF) library and is made available under # the terms of the 3 Clause BSD license import sys, os def createDirIfNeeded(dirname): try: os.mkdir(dirname); excep...
# Copyright (C) 2016 Antoine Carme <Antoine.Carme@Laposte.net> # All rights reserved. # This file is part of the Python Automatic Forecasting (PyAF) library and is made available under # the terms of the 3 Clause BSD license import sys, os def createDirIfNeeded(dirname): try: os.mkdir(dirname); excep...
<commit_before># Copyright (C) 2016 Antoine Carme <Antoine.Carme@Laposte.net> # All rights reserved. # This file is part of the Python Automatic Forecasting (PyAF) library and is made available under # the terms of the 3 Clause BSD license import sys, os def createDirIfNeeded(dirname): try: os.mkdir(dirn...
b9f5954b7760a326073cfec198e4247dac386f0d
demoapp/cliffdemo/main.py
demoapp/cliffdemo/main.py
import logging import sys from cliff.app import App from cliff.commandmanager import CommandManager class DemoApp(App): log = logging.getLogger(__name__) def __init__(self): super(DemoApp, self).__init__( description='cliff demo app', version='0.1', command_manag...
import sys from cliff.app import App from cliff.commandmanager import CommandManager class DemoApp(App): def __init__(self): super(DemoApp, self).__init__( description='cliff demo app', version='0.1', command_manager=CommandManager('cliff.demo'), ) de...
Fix logging config in demo app
Fix logging config in demo app The demo application was creating a new logger instance instead of using the one built into the base class. Change-Id: I980b180132cf20f7d2420e8f61e341760674aac0
Python
apache-2.0
openstack/cliff,enzochiau/cliff,idjaw/cliff,idjaw/cliff,openstack/cliff,enzochiau/cliff,dtroyer/cliff,dtroyer/cliff
import logging import sys from cliff.app import App from cliff.commandmanager import CommandManager class DemoApp(App): log = logging.getLogger(__name__) def __init__(self): super(DemoApp, self).__init__( description='cliff demo app', version='0.1', command_manag...
import sys from cliff.app import App from cliff.commandmanager import CommandManager class DemoApp(App): def __init__(self): super(DemoApp, self).__init__( description='cliff demo app', version='0.1', command_manager=CommandManager('cliff.demo'), ) de...
<commit_before>import logging import sys from cliff.app import App from cliff.commandmanager import CommandManager class DemoApp(App): log = logging.getLogger(__name__) def __init__(self): super(DemoApp, self).__init__( description='cliff demo app', version='0.1', ...
import sys from cliff.app import App from cliff.commandmanager import CommandManager class DemoApp(App): def __init__(self): super(DemoApp, self).__init__( description='cliff demo app', version='0.1', command_manager=CommandManager('cliff.demo'), ) de...
import logging import sys from cliff.app import App from cliff.commandmanager import CommandManager class DemoApp(App): log = logging.getLogger(__name__) def __init__(self): super(DemoApp, self).__init__( description='cliff demo app', version='0.1', command_manag...
<commit_before>import logging import sys from cliff.app import App from cliff.commandmanager import CommandManager class DemoApp(App): log = logging.getLogger(__name__) def __init__(self): super(DemoApp, self).__init__( description='cliff demo app', version='0.1', ...
35374e354bc34f01b47d8813ceea3fce2d175acf
rvusite/rvu/models.py
rvusite/rvu/models.py
from __future__ import unicode_literals from django.db import models from django.utils import timezone from django.conf import settings from django.core.urlresolvers import reverse class BillingCode(models.Model): nr_rvus = models.FloatField() creation_date = models.DateTimeField('date created', default=timez...
from __future__ import unicode_literals from django.db import models from django.utils import timezone from django.conf import settings from django.core.urlresolvers import reverse class BillingCode(models.Model): nr_rvus = models.FloatField() creation_date = models.DateTimeField('date created', default=timez...
Change patient visit table ordering to be latest to oldest
Change patient visit table ordering to be latest to oldest
Python
apache-2.0
craighagan/rvumanager,craighagan/rvumanager,craighagan/rvumanager,craighagan/rvumanager
from __future__ import unicode_literals from django.db import models from django.utils import timezone from django.conf import settings from django.core.urlresolvers import reverse class BillingCode(models.Model): nr_rvus = models.FloatField() creation_date = models.DateTimeField('date created', default=timez...
from __future__ import unicode_literals from django.db import models from django.utils import timezone from django.conf import settings from django.core.urlresolvers import reverse class BillingCode(models.Model): nr_rvus = models.FloatField() creation_date = models.DateTimeField('date created', default=timez...
<commit_before>from __future__ import unicode_literals from django.db import models from django.utils import timezone from django.conf import settings from django.core.urlresolvers import reverse class BillingCode(models.Model): nr_rvus = models.FloatField() creation_date = models.DateTimeField('date created'...
from __future__ import unicode_literals from django.db import models from django.utils import timezone from django.conf import settings from django.core.urlresolvers import reverse class BillingCode(models.Model): nr_rvus = models.FloatField() creation_date = models.DateTimeField('date created', default=timez...
from __future__ import unicode_literals from django.db import models from django.utils import timezone from django.conf import settings from django.core.urlresolvers import reverse class BillingCode(models.Model): nr_rvus = models.FloatField() creation_date = models.DateTimeField('date created', default=timez...
<commit_before>from __future__ import unicode_literals from django.db import models from django.utils import timezone from django.conf import settings from django.core.urlresolvers import reverse class BillingCode(models.Model): nr_rvus = models.FloatField() creation_date = models.DateTimeField('date created'...
4407fcb950f42d080ca7e6477cddd507c87e4619
tests/unit/cloudsearch/test_exceptions.py
tests/unit/cloudsearch/test_exceptions.py
import mock from boto.compat import json from tests.unit import unittest from .test_search import HOSTNAME, CloudSearchSearchBaseTest from boto.cloudsearch.search import SearchConnection, SearchServiceException def fake_loads_value_error(content, *args, **kwargs): """Callable to generate a fake ValueError""" ...
import mock from boto.compat import json from tests.unit import unittest from .test_search import HOSTNAME, CloudSearchSearchBaseTest from boto.cloudsearch.search import SearchConnection, SearchServiceException def fake_loads_value_error(content, *args, **kwargs): """Callable to generate a fake ValueError""" ...
Use assertRaises instead of try/except blocks for unit tests
Use assertRaises instead of try/except blocks for unit tests
Python
mit
ekalosak/boto,kouk/boto,revmischa/boto,Asana/boto,TiVoMaker/boto,rjschwei/boto,tpodowd/boto,Timus1712/boto,drbild/boto,awatts/boto,yangchaogit/boto,campenberger/boto,podhmo/boto,israelbenatar/boto,alex/boto,khagler/boto,abridgett/boto,FATruden/boto,janslow/boto,appneta/boto,j-carl/boto,clouddocx/boto,jindongh/boto,bryx...
import mock from boto.compat import json from tests.unit import unittest from .test_search import HOSTNAME, CloudSearchSearchBaseTest from boto.cloudsearch.search import SearchConnection, SearchServiceException def fake_loads_value_error(content, *args, **kwargs): """Callable to generate a fake ValueError""" ...
import mock from boto.compat import json from tests.unit import unittest from .test_search import HOSTNAME, CloudSearchSearchBaseTest from boto.cloudsearch.search import SearchConnection, SearchServiceException def fake_loads_value_error(content, *args, **kwargs): """Callable to generate a fake ValueError""" ...
<commit_before>import mock from boto.compat import json from tests.unit import unittest from .test_search import HOSTNAME, CloudSearchSearchBaseTest from boto.cloudsearch.search import SearchConnection, SearchServiceException def fake_loads_value_error(content, *args, **kwargs): """Callable to generate a fake Va...
import mock from boto.compat import json from tests.unit import unittest from .test_search import HOSTNAME, CloudSearchSearchBaseTest from boto.cloudsearch.search import SearchConnection, SearchServiceException def fake_loads_value_error(content, *args, **kwargs): """Callable to generate a fake ValueError""" ...
import mock from boto.compat import json from tests.unit import unittest from .test_search import HOSTNAME, CloudSearchSearchBaseTest from boto.cloudsearch.search import SearchConnection, SearchServiceException def fake_loads_value_error(content, *args, **kwargs): """Callable to generate a fake ValueError""" ...
<commit_before>import mock from boto.compat import json from tests.unit import unittest from .test_search import HOSTNAME, CloudSearchSearchBaseTest from boto.cloudsearch.search import SearchConnection, SearchServiceException def fake_loads_value_error(content, *args, **kwargs): """Callable to generate a fake Va...
705c2bb724b61f9b07f6ed1ce2191ea0e998ecc4
tests/api_types/sendable/test_input_media.py
tests/api_types/sendable/test_input_media.py
from pytgbot.api_types.sendable.files import InputFileFromURL from pytgbot.api_types.sendable.input_media import InputMediaVideo import unittest class MyTestCase(unittest.TestCase): def test_InputMediaVideo_thumb_files(self): vid1 = 'https://derpicdn.net/img/view/2016/12/21/1322277.mp4' pic1 = 'ht...
from pytgbot.api_types.sendable.files import InputFileFromURL from pytgbot.api_types.sendable.input_media import InputMediaVideo import unittest class MyTestCase(unittest.TestCase): def test_InputMediaVideo_thumb_files(self): vid1 = 'https://derpicdn.net/img/view/2016/12/21/1322277.mp4' pic1 = 'ht...
Test the InputMediaVideo with positional args only.
[test] Test the InputMediaVideo with positional args only.
Python
mit
luckydonald/pytgbot,luckydonald/pytgbot,luckydonald/pytgbot
from pytgbot.api_types.sendable.files import InputFileFromURL from pytgbot.api_types.sendable.input_media import InputMediaVideo import unittest class MyTestCase(unittest.TestCase): def test_InputMediaVideo_thumb_files(self): vid1 = 'https://derpicdn.net/img/view/2016/12/21/1322277.mp4' pic1 = 'ht...
from pytgbot.api_types.sendable.files import InputFileFromURL from pytgbot.api_types.sendable.input_media import InputMediaVideo import unittest class MyTestCase(unittest.TestCase): def test_InputMediaVideo_thumb_files(self): vid1 = 'https://derpicdn.net/img/view/2016/12/21/1322277.mp4' pic1 = 'ht...
<commit_before>from pytgbot.api_types.sendable.files import InputFileFromURL from pytgbot.api_types.sendable.input_media import InputMediaVideo import unittest class MyTestCase(unittest.TestCase): def test_InputMediaVideo_thumb_files(self): vid1 = 'https://derpicdn.net/img/view/2016/12/21/1322277.mp4' ...
from pytgbot.api_types.sendable.files import InputFileFromURL from pytgbot.api_types.sendable.input_media import InputMediaVideo import unittest class MyTestCase(unittest.TestCase): def test_InputMediaVideo_thumb_files(self): vid1 = 'https://derpicdn.net/img/view/2016/12/21/1322277.mp4' pic1 = 'ht...
from pytgbot.api_types.sendable.files import InputFileFromURL from pytgbot.api_types.sendable.input_media import InputMediaVideo import unittest class MyTestCase(unittest.TestCase): def test_InputMediaVideo_thumb_files(self): vid1 = 'https://derpicdn.net/img/view/2016/12/21/1322277.mp4' pic1 = 'ht...
<commit_before>from pytgbot.api_types.sendable.files import InputFileFromURL from pytgbot.api_types.sendable.input_media import InputMediaVideo import unittest class MyTestCase(unittest.TestCase): def test_InputMediaVideo_thumb_files(self): vid1 = 'https://derpicdn.net/img/view/2016/12/21/1322277.mp4' ...
b2ed3d191f564df0911580bb7214b3d834b78dc3
prerender/cli.py
prerender/cli.py
import os from .app import app DEBUG = os.environ.get('DEBUG', 'false').lower() in ('true', 'yes', '1') HOST = os.environ.get('HOST', '0.0.0.0') PORT = int(os.environ.get('PORT', 8000)) def main(): app.run(host=HOST, port=PORT, debug=DEBUG) if __name__ == '__main__': main()
import os import signal import faulthandler from .app import app DEBUG = os.environ.get('DEBUG', 'false').lower() in ('true', 'yes', '1') HOST = os.environ.get('HOST', '0.0.0.0') PORT = int(os.environ.get('PORT', 8000)) def main(): faulthandler.register(signal.SIGUSR1) app.run(host=HOST, port=PORT, debug=D...
Integrate with faulthandler for easier debugging
Integrate with faulthandler for easier debugging
Python
mit
bosondata/chrome-prerender
import os from .app import app DEBUG = os.environ.get('DEBUG', 'false').lower() in ('true', 'yes', '1') HOST = os.environ.get('HOST', '0.0.0.0') PORT = int(os.environ.get('PORT', 8000)) def main(): app.run(host=HOST, port=PORT, debug=DEBUG) if __name__ == '__main__': main() Integrate with faulthandler fo...
import os import signal import faulthandler from .app import app DEBUG = os.environ.get('DEBUG', 'false').lower() in ('true', 'yes', '1') HOST = os.environ.get('HOST', '0.0.0.0') PORT = int(os.environ.get('PORT', 8000)) def main(): faulthandler.register(signal.SIGUSR1) app.run(host=HOST, port=PORT, debug=D...
<commit_before>import os from .app import app DEBUG = os.environ.get('DEBUG', 'false').lower() in ('true', 'yes', '1') HOST = os.environ.get('HOST', '0.0.0.0') PORT = int(os.environ.get('PORT', 8000)) def main(): app.run(host=HOST, port=PORT, debug=DEBUG) if __name__ == '__main__': main() <commit_msg>Int...
import os import signal import faulthandler from .app import app DEBUG = os.environ.get('DEBUG', 'false').lower() in ('true', 'yes', '1') HOST = os.environ.get('HOST', '0.0.0.0') PORT = int(os.environ.get('PORT', 8000)) def main(): faulthandler.register(signal.SIGUSR1) app.run(host=HOST, port=PORT, debug=D...
import os from .app import app DEBUG = os.environ.get('DEBUG', 'false').lower() in ('true', 'yes', '1') HOST = os.environ.get('HOST', '0.0.0.0') PORT = int(os.environ.get('PORT', 8000)) def main(): app.run(host=HOST, port=PORT, debug=DEBUG) if __name__ == '__main__': main() Integrate with faulthandler fo...
<commit_before>import os from .app import app DEBUG = os.environ.get('DEBUG', 'false').lower() in ('true', 'yes', '1') HOST = os.environ.get('HOST', '0.0.0.0') PORT = int(os.environ.get('PORT', 8000)) def main(): app.run(host=HOST, port=PORT, debug=DEBUG) if __name__ == '__main__': main() <commit_msg>Int...
c80a0e14b0fc7a61accddd488f096f363fc85f2f
iss.py
iss.py
import requests from datetime import datetime def get_next_pass(lat, lon): iss_url = 'http://api.open-notify.org/iss-pass.json' location = {'lat': lat, 'lon': lon} response = requests.get(iss_url, params=location).json() next_pass = response['response'][0]['risetime'] return datetime.fromtimestam...
import requests from redis import Redis from rq_scheduler import Scheduler from twilio.rest import TwilioRestClient from datetime import datetime redis_server = Redis() scheduler = Scheduler(connection=Redis()) client = TwilioRestClient() def get_next_pass(lat, lon): iss_url = 'http://api.open-notify.org/iss-p...
Add functions for scheduling messages and adding numbers to Redis
Add functions for scheduling messages and adding numbers to Redis
Python
mit
sagnew/ISSNotifications,sagnew/ISSNotifications,sagnew/ISSNotifications
import requests from datetime import datetime def get_next_pass(lat, lon): iss_url = 'http://api.open-notify.org/iss-pass.json' location = {'lat': lat, 'lon': lon} response = requests.get(iss_url, params=location).json() next_pass = response['response'][0]['risetime'] return datetime.fromtimestam...
import requests from redis import Redis from rq_scheduler import Scheduler from twilio.rest import TwilioRestClient from datetime import datetime redis_server = Redis() scheduler = Scheduler(connection=Redis()) client = TwilioRestClient() def get_next_pass(lat, lon): iss_url = 'http://api.open-notify.org/iss-p...
<commit_before>import requests from datetime import datetime def get_next_pass(lat, lon): iss_url = 'http://api.open-notify.org/iss-pass.json' location = {'lat': lat, 'lon': lon} response = requests.get(iss_url, params=location).json() next_pass = response['response'][0]['risetime'] return dateti...
import requests from redis import Redis from rq_scheduler import Scheduler from twilio.rest import TwilioRestClient from datetime import datetime redis_server = Redis() scheduler = Scheduler(connection=Redis()) client = TwilioRestClient() def get_next_pass(lat, lon): iss_url = 'http://api.open-notify.org/iss-p...
import requests from datetime import datetime def get_next_pass(lat, lon): iss_url = 'http://api.open-notify.org/iss-pass.json' location = {'lat': lat, 'lon': lon} response = requests.get(iss_url, params=location).json() next_pass = response['response'][0]['risetime'] return datetime.fromtimestam...
<commit_before>import requests from datetime import datetime def get_next_pass(lat, lon): iss_url = 'http://api.open-notify.org/iss-pass.json' location = {'lat': lat, 'lon': lon} response = requests.get(iss_url, params=location).json() next_pass = response['response'][0]['risetime'] return dateti...
567aa141546c905b842949799474742bf171a445
codegolf/__init__.py
codegolf/__init__.py
from flask import Flask from .models import * app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db' from codegolf import views
from flask import Flask import sqlalchemy as sa from .models import * app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db' engine = sa.create_engine(app.config['SQLALCHEMY_DATABASE_URI']) Session = sa.sessionmaker(bind=engine) # instantiate Session to do things. # I might write some ...
Update app decl to use sqlalchemy rather than flask_sqlalchemy properly
Update app decl to use sqlalchemy rather than flask_sqlalchemy properly
Python
mit
UQComputingSociety/codegolf,UQComputingSociety/codegolf,UQComputingSociety/codegolf
from flask import Flask from .models import * app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db' from codegolf import views Update app decl to use sqlalchemy rather than flask_sqlalchemy properly
from flask import Flask import sqlalchemy as sa from .models import * app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db' engine = sa.create_engine(app.config['SQLALCHEMY_DATABASE_URI']) Session = sa.sessionmaker(bind=engine) # instantiate Session to do things. # I might write some ...
<commit_before>from flask import Flask from .models import * app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db' from codegolf import views <commit_msg>Update app decl to use sqlalchemy rather than flask_sqlalchemy properly<commit_after>
from flask import Flask import sqlalchemy as sa from .models import * app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db' engine = sa.create_engine(app.config['SQLALCHEMY_DATABASE_URI']) Session = sa.sessionmaker(bind=engine) # instantiate Session to do things. # I might write some ...
from flask import Flask from .models import * app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db' from codegolf import views Update app decl to use sqlalchemy rather than flask_sqlalchemy properlyfrom flask import Flask import sqlalchemy as sa from .models import * app = Flask(__na...
<commit_before>from flask import Flask from .models import * app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db' from codegolf import views <commit_msg>Update app decl to use sqlalchemy rather than flask_sqlalchemy properly<commit_after>from flask import Flask import sqlalchemy as s...
c50051bd8699589c20acb32764b13bdb1473ff23
itsy/utils.py
itsy/utils.py
from . import Task, client from .document import Document def test_handler(handler, url): print "Testing handler: %s" % handler.__name__ t = Task(url=url, document_type=None, referer=None) print " Fetching url: %s" % url raw = client.get(url, None) doc = Document(t, raw) print " Applying han...
from datetime import datetime from decimal import Decimal from . import Task from .client import Client from .document import Document def test_handler(handler, url): print "Testing handler: %s" % handler.__name__ t = Task(url=url, document_type=None, referer=None) print " Fetching url: %s" % url cl...
Update test_handler() to use Client() class
Update test_handler() to use Client() class
Python
mit
storborg/itsy
from . import Task, client from .document import Document def test_handler(handler, url): print "Testing handler: %s" % handler.__name__ t = Task(url=url, document_type=None, referer=None) print " Fetching url: %s" % url raw = client.get(url, None) doc = Document(t, raw) print " Applying han...
from datetime import datetime from decimal import Decimal from . import Task from .client import Client from .document import Document def test_handler(handler, url): print "Testing handler: %s" % handler.__name__ t = Task(url=url, document_type=None, referer=None) print " Fetching url: %s" % url cl...
<commit_before>from . import Task, client from .document import Document def test_handler(handler, url): print "Testing handler: %s" % handler.__name__ t = Task(url=url, document_type=None, referer=None) print " Fetching url: %s" % url raw = client.get(url, None) doc = Document(t, raw) print ...
from datetime import datetime from decimal import Decimal from . import Task from .client import Client from .document import Document def test_handler(handler, url): print "Testing handler: %s" % handler.__name__ t = Task(url=url, document_type=None, referer=None) print " Fetching url: %s" % url cl...
from . import Task, client from .document import Document def test_handler(handler, url): print "Testing handler: %s" % handler.__name__ t = Task(url=url, document_type=None, referer=None) print " Fetching url: %s" % url raw = client.get(url, None) doc = Document(t, raw) print " Applying han...
<commit_before>from . import Task, client from .document import Document def test_handler(handler, url): print "Testing handler: %s" % handler.__name__ t = Task(url=url, document_type=None, referer=None) print " Fetching url: %s" % url raw = client.get(url, None) doc = Document(t, raw) print ...
acf7b76e098e70c77fbce95d03ec70911260ab58
accloudtant/__main__.py
accloudtant/__main__.py
from accloudtant import load_data if __name__ == "__main__": usage = load_data("tests/fixtures/2021/03/S3.csv") print("Simple Storage Service") for area, concepts in usage.totals(omit=lambda x: x.is_data_transfer or x.type == "StorageObjectCount"): print("\t", area) for c, v, u in concept...
import argparse from accloudtant import load_data if __name__ == "__main__": parser = argparse.ArgumentParser(description="AWS cost calculator") parser.add_argument("csv_file", type=str, help='CSV file to read') args = parser.parse_args() usage = load_data(args.csv_file) print("Simple Storage Se...
Add argument to specify different files to load
Add argument to specify different files to load This will make implementing other services easier.
Python
apache-2.0
ifosch/accloudtant
from accloudtant import load_data if __name__ == "__main__": usage = load_data("tests/fixtures/2021/03/S3.csv") print("Simple Storage Service") for area, concepts in usage.totals(omit=lambda x: x.is_data_transfer or x.type == "StorageObjectCount"): print("\t", area) for c, v, u in concept...
import argparse from accloudtant import load_data if __name__ == "__main__": parser = argparse.ArgumentParser(description="AWS cost calculator") parser.add_argument("csv_file", type=str, help='CSV file to read') args = parser.parse_args() usage = load_data(args.csv_file) print("Simple Storage Se...
<commit_before>from accloudtant import load_data if __name__ == "__main__": usage = load_data("tests/fixtures/2021/03/S3.csv") print("Simple Storage Service") for area, concepts in usage.totals(omit=lambda x: x.is_data_transfer or x.type == "StorageObjectCount"): print("\t", area) for c, ...
import argparse from accloudtant import load_data if __name__ == "__main__": parser = argparse.ArgumentParser(description="AWS cost calculator") parser.add_argument("csv_file", type=str, help='CSV file to read') args = parser.parse_args() usage = load_data(args.csv_file) print("Simple Storage Se...
from accloudtant import load_data if __name__ == "__main__": usage = load_data("tests/fixtures/2021/03/S3.csv") print("Simple Storage Service") for area, concepts in usage.totals(omit=lambda x: x.is_data_transfer or x.type == "StorageObjectCount"): print("\t", area) for c, v, u in concept...
<commit_before>from accloudtant import load_data if __name__ == "__main__": usage = load_data("tests/fixtures/2021/03/S3.csv") print("Simple Storage Service") for area, concepts in usage.totals(omit=lambda x: x.is_data_transfer or x.type == "StorageObjectCount"): print("\t", area) for c, ...
63f06cdea9a0471708ee633ff0546b22cdebb786
pycolfin/cli.py
pycolfin/cli.py
# -*- coding: utf-8 -*- import click from .pycolfin import COLFin from getpass import getpass verbosity_help = """ 1 = User ID, Last Login, Equity Value, Day Change 2 = Display all info from 1 and portfolio summary 3 = Display all info in 1 & 2 and detailed portfolio """ @click.command() @click.option('-v', '--ve...
# -*- coding: utf-8 -*- import click from .pycolfin import COLFin from getpass import getpass verbosity_help = """ 1 = User ID, Last Login, Equity Value, Day Change 2 = Display all info from 1 and portfolio summary 3 = Display all info in 1 & 2 and detailed portfolio """ @click.command() @click.option('-v', '--ve...
Print message if exception encountered when trying to show detailed port/mutual funds
Print message if exception encountered when trying to show detailed port/mutual funds Hopefully this handles the case when the user currently has no stocks and/or mutual funds. :fire:
Python
mit
patpatpatpatpat/pycolfin
# -*- coding: utf-8 -*- import click from .pycolfin import COLFin from getpass import getpass verbosity_help = """ 1 = User ID, Last Login, Equity Value, Day Change 2 = Display all info from 1 and portfolio summary 3 = Display all info in 1 & 2 and detailed portfolio """ @click.command() @click.option('-v', '--ve...
# -*- coding: utf-8 -*- import click from .pycolfin import COLFin from getpass import getpass verbosity_help = """ 1 = User ID, Last Login, Equity Value, Day Change 2 = Display all info from 1 and portfolio summary 3 = Display all info in 1 & 2 and detailed portfolio """ @click.command() @click.option('-v', '--ve...
<commit_before># -*- coding: utf-8 -*- import click from .pycolfin import COLFin from getpass import getpass verbosity_help = """ 1 = User ID, Last Login, Equity Value, Day Change 2 = Display all info from 1 and portfolio summary 3 = Display all info in 1 & 2 and detailed portfolio """ @click.command() @click.opt...
# -*- coding: utf-8 -*- import click from .pycolfin import COLFin from getpass import getpass verbosity_help = """ 1 = User ID, Last Login, Equity Value, Day Change 2 = Display all info from 1 and portfolio summary 3 = Display all info in 1 & 2 and detailed portfolio """ @click.command() @click.option('-v', '--ve...
# -*- coding: utf-8 -*- import click from .pycolfin import COLFin from getpass import getpass verbosity_help = """ 1 = User ID, Last Login, Equity Value, Day Change 2 = Display all info from 1 and portfolio summary 3 = Display all info in 1 & 2 and detailed portfolio """ @click.command() @click.option('-v', '--ve...
<commit_before># -*- coding: utf-8 -*- import click from .pycolfin import COLFin from getpass import getpass verbosity_help = """ 1 = User ID, Last Login, Equity Value, Day Change 2 = Display all info from 1 and portfolio summary 3 = Display all info in 1 & 2 and detailed portfolio """ @click.command() @click.opt...
a6adcc09bd1abe1d2538d499153a102cc37d5565
reader/reader.py
reader/reader.py
import json import pika from twython import TwythonStreamer class TwitterConfiguration: def __init__(self): with open('twitter_key.json') as jsonData: data = json.load(jsonData) self.consumer_key = data['consumer_key'] self.consumer_secret = data['consumer_secret'] self...
import json import pika import time from twython import TwythonStreamer class TwitterConfiguration: def __init__(self): with open('twitter_key.json') as jsonData: data = json.load(jsonData) self.consumer_key = data['consumer_key'] self.consumer_secret = data['consumer_secret'] ...
Add retry for opening RabbitMQ connection (cluster start)
Add retry for opening RabbitMQ connection (cluster start)
Python
mit
estiller/tweet-analyzer-demo,estiller/tweet-analyzer-demo,estiller/tweet-analyzer-demo,estiller/tweet-analyzer-demo,estiller/tweet-analyzer-demo
import json import pika from twython import TwythonStreamer class TwitterConfiguration: def __init__(self): with open('twitter_key.json') as jsonData: data = json.load(jsonData) self.consumer_key = data['consumer_key'] self.consumer_secret = data['consumer_secret'] self...
import json import pika import time from twython import TwythonStreamer class TwitterConfiguration: def __init__(self): with open('twitter_key.json') as jsonData: data = json.load(jsonData) self.consumer_key = data['consumer_key'] self.consumer_secret = data['consumer_secret'] ...
<commit_before>import json import pika from twython import TwythonStreamer class TwitterConfiguration: def __init__(self): with open('twitter_key.json') as jsonData: data = json.load(jsonData) self.consumer_key = data['consumer_key'] self.consumer_secret = data['consumer_secret...
import json import pika import time from twython import TwythonStreamer class TwitterConfiguration: def __init__(self): with open('twitter_key.json') as jsonData: data = json.load(jsonData) self.consumer_key = data['consumer_key'] self.consumer_secret = data['consumer_secret'] ...
import json import pika from twython import TwythonStreamer class TwitterConfiguration: def __init__(self): with open('twitter_key.json') as jsonData: data = json.load(jsonData) self.consumer_key = data['consumer_key'] self.consumer_secret = data['consumer_secret'] self...
<commit_before>import json import pika from twython import TwythonStreamer class TwitterConfiguration: def __init__(self): with open('twitter_key.json') as jsonData: data = json.load(jsonData) self.consumer_key = data['consumer_key'] self.consumer_secret = data['consumer_secret...
575a73f7e1ba7d175fa406478e71fd05fd2cae2e
test/test_web_services.py
test/test_web_services.py
# -*- coding: utf-8 -*- #
# -*- coding: utf-8 -*- # import avalon.web.services def test_intersection_with_empty_set(): set1 = set(['foo', 'bar']) set2 = set(['foo']) set3 = set() res = avalon.web.services.intersection([set1, set2, set3]) assert 0 == len(res), 'Expected empty set of common results' def test_intersectio...
Add tests for result set intersection method
Add tests for result set intersection method
Python
mit
tshlabs/avalonms
# -*- coding: utf-8 -*- # Add tests for result set intersection method
# -*- coding: utf-8 -*- # import avalon.web.services def test_intersection_with_empty_set(): set1 = set(['foo', 'bar']) set2 = set(['foo']) set3 = set() res = avalon.web.services.intersection([set1, set2, set3]) assert 0 == len(res), 'Expected empty set of common results' def test_intersectio...
<commit_before># -*- coding: utf-8 -*- # <commit_msg>Add tests for result set intersection method<commit_after>
# -*- coding: utf-8 -*- # import avalon.web.services def test_intersection_with_empty_set(): set1 = set(['foo', 'bar']) set2 = set(['foo']) set3 = set() res = avalon.web.services.intersection([set1, set2, set3]) assert 0 == len(res), 'Expected empty set of common results' def test_intersectio...
# -*- coding: utf-8 -*- # Add tests for result set intersection method# -*- coding: utf-8 -*- # import avalon.web.services def test_intersection_with_empty_set(): set1 = set(['foo', 'bar']) set2 = set(['foo']) set3 = set() res = avalon.web.services.intersection([set1, set2, set3]) assert 0 == l...
<commit_before># -*- coding: utf-8 -*- # <commit_msg>Add tests for result set intersection method<commit_after># -*- coding: utf-8 -*- # import avalon.web.services def test_intersection_with_empty_set(): set1 = set(['foo', 'bar']) set2 = set(['foo']) set3 = set() res = avalon.web.services.intersect...
5d7c85d33f8e51947d8791bd597720f161a48f82
game/views.py
game/views.py
from django.shortcuts import render from django.http import HttpResponse def index(request): context = {'text': 'Welcome to our game'} return render(request, 'game/index.html', context) def users(request): context = {'text': 'User list here'} return render(request, 'game/users.html', context) def user_deta...
from django.shortcuts import render from django.http import HttpResponse def index(request): context = {'text': 'Welcome to our game'} return render(request, 'game/index.html', context) def register(request): context = {'text': 'Register here'} return render(request, 'registration/register.html', cont...
Fix merge conflict with master repo
Fix merge conflict with master repo
Python
mit
shintouki/augmented-pandemic,shintouki/augmented-pandemic,shintouki/augmented-pandemic
from django.shortcuts import render from django.http import HttpResponse def index(request): context = {'text': 'Welcome to our game'} return render(request, 'game/index.html', context) def users(request): context = {'text': 'User list here'} return render(request, 'game/users.html', context) def user_deta...
from django.shortcuts import render from django.http import HttpResponse def index(request): context = {'text': 'Welcome to our game'} return render(request, 'game/index.html', context) def register(request): context = {'text': 'Register here'} return render(request, 'registration/register.html', cont...
<commit_before>from django.shortcuts import render from django.http import HttpResponse def index(request): context = {'text': 'Welcome to our game'} return render(request, 'game/index.html', context) def users(request): context = {'text': 'User list here'} return render(request, 'game/users.html', context)...
from django.shortcuts import render from django.http import HttpResponse def index(request): context = {'text': 'Welcome to our game'} return render(request, 'game/index.html', context) def register(request): context = {'text': 'Register here'} return render(request, 'registration/register.html', cont...
from django.shortcuts import render from django.http import HttpResponse def index(request): context = {'text': 'Welcome to our game'} return render(request, 'game/index.html', context) def users(request): context = {'text': 'User list here'} return render(request, 'game/users.html', context) def user_deta...
<commit_before>from django.shortcuts import render from django.http import HttpResponse def index(request): context = {'text': 'Welcome to our game'} return render(request, 'game/index.html', context) def users(request): context = {'text': 'User list here'} return render(request, 'game/users.html', context)...
8c96f3211967c680ee26b673dc9fe0299180a1c4
knights/dj.py
knights/dj.py
from collections import defaultdict from django.template import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsTemplater(BaseEn...
from collections import defaultdict from django.template.base import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsTemplater(B...
Update adapter to catch exception from loader
Update adapter to catch exception from loader
Python
mit
funkybob/knights-templater,funkybob/knights-templater
from collections import defaultdict from django.template import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsTemplater(BaseEn...
from collections import defaultdict from django.template.base import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsTemplater(B...
<commit_before>from collections import defaultdict from django.template import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsT...
from collections import defaultdict from django.template.base import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsTemplater(B...
from collections import defaultdict from django.template import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsTemplater(BaseEn...
<commit_before>from collections import defaultdict from django.template import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsT...
4bcbb06b779851dd5d031b7951ff80ed325b1414
gather/commands.py
gather/commands.py
from gather.organiser import NotEnoughPlayersError def strip_help(bot): messages = [] for regex, action in bot.actions.values(): if action.__doc__: messages.append(action.__doc__.strip()) return messages async def bot_help(bot, channel, author, message): await bot.say_lines(chan...
from gather.organiser import NotEnoughPlayersError def strip_help(bot): messages = [] for regex, action in bot.actions.values(): if action.__doc__: messages.append(action.__doc__.strip()) return messages async def bot_help(bot, channel, author, message): await bot.say_lines(chan...
Print players on remove too
Print players on remove too
Python
mit
veryhappythings/discord-gather
from gather.organiser import NotEnoughPlayersError def strip_help(bot): messages = [] for regex, action in bot.actions.values(): if action.__doc__: messages.append(action.__doc__.strip()) return messages async def bot_help(bot, channel, author, message): await bot.say_lines(chan...
from gather.organiser import NotEnoughPlayersError def strip_help(bot): messages = [] for regex, action in bot.actions.values(): if action.__doc__: messages.append(action.__doc__.strip()) return messages async def bot_help(bot, channel, author, message): await bot.say_lines(chan...
<commit_before>from gather.organiser import NotEnoughPlayersError def strip_help(bot): messages = [] for regex, action in bot.actions.values(): if action.__doc__: messages.append(action.__doc__.strip()) return messages async def bot_help(bot, channel, author, message): await bot...
from gather.organiser import NotEnoughPlayersError def strip_help(bot): messages = [] for regex, action in bot.actions.values(): if action.__doc__: messages.append(action.__doc__.strip()) return messages async def bot_help(bot, channel, author, message): await bot.say_lines(chan...
from gather.organiser import NotEnoughPlayersError def strip_help(bot): messages = [] for regex, action in bot.actions.values(): if action.__doc__: messages.append(action.__doc__.strip()) return messages async def bot_help(bot, channel, author, message): await bot.say_lines(chan...
<commit_before>from gather.organiser import NotEnoughPlayersError def strip_help(bot): messages = [] for regex, action in bot.actions.values(): if action.__doc__: messages.append(action.__doc__.strip()) return messages async def bot_help(bot, channel, author, message): await bot...