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
4bc55a6b1bdef357acd24e6aba34a57f689e9da0
bokeh/command/subcommands/__init__.py
bokeh/command/subcommands/__init__.py
def _collect(): from importlib import import_module from os import listdir from os.path import dirname from ..subcommand import Subcommand results = [] for file in listdir(dirname(__file__)): if not file.endswith(".py") or file in ("__init__.py", "__main__.py"): continue...
def _collect(): from importlib import import_module from os import listdir from os.path import dirname from ..subcommand import Subcommand results = [] for file in listdir(dirname(__file__)): if not file.endswith(".py") or file in ("__init__.py", "__main__.py"): continue...
Sort subcommands.all so the tested results are deterministic
Sort subcommands.all so the tested results are deterministic
Python
bsd-3-clause
phobson/bokeh,clairetang6/bokeh,aiguofer/bokeh,jakirkham/bokeh,msarahan/bokeh,mindriot101/bokeh,philippjfr/bokeh,schoolie/bokeh,stonebig/bokeh,azjps/bokeh,percyfal/bokeh,bokeh/bokeh,draperjames/bokeh,percyfal/bokeh,draperjames/bokeh,msarahan/bokeh,ptitjano/bokeh,msarahan/bokeh,quasiben/bokeh,KasperPRasmussen/bokeh,aigu...
def _collect(): from importlib import import_module from os import listdir from os.path import dirname from ..subcommand import Subcommand results = [] for file in listdir(dirname(__file__)): if not file.endswith(".py") or file in ("__init__.py", "__main__.py"): continue...
def _collect(): from importlib import import_module from os import listdir from os.path import dirname from ..subcommand import Subcommand results = [] for file in listdir(dirname(__file__)): if not file.endswith(".py") or file in ("__init__.py", "__main__.py"): continue...
<commit_before> def _collect(): from importlib import import_module from os import listdir from os.path import dirname from ..subcommand import Subcommand results = [] for file in listdir(dirname(__file__)): if not file.endswith(".py") or file in ("__init__.py", "__main__.py"): ...
def _collect(): from importlib import import_module from os import listdir from os.path import dirname from ..subcommand import Subcommand results = [] for file in listdir(dirname(__file__)): if not file.endswith(".py") or file in ("__init__.py", "__main__.py"): continue...
def _collect(): from importlib import import_module from os import listdir from os.path import dirname from ..subcommand import Subcommand results = [] for file in listdir(dirname(__file__)): if not file.endswith(".py") or file in ("__init__.py", "__main__.py"): continue...
<commit_before> def _collect(): from importlib import import_module from os import listdir from os.path import dirname from ..subcommand import Subcommand results = [] for file in listdir(dirname(__file__)): if not file.endswith(".py") or file in ("__init__.py", "__main__.py"): ...
4fce2955ce76c1f886b2a234fe9d0c576843fefd
Dice.py
Dice.py
import random class Die(object): def __init__(self, sides = 6): self.sides = sides self.held = False self.die_face = 1 def change_held(self, held): self.held = held def roll_die(self): if (self.held == False): self.die_face = random.randint(1, self.sides) ...
import random class Die(object): def __init__(self, sides = 6): self.sides = sides self.held = False self.die_face = 1 def change_held(self, held): self.held = held def roll_die(self): if (self.held == False): self.die_face = random.randint(1, self.sides) ...
Add hold all function to dicebag
Add hold all function to dicebag
Python
mit
achyutreddy24/DiceGame
import random class Die(object): def __init__(self, sides = 6): self.sides = sides self.held = False self.die_face = 1 def change_held(self, held): self.held = held def roll_die(self): if (self.held == False): self.die_face = random.randint(1, self.sides) ...
import random class Die(object): def __init__(self, sides = 6): self.sides = sides self.held = False self.die_face = 1 def change_held(self, held): self.held = held def roll_die(self): if (self.held == False): self.die_face = random.randint(1, self.sides) ...
<commit_before>import random class Die(object): def __init__(self, sides = 6): self.sides = sides self.held = False self.die_face = 1 def change_held(self, held): self.held = held def roll_die(self): if (self.held == False): self.die_face = random.randint(...
import random class Die(object): def __init__(self, sides = 6): self.sides = sides self.held = False self.die_face = 1 def change_held(self, held): self.held = held def roll_die(self): if (self.held == False): self.die_face = random.randint(1, self.sides) ...
import random class Die(object): def __init__(self, sides = 6): self.sides = sides self.held = False self.die_face = 1 def change_held(self, held): self.held = held def roll_die(self): if (self.held == False): self.die_face = random.randint(1, self.sides) ...
<commit_before>import random class Die(object): def __init__(self, sides = 6): self.sides = sides self.held = False self.die_face = 1 def change_held(self, held): self.held = held def roll_die(self): if (self.held == False): self.die_face = random.randint(...
628de346d3cf22342bf09e9ad3337a4408ed5662
properties/files.py
properties/files.py
from __future__ import absolute_import, unicode_literals, print_function, division from builtins import open from future import standard_library standard_library.install_aliases() import six import json, numpy as np, os, io from .base import Property from . import exceptions class File(Property): mode = 'r' #: m...
from __future__ import absolute_import, print_function, division from builtins import open from future import standard_library standard_library.install_aliases() import six import json, numpy as np, os, io from .base import Property from . import exceptions class File(Property): mode = 'r' #: mode for opening th...
Fix png for python 2/3 compatibility
Fix png for python 2/3 compatibility
Python
mit
aranzgeo/properties,3ptscience/properties
from __future__ import absolute_import, unicode_literals, print_function, division from builtins import open from future import standard_library standard_library.install_aliases() import six import json, numpy as np, os, io from .base import Property from . import exceptions class File(Property): mode = 'r' #: m...
from __future__ import absolute_import, print_function, division from builtins import open from future import standard_library standard_library.install_aliases() import six import json, numpy as np, os, io from .base import Property from . import exceptions class File(Property): mode = 'r' #: mode for opening th...
<commit_before>from __future__ import absolute_import, unicode_literals, print_function, division from builtins import open from future import standard_library standard_library.install_aliases() import six import json, numpy as np, os, io from .base import Property from . import exceptions class File(Property): ...
from __future__ import absolute_import, print_function, division from builtins import open from future import standard_library standard_library.install_aliases() import six import json, numpy as np, os, io from .base import Property from . import exceptions class File(Property): mode = 'r' #: mode for opening th...
from __future__ import absolute_import, unicode_literals, print_function, division from builtins import open from future import standard_library standard_library.install_aliases() import six import json, numpy as np, os, io from .base import Property from . import exceptions class File(Property): mode = 'r' #: m...
<commit_before>from __future__ import absolute_import, unicode_literals, print_function, division from builtins import open from future import standard_library standard_library.install_aliases() import six import json, numpy as np, os, io from .base import Property from . import exceptions class File(Property): ...
7fcccea5d7fdfb823d17f1db56f5ece42ef2fd8b
tools/bundle.py
tools/bundle.py
#!/usr/bin/env python import os import sys import glob import getopt def file_list(path): files = [] if os.path.isfile(path): return [path] for f in os.listdir(path): new_dir = os.path.join(path, f) if os.path.isdir(new_dir) and not os.path.islink(new_dir): files.extend(file_list(new_dir)) ...
#!/usr/bin/env python import os import sys import glob import getopt def file_list(path): files = [] if os.path.isfile(path): return [path] for f in os.listdir(path): new_dir = path + '/' + f if os.path.isdir(new_dir) and not os.path.islink(new_dir): files.extend(file_list(new_dir)) else...
Stop using os.path.join, because Visual Studio can actually handle forward slash style paths, and the os.path method was creating mixed \\ and / style paths, b0rking everything.
Stop using os.path.join, because Visual Studio can actually handle forward slash style paths, and the os.path method was creating mixed \\ and / style paths, b0rking everything.
Python
apache-2.0
kans/zirgo,kans/zirgo,kans/zirgo
#!/usr/bin/env python import os import sys import glob import getopt def file_list(path): files = [] if os.path.isfile(path): return [path] for f in os.listdir(path): new_dir = os.path.join(path, f) if os.path.isdir(new_dir) and not os.path.islink(new_dir): files.extend(file_list(new_dir)) ...
#!/usr/bin/env python import os import sys import glob import getopt def file_list(path): files = [] if os.path.isfile(path): return [path] for f in os.listdir(path): new_dir = path + '/' + f if os.path.isdir(new_dir) and not os.path.islink(new_dir): files.extend(file_list(new_dir)) else...
<commit_before>#!/usr/bin/env python import os import sys import glob import getopt def file_list(path): files = [] if os.path.isfile(path): return [path] for f in os.listdir(path): new_dir = os.path.join(path, f) if os.path.isdir(new_dir) and not os.path.islink(new_dir): files.extend(file_l...
#!/usr/bin/env python import os import sys import glob import getopt def file_list(path): files = [] if os.path.isfile(path): return [path] for f in os.listdir(path): new_dir = path + '/' + f if os.path.isdir(new_dir) and not os.path.islink(new_dir): files.extend(file_list(new_dir)) else...
#!/usr/bin/env python import os import sys import glob import getopt def file_list(path): files = [] if os.path.isfile(path): return [path] for f in os.listdir(path): new_dir = os.path.join(path, f) if os.path.isdir(new_dir) and not os.path.islink(new_dir): files.extend(file_list(new_dir)) ...
<commit_before>#!/usr/bin/env python import os import sys import glob import getopt def file_list(path): files = [] if os.path.isfile(path): return [path] for f in os.listdir(path): new_dir = os.path.join(path, f) if os.path.isdir(new_dir) and not os.path.islink(new_dir): files.extend(file_l...
dfd6793f16d0128b3d143d0f1ebc196bb79505c2
chnnlsdmo/chnnlsdmo/models.py
chnnlsdmo/chnnlsdmo/models.py
from django.db import models from django.contrib.auth.models import User class Voter(models.Model): ''' Models someone who may vote ''' user = models.OneToOneField(User) def __str__(self): return self.user.username class Flag(models.Model): ''' Models a flag which may be voted o...
from django.db import models from django.contrib.auth.models import User class Voter(models.Model): ''' Models someone who may vote ''' user = models.OneToOneField(User) def __str__(self): return self.user.username class Flag(models.Model): ''' Models a flag which may be voted o...
Add date/time created timestamp to Vote model
Add date/time created timestamp to Vote model
Python
bsd-3-clause
shearichard/django-channels-demo,shearichard/django-channels-demo,shearichard/django-channels-demo
from django.db import models from django.contrib.auth.models import User class Voter(models.Model): ''' Models someone who may vote ''' user = models.OneToOneField(User) def __str__(self): return self.user.username class Flag(models.Model): ''' Models a flag which may be voted o...
from django.db import models from django.contrib.auth.models import User class Voter(models.Model): ''' Models someone who may vote ''' user = models.OneToOneField(User) def __str__(self): return self.user.username class Flag(models.Model): ''' Models a flag which may be voted o...
<commit_before> from django.db import models from django.contrib.auth.models import User class Voter(models.Model): ''' Models someone who may vote ''' user = models.OneToOneField(User) def __str__(self): return self.user.username class Flag(models.Model): ''' Models a flag which...
from django.db import models from django.contrib.auth.models import User class Voter(models.Model): ''' Models someone who may vote ''' user = models.OneToOneField(User) def __str__(self): return self.user.username class Flag(models.Model): ''' Models a flag which may be voted o...
from django.db import models from django.contrib.auth.models import User class Voter(models.Model): ''' Models someone who may vote ''' user = models.OneToOneField(User) def __str__(self): return self.user.username class Flag(models.Model): ''' Models a flag which may be voted o...
<commit_before> from django.db import models from django.contrib.auth.models import User class Voter(models.Model): ''' Models someone who may vote ''' user = models.OneToOneField(User) def __str__(self): return self.user.username class Flag(models.Model): ''' Models a flag which...
fbf8b169cceb4c9a78d114880d5ce0eb59108a38
rsr/cmd.py
rsr/cmd.py
import locale import os import signal import sys from argparse import ArgumentParser import gi gi.require_version('Gtk', '3.0') gi.require_version('GtkSource', '3.0') from gi.repository import Gio, GLib, Gtk from rsr import __version__ from rsr import paths from rsr.app import Application parser = ArgumentParser(pr...
import locale import os import signal import sys from argparse import ArgumentParser import gi gi.require_version('Gtk', '3.0') gi.require_version('GtkSource', '3.0') from gi.repository import Gio, GLib, Gtk from rsr import __version__ from rsr import paths from rsr.app import Application parser = ArgumentParser(pr...
Add short shortcut for experimental flag.
Add short shortcut for experimental flag.
Python
mit
andialbrecht/runsqlrun
import locale import os import signal import sys from argparse import ArgumentParser import gi gi.require_version('Gtk', '3.0') gi.require_version('GtkSource', '3.0') from gi.repository import Gio, GLib, Gtk from rsr import __version__ from rsr import paths from rsr.app import Application parser = ArgumentParser(pr...
import locale import os import signal import sys from argparse import ArgumentParser import gi gi.require_version('Gtk', '3.0') gi.require_version('GtkSource', '3.0') from gi.repository import Gio, GLib, Gtk from rsr import __version__ from rsr import paths from rsr.app import Application parser = ArgumentParser(pr...
<commit_before>import locale import os import signal import sys from argparse import ArgumentParser import gi gi.require_version('Gtk', '3.0') gi.require_version('GtkSource', '3.0') from gi.repository import Gio, GLib, Gtk from rsr import __version__ from rsr import paths from rsr.app import Application parser = Ar...
import locale import os import signal import sys from argparse import ArgumentParser import gi gi.require_version('Gtk', '3.0') gi.require_version('GtkSource', '3.0') from gi.repository import Gio, GLib, Gtk from rsr import __version__ from rsr import paths from rsr.app import Application parser = ArgumentParser(pr...
import locale import os import signal import sys from argparse import ArgumentParser import gi gi.require_version('Gtk', '3.0') gi.require_version('GtkSource', '3.0') from gi.repository import Gio, GLib, Gtk from rsr import __version__ from rsr import paths from rsr.app import Application parser = ArgumentParser(pr...
<commit_before>import locale import os import signal import sys from argparse import ArgumentParser import gi gi.require_version('Gtk', '3.0') gi.require_version('GtkSource', '3.0') from gi.repository import Gio, GLib, Gtk from rsr import __version__ from rsr import paths from rsr.app import Application parser = Ar...
34d7a7ea41843ef4761804e973ec9ded1bb2a03b
cla_backend/apps/cla_butler/management/commands/reverthousekeeping.py
cla_backend/apps/cla_butler/management/commands/reverthousekeeping.py
# -*- coding: utf-8 -*- import os from django.conf import settings from django.contrib.admin.models import LogEntry from django.core.management.base import BaseCommand from cla_eventlog.models import Log from cla_provider.models import Feedback from complaints.models import Complaint from diagnosis.models import Diag...
# -*- coding: utf-8 -*- import os from django.conf import settings from django.contrib.admin.models import LogEntry from django.core.management.base import BaseCommand from cla_eventlog.models import Log from cla_provider.models import Feedback from complaints.models import Complaint from diagnosis.models import Diag...
Refactor args in manage task
Refactor args in manage task
Python
mit
ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend
# -*- coding: utf-8 -*- import os from django.conf import settings from django.contrib.admin.models import LogEntry from django.core.management.base import BaseCommand from cla_eventlog.models import Log from cla_provider.models import Feedback from complaints.models import Complaint from diagnosis.models import Diag...
# -*- coding: utf-8 -*- import os from django.conf import settings from django.contrib.admin.models import LogEntry from django.core.management.base import BaseCommand from cla_eventlog.models import Log from cla_provider.models import Feedback from complaints.models import Complaint from diagnosis.models import Diag...
<commit_before># -*- coding: utf-8 -*- import os from django.conf import settings from django.contrib.admin.models import LogEntry from django.core.management.base import BaseCommand from cla_eventlog.models import Log from cla_provider.models import Feedback from complaints.models import Complaint from diagnosis.mod...
# -*- coding: utf-8 -*- import os from django.conf import settings from django.contrib.admin.models import LogEntry from django.core.management.base import BaseCommand from cla_eventlog.models import Log from cla_provider.models import Feedback from complaints.models import Complaint from diagnosis.models import Diag...
# -*- coding: utf-8 -*- import os from django.conf import settings from django.contrib.admin.models import LogEntry from django.core.management.base import BaseCommand from cla_eventlog.models import Log from cla_provider.models import Feedback from complaints.models import Complaint from diagnosis.models import Diag...
<commit_before># -*- coding: utf-8 -*- import os from django.conf import settings from django.contrib.admin.models import LogEntry from django.core.management.base import BaseCommand from cla_eventlog.models import Log from cla_provider.models import Feedback from complaints.models import Complaint from diagnosis.mod...
f7777c858baf049af83bd39168d0640e4dedf29c
main.py
main.py
import slackclient import time import os slackClient = slackclient.SlackClient(os.environ["SLACK_TOKEN"]) slackClient.rtm_connect() lastPingTime = 0 print(os.environ) while True: for message in slackClient.rtm_read(): if message["type"] == "team_join": username = message["user"]["name"] ...
import slackclient import time import os slackClient = slackclient.SlackClient(os.environ["SLACK_TOKEN"]) slackClient.rtm_connect() lastPingTime = 0 while True: raise Exception(str(os.environ)) for message in slackClient.rtm_read(): if message["type"] == "team_join": username = message["use...
Change debug message to exception
Change debug message to exception
Python
mit
ollien/Slack-Welcome-Bot
import slackclient import time import os slackClient = slackclient.SlackClient(os.environ["SLACK_TOKEN"]) slackClient.rtm_connect() lastPingTime = 0 print(os.environ) while True: for message in slackClient.rtm_read(): if message["type"] == "team_join": username = message["user"]["name"] ...
import slackclient import time import os slackClient = slackclient.SlackClient(os.environ["SLACK_TOKEN"]) slackClient.rtm_connect() lastPingTime = 0 while True: raise Exception(str(os.environ)) for message in slackClient.rtm_read(): if message["type"] == "team_join": username = message["use...
<commit_before>import slackclient import time import os slackClient = slackclient.SlackClient(os.environ["SLACK_TOKEN"]) slackClient.rtm_connect() lastPingTime = 0 print(os.environ) while True: for message in slackClient.rtm_read(): if message["type"] == "team_join": username = message["user"][...
import slackclient import time import os slackClient = slackclient.SlackClient(os.environ["SLACK_TOKEN"]) slackClient.rtm_connect() lastPingTime = 0 while True: raise Exception(str(os.environ)) for message in slackClient.rtm_read(): if message["type"] == "team_join": username = message["use...
import slackclient import time import os slackClient = slackclient.SlackClient(os.environ["SLACK_TOKEN"]) slackClient.rtm_connect() lastPingTime = 0 print(os.environ) while True: for message in slackClient.rtm_read(): if message["type"] == "team_join": username = message["user"]["name"] ...
<commit_before>import slackclient import time import os slackClient = slackclient.SlackClient(os.environ["SLACK_TOKEN"]) slackClient.rtm_connect() lastPingTime = 0 print(os.environ) while True: for message in slackClient.rtm_read(): if message["type"] == "team_join": username = message["user"][...
7d26f7c16b7b33ae0c011bb2db588b056fe90e3e
main.py
main.py
# -*- coding: utf-8 -*- import webapp2 # Importing request handlers from signup import Signup from login import Login from logout import Logout from wikipage import WikiPage from editpage import EditPage PAGE_RE = r'(/(?:[a-zA-Z0-9_-]+/?)*)' app = webapp2.WSGIApplication([ ('/signup', Signup),...
# -*- coding: utf-8 -*- import webapp2 # Importing request handlers from signup import Signup from login import Login from logout import Logout from wikipage import WikiPage from editpage import EditPage from historypage import HistoryPage PAGE_RE = r'(/(?:[a-zA-Z0-9_-]+/?)*)' app = webapp2.WSGIAp...
Fix logic bugs and add historypage handler
Fix logic bugs and add historypage handler
Python
mit
lttviet/udacity-final
# -*- coding: utf-8 -*- import webapp2 # Importing request handlers from signup import Signup from login import Login from logout import Logout from wikipage import WikiPage from editpage import EditPage PAGE_RE = r'(/(?:[a-zA-Z0-9_-]+/?)*)' app = webapp2.WSGIApplication([ ('/signup', Signup),...
# -*- coding: utf-8 -*- import webapp2 # Importing request handlers from signup import Signup from login import Login from logout import Logout from wikipage import WikiPage from editpage import EditPage from historypage import HistoryPage PAGE_RE = r'(/(?:[a-zA-Z0-9_-]+/?)*)' app = webapp2.WSGIAp...
<commit_before># -*- coding: utf-8 -*- import webapp2 # Importing request handlers from signup import Signup from login import Login from logout import Logout from wikipage import WikiPage from editpage import EditPage PAGE_RE = r'(/(?:[a-zA-Z0-9_-]+/?)*)' app = webapp2.WSGIApplication([ ('/si...
# -*- coding: utf-8 -*- import webapp2 # Importing request handlers from signup import Signup from login import Login from logout import Logout from wikipage import WikiPage from editpage import EditPage from historypage import HistoryPage PAGE_RE = r'(/(?:[a-zA-Z0-9_-]+/?)*)' app = webapp2.WSGIAp...
# -*- coding: utf-8 -*- import webapp2 # Importing request handlers from signup import Signup from login import Login from logout import Logout from wikipage import WikiPage from editpage import EditPage PAGE_RE = r'(/(?:[a-zA-Z0-9_-]+/?)*)' app = webapp2.WSGIApplication([ ('/signup', Signup),...
<commit_before># -*- coding: utf-8 -*- import webapp2 # Importing request handlers from signup import Signup from login import Login from logout import Logout from wikipage import WikiPage from editpage import EditPage PAGE_RE = r'(/(?:[a-zA-Z0-9_-]+/?)*)' app = webapp2.WSGIApplication([ ('/si...
f5cc3275a11c809bb6f5ab097414d0a5ccda2341
main.py
main.py
def main(): website = input("Input website(cnn, nytimes, bbc, nzherald): ") url = input("Input url: ") scraper(website, url) def scraper(website, url): print("%s, %s" % (website, url)) if __name__ == '__main__': main()
def main(): website = input("Input website(cnn, nytimes, bbc, nzherald): ") url = input("Input url: ") scraper(website, url) def scraper(website, url): if ".com" not in url: print("Invalid url") exit() print("%s, %s" % (website, url)) if __name__ == '__main__': main()
Check for .com in url
Check for .com in url
Python
mit
Alex-Gurung/ScrapeTheNews
def main(): website = input("Input website(cnn, nytimes, bbc, nzherald): ") url = input("Input url: ") scraper(website, url) def scraper(website, url): print("%s, %s" % (website, url)) if __name__ == '__main__': main()Check for .com in url
def main(): website = input("Input website(cnn, nytimes, bbc, nzherald): ") url = input("Input url: ") scraper(website, url) def scraper(website, url): if ".com" not in url: print("Invalid url") exit() print("%s, %s" % (website, url)) if __name__ == '__main__': main()
<commit_before>def main(): website = input("Input website(cnn, nytimes, bbc, nzherald): ") url = input("Input url: ") scraper(website, url) def scraper(website, url): print("%s, %s" % (website, url)) if __name__ == '__main__': main()<commit_msg>Check for .com in url<commit_after>
def main(): website = input("Input website(cnn, nytimes, bbc, nzherald): ") url = input("Input url: ") scraper(website, url) def scraper(website, url): if ".com" not in url: print("Invalid url") exit() print("%s, %s" % (website, url)) if __name__ == '__main__': main()
def main(): website = input("Input website(cnn, nytimes, bbc, nzherald): ") url = input("Input url: ") scraper(website, url) def scraper(website, url): print("%s, %s" % (website, url)) if __name__ == '__main__': main()Check for .com in urldef main(): website = input("Input website(cnn, nytimes, bbc, nzher...
<commit_before>def main(): website = input("Input website(cnn, nytimes, bbc, nzherald): ") url = input("Input url: ") scraper(website, url) def scraper(website, url): print("%s, %s" % (website, url)) if __name__ == '__main__': main()<commit_msg>Check for .com in url<commit_after>def main(): website = inpu...
e3e98b0533460837c4ea2eac67c4281eb0ba0012
test/requests/parametrized_test.py
test/requests/parametrized_test.py
import logging import unittest from wqflask import app from elasticsearch import Elasticsearch, TransportError class ParametrizedTest(unittest.TestCase): def __init__(self, methodName='runTest', gn2_url="http://localhost:5003", es_url="localhost:9200"): super(ParametrizedTest, self).__init__(methodName=me...
import logging import unittest from wqflask import app from utility.elasticsearch_tools import get_elasticsearch_connection, get_user_by_unique_column from elasticsearch import Elasticsearch, TransportError class ParametrizedTest(unittest.TestCase): def __init__(self, methodName='runTest', gn2_url="http://localho...
Use existing code. Delay after delete.
Use existing code. Delay after delete. * Use existing code to get the elasticsearch connection. This should prevent tests from failing in case the way connections to elasticsearch are made change. * Delay a while after deleting to allow elasticsearch to re-index the data, thus preventing subtle bugs in the test....
Python
agpl-3.0
DannyArends/genenetwork2,genenetwork/genenetwork2,genenetwork/genenetwork2,pjotrp/genenetwork2,zsloan/genenetwork2,genenetwork/genenetwork2,zsloan/genenetwork2,DannyArends/genenetwork2,pjotrp/genenetwork2,zsloan/genenetwork2,DannyArends/genenetwork2,pjotrp/genenetwork2,pjotrp/genenetwork2,pjotrp/genenetwork2,zsloan/gen...
import logging import unittest from wqflask import app from elasticsearch import Elasticsearch, TransportError class ParametrizedTest(unittest.TestCase): def __init__(self, methodName='runTest', gn2_url="http://localhost:5003", es_url="localhost:9200"): super(ParametrizedTest, self).__init__(methodName=me...
import logging import unittest from wqflask import app from utility.elasticsearch_tools import get_elasticsearch_connection, get_user_by_unique_column from elasticsearch import Elasticsearch, TransportError class ParametrizedTest(unittest.TestCase): def __init__(self, methodName='runTest', gn2_url="http://localho...
<commit_before>import logging import unittest from wqflask import app from elasticsearch import Elasticsearch, TransportError class ParametrizedTest(unittest.TestCase): def __init__(self, methodName='runTest', gn2_url="http://localhost:5003", es_url="localhost:9200"): super(ParametrizedTest, self).__init_...
import logging import unittest from wqflask import app from utility.elasticsearch_tools import get_elasticsearch_connection, get_user_by_unique_column from elasticsearch import Elasticsearch, TransportError class ParametrizedTest(unittest.TestCase): def __init__(self, methodName='runTest', gn2_url="http://localho...
import logging import unittest from wqflask import app from elasticsearch import Elasticsearch, TransportError class ParametrizedTest(unittest.TestCase): def __init__(self, methodName='runTest', gn2_url="http://localhost:5003", es_url="localhost:9200"): super(ParametrizedTest, self).__init__(methodName=me...
<commit_before>import logging import unittest from wqflask import app from elasticsearch import Elasticsearch, TransportError class ParametrizedTest(unittest.TestCase): def __init__(self, methodName='runTest', gn2_url="http://localhost:5003", es_url="localhost:9200"): super(ParametrizedTest, self).__init_...
cdb4fa00328f3bc5852b9cae799d4d3ed99f1280
pyramid_authsanity/util.py
pyramid_authsanity/util.py
from pyramid.interfaces import ( ISessionFactory, ) from .interfaces import ( IAuthService, IAuthSourceService, ) def int_or_none(x): return int(x) if x is not None else x def kw_from_settings(settings, from_prefix='authsanity.'): return dict((k.replace(from_prefix, ''), v) for (k, v) in ...
from pyramid.interfaces import ( ISessionFactory, ) from .interfaces import ( IAuthService, IAuthSourceService, ) def int_or_none(x): return int(x) if x is not None else x def kw_from_settings(settings, from_prefix='authsanity.'): return { k.replace(from_prefix, ''): v for k, v in setting...
Revert "Py 2.6 support is back"
Revert "Py 2.6 support is back" This reverts commit 463c1ab6a7f5a7909b967e0dfa0320a77e166b95.
Python
isc
usingnamespace/pyramid_authsanity
from pyramid.interfaces import ( ISessionFactory, ) from .interfaces import ( IAuthService, IAuthSourceService, ) def int_or_none(x): return int(x) if x is not None else x def kw_from_settings(settings, from_prefix='authsanity.'): return dict((k.replace(from_prefix, ''), v) for (k, v) in ...
from pyramid.interfaces import ( ISessionFactory, ) from .interfaces import ( IAuthService, IAuthSourceService, ) def int_or_none(x): return int(x) if x is not None else x def kw_from_settings(settings, from_prefix='authsanity.'): return { k.replace(from_prefix, ''): v for k, v in setting...
<commit_before>from pyramid.interfaces import ( ISessionFactory, ) from .interfaces import ( IAuthService, IAuthSourceService, ) def int_or_none(x): return int(x) if x is not None else x def kw_from_settings(settings, from_prefix='authsanity.'): return dict((k.replace(from_prefix, ''), v)...
from pyramid.interfaces import ( ISessionFactory, ) from .interfaces import ( IAuthService, IAuthSourceService, ) def int_or_none(x): return int(x) if x is not None else x def kw_from_settings(settings, from_prefix='authsanity.'): return { k.replace(from_prefix, ''): v for k, v in setting...
from pyramid.interfaces import ( ISessionFactory, ) from .interfaces import ( IAuthService, IAuthSourceService, ) def int_or_none(x): return int(x) if x is not None else x def kw_from_settings(settings, from_prefix='authsanity.'): return dict((k.replace(from_prefix, ''), v) for (k, v) in ...
<commit_before>from pyramid.interfaces import ( ISessionFactory, ) from .interfaces import ( IAuthService, IAuthSourceService, ) def int_or_none(x): return int(x) if x is not None else x def kw_from_settings(settings, from_prefix='authsanity.'): return dict((k.replace(from_prefix, ''), v)...
977c8cc25c3978931e0d908589232db1bcac5b3f
fitizen/body_weight_workout/views.py
fitizen/body_weight_workout/views.py
# from datetime import datetime from django.views.generic import RedirectView from django.core.urlresolvers import reverse_lazy from .models import BodyWeightWorkout from braces import views # Create your views here. class CreateWorkout( views.LoginRequiredMixin, views.MessageMixin, RedirectView ): ...
from datetime import datetime from django.utils import timezone from django.shortcuts import redirect from django.views.generic import View from django.core.urlresolvers import reverse_lazy from .models import BodyWeightWorkout from braces import views # Create your views here. class CreateWorkout( views.Login...
Create Workout now checks to see if you worked out once today already, if so tells user they already worked out on that day. fixed error where redirect would not re-instantiate get request to createview
Create Workout now checks to see if you worked out once today already, if so tells user they already worked out on that day. fixed error where redirect would not re-instantiate get request to createview
Python
mit
johnshiver/fitizen,johnshiver/fitizen
# from datetime import datetime from django.views.generic import RedirectView from django.core.urlresolvers import reverse_lazy from .models import BodyWeightWorkout from braces import views # Create your views here. class CreateWorkout( views.LoginRequiredMixin, views.MessageMixin, RedirectView ): ...
from datetime import datetime from django.utils import timezone from django.shortcuts import redirect from django.views.generic import View from django.core.urlresolvers import reverse_lazy from .models import BodyWeightWorkout from braces import views # Create your views here. class CreateWorkout( views.Login...
<commit_before># from datetime import datetime from django.views.generic import RedirectView from django.core.urlresolvers import reverse_lazy from .models import BodyWeightWorkout from braces import views # Create your views here. class CreateWorkout( views.LoginRequiredMixin, views.MessageMixin, Red...
from datetime import datetime from django.utils import timezone from django.shortcuts import redirect from django.views.generic import View from django.core.urlresolvers import reverse_lazy from .models import BodyWeightWorkout from braces import views # Create your views here. class CreateWorkout( views.Login...
# from datetime import datetime from django.views.generic import RedirectView from django.core.urlresolvers import reverse_lazy from .models import BodyWeightWorkout from braces import views # Create your views here. class CreateWorkout( views.LoginRequiredMixin, views.MessageMixin, RedirectView ): ...
<commit_before># from datetime import datetime from django.views.generic import RedirectView from django.core.urlresolvers import reverse_lazy from .models import BodyWeightWorkout from braces import views # Create your views here. class CreateWorkout( views.LoginRequiredMixin, views.MessageMixin, Red...
6567120249b82477bcf0ef82554b057f93618e7e
tools/gyp/find_mac_gcc_version.py
tools/gyp/find_mac_gcc_version.py
#!/usr/bin/env python # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import re import subprocess import sys def main(): job = subprocess.Popen(['xcode...
#!/usr/bin/env python # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import re import subprocess import sys def main(): job = subprocess.Popen(['xcode...
Revert "Use clang on mac if XCode >= 4.5"
Revert "Use clang on mac if XCode >= 4.5" We cannot build v8 after this change because clang reports a warning in v8/src/parser.cc about an unused field (and we turn warnings into errors). We can enable this change again after we update to a new v8 version (this seems to be fixed in v3.17). Review URL: https://coder...
Python
bsd-3-clause
dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dartino/dart-sdk,dartino/dart-s...
#!/usr/bin/env python # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import re import subprocess import sys def main(): job = subprocess.Popen(['xcode...
#!/usr/bin/env python # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import re import subprocess import sys def main(): job = subprocess.Popen(['xcode...
<commit_before>#!/usr/bin/env python # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import re import subprocess import sys def main(): job = subproces...
#!/usr/bin/env python # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import re import subprocess import sys def main(): job = subprocess.Popen(['xcode...
#!/usr/bin/env python # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import re import subprocess import sys def main(): job = subprocess.Popen(['xcode...
<commit_before>#!/usr/bin/env python # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import re import subprocess import sys def main(): job = subproces...
c7c1f63836e052b7a63e35956a74d03f1be30677
webapp-django/questionnaire/views.py
webapp-django/questionnaire/views.py
from django.shortcuts import render from .models import Question, MultipleChoiceQuestion def index(request): pass def questions(request): ques = MultipleChoiceQuestion.objects.all() + Question.objects.all() questions = [] p = 0 for h in que: p += 1 q = 0 qu = [h['questi...
from django.shortcuts import render from .models import Question, MultipleChoiceQuestion def index(request): pass def questions(request): ques = MultipleChoiceQuestion.objects.all() # + Question.objects.all() questions = [] p = 0 for h in ques: p += 1 q = 0 qu = [h['que...
Remove Questions from queried objects
Remove Questions from queried objects
Python
mit
super1337/Super1337-CTF,super1337/Super1337-CTF,super1337/Super1337-CTF
from django.shortcuts import render from .models import Question, MultipleChoiceQuestion def index(request): pass def questions(request): ques = MultipleChoiceQuestion.objects.all() + Question.objects.all() questions = [] p = 0 for h in que: p += 1 q = 0 qu = [h['questi...
from django.shortcuts import render from .models import Question, MultipleChoiceQuestion def index(request): pass def questions(request): ques = MultipleChoiceQuestion.objects.all() # + Question.objects.all() questions = [] p = 0 for h in ques: p += 1 q = 0 qu = [h['que...
<commit_before>from django.shortcuts import render from .models import Question, MultipleChoiceQuestion def index(request): pass def questions(request): ques = MultipleChoiceQuestion.objects.all() + Question.objects.all() questions = [] p = 0 for h in que: p += 1 q = 0 ...
from django.shortcuts import render from .models import Question, MultipleChoiceQuestion def index(request): pass def questions(request): ques = MultipleChoiceQuestion.objects.all() # + Question.objects.all() questions = [] p = 0 for h in ques: p += 1 q = 0 qu = [h['que...
from django.shortcuts import render from .models import Question, MultipleChoiceQuestion def index(request): pass def questions(request): ques = MultipleChoiceQuestion.objects.all() + Question.objects.all() questions = [] p = 0 for h in que: p += 1 q = 0 qu = [h['questi...
<commit_before>from django.shortcuts import render from .models import Question, MultipleChoiceQuestion def index(request): pass def questions(request): ques = MultipleChoiceQuestion.objects.all() + Question.objects.all() questions = [] p = 0 for h in que: p += 1 q = 0 ...
8218b398731e8d9093a91de9bb127e2e933fa6db
json_editor/admin.py
json_editor/admin.py
import json import copy from django import forms from django.utils.safestring import mark_safe from django.template.loader import render_to_string class JSONEditorWidget(forms.Widget): template_name = 'django_json_editor/django_json_editor.html' def __init__(self, schema, collapsed=True): super()._...
import json import copy from django import forms from django.utils.safestring import mark_safe from django.template.loader import render_to_string class JSONEditorWidget(forms.Widget): template_name = 'django_json_editor/django_json_editor.html' def __init__(self, schema, collapsed=True): super()._...
Load value from json field as string.
Load value from json field as string.
Python
mit
abogushov/django-admin-json-editor,abogushov/django-admin-json-editor
import json import copy from django import forms from django.utils.safestring import mark_safe from django.template.loader import render_to_string class JSONEditorWidget(forms.Widget): template_name = 'django_json_editor/django_json_editor.html' def __init__(self, schema, collapsed=True): super()._...
import json import copy from django import forms from django.utils.safestring import mark_safe from django.template.loader import render_to_string class JSONEditorWidget(forms.Widget): template_name = 'django_json_editor/django_json_editor.html' def __init__(self, schema, collapsed=True): super()._...
<commit_before>import json import copy from django import forms from django.utils.safestring import mark_safe from django.template.loader import render_to_string class JSONEditorWidget(forms.Widget): template_name = 'django_json_editor/django_json_editor.html' def __init__(self, schema, collapsed=True): ...
import json import copy from django import forms from django.utils.safestring import mark_safe from django.template.loader import render_to_string class JSONEditorWidget(forms.Widget): template_name = 'django_json_editor/django_json_editor.html' def __init__(self, schema, collapsed=True): super()._...
import json import copy from django import forms from django.utils.safestring import mark_safe from django.template.loader import render_to_string class JSONEditorWidget(forms.Widget): template_name = 'django_json_editor/django_json_editor.html' def __init__(self, schema, collapsed=True): super()._...
<commit_before>import json import copy from django import forms from django.utils.safestring import mark_safe from django.template.loader import render_to_string class JSONEditorWidget(forms.Widget): template_name = 'django_json_editor/django_json_editor.html' def __init__(self, schema, collapsed=True): ...
414f6e9174b8c7b88866319af19a5e36fcec643d
kk/admin/__init__.py
kk/admin/__init__.py
from django.contrib import admin from kk.models import Hearing, Label, Introduction, Scenario, Comment admin.site.register(Label) admin.site.register(Hearing) admin.site.register(Introduction) admin.site.register(Scenario) admin.site.register(Comment)
from django.contrib import admin from kk import models ### Inlines class IntroductionInline(admin.StackedInline): model = models.Introduction extra = 0 exclude = ["id"] class ScenarioInline(admin.StackedInline): model = models.Scenario extra = 0 exclude = ["id"] class HearingImageInline(a...
Make the admin a little bit more palatable
Make the admin a little bit more palatable Refs #25
Python
mit
stephawe/kerrokantasi,City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi,vikoivun/kerrokantasi,City-of-Helsinki/kerrokantasi,stephawe/kerrokantasi,vikoivun/kerrokantasi,vikoivun/kerrokantasi,stephawe/kerrokantasi,City-of-Helsinki/kerrokantasi
from django.contrib import admin from kk.models import Hearing, Label, Introduction, Scenario, Comment admin.site.register(Label) admin.site.register(Hearing) admin.site.register(Introduction) admin.site.register(Scenario) admin.site.register(Comment) Make the admin a little bit more palatable Refs #25
from django.contrib import admin from kk import models ### Inlines class IntroductionInline(admin.StackedInline): model = models.Introduction extra = 0 exclude = ["id"] class ScenarioInline(admin.StackedInline): model = models.Scenario extra = 0 exclude = ["id"] class HearingImageInline(a...
<commit_before>from django.contrib import admin from kk.models import Hearing, Label, Introduction, Scenario, Comment admin.site.register(Label) admin.site.register(Hearing) admin.site.register(Introduction) admin.site.register(Scenario) admin.site.register(Comment) <commit_msg>Make the admin a little bit more palata...
from django.contrib import admin from kk import models ### Inlines class IntroductionInline(admin.StackedInline): model = models.Introduction extra = 0 exclude = ["id"] class ScenarioInline(admin.StackedInline): model = models.Scenario extra = 0 exclude = ["id"] class HearingImageInline(a...
from django.contrib import admin from kk.models import Hearing, Label, Introduction, Scenario, Comment admin.site.register(Label) admin.site.register(Hearing) admin.site.register(Introduction) admin.site.register(Scenario) admin.site.register(Comment) Make the admin a little bit more palatable Refs #25from django.co...
<commit_before>from django.contrib import admin from kk.models import Hearing, Label, Introduction, Scenario, Comment admin.site.register(Label) admin.site.register(Hearing) admin.site.register(Introduction) admin.site.register(Scenario) admin.site.register(Comment) <commit_msg>Make the admin a little bit more palata...
b0029cffae96e25611d7387e699774de4d9682d3
corehq/apps/es/tests/utils.py
corehq/apps/es/tests/utils.py
import json from nose.plugins.attrib import attr class ElasticTestMixin(object): def checkQuery(self, query, json_output, is_raw_query=False): if is_raw_query: raw_query = query else: raw_query = query.raw_query msg = "Expected Query:\n{}\nGenerated Query:\n{}".for...
import json from nose.plugins.attrib import attr from nose.tools import nottest class ElasticTestMixin(object): def checkQuery(self, query, json_output, is_raw_query=False): if is_raw_query: raw_query = query else: raw_query = query.raw_query msg = "Expected Query:...
Mark es_test decorator as nottest
Mark es_test decorator as nottest Second try...
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
import json from nose.plugins.attrib import attr class ElasticTestMixin(object): def checkQuery(self, query, json_output, is_raw_query=False): if is_raw_query: raw_query = query else: raw_query = query.raw_query msg = "Expected Query:\n{}\nGenerated Query:\n{}".for...
import json from nose.plugins.attrib import attr from nose.tools import nottest class ElasticTestMixin(object): def checkQuery(self, query, json_output, is_raw_query=False): if is_raw_query: raw_query = query else: raw_query = query.raw_query msg = "Expected Query:...
<commit_before>import json from nose.plugins.attrib import attr class ElasticTestMixin(object): def checkQuery(self, query, json_output, is_raw_query=False): if is_raw_query: raw_query = query else: raw_query = query.raw_query msg = "Expected Query:\n{}\nGenerated ...
import json from nose.plugins.attrib import attr from nose.tools import nottest class ElasticTestMixin(object): def checkQuery(self, query, json_output, is_raw_query=False): if is_raw_query: raw_query = query else: raw_query = query.raw_query msg = "Expected Query:...
import json from nose.plugins.attrib import attr class ElasticTestMixin(object): def checkQuery(self, query, json_output, is_raw_query=False): if is_raw_query: raw_query = query else: raw_query = query.raw_query msg = "Expected Query:\n{}\nGenerated Query:\n{}".for...
<commit_before>import json from nose.plugins.attrib import attr class ElasticTestMixin(object): def checkQuery(self, query, json_output, is_raw_query=False): if is_raw_query: raw_query = query else: raw_query = query.raw_query msg = "Expected Query:\n{}\nGenerated ...
913ae38e48591000195166a93e18e96a82d1d222
lily/messaging/email/migrations/0013_fix_multple_default_templates.py
lily/messaging/email/migrations/0013_fix_multple_default_templates.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def fix_multiple_default_templates(apps, schema_editor): # Some users have more than 1 default template. # This shouldn't be possible, make sure is will be just 1. User = apps.get_model('users', 'Lily...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def fix_multiple_default_templates(apps, schema_editor): # Some users have more than 1 default template. # This shouldn't be possible, make sure is will be just 1. User = apps.get_model('users', 'Lily...
Remove print statements, not usefull anymore.
Remove print statements, not usefull anymore.
Python
agpl-3.0
HelloLily/hellolily,HelloLily/hellolily,HelloLily/hellolily,HelloLily/hellolily
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def fix_multiple_default_templates(apps, schema_editor): # Some users have more than 1 default template. # This shouldn't be possible, make sure is will be just 1. User = apps.get_model('users', 'Lily...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def fix_multiple_default_templates(apps, schema_editor): # Some users have more than 1 default template. # This shouldn't be possible, make sure is will be just 1. User = apps.get_model('users', 'Lily...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def fix_multiple_default_templates(apps, schema_editor): # Some users have more than 1 default template. # This shouldn't be possible, make sure is will be just 1. User = apps.get_model...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def fix_multiple_default_templates(apps, schema_editor): # Some users have more than 1 default template. # This shouldn't be possible, make sure is will be just 1. User = apps.get_model('users', 'Lily...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def fix_multiple_default_templates(apps, schema_editor): # Some users have more than 1 default template. # This shouldn't be possible, make sure is will be just 1. User = apps.get_model('users', 'Lily...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def fix_multiple_default_templates(apps, schema_editor): # Some users have more than 1 default template. # This shouldn't be possible, make sure is will be just 1. User = apps.get_model...
517e22b331f63e80cb344e257789463627b44508
utilities/rename-random-number.py
utilities/rename-random-number.py
''' rename files in local directory with random integer names. windows screen saver isn't very good at randomizing fotos shown. Change file names regularly to provide more variety ''' import os import re import random random.seed() new_names = set() original_files = [] for entry in os.listdir(): if os.path.is...
#! python3 ''' rename files in local directory with random integer names. windows screen saver isn't very good at randomizing fotos shown. Change file names regularly to provide more variety ''' import os import re import random import time random.seed() new_names = set() original_files = [] for entry in os.lis...
Increase namespace, sleep before cmd window closes
Increase namespace, sleep before cmd window closes
Python
mit
daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various
''' rename files in local directory with random integer names. windows screen saver isn't very good at randomizing fotos shown. Change file names regularly to provide more variety ''' import os import re import random random.seed() new_names = set() original_files = [] for entry in os.listdir(): if os.path.is...
#! python3 ''' rename files in local directory with random integer names. windows screen saver isn't very good at randomizing fotos shown. Change file names regularly to provide more variety ''' import os import re import random import time random.seed() new_names = set() original_files = [] for entry in os.lis...
<commit_before>''' rename files in local directory with random integer names. windows screen saver isn't very good at randomizing fotos shown. Change file names regularly to provide more variety ''' import os import re import random random.seed() new_names = set() original_files = [] for entry in os.listdir(): ...
#! python3 ''' rename files in local directory with random integer names. windows screen saver isn't very good at randomizing fotos shown. Change file names regularly to provide more variety ''' import os import re import random import time random.seed() new_names = set() original_files = [] for entry in os.lis...
''' rename files in local directory with random integer names. windows screen saver isn't very good at randomizing fotos shown. Change file names regularly to provide more variety ''' import os import re import random random.seed() new_names = set() original_files = [] for entry in os.listdir(): if os.path.is...
<commit_before>''' rename files in local directory with random integer names. windows screen saver isn't very good at randomizing fotos shown. Change file names regularly to provide more variety ''' import os import re import random random.seed() new_names = set() original_files = [] for entry in os.listdir(): ...
69ae2f5b825ae6a404d78120b60727b59dbbcbac
xos/model_policies/model_policy_ControllerSlice.py
xos/model_policies/model_policy_ControllerSlice.py
def handle(controller_slice): from core.models import ControllerSlice, Slice try: my_status_code = int(controller_slice.backend_status[0]) try: his_status_code = int(controller_slice.slice.backend_status[0]) except: his_status_code = 0 if (my_status_...
def handle(controller_slice): from core.models import ControllerSlice, Slice try: my_status_code = int(controller_slice.backend_status[0]) try: his_status_code = int(controller_slice.slice.backend_status[0]) except: his_status_code = 0 fields = [] ...
Copy backend_register from ControllerSlice to Slice
Copy backend_register from ControllerSlice to Slice
Python
apache-2.0
jermowery/xos,xmaruto/mcord,xmaruto/mcord,jermowery/xos,cboling/xos,jermowery/xos,cboling/xos,cboling/xos,jermowery/xos,xmaruto/mcord,xmaruto/mcord,cboling/xos,cboling/xos
def handle(controller_slice): from core.models import ControllerSlice, Slice try: my_status_code = int(controller_slice.backend_status[0]) try: his_status_code = int(controller_slice.slice.backend_status[0]) except: his_status_code = 0 if (my_status_...
def handle(controller_slice): from core.models import ControllerSlice, Slice try: my_status_code = int(controller_slice.backend_status[0]) try: his_status_code = int(controller_slice.slice.backend_status[0]) except: his_status_code = 0 fields = [] ...
<commit_before>def handle(controller_slice): from core.models import ControllerSlice, Slice try: my_status_code = int(controller_slice.backend_status[0]) try: his_status_code = int(controller_slice.slice.backend_status[0]) except: his_status_code = 0 ...
def handle(controller_slice): from core.models import ControllerSlice, Slice try: my_status_code = int(controller_slice.backend_status[0]) try: his_status_code = int(controller_slice.slice.backend_status[0]) except: his_status_code = 0 fields = [] ...
def handle(controller_slice): from core.models import ControllerSlice, Slice try: my_status_code = int(controller_slice.backend_status[0]) try: his_status_code = int(controller_slice.slice.backend_status[0]) except: his_status_code = 0 if (my_status_...
<commit_before>def handle(controller_slice): from core.models import ControllerSlice, Slice try: my_status_code = int(controller_slice.backend_status[0]) try: his_status_code = int(controller_slice.slice.backend_status[0]) except: his_status_code = 0 ...
4de0da9c28351047b1de6f728da5e68d9e73b3fd
satori.ars/setup.py
satori.ars/setup.py
# vim:ts=4:sts=4:sw=4:expandtab from setuptools import setup, find_packages setup(name='satori.ars', packages=find_packages(), namespace_packages=[ 'satori', ], install_requires=[ 'setuptools', 'satori.objects', ] )
# vim:ts=4:sts=4:sw=4:expandtab from setuptools import setup, find_packages setup(name='satori.ars', packages=find_packages(), namespace_packages=[ 'satori', ], install_requires=[ 'setuptools', 'pyparsing', 'satori.objects', ] )
Add pyparsing to satori.ars dependencies.
Add pyparsing to satori.ars dependencies.
Python
mit
zielmicha/satori,zielmicha/satori,zielmicha/satori,zielmicha/satori,zielmicha/satori,zielmicha/satori,zielmicha/satori
# vim:ts=4:sts=4:sw=4:expandtab from setuptools import setup, find_packages setup(name='satori.ars', packages=find_packages(), namespace_packages=[ 'satori', ], install_requires=[ 'setuptools', 'satori.objects', ] ) Add pyparsing to satori.ars dependencies.
# vim:ts=4:sts=4:sw=4:expandtab from setuptools import setup, find_packages setup(name='satori.ars', packages=find_packages(), namespace_packages=[ 'satori', ], install_requires=[ 'setuptools', 'pyparsing', 'satori.objects', ] )
<commit_before># vim:ts=4:sts=4:sw=4:expandtab from setuptools import setup, find_packages setup(name='satori.ars', packages=find_packages(), namespace_packages=[ 'satori', ], install_requires=[ 'setuptools', 'satori.objects', ] ) <commit_msg>Add pyparsing to satori.ars depe...
# vim:ts=4:sts=4:sw=4:expandtab from setuptools import setup, find_packages setup(name='satori.ars', packages=find_packages(), namespace_packages=[ 'satori', ], install_requires=[ 'setuptools', 'pyparsing', 'satori.objects', ] )
# vim:ts=4:sts=4:sw=4:expandtab from setuptools import setup, find_packages setup(name='satori.ars', packages=find_packages(), namespace_packages=[ 'satori', ], install_requires=[ 'setuptools', 'satori.objects', ] ) Add pyparsing to satori.ars dependencies.# vim:ts=4:sts=4:s...
<commit_before># vim:ts=4:sts=4:sw=4:expandtab from setuptools import setup, find_packages setup(name='satori.ars', packages=find_packages(), namespace_packages=[ 'satori', ], install_requires=[ 'setuptools', 'satori.objects', ] ) <commit_msg>Add pyparsing to satori.ars depe...
5d6d2a02963cadd9b0a5c148fb6906fa63148052
booster_bdd/features/environment.py
booster_bdd/features/environment.py
"""Module with code to be run before and after certain events during the testing.""" import os from src.support import helpers def before_all(_context): """Perform the setup before the first event.""" if not helpers.is_user_logged_in(): username = os.getenv("OSIO_USERNAME") password = os.geten...
"""Module with code to be run before and after certain events during the testing.""" import os from src.support import helpers def before_all(_context): """Perform the setup before the first event.""" if not helpers.is_user_logged_in(): username = os.getenv("OSIO_USERNAME") password = os.geten...
Check for env. variable existence
Check for env. variable existence
Python
apache-2.0
ldimaggi/fabric8-test,ldimaggi/fabric8-test,ldimaggi/fabric8-test,ldimaggi/fabric8-test,ldimaggi/fabric8-test,ldimaggi/fabric8-test
"""Module with code to be run before and after certain events during the testing.""" import os from src.support import helpers def before_all(_context): """Perform the setup before the first event.""" if not helpers.is_user_logged_in(): username = os.getenv("OSIO_USERNAME") password = os.geten...
"""Module with code to be run before and after certain events during the testing.""" import os from src.support import helpers def before_all(_context): """Perform the setup before the first event.""" if not helpers.is_user_logged_in(): username = os.getenv("OSIO_USERNAME") password = os.geten...
<commit_before>"""Module with code to be run before and after certain events during the testing.""" import os from src.support import helpers def before_all(_context): """Perform the setup before the first event.""" if not helpers.is_user_logged_in(): username = os.getenv("OSIO_USERNAME") pass...
"""Module with code to be run before and after certain events during the testing.""" import os from src.support import helpers def before_all(_context): """Perform the setup before the first event.""" if not helpers.is_user_logged_in(): username = os.getenv("OSIO_USERNAME") password = os.geten...
"""Module with code to be run before and after certain events during the testing.""" import os from src.support import helpers def before_all(_context): """Perform the setup before the first event.""" if not helpers.is_user_logged_in(): username = os.getenv("OSIO_USERNAME") password = os.geten...
<commit_before>"""Module with code to be run before and after certain events during the testing.""" import os from src.support import helpers def before_all(_context): """Perform the setup before the first event.""" if not helpers.is_user_logged_in(): username = os.getenv("OSIO_USERNAME") pass...
08113ee79785f394a1c5244cdb87bef9f7fc5ff3
catplot/__init__.py
catplot/__init__.py
__all__ = ['en_profile'] __version__ = '0.1.0'
__all__ = ['en_profile', 'functions', 'chem_parser'] __version__ = '0.1.0'
Add more modules to __all__
Add more modules to __all__
Python
mit
PytLab/catplot
__all__ = ['en_profile'] __version__ = '0.1.0' Add more modules to __all__
__all__ = ['en_profile', 'functions', 'chem_parser'] __version__ = '0.1.0'
<commit_before>__all__ = ['en_profile'] __version__ = '0.1.0' <commit_msg>Add more modules to __all__<commit_after>
__all__ = ['en_profile', 'functions', 'chem_parser'] __version__ = '0.1.0'
__all__ = ['en_profile'] __version__ = '0.1.0' Add more modules to __all____all__ = ['en_profile', 'functions', 'chem_parser'] __version__ = '0.1.0'
<commit_before>__all__ = ['en_profile'] __version__ = '0.1.0' <commit_msg>Add more modules to __all__<commit_after>__all__ = ['en_profile', 'functions', 'chem_parser'] __version__ = '0.1.0'
338a6e8da75a5b950949638b1a810510419450e9
scripts/state_and_transition.py
scripts/state_and_transition.py
#!/usr/bin/env python # # Copyright 2017 Robot Garden, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
#!/usr/bin/env python # # Copyright 2017 Robot Garden, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
Add new state for driving away from cone
Add new state for driving away from cone
Python
apache-2.0
ProgrammingRobotsStudyGroup/robo_magellan,ProgrammingRobotsStudyGroup/robo_magellan,ProgrammingRobotsStudyGroup/robo_magellan,ProgrammingRobotsStudyGroup/robo_magellan
#!/usr/bin/env python # # Copyright 2017 Robot Garden, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
#!/usr/bin/env python # # Copyright 2017 Robot Garden, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
<commit_before>#!/usr/bin/env python # # Copyright 2017 Robot Garden, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
#!/usr/bin/env python # # Copyright 2017 Robot Garden, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
#!/usr/bin/env python # # Copyright 2017 Robot Garden, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
<commit_before>#!/usr/bin/env python # # Copyright 2017 Robot Garden, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
7f5392d2581e789917b8ba5352d821277d5de8ab
numpy/typing/_scalars.py
numpy/typing/_scalars.py
from typing import Union, Tuple, Any import numpy as np # NOTE: `_StrLike` and `_BytesLike` are pointless, as `np.str_` and `np.bytes_` # are already subclasses of their builtin counterpart _CharLike = Union[str, bytes] _BoolLike = Union[bool, np.bool_] _IntLike = Union[int, np.integer] _FloatLike = Union[_IntLike,...
from typing import Union, Tuple, Any import numpy as np # NOTE: `_StrLike` and `_BytesLike` are pointless, as `np.str_` and `np.bytes_` # are already subclasses of their builtin counterpart _CharLike = Union[str, bytes] # The 6 `<X>Like` type-aliases below represent all scalars that can be # coerced into `<X>` (wit...
Add `_BoolLike` to the union defining `_IntLike`
ENH: Add `_BoolLike` to the union defining `_IntLike`
Python
bsd-3-clause
seberg/numpy,pdebuyl/numpy,mhvk/numpy,pbrod/numpy,madphysicist/numpy,endolith/numpy,mattip/numpy,simongibbons/numpy,numpy/numpy,endolith/numpy,jakirkham/numpy,rgommers/numpy,mattip/numpy,madphysicist/numpy,mhvk/numpy,jakirkham/numpy,pdebuyl/numpy,simongibbons/numpy,charris/numpy,simongibbons/numpy,anntzer/numpy,charris...
from typing import Union, Tuple, Any import numpy as np # NOTE: `_StrLike` and `_BytesLike` are pointless, as `np.str_` and `np.bytes_` # are already subclasses of their builtin counterpart _CharLike = Union[str, bytes] _BoolLike = Union[bool, np.bool_] _IntLike = Union[int, np.integer] _FloatLike = Union[_IntLike,...
from typing import Union, Tuple, Any import numpy as np # NOTE: `_StrLike` and `_BytesLike` are pointless, as `np.str_` and `np.bytes_` # are already subclasses of their builtin counterpart _CharLike = Union[str, bytes] # The 6 `<X>Like` type-aliases below represent all scalars that can be # coerced into `<X>` (wit...
<commit_before>from typing import Union, Tuple, Any import numpy as np # NOTE: `_StrLike` and `_BytesLike` are pointless, as `np.str_` and `np.bytes_` # are already subclasses of their builtin counterpart _CharLike = Union[str, bytes] _BoolLike = Union[bool, np.bool_] _IntLike = Union[int, np.integer] _FloatLike = ...
from typing import Union, Tuple, Any import numpy as np # NOTE: `_StrLike` and `_BytesLike` are pointless, as `np.str_` and `np.bytes_` # are already subclasses of their builtin counterpart _CharLike = Union[str, bytes] # The 6 `<X>Like` type-aliases below represent all scalars that can be # coerced into `<X>` (wit...
from typing import Union, Tuple, Any import numpy as np # NOTE: `_StrLike` and `_BytesLike` are pointless, as `np.str_` and `np.bytes_` # are already subclasses of their builtin counterpart _CharLike = Union[str, bytes] _BoolLike = Union[bool, np.bool_] _IntLike = Union[int, np.integer] _FloatLike = Union[_IntLike,...
<commit_before>from typing import Union, Tuple, Any import numpy as np # NOTE: `_StrLike` and `_BytesLike` are pointless, as `np.str_` and `np.bytes_` # are already subclasses of their builtin counterpart _CharLike = Union[str, bytes] _BoolLike = Union[bool, np.bool_] _IntLike = Union[int, np.integer] _FloatLike = ...
47faa5797e5d017848d695bc2ed960d6b8228bd8
openxc/sources/serial.py
openxc/sources/serial.py
"""A virtual serial port data source.""" from __future__ import absolute_import import logging from .base import BytestreamDataSource, DataSourceError LOG = logging.getLogger(__name__) try: import serial except ImportError: LOG.debug("serial library not installed, can't use serial interface") class Serial...
"""A virtual serial port data source.""" from __future__ import absolute_import import logging from .base import BytestreamDataSource, DataSourceError LOG = logging.getLogger(__name__) try: import serial except ImportError: LOG.debug("serial library not installed, can't use serial interface") class Serial...
Change default baud rate to 230400 to match cantranslator.
Change default baud rate to 230400 to match cantranslator.
Python
bsd-3-clause
openxc/openxc-python,openxc/openxc-python,openxc/openxc-python
"""A virtual serial port data source.""" from __future__ import absolute_import import logging from .base import BytestreamDataSource, DataSourceError LOG = logging.getLogger(__name__) try: import serial except ImportError: LOG.debug("serial library not installed, can't use serial interface") class Serial...
"""A virtual serial port data source.""" from __future__ import absolute_import import logging from .base import BytestreamDataSource, DataSourceError LOG = logging.getLogger(__name__) try: import serial except ImportError: LOG.debug("serial library not installed, can't use serial interface") class Serial...
<commit_before>"""A virtual serial port data source.""" from __future__ import absolute_import import logging from .base import BytestreamDataSource, DataSourceError LOG = logging.getLogger(__name__) try: import serial except ImportError: LOG.debug("serial library not installed, can't use serial interface")...
"""A virtual serial port data source.""" from __future__ import absolute_import import logging from .base import BytestreamDataSource, DataSourceError LOG = logging.getLogger(__name__) try: import serial except ImportError: LOG.debug("serial library not installed, can't use serial interface") class Serial...
"""A virtual serial port data source.""" from __future__ import absolute_import import logging from .base import BytestreamDataSource, DataSourceError LOG = logging.getLogger(__name__) try: import serial except ImportError: LOG.debug("serial library not installed, can't use serial interface") class Serial...
<commit_before>"""A virtual serial port data source.""" from __future__ import absolute_import import logging from .base import BytestreamDataSource, DataSourceError LOG = logging.getLogger(__name__) try: import serial except ImportError: LOG.debug("serial library not installed, can't use serial interface")...
239e759eed720f884e492e47b82e64f25fdc215f
core/views.py
core/views.py
# views.py from django.shortcuts import render from wagtail.core.models import Page from wagtail.search.models import Query def search(request): # Search search_query = request.GET.get("q", None) if search_query: search_results = Page.objects.live().search(search_query) # Log the query ...
# views.py from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator from django.shortcuts import render from wagtail.core.models import Page from wagtail.search.models import Query def search(request): # Search search_query = request.GET.get("q", None) page = request.GET.get("page", 1) ...
Add pagination to the reinstated search view
Add pagination to the reinstated search view
Python
mit
springload/madewithwagtail,springload/madewithwagtail,springload/madewithwagtail,springload/madewithwagtail
# views.py from django.shortcuts import render from wagtail.core.models import Page from wagtail.search.models import Query def search(request): # Search search_query = request.GET.get("q", None) if search_query: search_results = Page.objects.live().search(search_query) # Log the query ...
# views.py from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator from django.shortcuts import render from wagtail.core.models import Page from wagtail.search.models import Query def search(request): # Search search_query = request.GET.get("q", None) page = request.GET.get("page", 1) ...
<commit_before># views.py from django.shortcuts import render from wagtail.core.models import Page from wagtail.search.models import Query def search(request): # Search search_query = request.GET.get("q", None) if search_query: search_results = Page.objects.live().search(search_query) #...
# views.py from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator from django.shortcuts import render from wagtail.core.models import Page from wagtail.search.models import Query def search(request): # Search search_query = request.GET.get("q", None) page = request.GET.get("page", 1) ...
# views.py from django.shortcuts import render from wagtail.core.models import Page from wagtail.search.models import Query def search(request): # Search search_query = request.GET.get("q", None) if search_query: search_results = Page.objects.live().search(search_query) # Log the query ...
<commit_before># views.py from django.shortcuts import render from wagtail.core.models import Page from wagtail.search.models import Query def search(request): # Search search_query = request.GET.get("q", None) if search_query: search_results = Page.objects.live().search(search_query) #...
24ba796dde4ce414d7fe72ccf553f687e13039f4
shopify/product/tasks.py
shopify/product/tasks.py
from decimal import Decimal from django.conf import settings from django.core.mail import EmailMessage from celery.utils.log import get_task_logger from .csv_attach import CSVAttachmentWriter from .models import Transaction from celeryapp import app logger = get_task_logger(__name__) @app.task(max_retries=3) def...
from decimal import Decimal from django.conf import settings from django.core.mail import EmailMessage from celery.utils.log import get_task_logger from .csv_attach import CSVAttachmentWriter from .models import Transaction from celeryapp import app logger = get_task_logger(__name__) @app.task(max_retries=3) def...
Refactor email task variable names
Refactor email task variable names
Python
bsd-3-clause
CorbanU/corban-shopify,CorbanU/corban-shopify
from decimal import Decimal from django.conf import settings from django.core.mail import EmailMessage from celery.utils.log import get_task_logger from .csv_attach import CSVAttachmentWriter from .models import Transaction from celeryapp import app logger = get_task_logger(__name__) @app.task(max_retries=3) def...
from decimal import Decimal from django.conf import settings from django.core.mail import EmailMessage from celery.utils.log import get_task_logger from .csv_attach import CSVAttachmentWriter from .models import Transaction from celeryapp import app logger = get_task_logger(__name__) @app.task(max_retries=3) def...
<commit_before>from decimal import Decimal from django.conf import settings from django.core.mail import EmailMessage from celery.utils.log import get_task_logger from .csv_attach import CSVAttachmentWriter from .models import Transaction from celeryapp import app logger = get_task_logger(__name__) @app.task(max...
from decimal import Decimal from django.conf import settings from django.core.mail import EmailMessage from celery.utils.log import get_task_logger from .csv_attach import CSVAttachmentWriter from .models import Transaction from celeryapp import app logger = get_task_logger(__name__) @app.task(max_retries=3) def...
from decimal import Decimal from django.conf import settings from django.core.mail import EmailMessage from celery.utils.log import get_task_logger from .csv_attach import CSVAttachmentWriter from .models import Transaction from celeryapp import app logger = get_task_logger(__name__) @app.task(max_retries=3) def...
<commit_before>from decimal import Decimal from django.conf import settings from django.core.mail import EmailMessage from celery.utils.log import get_task_logger from .csv_attach import CSVAttachmentWriter from .models import Transaction from celeryapp import app logger = get_task_logger(__name__) @app.task(max...
f3d3c0ce81ba8717f5839b502e57d75ebbc1f6e7
meetuppizza/views.py
meetuppizza/views.py
from django.contrib.auth import authenticate, login, logout from django.shortcuts import render, redirect from meetuppizza.forms import RegistrationForm from meetup.models import Meetup from meetup.services.meetup_service import MeetupService def index(request): meetups = Meetup.objects.all() meetup_presenters = ...
from django.contrib.auth import authenticate, login, logout from django.shortcuts import render, redirect from meetuppizza.forms import RegistrationForm from meetup.models import Meetup from meetup.services.meetup_service import MeetupService def index(request): meetups = Meetup.objects.all() meetup_presenters = ...
Use list comprehension to generate MeetupPresentor list in index view
Use list comprehension to generate MeetupPresentor list in index view
Python
mit
nicole-a-tesla/meetup.pizza,nicole-a-tesla/meetup.pizza
from django.contrib.auth import authenticate, login, logout from django.shortcuts import render, redirect from meetuppizza.forms import RegistrationForm from meetup.models import Meetup from meetup.services.meetup_service import MeetupService def index(request): meetups = Meetup.objects.all() meetup_presenters = ...
from django.contrib.auth import authenticate, login, logout from django.shortcuts import render, redirect from meetuppizza.forms import RegistrationForm from meetup.models import Meetup from meetup.services.meetup_service import MeetupService def index(request): meetups = Meetup.objects.all() meetup_presenters = ...
<commit_before>from django.contrib.auth import authenticate, login, logout from django.shortcuts import render, redirect from meetuppizza.forms import RegistrationForm from meetup.models import Meetup from meetup.services.meetup_service import MeetupService def index(request): meetups = Meetup.objects.all() meetu...
from django.contrib.auth import authenticate, login, logout from django.shortcuts import render, redirect from meetuppizza.forms import RegistrationForm from meetup.models import Meetup from meetup.services.meetup_service import MeetupService def index(request): meetups = Meetup.objects.all() meetup_presenters = ...
from django.contrib.auth import authenticate, login, logout from django.shortcuts import render, redirect from meetuppizza.forms import RegistrationForm from meetup.models import Meetup from meetup.services.meetup_service import MeetupService def index(request): meetups = Meetup.objects.all() meetup_presenters = ...
<commit_before>from django.contrib.auth import authenticate, login, logout from django.shortcuts import render, redirect from meetuppizza.forms import RegistrationForm from meetup.models import Meetup from meetup.services.meetup_service import MeetupService def index(request): meetups = Meetup.objects.all() meetu...
c6ef5bcac4d5daddac97ff30ff18645249928ac0
nap/engine.py
nap/engine.py
import json try: import msgpack except ImportError: pass from decimal import Decimal from datetime import date, datetime, time class Engine(object): # The list of content types we match CONTENT_TYPES = [] def dumps(self, data): # pragma: no cover '''How to serialiser an object''' ...
import json class Engine(object): # The list of content types we match CONTENT_TYPES = [] def dumps(self, data): # pragma: no cover '''How to serialiser an object''' raise NotImplementedError def loads(self, data): # pragma: no cover '''How to deserialise a string''' ...
Remove unused imports Only define MsgPackEngine if we can import MsgPack
Remove unused imports Only define MsgPackEngine if we can import MsgPack
Python
bsd-3-clause
MarkusH/django-nap,limbera/django-nap
import json try: import msgpack except ImportError: pass from decimal import Decimal from datetime import date, datetime, time class Engine(object): # The list of content types we match CONTENT_TYPES = [] def dumps(self, data): # pragma: no cover '''How to serialiser an object''' ...
import json class Engine(object): # The list of content types we match CONTENT_TYPES = [] def dumps(self, data): # pragma: no cover '''How to serialiser an object''' raise NotImplementedError def loads(self, data): # pragma: no cover '''How to deserialise a string''' ...
<commit_before> import json try: import msgpack except ImportError: pass from decimal import Decimal from datetime import date, datetime, time class Engine(object): # The list of content types we match CONTENT_TYPES = [] def dumps(self, data): # pragma: no cover '''How to serialiser an obj...
import json class Engine(object): # The list of content types we match CONTENT_TYPES = [] def dumps(self, data): # pragma: no cover '''How to serialiser an object''' raise NotImplementedError def loads(self, data): # pragma: no cover '''How to deserialise a string''' ...
import json try: import msgpack except ImportError: pass from decimal import Decimal from datetime import date, datetime, time class Engine(object): # The list of content types we match CONTENT_TYPES = [] def dumps(self, data): # pragma: no cover '''How to serialiser an object''' ...
<commit_before> import json try: import msgpack except ImportError: pass from decimal import Decimal from datetime import date, datetime, time class Engine(object): # The list of content types we match CONTENT_TYPES = [] def dumps(self, data): # pragma: no cover '''How to serialiser an obj...
ed69ace7f6065ec1b3dd2f2de3a0d5b56ac28366
climatemaps/data.py
climatemaps/data.py
import numpy def import_climate_data(): ncols = 720 nrows = 360 digits = 5 with open('./data/cloud/ccld6190.dat') as filein: lines = filein.readlines() line_n = 0 grid_size = 0.50 xmin = 0.25 xmax = 360.25 ymin = -89.75 ymax = 90.25 lon...
import numpy def import_climate_data(): ncols = 720 nrows = 360 digits = 5 monthnr = 3 with open('./data/cloud/ccld6190.dat', 'r') as filein: lines = filein.readlines() line_n = 0 grid_size = 0.50 xmin = 0.25 xmax = 360.25 ymin = -89.75 yma...
Create argument to select month to import
Create argument to select month to import
Python
mit
bartromgens/climatemaps,bartromgens/climatemaps,bartromgens/climatemaps
import numpy def import_climate_data(): ncols = 720 nrows = 360 digits = 5 with open('./data/cloud/ccld6190.dat') as filein: lines = filein.readlines() line_n = 0 grid_size = 0.50 xmin = 0.25 xmax = 360.25 ymin = -89.75 ymax = 90.25 lon...
import numpy def import_climate_data(): ncols = 720 nrows = 360 digits = 5 monthnr = 3 with open('./data/cloud/ccld6190.dat', 'r') as filein: lines = filein.readlines() line_n = 0 grid_size = 0.50 xmin = 0.25 xmax = 360.25 ymin = -89.75 yma...
<commit_before>import numpy def import_climate_data(): ncols = 720 nrows = 360 digits = 5 with open('./data/cloud/ccld6190.dat') as filein: lines = filein.readlines() line_n = 0 grid_size = 0.50 xmin = 0.25 xmax = 360.25 ymin = -89.75 ymax = 90....
import numpy def import_climate_data(): ncols = 720 nrows = 360 digits = 5 monthnr = 3 with open('./data/cloud/ccld6190.dat', 'r') as filein: lines = filein.readlines() line_n = 0 grid_size = 0.50 xmin = 0.25 xmax = 360.25 ymin = -89.75 yma...
import numpy def import_climate_data(): ncols = 720 nrows = 360 digits = 5 with open('./data/cloud/ccld6190.dat') as filein: lines = filein.readlines() line_n = 0 grid_size = 0.50 xmin = 0.25 xmax = 360.25 ymin = -89.75 ymax = 90.25 lon...
<commit_before>import numpy def import_climate_data(): ncols = 720 nrows = 360 digits = 5 with open('./data/cloud/ccld6190.dat') as filein: lines = filein.readlines() line_n = 0 grid_size = 0.50 xmin = 0.25 xmax = 360.25 ymin = -89.75 ymax = 90....
127e53b4aa125163765b8fa762669e717badd07b
seqfile/__init__.py
seqfile/__init__.py
from __future__ import absolute_import from .seqfile import findNextFile import pgk_ressources as _pkg __version__ = _pkg.get_distribution("seqfile").version __all__ = [ 'findNextFile' ]
from __future__ import absolute_import from .seqfile import findNextFile import pkg_resources as _pkg __version__ = _pkg.get_distribution("seqfile").version __all__ = [ 'findNextFile' ]
Fix typos in name of imports.
Fix typos in name of imports.
Python
mit
musically-ut/seqfile
from __future__ import absolute_import from .seqfile import findNextFile import pgk_ressources as _pkg __version__ = _pkg.get_distribution("seqfile").version __all__ = [ 'findNextFile' ] Fix typos in name of imports.
from __future__ import absolute_import from .seqfile import findNextFile import pkg_resources as _pkg __version__ = _pkg.get_distribution("seqfile").version __all__ = [ 'findNextFile' ]
<commit_before>from __future__ import absolute_import from .seqfile import findNextFile import pgk_ressources as _pkg __version__ = _pkg.get_distribution("seqfile").version __all__ = [ 'findNextFile' ] <commit_msg>Fix typos in name of imports.<commit_after>
from __future__ import absolute_import from .seqfile import findNextFile import pkg_resources as _pkg __version__ = _pkg.get_distribution("seqfile").version __all__ = [ 'findNextFile' ]
from __future__ import absolute_import from .seqfile import findNextFile import pgk_ressources as _pkg __version__ = _pkg.get_distribution("seqfile").version __all__ = [ 'findNextFile' ] Fix typos in name of imports.from __future__ import absolute_import from .seqfile import findNextFile import pkg_resources as _pk...
<commit_before>from __future__ import absolute_import from .seqfile import findNextFile import pgk_ressources as _pkg __version__ = _pkg.get_distribution("seqfile").version __all__ = [ 'findNextFile' ] <commit_msg>Fix typos in name of imports.<commit_after>from __future__ import absolute_import from .seqfile import ...
015d18ddcf26a875e20bffbb2d52646799da9cf4
climatemaps/data.py
climatemaps/data.py
import numpy def import_climate_data(filepath, monthnr): ncols = 720 nrows = 360 digits = 5 with open(filepath, 'r') as filein: lines = filein.readlines() line_n = 0 grid_size = 0.50 xmin = 0.25 xmax = 360.25 ymin = -89.75 ymax = 90.25 ...
import numpy def import_climate_data(filepath, monthnr): ncols = 720 nrows = 360 digits = 5 with open(filepath, 'r') as filein: lines = filein.readlines() line_n = 0 grid_size = 0.50 xmin = 0.25 xmax = 360.25 ymin = -89.75 ymax = 90.25 ...
Allow negative values, only mask -9999
Allow negative values, only mask -9999
Python
mit
bartromgens/climatemaps,bartromgens/climatemaps,bartromgens/climatemaps
import numpy def import_climate_data(filepath, monthnr): ncols = 720 nrows = 360 digits = 5 with open(filepath, 'r') as filein: lines = filein.readlines() line_n = 0 grid_size = 0.50 xmin = 0.25 xmax = 360.25 ymin = -89.75 ymax = 90.25 ...
import numpy def import_climate_data(filepath, monthnr): ncols = 720 nrows = 360 digits = 5 with open(filepath, 'r') as filein: lines = filein.readlines() line_n = 0 grid_size = 0.50 xmin = 0.25 xmax = 360.25 ymin = -89.75 ymax = 90.25 ...
<commit_before>import numpy def import_climate_data(filepath, monthnr): ncols = 720 nrows = 360 digits = 5 with open(filepath, 'r') as filein: lines = filein.readlines() line_n = 0 grid_size = 0.50 xmin = 0.25 xmax = 360.25 ymin = -89.75 ymax = ...
import numpy def import_climate_data(filepath, monthnr): ncols = 720 nrows = 360 digits = 5 with open(filepath, 'r') as filein: lines = filein.readlines() line_n = 0 grid_size = 0.50 xmin = 0.25 xmax = 360.25 ymin = -89.75 ymax = 90.25 ...
import numpy def import_climate_data(filepath, monthnr): ncols = 720 nrows = 360 digits = 5 with open(filepath, 'r') as filein: lines = filein.readlines() line_n = 0 grid_size = 0.50 xmin = 0.25 xmax = 360.25 ymin = -89.75 ymax = 90.25 ...
<commit_before>import numpy def import_climate_data(filepath, monthnr): ncols = 720 nrows = 360 digits = 5 with open(filepath, 'r') as filein: lines = filein.readlines() line_n = 0 grid_size = 0.50 xmin = 0.25 xmax = 360.25 ymin = -89.75 ymax = ...
c15174d9bd7728dd5d397e6de09291853e65ed4d
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 = {"template_key": "iw", "text_lines": ["test", "deployment"]} response = requests.post(f"{url}/images", json=params) expect(response.status...
Update tests for new API routes
Update tests for new API routes
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 = {"template_key": "iw", "text_lines": ["test", "deployment"]} response = requests.post(f"{url}/images", json=params) expect(response.status...
<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 = {"template_key": "iw", "text_lines": ["test", "deployment"]} response = requests.post(f"{url}/images", json=params) expect(response.status...
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...
057d7a95031ba8c51ae10ea1b742534fcb5e82a3
bidb/keys/tasks.py
bidb/keys/tasks.py
import celery import subprocess from bidb.utils.tempfile import TemporaryDirectory from bidb.utils.subprocess import check_output2 from .models import Key @celery.task(soft_time_limit=60) def update_or_create_key(uid): with TemporaryDirectory() as homedir: try: check_output2(( ...
import celery import subprocess from bidb.utils.tempfile import TemporaryDirectory from bidb.utils.subprocess import check_output2 from .models import Key @celery.task(soft_time_limit=60) def update_or_create_key(uid): with TemporaryDirectory() as homedir: try: check_output2(( ...
Use pgpkeys.mit.edu as our keyserver; seems to work.
Use pgpkeys.mit.edu as our keyserver; seems to work.
Python
agpl-3.0
lamby/buildinfo.debian.net,lamby/buildinfo.debian.net
import celery import subprocess from bidb.utils.tempfile import TemporaryDirectory from bidb.utils.subprocess import check_output2 from .models import Key @celery.task(soft_time_limit=60) def update_or_create_key(uid): with TemporaryDirectory() as homedir: try: check_output2(( ...
import celery import subprocess from bidb.utils.tempfile import TemporaryDirectory from bidb.utils.subprocess import check_output2 from .models import Key @celery.task(soft_time_limit=60) def update_or_create_key(uid): with TemporaryDirectory() as homedir: try: check_output2(( ...
<commit_before>import celery import subprocess from bidb.utils.tempfile import TemporaryDirectory from bidb.utils.subprocess import check_output2 from .models import Key @celery.task(soft_time_limit=60) def update_or_create_key(uid): with TemporaryDirectory() as homedir: try: check_output2((...
import celery import subprocess from bidb.utils.tempfile import TemporaryDirectory from bidb.utils.subprocess import check_output2 from .models import Key @celery.task(soft_time_limit=60) def update_or_create_key(uid): with TemporaryDirectory() as homedir: try: check_output2(( ...
import celery import subprocess from bidb.utils.tempfile import TemporaryDirectory from bidb.utils.subprocess import check_output2 from .models import Key @celery.task(soft_time_limit=60) def update_or_create_key(uid): with TemporaryDirectory() as homedir: try: check_output2(( ...
<commit_before>import celery import subprocess from bidb.utils.tempfile import TemporaryDirectory from bidb.utils.subprocess import check_output2 from .models import Key @celery.task(soft_time_limit=60) def update_or_create_key(uid): with TemporaryDirectory() as homedir: try: check_output2((...
63f40971f8bc4858b32b41595d14315d2261169f
proselint/checks/garner/mondegreens.py
proselint/checks/garner/mondegreens.py
# -*- coding: utf-8 -*- """Mondegreens. --- layout: post source: Garner's Modern American Usage source_url: http://amzn.to/15wF76r title: mondegreens date: 2014-06-10 12:31:19 categories: writing --- Points out preferred form. """ from tools import memoize, preferred_forms_check @memoize def che...
# -*- coding: utf-8 -*- """Mondegreens. --- layout: post source: Garner's Modern American Usage source_url: http://amzn.to/15wF76r title: mondegreens date: 2014-06-10 12:31:19 categories: writing --- Points out preferred form. """ from tools import memoize, preferred_forms_check @memoize def che...
Fix bug in mondegreen rule
Fix bug in mondegreen rule (The correct versions should all be in the left column.)
Python
bsd-3-clause
jstewmon/proselint,jstewmon/proselint,amperser/proselint,amperser/proselint,jstewmon/proselint,amperser/proselint,amperser/proselint,amperser/proselint
# -*- coding: utf-8 -*- """Mondegreens. --- layout: post source: Garner's Modern American Usage source_url: http://amzn.to/15wF76r title: mondegreens date: 2014-06-10 12:31:19 categories: writing --- Points out preferred form. """ from tools import memoize, preferred_forms_check @memoize def che...
# -*- coding: utf-8 -*- """Mondegreens. --- layout: post source: Garner's Modern American Usage source_url: http://amzn.to/15wF76r title: mondegreens date: 2014-06-10 12:31:19 categories: writing --- Points out preferred form. """ from tools import memoize, preferred_forms_check @memoize def che...
<commit_before># -*- coding: utf-8 -*- """Mondegreens. --- layout: post source: Garner's Modern American Usage source_url: http://amzn.to/15wF76r title: mondegreens date: 2014-06-10 12:31:19 categories: writing --- Points out preferred form. """ from tools import memoize, preferred_forms_check @...
# -*- coding: utf-8 -*- """Mondegreens. --- layout: post source: Garner's Modern American Usage source_url: http://amzn.to/15wF76r title: mondegreens date: 2014-06-10 12:31:19 categories: writing --- Points out preferred form. """ from tools import memoize, preferred_forms_check @memoize def che...
# -*- coding: utf-8 -*- """Mondegreens. --- layout: post source: Garner's Modern American Usage source_url: http://amzn.to/15wF76r title: mondegreens date: 2014-06-10 12:31:19 categories: writing --- Points out preferred form. """ from tools import memoize, preferred_forms_check @memoize def che...
<commit_before># -*- coding: utf-8 -*- """Mondegreens. --- layout: post source: Garner's Modern American Usage source_url: http://amzn.to/15wF76r title: mondegreens date: 2014-06-10 12:31:19 categories: writing --- Points out preferred form. """ from tools import memoize, preferred_forms_check @...
abaa882aaa1b7e251d989d60391bd2e06801c2a2
py/desiUtil/install/most_recent_tag.py
py/desiUtil/install/most_recent_tag.py
# License information goes here # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals # The line above will help with 2to3 support. def most_recent_tag(tags,username=None): """Scan an SVN tags directory and return the most recent tag. Parameters --------...
# License information goes here # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals # The line above will help with 2to3 support. def most_recent_tag(tags,username=None): """Scan an SVN tags directory and return the most recent tag. Parameters --------...
Add more careful version checks
Add more careful version checks
Python
bsd-3-clause
desihub/desiutil,desihub/desiutil
# License information goes here # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals # The line above will help with 2to3 support. def most_recent_tag(tags,username=None): """Scan an SVN tags directory and return the most recent tag. Parameters --------...
# License information goes here # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals # The line above will help with 2to3 support. def most_recent_tag(tags,username=None): """Scan an SVN tags directory and return the most recent tag. Parameters --------...
<commit_before># License information goes here # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals # The line above will help with 2to3 support. def most_recent_tag(tags,username=None): """Scan an SVN tags directory and return the most recent tag. Paramete...
# License information goes here # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals # The line above will help with 2to3 support. def most_recent_tag(tags,username=None): """Scan an SVN tags directory and return the most recent tag. Parameters --------...
# License information goes here # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals # The line above will help with 2to3 support. def most_recent_tag(tags,username=None): """Scan an SVN tags directory and return the most recent tag. Parameters --------...
<commit_before># License information goes here # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals # The line above will help with 2to3 support. def most_recent_tag(tags,username=None): """Scan an SVN tags directory and return the most recent tag. Paramete...
f60fe11653d71f278aa04e71a522a89fc86c284a
bse/api.py
bse/api.py
''' Main interface to BSE functionality ''' from . import io def get_basis_set(name): '''Reads a json basis set file given only the name The path to the basis set file is taken to be the 'data' directory in this project ''' return io.read_table_basis_by_name(name) def get_metadata(keys=None, ...
''' Main interface to BSE functionality ''' from . import io def get_basis_set(name): '''Reads a json basis set file given only the name The path to the basis set file is taken to be the 'data' directory in this project ''' return io.read_table_basis_by_name(name) def get_metadata(keys=None, ...
Switch which name is used as a metadata key
Switch which name is used as a metadata key
Python
bsd-3-clause
MOLSSI-BSE/basis_set_exchange
''' Main interface to BSE functionality ''' from . import io def get_basis_set(name): '''Reads a json basis set file given only the name The path to the basis set file is taken to be the 'data' directory in this project ''' return io.read_table_basis_by_name(name) def get_metadata(keys=None, ...
''' Main interface to BSE functionality ''' from . import io def get_basis_set(name): '''Reads a json basis set file given only the name The path to the basis set file is taken to be the 'data' directory in this project ''' return io.read_table_basis_by_name(name) def get_metadata(keys=None, ...
<commit_before>''' Main interface to BSE functionality ''' from . import io def get_basis_set(name): '''Reads a json basis set file given only the name The path to the basis set file is taken to be the 'data' directory in this project ''' return io.read_table_basis_by_name(name) def get_metad...
''' Main interface to BSE functionality ''' from . import io def get_basis_set(name): '''Reads a json basis set file given only the name The path to the basis set file is taken to be the 'data' directory in this project ''' return io.read_table_basis_by_name(name) def get_metadata(keys=None, ...
''' Main interface to BSE functionality ''' from . import io def get_basis_set(name): '''Reads a json basis set file given only the name The path to the basis set file is taken to be the 'data' directory in this project ''' return io.read_table_basis_by_name(name) def get_metadata(keys=None, ...
<commit_before>''' Main interface to BSE functionality ''' from . import io def get_basis_set(name): '''Reads a json basis set file given only the name The path to the basis set file is taken to be the 'data' directory in this project ''' return io.read_table_basis_by_name(name) def get_metad...
8d46e411b2e7091fc54c676665905da8ec6906f3
controllers/dotd.py
controllers/dotd.py
def form(): db.raw_log.uuid.default = uuid_generator() db.raw_log.date.default = dbdate() #don't display form items that are part of table, but not facing end user db.raw_log.uuid.readable = db.raw_log.uuid.writable = False db.raw_log.date.readable = db.raw_log.date.writable = False form = SQLFORM(db.raw_log, sho...
def form(): db.raw_log.uuid.default = uuid_generator() db.raw_log.date.default = dbdate() #don't display form items that are part of table, but not facing end user db.raw_log.uuid.readable = db.raw_log.uuid.writable = False db.raw_log.date.readable = db.raw_log.date.writable = False if form.accepted: redirect(U...
Remove selection of all raw_log rows, since it was used for debugging purposes only
Remove selection of all raw_log rows, since it was used for debugging purposes only
Python
mit
tsunam/dotd_parser,tsunam/dotd_parser,tsunam/dotd_parser,tsunam/dotd_parser
def form(): db.raw_log.uuid.default = uuid_generator() db.raw_log.date.default = dbdate() #don't display form items that are part of table, but not facing end user db.raw_log.uuid.readable = db.raw_log.uuid.writable = False db.raw_log.date.readable = db.raw_log.date.writable = False form = SQLFORM(db.raw_log, sho...
def form(): db.raw_log.uuid.default = uuid_generator() db.raw_log.date.default = dbdate() #don't display form items that are part of table, but not facing end user db.raw_log.uuid.readable = db.raw_log.uuid.writable = False db.raw_log.date.readable = db.raw_log.date.writable = False if form.accepted: redirect(U...
<commit_before>def form(): db.raw_log.uuid.default = uuid_generator() db.raw_log.date.default = dbdate() #don't display form items that are part of table, but not facing end user db.raw_log.uuid.readable = db.raw_log.uuid.writable = False db.raw_log.date.readable = db.raw_log.date.writable = False form = SQLFORM(...
def form(): db.raw_log.uuid.default = uuid_generator() db.raw_log.date.default = dbdate() #don't display form items that are part of table, but not facing end user db.raw_log.uuid.readable = db.raw_log.uuid.writable = False db.raw_log.date.readable = db.raw_log.date.writable = False if form.accepted: redirect(U...
def form(): db.raw_log.uuid.default = uuid_generator() db.raw_log.date.default = dbdate() #don't display form items that are part of table, but not facing end user db.raw_log.uuid.readable = db.raw_log.uuid.writable = False db.raw_log.date.readable = db.raw_log.date.writable = False form = SQLFORM(db.raw_log, sho...
<commit_before>def form(): db.raw_log.uuid.default = uuid_generator() db.raw_log.date.default = dbdate() #don't display form items that are part of table, but not facing end user db.raw_log.uuid.readable = db.raw_log.uuid.writable = False db.raw_log.date.readable = db.raw_log.date.writable = False form = SQLFORM(...
627217b13482fff5451d3aa03867923925c49ec8
sale_order_add_variants/__openerp__.py
sale_order_add_variants/__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # Author: Hugo Santos # Copyright 2015 FactorLibre # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Hugo Santos # Copyright 2015 FactorLibre # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published...
Fix typo in author FactorLibre
Fix typo in author FactorLibre
Python
agpl-3.0
kittiu/sale-workflow,Endika/sale-workflow,alexsandrohaag/sale-workflow,xpansa/sale-workflow,diagramsoftware/sale-workflow,BT-ojossen/sale-workflow,brain-tec/sale-workflow,brain-tec/sale-workflow,luistorresm/sale-workflow,numerigraphe/sale-workflow,anybox/sale-workflow,open-synergy/sale-workflow,BT-fgarbely/sale-workflo...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Hugo Santos # Copyright 2015 FactorLibre # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Hugo Santos # Copyright 2015 FactorLibre # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Author: Hugo Santos # Copyright 2015 FactorLibre # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Hugo Santos # Copyright 2015 FactorLibre # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Hugo Santos # Copyright 2015 FactorLibre # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Author: Hugo Santos # Copyright 2015 FactorLibre # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as...
47b52333a74aeeb0ec2d7184455f70aa07633e62
createGlyphsPDF.py
createGlyphsPDF.py
# Some configuration page_format = 'A4' newPage(page_format) class RegisterGlyph(object): def __init__(self, glyph): self.glyph = glyph print 'Registered', self.glyph.name self.proportion_ratio = self.getProportionRatio() def getProportionRatio(self): print self.glyph...
# Some configuration page_format = 'A4' # See http://drawbot.readthedocs.org/content/canvas/pages.html#size for other size-values my_selection = CurrentFont() # May also be CurrentFont.selection or else class RegisterGlyph(object): def __init__(self, glyph): self.glyph = glyph print 'Register...
Create Page for every glyph
Create Page for every glyph
Python
mit
AlphabetType/DrawBot-Scripts
# Some configuration page_format = 'A4' newPage(page_format) class RegisterGlyph(object): def __init__(self, glyph): self.glyph = glyph print 'Registered', self.glyph.name self.proportion_ratio = self.getProportionRatio() def getProportionRatio(self): print self.glyph...
# Some configuration page_format = 'A4' # See http://drawbot.readthedocs.org/content/canvas/pages.html#size for other size-values my_selection = CurrentFont() # May also be CurrentFont.selection or else class RegisterGlyph(object): def __init__(self, glyph): self.glyph = glyph print 'Register...
<commit_before># Some configuration page_format = 'A4' newPage(page_format) class RegisterGlyph(object): def __init__(self, glyph): self.glyph = glyph print 'Registered', self.glyph.name self.proportion_ratio = self.getProportionRatio() def getProportionRatio(self): p...
# Some configuration page_format = 'A4' # See http://drawbot.readthedocs.org/content/canvas/pages.html#size for other size-values my_selection = CurrentFont() # May also be CurrentFont.selection or else class RegisterGlyph(object): def __init__(self, glyph): self.glyph = glyph print 'Register...
# Some configuration page_format = 'A4' newPage(page_format) class RegisterGlyph(object): def __init__(self, glyph): self.glyph = glyph print 'Registered', self.glyph.name self.proportion_ratio = self.getProportionRatio() def getProportionRatio(self): print self.glyph...
<commit_before># Some configuration page_format = 'A4' newPage(page_format) class RegisterGlyph(object): def __init__(self, glyph): self.glyph = glyph print 'Registered', self.glyph.name self.proportion_ratio = self.getProportionRatio() def getProportionRatio(self): p...
10aaa22cbcbb844a4393ac9eae526c3e50c121ab
src/ggrc/migrations/versions/20131209164454_49c670c7d705_add_private_column_t.py
src/ggrc/migrations/versions/20131209164454_49c670c7d705_add_private_column_t.py
"""Add private column to programs table. Revision ID: 49c670c7d705 Revises: a3afeab3302 Create Date: 2013-12-09 16:44:54.222398 """ # revision identifiers, used by Alembic. revision = '49c670c7d705' down_revision = 'a3afeab3302' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column( ...
"""Add private column to programs table. Revision ID: 49c670c7d705 Revises: a3afeab3302 Create Date: 2013-12-09 16:44:54.222398 """ # revision identifiers, used by Alembic. revision = '49c670c7d705' down_revision = 'a3afeab3302' from alembic import op from sqlalchemy.sql import table, column import sqlalchemy as s...
Make sure to properly set private for existing private programs.
Make sure to properly set private for existing private programs.
Python
apache-2.0
hyperNURb/ggrc-core,j0gurt/ggrc-core,plamut/ggrc-core,edofic/ggrc-core,andrei-karalionak/ggrc-core,NejcZupec/ggrc-core,jmakov/ggrc-core,josthkko/ggrc-core,NejcZupec/ggrc-core,AleksNeStu/ggrc-core,hasanalom/ggrc-core,vladan-m/ggrc-core,prasannav7/ggrc-core,andrei-karalionak/ggrc-core,jmakov/ggrc-core,andrei-karalionak/g...
"""Add private column to programs table. Revision ID: 49c670c7d705 Revises: a3afeab3302 Create Date: 2013-12-09 16:44:54.222398 """ # revision identifiers, used by Alembic. revision = '49c670c7d705' down_revision = 'a3afeab3302' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column( ...
"""Add private column to programs table. Revision ID: 49c670c7d705 Revises: a3afeab3302 Create Date: 2013-12-09 16:44:54.222398 """ # revision identifiers, used by Alembic. revision = '49c670c7d705' down_revision = 'a3afeab3302' from alembic import op from sqlalchemy.sql import table, column import sqlalchemy as s...
<commit_before> """Add private column to programs table. Revision ID: 49c670c7d705 Revises: a3afeab3302 Create Date: 2013-12-09 16:44:54.222398 """ # revision identifiers, used by Alembic. revision = '49c670c7d705' down_revision = 'a3afeab3302' from alembic import op import sqlalchemy as sa def upgrade(): op.ad...
"""Add private column to programs table. Revision ID: 49c670c7d705 Revises: a3afeab3302 Create Date: 2013-12-09 16:44:54.222398 """ # revision identifiers, used by Alembic. revision = '49c670c7d705' down_revision = 'a3afeab3302' from alembic import op from sqlalchemy.sql import table, column import sqlalchemy as s...
"""Add private column to programs table. Revision ID: 49c670c7d705 Revises: a3afeab3302 Create Date: 2013-12-09 16:44:54.222398 """ # revision identifiers, used by Alembic. revision = '49c670c7d705' down_revision = 'a3afeab3302' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column( ...
<commit_before> """Add private column to programs table. Revision ID: 49c670c7d705 Revises: a3afeab3302 Create Date: 2013-12-09 16:44:54.222398 """ # revision identifiers, used by Alembic. revision = '49c670c7d705' down_revision = 'a3afeab3302' from alembic import op import sqlalchemy as sa def upgrade(): op.ad...
63af9aa63dac1b3601ab5bfee5fd29b5e3602389
bonfiremanager/models.py
bonfiremanager/models.py
from django.db import models class Event(models.Model): name = models.CharField(max_length=1024, unique=True) slug = models.SlugField(max_length=1024) def __str__(self): return self.name class TimeSlot(models.Model): event = models.ForeignKey(Event) bookable = models.BooleanField(...
from django.db import models class Event(models.Model): name = models.CharField(max_length=1024, unique=True) slug = models.SlugField(max_length=1024) def __str__(self): return self.name class TimeSlot(models.Model): event = models.ForeignKey(Event) bookable = models.BooleanField(...
Make timeslot a FK on talk model
Make timeslot a FK on talk model
Python
agpl-3.0
yamatt/bonfiremanager
from django.db import models class Event(models.Model): name = models.CharField(max_length=1024, unique=True) slug = models.SlugField(max_length=1024) def __str__(self): return self.name class TimeSlot(models.Model): event = models.ForeignKey(Event) bookable = models.BooleanField(...
from django.db import models class Event(models.Model): name = models.CharField(max_length=1024, unique=True) slug = models.SlugField(max_length=1024) def __str__(self): return self.name class TimeSlot(models.Model): event = models.ForeignKey(Event) bookable = models.BooleanField(...
<commit_before>from django.db import models class Event(models.Model): name = models.CharField(max_length=1024, unique=True) slug = models.SlugField(max_length=1024) def __str__(self): return self.name class TimeSlot(models.Model): event = models.ForeignKey(Event) bookable = model...
from django.db import models class Event(models.Model): name = models.CharField(max_length=1024, unique=True) slug = models.SlugField(max_length=1024) def __str__(self): return self.name class TimeSlot(models.Model): event = models.ForeignKey(Event) bookable = models.BooleanField(...
from django.db import models class Event(models.Model): name = models.CharField(max_length=1024, unique=True) slug = models.SlugField(max_length=1024) def __str__(self): return self.name class TimeSlot(models.Model): event = models.ForeignKey(Event) bookable = models.BooleanField(...
<commit_before>from django.db import models class Event(models.Model): name = models.CharField(max_length=1024, unique=True) slug = models.SlugField(max_length=1024) def __str__(self): return self.name class TimeSlot(models.Model): event = models.ForeignKey(Event) bookable = model...
67ade89e301d11ca4c7ebfe6746cc262631b6cce
src/neighborhood_flow.py
src/neighborhood_flow.py
#!/usr/bin/env python import sys import os import collections import data import figs class Counter(collections.Counter): year_range = range(2004, 2016) def restrict_to_year_range(self, multiplier=1): output = [] for year in self.year_range: output.append(multiplier * self[year]) ...
#!/usr/bin/env python import sys import os import collections import data import figs class Counter(collections.Counter): year_range = range(2004, 2015) def restrict_to_year_range(self, multiplier=1): output = [] for year in self.year_range: output.append(multiplier * self[year]) ...
Revert year range end back to 2015 (2016 is not over)
Revert year range end back to 2015 (2016 is not over)
Python
unlicense
datascopeanalytics/chicago-new-business,datascopeanalytics/chicago-new-business
#!/usr/bin/env python import sys import os import collections import data import figs class Counter(collections.Counter): year_range = range(2004, 2016) def restrict_to_year_range(self, multiplier=1): output = [] for year in self.year_range: output.append(multiplier * self[year]) ...
#!/usr/bin/env python import sys import os import collections import data import figs class Counter(collections.Counter): year_range = range(2004, 2015) def restrict_to_year_range(self, multiplier=1): output = [] for year in self.year_range: output.append(multiplier * self[year]) ...
<commit_before>#!/usr/bin/env python import sys import os import collections import data import figs class Counter(collections.Counter): year_range = range(2004, 2016) def restrict_to_year_range(self, multiplier=1): output = [] for year in self.year_range: output.append(multiplier...
#!/usr/bin/env python import sys import os import collections import data import figs class Counter(collections.Counter): year_range = range(2004, 2015) def restrict_to_year_range(self, multiplier=1): output = [] for year in self.year_range: output.append(multiplier * self[year]) ...
#!/usr/bin/env python import sys import os import collections import data import figs class Counter(collections.Counter): year_range = range(2004, 2016) def restrict_to_year_range(self, multiplier=1): output = [] for year in self.year_range: output.append(multiplier * self[year]) ...
<commit_before>#!/usr/bin/env python import sys import os import collections import data import figs class Counter(collections.Counter): year_range = range(2004, 2016) def restrict_to_year_range(self, multiplier=1): output = [] for year in self.year_range: output.append(multiplier...
2fb0678363479c790e5a63de8b92a19de3ac2359
src/Camera.py
src/Camera.py
from traits.api import HasTraits, Int, Str, Tuple, Array, Range class CameraError(Exception): def __init__(self, msg, cam): self.msg = msg self.camera_number = cam def __str__(self): return '{0} on camera {1}'.format(self.msg, self.camera_number) class Camera(HasTraits):...
from traits.api import HasTraits, Int, Str, Tuple, Array, Range from traitsui.api import View, Label class CameraError(Exception): def __init__(self, msg, cam): self.msg = msg self.camera_number = cam def __str__(self): return '{0} on camera {1}'.format(self.msg, self.camera_n...
Add default view for camera
Add default view for camera
Python
mit
ptomato/Beams
from traits.api import HasTraits, Int, Str, Tuple, Array, Range class CameraError(Exception): def __init__(self, msg, cam): self.msg = msg self.camera_number = cam def __str__(self): return '{0} on camera {1}'.format(self.msg, self.camera_number) class Camera(HasTraits):...
from traits.api import HasTraits, Int, Str, Tuple, Array, Range from traitsui.api import View, Label class CameraError(Exception): def __init__(self, msg, cam): self.msg = msg self.camera_number = cam def __str__(self): return '{0} on camera {1}'.format(self.msg, self.camera_n...
<commit_before>from traits.api import HasTraits, Int, Str, Tuple, Array, Range class CameraError(Exception): def __init__(self, msg, cam): self.msg = msg self.camera_number = cam def __str__(self): return '{0} on camera {1}'.format(self.msg, self.camera_number) class Cam...
from traits.api import HasTraits, Int, Str, Tuple, Array, Range from traitsui.api import View, Label class CameraError(Exception): def __init__(self, msg, cam): self.msg = msg self.camera_number = cam def __str__(self): return '{0} on camera {1}'.format(self.msg, self.camera_n...
from traits.api import HasTraits, Int, Str, Tuple, Array, Range class CameraError(Exception): def __init__(self, msg, cam): self.msg = msg self.camera_number = cam def __str__(self): return '{0} on camera {1}'.format(self.msg, self.camera_number) class Camera(HasTraits):...
<commit_before>from traits.api import HasTraits, Int, Str, Tuple, Array, Range class CameraError(Exception): def __init__(self, msg, cam): self.msg = msg self.camera_number = cam def __str__(self): return '{0} on camera {1}'.format(self.msg, self.camera_number) class Cam...
0a05f423ad591454a25c515d811556d10e5fc99f
Browser.py
Browser.py
from Zeroconf import * import socket class MyListener(object): def __init__(self): self.r = Zeroconf() pass def removeService(self, zeroconf, type, name): print "Service", name, "removed" def addService(self, zeroconf, type, name): print "Service", name, "added" print "Type is", type inf...
from Zeroconf import * import socket class MyListener(object): def __init__(self): self.r = Zeroconf() pass def removeService(self, zeroconf, type, name): print "Service", name, "removed" def addService(self, zeroconf, type, name): print "Service", name, "added" print "Type is", type inf...
Allow for the failure of getServiceInfo(). Not sure why it's happening, though.
Allow for the failure of getServiceInfo(). Not sure why it's happening, though.
Python
lgpl-2.1
jantman/python-zeroconf,decabyte/python-zeroconf,nameoftherose/python-zeroconf,balloob/python-zeroconf,AndreaCensi/python-zeroconf,giupo/python-zeroconf,jstasiak/python-zeroconf,wmcbrine/pyzeroconf,basilfx/python-zeroconf,daid/python-zeroconf,gbiddison/python-zeroconf
from Zeroconf import * import socket class MyListener(object): def __init__(self): self.r = Zeroconf() pass def removeService(self, zeroconf, type, name): print "Service", name, "removed" def addService(self, zeroconf, type, name): print "Service", name, "added" print "Type is", type inf...
from Zeroconf import * import socket class MyListener(object): def __init__(self): self.r = Zeroconf() pass def removeService(self, zeroconf, type, name): print "Service", name, "removed" def addService(self, zeroconf, type, name): print "Service", name, "added" print "Type is", type inf...
<commit_before>from Zeroconf import * import socket class MyListener(object): def __init__(self): self.r = Zeroconf() pass def removeService(self, zeroconf, type, name): print "Service", name, "removed" def addService(self, zeroconf, type, name): print "Service", name, "added" print "Type i...
from Zeroconf import * import socket class MyListener(object): def __init__(self): self.r = Zeroconf() pass def removeService(self, zeroconf, type, name): print "Service", name, "removed" def addService(self, zeroconf, type, name): print "Service", name, "added" print "Type is", type inf...
from Zeroconf import * import socket class MyListener(object): def __init__(self): self.r = Zeroconf() pass def removeService(self, zeroconf, type, name): print "Service", name, "removed" def addService(self, zeroconf, type, name): print "Service", name, "added" print "Type is", type inf...
<commit_before>from Zeroconf import * import socket class MyListener(object): def __init__(self): self.r = Zeroconf() pass def removeService(self, zeroconf, type, name): print "Service", name, "removed" def addService(self, zeroconf, type, name): print "Service", name, "added" print "Type i...
e155d7b96c5b834f4c062b93cbd564a5317905f1
tools/po2js.py
tools/po2js.py
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os.path import codecs import dfstrings import time def make_js_from_po(path): strings = [] for po in [p for p in dfstrings.get_po_strings(path) if "scope" in p and "dragonfly" in p["scope"] ]: strings.append(u"""ui_strings.%s="%s";""...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os.path import codecs import dfstrings import time def make_js_from_po(path): strings = [] for po in [p for p in dfstrings.get_po_strings(path) if "scope" in p and "dragonfly" in p["scope"] ]: strings.append(u"""ui_strings.%s="%s";""...
Add the language code to the translated file
Add the language code to the translated file
Python
apache-2.0
operasoftware/dragonfly,operasoftware/dragonfly,operasoftware/dragonfly,operasoftware/dragonfly
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os.path import codecs import dfstrings import time def make_js_from_po(path): strings = [] for po in [p for p in dfstrings.get_po_strings(path) if "scope" in p and "dragonfly" in p["scope"] ]: strings.append(u"""ui_strings.%s="%s";""...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os.path import codecs import dfstrings import time def make_js_from_po(path): strings = [] for po in [p for p in dfstrings.get_po_strings(path) if "scope" in p and "dragonfly" in p["scope"] ]: strings.append(u"""ui_strings.%s="%s";""...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os.path import codecs import dfstrings import time def make_js_from_po(path): strings = [] for po in [p for p in dfstrings.get_po_strings(path) if "scope" in p and "dragonfly" in p["scope"] ]: strings.append(u"""ui_str...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os.path import codecs import dfstrings import time def make_js_from_po(path): strings = [] for po in [p for p in dfstrings.get_po_strings(path) if "scope" in p and "dragonfly" in p["scope"] ]: strings.append(u"""ui_strings.%s="%s";""...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os.path import codecs import dfstrings import time def make_js_from_po(path): strings = [] for po in [p for p in dfstrings.get_po_strings(path) if "scope" in p and "dragonfly" in p["scope"] ]: strings.append(u"""ui_strings.%s="%s";""...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os.path import codecs import dfstrings import time def make_js_from_po(path): strings = [] for po in [p for p in dfstrings.get_po_strings(path) if "scope" in p and "dragonfly" in p["scope"] ]: strings.append(u"""ui_str...
23ee65e3eaa52e8e4ffcc294d2160bdd5451d490
scalyr_agent/tests/run_monitor_test.py
scalyr_agent/tests/run_monitor_test.py
# Copyright 2014 Scalyr Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
# Copyright 2014 Scalyr Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
Fix test so it does not emit output.
Fix test so it does not emit output.
Python
apache-2.0
imron/scalyr-agent-2,scalyr/scalyr-agent-2,scalyr/scalyr-agent-2,scalyr/scalyr-agent-2,scalyr/scalyr-agent-2
# Copyright 2014 Scalyr Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
# Copyright 2014 Scalyr Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
<commit_before># Copyright 2014 Scalyr Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
# Copyright 2014 Scalyr Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
# Copyright 2014 Scalyr Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
<commit_before># Copyright 2014 Scalyr Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
afc658c6ae125042182976dd95af68881865a2da
handoverservice/handover_api/views.py
handoverservice/handover_api/views.py
from handover_api.models import User, Handover, Draft from rest_framework import viewsets from serializers import UserSerializer, HandoverSerializer, DraftSerializer class UserViewSet(viewsets.ModelViewSet): """ API endpoint that allows users to be viewed or edited. """ queryset = User.objects.all() ...
from rest_framework import viewsets from handover_api.models import User, Handover, Draft from handover_api.serializers import UserSerializer, HandoverSerializer, DraftSerializer class UserViewSet(viewsets.ModelViewSet): """ API endpoint that allows users to be viewed or edited. """ queryset = User.ob...
Update import of serializers for python3 compatibility
Update import of serializers for python3 compatibility
Python
mit
Duke-GCB/DukeDSHandoverService,Duke-GCB/DukeDSHandoverService,Duke-GCB/DukeDSHandoverService
from handover_api.models import User, Handover, Draft from rest_framework import viewsets from serializers import UserSerializer, HandoverSerializer, DraftSerializer class UserViewSet(viewsets.ModelViewSet): """ API endpoint that allows users to be viewed or edited. """ queryset = User.objects.all() ...
from rest_framework import viewsets from handover_api.models import User, Handover, Draft from handover_api.serializers import UserSerializer, HandoverSerializer, DraftSerializer class UserViewSet(viewsets.ModelViewSet): """ API endpoint that allows users to be viewed or edited. """ queryset = User.ob...
<commit_before>from handover_api.models import User, Handover, Draft from rest_framework import viewsets from serializers import UserSerializer, HandoverSerializer, DraftSerializer class UserViewSet(viewsets.ModelViewSet): """ API endpoint that allows users to be viewed or edited. """ queryset = User....
from rest_framework import viewsets from handover_api.models import User, Handover, Draft from handover_api.serializers import UserSerializer, HandoverSerializer, DraftSerializer class UserViewSet(viewsets.ModelViewSet): """ API endpoint that allows users to be viewed or edited. """ queryset = User.ob...
from handover_api.models import User, Handover, Draft from rest_framework import viewsets from serializers import UserSerializer, HandoverSerializer, DraftSerializer class UserViewSet(viewsets.ModelViewSet): """ API endpoint that allows users to be viewed or edited. """ queryset = User.objects.all() ...
<commit_before>from handover_api.models import User, Handover, Draft from rest_framework import viewsets from serializers import UserSerializer, HandoverSerializer, DraftSerializer class UserViewSet(viewsets.ModelViewSet): """ API endpoint that allows users to be viewed or edited. """ queryset = User....
a50edf34659acb63f1fa6dda5494812fa1c4ff7d
models/ras_pathway/run_ras_pathway.py
models/ras_pathway/run_ras_pathway.py
import sys import pickle from indra import reach from indra.assemblers import GraphAssembler if len(sys.argv) < 2: process_type = 'text' else: process_type = sys.argv[1] if process_type == 'text': txt = open('ras_pathway.txt', 'rt').read() rp = reach.process_text(txt, offline=True) st = rp.stateme...
import sys import pickle from indra import trips from indra import reach from indra.assemblers import GraphAssembler def process_reach(txt, reread): if reread: rp = reach.process_text(txt, offline=True) st = rp.statements else: rp = reach.process_json_file('reach_output.json') ...
Add TRIPS reading option to RAS pathway map
Add TRIPS reading option to RAS pathway map
Python
bsd-2-clause
sorgerlab/belpy,pvtodorov/indra,johnbachman/belpy,johnbachman/indra,sorgerlab/indra,sorgerlab/belpy,johnbachman/indra,pvtodorov/indra,pvtodorov/indra,sorgerlab/indra,johnbachman/belpy,sorgerlab/indra,pvtodorov/indra,bgyori/indra,bgyori/indra,johnbachman/belpy,johnbachman/indra,sorgerlab/belpy,bgyori/indra
import sys import pickle from indra import reach from indra.assemblers import GraphAssembler if len(sys.argv) < 2: process_type = 'text' else: process_type = sys.argv[1] if process_type == 'text': txt = open('ras_pathway.txt', 'rt').read() rp = reach.process_text(txt, offline=True) st = rp.stateme...
import sys import pickle from indra import trips from indra import reach from indra.assemblers import GraphAssembler def process_reach(txt, reread): if reread: rp = reach.process_text(txt, offline=True) st = rp.statements else: rp = reach.process_json_file('reach_output.json') ...
<commit_before>import sys import pickle from indra import reach from indra.assemblers import GraphAssembler if len(sys.argv) < 2: process_type = 'text' else: process_type = sys.argv[1] if process_type == 'text': txt = open('ras_pathway.txt', 'rt').read() rp = reach.process_text(txt, offline=True) ...
import sys import pickle from indra import trips from indra import reach from indra.assemblers import GraphAssembler def process_reach(txt, reread): if reread: rp = reach.process_text(txt, offline=True) st = rp.statements else: rp = reach.process_json_file('reach_output.json') ...
import sys import pickle from indra import reach from indra.assemblers import GraphAssembler if len(sys.argv) < 2: process_type = 'text' else: process_type = sys.argv[1] if process_type == 'text': txt = open('ras_pathway.txt', 'rt').read() rp = reach.process_text(txt, offline=True) st = rp.stateme...
<commit_before>import sys import pickle from indra import reach from indra.assemblers import GraphAssembler if len(sys.argv) < 2: process_type = 'text' else: process_type = sys.argv[1] if process_type == 'text': txt = open('ras_pathway.txt', 'rt').read() rp = reach.process_text(txt, offline=True) ...
c7825a2ec9be702b05c58118249fe13e7e231ecb
cheroot/test/conftest.py
cheroot/test/conftest.py
import threading import time import pytest import cheroot.server import cheroot.wsgi config = { 'bind_addr': ('127.0.0.1', 54583), 'wsgi_app': None, } def cheroot_server(server_factory): conf = config.copy() httpserver = server_factory(**conf) # create it threading.Thread(target=httpserver.s...
import threading import time import pytest import cheroot.server import cheroot.wsgi config = { 'bind_addr': ('127.0.0.1', 54583), 'wsgi_app': None, } def cheroot_server(server_factory): conf = config.copy() httpserver = server_factory(**conf) # create it threading.Thread(target=httpserver.s...
Drop `yield from` to keep compat w/ 2.7
Drop `yield from` to keep compat w/ 2.7
Python
bsd-3-clause
cherrypy/cheroot
import threading import time import pytest import cheroot.server import cheroot.wsgi config = { 'bind_addr': ('127.0.0.1', 54583), 'wsgi_app': None, } def cheroot_server(server_factory): conf = config.copy() httpserver = server_factory(**conf) # create it threading.Thread(target=httpserver.s...
import threading import time import pytest import cheroot.server import cheroot.wsgi config = { 'bind_addr': ('127.0.0.1', 54583), 'wsgi_app': None, } def cheroot_server(server_factory): conf = config.copy() httpserver = server_factory(**conf) # create it threading.Thread(target=httpserver.s...
<commit_before>import threading import time import pytest import cheroot.server import cheroot.wsgi config = { 'bind_addr': ('127.0.0.1', 54583), 'wsgi_app': None, } def cheroot_server(server_factory): conf = config.copy() httpserver = server_factory(**conf) # create it threading.Thread(targ...
import threading import time import pytest import cheroot.server import cheroot.wsgi config = { 'bind_addr': ('127.0.0.1', 54583), 'wsgi_app': None, } def cheroot_server(server_factory): conf = config.copy() httpserver = server_factory(**conf) # create it threading.Thread(target=httpserver.s...
import threading import time import pytest import cheroot.server import cheroot.wsgi config = { 'bind_addr': ('127.0.0.1', 54583), 'wsgi_app': None, } def cheroot_server(server_factory): conf = config.copy() httpserver = server_factory(**conf) # create it threading.Thread(target=httpserver.s...
<commit_before>import threading import time import pytest import cheroot.server import cheroot.wsgi config = { 'bind_addr': ('127.0.0.1', 54583), 'wsgi_app': None, } def cheroot_server(server_factory): conf = config.copy() httpserver = server_factory(**conf) # create it threading.Thread(targ...
2e3045ed1009a60fe6e236387cae68ddf63bb9b5
distarray/core/tests/test_distributed_array_protocol.py
distarray/core/tests/test_distributed_array_protocol.py
import unittest import distarray as da from distarray.mpi.mpibase import create_comm_of_size, InvalidCommSizeError class TestDistributedArrayProtocol(unittest.TestCase): def setUp(self): try: comm = create_comm_of_size(4) except InvalidCommSizeError: raise unittest.SkipTes...
import unittest import distarray as da from distarray.mpi.mpibase import create_comm_of_size, InvalidCommSizeError class TestDistributedArrayProtocol(unittest.TestCase): def setUp(self): try: comm = create_comm_of_size(4) except InvalidCommSizeError: raise unittest.SkipTes...
Test if `__distarray__()['buffer']` returns a buffer.
Test if `__distarray__()['buffer']` returns a buffer.
Python
bsd-3-clause
enthought/distarray,enthought/distarray,RaoUmer/distarray,RaoUmer/distarray
import unittest import distarray as da from distarray.mpi.mpibase import create_comm_of_size, InvalidCommSizeError class TestDistributedArrayProtocol(unittest.TestCase): def setUp(self): try: comm = create_comm_of_size(4) except InvalidCommSizeError: raise unittest.SkipTes...
import unittest import distarray as da from distarray.mpi.mpibase import create_comm_of_size, InvalidCommSizeError class TestDistributedArrayProtocol(unittest.TestCase): def setUp(self): try: comm = create_comm_of_size(4) except InvalidCommSizeError: raise unittest.SkipTes...
<commit_before>import unittest import distarray as da from distarray.mpi.mpibase import create_comm_of_size, InvalidCommSizeError class TestDistributedArrayProtocol(unittest.TestCase): def setUp(self): try: comm = create_comm_of_size(4) except InvalidCommSizeError: raise u...
import unittest import distarray as da from distarray.mpi.mpibase import create_comm_of_size, InvalidCommSizeError class TestDistributedArrayProtocol(unittest.TestCase): def setUp(self): try: comm = create_comm_of_size(4) except InvalidCommSizeError: raise unittest.SkipTes...
import unittest import distarray as da from distarray.mpi.mpibase import create_comm_of_size, InvalidCommSizeError class TestDistributedArrayProtocol(unittest.TestCase): def setUp(self): try: comm = create_comm_of_size(4) except InvalidCommSizeError: raise unittest.SkipTes...
<commit_before>import unittest import distarray as da from distarray.mpi.mpibase import create_comm_of_size, InvalidCommSizeError class TestDistributedArrayProtocol(unittest.TestCase): def setUp(self): try: comm = create_comm_of_size(4) except InvalidCommSizeError: raise u...
52443c468a446638171f45b080dcf62f73e62866
src/wirecloud_fiware/tests/selenium.py
src/wirecloud_fiware/tests/selenium.py
from wirecloudcommons.test import WirecloudSeleniumTestCase __test__ = False class FiWareSeleniumTestCase(WirecloudSeleniumTestCase): tags = ('current',) def test_add_fiware_marketplace(self): self.login() self.add_marketplace('fiware', 'http://localhost:8080', 'fiware') def test_de...
from wirecloudcommons.test import WirecloudSeleniumTestCase __test__ = False class FiWareSeleniumTestCase(WirecloudSeleniumTestCase): def test_add_fiware_marketplace(self): self.login() self.add_marketplace('fiware', 'http://localhost:8080', 'fiware') def test_delete_fiware_marketplace(s...
Remove 'current' tag from FiWareSeleniumTestCase
Remove 'current' tag from FiWareSeleniumTestCase
Python
agpl-3.0
rockneurotiko/wirecloud,jpajuelo/wirecloud,jpajuelo/wirecloud,rockneurotiko/wirecloud,jpajuelo/wirecloud,rockneurotiko/wirecloud,rockneurotiko/wirecloud,jpajuelo/wirecloud
from wirecloudcommons.test import WirecloudSeleniumTestCase __test__ = False class FiWareSeleniumTestCase(WirecloudSeleniumTestCase): tags = ('current',) def test_add_fiware_marketplace(self): self.login() self.add_marketplace('fiware', 'http://localhost:8080', 'fiware') def test_de...
from wirecloudcommons.test import WirecloudSeleniumTestCase __test__ = False class FiWareSeleniumTestCase(WirecloudSeleniumTestCase): def test_add_fiware_marketplace(self): self.login() self.add_marketplace('fiware', 'http://localhost:8080', 'fiware') def test_delete_fiware_marketplace(s...
<commit_before>from wirecloudcommons.test import WirecloudSeleniumTestCase __test__ = False class FiWareSeleniumTestCase(WirecloudSeleniumTestCase): tags = ('current',) def test_add_fiware_marketplace(self): self.login() self.add_marketplace('fiware', 'http://localhost:8080', 'fiware') ...
from wirecloudcommons.test import WirecloudSeleniumTestCase __test__ = False class FiWareSeleniumTestCase(WirecloudSeleniumTestCase): def test_add_fiware_marketplace(self): self.login() self.add_marketplace('fiware', 'http://localhost:8080', 'fiware') def test_delete_fiware_marketplace(s...
from wirecloudcommons.test import WirecloudSeleniumTestCase __test__ = False class FiWareSeleniumTestCase(WirecloudSeleniumTestCase): tags = ('current',) def test_add_fiware_marketplace(self): self.login() self.add_marketplace('fiware', 'http://localhost:8080', 'fiware') def test_de...
<commit_before>from wirecloudcommons.test import WirecloudSeleniumTestCase __test__ = False class FiWareSeleniumTestCase(WirecloudSeleniumTestCase): tags = ('current',) def test_add_fiware_marketplace(self): self.login() self.add_marketplace('fiware', 'http://localhost:8080', 'fiware') ...
6fe2e1dfbce465fee8a12475b3bfcda3ea10594e
staticgen_demo/blog/staticgen_views.py
staticgen_demo/blog/staticgen_views.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from staticgen.staticgen_pool import staticgen_pool from staticgen.staticgen_views import StaticgenView from .models import Post class BlogPostListView(StaticgenView): is_paginated = True i18n = True def items(self): return ('blog...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from staticgen.staticgen_pool import staticgen_pool from staticgen.staticgen_views import StaticgenView from .models import Post class BlogPostListView(StaticgenView): is_paginated = True i18n = True def items(self): return ('blog...
Add print statements to debug BlogPostListView
Add print statements to debug BlogPostListView
Python
bsd-3-clause
mishbahr/staticgen-demo,mishbahr/staticgen-demo,mishbahr/staticgen-demo
# -*- coding: utf-8 -*- from __future__ import unicode_literals from staticgen.staticgen_pool import staticgen_pool from staticgen.staticgen_views import StaticgenView from .models import Post class BlogPostListView(StaticgenView): is_paginated = True i18n = True def items(self): return ('blog...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from staticgen.staticgen_pool import staticgen_pool from staticgen.staticgen_views import StaticgenView from .models import Post class BlogPostListView(StaticgenView): is_paginated = True i18n = True def items(self): return ('blog...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from staticgen.staticgen_pool import staticgen_pool from staticgen.staticgen_views import StaticgenView from .models import Post class BlogPostListView(StaticgenView): is_paginated = True i18n = True def items(self): ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from staticgen.staticgen_pool import staticgen_pool from staticgen.staticgen_views import StaticgenView from .models import Post class BlogPostListView(StaticgenView): is_paginated = True i18n = True def items(self): return ('blog...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from staticgen.staticgen_pool import staticgen_pool from staticgen.staticgen_views import StaticgenView from .models import Post class BlogPostListView(StaticgenView): is_paginated = True i18n = True def items(self): return ('blog...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from staticgen.staticgen_pool import staticgen_pool from staticgen.staticgen_views import StaticgenView from .models import Post class BlogPostListView(StaticgenView): is_paginated = True i18n = True def items(self): ...
abfe0538769145ac83031062ce3b22d2622f18bf
opwen_email_server/utils/temporary.py
opwen_email_server/utils/temporary.py
from contextlib import contextmanager from contextlib import suppress from os import close from os import remove from tempfile import mkstemp def create_tempfilename() -> str: file_descriptor, filename = mkstemp() close(file_descriptor) return filename @contextmanager def removing(path: str) -> str: ...
from contextlib import contextmanager from contextlib import suppress from os import close from os import remove from tempfile import mkstemp from typing import Generator def create_tempfilename() -> str: file_descriptor, filename = mkstemp() close(file_descriptor) return filename @contextmanager def re...
Fix type annotation for context manager
Fix type annotation for context manager
Python
apache-2.0
ascoderu/opwen-cloudserver,ascoderu/opwen-cloudserver
from contextlib import contextmanager from contextlib import suppress from os import close from os import remove from tempfile import mkstemp def create_tempfilename() -> str: file_descriptor, filename = mkstemp() close(file_descriptor) return filename @contextmanager def removing(path: str) -> str: ...
from contextlib import contextmanager from contextlib import suppress from os import close from os import remove from tempfile import mkstemp from typing import Generator def create_tempfilename() -> str: file_descriptor, filename = mkstemp() close(file_descriptor) return filename @contextmanager def re...
<commit_before>from contextlib import contextmanager from contextlib import suppress from os import close from os import remove from tempfile import mkstemp def create_tempfilename() -> str: file_descriptor, filename = mkstemp() close(file_descriptor) return filename @contextmanager def removing(path: s...
from contextlib import contextmanager from contextlib import suppress from os import close from os import remove from tempfile import mkstemp from typing import Generator def create_tempfilename() -> str: file_descriptor, filename = mkstemp() close(file_descriptor) return filename @contextmanager def re...
from contextlib import contextmanager from contextlib import suppress from os import close from os import remove from tempfile import mkstemp def create_tempfilename() -> str: file_descriptor, filename = mkstemp() close(file_descriptor) return filename @contextmanager def removing(path: str) -> str: ...
<commit_before>from contextlib import contextmanager from contextlib import suppress from os import close from os import remove from tempfile import mkstemp def create_tempfilename() -> str: file_descriptor, filename = mkstemp() close(file_descriptor) return filename @contextmanager def removing(path: s...
d154cd852bdb02743e9752179559a91b9f1a7f8c
example/tests/unit/test_renderer_class_methods.py
example/tests/unit/test_renderer_class_methods.py
from django.contrib.auth import get_user_model from rest_framework_json_api import serializers from rest_framework_json_api.renderers import JSONRenderer class ResourceSerializer(serializers.ModelSerializer): class Meta: fields = ('username',) model = get_user_model() def test_build_json_resour...
from django.contrib.auth import get_user_model from rest_framework_json_api import serializers from rest_framework_json_api.renderers import JSONRenderer pytestmark = pytest.mark.django_db class ResourceSerializer(serializers.ModelSerializer): class Meta: fields = ('username',) model = get_user_m...
Fix for Database access not allowed, use the "django_db" mark to enable it.
Fix for Database access not allowed, use the "django_db" mark to enable it.
Python
bsd-2-clause
django-json-api/django-rest-framework-json-api,martinmaillard/django-rest-framework-json-api,schtibe/django-rest-framework-json-api,pombredanne/django-rest-framework-json-api,scottfisk/django-rest-framework-json-api,Instawork/django-rest-framework-json-api,leo-naeka/rest_framework_ember,django-json-api/django-rest-fram...
from django.contrib.auth import get_user_model from rest_framework_json_api import serializers from rest_framework_json_api.renderers import JSONRenderer class ResourceSerializer(serializers.ModelSerializer): class Meta: fields = ('username',) model = get_user_model() def test_build_json_resour...
from django.contrib.auth import get_user_model from rest_framework_json_api import serializers from rest_framework_json_api.renderers import JSONRenderer pytestmark = pytest.mark.django_db class ResourceSerializer(serializers.ModelSerializer): class Meta: fields = ('username',) model = get_user_m...
<commit_before>from django.contrib.auth import get_user_model from rest_framework_json_api import serializers from rest_framework_json_api.renderers import JSONRenderer class ResourceSerializer(serializers.ModelSerializer): class Meta: fields = ('username',) model = get_user_model() def test_bu...
from django.contrib.auth import get_user_model from rest_framework_json_api import serializers from rest_framework_json_api.renderers import JSONRenderer pytestmark = pytest.mark.django_db class ResourceSerializer(serializers.ModelSerializer): class Meta: fields = ('username',) model = get_user_m...
from django.contrib.auth import get_user_model from rest_framework_json_api import serializers from rest_framework_json_api.renderers import JSONRenderer class ResourceSerializer(serializers.ModelSerializer): class Meta: fields = ('username',) model = get_user_model() def test_build_json_resour...
<commit_before>from django.contrib.auth import get_user_model from rest_framework_json_api import serializers from rest_framework_json_api.renderers import JSONRenderer class ResourceSerializer(serializers.ModelSerializer): class Meta: fields = ('username',) model = get_user_model() def test_bu...
d32ec29dfae5a3ea354266dfda0438d9c69398e3
daiquiri/wordpress/utils.py
daiquiri/wordpress/utils.py
from django.conf import settings from .tasks import ( update_wordpress_user as update_wordpress_user_task, update_wordpress_role as update_wordpress_role_task ) def update_wordpress_user(user): if not settings.ASYNC: update_wordpress_user_task.apply((user.username, user.email, user.first_name, us...
import random import string from django.conf import settings from .tasks import ( update_wordpress_user as update_wordpress_user_task, update_wordpress_role as update_wordpress_role_task ) def update_wordpress_user(user): if user.email: email = user.email else: random_string = ''.joi...
Fix update_wordpress_user for missing email
Fix update_wordpress_user for missing email
Python
apache-2.0
aipescience/django-daiquiri,aipescience/django-daiquiri,aipescience/django-daiquiri
from django.conf import settings from .tasks import ( update_wordpress_user as update_wordpress_user_task, update_wordpress_role as update_wordpress_role_task ) def update_wordpress_user(user): if not settings.ASYNC: update_wordpress_user_task.apply((user.username, user.email, user.first_name, us...
import random import string from django.conf import settings from .tasks import ( update_wordpress_user as update_wordpress_user_task, update_wordpress_role as update_wordpress_role_task ) def update_wordpress_user(user): if user.email: email = user.email else: random_string = ''.joi...
<commit_before>from django.conf import settings from .tasks import ( update_wordpress_user as update_wordpress_user_task, update_wordpress_role as update_wordpress_role_task ) def update_wordpress_user(user): if not settings.ASYNC: update_wordpress_user_task.apply((user.username, user.email, user...
import random import string from django.conf import settings from .tasks import ( update_wordpress_user as update_wordpress_user_task, update_wordpress_role as update_wordpress_role_task ) def update_wordpress_user(user): if user.email: email = user.email else: random_string = ''.joi...
from django.conf import settings from .tasks import ( update_wordpress_user as update_wordpress_user_task, update_wordpress_role as update_wordpress_role_task ) def update_wordpress_user(user): if not settings.ASYNC: update_wordpress_user_task.apply((user.username, user.email, user.first_name, us...
<commit_before>from django.conf import settings from .tasks import ( update_wordpress_user as update_wordpress_user_task, update_wordpress_role as update_wordpress_role_task ) def update_wordpress_user(user): if not settings.ASYNC: update_wordpress_user_task.apply((user.username, user.email, user...
f6518a7bd554c87b4dcb68d1ca618babcf278c63
tests/extmod/machine1.py
tests/extmod/machine1.py
# test machine module import machine import uctypes print(machine.mem8) buf = bytearray(8) addr = uctypes.addressof(buf) machine.mem8[addr] = 123 print(machine.mem8[addr]) machine.mem16[addr] = 12345 print(machine.mem16[addr]) machine.mem32[addr] = 123456789 print(machine.mem32[addr]) try: machine.mem16[1] e...
# test machine module try: import machine except ImportError: print("SKIP") import sys sys.exit() import uctypes print(machine.mem8) buf = bytearray(8) addr = uctypes.addressof(buf) machine.mem8[addr] = 123 print(machine.mem8[addr]) machine.mem16[addr] = 12345 print(machine.mem16[addr]) machine.m...
Check that machine module exists and print SKIP if it doesn't.
tests: Check that machine module exists and print SKIP if it doesn't.
Python
mit
vitiral/micropython,lowRISC/micropython,adafruit/circuitpython,danicampora/micropython,ryannathans/micropython,pfalcon/micropython,mgyenik/micropython,adafruit/micropython,blazewicz/micropython,vitiral/micropython,chrisdearman/micropython,dxxb/micropython,dinau/micropython,tdautc19841202/micropython,utopiaprince/microp...
# test machine module import machine import uctypes print(machine.mem8) buf = bytearray(8) addr = uctypes.addressof(buf) machine.mem8[addr] = 123 print(machine.mem8[addr]) machine.mem16[addr] = 12345 print(machine.mem16[addr]) machine.mem32[addr] = 123456789 print(machine.mem32[addr]) try: machine.mem16[1] e...
# test machine module try: import machine except ImportError: print("SKIP") import sys sys.exit() import uctypes print(machine.mem8) buf = bytearray(8) addr = uctypes.addressof(buf) machine.mem8[addr] = 123 print(machine.mem8[addr]) machine.mem16[addr] = 12345 print(machine.mem16[addr]) machine.m...
<commit_before># test machine module import machine import uctypes print(machine.mem8) buf = bytearray(8) addr = uctypes.addressof(buf) machine.mem8[addr] = 123 print(machine.mem8[addr]) machine.mem16[addr] = 12345 print(machine.mem16[addr]) machine.mem32[addr] = 123456789 print(machine.mem32[addr]) try: mac...
# test machine module try: import machine except ImportError: print("SKIP") import sys sys.exit() import uctypes print(machine.mem8) buf = bytearray(8) addr = uctypes.addressof(buf) machine.mem8[addr] = 123 print(machine.mem8[addr]) machine.mem16[addr] = 12345 print(machine.mem16[addr]) machine.m...
# test machine module import machine import uctypes print(machine.mem8) buf = bytearray(8) addr = uctypes.addressof(buf) machine.mem8[addr] = 123 print(machine.mem8[addr]) machine.mem16[addr] = 12345 print(machine.mem16[addr]) machine.mem32[addr] = 123456789 print(machine.mem32[addr]) try: machine.mem16[1] e...
<commit_before># test machine module import machine import uctypes print(machine.mem8) buf = bytearray(8) addr = uctypes.addressof(buf) machine.mem8[addr] = 123 print(machine.mem8[addr]) machine.mem16[addr] = 12345 print(machine.mem16[addr]) machine.mem32[addr] = 123456789 print(machine.mem32[addr]) try: mac...
ddd4a0d1ba607f49f75f9516c378159f1204d9fb
readthedocs/rtd_tests/tests/test_search_json_parsing.py
readthedocs/rtd_tests/tests/test_search_json_parsing.py
import os from django.test import TestCase from search.parse_json import process_file base_dir = os.path.dirname(os.path.dirname(__file__)) class TestHacks(TestCase): def test_h2_parsing(self): data = process_file( os.path.join( base_dir, 'files/api.fjson', ...
import os from django.test import TestCase from search.parse_json import process_file base_dir = os.path.dirname(os.path.dirname(__file__)) class TestHacks(TestCase): def test_h2_parsing(self): data = process_file( os.path.join( base_dir, 'files/api.fjson', ...
Fix tests now that we have H1 capturing
Fix tests now that we have H1 capturing
Python
mit
wanghaven/readthedocs.org,wijerasa/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org,d0ugal/readthedocs.org,takluyver/readthedocs.org,wanghaven/readthedocs.org,emawind84/readthedocs.org,KamranMackey/readthedocs.org,attakei/readthedocs-oauth,agjohnson/readthedocs.org,michaelmcandrew/readthedocs.org,asampat3090/r...
import os from django.test import TestCase from search.parse_json import process_file base_dir = os.path.dirname(os.path.dirname(__file__)) class TestHacks(TestCase): def test_h2_parsing(self): data = process_file( os.path.join( base_dir, 'files/api.fjson', ...
import os from django.test import TestCase from search.parse_json import process_file base_dir = os.path.dirname(os.path.dirname(__file__)) class TestHacks(TestCase): def test_h2_parsing(self): data = process_file( os.path.join( base_dir, 'files/api.fjson', ...
<commit_before>import os from django.test import TestCase from search.parse_json import process_file base_dir = os.path.dirname(os.path.dirname(__file__)) class TestHacks(TestCase): def test_h2_parsing(self): data = process_file( os.path.join( base_dir, 'file...
import os from django.test import TestCase from search.parse_json import process_file base_dir = os.path.dirname(os.path.dirname(__file__)) class TestHacks(TestCase): def test_h2_parsing(self): data = process_file( os.path.join( base_dir, 'files/api.fjson', ...
import os from django.test import TestCase from search.parse_json import process_file base_dir = os.path.dirname(os.path.dirname(__file__)) class TestHacks(TestCase): def test_h2_parsing(self): data = process_file( os.path.join( base_dir, 'files/api.fjson', ...
<commit_before>import os from django.test import TestCase from search.parse_json import process_file base_dir = os.path.dirname(os.path.dirname(__file__)) class TestHacks(TestCase): def test_h2_parsing(self): data = process_file( os.path.join( base_dir, 'file...
135a97a58a95c04d2635fff68d2c080413f1d804
tests/test_conditions.py
tests/test_conditions.py
import json import unittest import awacs.aws as aws import awacs.s3 as s3 class TestConditions(unittest.TestCase): def test_for_all_values(self): c = aws.Condition( aws.ForAllValuesStringLike( "dynamodb:requestedAttributes", ["PostDateTime", "Message", "Tags"] ) ...
import json import unittest import awacs.aws as aws import awacs.s3 as s3 class TestConditions(unittest.TestCase): def test_for_all_values(self): c = aws.Condition( aws.ForAllValuesStringLike( "dynamodb:requestedAttributes", ["PostDateTime", "Message", "Tags"] ) ...
Remove 'u' prefix from strings
Remove 'u' prefix from strings
Python
bsd-2-clause
cloudtools/awacs
import json import unittest import awacs.aws as aws import awacs.s3 as s3 class TestConditions(unittest.TestCase): def test_for_all_values(self): c = aws.Condition( aws.ForAllValuesStringLike( "dynamodb:requestedAttributes", ["PostDateTime", "Message", "Tags"] ) ...
import json import unittest import awacs.aws as aws import awacs.s3 as s3 class TestConditions(unittest.TestCase): def test_for_all_values(self): c = aws.Condition( aws.ForAllValuesStringLike( "dynamodb:requestedAttributes", ["PostDateTime", "Message", "Tags"] ) ...
<commit_before>import json import unittest import awacs.aws as aws import awacs.s3 as s3 class TestConditions(unittest.TestCase): def test_for_all_values(self): c = aws.Condition( aws.ForAllValuesStringLike( "dynamodb:requestedAttributes", ["PostDateTime", "Message", "Tags"] ...
import json import unittest import awacs.aws as aws import awacs.s3 as s3 class TestConditions(unittest.TestCase): def test_for_all_values(self): c = aws.Condition( aws.ForAllValuesStringLike( "dynamodb:requestedAttributes", ["PostDateTime", "Message", "Tags"] ) ...
import json import unittest import awacs.aws as aws import awacs.s3 as s3 class TestConditions(unittest.TestCase): def test_for_all_values(self): c = aws.Condition( aws.ForAllValuesStringLike( "dynamodb:requestedAttributes", ["PostDateTime", "Message", "Tags"] ) ...
<commit_before>import json import unittest import awacs.aws as aws import awacs.s3 as s3 class TestConditions(unittest.TestCase): def test_for_all_values(self): c = aws.Condition( aws.ForAllValuesStringLike( "dynamodb:requestedAttributes", ["PostDateTime", "Message", "Tags"] ...
07cffdaa6e131c4f02c570de3925d6238656fc87
tests/test_invocation.py
tests/test_invocation.py
import sys import subprocess import re def test_runpy_invoke(): """ Ensure honcho can also be invoked using runpy (python -m) """ cmd = [sys.executable, '-m', 'honcho', 'version'] output = subprocess.check_output(cmd, universal_newlines=True) assert re.match(r'honcho \d\.\d\.\d.*\n', output)
import sys import subprocess import re import pytest @pytest.mark.skipif(sys.version_info < (2, 7), reason="check_output not available") def test_runpy_invoke(): """ Ensure honcho can also be invoked using runpy (python -m) """ cmd = [sys.executable, '-m', 'honcho', 'version'] output = subprocess...
Disable test on Python 2.6.
Disable test on Python 2.6.
Python
mit
nickstenning/honcho,nickstenning/honcho
import sys import subprocess import re def test_runpy_invoke(): """ Ensure honcho can also be invoked using runpy (python -m) """ cmd = [sys.executable, '-m', 'honcho', 'version'] output = subprocess.check_output(cmd, universal_newlines=True) assert re.match(r'honcho \d\.\d\.\d.*\n', output) D...
import sys import subprocess import re import pytest @pytest.mark.skipif(sys.version_info < (2, 7), reason="check_output not available") def test_runpy_invoke(): """ Ensure honcho can also be invoked using runpy (python -m) """ cmd = [sys.executable, '-m', 'honcho', 'version'] output = subprocess...
<commit_before>import sys import subprocess import re def test_runpy_invoke(): """ Ensure honcho can also be invoked using runpy (python -m) """ cmd = [sys.executable, '-m', 'honcho', 'version'] output = subprocess.check_output(cmd, universal_newlines=True) assert re.match(r'honcho \d\.\d\.\d....
import sys import subprocess import re import pytest @pytest.mark.skipif(sys.version_info < (2, 7), reason="check_output not available") def test_runpy_invoke(): """ Ensure honcho can also be invoked using runpy (python -m) """ cmd = [sys.executable, '-m', 'honcho', 'version'] output = subprocess...
import sys import subprocess import re def test_runpy_invoke(): """ Ensure honcho can also be invoked using runpy (python -m) """ cmd = [sys.executable, '-m', 'honcho', 'version'] output = subprocess.check_output(cmd, universal_newlines=True) assert re.match(r'honcho \d\.\d\.\d.*\n', output) D...
<commit_before>import sys import subprocess import re def test_runpy_invoke(): """ Ensure honcho can also be invoked using runpy (python -m) """ cmd = [sys.executable, '-m', 'honcho', 'version'] output = subprocess.check_output(cmd, universal_newlines=True) assert re.match(r'honcho \d\.\d\.\d....
1e7306d31cc9f5423f9594257b631d5f1a6c0ced
swiftly/__init__.py
swiftly/__init__.py
""" Client for Swift Copyright 2012 Gregory Holt 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 w...
""" Client for Swift Copyright 2012 Gregory Holt 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 w...
Work on master is now 1.5 dev work
Work on master is now 1.5 dev work
Python
apache-2.0
dpgoetz/swiftly,rackerlabs/swiftly,gholt/swiftly
""" Client for Swift Copyright 2012 Gregory Holt 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 w...
""" Client for Swift Copyright 2012 Gregory Holt 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 w...
<commit_before>""" Client for Swift Copyright 2012 Gregory Holt 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...
""" Client for Swift Copyright 2012 Gregory Holt 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 w...
""" Client for Swift Copyright 2012 Gregory Holt 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 w...
<commit_before>""" Client for Swift Copyright 2012 Gregory Holt 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...
f052666502ef0108d991940ca713ebc0c5d0c036
MyBot.py
MyBot.py
from hlt import * from networking import * myID, gameMap = getInit() sendInit("MyPythonBot") while True: moves = [] gameMap = getFrame() for y in range(gameMap.height): for x in range(gameMap.width): location = Location(x, y) if gameMap.getSite(location).owner == myID: ...
from hlt import * from networking import * myID, gameMap = getInit() sendInit("dpetkerPythonBot") def create_move(location): site = gameMap.getSite(location) # See if there's an enemy adjacent to us with less strength. If so, capture it for d in CARDINALS: neighbour_site = gameMap.getSite(location, d) ...
Improve my bot according to tutorial
Improve my bot according to tutorial
Python
mit
dpetker/halite,dpetker/halite
from hlt import * from networking import * myID, gameMap = getInit() sendInit("MyPythonBot") while True: moves = [] gameMap = getFrame() for y in range(gameMap.height): for x in range(gameMap.width): location = Location(x, y) if gameMap.getSite(location).owner == myID: ...
from hlt import * from networking import * myID, gameMap = getInit() sendInit("dpetkerPythonBot") def create_move(location): site = gameMap.getSite(location) # See if there's an enemy adjacent to us with less strength. If so, capture it for d in CARDINALS: neighbour_site = gameMap.getSite(location, d) ...
<commit_before>from hlt import * from networking import * myID, gameMap = getInit() sendInit("MyPythonBot") while True: moves = [] gameMap = getFrame() for y in range(gameMap.height): for x in range(gameMap.width): location = Location(x, y) if gameMap.getSite(location).owne...
from hlt import * from networking import * myID, gameMap = getInit() sendInit("dpetkerPythonBot") def create_move(location): site = gameMap.getSite(location) # See if there's an enemy adjacent to us with less strength. If so, capture it for d in CARDINALS: neighbour_site = gameMap.getSite(location, d) ...
from hlt import * from networking import * myID, gameMap = getInit() sendInit("MyPythonBot") while True: moves = [] gameMap = getFrame() for y in range(gameMap.height): for x in range(gameMap.width): location = Location(x, y) if gameMap.getSite(location).owner == myID: ...
<commit_before>from hlt import * from networking import * myID, gameMap = getInit() sendInit("MyPythonBot") while True: moves = [] gameMap = getFrame() for y in range(gameMap.height): for x in range(gameMap.width): location = Location(x, y) if gameMap.getSite(location).owne...
9eabdbc6b73661865c4d785cbc57d7ee51fe59cd
future/tests/test_imports_urllib.py
future/tests/test_imports_urllib.py
from __future__ import absolute_import, print_function import unittest import sys class ImportUrllibTest(unittest.TestCase): def test_urllib(self): """ This should perhaps fail: importing urllib first means that the import hooks won't be consulted when importing urllib.response. ""...
from __future__ import absolute_import, print_function import unittest import sys class ImportUrllibTest(unittest.TestCase): def test_urllib(self): import urllib orig_file = urllib.__file__ from future.standard_library.urllib import response as urllib_response self.assertEqual(orig...
Change urllib test to use an explicit import
Change urllib test to use an explicit import
Python
mit
QuLogic/python-future,michaelpacer/python-future,PythonCharmers/python-future,krischer/python-future,krischer/python-future,QuLogic/python-future,michaelpacer/python-future,PythonCharmers/python-future
from __future__ import absolute_import, print_function import unittest import sys class ImportUrllibTest(unittest.TestCase): def test_urllib(self): """ This should perhaps fail: importing urllib first means that the import hooks won't be consulted when importing urllib.response. ""...
from __future__ import absolute_import, print_function import unittest import sys class ImportUrllibTest(unittest.TestCase): def test_urllib(self): import urllib orig_file = urllib.__file__ from future.standard_library.urllib import response as urllib_response self.assertEqual(orig...
<commit_before>from __future__ import absolute_import, print_function import unittest import sys class ImportUrllibTest(unittest.TestCase): def test_urllib(self): """ This should perhaps fail: importing urllib first means that the import hooks won't be consulted when importing urllib.respo...
from __future__ import absolute_import, print_function import unittest import sys class ImportUrllibTest(unittest.TestCase): def test_urllib(self): import urllib orig_file = urllib.__file__ from future.standard_library.urllib import response as urllib_response self.assertEqual(orig...
from __future__ import absolute_import, print_function import unittest import sys class ImportUrllibTest(unittest.TestCase): def test_urllib(self): """ This should perhaps fail: importing urllib first means that the import hooks won't be consulted when importing urllib.response. ""...
<commit_before>from __future__ import absolute_import, print_function import unittest import sys class ImportUrllibTest(unittest.TestCase): def test_urllib(self): """ This should perhaps fail: importing urllib first means that the import hooks won't be consulted when importing urllib.respo...
cad4e7e9feaf7fefe9ef91dea18594b095861204
content_editor/models.py
content_editor/models.py
from types import SimpleNamespace from django.db import models __all__ = ("Region", "Template", "create_plugin_base") class Region(SimpleNamespace): key = "" title = "unnamed" inherited = False class Template(SimpleNamespace): key = "" template_name = None title = "" regions = [] de...
from types import SimpleNamespace from django.db import models __all__ = ("Region", "Template", "create_plugin_base") class Region(SimpleNamespace): key = "" title = "unnamed" inherited = False class Template(SimpleNamespace): key = "" template_name = None title = "" regions = [] de...
Fix the docstring of create_plugin_base: Not internal, it's the main API
Fix the docstring of create_plugin_base: Not internal, it's the main API
Python
bsd-3-clause
matthiask/django-content-editor,matthiask/django-content-editor,matthiask/django-content-editor,matthiask/django-content-editor
from types import SimpleNamespace from django.db import models __all__ = ("Region", "Template", "create_plugin_base") class Region(SimpleNamespace): key = "" title = "unnamed" inherited = False class Template(SimpleNamespace): key = "" template_name = None title = "" regions = [] de...
from types import SimpleNamespace from django.db import models __all__ = ("Region", "Template", "create_plugin_base") class Region(SimpleNamespace): key = "" title = "unnamed" inherited = False class Template(SimpleNamespace): key = "" template_name = None title = "" regions = [] de...
<commit_before>from types import SimpleNamespace from django.db import models __all__ = ("Region", "Template", "create_plugin_base") class Region(SimpleNamespace): key = "" title = "unnamed" inherited = False class Template(SimpleNamespace): key = "" template_name = None title = "" re...
from types import SimpleNamespace from django.db import models __all__ = ("Region", "Template", "create_plugin_base") class Region(SimpleNamespace): key = "" title = "unnamed" inherited = False class Template(SimpleNamespace): key = "" template_name = None title = "" regions = [] de...
from types import SimpleNamespace from django.db import models __all__ = ("Region", "Template", "create_plugin_base") class Region(SimpleNamespace): key = "" title = "unnamed" inherited = False class Template(SimpleNamespace): key = "" template_name = None title = "" regions = [] de...
<commit_before>from types import SimpleNamespace from django.db import models __all__ = ("Region", "Template", "create_plugin_base") class Region(SimpleNamespace): key = "" title = "unnamed" inherited = False class Template(SimpleNamespace): key = "" template_name = None title = "" re...
27d8f3d637e5071e8eb048cd36218977bf0772ff
javascript_configuration/configuration_builder.py
javascript_configuration/configuration_builder.py
import sys from javascript_configuration import settings class ConfigurationBuilder: """ Get javascript configurations from urls.py files from all installed apps. """ def __init__(self): self.configuration = None def fetch(self): configuration = {} for app_name, module...
import sys from javascript_configuration import settings class ConfigurationBuilder: """ Get javascript configurations from urls.py files from all installed apps. """ def __init__(self): self.configuration = None def fetch(self): configuration = {} for app_name, module...
Fix bug in iteritems on SCAN_MODULES.
Fix bug in iteritems on SCAN_MODULES. Change-Id: Ifa58f29a9e69ad46b44c301244525d711b43faca Reviewed-on: http://review.pozytywnie.pl:8080/2340 Reviewed-by: Tomasz Wysocki <[email protected]> Tested-by: Tomasz Wysocki <[email protected]>
Python
mit
pozytywnie/django-javascript-settings
import sys from javascript_configuration import settings class ConfigurationBuilder: """ Get javascript configurations from urls.py files from all installed apps. """ def __init__(self): self.configuration = None def fetch(self): configuration = {} for app_name, module...
import sys from javascript_configuration import settings class ConfigurationBuilder: """ Get javascript configurations from urls.py files from all installed apps. """ def __init__(self): self.configuration = None def fetch(self): configuration = {} for app_name, module...
<commit_before>import sys from javascript_configuration import settings class ConfigurationBuilder: """ Get javascript configurations from urls.py files from all installed apps. """ def __init__(self): self.configuration = None def fetch(self): configuration = {} for a...
import sys from javascript_configuration import settings class ConfigurationBuilder: """ Get javascript configurations from urls.py files from all installed apps. """ def __init__(self): self.configuration = None def fetch(self): configuration = {} for app_name, module...
import sys from javascript_configuration import settings class ConfigurationBuilder: """ Get javascript configurations from urls.py files from all installed apps. """ def __init__(self): self.configuration = None def fetch(self): configuration = {} for app_name, module...
<commit_before>import sys from javascript_configuration import settings class ConfigurationBuilder: """ Get javascript configurations from urls.py files from all installed apps. """ def __init__(self): self.configuration = None def fetch(self): configuration = {} for a...
0ecff906f8d504576f00f28c46be6d4594008f38
parcels/interaction/distance_utils.py
parcels/interaction/distance_utils.py
import numpy as np def fast_distance(lat1, lon1, lat2, lon2): '''Compute the arc distance assuming the earth is a sphere.''' g = np.sin(lat1)*np.sin(lat2)+np.cos(lat1)*np.cos(lat2)*np.cos(lon1-lon2) return np.arccos(np.minimum(1, g)) def spherical_distance(depth1_m, lat1_deg, lon1_deg, depth2_m, lat2_de...
import numpy as np def fast_distance(lat1, lon1, lat2, lon2): '''Compute the arc distance assuming the earth is a sphere. This is not the only possible implementation. It was taken from: https://www.mkompf.com/gps/distcalc.html ''' g = np.sin(lat1)*np.sin(lat2)+np.cos(lat1)*np.cos(lat2)*np.cos(lo...
Add link for distance computation
Add link for distance computation
Python
mit
OceanPARCELS/parcels,OceanPARCELS/parcels
import numpy as np def fast_distance(lat1, lon1, lat2, lon2): '''Compute the arc distance assuming the earth is a sphere.''' g = np.sin(lat1)*np.sin(lat2)+np.cos(lat1)*np.cos(lat2)*np.cos(lon1-lon2) return np.arccos(np.minimum(1, g)) def spherical_distance(depth1_m, lat1_deg, lon1_deg, depth2_m, lat2_de...
import numpy as np def fast_distance(lat1, lon1, lat2, lon2): '''Compute the arc distance assuming the earth is a sphere. This is not the only possible implementation. It was taken from: https://www.mkompf.com/gps/distcalc.html ''' g = np.sin(lat1)*np.sin(lat2)+np.cos(lat1)*np.cos(lat2)*np.cos(lo...
<commit_before>import numpy as np def fast_distance(lat1, lon1, lat2, lon2): '''Compute the arc distance assuming the earth is a sphere.''' g = np.sin(lat1)*np.sin(lat2)+np.cos(lat1)*np.cos(lat2)*np.cos(lon1-lon2) return np.arccos(np.minimum(1, g)) def spherical_distance(depth1_m, lat1_deg, lon1_deg, de...
import numpy as np def fast_distance(lat1, lon1, lat2, lon2): '''Compute the arc distance assuming the earth is a sphere. This is not the only possible implementation. It was taken from: https://www.mkompf.com/gps/distcalc.html ''' g = np.sin(lat1)*np.sin(lat2)+np.cos(lat1)*np.cos(lat2)*np.cos(lo...
import numpy as np def fast_distance(lat1, lon1, lat2, lon2): '''Compute the arc distance assuming the earth is a sphere.''' g = np.sin(lat1)*np.sin(lat2)+np.cos(lat1)*np.cos(lat2)*np.cos(lon1-lon2) return np.arccos(np.minimum(1, g)) def spherical_distance(depth1_m, lat1_deg, lon1_deg, depth2_m, lat2_de...
<commit_before>import numpy as np def fast_distance(lat1, lon1, lat2, lon2): '''Compute the arc distance assuming the earth is a sphere.''' g = np.sin(lat1)*np.sin(lat2)+np.cos(lat1)*np.cos(lat2)*np.cos(lon1-lon2) return np.arccos(np.minimum(1, g)) def spherical_distance(depth1_m, lat1_deg, lon1_deg, de...
c07234bb3142df96dc9e02a236975bc3de2415cc
nailgun/nailgun/test/test_plugin.py
nailgun/nailgun/test/test_plugin.py
# -*- coding: utf-8 -*- from nailgun.test.base import BaseHandlers class TestPluginStateMachine(BaseHandlers): def test_attrs_creation(self): pass
# -*- coding: utf-8 -*- from nailgun.test.base import BaseHandlers from nailgun.plugin.process import get_queue, PluginProcessor from nailgun.api.models import Task class TestPluginProcess(BaseHandlers): def setUp(self): super(TestPluginProcess, self).setUp() self.plugin_processor = PluginProcessor...
Implement plugin test on exception handling
Implement plugin test on exception handling
Python
apache-2.0
SmartInfrastructures/fuel-main-dev,ddepaoli3/fuel-main-dev,zhaochao/fuel-main,zhaochao/fuel-main,huntxu/fuel-main,prmtl/fuel-web,huntxu/fuel-web,huntxu/fuel-main,SmartInfrastructures/fuel-main-dev,huntxu/fuel-web,teselkin/fuel-main,ddepaoli3/fuel-main-dev,teselkin/fuel-main,SmartInfrastructures/fuel-web-dev,SergK/fuel-...
# -*- coding: utf-8 -*- from nailgun.test.base import BaseHandlers class TestPluginStateMachine(BaseHandlers): def test_attrs_creation(self): pass Implement plugin test on exception handling
# -*- coding: utf-8 -*- from nailgun.test.base import BaseHandlers from nailgun.plugin.process import get_queue, PluginProcessor from nailgun.api.models import Task class TestPluginProcess(BaseHandlers): def setUp(self): super(TestPluginProcess, self).setUp() self.plugin_processor = PluginProcessor...
<commit_before># -*- coding: utf-8 -*- from nailgun.test.base import BaseHandlers class TestPluginStateMachine(BaseHandlers): def test_attrs_creation(self): pass <commit_msg>Implement plugin test on exception handling<commit_after>
# -*- coding: utf-8 -*- from nailgun.test.base import BaseHandlers from nailgun.plugin.process import get_queue, PluginProcessor from nailgun.api.models import Task class TestPluginProcess(BaseHandlers): def setUp(self): super(TestPluginProcess, self).setUp() self.plugin_processor = PluginProcessor...
# -*- coding: utf-8 -*- from nailgun.test.base import BaseHandlers class TestPluginStateMachine(BaseHandlers): def test_attrs_creation(self): pass Implement plugin test on exception handling# -*- coding: utf-8 -*- from nailgun.test.base import BaseHandlers from nailgun.plugin.process import get_queue, Pl...
<commit_before># -*- coding: utf-8 -*- from nailgun.test.base import BaseHandlers class TestPluginStateMachine(BaseHandlers): def test_attrs_creation(self): pass <commit_msg>Implement plugin test on exception handling<commit_after># -*- coding: utf-8 -*- from nailgun.test.base import BaseHandlers from na...
593c00153b8634e4ea3817de2ef3592fe0540e58
spinach/contrib/spinachd/management/commands/spinach.py
spinach/contrib/spinachd/management/commands/spinach.py
from django.core.management.base import BaseCommand from spinach.const import DEFAULT_QUEUE, DEFAULT_WORKER_NUMBER from spinach.contrib.datadog import register_datadog_if_module_patched from ...apps import spin class Command(BaseCommand): help = 'Run Spinach workers' def add_arguments(self, parser): ...
from django.core.management.base import BaseCommand from spinach.const import DEFAULT_QUEUE, DEFAULT_WORKER_NUMBER from spinach.contrib.datadog import register_datadog_if_module_patched from ...apps import spin class Command(BaseCommand): help = 'Run Spinach workers' def add_arguments(self, parser): ...
Fix typo preventing the Django/Datadog integration from starting
Fix typo preventing the Django/Datadog integration from starting
Python
bsd-2-clause
NicolasLM/spinach
from django.core.management.base import BaseCommand from spinach.const import DEFAULT_QUEUE, DEFAULT_WORKER_NUMBER from spinach.contrib.datadog import register_datadog_if_module_patched from ...apps import spin class Command(BaseCommand): help = 'Run Spinach workers' def add_arguments(self, parser): ...
from django.core.management.base import BaseCommand from spinach.const import DEFAULT_QUEUE, DEFAULT_WORKER_NUMBER from spinach.contrib.datadog import register_datadog_if_module_patched from ...apps import spin class Command(BaseCommand): help = 'Run Spinach workers' def add_arguments(self, parser): ...
<commit_before>from django.core.management.base import BaseCommand from spinach.const import DEFAULT_QUEUE, DEFAULT_WORKER_NUMBER from spinach.contrib.datadog import register_datadog_if_module_patched from ...apps import spin class Command(BaseCommand): help = 'Run Spinach workers' def add_arguments(self, ...
from django.core.management.base import BaseCommand from spinach.const import DEFAULT_QUEUE, DEFAULT_WORKER_NUMBER from spinach.contrib.datadog import register_datadog_if_module_patched from ...apps import spin class Command(BaseCommand): help = 'Run Spinach workers' def add_arguments(self, parser): ...
from django.core.management.base import BaseCommand from spinach.const import DEFAULT_QUEUE, DEFAULT_WORKER_NUMBER from spinach.contrib.datadog import register_datadog_if_module_patched from ...apps import spin class Command(BaseCommand): help = 'Run Spinach workers' def add_arguments(self, parser): ...
<commit_before>from django.core.management.base import BaseCommand from spinach.const import DEFAULT_QUEUE, DEFAULT_WORKER_NUMBER from spinach.contrib.datadog import register_datadog_if_module_patched from ...apps import spin class Command(BaseCommand): help = 'Run Spinach workers' def add_arguments(self, ...
09edd3b548baaa4f6d1e31d5a9891f2b6eef45d6
noopy/project_template/dispatcher.py
noopy/project_template/dispatcher.py
from noopy import lambda_functions from noopy.endpoint import Endpoint from noopy.endpoint import methods def dispatch(event, context): print event if event['type'] == 'APIGateway': path = event['path'] method = getattr(methods, event['method']) endpoint = Endpoint.endpoints[Endpoint(...
from noopy import lambda_functions from noopy.endpoint import Endpoint from noopy.endpoint import methods def dispatch(event, context): print event if event['type'] == 'APIGateway': path = event['path'] method = getattr(methods, event['method']) endpoint = Endpoint.endpoints[Endpoint(...
Raise error on undefined type
Raise error on undefined type
Python
mit
acuros/noopy
from noopy import lambda_functions from noopy.endpoint import Endpoint from noopy.endpoint import methods def dispatch(event, context): print event if event['type'] == 'APIGateway': path = event['path'] method = getattr(methods, event['method']) endpoint = Endpoint.endpoints[Endpoint(...
from noopy import lambda_functions from noopy.endpoint import Endpoint from noopy.endpoint import methods def dispatch(event, context): print event if event['type'] == 'APIGateway': path = event['path'] method = getattr(methods, event['method']) endpoint = Endpoint.endpoints[Endpoint(...
<commit_before>from noopy import lambda_functions from noopy.endpoint import Endpoint from noopy.endpoint import methods def dispatch(event, context): print event if event['type'] == 'APIGateway': path = event['path'] method = getattr(methods, event['method']) endpoint = Endpoint.endp...
from noopy import lambda_functions from noopy.endpoint import Endpoint from noopy.endpoint import methods def dispatch(event, context): print event if event['type'] == 'APIGateway': path = event['path'] method = getattr(methods, event['method']) endpoint = Endpoint.endpoints[Endpoint(...
from noopy import lambda_functions from noopy.endpoint import Endpoint from noopy.endpoint import methods def dispatch(event, context): print event if event['type'] == 'APIGateway': path = event['path'] method = getattr(methods, event['method']) endpoint = Endpoint.endpoints[Endpoint(...
<commit_before>from noopy import lambda_functions from noopy.endpoint import Endpoint from noopy.endpoint import methods def dispatch(event, context): print event if event['type'] == 'APIGateway': path = event['path'] method = getattr(methods, event['method']) endpoint = Endpoint.endp...
e861e74374d22d3684dccfa5e0063ff37549bcfc
api/app.py
api/app.py
from flask import Flask from flask import request from flask import jsonify from y_text_recommender_system.recommender import recommend app = Flask(__name__) class InvalidUsage(Exception): status_code = 400 def __init__(self, message, payload=None): Exception.__init__(self) self.message = m...
from flask import Flask from flask import request from flask import jsonify from y_text_recommender_system.recommender import recommend app = Flask(__name__) class InvalidUsage(Exception): status_code = 400 def __init__(self, message, payload=None): Exception.__init__(self) self.message = m...
Refactor to change the comparator of dict
Refactor to change the comparator of dict
Python
mit
joaojunior/y_text_recommender_system
from flask import Flask from flask import request from flask import jsonify from y_text_recommender_system.recommender import recommend app = Flask(__name__) class InvalidUsage(Exception): status_code = 400 def __init__(self, message, payload=None): Exception.__init__(self) self.message = m...
from flask import Flask from flask import request from flask import jsonify from y_text_recommender_system.recommender import recommend app = Flask(__name__) class InvalidUsage(Exception): status_code = 400 def __init__(self, message, payload=None): Exception.__init__(self) self.message = m...
<commit_before>from flask import Flask from flask import request from flask import jsonify from y_text_recommender_system.recommender import recommend app = Flask(__name__) class InvalidUsage(Exception): status_code = 400 def __init__(self, message, payload=None): Exception.__init__(self) s...
from flask import Flask from flask import request from flask import jsonify from y_text_recommender_system.recommender import recommend app = Flask(__name__) class InvalidUsage(Exception): status_code = 400 def __init__(self, message, payload=None): Exception.__init__(self) self.message = m...
from flask import Flask from flask import request from flask import jsonify from y_text_recommender_system.recommender import recommend app = Flask(__name__) class InvalidUsage(Exception): status_code = 400 def __init__(self, message, payload=None): Exception.__init__(self) self.message = m...
<commit_before>from flask import Flask from flask import request from flask import jsonify from y_text_recommender_system.recommender import recommend app = Flask(__name__) class InvalidUsage(Exception): status_code = 400 def __init__(self, message, payload=None): Exception.__init__(self) s...
89fd94bb06e81f38b40bd75d793107599a1b7c48
freedomain.py
freedomain.py
from flask import Flask app = Flask(__name__) @app.route('/') def start(count): return 'SETUP APP' if __name__ == '__main__': app.run(host="172.31.27.41", port=8080)
from flask import Flask import time app = Flask(__name__) alphabet = 'abcdefghijklmnopqrstuwxyz' number = '1234567890' def numbering_system(): base_system = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' result = {} for csc_n in base_system: result[csc_n] = base_system.find(csc_n) return result ns ...
Add base methods for generation dictionary
Add base methods for generation dictionary
Python
mit
cludtk/freedomain,cludtk/freedomain
from flask import Flask app = Flask(__name__) @app.route('/') def start(count): return 'SETUP APP' if __name__ == '__main__': app.run(host="172.31.27.41", port=8080)Add base methods for generation dictionary
from flask import Flask import time app = Flask(__name__) alphabet = 'abcdefghijklmnopqrstuwxyz' number = '1234567890' def numbering_system(): base_system = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' result = {} for csc_n in base_system: result[csc_n] = base_system.find(csc_n) return result ns ...
<commit_before>from flask import Flask app = Flask(__name__) @app.route('/') def start(count): return 'SETUP APP' if __name__ == '__main__': app.run(host="172.31.27.41", port=8080)<commit_msg>Add base methods for generation dictionary<commit_after>
from flask import Flask import time app = Flask(__name__) alphabet = 'abcdefghijklmnopqrstuwxyz' number = '1234567890' def numbering_system(): base_system = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' result = {} for csc_n in base_system: result[csc_n] = base_system.find(csc_n) return result ns ...
from flask import Flask app = Flask(__name__) @app.route('/') def start(count): return 'SETUP APP' if __name__ == '__main__': app.run(host="172.31.27.41", port=8080)Add base methods for generation dictionaryfrom flask import Flask import time app = Flask(__name__) alphabet = 'abcdefghijklmnopqrstuwxyz' n...
<commit_before>from flask import Flask app = Flask(__name__) @app.route('/') def start(count): return 'SETUP APP' if __name__ == '__main__': app.run(host="172.31.27.41", port=8080)<commit_msg>Add base methods for generation dictionary<commit_after>from flask import Flask import time app = Flask(__name__) ...
1f4ee4e9d978322938579abc4c6723fdc783937d
build.py
build.py
#!/usr/bin/env python import os import subprocess import sys def build(pkgpath): os.chdir(pkgpath) targets = [ 'build', 'package', 'install', 'clean', 'clean-depends', ] for target in targets: p = subprocess.Popen( ['bmake', target], ...
#!/usr/bin/env python from __future__ import print_function import os import subprocess import sys def build(pkgpath): os.chdir(pkgpath) targets = [ 'build', 'package', 'install', 'clean', 'clean-depends', ] for target in targets: p = subprocess.Popen(...
Use the Python 3 print function.
Use the Python 3 print function.
Python
isc
eliteraspberries/minipkg,eliteraspberries/minipkg
#!/usr/bin/env python import os import subprocess import sys def build(pkgpath): os.chdir(pkgpath) targets = [ 'build', 'package', 'install', 'clean', 'clean-depends', ] for target in targets: p = subprocess.Popen( ['bmake', target], ...
#!/usr/bin/env python from __future__ import print_function import os import subprocess import sys def build(pkgpath): os.chdir(pkgpath) targets = [ 'build', 'package', 'install', 'clean', 'clean-depends', ] for target in targets: p = subprocess.Popen(...
<commit_before>#!/usr/bin/env python import os import subprocess import sys def build(pkgpath): os.chdir(pkgpath) targets = [ 'build', 'package', 'install', 'clean', 'clean-depends', ] for target in targets: p = subprocess.Popen( ['bmake', t...
#!/usr/bin/env python from __future__ import print_function import os import subprocess import sys def build(pkgpath): os.chdir(pkgpath) targets = [ 'build', 'package', 'install', 'clean', 'clean-depends', ] for target in targets: p = subprocess.Popen(...
#!/usr/bin/env python import os import subprocess import sys def build(pkgpath): os.chdir(pkgpath) targets = [ 'build', 'package', 'install', 'clean', 'clean-depends', ] for target in targets: p = subprocess.Popen( ['bmake', target], ...
<commit_before>#!/usr/bin/env python import os import subprocess import sys def build(pkgpath): os.chdir(pkgpath) targets = [ 'build', 'package', 'install', 'clean', 'clean-depends', ] for target in targets: p = subprocess.Popen( ['bmake', t...
c12cbae226f42405a998b93c6fd7049aadc6a19c
build.py
build.py
import os import string if __name__ == '__main__': patch_file = 'example.patch' base_name, _ = os.path.splitext(patch_file) values = { 'name': 'kpatch-module-{}'.format(base_name), 'patch_file': patch_file, 'kmod_filename': 'kpatch-{}.ko'.format(base_name), 'description': '...
import os import string def generate_rpm_spec(template, patch_file): spec_template = string.Template(template) base_name, _ = os.path.splitext(patch_file) values = { 'name': 'kpatch-module-{}'.format(base_name), 'patch_file': patch_file, 'kmod_filename': 'kpatch-{}.ko'.format(base...
Split spec generation into function
Split spec generation into function
Python
mit
centos-livepatching/kpatch-package-builder
import os import string if __name__ == '__main__': patch_file = 'example.patch' base_name, _ = os.path.splitext(patch_file) values = { 'name': 'kpatch-module-{}'.format(base_name), 'patch_file': patch_file, 'kmod_filename': 'kpatch-{}.ko'.format(base_name), 'description': '...
import os import string def generate_rpm_spec(template, patch_file): spec_template = string.Template(template) base_name, _ = os.path.splitext(patch_file) values = { 'name': 'kpatch-module-{}'.format(base_name), 'patch_file': patch_file, 'kmod_filename': 'kpatch-{}.ko'.format(base...
<commit_before>import os import string if __name__ == '__main__': patch_file = 'example.patch' base_name, _ = os.path.splitext(patch_file) values = { 'name': 'kpatch-module-{}'.format(base_name), 'patch_file': patch_file, 'kmod_filename': 'kpatch-{}.ko'.format(base_name), '...
import os import string def generate_rpm_spec(template, patch_file): spec_template = string.Template(template) base_name, _ = os.path.splitext(patch_file) values = { 'name': 'kpatch-module-{}'.format(base_name), 'patch_file': patch_file, 'kmod_filename': 'kpatch-{}.ko'.format(base...
import os import string if __name__ == '__main__': patch_file = 'example.patch' base_name, _ = os.path.splitext(patch_file) values = { 'name': 'kpatch-module-{}'.format(base_name), 'patch_file': patch_file, 'kmod_filename': 'kpatch-{}.ko'.format(base_name), 'description': '...
<commit_before>import os import string if __name__ == '__main__': patch_file = 'example.patch' base_name, _ = os.path.splitext(patch_file) values = { 'name': 'kpatch-module-{}'.format(base_name), 'patch_file': patch_file, 'kmod_filename': 'kpatch-{}.ko'.format(base_name), '...
916a02a609af6dc125b0a82215adb94858f4d597
yutu.py
yutu.py
import discord from discord.ext.commands import Bot import json client = Bot("~", game=discord.Game(name="~help")) @client.event async def on_ready(): print('We have logged in as {0.user}'.format(client)) @client.command() async def highfive(ctx): ''' Give Yutu a high-five ''' await ctx.send('{0....
import discord from discord.ext.commands import Bot import json client = Bot("~", game=discord.Game(name="~help")) @client.event async def on_ready(): print('We have logged in as {0.user}'.format(client)) @client.command() async def highfive(ctx): ''' Give Yutu a high-five ''' await ctx.send('{0....
Add help text for cute
Add help text for cute
Python
mit
HarkonenBade/yutu
import discord from discord.ext.commands import Bot import json client = Bot("~", game=discord.Game(name="~help")) @client.event async def on_ready(): print('We have logged in as {0.user}'.format(client)) @client.command() async def highfive(ctx): ''' Give Yutu a high-five ''' await ctx.send('{0....
import discord from discord.ext.commands import Bot import json client = Bot("~", game=discord.Game(name="~help")) @client.event async def on_ready(): print('We have logged in as {0.user}'.format(client)) @client.command() async def highfive(ctx): ''' Give Yutu a high-five ''' await ctx.send('{0....
<commit_before>import discord from discord.ext.commands import Bot import json client = Bot("~", game=discord.Game(name="~help")) @client.event async def on_ready(): print('We have logged in as {0.user}'.format(client)) @client.command() async def highfive(ctx): ''' Give Yutu a high-five ''' awai...
import discord from discord.ext.commands import Bot import json client = Bot("~", game=discord.Game(name="~help")) @client.event async def on_ready(): print('We have logged in as {0.user}'.format(client)) @client.command() async def highfive(ctx): ''' Give Yutu a high-five ''' await ctx.send('{0....
import discord from discord.ext.commands import Bot import json client = Bot("~", game=discord.Game(name="~help")) @client.event async def on_ready(): print('We have logged in as {0.user}'.format(client)) @client.command() async def highfive(ctx): ''' Give Yutu a high-five ''' await ctx.send('{0....
<commit_before>import discord from discord.ext.commands import Bot import json client = Bot("~", game=discord.Game(name="~help")) @client.event async def on_ready(): print('We have logged in as {0.user}'.format(client)) @client.command() async def highfive(ctx): ''' Give Yutu a high-five ''' awai...
e35767544e7c6b4461e511eaad42c047abcbe911
openprocurement/tender/esco/utils.py
openprocurement/tender/esco/utils.py
# -*- coding: utf-8 -*- from openprocurement.api.utils import get_now def request_get_now(request): return get_now()
# -*- coding: utf-8 -*- from decimal import Decimal from openprocurement.api.utils import get_now def request_get_now(request): return get_now() def to_decimal(fraction): return Decimal(fraction.numerator) / Decimal(fraction.denominator)
Add function to convert fraction to decimal
Add function to convert fraction to decimal
Python
apache-2.0
openprocurement/openprocurement.tender.esco
# -*- coding: utf-8 -*- from openprocurement.api.utils import get_now def request_get_now(request): return get_now() Add function to convert fraction to decimal
# -*- coding: utf-8 -*- from decimal import Decimal from openprocurement.api.utils import get_now def request_get_now(request): return get_now() def to_decimal(fraction): return Decimal(fraction.numerator) / Decimal(fraction.denominator)
<commit_before># -*- coding: utf-8 -*- from openprocurement.api.utils import get_now def request_get_now(request): return get_now() <commit_msg>Add function to convert fraction to decimal<commit_after>
# -*- coding: utf-8 -*- from decimal import Decimal from openprocurement.api.utils import get_now def request_get_now(request): return get_now() def to_decimal(fraction): return Decimal(fraction.numerator) / Decimal(fraction.denominator)
# -*- coding: utf-8 -*- from openprocurement.api.utils import get_now def request_get_now(request): return get_now() Add function to convert fraction to decimal# -*- coding: utf-8 -*- from decimal import Decimal from openprocurement.api.utils import get_now def request_get_now(request): return get_now() de...
<commit_before># -*- coding: utf-8 -*- from openprocurement.api.utils import get_now def request_get_now(request): return get_now() <commit_msg>Add function to convert fraction to decimal<commit_after># -*- coding: utf-8 -*- from decimal import Decimal from openprocurement.api.utils import get_now def request_g...
aeac11d889695f17aab3b972b64101eaefd322f2
fuzzycount.py
fuzzycount.py
from django.conf import settings from django.db import connections from django.db.models.query import QuerySet from model_utils.managers import PassThroughManager class FuzzyCountQuerySet(QuerySet): def count(self): is_postgresql = settings.DATABASES[self.db]["ENGINE"].endswith(("postgis", "postgresql"...
from django.conf import settings from django.db import connections from django.db.models.query import QuerySet from model_utils.managers import PassThroughManager class FuzzyCountQuerySet(QuerySet): def count(self): postgres_engines = ("postgis", "postgresql", "django_postgrespool") engine = se...
Fix engine check and added check for django_postgrespool.
Fix engine check and added check for django_postgrespool.
Python
bsd-2-clause
stephenmcd/django-postgres-fuzzycount
from django.conf import settings from django.db import connections from django.db.models.query import QuerySet from model_utils.managers import PassThroughManager class FuzzyCountQuerySet(QuerySet): def count(self): is_postgresql = settings.DATABASES[self.db]["ENGINE"].endswith(("postgis", "postgresql"...
from django.conf import settings from django.db import connections from django.db.models.query import QuerySet from model_utils.managers import PassThroughManager class FuzzyCountQuerySet(QuerySet): def count(self): postgres_engines = ("postgis", "postgresql", "django_postgrespool") engine = se...
<commit_before> from django.conf import settings from django.db import connections from django.db.models.query import QuerySet from model_utils.managers import PassThroughManager class FuzzyCountQuerySet(QuerySet): def count(self): is_postgresql = settings.DATABASES[self.db]["ENGINE"].endswith(("postgis...
from django.conf import settings from django.db import connections from django.db.models.query import QuerySet from model_utils.managers import PassThroughManager class FuzzyCountQuerySet(QuerySet): def count(self): postgres_engines = ("postgis", "postgresql", "django_postgrespool") engine = se...
from django.conf import settings from django.db import connections from django.db.models.query import QuerySet from model_utils.managers import PassThroughManager class FuzzyCountQuerySet(QuerySet): def count(self): is_postgresql = settings.DATABASES[self.db]["ENGINE"].endswith(("postgis", "postgresql"...
<commit_before> from django.conf import settings from django.db import connections from django.db.models.query import QuerySet from model_utils.managers import PassThroughManager class FuzzyCountQuerySet(QuerySet): def count(self): is_postgresql = settings.DATABASES[self.db]["ENGINE"].endswith(("postgis...
acce959e4885a52ba4a80beaed41a56aac63844e
tests/opwen_email_server/api/test_client_read.py
tests/opwen_email_server/api/test_client_read.py
from contextlib import contextmanager from os import environ from unittest import TestCase class DownloadTests(TestCase): def test_denies_unknown_client(self): with self._given_clients('{"client1": "id1"}') as download: message, status = download('unknown_client') self.assertEqual(...
from contextlib import contextmanager from unittest import TestCase from opwen_email_server.api import client_read from opwen_email_server.services.auth import EnvironmentAuth class DownloadTests(TestCase): def test_denies_unknown_client(self): with self.given_clients({'client1': 'id1'}): mes...
Remove need to set environment variables in test
Remove need to set environment variables in test
Python
apache-2.0
ascoderu/opwen-cloudserver,ascoderu/opwen-cloudserver
from contextlib import contextmanager from os import environ from unittest import TestCase class DownloadTests(TestCase): def test_denies_unknown_client(self): with self._given_clients('{"client1": "id1"}') as download: message, status = download('unknown_client') self.assertEqual(...
from contextlib import contextmanager from unittest import TestCase from opwen_email_server.api import client_read from opwen_email_server.services.auth import EnvironmentAuth class DownloadTests(TestCase): def test_denies_unknown_client(self): with self.given_clients({'client1': 'id1'}): mes...
<commit_before>from contextlib import contextmanager from os import environ from unittest import TestCase class DownloadTests(TestCase): def test_denies_unknown_client(self): with self._given_clients('{"client1": "id1"}') as download: message, status = download('unknown_client') se...
from contextlib import contextmanager from unittest import TestCase from opwen_email_server.api import client_read from opwen_email_server.services.auth import EnvironmentAuth class DownloadTests(TestCase): def test_denies_unknown_client(self): with self.given_clients({'client1': 'id1'}): mes...
from contextlib import contextmanager from os import environ from unittest import TestCase class DownloadTests(TestCase): def test_denies_unknown_client(self): with self._given_clients('{"client1": "id1"}') as download: message, status = download('unknown_client') self.assertEqual(...
<commit_before>from contextlib import contextmanager from os import environ from unittest import TestCase class DownloadTests(TestCase): def test_denies_unknown_client(self): with self._given_clients('{"client1": "id1"}') as download: message, status = download('unknown_client') se...
bfc7e08ba70ba0e3acb9e4cc69b70c816845b6cb
djofx/views/home.py
djofx/views/home.py
from django.db.models import Sum from django.views.generic import TemplateView from djofx.forms import OFXForm from djofx.views.base import PageTitleMixin, UserRequiredMixin from djofx import models class HomePageView(PageTitleMixin, UserRequiredMixin, TemplateView): template_name = "djofx/home.html" ...
from datetime import date, timedelta from django.db.models import Sum from django.views.generic import TemplateView from djofx.forms import OFXForm from djofx.views.base import PageTitleMixin, UserRequiredMixin from djofx import models from operator import itemgetter class HomePageView(PageTitleMixin, UserRe...
Include uncategorised spending in overview pie chart
Include uncategorised spending in overview pie chart Also, only show last 120 days
Python
mit
dominicrodger/djofx,dominicrodger/djofx,dominicrodger/djofx
from django.db.models import Sum from django.views.generic import TemplateView from djofx.forms import OFXForm from djofx.views.base import PageTitleMixin, UserRequiredMixin from djofx import models class HomePageView(PageTitleMixin, UserRequiredMixin, TemplateView): template_name = "djofx/home.html" ...
from datetime import date, timedelta from django.db.models import Sum from django.views.generic import TemplateView from djofx.forms import OFXForm from djofx.views.base import PageTitleMixin, UserRequiredMixin from djofx import models from operator import itemgetter class HomePageView(PageTitleMixin, UserRe...
<commit_before>from django.db.models import Sum from django.views.generic import TemplateView from djofx.forms import OFXForm from djofx.views.base import PageTitleMixin, UserRequiredMixin from djofx import models class HomePageView(PageTitleMixin, UserRequiredMixin, TemplateView): template_name = "djofx/...
from datetime import date, timedelta from django.db.models import Sum from django.views.generic import TemplateView from djofx.forms import OFXForm from djofx.views.base import PageTitleMixin, UserRequiredMixin from djofx import models from operator import itemgetter class HomePageView(PageTitleMixin, UserRe...
from django.db.models import Sum from django.views.generic import TemplateView from djofx.forms import OFXForm from djofx.views.base import PageTitleMixin, UserRequiredMixin from djofx import models class HomePageView(PageTitleMixin, UserRequiredMixin, TemplateView): template_name = "djofx/home.html" ...
<commit_before>from django.db.models import Sum from django.views.generic import TemplateView from djofx.forms import OFXForm from djofx.views.base import PageTitleMixin, UserRequiredMixin from djofx import models class HomePageView(PageTitleMixin, UserRequiredMixin, TemplateView): template_name = "djofx/...
d0ce6af2bb893904e8a3e36dd725707bd6d9f201
indico/modules/attachments/tasks.py
indico/modules/attachments/tasks.py
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from indico.core.celery import celery from indico.core.db import db from indico.modules.attachments.models...
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import os from indico.core.celery import celery from indico.core.db import db from indico.modules.attachm...
Delete material package temp file after creation
Delete material package temp file after creation
Python
mit
ThiefMaster/indico,ThiefMaster/indico,DirkHoffmann/indico,pferreir/indico,indico/indico,pferreir/indico,indico/indico,indico/indico,pferreir/indico,pferreir/indico,DirkHoffmann/indico,DirkHoffmann/indico,ThiefMaster/indico,DirkHoffmann/indico,indico/indico,ThiefMaster/indico
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from indico.core.celery import celery from indico.core.db import db from indico.modules.attachments.models...
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import os from indico.core.celery import celery from indico.core.db import db from indico.modules.attachm...
<commit_before># This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from indico.core.celery import celery from indico.core.db import db from indico.modules.att...
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import os from indico.core.celery import celery from indico.core.db import db from indico.modules.attachm...
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from indico.core.celery import celery from indico.core.db import db from indico.modules.attachments.models...
<commit_before># This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from indico.core.celery import celery from indico.core.db import db from indico.modules.att...
d3751ef64869ad37f8802eca933e0995773175a8
16/016_power_digit_sum.py
16/016_power_digit_sum.py
"""Power Digit Sum 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? """ assert sum(int(x) for x in str(2 ** 1000)) == 1366
"""Power Digit Sum 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? """ assert sum(int(x) for x in str(2 ** 1000)) == 1366
Remove redundant empty line at end of file
Remove redundant empty line at end of file There is no need to have multiple empty lines in the end.
Python
mit
the-gigi/project-euler,the-gigi/project-euler,the-gigi/project-euler
"""Power Digit Sum 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? """ assert sum(int(x) for x in str(2 ** 1000)) == 1366 Remove redundant empty line at end of file There is no need to have multiple empty lines in the end.
"""Power Digit Sum 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? """ assert sum(int(x) for x in str(2 ** 1000)) == 1366
<commit_before>"""Power Digit Sum 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? """ assert sum(int(x) for x in str(2 ** 1000)) == 1366 <commit_msg>Remove redundant empty line at end of file There is no need to have multiple empty lines in the end...
"""Power Digit Sum 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? """ assert sum(int(x) for x in str(2 ** 1000)) == 1366
"""Power Digit Sum 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? """ assert sum(int(x) for x in str(2 ** 1000)) == 1366 Remove redundant empty line at end of file There is no need to have multiple empty lines in the end."""Power Digit Sum 2^15 =...
<commit_before>"""Power Digit Sum 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? """ assert sum(int(x) for x in str(2 ** 1000)) == 1366 <commit_msg>Remove redundant empty line at end of file There is no need to have multiple empty lines in the end...
b0e3e93c3af70e42edf110e09039815575195c00
packages/dependencies/spirv_tools.py
packages/dependencies/spirv_tools.py
{ 'repo_type' : 'git', 'rename_folder' : 'spirv-tools', 'url' : 'https://github.com/KhronosGroup/SPIRV-Tools.git', 'branch' : 'aa270e568a3fd637f4a329611107b384a8023195', 'needs_make' : False, 'needs_make_install' : False, 'needs_configure' : False, 'recursive_git' : True, '_info' : { 'version' : None, 'fancy_n...
{ 'repo_type' : 'git', 'rename_folder' : 'spirv-tools', 'url' : 'https://github.com/KhronosGroup/SPIRV-Tools.git', 'needs_make' : False, 'needs_make_install' : False, 'needs_configure' : False, 'recursive_git' : True, '_info' : { 'version' : None, 'fancy_name' : 'SPIRV Tools' }, }
Revert "packages/spirvtools: stick to last working commit"
Revert "packages/spirvtools: stick to last working commit" This reverts commit cbaac43c95226b4ca5c9c1478467069966e9ef35.
Python
mpl-2.0
DeadSix27/python_cross_compile_script
{ 'repo_type' : 'git', 'rename_folder' : 'spirv-tools', 'url' : 'https://github.com/KhronosGroup/SPIRV-Tools.git', 'branch' : 'aa270e568a3fd637f4a329611107b384a8023195', 'needs_make' : False, 'needs_make_install' : False, 'needs_configure' : False, 'recursive_git' : True, '_info' : { 'version' : None, 'fancy_n...
{ 'repo_type' : 'git', 'rename_folder' : 'spirv-tools', 'url' : 'https://github.com/KhronosGroup/SPIRV-Tools.git', 'needs_make' : False, 'needs_make_install' : False, 'needs_configure' : False, 'recursive_git' : True, '_info' : { 'version' : None, 'fancy_name' : 'SPIRV Tools' }, }
<commit_before>{ 'repo_type' : 'git', 'rename_folder' : 'spirv-tools', 'url' : 'https://github.com/KhronosGroup/SPIRV-Tools.git', 'branch' : 'aa270e568a3fd637f4a329611107b384a8023195', 'needs_make' : False, 'needs_make_install' : False, 'needs_configure' : False, 'recursive_git' : True, '_info' : { 'version' :...
{ 'repo_type' : 'git', 'rename_folder' : 'spirv-tools', 'url' : 'https://github.com/KhronosGroup/SPIRV-Tools.git', 'needs_make' : False, 'needs_make_install' : False, 'needs_configure' : False, 'recursive_git' : True, '_info' : { 'version' : None, 'fancy_name' : 'SPIRV Tools' }, }
{ 'repo_type' : 'git', 'rename_folder' : 'spirv-tools', 'url' : 'https://github.com/KhronosGroup/SPIRV-Tools.git', 'branch' : 'aa270e568a3fd637f4a329611107b384a8023195', 'needs_make' : False, 'needs_make_install' : False, 'needs_configure' : False, 'recursive_git' : True, '_info' : { 'version' : None, 'fancy_n...
<commit_before>{ 'repo_type' : 'git', 'rename_folder' : 'spirv-tools', 'url' : 'https://github.com/KhronosGroup/SPIRV-Tools.git', 'branch' : 'aa270e568a3fd637f4a329611107b384a8023195', 'needs_make' : False, 'needs_make_install' : False, 'needs_configure' : False, 'recursive_git' : True, '_info' : { 'version' :...
12914961c0c2851dd720e84ff811389b1cd936dd
wsgi.py
wsgi.py
""" WSGI script run on Heroku using gunicorn. Exposes the app and configures it to use Heroku environment vars. """ import os from suddendev import create_app, socketio app = create_app() if __name__ == '__main__': app.run()
""" WSGI script run on Heroku using gunicorn. Exposes the app and configures it to use Heroku environment vars. """ import os from suddendev import create_app, socketio app = create_app() if __name__ == '__main__': socketio.run(app)
Change to socketio.run() so WebSockets work on local runs.
[NG] Change to socketio.run() so WebSockets work on local runs.
Python
mit
SuddenDevs/SuddenDev,SuddenDevs/SuddenDev,SuddenDevs/SuddenDev,SuddenDevs/SuddenDev
""" WSGI script run on Heroku using gunicorn. Exposes the app and configures it to use Heroku environment vars. """ import os from suddendev import create_app, socketio app = create_app() if __name__ == '__main__': app.run() [NG] Change to socketio.run() so WebSockets work on local runs.
""" WSGI script run on Heroku using gunicorn. Exposes the app and configures it to use Heroku environment vars. """ import os from suddendev import create_app, socketio app = create_app() if __name__ == '__main__': socketio.run(app)
<commit_before>""" WSGI script run on Heroku using gunicorn. Exposes the app and configures it to use Heroku environment vars. """ import os from suddendev import create_app, socketio app = create_app() if __name__ == '__main__': app.run() <commit_msg>[NG] Change to socketio.run() so WebSockets work on local runs...
""" WSGI script run on Heroku using gunicorn. Exposes the app and configures it to use Heroku environment vars. """ import os from suddendev import create_app, socketio app = create_app() if __name__ == '__main__': socketio.run(app)
""" WSGI script run on Heroku using gunicorn. Exposes the app and configures it to use Heroku environment vars. """ import os from suddendev import create_app, socketio app = create_app() if __name__ == '__main__': app.run() [NG] Change to socketio.run() so WebSockets work on local runs.""" WSGI script run on Her...
<commit_before>""" WSGI script run on Heroku using gunicorn. Exposes the app and configures it to use Heroku environment vars. """ import os from suddendev import create_app, socketio app = create_app() if __name__ == '__main__': app.run() <commit_msg>[NG] Change to socketio.run() so WebSockets work on local runs...
e050864d333e4b332a21671cb5f08f2ffd9172fe
pipeline/archivebot/shared_config.py
pipeline/archivebot/shared_config.py
import os import yaml def config(): my_dir = os.path.dirname(__file__) config_file = os.path.join(my_dir, '../../lib/shared_config.yml') with open(config_file, 'r') as f: return yaml.load(f.read()) def log_channel(): c = config() return c['channels']['log'] def pipeline_channel(): c...
import os import yaml try: from yaml import CLoader as Loader except ImportError: from yaml import Loader def config(): my_dir = os.path.dirname(__file__) config_file = os.path.join(my_dir, '../../lib/shared_config.yml') with open(config_file, 'r') as f: return yaml.load(f.read(), Loader = Loade...
Fix compatibility with PyYAML 6.0 (mandatory `Loader`)
Fix compatibility with PyYAML 6.0 (mandatory `Loader`)
Python
mit
ArchiveTeam/ArchiveBot,ArchiveTeam/ArchiveBot,ArchiveTeam/ArchiveBot,ArchiveTeam/ArchiveBot,ArchiveTeam/ArchiveBot
import os import yaml def config(): my_dir = os.path.dirname(__file__) config_file = os.path.join(my_dir, '../../lib/shared_config.yml') with open(config_file, 'r') as f: return yaml.load(f.read()) def log_channel(): c = config() return c['channels']['log'] def pipeline_channel(): c...
import os import yaml try: from yaml import CLoader as Loader except ImportError: from yaml import Loader def config(): my_dir = os.path.dirname(__file__) config_file = os.path.join(my_dir, '../../lib/shared_config.yml') with open(config_file, 'r') as f: return yaml.load(f.read(), Loader = Loade...
<commit_before>import os import yaml def config(): my_dir = os.path.dirname(__file__) config_file = os.path.join(my_dir, '../../lib/shared_config.yml') with open(config_file, 'r') as f: return yaml.load(f.read()) def log_channel(): c = config() return c['channels']['log'] def pipeline_c...
import os import yaml try: from yaml import CLoader as Loader except ImportError: from yaml import Loader def config(): my_dir = os.path.dirname(__file__) config_file = os.path.join(my_dir, '../../lib/shared_config.yml') with open(config_file, 'r') as f: return yaml.load(f.read(), Loader = Loade...
import os import yaml def config(): my_dir = os.path.dirname(__file__) config_file = os.path.join(my_dir, '../../lib/shared_config.yml') with open(config_file, 'r') as f: return yaml.load(f.read()) def log_channel(): c = config() return c['channels']['log'] def pipeline_channel(): c...
<commit_before>import os import yaml def config(): my_dir = os.path.dirname(__file__) config_file = os.path.join(my_dir, '../../lib/shared_config.yml') with open(config_file, 'r') as f: return yaml.load(f.read()) def log_channel(): c = config() return c['channels']['log'] def pipeline_c...
bb3d2927437a51d8144ec398085876bc3dedb5f6
project_generator/commands/clean.py
project_generator/commands/clean.py
# Copyright 2014-2015 0xc0170 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
# Copyright 2014-2015 0xc0170 # # 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,...
Clean command - tool help fix
Clean command - tool help fix
Python
apache-2.0
sarahmarshy/project_generator,ohagendorf/project_generator,0xc0170/project_generator,project-generator/project_generator
# Copyright 2014-2015 0xc0170 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
# Copyright 2014-2015 0xc0170 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
<commit_before># Copyright 2014-2015 0xc0170 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
# Copyright 2014-2015 0xc0170 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
# Copyright 2014-2015 0xc0170 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
<commit_before># Copyright 2014-2015 0xc0170 # # 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...
d198b8d92ec42f8e5fc995f59c8776044b8950e8
analysis/data_process/uk_2017/config.py
analysis/data_process/uk_2017/config.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Config file for the cleaning - plotting and notebook process""" class CleaningConfig: # Unprocessed dataset raw_data = './dataset/raw_results-survey245554.csv' # load the different answers to questions to classify questions based on that question_fil...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Config file for the cleaning - plotting and notebook process""" class CleaningConfig: # Unprocessed dataset raw_data = './dataset/raw_results-survey245554.csv' # load the different answers to questions to classify questions based on that question_fil...
Add the option for showing percent rather than count in plots
Add the option for showing percent rather than count in plots
Python
bsd-3-clause
softwaresaved/international-survey
#!/usr/bin/env python # -*- coding: utf-8 -*- """Config file for the cleaning - plotting and notebook process""" class CleaningConfig: # Unprocessed dataset raw_data = './dataset/raw_results-survey245554.csv' # load the different answers to questions to classify questions based on that question_fil...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Config file for the cleaning - plotting and notebook process""" class CleaningConfig: # Unprocessed dataset raw_data = './dataset/raw_results-survey245554.csv' # load the different answers to questions to classify questions based on that question_fil...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """Config file for the cleaning - plotting and notebook process""" class CleaningConfig: # Unprocessed dataset raw_data = './dataset/raw_results-survey245554.csv' # load the different answers to questions to classify questions based on that ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Config file for the cleaning - plotting and notebook process""" class CleaningConfig: # Unprocessed dataset raw_data = './dataset/raw_results-survey245554.csv' # load the different answers to questions to classify questions based on that question_fil...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Config file for the cleaning - plotting and notebook process""" class CleaningConfig: # Unprocessed dataset raw_data = './dataset/raw_results-survey245554.csv' # load the different answers to questions to classify questions based on that question_fil...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """Config file for the cleaning - plotting and notebook process""" class CleaningConfig: # Unprocessed dataset raw_data = './dataset/raw_results-survey245554.csv' # load the different answers to questions to classify questions based on that ...
2762599917362bc621e84a17ae922588ad4296ae
saleor/order/urls.py
saleor/order/urls.py
from django.conf.urls import patterns, url from . import views TOKEN_PATTERN = ('(?P<token>[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}' '-[0-9a-z]{12})') urlpatterns = patterns( '', url(r'^%s/$' % TOKEN_PATTERN, views.details, name='details'), url(r'^%s/payment/(?P<variant>[a-z-]+)/...
from django.conf.urls import patterns, url from . import views TOKEN_PATTERN = ('(?P<token>[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}' '-[0-9a-z]{12})') urlpatterns = patterns( '', url(r'^%s/$' % TOKEN_PATTERN, views.details, name='details'), url(r'^%s/payment/(?P<variant>[-\w]+)/$...
Add all words and "-" to payment url
Add all words and "-" to payment url
Python
bsd-3-clause
laosunhust/saleor,maferelo/saleor,HyperManTT/ECommerceSaleor,itbabu/saleor,HyperManTT/ECommerceSaleor,hongquan/saleor,KenMutemi/saleor,josesanch/saleor,rodrigozn/CW-Shop,Drekscott/Motlaesaleor,laosunhust/saleor,KenMutemi/saleor,KenMutemi/saleor,taedori81/saleor,paweltin/saleor,rchav/vinerack,avorio/saleor,itbabu/saleor...
from django.conf.urls import patterns, url from . import views TOKEN_PATTERN = ('(?P<token>[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}' '-[0-9a-z]{12})') urlpatterns = patterns( '', url(r'^%s/$' % TOKEN_PATTERN, views.details, name='details'), url(r'^%s/payment/(?P<variant>[a-z-]+)/...
from django.conf.urls import patterns, url from . import views TOKEN_PATTERN = ('(?P<token>[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}' '-[0-9a-z]{12})') urlpatterns = patterns( '', url(r'^%s/$' % TOKEN_PATTERN, views.details, name='details'), url(r'^%s/payment/(?P<variant>[-\w]+)/$...
<commit_before>from django.conf.urls import patterns, url from . import views TOKEN_PATTERN = ('(?P<token>[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}' '-[0-9a-z]{12})') urlpatterns = patterns( '', url(r'^%s/$' % TOKEN_PATTERN, views.details, name='details'), url(r'^%s/payment/(?P<va...
from django.conf.urls import patterns, url from . import views TOKEN_PATTERN = ('(?P<token>[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}' '-[0-9a-z]{12})') urlpatterns = patterns( '', url(r'^%s/$' % TOKEN_PATTERN, views.details, name='details'), url(r'^%s/payment/(?P<variant>[-\w]+)/$...
from django.conf.urls import patterns, url from . import views TOKEN_PATTERN = ('(?P<token>[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}' '-[0-9a-z]{12})') urlpatterns = patterns( '', url(r'^%s/$' % TOKEN_PATTERN, views.details, name='details'), url(r'^%s/payment/(?P<variant>[a-z-]+)/...
<commit_before>from django.conf.urls import patterns, url from . import views TOKEN_PATTERN = ('(?P<token>[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}' '-[0-9a-z]{12})') urlpatterns = patterns( '', url(r'^%s/$' % TOKEN_PATTERN, views.details, name='details'), url(r'^%s/payment/(?P<va...
da22196a8167a57c5edf39578ceece4efd8cfd63
app/views.py
app/views.py
from app import app from flask import make_response @app.route('/') @app.route('/index') def index(): return make_response(open(app.root_path + '/templates/index.html').read())
from flask import render_template from app import app @app.route('/') @app.route('/index') def index(): user = { 'nickname': 'Marvolo' } # fake user posts = [ # fake array of posts { 'author': { 'nickname': 'John' }, 'body': 'Beautiful day in Portland!' }, { ...
Set up mock data for index
Set up mock data for index
Python
apache-2.0
happyraul/tv
from app import app from flask import make_response @app.route('/') @app.route('/index') def index(): return make_response(open(app.root_path + '/templates/index.html').read())Set up mock data for index
from flask import render_template from app import app @app.route('/') @app.route('/index') def index(): user = { 'nickname': 'Marvolo' } # fake user posts = [ # fake array of posts { 'author': { 'nickname': 'John' }, 'body': 'Beautiful day in Portland!' }, { ...
<commit_before>from app import app from flask import make_response @app.route('/') @app.route('/index') def index(): return make_response(open(app.root_path + '/templates/index.html').read())<commit_msg>Set up mock data for index<commit_after>
from flask import render_template from app import app @app.route('/') @app.route('/index') def index(): user = { 'nickname': 'Marvolo' } # fake user posts = [ # fake array of posts { 'author': { 'nickname': 'John' }, 'body': 'Beautiful day in Portland!' }, { ...
from app import app from flask import make_response @app.route('/') @app.route('/index') def index(): return make_response(open(app.root_path + '/templates/index.html').read())Set up mock data for indexfrom flask import render_template from app import app @app.route('/') @app.route('/index') def index(): user...
<commit_before>from app import app from flask import make_response @app.route('/') @app.route('/index') def index(): return make_response(open(app.root_path + '/templates/index.html').read())<commit_msg>Set up mock data for index<commit_after>from flask import render_template from app import app @app.route('/') @...
158a2ffd17cf59a87092581dc0ce40cf0b82aa85
bigbuild/management/commands/publish.py
bigbuild/management/commands/publish.py
from django.conf import settings from bakery.management.commands.publish import Command as BaseCommand class Command(BaseCommand): def handle(self, *args, **options): # When in BIGBUILD_BRANCH_BUILD don't delete because we'll be syncing # a different subdirectory for each one of our git branches ...
from django.conf import settings from bakery.management.commands.publish import Command as BaseCommand class Command(BaseCommand): def handle(self, *args, **options): # When in BIGBUILD_BRANCH_BUILD don't delete because we'll be syncing # a different subdirectory for each one of our git branches ...
Make an attribute call a little smarter
Make an attribute call a little smarter
Python
mit
datadesk/django-bigbuild,datadesk/django-bigbuild,datadesk/django-bigbuild
from django.conf import settings from bakery.management.commands.publish import Command as BaseCommand class Command(BaseCommand): def handle(self, *args, **options): # When in BIGBUILD_BRANCH_BUILD don't delete because we'll be syncing # a different subdirectory for each one of our git branches ...
from django.conf import settings from bakery.management.commands.publish import Command as BaseCommand class Command(BaseCommand): def handle(self, *args, **options): # When in BIGBUILD_BRANCH_BUILD don't delete because we'll be syncing # a different subdirectory for each one of our git branches ...
<commit_before>from django.conf import settings from bakery.management.commands.publish import Command as BaseCommand class Command(BaseCommand): def handle(self, *args, **options): # When in BIGBUILD_BRANCH_BUILD don't delete because we'll be syncing # a different subdirectory for each one of ou...
from django.conf import settings from bakery.management.commands.publish import Command as BaseCommand class Command(BaseCommand): def handle(self, *args, **options): # When in BIGBUILD_BRANCH_BUILD don't delete because we'll be syncing # a different subdirectory for each one of our git branches ...
from django.conf import settings from bakery.management.commands.publish import Command as BaseCommand class Command(BaseCommand): def handle(self, *args, **options): # When in BIGBUILD_BRANCH_BUILD don't delete because we'll be syncing # a different subdirectory for each one of our git branches ...
<commit_before>from django.conf import settings from bakery.management.commands.publish import Command as BaseCommand class Command(BaseCommand): def handle(self, *args, **options): # When in BIGBUILD_BRANCH_BUILD don't delete because we'll be syncing # a different subdirectory for each one of ou...
939c5fd069fafbe353fc9a209d2bd376e8d9bbd6
gridded/gridded.py
gridded/gridded.py
class Gridded: _grid_obj_classes = [] _grids_loaded = False @classmethod def _load_grid_objs(cls): from pkg_resources import working_set for ep in working_set.iter_entry_points('gridded.grid_objects'): cls._grid_obj_classes.append(ep.load()) @classmethod def load(c...
class Gridded: _grid_obj_classes = [] _grids_loaded = False @classmethod def _load_grid_objs(cls): from pkg_resources import working_set for ep in working_set.iter_entry_points('gridded.grid_objects'): cls._grid_obj_classes.append(ep.load()) @classmethod def load(c...
Fix self- > cls, make super generic (no `nc`)
Fix self- > cls, make super generic (no `nc`)
Python
mit
pyoceans/gridded
class Gridded: _grid_obj_classes = [] _grids_loaded = False @classmethod def _load_grid_objs(cls): from pkg_resources import working_set for ep in working_set.iter_entry_points('gridded.grid_objects'): cls._grid_obj_classes.append(ep.load()) @classmethod def load(c...
class Gridded: _grid_obj_classes = [] _grids_loaded = False @classmethod def _load_grid_objs(cls): from pkg_resources import working_set for ep in working_set.iter_entry_points('gridded.grid_objects'): cls._grid_obj_classes.append(ep.load()) @classmethod def load(c...
<commit_before>class Gridded: _grid_obj_classes = [] _grids_loaded = False @classmethod def _load_grid_objs(cls): from pkg_resources import working_set for ep in working_set.iter_entry_points('gridded.grid_objects'): cls._grid_obj_classes.append(ep.load()) @classmethod...
class Gridded: _grid_obj_classes = [] _grids_loaded = False @classmethod def _load_grid_objs(cls): from pkg_resources import working_set for ep in working_set.iter_entry_points('gridded.grid_objects'): cls._grid_obj_classes.append(ep.load()) @classmethod def load(c...
class Gridded: _grid_obj_classes = [] _grids_loaded = False @classmethod def _load_grid_objs(cls): from pkg_resources import working_set for ep in working_set.iter_entry_points('gridded.grid_objects'): cls._grid_obj_classes.append(ep.load()) @classmethod def load(c...
<commit_before>class Gridded: _grid_obj_classes = [] _grids_loaded = False @classmethod def _load_grid_objs(cls): from pkg_resources import working_set for ep in working_set.iter_entry_points('gridded.grid_objects'): cls._grid_obj_classes.append(ep.load()) @classmethod...
d2adf86767857e9b57527c3db1d720b1f8f086a2
openedx/stanford/djangoapps/register_cme/admin.py
openedx/stanford/djangoapps/register_cme/admin.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models import ExtraInfo admin.site.register(ExtraInfo)
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models import ExtraInfo class ExtraInfoAdmin(admin.ModelAdmin): """ Admin interface for ExtraInfo model. """ readonly_fields = ( 'user', ) class Meta(object): model = Extr...
Make `user` field read-only in `ExtraInfo` detail
Make `user` field read-only in `ExtraInfo` detail Previously, server would hang trying to load an `ExtraInfo` detail page, because the `user` field was rendering as a dropdown select menu loading all users in the system. We fix this by making the field read-only.
Python
agpl-3.0
caesar2164/edx-platform,Stanford-Online/edx-platform,Stanford-Online/edx-platform,Stanford-Online/edx-platform,caesar2164/edx-platform,caesar2164/edx-platform,Stanford-Online/edx-platform,caesar2164/edx-platform
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models import ExtraInfo admin.site.register(ExtraInfo) Make `user` field read-only in `ExtraInfo` detail Previously, server would hang trying to load an `ExtraInfo` detail page, because the `user` field was render...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models import ExtraInfo class ExtraInfoAdmin(admin.ModelAdmin): """ Admin interface for ExtraInfo model. """ readonly_fields = ( 'user', ) class Meta(object): model = Extr...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models import ExtraInfo admin.site.register(ExtraInfo) <commit_msg>Make `user` field read-only in `ExtraInfo` detail Previously, server would hang trying to load an `ExtraInfo` detail page, because ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models import ExtraInfo class ExtraInfoAdmin(admin.ModelAdmin): """ Admin interface for ExtraInfo model. """ readonly_fields = ( 'user', ) class Meta(object): model = Extr...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models import ExtraInfo admin.site.register(ExtraInfo) Make `user` field read-only in `ExtraInfo` detail Previously, server would hang trying to load an `ExtraInfo` detail page, because the `user` field was render...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models import ExtraInfo admin.site.register(ExtraInfo) <commit_msg>Make `user` field read-only in `ExtraInfo` detail Previously, server would hang trying to load an `ExtraInfo` detail page, because ...
cf8621affe1e654bf5ec391d80f260cbce83445b
cli/cli.py
cli/cli.py
import argparse parser = argparse.ArgumentParser(prog='moocx', description='EdX MOOC Data Anaylysis') parser.add_argument('-v', '--version', action='version', version='0.1.0') subparsers = parser.add_subparsers(help='commands') # A list command list_parser = subparsers.add_parser('list', help='List commands') list_p...
import argparse import os parser = argparse.ArgumentParser(prog='moocx', description='EdX MOOC Data Anaylysis') parser.add_argument('-v', '--version', action='version', version='%(prog)s 0.1.0') subparsers = parser.add_subparsers(help='commands') # A list command list_parser = subparsers.add_parser('list', help='Lis...
Define more arguments for command line parser
Define more arguments for command line parser
Python
mit
McGillX/edx_data_research,McGillX/edx_data_research,McGillX/edx_data_research
import argparse parser = argparse.ArgumentParser(prog='moocx', description='EdX MOOC Data Anaylysis') parser.add_argument('-v', '--version', action='version', version='0.1.0') subparsers = parser.add_subparsers(help='commands') # A list command list_parser = subparsers.add_parser('list', help='List commands') list_p...
import argparse import os parser = argparse.ArgumentParser(prog='moocx', description='EdX MOOC Data Anaylysis') parser.add_argument('-v', '--version', action='version', version='%(prog)s 0.1.0') subparsers = parser.add_subparsers(help='commands') # A list command list_parser = subparsers.add_parser('list', help='Lis...
<commit_before>import argparse parser = argparse.ArgumentParser(prog='moocx', description='EdX MOOC Data Anaylysis') parser.add_argument('-v', '--version', action='version', version='0.1.0') subparsers = parser.add_subparsers(help='commands') # A list command list_parser = subparsers.add_parser('list', help='List co...
import argparse import os parser = argparse.ArgumentParser(prog='moocx', description='EdX MOOC Data Anaylysis') parser.add_argument('-v', '--version', action='version', version='%(prog)s 0.1.0') subparsers = parser.add_subparsers(help='commands') # A list command list_parser = subparsers.add_parser('list', help='Lis...
import argparse parser = argparse.ArgumentParser(prog='moocx', description='EdX MOOC Data Anaylysis') parser.add_argument('-v', '--version', action='version', version='0.1.0') subparsers = parser.add_subparsers(help='commands') # A list command list_parser = subparsers.add_parser('list', help='List commands') list_p...
<commit_before>import argparse parser = argparse.ArgumentParser(prog='moocx', description='EdX MOOC Data Anaylysis') parser.add_argument('-v', '--version', action='version', version='0.1.0') subparsers = parser.add_subparsers(help='commands') # A list command list_parser = subparsers.add_parser('list', help='List co...
749650a56347dad48bb2eabff139646ecf5c98d0
feedbot/__init__.py
feedbot/__init__.py
_author__ = 'Liav Koren' __email__ = '[email protected]' __version__ = '0.1.0rc1'
_author__ = 'Liav Koren' __email__ = '[email protected]' __version__ = '0.1.1'
Bump minor point version to 0.1.1
Bump minor point version to 0.1.1
Python
apache-2.0
liavkoren/feedbot
_author__ = 'Liav Koren' __email__ = '[email protected]' __version__ = '0.1.0rc1' Bump minor point version to 0.1.1
_author__ = 'Liav Koren' __email__ = '[email protected]' __version__ = '0.1.1'
<commit_before>_author__ = 'Liav Koren' __email__ = '[email protected]' __version__ = '0.1.0rc1' <commit_msg>Bump minor point version to 0.1.1<commit_after>
_author__ = 'Liav Koren' __email__ = '[email protected]' __version__ = '0.1.1'
_author__ = 'Liav Koren' __email__ = '[email protected]' __version__ = '0.1.0rc1' Bump minor point version to 0.1.1_author__ = 'Liav Koren' __email__ = '[email protected]' __version__ = '0.1.1'
<commit_before>_author__ = 'Liav Koren' __email__ = '[email protected]' __version__ = '0.1.0rc1' <commit_msg>Bump minor point version to 0.1.1<commit_after>_author__ = 'Liav Koren' __email__ = '[email protected]' __version__ = '0.1.1'
df1e5be22cd4c7cb95952c4419defeab0eb284a4
instance/config.py
instance/config.py
import os class Config(object): """Parent configuration class.""" DEBUG = False CSRF_ENABLED = True SECRET_KEY = os.getenv('SECRET_KEY') SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL') class DevelopmentConfig(Config): """Configurations for Development.""" DEBUG = True SQLALCHEMY_...
import os class Config(object): """Parent configuration class.""" DEBUG = False CSRF_ENABLED = True SECRET_KEY = os.getenv('SECRET_KEY') SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL') class DevelopmentConfig(Config): """Configurations for Development.""" DEBUG = True SQLALCHEMY_...
Revert test db to postgress
Revert test db to postgress
Python
mit
Alweezy/cp2-bucketlist-api,Alweezy/cp2-bucketlist-api,Alweezy/cp2-bucketlist-api
import os class Config(object): """Parent configuration class.""" DEBUG = False CSRF_ENABLED = True SECRET_KEY = os.getenv('SECRET_KEY') SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL') class DevelopmentConfig(Config): """Configurations for Development.""" DEBUG = True SQLALCHEMY_...
import os class Config(object): """Parent configuration class.""" DEBUG = False CSRF_ENABLED = True SECRET_KEY = os.getenv('SECRET_KEY') SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL') class DevelopmentConfig(Config): """Configurations for Development.""" DEBUG = True SQLALCHEMY_...
<commit_before>import os class Config(object): """Parent configuration class.""" DEBUG = False CSRF_ENABLED = True SECRET_KEY = os.getenv('SECRET_KEY') SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL') class DevelopmentConfig(Config): """Configurations for Development.""" DEBUG = True ...
import os class Config(object): """Parent configuration class.""" DEBUG = False CSRF_ENABLED = True SECRET_KEY = os.getenv('SECRET_KEY') SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL') class DevelopmentConfig(Config): """Configurations for Development.""" DEBUG = True SQLALCHEMY_...
import os class Config(object): """Parent configuration class.""" DEBUG = False CSRF_ENABLED = True SECRET_KEY = os.getenv('SECRET_KEY') SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL') class DevelopmentConfig(Config): """Configurations for Development.""" DEBUG = True SQLALCHEMY_...
<commit_before>import os class Config(object): """Parent configuration class.""" DEBUG = False CSRF_ENABLED = True SECRET_KEY = os.getenv('SECRET_KEY') SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL') class DevelopmentConfig(Config): """Configurations for Development.""" DEBUG = True ...
adfbd9b192316bc527259a1c0a01db0a8dbd5f3e
examples/rmg/liquid_phase/input.py
examples/rmg/liquid_phase/input.py
# Data sources database( thermoLibraries = ['primaryThermoLibrary'], reactionLibraries = [], seedMechanisms = [], kineticsDepositories = ['training'], kineticsFamilies = ['!Intra_Disproportionation','!Substitution_O'], kineticsEstimator = 'rate rules', ) # List of species species( label='oc...
# Data sources database( thermoLibraries = ['primaryThermoLibrary'], reactionLibraries = [], seedMechanisms = [], kineticsDepositories = ['training'], kineticsFamilies = ['!Intra_Disproportionation','!Substitution_O'], kineticsEstimator = 'rate rules', ) # List of species species( label='oc...
Change termination criteria for liquid phase examples to attainable value.
Change termination criteria for liquid phase examples to attainable value. Conversion of octane was stuck at 8e-3 for quite some time...
Python
mit
nyee/RMG-Py,faribas/RMG-Py,enochd/RMG-Py,faribas/RMG-Py,comocheng/RMG-Py,chatelak/RMG-Py,pierrelb/RMG-Py,pierrelb/RMG-Py,nickvandewiele/RMG-Py,chatelak/RMG-Py,enochd/RMG-Py,nyee/RMG-Py,KEHANG/RMG-Py,KEHANG/RMG-Py,nickvandewiele/RMG-Py,comocheng/RMG-Py
# Data sources database( thermoLibraries = ['primaryThermoLibrary'], reactionLibraries = [], seedMechanisms = [], kineticsDepositories = ['training'], kineticsFamilies = ['!Intra_Disproportionation','!Substitution_O'], kineticsEstimator = 'rate rules', ) # List of species species( label='oc...
# Data sources database( thermoLibraries = ['primaryThermoLibrary'], reactionLibraries = [], seedMechanisms = [], kineticsDepositories = ['training'], kineticsFamilies = ['!Intra_Disproportionation','!Substitution_O'], kineticsEstimator = 'rate rules', ) # List of species species( label='oc...
<commit_before># Data sources database( thermoLibraries = ['primaryThermoLibrary'], reactionLibraries = [], seedMechanisms = [], kineticsDepositories = ['training'], kineticsFamilies = ['!Intra_Disproportionation','!Substitution_O'], kineticsEstimator = 'rate rules', ) # List of species species...
# Data sources database( thermoLibraries = ['primaryThermoLibrary'], reactionLibraries = [], seedMechanisms = [], kineticsDepositories = ['training'], kineticsFamilies = ['!Intra_Disproportionation','!Substitution_O'], kineticsEstimator = 'rate rules', ) # List of species species( label='oc...
# Data sources database( thermoLibraries = ['primaryThermoLibrary'], reactionLibraries = [], seedMechanisms = [], kineticsDepositories = ['training'], kineticsFamilies = ['!Intra_Disproportionation','!Substitution_O'], kineticsEstimator = 'rate rules', ) # List of species species( label='oc...
<commit_before># Data sources database( thermoLibraries = ['primaryThermoLibrary'], reactionLibraries = [], seedMechanisms = [], kineticsDepositories = ['training'], kineticsFamilies = ['!Intra_Disproportionation','!Substitution_O'], kineticsEstimator = 'rate rules', ) # List of species species...
e4e38ecd09b4c96e5b801b1bc9f7a943934c6485
cobertura_clover_transform/converter.py
cobertura_clover_transform/converter.py
import lxml.etree as ET import argparse import pkg_resources def convert(inxml): dom = ET.parse(inxml) xslt = ET.parse(pkg_resources.resource_stream('cobertura_clover_transform', 'transform.xslt')) transform = ET.XSLT(xslt) newdom = transform(dom) ...
import lxml.etree as ET import argparse import pkg_resources def convert(inxml): dom = ET.parse(inxml) xslt = ET.parse(pkg_resources.resource_stream('cobertura_clover_transform', 'transform.xslt')) transform = ET.XSLT(xslt) newdom = transform(dom) ...
Add support for output to a file
Add support for output to a file
Python
mit
cwacek/cobertura-clover-transform
import lxml.etree as ET import argparse import pkg_resources def convert(inxml): dom = ET.parse(inxml) xslt = ET.parse(pkg_resources.resource_stream('cobertura_clover_transform', 'transform.xslt')) transform = ET.XSLT(xslt) newdom = transform(dom) ...
import lxml.etree as ET import argparse import pkg_resources def convert(inxml): dom = ET.parse(inxml) xslt = ET.parse(pkg_resources.resource_stream('cobertura_clover_transform', 'transform.xslt')) transform = ET.XSLT(xslt) newdom = transform(dom) ...
<commit_before>import lxml.etree as ET import argparse import pkg_resources def convert(inxml): dom = ET.parse(inxml) xslt = ET.parse(pkg_resources.resource_stream('cobertura_clover_transform', 'transform.xslt')) transform = ET.XSLT(xslt) newdom = tr...
import lxml.etree as ET import argparse import pkg_resources def convert(inxml): dom = ET.parse(inxml) xslt = ET.parse(pkg_resources.resource_stream('cobertura_clover_transform', 'transform.xslt')) transform = ET.XSLT(xslt) newdom = transform(dom) ...
import lxml.etree as ET import argparse import pkg_resources def convert(inxml): dom = ET.parse(inxml) xslt = ET.parse(pkg_resources.resource_stream('cobertura_clover_transform', 'transform.xslt')) transform = ET.XSLT(xslt) newdom = transform(dom) ...
<commit_before>import lxml.etree as ET import argparse import pkg_resources def convert(inxml): dom = ET.parse(inxml) xslt = ET.parse(pkg_resources.resource_stream('cobertura_clover_transform', 'transform.xslt')) transform = ET.XSLT(xslt) newdom = tr...
270e222301cf8c61e7632b366fba349552356928
services/__init__.py
services/__init__.py
#!/usr/bin/env python import os import glob __all__ = [ os.path.basename(f)[:-3] for f in glob.glob(os.path.dirname(__file__)+"/*.py")] class InvalidConfigException(Exception): pass class PluginMount(type): def __init__(cls, name, bases, attrs): if not hasattr(cls, 'plugins'): # This br...
#!/usr/bin/env python import os import glob __all__ = [ os.path.basename(f)[:-3] for f in glob.glob(os.path.dirname(__file__)+"/*.py")] class InvalidConfigException(Exception): pass class PluginMount(type): def __init__(cls, name, bases, attrs): if not hasattr(cls, 'plugins'): # This br...
Add get_plugin method to the plugin base.
Add get_plugin method to the plugin base.
Python
bsd-3-clause
vtcsec/wargame-scorer
#!/usr/bin/env python import os import glob __all__ = [ os.path.basename(f)[:-3] for f in glob.glob(os.path.dirname(__file__)+"/*.py")] class InvalidConfigException(Exception): pass class PluginMount(type): def __init__(cls, name, bases, attrs): if not hasattr(cls, 'plugins'): # This br...
#!/usr/bin/env python import os import glob __all__ = [ os.path.basename(f)[:-3] for f in glob.glob(os.path.dirname(__file__)+"/*.py")] class InvalidConfigException(Exception): pass class PluginMount(type): def __init__(cls, name, bases, attrs): if not hasattr(cls, 'plugins'): # This br...
<commit_before>#!/usr/bin/env python import os import glob __all__ = [ os.path.basename(f)[:-3] for f in glob.glob(os.path.dirname(__file__)+"/*.py")] class InvalidConfigException(Exception): pass class PluginMount(type): def __init__(cls, name, bases, attrs): if not hasattr(cls, 'plugins'): ...
#!/usr/bin/env python import os import glob __all__ = [ os.path.basename(f)[:-3] for f in glob.glob(os.path.dirname(__file__)+"/*.py")] class InvalidConfigException(Exception): pass class PluginMount(type): def __init__(cls, name, bases, attrs): if not hasattr(cls, 'plugins'): # This br...
#!/usr/bin/env python import os import glob __all__ = [ os.path.basename(f)[:-3] for f in glob.glob(os.path.dirname(__file__)+"/*.py")] class InvalidConfigException(Exception): pass class PluginMount(type): def __init__(cls, name, bases, attrs): if not hasattr(cls, 'plugins'): # This br...
<commit_before>#!/usr/bin/env python import os import glob __all__ = [ os.path.basename(f)[:-3] for f in glob.glob(os.path.dirname(__file__)+"/*.py")] class InvalidConfigException(Exception): pass class PluginMount(type): def __init__(cls, name, bases, attrs): if not hasattr(cls, 'plugins'): ...
3a3997b19966560b828efb1699ee29a58cacbfc8
spriteworld/configs/cobra/common.py
spriteworld/configs/cobra/common.py
# Copyright 2019 DeepMind Technologies Limited. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
# Copyright 2019 DeepMind Technologies Limited. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
Remove noise from default COBRA configs.
Remove noise from default COBRA configs. PiperOrigin-RevId: 265733849 Change-Id: Ie0e7c0385497852fd85c769ee85c951542c14463
Python
apache-2.0
deepmind/spriteworld
# Copyright 2019 DeepMind Technologies Limited. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
# Copyright 2019 DeepMind Technologies Limited. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
<commit_before># Copyright 2019 DeepMind Technologies Limited. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
# Copyright 2019 DeepMind Technologies Limited. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
# Copyright 2019 DeepMind Technologies Limited. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
<commit_before># Copyright 2019 DeepMind Technologies Limited. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
6adfd6ee8f673a601a3d118a45d21d2941b1e0aa
buildlet/utils/hashutils.py
buildlet/utils/hashutils.py
import hashlib def hexdigest(strings): m = hashlib.md5() for s in strings: m.update(s) return m.hexdigest()
import hashlib def hexdigest(strings): m = hashlib.md5() for s in strings: m.update(s.encode()) return m.hexdigest()
Fix TypeError in Python 3
Fix TypeError in Python 3
Python
bsd-3-clause
tkf/buildlet
import hashlib def hexdigest(strings): m = hashlib.md5() for s in strings: m.update(s) return m.hexdigest() Fix TypeError in Python 3
import hashlib def hexdigest(strings): m = hashlib.md5() for s in strings: m.update(s.encode()) return m.hexdigest()
<commit_before>import hashlib def hexdigest(strings): m = hashlib.md5() for s in strings: m.update(s) return m.hexdigest() <commit_msg>Fix TypeError in Python 3<commit_after>
import hashlib def hexdigest(strings): m = hashlib.md5() for s in strings: m.update(s.encode()) return m.hexdigest()
import hashlib def hexdigest(strings): m = hashlib.md5() for s in strings: m.update(s) return m.hexdigest() Fix TypeError in Python 3import hashlib def hexdigest(strings): m = hashlib.md5() for s in strings: m.update(s.encode()) return m.hexdigest()
<commit_before>import hashlib def hexdigest(strings): m = hashlib.md5() for s in strings: m.update(s) return m.hexdigest() <commit_msg>Fix TypeError in Python 3<commit_after>import hashlib def hexdigest(strings): m = hashlib.md5() for s in strings: m.update(s.encode()) return...