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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e6d6b39a2ec03c992f450fd99b42122bc5d9249f | aospy/test/test_objs/runs.py | aospy/test/test_objs/runs.py | from aospy.run import Run
test_am2 = Run(
name='test_am2',
description=(
'Preindustrial control simulation.'
),
data_in_direc=('/archive/Yi.Ming/sm2.1_fixed/'
'SM2.1U_Control-1860_lm2_aie_rerun6.YIM/pp'),
data_in_dur=5,
data_in_start_date='0001-01-01',
data_in_en... | from aospy.run import Run
test_am2 = Run(
name='test_am2',
description=(
'Preindustrial control simulation.'
),
data_in_direc=('/archive/Yi.Ming/sm2.1_fixed/'
'SM2.1U_Control-1860_lm2_aie_rerun6.YIM/pp'),
data_in_dur=5,
data_in_start_date='0001-01-01',
data_in_en... | TEST Add 'ps' variable to idealized run | TEST Add 'ps' variable to idealized run
| Python | apache-2.0 | spencerkclark/aospy,spencerahill/aospy | from aospy.run import Run
test_am2 = Run(
name='test_am2',
description=(
'Preindustrial control simulation.'
),
data_in_direc=('/archive/Yi.Ming/sm2.1_fixed/'
'SM2.1U_Control-1860_lm2_aie_rerun6.YIM/pp'),
data_in_dur=5,
data_in_start_date='0001-01-01',
data_in_en... | from aospy.run import Run
test_am2 = Run(
name='test_am2',
description=(
'Preindustrial control simulation.'
),
data_in_direc=('/archive/Yi.Ming/sm2.1_fixed/'
'SM2.1U_Control-1860_lm2_aie_rerun6.YIM/pp'),
data_in_dur=5,
data_in_start_date='0001-01-01',
data_in_en... | <commit_before>from aospy.run import Run
test_am2 = Run(
name='test_am2',
description=(
'Preindustrial control simulation.'
),
data_in_direc=('/archive/Yi.Ming/sm2.1_fixed/'
'SM2.1U_Control-1860_lm2_aie_rerun6.YIM/pp'),
data_in_dur=5,
data_in_start_date='0001-01-01',... | from aospy.run import Run
test_am2 = Run(
name='test_am2',
description=(
'Preindustrial control simulation.'
),
data_in_direc=('/archive/Yi.Ming/sm2.1_fixed/'
'SM2.1U_Control-1860_lm2_aie_rerun6.YIM/pp'),
data_in_dur=5,
data_in_start_date='0001-01-01',
data_in_en... | from aospy.run import Run
test_am2 = Run(
name='test_am2',
description=(
'Preindustrial control simulation.'
),
data_in_direc=('/archive/Yi.Ming/sm2.1_fixed/'
'SM2.1U_Control-1860_lm2_aie_rerun6.YIM/pp'),
data_in_dur=5,
data_in_start_date='0001-01-01',
data_in_en... | <commit_before>from aospy.run import Run
test_am2 = Run(
name='test_am2',
description=(
'Preindustrial control simulation.'
),
data_in_direc=('/archive/Yi.Ming/sm2.1_fixed/'
'SM2.1U_Control-1860_lm2_aie_rerun6.YIM/pp'),
data_in_dur=5,
data_in_start_date='0001-01-01',... |
ee93f680c911f6879e12f7ce7ee3a6c1cfda8379 | app/taskqueue/tasks/stats.py | app/taskqueue/tasks/stats.py | # 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 by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be usefu... | # 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 by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be usefu... | Add missing function doc string. | Add missing function doc string.
| Python | lgpl-2.1 | kernelci/kernelci-backend,kernelci/kernelci-backend | # 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 by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be usefu... | # 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 by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be usefu... | <commit_before># 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 by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that i... | # 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 by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be usefu... | # 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 by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be usefu... | <commit_before># 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 by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that i... |
4be85164344defc9d348594a26c4dab147a8de4a | dvol/test_plugin.py | dvol/test_plugin.py | """
log of integration tests to write:
write test_switch_branches_restarts_containers
command:
docker-compose up -d (in a directory with appropriate docker-compose.yml file)
expected behaviour:
docker containers are started with dvol accordingly
XXX this doesn't seem to work at the moment
command:
do... | """
log of integration tests to write:
write test_switch_branches_restarts_containers
command:
docker-compose up -d (in a directory with appropriate docker-compose.yml file)
expected behaviour:
docker containers are started with dvol accordingly
command:
docker run -ti --volume-driver dvol -v hello:/data... | Tidy up list of tests to write. | Tidy up list of tests to write.
| Python | apache-2.0 | ClusterHQ/dvol,ClusterHQ/dvol,ClusterHQ/dvol | """
log of integration tests to write:
write test_switch_branches_restarts_containers
command:
docker-compose up -d (in a directory with appropriate docker-compose.yml file)
expected behaviour:
docker containers are started with dvol accordingly
XXX this doesn't seem to work at the moment
command:
do... | """
log of integration tests to write:
write test_switch_branches_restarts_containers
command:
docker-compose up -d (in a directory with appropriate docker-compose.yml file)
expected behaviour:
docker containers are started with dvol accordingly
command:
docker run -ti --volume-driver dvol -v hello:/data... | <commit_before>"""
log of integration tests to write:
write test_switch_branches_restarts_containers
command:
docker-compose up -d (in a directory with appropriate docker-compose.yml file)
expected behaviour:
docker containers are started with dvol accordingly
XXX this doesn't seem to work at the moment
... | """
log of integration tests to write:
write test_switch_branches_restarts_containers
command:
docker-compose up -d (in a directory with appropriate docker-compose.yml file)
expected behaviour:
docker containers are started with dvol accordingly
command:
docker run -ti --volume-driver dvol -v hello:/data... | """
log of integration tests to write:
write test_switch_branches_restarts_containers
command:
docker-compose up -d (in a directory with appropriate docker-compose.yml file)
expected behaviour:
docker containers are started with dvol accordingly
XXX this doesn't seem to work at the moment
command:
do... | <commit_before>"""
log of integration tests to write:
write test_switch_branches_restarts_containers
command:
docker-compose up -d (in a directory with appropriate docker-compose.yml file)
expected behaviour:
docker containers are started with dvol accordingly
XXX this doesn't seem to work at the moment
... |
a7311b1cd9a184af2a98130ba288157f62220da1 | src/formatter.py | src/formatter.py | import json
from collections import OrderedDict
from .command import ShellCommand
from .settings import FormatterSettings
class Formatter():
def __init__(self, name, command=None, args=None, formatter=None):
self.__name = name
self.__format = formatter
self.__settings = FormatterSettings(n... | import json
from collections import OrderedDict
from .command import ShellCommand
from .settings import FormatterSettings
class Formatter():
def __init__(self, name, command='', args='', formatter=None):
self.__name = name
self.__settings = FormatterSettings(name.lower())
if formatter:
... | Set default values for command and args | Set default values for command and args
| Python | mit | Rypac/sublime-format | import json
from collections import OrderedDict
from .command import ShellCommand
from .settings import FormatterSettings
class Formatter():
def __init__(self, name, command=None, args=None, formatter=None):
self.__name = name
self.__format = formatter
self.__settings = FormatterSettings(n... | import json
from collections import OrderedDict
from .command import ShellCommand
from .settings import FormatterSettings
class Formatter():
def __init__(self, name, command='', args='', formatter=None):
self.__name = name
self.__settings = FormatterSettings(name.lower())
if formatter:
... | <commit_before>import json
from collections import OrderedDict
from .command import ShellCommand
from .settings import FormatterSettings
class Formatter():
def __init__(self, name, command=None, args=None, formatter=None):
self.__name = name
self.__format = formatter
self.__settings = Form... | import json
from collections import OrderedDict
from .command import ShellCommand
from .settings import FormatterSettings
class Formatter():
def __init__(self, name, command='', args='', formatter=None):
self.__name = name
self.__settings = FormatterSettings(name.lower())
if formatter:
... | import json
from collections import OrderedDict
from .command import ShellCommand
from .settings import FormatterSettings
class Formatter():
def __init__(self, name, command=None, args=None, formatter=None):
self.__name = name
self.__format = formatter
self.__settings = FormatterSettings(n... | <commit_before>import json
from collections import OrderedDict
from .command import ShellCommand
from .settings import FormatterSettings
class Formatter():
def __init__(self, name, command=None, args=None, formatter=None):
self.__name = name
self.__format = formatter
self.__settings = Form... |
e8a0e7c3714445577851c5a84ecf7a036937725a | clang_corpus/__init__.py | clang_corpus/__init__.py | from os import listdir
from os.path import abspath, isfile, join, splitext
# C, C++, Obj-C, & Obj-C++
SOURCE_EXTENSIONS = ('.h', '.hh', '.hpp', '.c', '.cpp', '.cxx', '.m', '.mm')
class SourceFile(object):
""" A simple object which wraps a text file.
"""
def __init__(self, path):
self._path = absp... | from os import listdir
from os.path import abspath, isfile, join, split, splitext
# C, C++, Obj-C, & Obj-C++
SOURCE_EXTENSIONS = ('.h', '.hh', '.hpp', '.c', '.cpp', '.cxx', '.m', '.mm')
class SourceFile(object):
""" A simple object which wraps a text file.
"""
def __init__(self, path):
self._path... | Add an include_paths property to the SourceFile class. | Add an include_paths property to the SourceFile class.
| Python | unlicense | jwiggins/clang-corpus,jwiggins/clang-corpus,jwiggins/clang-corpus | from os import listdir
from os.path import abspath, isfile, join, splitext
# C, C++, Obj-C, & Obj-C++
SOURCE_EXTENSIONS = ('.h', '.hh', '.hpp', '.c', '.cpp', '.cxx', '.m', '.mm')
class SourceFile(object):
""" A simple object which wraps a text file.
"""
def __init__(self, path):
self._path = absp... | from os import listdir
from os.path import abspath, isfile, join, split, splitext
# C, C++, Obj-C, & Obj-C++
SOURCE_EXTENSIONS = ('.h', '.hh', '.hpp', '.c', '.cpp', '.cxx', '.m', '.mm')
class SourceFile(object):
""" A simple object which wraps a text file.
"""
def __init__(self, path):
self._path... | <commit_before>from os import listdir
from os.path import abspath, isfile, join, splitext
# C, C++, Obj-C, & Obj-C++
SOURCE_EXTENSIONS = ('.h', '.hh', '.hpp', '.c', '.cpp', '.cxx', '.m', '.mm')
class SourceFile(object):
""" A simple object which wraps a text file.
"""
def __init__(self, path):
se... | from os import listdir
from os.path import abspath, isfile, join, split, splitext
# C, C++, Obj-C, & Obj-C++
SOURCE_EXTENSIONS = ('.h', '.hh', '.hpp', '.c', '.cpp', '.cxx', '.m', '.mm')
class SourceFile(object):
""" A simple object which wraps a text file.
"""
def __init__(self, path):
self._path... | from os import listdir
from os.path import abspath, isfile, join, splitext
# C, C++, Obj-C, & Obj-C++
SOURCE_EXTENSIONS = ('.h', '.hh', '.hpp', '.c', '.cpp', '.cxx', '.m', '.mm')
class SourceFile(object):
""" A simple object which wraps a text file.
"""
def __init__(self, path):
self._path = absp... | <commit_before>from os import listdir
from os.path import abspath, isfile, join, splitext
# C, C++, Obj-C, & Obj-C++
SOURCE_EXTENSIONS = ('.h', '.hh', '.hpp', '.c', '.cpp', '.cxx', '.m', '.mm')
class SourceFile(object):
""" A simple object which wraps a text file.
"""
def __init__(self, path):
se... |
2402afe296191d3fddc98212564fb0158cfdcb51 | upload_redirects.py | upload_redirects.py | import json
from backend.app import app, db
from backend.models import *
from flask import url_for
# read in json redirect dump
with open('data/prod_url_alias.json', 'r') as f:
redirects = json.loads(f.read())
print len(redirects)
old_urls = []
error_count = 0
for i in range(len(redirects)):
nid = None
... | import json
from backend.app import app, db
from backend.models import *
from flask import url_for
# read in json redirect dump
with open('data/nid_url.json', 'r') as f:
redirects = json.loads(f.read())
print len(redirects)
old_urls = []
existing_redirects = Redirect.query.all()
for redirect in existing_redirec... | Check for duplicates in existing dataset. Fix reference to dump file. | Check for duplicates in existing dataset. Fix reference to dump file.
| Python | apache-2.0 | Code4SA/pmg-cms-2,Code4SA/pmg-cms-2,Code4SA/pmg-cms-2 | import json
from backend.app import app, db
from backend.models import *
from flask import url_for
# read in json redirect dump
with open('data/prod_url_alias.json', 'r') as f:
redirects = json.loads(f.read())
print len(redirects)
old_urls = []
error_count = 0
for i in range(len(redirects)):
nid = None
... | import json
from backend.app import app, db
from backend.models import *
from flask import url_for
# read in json redirect dump
with open('data/nid_url.json', 'r') as f:
redirects = json.loads(f.read())
print len(redirects)
old_urls = []
existing_redirects = Redirect.query.all()
for redirect in existing_redirec... | <commit_before>import json
from backend.app import app, db
from backend.models import *
from flask import url_for
# read in json redirect dump
with open('data/prod_url_alias.json', 'r') as f:
redirects = json.loads(f.read())
print len(redirects)
old_urls = []
error_count = 0
for i in range(len(redirects)):
... | import json
from backend.app import app, db
from backend.models import *
from flask import url_for
# read in json redirect dump
with open('data/nid_url.json', 'r') as f:
redirects = json.loads(f.read())
print len(redirects)
old_urls = []
existing_redirects = Redirect.query.all()
for redirect in existing_redirec... | import json
from backend.app import app, db
from backend.models import *
from flask import url_for
# read in json redirect dump
with open('data/prod_url_alias.json', 'r') as f:
redirects = json.loads(f.read())
print len(redirects)
old_urls = []
error_count = 0
for i in range(len(redirects)):
nid = None
... | <commit_before>import json
from backend.app import app, db
from backend.models import *
from flask import url_for
# read in json redirect dump
with open('data/prod_url_alias.json', 'r') as f:
redirects = json.loads(f.read())
print len(redirects)
old_urls = []
error_count = 0
for i in range(len(redirects)):
... |
1a761c9360f185d6bd07be9f16ea2cfa239f4bdd | groupy/api/base.py | groupy/api/base.py | from groupy import utils
class Manager:
"""Class for interacting with the endpoint for a resource.
:param session: the requests session
:type session: :class:`~groupy.session.Session`
:param str path: path relative to the base URL
"""
#: the base URL
base_url = 'https://api.groupme.com/v... | from groupy import utils
class Manager:
"""Class for interacting with the endpoint for a resource.
:param session: the requests session
:type session: :class:`~groupy.session.Session`
:param str path: path relative to the base URL
"""
#: the base URL
base_url = 'https://api.groupme.com/v... | Fix pickling/unpickling of Resource objects | Fix pickling/unpickling of Resource objects
Add __getstate__ and __setstate__ methods to the Resource class to avoid hitting the recursion limit when trying to pickle/unpickle Resource objects.
A similar issue/solution can be found here: https://stackoverflow.com/a/12102691
| Python | apache-2.0 | rhgrant10/Groupy | from groupy import utils
class Manager:
"""Class for interacting with the endpoint for a resource.
:param session: the requests session
:type session: :class:`~groupy.session.Session`
:param str path: path relative to the base URL
"""
#: the base URL
base_url = 'https://api.groupme.com/v... | from groupy import utils
class Manager:
"""Class for interacting with the endpoint for a resource.
:param session: the requests session
:type session: :class:`~groupy.session.Session`
:param str path: path relative to the base URL
"""
#: the base URL
base_url = 'https://api.groupme.com/v... | <commit_before>from groupy import utils
class Manager:
"""Class for interacting with the endpoint for a resource.
:param session: the requests session
:type session: :class:`~groupy.session.Session`
:param str path: path relative to the base URL
"""
#: the base URL
base_url = 'https://ap... | from groupy import utils
class Manager:
"""Class for interacting with the endpoint for a resource.
:param session: the requests session
:type session: :class:`~groupy.session.Session`
:param str path: path relative to the base URL
"""
#: the base URL
base_url = 'https://api.groupme.com/v... | from groupy import utils
class Manager:
"""Class for interacting with the endpoint for a resource.
:param session: the requests session
:type session: :class:`~groupy.session.Session`
:param str path: path relative to the base URL
"""
#: the base URL
base_url = 'https://api.groupme.com/v... | <commit_before>from groupy import utils
class Manager:
"""Class for interacting with the endpoint for a resource.
:param session: the requests session
:type session: :class:`~groupy.session.Session`
:param str path: path relative to the base URL
"""
#: the base URL
base_url = 'https://ap... |
8626733d3a4960013189ffa90fe8e496dd8cc90a | calexicon/constants.py | calexicon/constants.py | from datetime import date as vanilla_date
from dates.base import BasicBCEDate
first_julian_date = BasicBCEDate(-45, 1, 1)
first_vanilla_date = vanilla_date(1, 1, 1)
last_vanilla_date = vanilla_date(9999, 12, 31)
julian_day_number_of_first_vanilla_date = 1721423
julian_day_number_of_last_vanilla_date = (
julian_d... | from datetime import date as vanilla_date
from dates.base import BasicBCEDate
first_julian_date = BasicBCEDate(-45, 1, 1)
first_vanilla_date = vanilla_date(1, 1, 1)
last_vanilla_date = vanilla_date(9999, 12, 31)
julian_day_number_of_first_vanilla_date = 1721423
julian_day_number_of_last_vanilla_date = (
julian_d... | Add another constant for the number of vanilla dates. | Add another constant for the number of vanilla dates.
| Python | apache-2.0 | jwg4/calexicon,jwg4/qual | from datetime import date as vanilla_date
from dates.base import BasicBCEDate
first_julian_date = BasicBCEDate(-45, 1, 1)
first_vanilla_date = vanilla_date(1, 1, 1)
last_vanilla_date = vanilla_date(9999, 12, 31)
julian_day_number_of_first_vanilla_date = 1721423
julian_day_number_of_last_vanilla_date = (
julian_d... | from datetime import date as vanilla_date
from dates.base import BasicBCEDate
first_julian_date = BasicBCEDate(-45, 1, 1)
first_vanilla_date = vanilla_date(1, 1, 1)
last_vanilla_date = vanilla_date(9999, 12, 31)
julian_day_number_of_first_vanilla_date = 1721423
julian_day_number_of_last_vanilla_date = (
julian_d... | <commit_before>from datetime import date as vanilla_date
from dates.base import BasicBCEDate
first_julian_date = BasicBCEDate(-45, 1, 1)
first_vanilla_date = vanilla_date(1, 1, 1)
last_vanilla_date = vanilla_date(9999, 12, 31)
julian_day_number_of_first_vanilla_date = 1721423
julian_day_number_of_last_vanilla_date =... | from datetime import date as vanilla_date
from dates.base import BasicBCEDate
first_julian_date = BasicBCEDate(-45, 1, 1)
first_vanilla_date = vanilla_date(1, 1, 1)
last_vanilla_date = vanilla_date(9999, 12, 31)
julian_day_number_of_first_vanilla_date = 1721423
julian_day_number_of_last_vanilla_date = (
julian_d... | from datetime import date as vanilla_date
from dates.base import BasicBCEDate
first_julian_date = BasicBCEDate(-45, 1, 1)
first_vanilla_date = vanilla_date(1, 1, 1)
last_vanilla_date = vanilla_date(9999, 12, 31)
julian_day_number_of_first_vanilla_date = 1721423
julian_day_number_of_last_vanilla_date = (
julian_d... | <commit_before>from datetime import date as vanilla_date
from dates.base import BasicBCEDate
first_julian_date = BasicBCEDate(-45, 1, 1)
first_vanilla_date = vanilla_date(1, 1, 1)
last_vanilla_date = vanilla_date(9999, 12, 31)
julian_day_number_of_first_vanilla_date = 1721423
julian_day_number_of_last_vanilla_date =... |
195f4d25bdf30f355d029697675481ba3193ad77 | gatt/gatt.py | gatt/gatt.py | import os
import platform
if platform.system() == 'Darwin':
if os.environ.get('LINUX_WITHOUT_DBUS', '0') == '0':
from .gatt_linux import *
else:
from .gatt_stubs import *
else:
# TODO: Add support for more platforms
from .gatt_stubs import *
| import os
import platform
if platform.system() == 'Linux':
if os.environ.get('LINUX_WITHOUT_DBUS', '0') == '0':
from .gatt_linux import *
else:
from .gatt_stubs import *
else:
# TODO: Add support for more platforms
from .gatt_stubs import *
| Fix testing for wrong platform name | Fix testing for wrong platform name | Python | mit | getsenic/gatt-python | import os
import platform
if platform.system() == 'Darwin':
if os.environ.get('LINUX_WITHOUT_DBUS', '0') == '0':
from .gatt_linux import *
else:
from .gatt_stubs import *
else:
# TODO: Add support for more platforms
from .gatt_stubs import *
Fix testing for wrong platform name | import os
import platform
if platform.system() == 'Linux':
if os.environ.get('LINUX_WITHOUT_DBUS', '0') == '0':
from .gatt_linux import *
else:
from .gatt_stubs import *
else:
# TODO: Add support for more platforms
from .gatt_stubs import *
| <commit_before>import os
import platform
if platform.system() == 'Darwin':
if os.environ.get('LINUX_WITHOUT_DBUS', '0') == '0':
from .gatt_linux import *
else:
from .gatt_stubs import *
else:
# TODO: Add support for more platforms
from .gatt_stubs import *
<commit_msg>Fix testing for wr... | import os
import platform
if platform.system() == 'Linux':
if os.environ.get('LINUX_WITHOUT_DBUS', '0') == '0':
from .gatt_linux import *
else:
from .gatt_stubs import *
else:
# TODO: Add support for more platforms
from .gatt_stubs import *
| import os
import platform
if platform.system() == 'Darwin':
if os.environ.get('LINUX_WITHOUT_DBUS', '0') == '0':
from .gatt_linux import *
else:
from .gatt_stubs import *
else:
# TODO: Add support for more platforms
from .gatt_stubs import *
Fix testing for wrong platform nameimport os
... | <commit_before>import os
import platform
if platform.system() == 'Darwin':
if os.environ.get('LINUX_WITHOUT_DBUS', '0') == '0':
from .gatt_linux import *
else:
from .gatt_stubs import *
else:
# TODO: Add support for more platforms
from .gatt_stubs import *
<commit_msg>Fix testing for wr... |
67717116a2585975e0e773956d6a102be9dc11d6 | ggplot/geoms/geom_boxplot.py | ggplot/geoms/geom_boxplot.py | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.cbook as cbook
from .geom import geom
from ggplot.utils import is_string
from ggplot.utils import is_categorical
class g... | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.cbook as cbook
from .geom import geom
from ggplot.utils import is_string
from ggplot.utils import is_categorical
class g... | Fix y axis tick labels for boxplot | Fix y axis tick labels for boxplot
| Python | bsd-2-clause | xguse/ggplot,benslice/ggplot,smblance/ggplot,Cophy08/ggplot,mizzao/ggplot,xguse/ggplot,ricket1978/ggplot,mizzao/ggplot,andnovar/ggplot,bitemyapp/ggplot,kmather73/ggplot,udacity/ggplot,ricket1978/ggplot,benslice/ggplot,wllmtrng/ggplot,assad2012/ggplot | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.cbook as cbook
from .geom import geom
from ggplot.utils import is_string
from ggplot.utils import is_categorical
class g... | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.cbook as cbook
from .geom import geom
from ggplot.utils import is_string
from ggplot.utils import is_categorical
class g... | <commit_before>from __future__ import (absolute_import, division, print_function,
unicode_literals)
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.cbook as cbook
from .geom import geom
from ggplot.utils import is_string
from ggplot.utils import is_categ... | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.cbook as cbook
from .geom import geom
from ggplot.utils import is_string
from ggplot.utils import is_categorical
class g... | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.cbook as cbook
from .geom import geom
from ggplot.utils import is_string
from ggplot.utils import is_categorical
class g... | <commit_before>from __future__ import (absolute_import, division, print_function,
unicode_literals)
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.cbook as cbook
from .geom import geom
from ggplot.utils import is_string
from ggplot.utils import is_categ... |
468e2369a2b1af203d8a00abbfb3b01af26ae89a | bot/multithreading/worker.py | bot/multithreading/worker.py | import queue
from bot.multithreading.work import Work
class Worker:
def run(self):
raise NotImplementedError()
def post(self, work: Work):
raise NotImplementedError()
def shutdown(self):
raise NotImplementedError()
class AbstractWorker(Worker):
def __init__(self, name: str... | import queue
from bot.multithreading.work import Work
class Worker:
def run(self):
raise NotImplementedError()
def post(self, work: Work):
raise NotImplementedError()
def shutdown(self):
raise NotImplementedError()
class AbstractWorker(Worker):
def __init__(self, name: str... | Create a ImmediateWorker that executes the posted jobs on the same thread synchronously | Create a ImmediateWorker that executes the posted jobs on the same thread synchronously
| Python | agpl-3.0 | alvarogzp/telegram-bot,alvarogzp/telegram-bot | import queue
from bot.multithreading.work import Work
class Worker:
def run(self):
raise NotImplementedError()
def post(self, work: Work):
raise NotImplementedError()
def shutdown(self):
raise NotImplementedError()
class AbstractWorker(Worker):
def __init__(self, name: str... | import queue
from bot.multithreading.work import Work
class Worker:
def run(self):
raise NotImplementedError()
def post(self, work: Work):
raise NotImplementedError()
def shutdown(self):
raise NotImplementedError()
class AbstractWorker(Worker):
def __init__(self, name: str... | <commit_before>import queue
from bot.multithreading.work import Work
class Worker:
def run(self):
raise NotImplementedError()
def post(self, work: Work):
raise NotImplementedError()
def shutdown(self):
raise NotImplementedError()
class AbstractWorker(Worker):
def __init__(... | import queue
from bot.multithreading.work import Work
class Worker:
def run(self):
raise NotImplementedError()
def post(self, work: Work):
raise NotImplementedError()
def shutdown(self):
raise NotImplementedError()
class AbstractWorker(Worker):
def __init__(self, name: str... | import queue
from bot.multithreading.work import Work
class Worker:
def run(self):
raise NotImplementedError()
def post(self, work: Work):
raise NotImplementedError()
def shutdown(self):
raise NotImplementedError()
class AbstractWorker(Worker):
def __init__(self, name: str... | <commit_before>import queue
from bot.multithreading.work import Work
class Worker:
def run(self):
raise NotImplementedError()
def post(self, work: Work):
raise NotImplementedError()
def shutdown(self):
raise NotImplementedError()
class AbstractWorker(Worker):
def __init__(... |
423288b4cc8cf1506285913558b3fcff9e7788fa | gitlab/urls.py | gitlab/urls.py | from django.conf.urls import patterns, url
from django.views.generic.base import RedirectView
from gitlab import views
urlpatterns = patterns('',
url(r'^favicon\.ico$', RedirectView.as_view(url='/static/app/favicon.ico')),
url(r'^push_event/hv$', views.push_event_hv),
url(r'^push_event/web$', views.push_e... | from django.conf.urls import patterns, url
from django.views.generic.base import RedirectView
from gitlab import views
urlpatterns = patterns('',
url(r'^favicon\.ico$', RedirectView.as_view(url='/static/app/favicon.ico')),
url(r'^push_event/hv$', views.push_event_hv),
url(r'^push_event/web$', views.push_e... | Add URL for monitoring hook | Add URL for monitoring hook | Python | apache-2.0 | ReanGD/web-work-fitnesse,ReanGD/web-work-fitnesse,ReanGD/web-work-fitnesse | from django.conf.urls import patterns, url
from django.views.generic.base import RedirectView
from gitlab import views
urlpatterns = patterns('',
url(r'^favicon\.ico$', RedirectView.as_view(url='/static/app/favicon.ico')),
url(r'^push_event/hv$', views.push_event_hv),
url(r'^push_event/web$', views.push_e... | from django.conf.urls import patterns, url
from django.views.generic.base import RedirectView
from gitlab import views
urlpatterns = patterns('',
url(r'^favicon\.ico$', RedirectView.as_view(url='/static/app/favicon.ico')),
url(r'^push_event/hv$', views.push_event_hv),
url(r'^push_event/web$', views.push_e... | <commit_before>from django.conf.urls import patterns, url
from django.views.generic.base import RedirectView
from gitlab import views
urlpatterns = patterns('',
url(r'^favicon\.ico$', RedirectView.as_view(url='/static/app/favicon.ico')),
url(r'^push_event/hv$', views.push_event_hv),
url(r'^push_event/web$... | from django.conf.urls import patterns, url
from django.views.generic.base import RedirectView
from gitlab import views
urlpatterns = patterns('',
url(r'^favicon\.ico$', RedirectView.as_view(url='/static/app/favicon.ico')),
url(r'^push_event/hv$', views.push_event_hv),
url(r'^push_event/web$', views.push_e... | from django.conf.urls import patterns, url
from django.views.generic.base import RedirectView
from gitlab import views
urlpatterns = patterns('',
url(r'^favicon\.ico$', RedirectView.as_view(url='/static/app/favicon.ico')),
url(r'^push_event/hv$', views.push_event_hv),
url(r'^push_event/web$', views.push_e... | <commit_before>from django.conf.urls import patterns, url
from django.views.generic.base import RedirectView
from gitlab import views
urlpatterns = patterns('',
url(r'^favicon\.ico$', RedirectView.as_view(url='/static/app/favicon.ico')),
url(r'^push_event/hv$', views.push_event_hv),
url(r'^push_event/web$... |
2f9be950c372beb2f555cbe84a22366e0b95e721 | hellopy/bot.py | hellopy/bot.py | from wit import Wit
from . import text_to_speech as tts
from . import config
WIT_AI_KEY = config.WIT_AI_KEY
session_id = config.USER
def say(session_id, context, msg):
tts.talk(msg)
def error(session_id, context, e):
# tts.talk("Algo salió mal.")
print(str(e))
def merge(session_id, context, entities... | from wit import Wit
import shutil
import subprocess
import time
from . import text_to_speech as tts
from . import config
WIT_AI_KEY = config.WIT_AI_KEY
session_id = config.USER
def say(session_id, context, msg):
print("HelloPy: " + msg)
tts.talk(msg)
def error(session_id, context, e):
# tts.talk("Algo... | Add functions: mute & open | Add functions: mute & open
| Python | mit | stsewd/hellopy | from wit import Wit
from . import text_to_speech as tts
from . import config
WIT_AI_KEY = config.WIT_AI_KEY
session_id = config.USER
def say(session_id, context, msg):
tts.talk(msg)
def error(session_id, context, e):
# tts.talk("Algo salió mal.")
print(str(e))
def merge(session_id, context, entities... | from wit import Wit
import shutil
import subprocess
import time
from . import text_to_speech as tts
from . import config
WIT_AI_KEY = config.WIT_AI_KEY
session_id = config.USER
def say(session_id, context, msg):
print("HelloPy: " + msg)
tts.talk(msg)
def error(session_id, context, e):
# tts.talk("Algo... | <commit_before>from wit import Wit
from . import text_to_speech as tts
from . import config
WIT_AI_KEY = config.WIT_AI_KEY
session_id = config.USER
def say(session_id, context, msg):
tts.talk(msg)
def error(session_id, context, e):
# tts.talk("Algo salió mal.")
print(str(e))
def merge(session_id, co... | from wit import Wit
import shutil
import subprocess
import time
from . import text_to_speech as tts
from . import config
WIT_AI_KEY = config.WIT_AI_KEY
session_id = config.USER
def say(session_id, context, msg):
print("HelloPy: " + msg)
tts.talk(msg)
def error(session_id, context, e):
# tts.talk("Algo... | from wit import Wit
from . import text_to_speech as tts
from . import config
WIT_AI_KEY = config.WIT_AI_KEY
session_id = config.USER
def say(session_id, context, msg):
tts.talk(msg)
def error(session_id, context, e):
# tts.talk("Algo salió mal.")
print(str(e))
def merge(session_id, context, entities... | <commit_before>from wit import Wit
from . import text_to_speech as tts
from . import config
WIT_AI_KEY = config.WIT_AI_KEY
session_id = config.USER
def say(session_id, context, msg):
tts.talk(msg)
def error(session_id, context, e):
# tts.talk("Algo salió mal.")
print(str(e))
def merge(session_id, co... |
f6bf104cbdcdb909a15c80dafe9ae2e7aebbc2f0 | examples/snowball_stemmer_example.py | examples/snowball_stemmer_example.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from nltk.stem.snowball import HungarianStemmer
from nltk import word_tokenize
stemmer = HungarianStemmer()
test_sentence = "Szeretnék kérni tőled egy óriási szívességet az édesanyám számára."
tokenized_sentence = word_tokenize(test_se... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from nltk.stem.snowball import HungarianStemmer
from nltk import word_tokenize
stemmer = HungarianStemmer()
test_sentence = "Péter szereti Enikőt és Marit"
tokenized_sentence = word_tokenize(test_sentence)
print('With SnowballStemmer... | Add more information to SnowballStemmer | Add more information to SnowballStemmer
| Python | apache-2.0 | davidpgero/hungarian-nltk | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from nltk.stem.snowball import HungarianStemmer
from nltk import word_tokenize
stemmer = HungarianStemmer()
test_sentence = "Szeretnék kérni tőled egy óriási szívességet az édesanyám számára."
tokenized_sentence = word_tokenize(test_se... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from nltk.stem.snowball import HungarianStemmer
from nltk import word_tokenize
stemmer = HungarianStemmer()
test_sentence = "Péter szereti Enikőt és Marit"
tokenized_sentence = word_tokenize(test_sentence)
print('With SnowballStemmer... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from nltk.stem.snowball import HungarianStemmer
from nltk import word_tokenize
stemmer = HungarianStemmer()
test_sentence = "Szeretnék kérni tőled egy óriási szívességet az édesanyám számára."
tokenized_sentence = word_t... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from nltk.stem.snowball import HungarianStemmer
from nltk import word_tokenize
stemmer = HungarianStemmer()
test_sentence = "Péter szereti Enikőt és Marit"
tokenized_sentence = word_tokenize(test_sentence)
print('With SnowballStemmer... | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from nltk.stem.snowball import HungarianStemmer
from nltk import word_tokenize
stemmer = HungarianStemmer()
test_sentence = "Szeretnék kérni tőled egy óriási szívességet az édesanyám számára."
tokenized_sentence = word_tokenize(test_se... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from nltk.stem.snowball import HungarianStemmer
from nltk import word_tokenize
stemmer = HungarianStemmer()
test_sentence = "Szeretnék kérni tőled egy óriási szívességet az édesanyám számára."
tokenized_sentence = word_t... |
3e1b2b5e87f2d0ed8ecb06b07805723101c23636 | km3pipe/tests/test_config.py | km3pipe/tests/test_config.py | # coding=utf-8
# Filename: test_config.py
"""
Test suite for configuration related functions and classes.
"""
from __future__ import division, absolute_import, print_function
from km3pipe.testing import TestCase, BytesIO
from km3pipe.config import Config
CONFIGURATION = BytesIO("\n".join((
"[DB]",
"username... | # coding=utf-8
# Filename: test_config.py
"""
Test suite for configuration related functions and classes.
"""
from __future__ import division, absolute_import, print_function
from km3pipe.testing import TestCase, StringIO
from km3pipe.config import Config
CONFIGURATION = StringIO("\n".join((
"[DB]",
"userna... | Switch to StringIO for fake config data | Switch to StringIO for fake config data
| Python | mit | tamasgal/km3pipe,tamasgal/km3pipe | # coding=utf-8
# Filename: test_config.py
"""
Test suite for configuration related functions and classes.
"""
from __future__ import division, absolute_import, print_function
from km3pipe.testing import TestCase, BytesIO
from km3pipe.config import Config
CONFIGURATION = BytesIO("\n".join((
"[DB]",
"username... | # coding=utf-8
# Filename: test_config.py
"""
Test suite for configuration related functions and classes.
"""
from __future__ import division, absolute_import, print_function
from km3pipe.testing import TestCase, StringIO
from km3pipe.config import Config
CONFIGURATION = StringIO("\n".join((
"[DB]",
"userna... | <commit_before># coding=utf-8
# Filename: test_config.py
"""
Test suite for configuration related functions and classes.
"""
from __future__ import division, absolute_import, print_function
from km3pipe.testing import TestCase, BytesIO
from km3pipe.config import Config
CONFIGURATION = BytesIO("\n".join((
"[DB]"... | # coding=utf-8
# Filename: test_config.py
"""
Test suite for configuration related functions and classes.
"""
from __future__ import division, absolute_import, print_function
from km3pipe.testing import TestCase, StringIO
from km3pipe.config import Config
CONFIGURATION = StringIO("\n".join((
"[DB]",
"userna... | # coding=utf-8
# Filename: test_config.py
"""
Test suite for configuration related functions and classes.
"""
from __future__ import division, absolute_import, print_function
from km3pipe.testing import TestCase, BytesIO
from km3pipe.config import Config
CONFIGURATION = BytesIO("\n".join((
"[DB]",
"username... | <commit_before># coding=utf-8
# Filename: test_config.py
"""
Test suite for configuration related functions and classes.
"""
from __future__ import division, absolute_import, print_function
from km3pipe.testing import TestCase, BytesIO
from km3pipe.config import Config
CONFIGURATION = BytesIO("\n".join((
"[DB]"... |
28c898c39515601b3ed0379cd3721f47e019ef65 | common/lib/xmodule/xmodule/tests/test_conditional_logic.py | common/lib/xmodule/xmodule/tests/test_conditional_logic.py | # -*- coding: utf-8 -*-
"""Test for Conditional Xmodule functional logic."""
from xmodule.conditional_module import ConditionalDescriptor
from . import LogicTest
class ConditionalModuleTest(LogicTest):
"""Logic tests for Conditional Xmodule."""
descriptor_class = ConditionalDescriptor
def test_ajax_requ... | # -*- coding: utf-8 -*-
"""Test for Conditional Xmodule functional logic."""
from xmodule.conditional_module import ConditionalDescriptor
from . import LogicTest
class ConditionalModuleTest(LogicTest):
"""Logic tests for Conditional Xmodule."""
descriptor_class = ConditionalDescriptor
def test_ajax_requ... | Correct spelling in a comment | Correct spelling in a comment
| Python | agpl-3.0 | EDUlib/edx-platform,10clouds/edx-platform,chand3040/cloud_that,DefyVentures/edx-platform,vismartltd/edx-platform,zerobatu/edx-platform,ubc/edx-platform,eduNEXT/edx-platform,cpennington/edx-platform,jazztpt/edx-platform,Lektorium-LLC/edx-platform,Kalyzee/edx-platform,nttks/edx-platform,longmen21/edx-platform,chudaol/edx... | # -*- coding: utf-8 -*-
"""Test for Conditional Xmodule functional logic."""
from xmodule.conditional_module import ConditionalDescriptor
from . import LogicTest
class ConditionalModuleTest(LogicTest):
"""Logic tests for Conditional Xmodule."""
descriptor_class = ConditionalDescriptor
def test_ajax_requ... | # -*- coding: utf-8 -*-
"""Test for Conditional Xmodule functional logic."""
from xmodule.conditional_module import ConditionalDescriptor
from . import LogicTest
class ConditionalModuleTest(LogicTest):
"""Logic tests for Conditional Xmodule."""
descriptor_class = ConditionalDescriptor
def test_ajax_requ... | <commit_before># -*- coding: utf-8 -*-
"""Test for Conditional Xmodule functional logic."""
from xmodule.conditional_module import ConditionalDescriptor
from . import LogicTest
class ConditionalModuleTest(LogicTest):
"""Logic tests for Conditional Xmodule."""
descriptor_class = ConditionalDescriptor
def... | # -*- coding: utf-8 -*-
"""Test for Conditional Xmodule functional logic."""
from xmodule.conditional_module import ConditionalDescriptor
from . import LogicTest
class ConditionalModuleTest(LogicTest):
"""Logic tests for Conditional Xmodule."""
descriptor_class = ConditionalDescriptor
def test_ajax_requ... | # -*- coding: utf-8 -*-
"""Test for Conditional Xmodule functional logic."""
from xmodule.conditional_module import ConditionalDescriptor
from . import LogicTest
class ConditionalModuleTest(LogicTest):
"""Logic tests for Conditional Xmodule."""
descriptor_class = ConditionalDescriptor
def test_ajax_requ... | <commit_before># -*- coding: utf-8 -*-
"""Test for Conditional Xmodule functional logic."""
from xmodule.conditional_module import ConditionalDescriptor
from . import LogicTest
class ConditionalModuleTest(LogicTest):
"""Logic tests for Conditional Xmodule."""
descriptor_class = ConditionalDescriptor
def... |
0225a79fa43f03a48a6134fce4122ae243a10df2 | ptt_preproc_to_target.py | ptt_preproc_to_target.py | #!/usr/bin/env python
import json
from pathlib import Path
import ptt_core
l = ptt_core.l
_TARGETS_DIR_PATH = Path('targets')
if not _TARGETS_DIR_PATH.exists():
_TARGETS_DIR_PATH.mkdir()
def generate_target_from(json_path):
l.info('Generate target from {} ...'.format(json_path))
txt_path = _TARGET... | #!/usr/bin/env python
import json
from pathlib import Path
import ptt_core
l = ptt_core.l
_TARGETS_DIR_PATH = Path('targets/')
if not _TARGETS_DIR_PATH.exists():
_TARGETS_DIR_PATH.mkdir()
def generate_target_from(json_path):
l.info('Generate target from {} ...'.format(json_path))
txt_path = _TARGE... | Put / after dir path | Put / after dir path
| Python | mit | moskytw/mining-news | #!/usr/bin/env python
import json
from pathlib import Path
import ptt_core
l = ptt_core.l
_TARGETS_DIR_PATH = Path('targets')
if not _TARGETS_DIR_PATH.exists():
_TARGETS_DIR_PATH.mkdir()
def generate_target_from(json_path):
l.info('Generate target from {} ...'.format(json_path))
txt_path = _TARGET... | #!/usr/bin/env python
import json
from pathlib import Path
import ptt_core
l = ptt_core.l
_TARGETS_DIR_PATH = Path('targets/')
if not _TARGETS_DIR_PATH.exists():
_TARGETS_DIR_PATH.mkdir()
def generate_target_from(json_path):
l.info('Generate target from {} ...'.format(json_path))
txt_path = _TARGE... | <commit_before>#!/usr/bin/env python
import json
from pathlib import Path
import ptt_core
l = ptt_core.l
_TARGETS_DIR_PATH = Path('targets')
if not _TARGETS_DIR_PATH.exists():
_TARGETS_DIR_PATH.mkdir()
def generate_target_from(json_path):
l.info('Generate target from {} ...'.format(json_path))
txt... | #!/usr/bin/env python
import json
from pathlib import Path
import ptt_core
l = ptt_core.l
_TARGETS_DIR_PATH = Path('targets/')
if not _TARGETS_DIR_PATH.exists():
_TARGETS_DIR_PATH.mkdir()
def generate_target_from(json_path):
l.info('Generate target from {} ...'.format(json_path))
txt_path = _TARGE... | #!/usr/bin/env python
import json
from pathlib import Path
import ptt_core
l = ptt_core.l
_TARGETS_DIR_PATH = Path('targets')
if not _TARGETS_DIR_PATH.exists():
_TARGETS_DIR_PATH.mkdir()
def generate_target_from(json_path):
l.info('Generate target from {} ...'.format(json_path))
txt_path = _TARGET... | <commit_before>#!/usr/bin/env python
import json
from pathlib import Path
import ptt_core
l = ptt_core.l
_TARGETS_DIR_PATH = Path('targets')
if not _TARGETS_DIR_PATH.exists():
_TARGETS_DIR_PATH.mkdir()
def generate_target_from(json_path):
l.info('Generate target from {} ...'.format(json_path))
txt... |
2a8dd80c9769731963fcd75cb24cd8918e48b269 | mythril/analysis/security.py | mythril/analysis/security.py | from mythril.analysis.report import Report
from .modules import delegatecall_forward, unchecked_suicide, ether_send, unchecked_retval, delegatecall_to_dynamic, integer_underflow, call_to_dynamic_with_gas
def fire_lasers(statespace):
issues = []
issues += delegatecall_forward.execute(statespace)
issues += delegat... | from mythril.analysis.report import Report
from mythril.analysis import modules
import pkgutil
def fire_lasers(statespace):
issues = []
_modules = []
for loader, name, is_pkg in pkgutil.walk_packages(modules.__path__):
_modules.append(loader.find_module(name).load_module(name))
for modu... | Implement a nicer way of execution modules | Implement a nicer way of execution modules
| Python | mit | b-mueller/mythril,b-mueller/mythril,b-mueller/mythril,b-mueller/mythril | from mythril.analysis.report import Report
from .modules import delegatecall_forward, unchecked_suicide, ether_send, unchecked_retval, delegatecall_to_dynamic, integer_underflow, call_to_dynamic_with_gas
def fire_lasers(statespace):
issues = []
issues += delegatecall_forward.execute(statespace)
issues += delegat... | from mythril.analysis.report import Report
from mythril.analysis import modules
import pkgutil
def fire_lasers(statespace):
issues = []
_modules = []
for loader, name, is_pkg in pkgutil.walk_packages(modules.__path__):
_modules.append(loader.find_module(name).load_module(name))
for modu... | <commit_before>from mythril.analysis.report import Report
from .modules import delegatecall_forward, unchecked_suicide, ether_send, unchecked_retval, delegatecall_to_dynamic, integer_underflow, call_to_dynamic_with_gas
def fire_lasers(statespace):
issues = []
issues += delegatecall_forward.execute(statespace)
is... | from mythril.analysis.report import Report
from mythril.analysis import modules
import pkgutil
def fire_lasers(statespace):
issues = []
_modules = []
for loader, name, is_pkg in pkgutil.walk_packages(modules.__path__):
_modules.append(loader.find_module(name).load_module(name))
for modu... | from mythril.analysis.report import Report
from .modules import delegatecall_forward, unchecked_suicide, ether_send, unchecked_retval, delegatecall_to_dynamic, integer_underflow, call_to_dynamic_with_gas
def fire_lasers(statespace):
issues = []
issues += delegatecall_forward.execute(statespace)
issues += delegat... | <commit_before>from mythril.analysis.report import Report
from .modules import delegatecall_forward, unchecked_suicide, ether_send, unchecked_retval, delegatecall_to_dynamic, integer_underflow, call_to_dynamic_with_gas
def fire_lasers(statespace):
issues = []
issues += delegatecall_forward.execute(statespace)
is... |
dbb27799a92e58cf03a9b60c17e0f3116fbcf687 | modish/__init__.py | modish/__init__.py | # -*- coding: utf-8 -*-
from .model import ModalityModel
from .estimator import ModalityEstimator
from .visualize import MODALITY_TO_COLOR, MODALITY_ORDER, MODALITY_PALETTE,\
MODALITY_TO_CMAP, ModalitiesViz, violinplot
__author__ = 'Olga Botvinnik'
__email__ = 'olga.botvinnik@gmail.com'
__version__ = '0.1.0'
__a... | # -*- coding: utf-8 -*-
from .model import ModalityModel
from .estimator import ModalityEstimator
from .visualize import MODALITY_TO_COLOR, MODALITY_ORDER, MODALITY_PALETTE,\
MODALITY_TO_CMAP, ModalitiesViz, violinplot, barplot
__author__ = 'Olga Botvinnik'
__email__ = 'olga.botvinnik@gmail.com'
__version__ = '0.1... | Add object for saving modish test results | Add object for saving modish test results
| Python | bsd-3-clause | olgabot/anchor,olgabot/modish,YeoLab/anchor | # -*- coding: utf-8 -*-
from .model import ModalityModel
from .estimator import ModalityEstimator
from .visualize import MODALITY_TO_COLOR, MODALITY_ORDER, MODALITY_PALETTE,\
MODALITY_TO_CMAP, ModalitiesViz, violinplot
__author__ = 'Olga Botvinnik'
__email__ = 'olga.botvinnik@gmail.com'
__version__ = '0.1.0'
__a... | # -*- coding: utf-8 -*-
from .model import ModalityModel
from .estimator import ModalityEstimator
from .visualize import MODALITY_TO_COLOR, MODALITY_ORDER, MODALITY_PALETTE,\
MODALITY_TO_CMAP, ModalitiesViz, violinplot, barplot
__author__ = 'Olga Botvinnik'
__email__ = 'olga.botvinnik@gmail.com'
__version__ = '0.1... | <commit_before># -*- coding: utf-8 -*-
from .model import ModalityModel
from .estimator import ModalityEstimator
from .visualize import MODALITY_TO_COLOR, MODALITY_ORDER, MODALITY_PALETTE,\
MODALITY_TO_CMAP, ModalitiesViz, violinplot
__author__ = 'Olga Botvinnik'
__email__ = 'olga.botvinnik@gmail.com'
__version__ ... | # -*- coding: utf-8 -*-
from .model import ModalityModel
from .estimator import ModalityEstimator
from .visualize import MODALITY_TO_COLOR, MODALITY_ORDER, MODALITY_PALETTE,\
MODALITY_TO_CMAP, ModalitiesViz, violinplot, barplot
__author__ = 'Olga Botvinnik'
__email__ = 'olga.botvinnik@gmail.com'
__version__ = '0.1... | # -*- coding: utf-8 -*-
from .model import ModalityModel
from .estimator import ModalityEstimator
from .visualize import MODALITY_TO_COLOR, MODALITY_ORDER, MODALITY_PALETTE,\
MODALITY_TO_CMAP, ModalitiesViz, violinplot
__author__ = 'Olga Botvinnik'
__email__ = 'olga.botvinnik@gmail.com'
__version__ = '0.1.0'
__a... | <commit_before># -*- coding: utf-8 -*-
from .model import ModalityModel
from .estimator import ModalityEstimator
from .visualize import MODALITY_TO_COLOR, MODALITY_ORDER, MODALITY_PALETTE,\
MODALITY_TO_CMAP, ModalitiesViz, violinplot
__author__ = 'Olga Botvinnik'
__email__ = 'olga.botvinnik@gmail.com'
__version__ ... |
ab4333ad10713b0df25e0ff9bb46da3a0749326f | analyser/tasks.py | analyser/tasks.py | import os
import time
import requests
from krunchr.vendors.celery import celery
@celery.task
def get_file(url, path):
name, ext = os.path.splitext(url)
name = str(int(time.time()))
path = "%s/%s%s" % (path, name, ext)
response = requests.get(url)
print path
with open(path, 'w') as f:
f.write(respo... | import os
import time
import rethinkdb as r
import requests
from krunchr.vendors.celery import celery, db
@celery.task(bind=True)
def get_file(self, url, path):
name, ext = os.path.splitext(url)
name = str(int(time.time()))
path = "%s/%s%s" % (path, name, ext)
response = requests.get(url)
with open(path... | Update job state when we finish the task | Update job state when we finish the task
| Python | apache-2.0 | vtemian/kruncher | import os
import time
import requests
from krunchr.vendors.celery import celery
@celery.task
def get_file(url, path):
name, ext = os.path.splitext(url)
name = str(int(time.time()))
path = "%s/%s%s" % (path, name, ext)
response = requests.get(url)
print path
with open(path, 'w') as f:
f.write(respo... | import os
import time
import rethinkdb as r
import requests
from krunchr.vendors.celery import celery, db
@celery.task(bind=True)
def get_file(self, url, path):
name, ext = os.path.splitext(url)
name = str(int(time.time()))
path = "%s/%s%s" % (path, name, ext)
response = requests.get(url)
with open(path... | <commit_before>import os
import time
import requests
from krunchr.vendors.celery import celery
@celery.task
def get_file(url, path):
name, ext = os.path.splitext(url)
name = str(int(time.time()))
path = "%s/%s%s" % (path, name, ext)
response = requests.get(url)
print path
with open(path, 'w') as f:
... | import os
import time
import rethinkdb as r
import requests
from krunchr.vendors.celery import celery, db
@celery.task(bind=True)
def get_file(self, url, path):
name, ext = os.path.splitext(url)
name = str(int(time.time()))
path = "%s/%s%s" % (path, name, ext)
response = requests.get(url)
with open(path... | import os
import time
import requests
from krunchr.vendors.celery import celery
@celery.task
def get_file(url, path):
name, ext = os.path.splitext(url)
name = str(int(time.time()))
path = "%s/%s%s" % (path, name, ext)
response = requests.get(url)
print path
with open(path, 'w') as f:
f.write(respo... | <commit_before>import os
import time
import requests
from krunchr.vendors.celery import celery
@celery.task
def get_file(url, path):
name, ext = os.path.splitext(url)
name = str(int(time.time()))
path = "%s/%s%s" % (path, name, ext)
response = requests.get(url)
print path
with open(path, 'w') as f:
... |
28c26bf5d220a5a60b807470bbaf339bdf9206a9 | pylearn2/testing/skip.py | pylearn2/testing/skip.py | """
Helper functions for determining which tests to skip.
"""
__authors__ = "Ian Goodfellow"
__copyright__ = "Copyright 2010-2012, Universite de Montreal"
__credits__ = ["Ian Goodfellow"]
__license__ = "3-clause BSD"
__maintainer__ = "LISA Lab"
__email__ = "pylearn-dev@googlegroups"
from nose.plugins.skip import SkipT... | """
Helper functions for determining which tests to skip.
"""
__authors__ = "Ian Goodfellow"
__copyright__ = "Copyright 2010-2012, Universite de Montreal"
__credits__ = ["Ian Goodfellow"]
__license__ = "3-clause BSD"
__maintainer__ = "LISA Lab"
__email__ = "pylearn-dev@googlegroups"
from nose.plugins.skip import SkipT... | Add SkipTest for when matplotlib and/or pyplot are not present | Add SkipTest for when matplotlib and/or pyplot are not present
| Python | bsd-3-clause | CIFASIS/pylearn2,lisa-lab/pylearn2,msingh172/pylearn2,w1kke/pylearn2,lamblin/pylearn2,bartvm/pylearn2,sandeepkbhat/pylearn2,cosmoharrigan/pylearn2,jeremyfix/pylearn2,mkraemer67/pylearn2,jamessergeant/pylearn2,junbochen/pylearn2,TNick/pylearn2,hantek/pylearn2,nouiz/pylearn2,aalmah/pylearn2,skearnes/pylearn2,kose-y/pylea... | """
Helper functions for determining which tests to skip.
"""
__authors__ = "Ian Goodfellow"
__copyright__ = "Copyright 2010-2012, Universite de Montreal"
__credits__ = ["Ian Goodfellow"]
__license__ = "3-clause BSD"
__maintainer__ = "LISA Lab"
__email__ = "pylearn-dev@googlegroups"
from nose.plugins.skip import SkipT... | """
Helper functions for determining which tests to skip.
"""
__authors__ = "Ian Goodfellow"
__copyright__ = "Copyright 2010-2012, Universite de Montreal"
__credits__ = ["Ian Goodfellow"]
__license__ = "3-clause BSD"
__maintainer__ = "LISA Lab"
__email__ = "pylearn-dev@googlegroups"
from nose.plugins.skip import SkipT... | <commit_before>"""
Helper functions for determining which tests to skip.
"""
__authors__ = "Ian Goodfellow"
__copyright__ = "Copyright 2010-2012, Universite de Montreal"
__credits__ = ["Ian Goodfellow"]
__license__ = "3-clause BSD"
__maintainer__ = "LISA Lab"
__email__ = "pylearn-dev@googlegroups"
from nose.plugins.sk... | """
Helper functions for determining which tests to skip.
"""
__authors__ = "Ian Goodfellow"
__copyright__ = "Copyright 2010-2012, Universite de Montreal"
__credits__ = ["Ian Goodfellow"]
__license__ = "3-clause BSD"
__maintainer__ = "LISA Lab"
__email__ = "pylearn-dev@googlegroups"
from nose.plugins.skip import SkipT... | """
Helper functions for determining which tests to skip.
"""
__authors__ = "Ian Goodfellow"
__copyright__ = "Copyright 2010-2012, Universite de Montreal"
__credits__ = ["Ian Goodfellow"]
__license__ = "3-clause BSD"
__maintainer__ = "LISA Lab"
__email__ = "pylearn-dev@googlegroups"
from nose.plugins.skip import SkipT... | <commit_before>"""
Helper functions for determining which tests to skip.
"""
__authors__ = "Ian Goodfellow"
__copyright__ = "Copyright 2010-2012, Universite de Montreal"
__credits__ = ["Ian Goodfellow"]
__license__ = "3-clause BSD"
__maintainer__ = "LISA Lab"
__email__ = "pylearn-dev@googlegroups"
from nose.plugins.sk... |
817aa49dc7abc73863560c510cd81a2fad8f854b | python/servo/packages.py | python/servo/packages.py | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at https://mozilla.org/MPL/2.0/.
WINDOWS_MSVC = {
"cmake": "3.7.2",
"llvm": "7.0.0",
"moztools": "3.2",
"ninja": "1.7.1",
"openssl":... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at https://mozilla.org/MPL/2.0/.
WINDOWS_MSVC = {
"cmake": "3.14.3",
"llvm": "7.0.0",
"moztools": "3.2",
"ninja": "1.7.1",
"openssl"... | Update cmake for MSVC builds. | Update cmake for MSVC builds. | Python | mpl-2.0 | emilio/servo,saneyuki/servo,KiChjang/servo,DominoTree/servo,pyfisch/servo,splav/servo,KiChjang/servo,emilio/servo,splav/servo,emilio/servo,paulrouget/servo,larsbergstrom/servo,notriddle/servo,DominoTree/servo,nnethercote/servo,saneyuki/servo,paulrouget/servo,KiChjang/servo,saneyuki/servo,nnethercote/servo,DominoTree/se... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at https://mozilla.org/MPL/2.0/.
WINDOWS_MSVC = {
"cmake": "3.7.2",
"llvm": "7.0.0",
"moztools": "3.2",
"ninja": "1.7.1",
"openssl":... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at https://mozilla.org/MPL/2.0/.
WINDOWS_MSVC = {
"cmake": "3.14.3",
"llvm": "7.0.0",
"moztools": "3.2",
"ninja": "1.7.1",
"openssl"... | <commit_before># This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at https://mozilla.org/MPL/2.0/.
WINDOWS_MSVC = {
"cmake": "3.7.2",
"llvm": "7.0.0",
"moztools": "3.2",
"ninja": "1.7.1",... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at https://mozilla.org/MPL/2.0/.
WINDOWS_MSVC = {
"cmake": "3.14.3",
"llvm": "7.0.0",
"moztools": "3.2",
"ninja": "1.7.1",
"openssl"... | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at https://mozilla.org/MPL/2.0/.
WINDOWS_MSVC = {
"cmake": "3.7.2",
"llvm": "7.0.0",
"moztools": "3.2",
"ninja": "1.7.1",
"openssl":... | <commit_before># This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at https://mozilla.org/MPL/2.0/.
WINDOWS_MSVC = {
"cmake": "3.7.2",
"llvm": "7.0.0",
"moztools": "3.2",
"ninja": "1.7.1",... |
1212d33d849155f8c1cdc6a610e893318937e7c5 | silk/webdoc/html/v5.py | silk/webdoc/html/v5.py |
"""Module containing only html v5 tags. All deprecated tags have been removed.
"""
from .common import *
del ACRONYM
del APPLET
del BASEFONT
del BIG
del CENTER
del DIR
del FONT
del FRAME
del FRAMESET
del NOFRAMES
del STRIKE
del TT
del U
|
"""
Module containing only html v5 tags. All deprecated tags have been removed.
"""
from .common import ( # flake8: noqa
A,
ABBR,
# ACRONYM,
ADDRESS,
# APPLET,
AREA,
B,
BASE,
# BASEFONT,
BDO,
# BIG,
BLOCKQUOTE,
BODY,
BR,
BUTTON,
Body,
CAPTION,
C... | Replace import * with explicit names | Replace import * with explicit names
| Python | bsd-3-clause | orbnauticus/silk |
"""Module containing only html v5 tags. All deprecated tags have been removed.
"""
from .common import *
del ACRONYM
del APPLET
del BASEFONT
del BIG
del CENTER
del DIR
del FONT
del FRAME
del FRAMESET
del NOFRAMES
del STRIKE
del TT
del U
Replace import * with explicit names |
"""
Module containing only html v5 tags. All deprecated tags have been removed.
"""
from .common import ( # flake8: noqa
A,
ABBR,
# ACRONYM,
ADDRESS,
# APPLET,
AREA,
B,
BASE,
# BASEFONT,
BDO,
# BIG,
BLOCKQUOTE,
BODY,
BR,
BUTTON,
Body,
CAPTION,
C... | <commit_before>
"""Module containing only html v5 tags. All deprecated tags have been removed.
"""
from .common import *
del ACRONYM
del APPLET
del BASEFONT
del BIG
del CENTER
del DIR
del FONT
del FRAME
del FRAMESET
del NOFRAMES
del STRIKE
del TT
del U
<commit_msg>Replace import * with explicit names<commit_after> |
"""
Module containing only html v5 tags. All deprecated tags have been removed.
"""
from .common import ( # flake8: noqa
A,
ABBR,
# ACRONYM,
ADDRESS,
# APPLET,
AREA,
B,
BASE,
# BASEFONT,
BDO,
# BIG,
BLOCKQUOTE,
BODY,
BR,
BUTTON,
Body,
CAPTION,
C... |
"""Module containing only html v5 tags. All deprecated tags have been removed.
"""
from .common import *
del ACRONYM
del APPLET
del BASEFONT
del BIG
del CENTER
del DIR
del FONT
del FRAME
del FRAMESET
del NOFRAMES
del STRIKE
del TT
del U
Replace import * with explicit names
"""
Module containing only html v5 tags. Al... | <commit_before>
"""Module containing only html v5 tags. All deprecated tags have been removed.
"""
from .common import *
del ACRONYM
del APPLET
del BASEFONT
del BIG
del CENTER
del DIR
del FONT
del FRAME
del FRAMESET
del NOFRAMES
del STRIKE
del TT
del U
<commit_msg>Replace import * with explicit names<commit_after>
""... |
0c8835bb4ab1715ee0de948d9b15a813752b60b5 | dthm4kaiako/gunicorn.conf.py | dthm4kaiako/gunicorn.conf.py | """Configuration file for gunicorn."""
# Details from https://cloud.google.com/appengine/docs/flexible/python/runtime
worker_class = "gevent"
forwarded_allow_ips = "*"
secure_scheme_headers = {"X-APPENGINE-HTTPS": "on"}
| """Configuration file for gunicorn."""
from multiprocessing import cpu_count
# Worker count from http://docs.gunicorn.org/en/stable/design.html#how-many-workers
workers = cpu_count() * 2 + 1
# Details from https://cloud.google.com/appengine/docs/flexible/python/runtime
worker_class = "gevent"
forwarded_allow_ips = "*... | Increase number of server workers | Increase number of server workers
| Python | mit | uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers | """Configuration file for gunicorn."""
# Details from https://cloud.google.com/appengine/docs/flexible/python/runtime
worker_class = "gevent"
forwarded_allow_ips = "*"
secure_scheme_headers = {"X-APPENGINE-HTTPS": "on"}
Increase number of server workers | """Configuration file for gunicorn."""
from multiprocessing import cpu_count
# Worker count from http://docs.gunicorn.org/en/stable/design.html#how-many-workers
workers = cpu_count() * 2 + 1
# Details from https://cloud.google.com/appengine/docs/flexible/python/runtime
worker_class = "gevent"
forwarded_allow_ips = "*... | <commit_before>"""Configuration file for gunicorn."""
# Details from https://cloud.google.com/appengine/docs/flexible/python/runtime
worker_class = "gevent"
forwarded_allow_ips = "*"
secure_scheme_headers = {"X-APPENGINE-HTTPS": "on"}
<commit_msg>Increase number of server workers<commit_after> | """Configuration file for gunicorn."""
from multiprocessing import cpu_count
# Worker count from http://docs.gunicorn.org/en/stable/design.html#how-many-workers
workers = cpu_count() * 2 + 1
# Details from https://cloud.google.com/appengine/docs/flexible/python/runtime
worker_class = "gevent"
forwarded_allow_ips = "*... | """Configuration file for gunicorn."""
# Details from https://cloud.google.com/appengine/docs/flexible/python/runtime
worker_class = "gevent"
forwarded_allow_ips = "*"
secure_scheme_headers = {"X-APPENGINE-HTTPS": "on"}
Increase number of server workers"""Configuration file for gunicorn."""
from multiprocessing impor... | <commit_before>"""Configuration file for gunicorn."""
# Details from https://cloud.google.com/appengine/docs/flexible/python/runtime
worker_class = "gevent"
forwarded_allow_ips = "*"
secure_scheme_headers = {"X-APPENGINE-HTTPS": "on"}
<commit_msg>Increase number of server workers<commit_after>"""Configuration file for... |
40e9375f6b35b4a05ad311822705b7a7efe46b56 | site_scons/get_libs.py | site_scons/get_libs.py | import os
import sys
from SCons.Script import File
from path_helpers import path
def get_lib_paths():
if sys.platform == 'win32':
lib_paths = set(os.environ['PATH'].split(';'))
else:
lib_paths = set()
if os.environ.has_key('LIBRARY_PATH'):
lib_paths.update(os.environ['LIB... | import os
import sys
from SCons.Script import File
from path_helpers import path
def get_lib_paths():
if sys.platform == 'win32':
lib_paths = set(os.environ['PATH'].split(';'))
else:
lib_paths = set()
if os.environ.has_key('LIBRARY_PATH'):
lib_paths.update(os.environ['LIB... | Add Linux 32-bit search path for Boost libraries | Add Linux 32-bit search path for Boost libraries
| Python | bsd-3-clause | wheeler-microfluidics/dmf-control-board-firmware,wheeler-microfluidics/dmf-control-board-firmware,wheeler-microfluidics/dmf-control-board-firmware,wheeler-microfluidics/dmf-control-board-firmware | import os
import sys
from SCons.Script import File
from path_helpers import path
def get_lib_paths():
if sys.platform == 'win32':
lib_paths = set(os.environ['PATH'].split(';'))
else:
lib_paths = set()
if os.environ.has_key('LIBRARY_PATH'):
lib_paths.update(os.environ['LIB... | import os
import sys
from SCons.Script import File
from path_helpers import path
def get_lib_paths():
if sys.platform == 'win32':
lib_paths = set(os.environ['PATH'].split(';'))
else:
lib_paths = set()
if os.environ.has_key('LIBRARY_PATH'):
lib_paths.update(os.environ['LIB... | <commit_before>import os
import sys
from SCons.Script import File
from path_helpers import path
def get_lib_paths():
if sys.platform == 'win32':
lib_paths = set(os.environ['PATH'].split(';'))
else:
lib_paths = set()
if os.environ.has_key('LIBRARY_PATH'):
lib_paths.update(... | import os
import sys
from SCons.Script import File
from path_helpers import path
def get_lib_paths():
if sys.platform == 'win32':
lib_paths = set(os.environ['PATH'].split(';'))
else:
lib_paths = set()
if os.environ.has_key('LIBRARY_PATH'):
lib_paths.update(os.environ['LIB... | import os
import sys
from SCons.Script import File
from path_helpers import path
def get_lib_paths():
if sys.platform == 'win32':
lib_paths = set(os.environ['PATH'].split(';'))
else:
lib_paths = set()
if os.environ.has_key('LIBRARY_PATH'):
lib_paths.update(os.environ['LIB... | <commit_before>import os
import sys
from SCons.Script import File
from path_helpers import path
def get_lib_paths():
if sys.platform == 'win32':
lib_paths = set(os.environ['PATH'].split(';'))
else:
lib_paths = set()
if os.environ.has_key('LIBRARY_PATH'):
lib_paths.update(... |
90d8411412b79513338b014da63b18d0d29396d9 | snmpy/log_processor.py | snmpy/log_processor.py | import re, snmpy_plugins
class log_processor:
def __init__(self, conf):
self.data = [{'value':0, 'label': conf['objects'][item]['label'], 'regex': re.compile(conf['objects'][item]['regex'])} for item in sorted(conf['objects'])]
self.proc(conf['logfile'])
def len(self):
return len(self.... | import re
import snmpy
class log_processor(snmpy.plugin):
def __init__(self, conf, script=False):
snmpy.plugin.__init__(self, conf, script)
def key(self, idx):
return 'string', self.data[idx - 1]['label']
def val(self, idx):
return 'integer', self.data[idx - 1]['value']
def w... | Convert to use the base class and update for new plugin path. | Convert to use the base class and update for new plugin path.
| Python | mit | mk23/snmpy,mk23/snmpy | import re, snmpy_plugins
class log_processor:
def __init__(self, conf):
self.data = [{'value':0, 'label': conf['objects'][item]['label'], 'regex': re.compile(conf['objects'][item]['regex'])} for item in sorted(conf['objects'])]
self.proc(conf['logfile'])
def len(self):
return len(self.... | import re
import snmpy
class log_processor(snmpy.plugin):
def __init__(self, conf, script=False):
snmpy.plugin.__init__(self, conf, script)
def key(self, idx):
return 'string', self.data[idx - 1]['label']
def val(self, idx):
return 'integer', self.data[idx - 1]['value']
def w... | <commit_before>import re, snmpy_plugins
class log_processor:
def __init__(self, conf):
self.data = [{'value':0, 'label': conf['objects'][item]['label'], 'regex': re.compile(conf['objects'][item]['regex'])} for item in sorted(conf['objects'])]
self.proc(conf['logfile'])
def len(self):
r... | import re
import snmpy
class log_processor(snmpy.plugin):
def __init__(self, conf, script=False):
snmpy.plugin.__init__(self, conf, script)
def key(self, idx):
return 'string', self.data[idx - 1]['label']
def val(self, idx):
return 'integer', self.data[idx - 1]['value']
def w... | import re, snmpy_plugins
class log_processor:
def __init__(self, conf):
self.data = [{'value':0, 'label': conf['objects'][item]['label'], 'regex': re.compile(conf['objects'][item]['regex'])} for item in sorted(conf['objects'])]
self.proc(conf['logfile'])
def len(self):
return len(self.... | <commit_before>import re, snmpy_plugins
class log_processor:
def __init__(self, conf):
self.data = [{'value':0, 'label': conf['objects'][item]['label'], 'regex': re.compile(conf['objects'][item]['regex'])} for item in sorted(conf['objects'])]
self.proc(conf['logfile'])
def len(self):
r... |
34330aec6cf0c038d47c43ef926fa615bd568ea3 | sqlservice/__init__.py | sqlservice/__init__.py | # -*- coding: utf-8 -*-
"""The sqlservice package.
"""
from .__pkg__ import (
__description__,
__url__,
__version__,
__author__,
__email__,
__license__
)
from .client import SQLClient
from .model import ModelBase, declarative_base
from .query import Query
from .service import SQLService
| # -*- coding: utf-8 -*-
"""The sqlservice package.
"""
from .__pkg__ import (
__description__,
__url__,
__version__,
__author__,
__email__,
__license__
)
from .client import SQLClient
from .model import ModelBase, declarative_base
from .service import SQLService
from . import event
| Remove Query from import and add explicit event module import. | Remove Query from import and add explicit event module import.
| Python | mit | dgilland/sqlservice | # -*- coding: utf-8 -*-
"""The sqlservice package.
"""
from .__pkg__ import (
__description__,
__url__,
__version__,
__author__,
__email__,
__license__
)
from .client import SQLClient
from .model import ModelBase, declarative_base
from .query import Query
from .service import SQLService
Remove... | # -*- coding: utf-8 -*-
"""The sqlservice package.
"""
from .__pkg__ import (
__description__,
__url__,
__version__,
__author__,
__email__,
__license__
)
from .client import SQLClient
from .model import ModelBase, declarative_base
from .service import SQLService
from . import event
| <commit_before># -*- coding: utf-8 -*-
"""The sqlservice package.
"""
from .__pkg__ import (
__description__,
__url__,
__version__,
__author__,
__email__,
__license__
)
from .client import SQLClient
from .model import ModelBase, declarative_base
from .query import Query
from .service import SQ... | # -*- coding: utf-8 -*-
"""The sqlservice package.
"""
from .__pkg__ import (
__description__,
__url__,
__version__,
__author__,
__email__,
__license__
)
from .client import SQLClient
from .model import ModelBase, declarative_base
from .service import SQLService
from . import event
| # -*- coding: utf-8 -*-
"""The sqlservice package.
"""
from .__pkg__ import (
__description__,
__url__,
__version__,
__author__,
__email__,
__license__
)
from .client import SQLClient
from .model import ModelBase, declarative_base
from .query import Query
from .service import SQLService
Remove... | <commit_before># -*- coding: utf-8 -*-
"""The sqlservice package.
"""
from .__pkg__ import (
__description__,
__url__,
__version__,
__author__,
__email__,
__license__
)
from .client import SQLClient
from .model import ModelBase, declarative_base
from .query import Query
from .service import SQ... |
b61ded5a1f59eca7838219d9e904941bd04aa064 | lib/euedb.py | lib/euedb.py | #!/usr/bin/python
# -*- coding: <encoding name> -*-
import os
import sys
import time
import re
import MySQLdb
from MySQLdb import cursors
class mysql:
cn = None
host = None
port = None
user = None
passw = None
def __init__(self, host, user, passw, db, port=3306):
self.port = port
... | #!/usr/bin/python
# -*- coding: <encoding name> -*-
import os
import sys
import time
import re
import MySQLdb
from MySQLdb import cursors
class mysql:
cn = None
host = None
port = None
user = None
passw = None
connected = False
def __init__(self, host, user, passw, db, port=3306):
... | Add better connection management ... | Add better connection management ...
| Python | agpl-3.0 | david-guenault/eue-ng,david-guenault/eue-ng,david-guenault/eue-ng,david-guenault/eue-ng,david-guenault/eue-ng,david-guenault/eue-ng | #!/usr/bin/python
# -*- coding: <encoding name> -*-
import os
import sys
import time
import re
import MySQLdb
from MySQLdb import cursors
class mysql:
cn = None
host = None
port = None
user = None
passw = None
def __init__(self, host, user, passw, db, port=3306):
self.port = port
... | #!/usr/bin/python
# -*- coding: <encoding name> -*-
import os
import sys
import time
import re
import MySQLdb
from MySQLdb import cursors
class mysql:
cn = None
host = None
port = None
user = None
passw = None
connected = False
def __init__(self, host, user, passw, db, port=3306):
... | <commit_before>#!/usr/bin/python
# -*- coding: <encoding name> -*-
import os
import sys
import time
import re
import MySQLdb
from MySQLdb import cursors
class mysql:
cn = None
host = None
port = None
user = None
passw = None
def __init__(self, host, user, passw, db, port=3306):
sel... | #!/usr/bin/python
# -*- coding: <encoding name> -*-
import os
import sys
import time
import re
import MySQLdb
from MySQLdb import cursors
class mysql:
cn = None
host = None
port = None
user = None
passw = None
connected = False
def __init__(self, host, user, passw, db, port=3306):
... | #!/usr/bin/python
# -*- coding: <encoding name> -*-
import os
import sys
import time
import re
import MySQLdb
from MySQLdb import cursors
class mysql:
cn = None
host = None
port = None
user = None
passw = None
def __init__(self, host, user, passw, db, port=3306):
self.port = port
... | <commit_before>#!/usr/bin/python
# -*- coding: <encoding name> -*-
import os
import sys
import time
import re
import MySQLdb
from MySQLdb import cursors
class mysql:
cn = None
host = None
port = None
user = None
passw = None
def __init__(self, host, user, passw, db, port=3306):
sel... |
9c24dfc6a6207c9688332a16ee1600b73aec44d8 | narcis/urls.py | narcis/urls.py | from django.conf.urls import patterns, include, url
from django.views.generic.base import RedirectView
from django.conf import settings
from django.contrib import admin
admin.autodiscover()
from . import views
from projects.views import screenshot
urlpatterns = patterns('',
# Examples:
# url(r'^blog/', inclu... | from django.conf.urls import patterns, include, url
from django.views.generic.base import RedirectView
from django.conf import settings
from django.contrib import admin
admin.autodiscover()
from . import views
from projects.views import screenshot
urlpatterns = patterns('',
# Examples:
# url(r'^blog/', inclu... | Add URL for django admin access to screenshots | Add URL for django admin access to screenshots
| Python | mit | deckar01/narcis,deckar01/narcis,deckar01/narcis | from django.conf.urls import patterns, include, url
from django.views.generic.base import RedirectView
from django.conf import settings
from django.contrib import admin
admin.autodiscover()
from . import views
from projects.views import screenshot
urlpatterns = patterns('',
# Examples:
# url(r'^blog/', inclu... | from django.conf.urls import patterns, include, url
from django.views.generic.base import RedirectView
from django.conf import settings
from django.contrib import admin
admin.autodiscover()
from . import views
from projects.views import screenshot
urlpatterns = patterns('',
# Examples:
# url(r'^blog/', inclu... | <commit_before>from django.conf.urls import patterns, include, url
from django.views.generic.base import RedirectView
from django.conf import settings
from django.contrib import admin
admin.autodiscover()
from . import views
from projects.views import screenshot
urlpatterns = patterns('',
# Examples:
# url(r... | from django.conf.urls import patterns, include, url
from django.views.generic.base import RedirectView
from django.conf import settings
from django.contrib import admin
admin.autodiscover()
from . import views
from projects.views import screenshot
urlpatterns = patterns('',
# Examples:
# url(r'^blog/', inclu... | from django.conf.urls import patterns, include, url
from django.views.generic.base import RedirectView
from django.conf import settings
from django.contrib import admin
admin.autodiscover()
from . import views
from projects.views import screenshot
urlpatterns = patterns('',
# Examples:
# url(r'^blog/', inclu... | <commit_before>from django.conf.urls import patterns, include, url
from django.views.generic.base import RedirectView
from django.conf import settings
from django.contrib import admin
admin.autodiscover()
from . import views
from projects.views import screenshot
urlpatterns = patterns('',
# Examples:
# url(r... |
94c0c60172c1114d6f0938de88af67ae7203ae95 | pi_setup/system.py | pi_setup/system.py | #!/usr/bin/env python
import subprocess
def main():
subprocess.call(["apt-get", "update"])
subprocess.call(["apt-get", "-y", "upgrade"])
subprocess.call(["apt-get", "-y", "install", "python-dev"])
subprocess.call(["apt-get", "-y", "install", "python-pip"])
subprocess.call(["apt-get", "-y", "instal... | #!/usr/bin/env python
import subprocess
def main():
subprocess.call(["apt-get", "update"])
subprocess.call(["apt-get", "-y", "upgrade"])
subprocess.call(["apt-get", "-y", "install", "python-dev"])
subprocess.call(["apt-get", "-y", "install", "python-pip"])
subprocess.call(["apt-get", "-y", "instal... | Add python to install script | Add python to install script
| Python | mit | projectweekend/Pi-Setup,projectweekend/Pi-Setup | #!/usr/bin/env python
import subprocess
def main():
subprocess.call(["apt-get", "update"])
subprocess.call(["apt-get", "-y", "upgrade"])
subprocess.call(["apt-get", "-y", "install", "python-dev"])
subprocess.call(["apt-get", "-y", "install", "python-pip"])
subprocess.call(["apt-get", "-y", "instal... | #!/usr/bin/env python
import subprocess
def main():
subprocess.call(["apt-get", "update"])
subprocess.call(["apt-get", "-y", "upgrade"])
subprocess.call(["apt-get", "-y", "install", "python-dev"])
subprocess.call(["apt-get", "-y", "install", "python-pip"])
subprocess.call(["apt-get", "-y", "instal... | <commit_before>#!/usr/bin/env python
import subprocess
def main():
subprocess.call(["apt-get", "update"])
subprocess.call(["apt-get", "-y", "upgrade"])
subprocess.call(["apt-get", "-y", "install", "python-dev"])
subprocess.call(["apt-get", "-y", "install", "python-pip"])
subprocess.call(["apt-get"... | #!/usr/bin/env python
import subprocess
def main():
subprocess.call(["apt-get", "update"])
subprocess.call(["apt-get", "-y", "upgrade"])
subprocess.call(["apt-get", "-y", "install", "python-dev"])
subprocess.call(["apt-get", "-y", "install", "python-pip"])
subprocess.call(["apt-get", "-y", "instal... | #!/usr/bin/env python
import subprocess
def main():
subprocess.call(["apt-get", "update"])
subprocess.call(["apt-get", "-y", "upgrade"])
subprocess.call(["apt-get", "-y", "install", "python-dev"])
subprocess.call(["apt-get", "-y", "install", "python-pip"])
subprocess.call(["apt-get", "-y", "instal... | <commit_before>#!/usr/bin/env python
import subprocess
def main():
subprocess.call(["apt-get", "update"])
subprocess.call(["apt-get", "-y", "upgrade"])
subprocess.call(["apt-get", "-y", "install", "python-dev"])
subprocess.call(["apt-get", "-y", "install", "python-pip"])
subprocess.call(["apt-get"... |
9d3750881eaa215f6d06087e6d0f7b6d223c3cd1 | feincms3/plugins/richtext.py | feincms3/plugins/richtext.py | from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.html import strip_tags
from django.utils.text import Truncator
from django.utils.translation import ugettext_lazy as _
from content_editor.admin import ContentEditorInli... | from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.html import strip_tags
from django.utils.text import Truncator
from django.utils.translation import ugettext_lazy as _
from content_editor.admin import ContentEditorInli... | Document the rich text plugin | Document the rich text plugin
| Python | bsd-3-clause | matthiask/feincms3,matthiask/feincms3,matthiask/feincms3 | from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.html import strip_tags
from django.utils.text import Truncator
from django.utils.translation import ugettext_lazy as _
from content_editor.admin import ContentEditorInli... | from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.html import strip_tags
from django.utils.text import Truncator
from django.utils.translation import ugettext_lazy as _
from content_editor.admin import ContentEditorInli... | <commit_before>from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.html import strip_tags
from django.utils.text import Truncator
from django.utils.translation import ugettext_lazy as _
from content_editor.admin import Co... | from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.html import strip_tags
from django.utils.text import Truncator
from django.utils.translation import ugettext_lazy as _
from content_editor.admin import ContentEditorInli... | from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.html import strip_tags
from django.utils.text import Truncator
from django.utils.translation import ugettext_lazy as _
from content_editor.admin import ContentEditorInli... | <commit_before>from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.html import strip_tags
from django.utils.text import Truncator
from django.utils.translation import ugettext_lazy as _
from content_editor.admin import Co... |
c6d589859d621ac0eb2b4843a22cfe8e011bbeaf | braid/postgres.py | braid/postgres.py | from fabric.api import sudo, hide
from braid import package
from pipes import quote
def install():
package.install(['postgresql-9.1', 'postgresql-server-dev-9.1'])
def _runQuery(query):
with hide('running', 'output'):
return sudo('psql --no-align --no-readline --no-password --quiet '
... | from fabric.api import sudo, hide
from braid import package
from pipes import quote
def install():
package.install(['postgresql-9.1', 'postgresql-server-dev-9.1'])
def _runQuery(query, database=None):
with hide('running', 'output'):
database = '--dbname={}'.format(database) if database else ''
... | Allow to specify a database when running a query | Allow to specify a database when running a query
| Python | mit | alex/braid,alex/braid | from fabric.api import sudo, hide
from braid import package
from pipes import quote
def install():
package.install(['postgresql-9.1', 'postgresql-server-dev-9.1'])
def _runQuery(query):
with hide('running', 'output'):
return sudo('psql --no-align --no-readline --no-password --quiet '
... | from fabric.api import sudo, hide
from braid import package
from pipes import quote
def install():
package.install(['postgresql-9.1', 'postgresql-server-dev-9.1'])
def _runQuery(query, database=None):
with hide('running', 'output'):
database = '--dbname={}'.format(database) if database else ''
... | <commit_before>from fabric.api import sudo, hide
from braid import package
from pipes import quote
def install():
package.install(['postgresql-9.1', 'postgresql-server-dev-9.1'])
def _runQuery(query):
with hide('running', 'output'):
return sudo('psql --no-align --no-readline --no-password --quiet '
... | from fabric.api import sudo, hide
from braid import package
from pipes import quote
def install():
package.install(['postgresql-9.1', 'postgresql-server-dev-9.1'])
def _runQuery(query, database=None):
with hide('running', 'output'):
database = '--dbname={}'.format(database) if database else ''
... | from fabric.api import sudo, hide
from braid import package
from pipes import quote
def install():
package.install(['postgresql-9.1', 'postgresql-server-dev-9.1'])
def _runQuery(query):
with hide('running', 'output'):
return sudo('psql --no-align --no-readline --no-password --quiet '
... | <commit_before>from fabric.api import sudo, hide
from braid import package
from pipes import quote
def install():
package.install(['postgresql-9.1', 'postgresql-server-dev-9.1'])
def _runQuery(query):
with hide('running', 'output'):
return sudo('psql --no-align --no-readline --no-password --quiet '
... |
e2f2541d909861e140030d50cc1981697118bf2e | webvtt/parser.py | webvtt/parser.py | from .exceptions import MalformedFileError
class WebVTTParser:
def _parse(self, content):
self.content = content
def read(self, file):
with open(file, encoding='utf-8') as f:
self._parse(f.readlines())
if not self.is_valid():
raise MalformedFileError
... | from .exceptions import MalformedFileError
class WebVTTParser:
def _parse(self, content):
self.content = content
def read(self, file):
with open(file, encoding='utf-8') as f:
self._parse(f.readlines())
if not self.is_valid():
raise MalformedFileError('The file... | Add message to malformed exception | Add message to malformed exception
| Python | mit | glut23/webvtt-py,sampattuzzi/webvtt-py | from .exceptions import MalformedFileError
class WebVTTParser:
def _parse(self, content):
self.content = content
def read(self, file):
with open(file, encoding='utf-8') as f:
self._parse(f.readlines())
if not self.is_valid():
raise MalformedFileError
... | from .exceptions import MalformedFileError
class WebVTTParser:
def _parse(self, content):
self.content = content
def read(self, file):
with open(file, encoding='utf-8') as f:
self._parse(f.readlines())
if not self.is_valid():
raise MalformedFileError('The file... | <commit_before>from .exceptions import MalformedFileError
class WebVTTParser:
def _parse(self, content):
self.content = content
def read(self, file):
with open(file, encoding='utf-8') as f:
self._parse(f.readlines())
if not self.is_valid():
raise MalformedFile... | from .exceptions import MalformedFileError
class WebVTTParser:
def _parse(self, content):
self.content = content
def read(self, file):
with open(file, encoding='utf-8') as f:
self._parse(f.readlines())
if not self.is_valid():
raise MalformedFileError('The file... | from .exceptions import MalformedFileError
class WebVTTParser:
def _parse(self, content):
self.content = content
def read(self, file):
with open(file, encoding='utf-8') as f:
self._parse(f.readlines())
if not self.is_valid():
raise MalformedFileError
... | <commit_before>from .exceptions import MalformedFileError
class WebVTTParser:
def _parse(self, content):
self.content = content
def read(self, file):
with open(file, encoding='utf-8') as f:
self._parse(f.readlines())
if not self.is_valid():
raise MalformedFile... |
bc8aa0f8aab15dd704fd34f836464d5e7397c08e | SessionTools/features_JSON.py | SessionTools/features_JSON.py | import json
def getVersion(b64decodedData):
json_map = json.loads(b64decodedData)
if not json_map.has_key("View"):
return None
return json.loads(b64decodedData)["View"]["Dynamo"]["Version"]
def usesListAtLevel(data):
usesList = data.find('"UseLevels": true') > -1
return usesList | # Feature extractors for JSON files (Dynamo 2+)
import json
def getVersion(b64decodedData):
json_map = json.loads(b64decodedData)
if not json_map.has_key("View"):
return None
return json.loads(b64decodedData)["View"]["Dynamo"]["Version"]
def usesListAtLevel(data):
usesList = data.find('"UseLe... | Add structure for feature extractors for JSON files | Add structure for feature extractors for JSON files
| Python | mit | DynamoDS/Coulomb,DynamoDS/Coulomb,DynamoDS/Coulomb | import json
def getVersion(b64decodedData):
json_map = json.loads(b64decodedData)
if not json_map.has_key("View"):
return None
return json.loads(b64decodedData)["View"]["Dynamo"]["Version"]
def usesListAtLevel(data):
usesList = data.find('"UseLevels": true') > -1
return usesListAdd structu... | # Feature extractors for JSON files (Dynamo 2+)
import json
def getVersion(b64decodedData):
json_map = json.loads(b64decodedData)
if not json_map.has_key("View"):
return None
return json.loads(b64decodedData)["View"]["Dynamo"]["Version"]
def usesListAtLevel(data):
usesList = data.find('"UseLe... | <commit_before>import json
def getVersion(b64decodedData):
json_map = json.loads(b64decodedData)
if not json_map.has_key("View"):
return None
return json.loads(b64decodedData)["View"]["Dynamo"]["Version"]
def usesListAtLevel(data):
usesList = data.find('"UseLevels": true') > -1
return uses... | # Feature extractors for JSON files (Dynamo 2+)
import json
def getVersion(b64decodedData):
json_map = json.loads(b64decodedData)
if not json_map.has_key("View"):
return None
return json.loads(b64decodedData)["View"]["Dynamo"]["Version"]
def usesListAtLevel(data):
usesList = data.find('"UseLe... | import json
def getVersion(b64decodedData):
json_map = json.loads(b64decodedData)
if not json_map.has_key("View"):
return None
return json.loads(b64decodedData)["View"]["Dynamo"]["Version"]
def usesListAtLevel(data):
usesList = data.find('"UseLevels": true') > -1
return usesListAdd structu... | <commit_before>import json
def getVersion(b64decodedData):
json_map = json.loads(b64decodedData)
if not json_map.has_key("View"):
return None
return json.loads(b64decodedData)["View"]["Dynamo"]["Version"]
def usesListAtLevel(data):
usesList = data.find('"UseLevels": true') > -1
return uses... |
dd6a446a9a1ce2624769e276ddb0700da909334b | pep438/core.py | pep438/core.py | """Core pep438 utility functions"""
from __future__ import unicode_literals
import requests
try:
import xmlrpclib
except:
import xmlrpc.client as xmlrpclib # noqa
from xml.etree import ElementTree
from requirements import parse
def valid_package(package_name):
"""Return bool if package_name is a valid p... | """Core pep438 utility functions"""
from __future__ import unicode_literals
import requests
try:
import xmlrpclib
except:
import xmlrpc.client as xmlrpclib # noqa
from xml.etree import ElementTree
from requirements import parse
def valid_package(package_name):
"""Return bool if package_name is a valid p... | Fix get_pypi_packages for new requirements-parser | Fix get_pypi_packages for new requirements-parser
| Python | mit | treyhunner/pep438 | """Core pep438 utility functions"""
from __future__ import unicode_literals
import requests
try:
import xmlrpclib
except:
import xmlrpc.client as xmlrpclib # noqa
from xml.etree import ElementTree
from requirements import parse
def valid_package(package_name):
"""Return bool if package_name is a valid p... | """Core pep438 utility functions"""
from __future__ import unicode_literals
import requests
try:
import xmlrpclib
except:
import xmlrpc.client as xmlrpclib # noqa
from xml.etree import ElementTree
from requirements import parse
def valid_package(package_name):
"""Return bool if package_name is a valid p... | <commit_before>"""Core pep438 utility functions"""
from __future__ import unicode_literals
import requests
try:
import xmlrpclib
except:
import xmlrpc.client as xmlrpclib # noqa
from xml.etree import ElementTree
from requirements import parse
def valid_package(package_name):
"""Return bool if package_na... | """Core pep438 utility functions"""
from __future__ import unicode_literals
import requests
try:
import xmlrpclib
except:
import xmlrpc.client as xmlrpclib # noqa
from xml.etree import ElementTree
from requirements import parse
def valid_package(package_name):
"""Return bool if package_name is a valid p... | """Core pep438 utility functions"""
from __future__ import unicode_literals
import requests
try:
import xmlrpclib
except:
import xmlrpc.client as xmlrpclib # noqa
from xml.etree import ElementTree
from requirements import parse
def valid_package(package_name):
"""Return bool if package_name is a valid p... | <commit_before>"""Core pep438 utility functions"""
from __future__ import unicode_literals
import requests
try:
import xmlrpclib
except:
import xmlrpc.client as xmlrpclib # noqa
from xml.etree import ElementTree
from requirements import parse
def valid_package(package_name):
"""Return bool if package_na... |
746439a977cd556e91424c80cf532e1da8551ae7 | imager/imager_images/urls.py | imager/imager_images/urls.py | from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from imager_images.views import (AlbumCreate, AlbumUpdate, AlbumDelete,
PhotoCreate, PhotoDelete)
urlpatterns = patterns('imager_images.views',
url(r'^upload/$', login_req... | from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from imager_images.views import (AlbumCreate, AlbumUpdate, AlbumDelete,
PhotoCreate, PhotoDelete)
urlpatterns = patterns('imager_images.views',
url(r'^upload/$', login_req... | Change url routes to use primary key instead of id | Change url routes to use primary key instead of id
| Python | mit | nbeck90/django-imager,nbeck90/django-imager | from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from imager_images.views import (AlbumCreate, AlbumUpdate, AlbumDelete,
PhotoCreate, PhotoDelete)
urlpatterns = patterns('imager_images.views',
url(r'^upload/$', login_req... | from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from imager_images.views import (AlbumCreate, AlbumUpdate, AlbumDelete,
PhotoCreate, PhotoDelete)
urlpatterns = patterns('imager_images.views',
url(r'^upload/$', login_req... | <commit_before>from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from imager_images.views import (AlbumCreate, AlbumUpdate, AlbumDelete,
PhotoCreate, PhotoDelete)
urlpatterns = patterns('imager_images.views',
url(r'^uploa... | from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from imager_images.views import (AlbumCreate, AlbumUpdate, AlbumDelete,
PhotoCreate, PhotoDelete)
urlpatterns = patterns('imager_images.views',
url(r'^upload/$', login_req... | from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from imager_images.views import (AlbumCreate, AlbumUpdate, AlbumDelete,
PhotoCreate, PhotoDelete)
urlpatterns = patterns('imager_images.views',
url(r'^upload/$', login_req... | <commit_before>from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from imager_images.views import (AlbumCreate, AlbumUpdate, AlbumDelete,
PhotoCreate, PhotoDelete)
urlpatterns = patterns('imager_images.views',
url(r'^uploa... |
92c70c5f54b6822f0f3815b66852a2771ef5d49c | scheduling/student_invite.py | scheduling/student_invite.py | from aiohttp.web import Application
from db_helper import get_most_recent_group
from mail import send_user_email
from permissions import get_users_with_permission
async def student_invite(app: Application) -> None:
print("Inviting students")
session = app["session"]
group = get_most_recent_group(session)... | from aiohttp.web import Application
from db_helper import get_most_recent_group
from mail import send_user_email
from permissions import get_users_with_permission
async def student_invite(app: Application) -> None:
print("Inviting students")
session = app["session"]
group = get_most_recent_group(session)... | Set group as read only when inviting students | Set group as read only when inviting students
| Python | agpl-3.0 | wtsi-hgi/CoGS-Webapp,wtsi-hgi/CoGS-Webapp,wtsi-hgi/CoGS-Webapp | from aiohttp.web import Application
from db_helper import get_most_recent_group
from mail import send_user_email
from permissions import get_users_with_permission
async def student_invite(app: Application) -> None:
print("Inviting students")
session = app["session"]
group = get_most_recent_group(session)... | from aiohttp.web import Application
from db_helper import get_most_recent_group
from mail import send_user_email
from permissions import get_users_with_permission
async def student_invite(app: Application) -> None:
print("Inviting students")
session = app["session"]
group = get_most_recent_group(session)... | <commit_before>from aiohttp.web import Application
from db_helper import get_most_recent_group
from mail import send_user_email
from permissions import get_users_with_permission
async def student_invite(app: Application) -> None:
print("Inviting students")
session = app["session"]
group = get_most_recent... | from aiohttp.web import Application
from db_helper import get_most_recent_group
from mail import send_user_email
from permissions import get_users_with_permission
async def student_invite(app: Application) -> None:
print("Inviting students")
session = app["session"]
group = get_most_recent_group(session)... | from aiohttp.web import Application
from db_helper import get_most_recent_group
from mail import send_user_email
from permissions import get_users_with_permission
async def student_invite(app: Application) -> None:
print("Inviting students")
session = app["session"]
group = get_most_recent_group(session)... | <commit_before>from aiohttp.web import Application
from db_helper import get_most_recent_group
from mail import send_user_email
from permissions import get_users_with_permission
async def student_invite(app: Application) -> None:
print("Inviting students")
session = app["session"]
group = get_most_recent... |
027ae8b8029d01622e3a9647f3ec6b1fca4c4d9d | chainerrl/wrappers/__init__.py | chainerrl/wrappers/__init__.py | from chainerrl.wrappers.cast_observation import CastObservation # NOQA
from chainerrl.wrappers.cast_observation import CastObservationToFloat32 # NOQA
from chainerrl.wrappers.randomize_action import RandomizeAction # NOQA
from chainerrl.wrappers.scale_reward import ScaleReward # NOQA
| from chainerrl.wrappers.cast_observation import CastObservation # NOQA
from chainerrl.wrappers.cast_observation import CastObservationToFloat32 # NOQA
from chainerrl.wrappers.randomize_action import RandomizeAction # NOQA
from chainerrl.wrappers.render import Render # NOQA
from chainerrl.wrappers.scale_reward im... | Make Render available under chainerrl.wrappers | Make Render available under chainerrl.wrappers
| Python | mit | toslunar/chainerrl,toslunar/chainerrl | from chainerrl.wrappers.cast_observation import CastObservation # NOQA
from chainerrl.wrappers.cast_observation import CastObservationToFloat32 # NOQA
from chainerrl.wrappers.randomize_action import RandomizeAction # NOQA
from chainerrl.wrappers.scale_reward import ScaleReward # NOQA
Make Render available under c... | from chainerrl.wrappers.cast_observation import CastObservation # NOQA
from chainerrl.wrappers.cast_observation import CastObservationToFloat32 # NOQA
from chainerrl.wrappers.randomize_action import RandomizeAction # NOQA
from chainerrl.wrappers.render import Render # NOQA
from chainerrl.wrappers.scale_reward im... | <commit_before>from chainerrl.wrappers.cast_observation import CastObservation # NOQA
from chainerrl.wrappers.cast_observation import CastObservationToFloat32 # NOQA
from chainerrl.wrappers.randomize_action import RandomizeAction # NOQA
from chainerrl.wrappers.scale_reward import ScaleReward # NOQA
<commit_msg>Ma... | from chainerrl.wrappers.cast_observation import CastObservation # NOQA
from chainerrl.wrappers.cast_observation import CastObservationToFloat32 # NOQA
from chainerrl.wrappers.randomize_action import RandomizeAction # NOQA
from chainerrl.wrappers.render import Render # NOQA
from chainerrl.wrappers.scale_reward im... | from chainerrl.wrappers.cast_observation import CastObservation # NOQA
from chainerrl.wrappers.cast_observation import CastObservationToFloat32 # NOQA
from chainerrl.wrappers.randomize_action import RandomizeAction # NOQA
from chainerrl.wrappers.scale_reward import ScaleReward # NOQA
Make Render available under c... | <commit_before>from chainerrl.wrappers.cast_observation import CastObservation # NOQA
from chainerrl.wrappers.cast_observation import CastObservationToFloat32 # NOQA
from chainerrl.wrappers.randomize_action import RandomizeAction # NOQA
from chainerrl.wrappers.scale_reward import ScaleReward # NOQA
<commit_msg>Ma... |
79aa9edde1bba39a433475929970dd519fecfdf3 | requests/_oauth.py | requests/_oauth.py | # -*- coding: utf-8 -*-
"""
requests._oauth
~~~~~~~~~~~~~~~
This module comtains the path hack neccesary for oauthlib to be vendored into requests
while allowing upstream changes.
"""
import os
import sys
try:
from oauthlib.oauth1 import rfc5849
from oauthlib.common import extract_params
from oauthlib.o... | # -*- coding: utf-8 -*-
"""
requests._oauth
~~~~~~~~~~~~~~~
This module comtains the path hack neccesary for oauthlib to be vendored into requests
while allowing upstream changes.
"""
import os
import sys
try:
from oauthlib.oauth1 import rfc5849
from oauthlib.common import extract_params
from oauthlib.o... | Make OAuth path hack platform independent. | Make OAuth path hack platform independent.
| Python | isc | Bluehorn/requests,revolunet/requests,psf/requests,revolunet/requests | # -*- coding: utf-8 -*-
"""
requests._oauth
~~~~~~~~~~~~~~~
This module comtains the path hack neccesary for oauthlib to be vendored into requests
while allowing upstream changes.
"""
import os
import sys
try:
from oauthlib.oauth1 import rfc5849
from oauthlib.common import extract_params
from oauthlib.o... | # -*- coding: utf-8 -*-
"""
requests._oauth
~~~~~~~~~~~~~~~
This module comtains the path hack neccesary for oauthlib to be vendored into requests
while allowing upstream changes.
"""
import os
import sys
try:
from oauthlib.oauth1 import rfc5849
from oauthlib.common import extract_params
from oauthlib.o... | <commit_before># -*- coding: utf-8 -*-
"""
requests._oauth
~~~~~~~~~~~~~~~
This module comtains the path hack neccesary for oauthlib to be vendored into requests
while allowing upstream changes.
"""
import os
import sys
try:
from oauthlib.oauth1 import rfc5849
from oauthlib.common import extract_params
... | # -*- coding: utf-8 -*-
"""
requests._oauth
~~~~~~~~~~~~~~~
This module comtains the path hack neccesary for oauthlib to be vendored into requests
while allowing upstream changes.
"""
import os
import sys
try:
from oauthlib.oauth1 import rfc5849
from oauthlib.common import extract_params
from oauthlib.o... | # -*- coding: utf-8 -*-
"""
requests._oauth
~~~~~~~~~~~~~~~
This module comtains the path hack neccesary for oauthlib to be vendored into requests
while allowing upstream changes.
"""
import os
import sys
try:
from oauthlib.oauth1 import rfc5849
from oauthlib.common import extract_params
from oauthlib.o... | <commit_before># -*- coding: utf-8 -*-
"""
requests._oauth
~~~~~~~~~~~~~~~
This module comtains the path hack neccesary for oauthlib to be vendored into requests
while allowing upstream changes.
"""
import os
import sys
try:
from oauthlib.oauth1 import rfc5849
from oauthlib.common import extract_params
... |
429d840a34c4ec2e3b475e412b53e99ffe2a5677 | studygroups/tasks.py | studygroups/tasks.py | from django.utils import timezone
from django.conf import settings
from studygroups.models import StudyGroup
from studygroups.models import Reminder
from studygroups.models import generate_reminder
from studygroups.models import send_reminder
from django.utils import translation
import datetime
def send_reminders():... | from django.utils import timezone
from django.conf import settings
from studygroups.models import StudyGroup
from studygroups.models import Reminder
from studygroups.models import generate_reminder
from studygroups.models import send_reminder
from django.utils import translation
import datetime
def send_reminders():... | Fix task and set language code when sending reminders | Fix task and set language code when sending reminders
| Python | mit | p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles | from django.utils import timezone
from django.conf import settings
from studygroups.models import StudyGroup
from studygroups.models import Reminder
from studygroups.models import generate_reminder
from studygroups.models import send_reminder
from django.utils import translation
import datetime
def send_reminders():... | from django.utils import timezone
from django.conf import settings
from studygroups.models import StudyGroup
from studygroups.models import Reminder
from studygroups.models import generate_reminder
from studygroups.models import send_reminder
from django.utils import translation
import datetime
def send_reminders():... | <commit_before>from django.utils import timezone
from django.conf import settings
from studygroups.models import StudyGroup
from studygroups.models import Reminder
from studygroups.models import generate_reminder
from studygroups.models import send_reminder
from django.utils import translation
import datetime
def se... | from django.utils import timezone
from django.conf import settings
from studygroups.models import StudyGroup
from studygroups.models import Reminder
from studygroups.models import generate_reminder
from studygroups.models import send_reminder
from django.utils import translation
import datetime
def send_reminders():... | from django.utils import timezone
from django.conf import settings
from studygroups.models import StudyGroup
from studygroups.models import Reminder
from studygroups.models import generate_reminder
from studygroups.models import send_reminder
from django.utils import translation
import datetime
def send_reminders():... | <commit_before>from django.utils import timezone
from django.conf import settings
from studygroups.models import StudyGroup
from studygroups.models import Reminder
from studygroups.models import generate_reminder
from studygroups.models import send_reminder
from django.utils import translation
import datetime
def se... |
fa19a6ec882727bb96f27993d7ac765797c19556 | logger/utilities.py | logger/utilities.py | #!/usr/bin/env python3
"""Small utility functions for use in various places."""
__all__ = ["pick", "is_dunder"]
def pick(arg, default):
"""Handler for default versus given argument."""
return default if arg is None else arg
def is_dunder(name):
"""Return True if a __dunder__ name, False otherwise."""
... | #!/usr/bin/env python3
"""Small utility functions for use in various places."""
__all__ = ["pick", "is_dunder", "find_name"]
import sys
def pick(arg, default):
"""Handler for default versus given argument."""
return default if arg is None else arg
def is_dunder(name):
"""Return True if a __dunder__ nam... | Add a find_name utility function | Add a find_name utility function
| Python | bsd-2-clause | Vgr255/logging | #!/usr/bin/env python3
"""Small utility functions for use in various places."""
__all__ = ["pick", "is_dunder"]
def pick(arg, default):
"""Handler for default versus given argument."""
return default if arg is None else arg
def is_dunder(name):
"""Return True if a __dunder__ name, False otherwise."""
... | #!/usr/bin/env python3
"""Small utility functions for use in various places."""
__all__ = ["pick", "is_dunder", "find_name"]
import sys
def pick(arg, default):
"""Handler for default versus given argument."""
return default if arg is None else arg
def is_dunder(name):
"""Return True if a __dunder__ nam... | <commit_before>#!/usr/bin/env python3
"""Small utility functions for use in various places."""
__all__ = ["pick", "is_dunder"]
def pick(arg, default):
"""Handler for default versus given argument."""
return default if arg is None else arg
def is_dunder(name):
"""Return True if a __dunder__ name, False o... | #!/usr/bin/env python3
"""Small utility functions for use in various places."""
__all__ = ["pick", "is_dunder", "find_name"]
import sys
def pick(arg, default):
"""Handler for default versus given argument."""
return default if arg is None else arg
def is_dunder(name):
"""Return True if a __dunder__ nam... | #!/usr/bin/env python3
"""Small utility functions for use in various places."""
__all__ = ["pick", "is_dunder"]
def pick(arg, default):
"""Handler for default versus given argument."""
return default if arg is None else arg
def is_dunder(name):
"""Return True if a __dunder__ name, False otherwise."""
... | <commit_before>#!/usr/bin/env python3
"""Small utility functions for use in various places."""
__all__ = ["pick", "is_dunder"]
def pick(arg, default):
"""Handler for default versus given argument."""
return default if arg is None else arg
def is_dunder(name):
"""Return True if a __dunder__ name, False o... |
9eb07a5b7d2875cf79bb698864d11ef29576133e | comics/utils/hash.py | comics/utils/hash.py | import hashlib
def sha256sum(filename):
"""Returns sha256sum for file"""
f = file(filename, 'rb')
m = hashlib.sha256()
while True:
b = f.read(8096)
if not b:
break
m.update(b)
f.close()
return m.hexdigest()
| import hashlib
def sha256sum(filename=None, filehandle=None):
"""Returns sha256sum for file"""
if filename is not None:
f = file(filename, 'rb')
else:
f = filehandle
m = hashlib.sha256()
while True:
b = f.read(8096)
if not b:
break
m.update(b)
... | Make sha256sum work with open filehandles too | Make sha256sum work with open filehandles too
| Python | agpl-3.0 | datagutten/comics,jodal/comics,jodal/comics,datagutten/comics,jodal/comics,datagutten/comics,klette/comics,klette/comics,klette/comics,jodal/comics,datagutten/comics | import hashlib
def sha256sum(filename):
"""Returns sha256sum for file"""
f = file(filename, 'rb')
m = hashlib.sha256()
while True:
b = f.read(8096)
if not b:
break
m.update(b)
f.close()
return m.hexdigest()
Make sha256sum work with open filehandles too | import hashlib
def sha256sum(filename=None, filehandle=None):
"""Returns sha256sum for file"""
if filename is not None:
f = file(filename, 'rb')
else:
f = filehandle
m = hashlib.sha256()
while True:
b = f.read(8096)
if not b:
break
m.update(b)
... | <commit_before>import hashlib
def sha256sum(filename):
"""Returns sha256sum for file"""
f = file(filename, 'rb')
m = hashlib.sha256()
while True:
b = f.read(8096)
if not b:
break
m.update(b)
f.close()
return m.hexdigest()
<commit_msg>Make sha256sum work with... | import hashlib
def sha256sum(filename=None, filehandle=None):
"""Returns sha256sum for file"""
if filename is not None:
f = file(filename, 'rb')
else:
f = filehandle
m = hashlib.sha256()
while True:
b = f.read(8096)
if not b:
break
m.update(b)
... | import hashlib
def sha256sum(filename):
"""Returns sha256sum for file"""
f = file(filename, 'rb')
m = hashlib.sha256()
while True:
b = f.read(8096)
if not b:
break
m.update(b)
f.close()
return m.hexdigest()
Make sha256sum work with open filehandles tooimport... | <commit_before>import hashlib
def sha256sum(filename):
"""Returns sha256sum for file"""
f = file(filename, 'rb')
m = hashlib.sha256()
while True:
b = f.read(8096)
if not b:
break
m.update(b)
f.close()
return m.hexdigest()
<commit_msg>Make sha256sum work with... |
e99976cbee1e43e7112b4759cf5a1a17a1be8170 | utils/gyb_syntax_support/protocolsMap.py | utils/gyb_syntax_support/protocolsMap.py | SYNTAX_BUILDABLE_EXPRESSIBLE_AS_CONFORMANCES = {
'DeclBuildable': [
'CodeBlockItem',
'MemberDeclListItem',
'SyntaxBuildable'
],
'ExprList': [
'ConditionElement',
'SyntaxBuildable'
],
'IdentifierPattern': [
'PatternBuildable'
],
'SimpleTypeIdent... | SYNTAX_BUILDABLE_EXPRESSIBLE_AS_CONFORMANCES = {
'DeclBuildable': [
'CodeBlockItem',
'MemberDeclListItem',
'SyntaxBuildable'
],
'ExprList': [
'ConditionElement',
'SyntaxBuildable'
],
'IdentifierPattern': [
'PatternBuildable'
],
'MemberDeclList'... | Add convenience initializers for `MemberDeclList` | Add convenience initializers for `MemberDeclList`
| Python | apache-2.0 | glessard/swift,atrick/swift,apple/swift,benlangmuir/swift,rudkx/swift,glessard/swift,atrick/swift,rudkx/swift,gregomni/swift,glessard/swift,apple/swift,atrick/swift,glessard/swift,JGiola/swift,atrick/swift,ahoppen/swift,gregomni/swift,JGiola/swift,glessard/swift,ahoppen/swift,ahoppen/swift,JGiola/swift,rudkx/swift,atri... | SYNTAX_BUILDABLE_EXPRESSIBLE_AS_CONFORMANCES = {
'DeclBuildable': [
'CodeBlockItem',
'MemberDeclListItem',
'SyntaxBuildable'
],
'ExprList': [
'ConditionElement',
'SyntaxBuildable'
],
'IdentifierPattern': [
'PatternBuildable'
],
'SimpleTypeIdent... | SYNTAX_BUILDABLE_EXPRESSIBLE_AS_CONFORMANCES = {
'DeclBuildable': [
'CodeBlockItem',
'MemberDeclListItem',
'SyntaxBuildable'
],
'ExprList': [
'ConditionElement',
'SyntaxBuildable'
],
'IdentifierPattern': [
'PatternBuildable'
],
'MemberDeclList'... | <commit_before>SYNTAX_BUILDABLE_EXPRESSIBLE_AS_CONFORMANCES = {
'DeclBuildable': [
'CodeBlockItem',
'MemberDeclListItem',
'SyntaxBuildable'
],
'ExprList': [
'ConditionElement',
'SyntaxBuildable'
],
'IdentifierPattern': [
'PatternBuildable'
],
'... | SYNTAX_BUILDABLE_EXPRESSIBLE_AS_CONFORMANCES = {
'DeclBuildable': [
'CodeBlockItem',
'MemberDeclListItem',
'SyntaxBuildable'
],
'ExprList': [
'ConditionElement',
'SyntaxBuildable'
],
'IdentifierPattern': [
'PatternBuildable'
],
'MemberDeclList'... | SYNTAX_BUILDABLE_EXPRESSIBLE_AS_CONFORMANCES = {
'DeclBuildable': [
'CodeBlockItem',
'MemberDeclListItem',
'SyntaxBuildable'
],
'ExprList': [
'ConditionElement',
'SyntaxBuildable'
],
'IdentifierPattern': [
'PatternBuildable'
],
'SimpleTypeIdent... | <commit_before>SYNTAX_BUILDABLE_EXPRESSIBLE_AS_CONFORMANCES = {
'DeclBuildable': [
'CodeBlockItem',
'MemberDeclListItem',
'SyntaxBuildable'
],
'ExprList': [
'ConditionElement',
'SyntaxBuildable'
],
'IdentifierPattern': [
'PatternBuildable'
],
'... |
46b00107e90df8f34a9cce5c4b010fdfb88f5f52 | shovel/code.py | shovel/code.py | # coding: utf-8
from __future__ import absolute_import, division, print_function
from pathlib import Path
from isort import SortImports
from shovel import task
# isort multi_line_output modes
GRID = 0
VERTICAL = 1
HANGING_INDENT = 2
VERTICAL_HANGING_INDENT = 3
HANGING_GRID = 4
HANGING_GRID_GROUPED = 5
@task
def fo... | # coding: utf-8
from __future__ import absolute_import, division, print_function
from pathlib import Path
from isort import SortImports
from shovel import task
# isort multi_line_output modes
GRID = 0
VERTICAL = 1
HANGING_INDENT = 2
VERTICAL_HANGING_INDENT = 3
HANGING_GRID = 4
HANGING_GRID_GROUPED = 5
@task
def fo... | Add 'six' to known_third_party for SortImports | Add 'six' to known_third_party for SortImports
six was being sorted incorrectly due to being classed as first party.
| Python | mit | python-astrodynamics/astrodynamics,python-astrodynamics/astrodynamics | # coding: utf-8
from __future__ import absolute_import, division, print_function
from pathlib import Path
from isort import SortImports
from shovel import task
# isort multi_line_output modes
GRID = 0
VERTICAL = 1
HANGING_INDENT = 2
VERTICAL_HANGING_INDENT = 3
HANGING_GRID = 4
HANGING_GRID_GROUPED = 5
@task
def fo... | # coding: utf-8
from __future__ import absolute_import, division, print_function
from pathlib import Path
from isort import SortImports
from shovel import task
# isort multi_line_output modes
GRID = 0
VERTICAL = 1
HANGING_INDENT = 2
VERTICAL_HANGING_INDENT = 3
HANGING_GRID = 4
HANGING_GRID_GROUPED = 5
@task
def fo... | <commit_before># coding: utf-8
from __future__ import absolute_import, division, print_function
from pathlib import Path
from isort import SortImports
from shovel import task
# isort multi_line_output modes
GRID = 0
VERTICAL = 1
HANGING_INDENT = 2
VERTICAL_HANGING_INDENT = 3
HANGING_GRID = 4
HANGING_GRID_GROUPED = 5... | # coding: utf-8
from __future__ import absolute_import, division, print_function
from pathlib import Path
from isort import SortImports
from shovel import task
# isort multi_line_output modes
GRID = 0
VERTICAL = 1
HANGING_INDENT = 2
VERTICAL_HANGING_INDENT = 3
HANGING_GRID = 4
HANGING_GRID_GROUPED = 5
@task
def fo... | # coding: utf-8
from __future__ import absolute_import, division, print_function
from pathlib import Path
from isort import SortImports
from shovel import task
# isort multi_line_output modes
GRID = 0
VERTICAL = 1
HANGING_INDENT = 2
VERTICAL_HANGING_INDENT = 3
HANGING_GRID = 4
HANGING_GRID_GROUPED = 5
@task
def fo... | <commit_before># coding: utf-8
from __future__ import absolute_import, division, print_function
from pathlib import Path
from isort import SortImports
from shovel import task
# isort multi_line_output modes
GRID = 0
VERTICAL = 1
HANGING_INDENT = 2
VERTICAL_HANGING_INDENT = 3
HANGING_GRID = 4
HANGING_GRID_GROUPED = 5... |
4d27a526dc6d76989ce65cc60991a7156b333fac | tests/test_format.py | tests/test_format.py | import unittest
import ipuz
import puz
import crossword
class FormatUnitTest(unittest.TestCase):
def test_to_ipuz_only_include_ipuz_specific_data(self):
puz_object = puz.read('fixtures/chronicle_20140815.puz')
puzzle = crossword.from_puz(puz_object)
ipuz_dict = crossword.to_ipuz(puzzle)... | import unittest
import ipuz
import puz
import crossword
class FormatUnitTest(unittest.TestCase):
def test_to_ipuz_only_include_ipuz_specific_data(self):
puz_object = puz.read('fixtures/chronicle_20140815.puz')
puzzle = crossword.from_puz(puz_object)
ipuz_dict = crossword.to_ipuz(puzzle)... | Use different puzzle in this test as it uses number that .puz accepts | Use different puzzle in this test as it uses number that .puz accepts
| Python | mit | svisser/crossword | import unittest
import ipuz
import puz
import crossword
class FormatUnitTest(unittest.TestCase):
def test_to_ipuz_only_include_ipuz_specific_data(self):
puz_object = puz.read('fixtures/chronicle_20140815.puz')
puzzle = crossword.from_puz(puz_object)
ipuz_dict = crossword.to_ipuz(puzzle)... | import unittest
import ipuz
import puz
import crossword
class FormatUnitTest(unittest.TestCase):
def test_to_ipuz_only_include_ipuz_specific_data(self):
puz_object = puz.read('fixtures/chronicle_20140815.puz')
puzzle = crossword.from_puz(puz_object)
ipuz_dict = crossword.to_ipuz(puzzle)... | <commit_before>import unittest
import ipuz
import puz
import crossword
class FormatUnitTest(unittest.TestCase):
def test_to_ipuz_only_include_ipuz_specific_data(self):
puz_object = puz.read('fixtures/chronicle_20140815.puz')
puzzle = crossword.from_puz(puz_object)
ipuz_dict = crossword.... | import unittest
import ipuz
import puz
import crossword
class FormatUnitTest(unittest.TestCase):
def test_to_ipuz_only_include_ipuz_specific_data(self):
puz_object = puz.read('fixtures/chronicle_20140815.puz')
puzzle = crossword.from_puz(puz_object)
ipuz_dict = crossword.to_ipuz(puzzle)... | import unittest
import ipuz
import puz
import crossword
class FormatUnitTest(unittest.TestCase):
def test_to_ipuz_only_include_ipuz_specific_data(self):
puz_object = puz.read('fixtures/chronicle_20140815.puz')
puzzle = crossword.from_puz(puz_object)
ipuz_dict = crossword.to_ipuz(puzzle)... | <commit_before>import unittest
import ipuz
import puz
import crossword
class FormatUnitTest(unittest.TestCase):
def test_to_ipuz_only_include_ipuz_specific_data(self):
puz_object = puz.read('fixtures/chronicle_20140815.puz')
puzzle = crossword.from_puz(puz_object)
ipuz_dict = crossword.... |
9b12a9cdab0021fea7e5f2d8fd8ffe11d065f0d0 | tests/test_replay.py | tests/test_replay.py | # -*- coding: utf-8 -*-
"""
test_replay
-----------
"""
def test_get_user_config():
config_dict = get_user_config()
assert 'replay_dir' in config_dict
expected_dir = os.path.expanduser('~/.cookiecutter_replay/')
assert config_dict['replay_dir'] == expected_dir
| # -*- coding: utf-8 -*-
"""
test_replay
-----------
"""
import os
import pytest
from cookiecutter import replay
from cookiecutter.config import get_user_config
def test_get_user_config():
config_dict = get_user_config()
assert 'replay_dir' in config_dict
expected_dir = os.path.expanduser('~/.cookiecu... | Implement tests for replay.dump args | Implement tests for replay.dump args
| Python | bsd-3-clause | agconti/cookiecutter,luzfcb/cookiecutter,christabor/cookiecutter,terryjbates/cookiecutter,benthomasson/cookiecutter,christabor/cookiecutter,audreyr/cookiecutter,audreyr/cookiecutter,benthomasson/cookiecutter,Springerle/cookiecutter,ramiroluz/cookiecutter,terryjbates/cookiecutter,luzfcb/cookiecutter,takeflight/cookiecut... | # -*- coding: utf-8 -*-
"""
test_replay
-----------
"""
def test_get_user_config():
config_dict = get_user_config()
assert 'replay_dir' in config_dict
expected_dir = os.path.expanduser('~/.cookiecutter_replay/')
assert config_dict['replay_dir'] == expected_dir
Implement tests for replay.dump args | # -*- coding: utf-8 -*-
"""
test_replay
-----------
"""
import os
import pytest
from cookiecutter import replay
from cookiecutter.config import get_user_config
def test_get_user_config():
config_dict = get_user_config()
assert 'replay_dir' in config_dict
expected_dir = os.path.expanduser('~/.cookiecu... | <commit_before># -*- coding: utf-8 -*-
"""
test_replay
-----------
"""
def test_get_user_config():
config_dict = get_user_config()
assert 'replay_dir' in config_dict
expected_dir = os.path.expanduser('~/.cookiecutter_replay/')
assert config_dict['replay_dir'] == expected_dir
<commit_msg>Implement te... | # -*- coding: utf-8 -*-
"""
test_replay
-----------
"""
import os
import pytest
from cookiecutter import replay
from cookiecutter.config import get_user_config
def test_get_user_config():
config_dict = get_user_config()
assert 'replay_dir' in config_dict
expected_dir = os.path.expanduser('~/.cookiecu... | # -*- coding: utf-8 -*-
"""
test_replay
-----------
"""
def test_get_user_config():
config_dict = get_user_config()
assert 'replay_dir' in config_dict
expected_dir = os.path.expanduser('~/.cookiecutter_replay/')
assert config_dict['replay_dir'] == expected_dir
Implement tests for replay.dump args# -... | <commit_before># -*- coding: utf-8 -*-
"""
test_replay
-----------
"""
def test_get_user_config():
config_dict = get_user_config()
assert 'replay_dir' in config_dict
expected_dir = os.path.expanduser('~/.cookiecutter_replay/')
assert config_dict['replay_dir'] == expected_dir
<commit_msg>Implement te... |
6b025a122e0b6ac4761f5e821b0f5465f867fe61 | crypto-square/crypto_square.py | crypto-square/crypto_square.py | import math
def encode(s):
s = list(filter(str.isalnum, s.lower()))
size = math.ceil(math.sqrt(len(s)))
s += "." * (size**2 - len(s))
parts = [s[i*size:(i+1)*size] for i in range(size)]
return " ".join(map("".join, zip(*parts))).replace(".", "")
| import math
def encode(s):
s = "".join(filter(str.isalnum, s.lower()))
size = math.ceil(math.sqrt(len(s)))
return " ".join(s[i::size] for i in range(size))
| Use string slices with a stride | Use string slices with a stride
| Python | agpl-3.0 | CubicComet/exercism-python-solutions | import math
def encode(s):
s = list(filter(str.isalnum, s.lower()))
size = math.ceil(math.sqrt(len(s)))
s += "." * (size**2 - len(s))
parts = [s[i*size:(i+1)*size] for i in range(size)]
return " ".join(map("".join, zip(*parts))).replace(".", "")
Use string slices with a stride | import math
def encode(s):
s = "".join(filter(str.isalnum, s.lower()))
size = math.ceil(math.sqrt(len(s)))
return " ".join(s[i::size] for i in range(size))
| <commit_before>import math
def encode(s):
s = list(filter(str.isalnum, s.lower()))
size = math.ceil(math.sqrt(len(s)))
s += "." * (size**2 - len(s))
parts = [s[i*size:(i+1)*size] for i in range(size)]
return " ".join(map("".join, zip(*parts))).replace(".", "")
<commit_msg>Use string slices with a ... | import math
def encode(s):
s = "".join(filter(str.isalnum, s.lower()))
size = math.ceil(math.sqrt(len(s)))
return " ".join(s[i::size] for i in range(size))
| import math
def encode(s):
s = list(filter(str.isalnum, s.lower()))
size = math.ceil(math.sqrt(len(s)))
s += "." * (size**2 - len(s))
parts = [s[i*size:(i+1)*size] for i in range(size)]
return " ".join(map("".join, zip(*parts))).replace(".", "")
Use string slices with a strideimport math
def enc... | <commit_before>import math
def encode(s):
s = list(filter(str.isalnum, s.lower()))
size = math.ceil(math.sqrt(len(s)))
s += "." * (size**2 - len(s))
parts = [s[i*size:(i+1)*size] for i in range(size)]
return " ".join(map("".join, zip(*parts))).replace(".", "")
<commit_msg>Use string slices with a ... |
dfbdf5d55a2c8d243b09828ef05c7c3c3ffc8d50 | dags/longitudinal.py | dags/longitudinal.py | from airflow import DAG
from datetime import datetime, timedelta
from operators.emr_spark_operator import EMRSparkOperator
default_args = {
'owner': 'rvitillo@mozilla.com',
'depends_on_past': False,
'start_date': datetime(2016, 6, 30),
'email': ['telemetry-alerts@mozilla.com', 'rvitillo@mozilla.com'],
... | from airflow import DAG
from datetime import datetime, timedelta
from operators.emr_spark_operator import EMRSparkOperator
default_args = {
'owner': 'rvitillo@mozilla.com',
'depends_on_past': False,
'start_date': datetime(2016, 6, 30),
'email': ['telemetry-alerts@mozilla.com', 'rvitillo@mozilla.com'],
... | Add update orphaning job to Airflow | Add update orphaning job to Airflow
This depends on the longitudinal job running successfully to run.
| Python | mpl-2.0 | opentrials/opentrials-airflow,opentrials/opentrials-airflow | from airflow import DAG
from datetime import datetime, timedelta
from operators.emr_spark_operator import EMRSparkOperator
default_args = {
'owner': 'rvitillo@mozilla.com',
'depends_on_past': False,
'start_date': datetime(2016, 6, 30),
'email': ['telemetry-alerts@mozilla.com', 'rvitillo@mozilla.com'],
... | from airflow import DAG
from datetime import datetime, timedelta
from operators.emr_spark_operator import EMRSparkOperator
default_args = {
'owner': 'rvitillo@mozilla.com',
'depends_on_past': False,
'start_date': datetime(2016, 6, 30),
'email': ['telemetry-alerts@mozilla.com', 'rvitillo@mozilla.com'],
... | <commit_before>from airflow import DAG
from datetime import datetime, timedelta
from operators.emr_spark_operator import EMRSparkOperator
default_args = {
'owner': 'rvitillo@mozilla.com',
'depends_on_past': False,
'start_date': datetime(2016, 6, 30),
'email': ['telemetry-alerts@mozilla.com', 'rvitillo@... | from airflow import DAG
from datetime import datetime, timedelta
from operators.emr_spark_operator import EMRSparkOperator
default_args = {
'owner': 'rvitillo@mozilla.com',
'depends_on_past': False,
'start_date': datetime(2016, 6, 30),
'email': ['telemetry-alerts@mozilla.com', 'rvitillo@mozilla.com'],
... | from airflow import DAG
from datetime import datetime, timedelta
from operators.emr_spark_operator import EMRSparkOperator
default_args = {
'owner': 'rvitillo@mozilla.com',
'depends_on_past': False,
'start_date': datetime(2016, 6, 30),
'email': ['telemetry-alerts@mozilla.com', 'rvitillo@mozilla.com'],
... | <commit_before>from airflow import DAG
from datetime import datetime, timedelta
from operators.emr_spark_operator import EMRSparkOperator
default_args = {
'owner': 'rvitillo@mozilla.com',
'depends_on_past': False,
'start_date': datetime(2016, 6, 30),
'email': ['telemetry-alerts@mozilla.com', 'rvitillo@... |
0c6bf8eca2d4cfd08cc98df3cb0ab706a6fbf7a2 | cxfreeze-setup.py | cxfreeze-setup.py | import sys
from glob import glob
from cx_Freeze import setup, Executable
from version import VERSION
# Dependencies are automatically detected, but it might need
# fine tuning.
excludes = ["Tkinter"]
includes = ["logview", "colorwidget"]
includeFiles = [("data/icons/gitc.svg", "data/icons/gitc.svg"),
... | import sys
from glob import glob
from cx_Freeze import setup, Executable
from version import VERSION
# Dependencies are automatically detected, but it might need
# fine tuning.
excludes = ["Tkinter"]
includes = ["logview", "colorwidget", "pickle"]
includeFiles = [("data/icons/gitc.svg", "data/icons/gitc.svg"),
... | Fix a TypeError when load mergeTool setting | Fix a TypeError when load mergeTool setting
cx-freeze isn't include pickle module on the Windows platform,
it cause "TypeError: unable to convert a C++ 'QVariantList'
instance to a Python object"
| Python | apache-2.0 | timxx/gitc,timxx/gitc | import sys
from glob import glob
from cx_Freeze import setup, Executable
from version import VERSION
# Dependencies are automatically detected, but it might need
# fine tuning.
excludes = ["Tkinter"]
includes = ["logview", "colorwidget"]
includeFiles = [("data/icons/gitc.svg", "data/icons/gitc.svg"),
... | import sys
from glob import glob
from cx_Freeze import setup, Executable
from version import VERSION
# Dependencies are automatically detected, but it might need
# fine tuning.
excludes = ["Tkinter"]
includes = ["logview", "colorwidget", "pickle"]
includeFiles = [("data/icons/gitc.svg", "data/icons/gitc.svg"),
... | <commit_before>import sys
from glob import glob
from cx_Freeze import setup, Executable
from version import VERSION
# Dependencies are automatically detected, but it might need
# fine tuning.
excludes = ["Tkinter"]
includes = ["logview", "colorwidget"]
includeFiles = [("data/icons/gitc.svg", "data/icons/gitc.svg"),
... | import sys
from glob import glob
from cx_Freeze import setup, Executable
from version import VERSION
# Dependencies are automatically detected, but it might need
# fine tuning.
excludes = ["Tkinter"]
includes = ["logview", "colorwidget", "pickle"]
includeFiles = [("data/icons/gitc.svg", "data/icons/gitc.svg"),
... | import sys
from glob import glob
from cx_Freeze import setup, Executable
from version import VERSION
# Dependencies are automatically detected, but it might need
# fine tuning.
excludes = ["Tkinter"]
includes = ["logview", "colorwidget"]
includeFiles = [("data/icons/gitc.svg", "data/icons/gitc.svg"),
... | <commit_before>import sys
from glob import glob
from cx_Freeze import setup, Executable
from version import VERSION
# Dependencies are automatically detected, but it might need
# fine tuning.
excludes = ["Tkinter"]
includes = ["logview", "colorwidget"]
includeFiles = [("data/icons/gitc.svg", "data/icons/gitc.svg"),
... |
64303ae1a02b707ff11231a9e3c46405a8a591e7 | host/cgi-bin/liberator.py | host/cgi-bin/liberator.py | #!/usr/bin/env python
import cgi, subprocess, json
arguments = cgi.FieldStorage()
body = arguments.getvalue('body', '')
messageTo = arguments.getvalue('messageTo', '')
exitCode = subprocess.call(['./SendImessage.applescript', messageTo, body])
print 'Content-Type: application/json'
print ''
print json.dumps({'ok': ... | #!/usr/bin/env python
from os.path import expanduser
from time import sleep
import subprocess, json, sys, os
messagesDbPath = '%s/Library/Messages/chat.db' % expanduser('~')
# manually parse the QUERY_STRING because "+" is being weirdly decoded via FieldStorage
queryParameters = {}
keyValues = os.environ['QUERY_STRI... | Verify message sent via SQL | Verify message sent via SQL
| Python | mit | chainsawsalad/imessage-liberator,chainsawsalad/imessage-liberator,chainsawsalad/imessage-liberator | #!/usr/bin/env python
import cgi, subprocess, json
arguments = cgi.FieldStorage()
body = arguments.getvalue('body', '')
messageTo = arguments.getvalue('messageTo', '')
exitCode = subprocess.call(['./SendImessage.applescript', messageTo, body])
print 'Content-Type: application/json'
print ''
print json.dumps({'ok': ... | #!/usr/bin/env python
from os.path import expanduser
from time import sleep
import subprocess, json, sys, os
messagesDbPath = '%s/Library/Messages/chat.db' % expanduser('~')
# manually parse the QUERY_STRING because "+" is being weirdly decoded via FieldStorage
queryParameters = {}
keyValues = os.environ['QUERY_STRI... | <commit_before>#!/usr/bin/env python
import cgi, subprocess, json
arguments = cgi.FieldStorage()
body = arguments.getvalue('body', '')
messageTo = arguments.getvalue('messageTo', '')
exitCode = subprocess.call(['./SendImessage.applescript', messageTo, body])
print 'Content-Type: application/json'
print ''
print jso... | #!/usr/bin/env python
from os.path import expanduser
from time import sleep
import subprocess, json, sys, os
messagesDbPath = '%s/Library/Messages/chat.db' % expanduser('~')
# manually parse the QUERY_STRING because "+" is being weirdly decoded via FieldStorage
queryParameters = {}
keyValues = os.environ['QUERY_STRI... | #!/usr/bin/env python
import cgi, subprocess, json
arguments = cgi.FieldStorage()
body = arguments.getvalue('body', '')
messageTo = arguments.getvalue('messageTo', '')
exitCode = subprocess.call(['./SendImessage.applescript', messageTo, body])
print 'Content-Type: application/json'
print ''
print json.dumps({'ok': ... | <commit_before>#!/usr/bin/env python
import cgi, subprocess, json
arguments = cgi.FieldStorage()
body = arguments.getvalue('body', '')
messageTo = arguments.getvalue('messageTo', '')
exitCode = subprocess.call(['./SendImessage.applescript', messageTo, body])
print 'Content-Type: application/json'
print ''
print jso... |
3f3818e4a21ffc4e1b8d4426093fc093396b5a5b | pandas_finance.py | pandas_finance.py | #!/usr/bin/env python
import datetime
import scraperwiki
import numpy
import pandas.io.data as web
def get_stock(stock, start, end, service):
"""
Return data frame of finance data for stock.
Takes start and end datetimes, and service name of 'google' or 'yahoo'.
"""
return web.DataReader(stock, ... | #!/usr/bin/env python
import datetime
import sqlite3
import pandas.io.data as web
import pandas.io.sql as sql
def get_stock(stock, start, end):
"""
Return data frame of Yahoo Finance data for stock.
Takes start and end datetimes.
"""
return web.DataReader(stock, 'yahoo', start, end)
def scrape_s... | Use pandas native saving by forcing date to not be index, and be string | Use pandas native saving by forcing date to not be index, and be string | Python | agpl-3.0 | scraperwiki/stock-tool,scraperwiki/stock-tool | #!/usr/bin/env python
import datetime
import scraperwiki
import numpy
import pandas.io.data as web
def get_stock(stock, start, end, service):
"""
Return data frame of finance data for stock.
Takes start and end datetimes, and service name of 'google' or 'yahoo'.
"""
return web.DataReader(stock, ... | #!/usr/bin/env python
import datetime
import sqlite3
import pandas.io.data as web
import pandas.io.sql as sql
def get_stock(stock, start, end):
"""
Return data frame of Yahoo Finance data for stock.
Takes start and end datetimes.
"""
return web.DataReader(stock, 'yahoo', start, end)
def scrape_s... | <commit_before>#!/usr/bin/env python
import datetime
import scraperwiki
import numpy
import pandas.io.data as web
def get_stock(stock, start, end, service):
"""
Return data frame of finance data for stock.
Takes start and end datetimes, and service name of 'google' or 'yahoo'.
"""
return web.Dat... | #!/usr/bin/env python
import datetime
import sqlite3
import pandas.io.data as web
import pandas.io.sql as sql
def get_stock(stock, start, end):
"""
Return data frame of Yahoo Finance data for stock.
Takes start and end datetimes.
"""
return web.DataReader(stock, 'yahoo', start, end)
def scrape_s... | #!/usr/bin/env python
import datetime
import scraperwiki
import numpy
import pandas.io.data as web
def get_stock(stock, start, end, service):
"""
Return data frame of finance data for stock.
Takes start and end datetimes, and service name of 'google' or 'yahoo'.
"""
return web.DataReader(stock, ... | <commit_before>#!/usr/bin/env python
import datetime
import scraperwiki
import numpy
import pandas.io.data as web
def get_stock(stock, start, end, service):
"""
Return data frame of finance data for stock.
Takes start and end datetimes, and service name of 'google' or 'yahoo'.
"""
return web.Dat... |
3919d64370825d8931672011af4b99355e52ef63 | motobot/core_plugins/help.py | motobot/core_plugins/help.py | from motobot import IRCBot, command, Notice
def get_command_help(bot, command, modifier):
responses = []
func = lambda x: x.type == IRCBot.command_plugin and x.arg.lower() == command.lower()
for plugin in filter(func, bot.plugins):
func = plugin.func
if func.__doc__ is not None:
... | from motobot import IRCBot, command, Notice
def get_command_help(bot, command):
responses = []
func = lambda x: x.type == IRCBot.command_plugin and x.arg.lower() == command.lower()
for plugin in filter(func, bot.plugins):
func = plugin.func
if func.__doc__ is not None:
respon... | Update to new response handling | Update to new response handling
| Python | mit | Motoko11/MotoBot | from motobot import IRCBot, command, Notice
def get_command_help(bot, command, modifier):
responses = []
func = lambda x: x.type == IRCBot.command_plugin and x.arg.lower() == command.lower()
for plugin in filter(func, bot.plugins):
func = plugin.func
if func.__doc__ is not None:
... | from motobot import IRCBot, command, Notice
def get_command_help(bot, command):
responses = []
func = lambda x: x.type == IRCBot.command_plugin and x.arg.lower() == command.lower()
for plugin in filter(func, bot.plugins):
func = plugin.func
if func.__doc__ is not None:
respon... | <commit_before>from motobot import IRCBot, command, Notice
def get_command_help(bot, command, modifier):
responses = []
func = lambda x: x.type == IRCBot.command_plugin and x.arg.lower() == command.lower()
for plugin in filter(func, bot.plugins):
func = plugin.func
if func.__doc__ is not... | from motobot import IRCBot, command, Notice
def get_command_help(bot, command):
responses = []
func = lambda x: x.type == IRCBot.command_plugin and x.arg.lower() == command.lower()
for plugin in filter(func, bot.plugins):
func = plugin.func
if func.__doc__ is not None:
respon... | from motobot import IRCBot, command, Notice
def get_command_help(bot, command, modifier):
responses = []
func = lambda x: x.type == IRCBot.command_plugin and x.arg.lower() == command.lower()
for plugin in filter(func, bot.plugins):
func = plugin.func
if func.__doc__ is not None:
... | <commit_before>from motobot import IRCBot, command, Notice
def get_command_help(bot, command, modifier):
responses = []
func = lambda x: x.type == IRCBot.command_plugin and x.arg.lower() == command.lower()
for plugin in filter(func, bot.plugins):
func = plugin.func
if func.__doc__ is not... |
0eb5966ec3261e6c6101b4c9874321a105fb4426 | dj-resume/urls.py | dj-resume/urls.py | from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
(r'apply/', 'resume.views.cs_apply_handler'),
(r'cs/', 'resume.views.index_handler'),
(r'cap/.*', 'belaylibs.dj_be... | from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
(r'cs/', 'resume.views.cs_index_handler'),
(r'cap/.*', 'belaylibs.dj_belay.proxyHandler'),
(r'applicant/', 'resume... | Make /cs/ point to the correct handler, no more apply handlre | Make /cs/ point to the correct handler, no more apply handlre
| Python | apache-2.0 | brownplt/k3,brownplt/k3,brownplt/k3 | from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
(r'apply/', 'resume.views.cs_apply_handler'),
(r'cs/', 'resume.views.index_handler'),
(r'cap/.*', 'belaylibs.dj_be... | from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
(r'cs/', 'resume.views.cs_index_handler'),
(r'cap/.*', 'belaylibs.dj_belay.proxyHandler'),
(r'applicant/', 'resume... | <commit_before>from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
(r'apply/', 'resume.views.cs_apply_handler'),
(r'cs/', 'resume.views.index_handler'),
(r'cap/.*', '... | from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
(r'cs/', 'resume.views.cs_index_handler'),
(r'cap/.*', 'belaylibs.dj_belay.proxyHandler'),
(r'applicant/', 'resume... | from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
(r'apply/', 'resume.views.cs_apply_handler'),
(r'cs/', 'resume.views.index_handler'),
(r'cap/.*', 'belaylibs.dj_be... | <commit_before>from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
(r'apply/', 'resume.views.cs_apply_handler'),
(r'cs/', 'resume.views.index_handler'),
(r'cap/.*', '... |
9be2846e408699308798b698754634ce7f370710 | openedx/stanford/cms/urls.py | openedx/stanford/cms/urls.py | from django.conf import settings
from django.conf.urls import url
import contentstore.views
urlpatterns = [
url(
r'^settings/send_test_enrollment_email/{}$'.format(settings.COURSE_KEY_PATTERN),
contentstore.views.send_test_enrollment_email,
name='send_test_enrollment_email',
),
ur... | from django.conf import settings
from django.conf.urls import url
import contentstore.views
urlpatterns = [
url(
r'^settings/send_test_enrollment_email/{}$'.format(settings.COURSE_KEY_PATTERN),
contentstore.views.send_test_enrollment_email,
name='send_test_enrollment_email',
),
ur... | Add names to stanford view handlers | Add names to stanford view handlers
| Python | agpl-3.0 | Stanford-Online/edx-platform,Stanford-Online/edx-platform,Stanford-Online/edx-platform,Stanford-Online/edx-platform | from django.conf import settings
from django.conf.urls import url
import contentstore.views
urlpatterns = [
url(
r'^settings/send_test_enrollment_email/{}$'.format(settings.COURSE_KEY_PATTERN),
contentstore.views.send_test_enrollment_email,
name='send_test_enrollment_email',
),
ur... | from django.conf import settings
from django.conf.urls import url
import contentstore.views
urlpatterns = [
url(
r'^settings/send_test_enrollment_email/{}$'.format(settings.COURSE_KEY_PATTERN),
contentstore.views.send_test_enrollment_email,
name='send_test_enrollment_email',
),
ur... | <commit_before>from django.conf import settings
from django.conf.urls import url
import contentstore.views
urlpatterns = [
url(
r'^settings/send_test_enrollment_email/{}$'.format(settings.COURSE_KEY_PATTERN),
contentstore.views.send_test_enrollment_email,
name='send_test_enrollment_email'... | from django.conf import settings
from django.conf.urls import url
import contentstore.views
urlpatterns = [
url(
r'^settings/send_test_enrollment_email/{}$'.format(settings.COURSE_KEY_PATTERN),
contentstore.views.send_test_enrollment_email,
name='send_test_enrollment_email',
),
ur... | from django.conf import settings
from django.conf.urls import url
import contentstore.views
urlpatterns = [
url(
r'^settings/send_test_enrollment_email/{}$'.format(settings.COURSE_KEY_PATTERN),
contentstore.views.send_test_enrollment_email,
name='send_test_enrollment_email',
),
ur... | <commit_before>from django.conf import settings
from django.conf.urls import url
import contentstore.views
urlpatterns = [
url(
r'^settings/send_test_enrollment_email/{}$'.format(settings.COURSE_KEY_PATTERN),
contentstore.views.send_test_enrollment_email,
name='send_test_enrollment_email'... |
89526f9af257096d2253b00b72d0cea1493fec52 | django_prices_openexchangerates/management/commands/update_exchange_rates.py | django_prices_openexchangerates/management/commands/update_exchange_rates.py | from django.core.management.base import BaseCommand
from ...tasks import update_conversion_rates, create_conversion_dates
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument(
'--all',
action='store_true',
dest='all_currencies',
... | from django.core.management.base import BaseCommand
from ...tasks import update_conversion_rates, create_conversion_rates
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument(
'--all',
action='store_true',
dest='all_currencies',
... | Fix typo create_conversion_rates in commands | Fix typo create_conversion_rates in commands
| Python | bsd-3-clause | mirumee/django-prices-openexchangerates | from django.core.management.base import BaseCommand
from ...tasks import update_conversion_rates, create_conversion_dates
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument(
'--all',
action='store_true',
dest='all_currencies',
... | from django.core.management.base import BaseCommand
from ...tasks import update_conversion_rates, create_conversion_rates
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument(
'--all',
action='store_true',
dest='all_currencies',
... | <commit_before>from django.core.management.base import BaseCommand
from ...tasks import update_conversion_rates, create_conversion_dates
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument(
'--all',
action='store_true',
dest='all_currencie... | from django.core.management.base import BaseCommand
from ...tasks import update_conversion_rates, create_conversion_rates
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument(
'--all',
action='store_true',
dest='all_currencies',
... | from django.core.management.base import BaseCommand
from ...tasks import update_conversion_rates, create_conversion_dates
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument(
'--all',
action='store_true',
dest='all_currencies',
... | <commit_before>from django.core.management.base import BaseCommand
from ...tasks import update_conversion_rates, create_conversion_dates
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument(
'--all',
action='store_true',
dest='all_currencie... |
d74b524cec824e77adbcf9cc23e28a6efba02985 | takePicture.py | takePicture.py | import picamera as p
import os
import time
os.chdir('/home/pi/Desktop')
cam = p.PiCamera()
cam.resolution = (320,240)
cam.hflip = True
cam.vflip = True
x = 0
while x < 15:
img = cam.capture('gregTest.jpg')
time.sleep(.25)
x +=1
exit()
| import picamera as p
import os
import time
os.chdir('/home/pi/Desktop')
cam = p.PiCamera()
cam.resolution = (320,240)
cam.hflip = True
cam.vflip = True
x = 0
while x < 50:
img = cam.capture('tempGregTest.jpg')
os.unlink('gregTest.jpg')
os.rename('tempGregTest.jpg','gregTest.jpg')
time.sleep(.25)
x +=1
exit()
| Add temp pic file sequence to takepicture file | Add temp pic file sequence to takepicture file
| Python | mit | jwarshaw/RaspberryDrive | import picamera as p
import os
import time
os.chdir('/home/pi/Desktop')
cam = p.PiCamera()
cam.resolution = (320,240)
cam.hflip = True
cam.vflip = True
x = 0
while x < 15:
img = cam.capture('gregTest.jpg')
time.sleep(.25)
x +=1
exit()
Add temp pic file sequence to takepicture file | import picamera as p
import os
import time
os.chdir('/home/pi/Desktop')
cam = p.PiCamera()
cam.resolution = (320,240)
cam.hflip = True
cam.vflip = True
x = 0
while x < 50:
img = cam.capture('tempGregTest.jpg')
os.unlink('gregTest.jpg')
os.rename('tempGregTest.jpg','gregTest.jpg')
time.sleep(.25)
x +=1
exit()
| <commit_before>import picamera as p
import os
import time
os.chdir('/home/pi/Desktop')
cam = p.PiCamera()
cam.resolution = (320,240)
cam.hflip = True
cam.vflip = True
x = 0
while x < 15:
img = cam.capture('gregTest.jpg')
time.sleep(.25)
x +=1
exit()
<commit_msg>Add temp pic file sequence to takepicture file<comm... | import picamera as p
import os
import time
os.chdir('/home/pi/Desktop')
cam = p.PiCamera()
cam.resolution = (320,240)
cam.hflip = True
cam.vflip = True
x = 0
while x < 50:
img = cam.capture('tempGregTest.jpg')
os.unlink('gregTest.jpg')
os.rename('tempGregTest.jpg','gregTest.jpg')
time.sleep(.25)
x +=1
exit()
| import picamera as p
import os
import time
os.chdir('/home/pi/Desktop')
cam = p.PiCamera()
cam.resolution = (320,240)
cam.hflip = True
cam.vflip = True
x = 0
while x < 15:
img = cam.capture('gregTest.jpg')
time.sleep(.25)
x +=1
exit()
Add temp pic file sequence to takepicture fileimport picamera as p
import os
i... | <commit_before>import picamera as p
import os
import time
os.chdir('/home/pi/Desktop')
cam = p.PiCamera()
cam.resolution = (320,240)
cam.hflip = True
cam.vflip = True
x = 0
while x < 15:
img = cam.capture('gregTest.jpg')
time.sleep(.25)
x +=1
exit()
<commit_msg>Add temp pic file sequence to takepicture file<comm... |
0c5abad8259cccfd1ce50b27a124089d9ea946dd | copr_build.py | copr_build.py | #!/usr/bin/env python3
import json, os, sys
import requests
api_url = "https://copr.fedorainfracloud.org/api_2"
api_login = os.environ["copr_login"]
api_token = os.environ["copr_token"]
r = requests.get("%s/projects/%s/chroots" % (api_url, os.environ["copr_projectid"])).json()
chroots = []
for i in r.get("chroots"):
... | #!/usr/bin/env python3
import os
import sys
import requests
api_url = "https://copr.fedorainfracloud.org/api_2"
api_login = os.environ["copr_login"]
api_token = os.environ["copr_token"]
project_id = int(os.environ["copr_projectid"])
r = requests.get("%s/projects/%s/chroots" % (api_url, project_id))
if not r.ok:
pr... | Fix copr build trigger script | Fix copr build trigger script
| Python | mit | kyl191/nginx-pagespeed,kyl191/nginx-pagespeed,kyl191/nginx-pagespeed | #!/usr/bin/env python3
import json, os, sys
import requests
api_url = "https://copr.fedorainfracloud.org/api_2"
api_login = os.environ["copr_login"]
api_token = os.environ["copr_token"]
r = requests.get("%s/projects/%s/chroots" % (api_url, os.environ["copr_projectid"])).json()
chroots = []
for i in r.get("chroots"):
... | #!/usr/bin/env python3
import os
import sys
import requests
api_url = "https://copr.fedorainfracloud.org/api_2"
api_login = os.environ["copr_login"]
api_token = os.environ["copr_token"]
project_id = int(os.environ["copr_projectid"])
r = requests.get("%s/projects/%s/chroots" % (api_url, project_id))
if not r.ok:
pr... | <commit_before>#!/usr/bin/env python3
import json, os, sys
import requests
api_url = "https://copr.fedorainfracloud.org/api_2"
api_login = os.environ["copr_login"]
api_token = os.environ["copr_token"]
r = requests.get("%s/projects/%s/chroots" % (api_url, os.environ["copr_projectid"])).json()
chroots = []
for i in r.ge... | #!/usr/bin/env python3
import os
import sys
import requests
api_url = "https://copr.fedorainfracloud.org/api_2"
api_login = os.environ["copr_login"]
api_token = os.environ["copr_token"]
project_id = int(os.environ["copr_projectid"])
r = requests.get("%s/projects/%s/chroots" % (api_url, project_id))
if not r.ok:
pr... | #!/usr/bin/env python3
import json, os, sys
import requests
api_url = "https://copr.fedorainfracloud.org/api_2"
api_login = os.environ["copr_login"]
api_token = os.environ["copr_token"]
r = requests.get("%s/projects/%s/chroots" % (api_url, os.environ["copr_projectid"])).json()
chroots = []
for i in r.get("chroots"):
... | <commit_before>#!/usr/bin/env python3
import json, os, sys
import requests
api_url = "https://copr.fedorainfracloud.org/api_2"
api_login = os.environ["copr_login"]
api_token = os.environ["copr_token"]
r = requests.get("%s/projects/%s/chroots" % (api_url, os.environ["copr_projectid"])).json()
chroots = []
for i in r.ge... |
bff8d72c83c7f8a9321e4a065daa621c9e7d0539 | pipeline_dart2js/compiler.py | pipeline_dart2js/compiler.py | from os.path import dirname
from django.conf import settings
from pipeline.compilers import SubProcessCompiler
class Dart2jsCompiler(SubProcessCompiler):
output_extension = 'js'
def match_file(self, filename):
return filename.endswith('.dart')
def compile_file(self, infile, outfile, outdated=Fal... | from os.path import dirname
from django.conf import settings
from pipeline.compilers import SubProcessCompiler
class Dart2jsCompiler(SubProcessCompiler):
output_extension = 'js'
def match_file(self, filename):
return filename.endswith('.dart')
def compile_file(self, infile, outfile, outdated=Fal... | Update to new command line | Update to new command line
| Python | apache-2.0 | wienczny/django-pipeline-dart2js | from os.path import dirname
from django.conf import settings
from pipeline.compilers import SubProcessCompiler
class Dart2jsCompiler(SubProcessCompiler):
output_extension = 'js'
def match_file(self, filename):
return filename.endswith('.dart')
def compile_file(self, infile, outfile, outdated=Fal... | from os.path import dirname
from django.conf import settings
from pipeline.compilers import SubProcessCompiler
class Dart2jsCompiler(SubProcessCompiler):
output_extension = 'js'
def match_file(self, filename):
return filename.endswith('.dart')
def compile_file(self, infile, outfile, outdated=Fal... | <commit_before>from os.path import dirname
from django.conf import settings
from pipeline.compilers import SubProcessCompiler
class Dart2jsCompiler(SubProcessCompiler):
output_extension = 'js'
def match_file(self, filename):
return filename.endswith('.dart')
def compile_file(self, infile, outfil... | from os.path import dirname
from django.conf import settings
from pipeline.compilers import SubProcessCompiler
class Dart2jsCompiler(SubProcessCompiler):
output_extension = 'js'
def match_file(self, filename):
return filename.endswith('.dart')
def compile_file(self, infile, outfile, outdated=Fal... | from os.path import dirname
from django.conf import settings
from pipeline.compilers import SubProcessCompiler
class Dart2jsCompiler(SubProcessCompiler):
output_extension = 'js'
def match_file(self, filename):
return filename.endswith('.dart')
def compile_file(self, infile, outfile, outdated=Fal... | <commit_before>from os.path import dirname
from django.conf import settings
from pipeline.compilers import SubProcessCompiler
class Dart2jsCompiler(SubProcessCompiler):
output_extension = 'js'
def match_file(self, filename):
return filename.endswith('.dart')
def compile_file(self, infile, outfil... |
9f1964f9f83c493f9bc6e08e2058d1e14ace031f | synapse/tests/test_cells.py | synapse/tests/test_cells.py | import synapse.axon as s_axon
import synapse.cells as s_cells
import synapse.cryotank as s_cryotank
from synapse.tests.common import *
class CellTest(SynTest):
def test_getcells(self):
data = s_cells.getCells()
data = {k: v for k, v in data}
self.isin('cortex', data)
| import synapse.axon as s_axon
import synapse.cells as s_cells
import synapse.cryotank as s_cryotank
from synapse.tests.common import *
class CellTest(SynTest):
def test_getcells(self):
data = s_cells.getCells()
data = {k: v for k, v in data}
self.isin('cortex', data)
def test_deploy(s... | Add a test for s_cells.deploy() | Add a test for s_cells.deploy()
| Python | apache-2.0 | vertexproject/synapse,vertexproject/synapse,vertexproject/synapse | import synapse.axon as s_axon
import synapse.cells as s_cells
import synapse.cryotank as s_cryotank
from synapse.tests.common import *
class CellTest(SynTest):
def test_getcells(self):
data = s_cells.getCells()
data = {k: v for k, v in data}
self.isin('cortex', data)
Add a test for s_cells... | import synapse.axon as s_axon
import synapse.cells as s_cells
import synapse.cryotank as s_cryotank
from synapse.tests.common import *
class CellTest(SynTest):
def test_getcells(self):
data = s_cells.getCells()
data = {k: v for k, v in data}
self.isin('cortex', data)
def test_deploy(s... | <commit_before>import synapse.axon as s_axon
import synapse.cells as s_cells
import synapse.cryotank as s_cryotank
from synapse.tests.common import *
class CellTest(SynTest):
def test_getcells(self):
data = s_cells.getCells()
data = {k: v for k, v in data}
self.isin('cortex', data)
<commit... | import synapse.axon as s_axon
import synapse.cells as s_cells
import synapse.cryotank as s_cryotank
from synapse.tests.common import *
class CellTest(SynTest):
def test_getcells(self):
data = s_cells.getCells()
data = {k: v for k, v in data}
self.isin('cortex', data)
def test_deploy(s... | import synapse.axon as s_axon
import synapse.cells as s_cells
import synapse.cryotank as s_cryotank
from synapse.tests.common import *
class CellTest(SynTest):
def test_getcells(self):
data = s_cells.getCells()
data = {k: v for k, v in data}
self.isin('cortex', data)
Add a test for s_cells... | <commit_before>import synapse.axon as s_axon
import synapse.cells as s_cells
import synapse.cryotank as s_cryotank
from synapse.tests.common import *
class CellTest(SynTest):
def test_getcells(self):
data = s_cells.getCells()
data = {k: v for k, v in data}
self.isin('cortex', data)
<commit... |
e08b4f1b74f0fcd987299d4786b5374fe86a21bc | Lib/idlelib/macosxSupport.py | Lib/idlelib/macosxSupport.py | """
A number of function that enhance IDLE on MacOSX when it used as a normal
GUI application (as opposed to an X11 application).
"""
import sys
def runningAsOSXApp():
""" Returns True iff running from the IDLE.app bundle on OSX """
return (sys.platform == 'darwin' and 'IDLE.app' in sys.argv[0])
def... | """
A number of function that enhance IDLE on MacOSX when it used as a normal
GUI application (as opposed to an X11 application).
"""
import sys
def runningAsOSXApp():
""" Returns True iff running from the IDLE.app bundle on OSX """
return (sys.platform == 'darwin' and 'IDLE.app' in sys.argv[0])
def addOpenEv... | Add missing svn:eol-style property to text files. | Add missing svn:eol-style property to text files.
| Python | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | """
A number of function that enhance IDLE on MacOSX when it used as a normal
GUI application (as opposed to an X11 application).
"""
import sys
def runningAsOSXApp():
""" Returns True iff running from the IDLE.app bundle on OSX """
return (sys.platform == 'darwin' and 'IDLE.app' in sys.argv[0])
def... | """
A number of function that enhance IDLE on MacOSX when it used as a normal
GUI application (as opposed to an X11 application).
"""
import sys
def runningAsOSXApp():
""" Returns True iff running from the IDLE.app bundle on OSX """
return (sys.platform == 'darwin' and 'IDLE.app' in sys.argv[0])
def addOpenEv... | <commit_before>"""
A number of function that enhance IDLE on MacOSX when it used as a normal
GUI application (as opposed to an X11 application).
"""
import sys
def runningAsOSXApp():
""" Returns True iff running from the IDLE.app bundle on OSX """
return (sys.platform == 'darwin' and 'IDLE.app' in sys.... | """
A number of function that enhance IDLE on MacOSX when it used as a normal
GUI application (as opposed to an X11 application).
"""
import sys
def runningAsOSXApp():
""" Returns True iff running from the IDLE.app bundle on OSX """
return (sys.platform == 'darwin' and 'IDLE.app' in sys.argv[0])
def addOpenEv... | """
A number of function that enhance IDLE on MacOSX when it used as a normal
GUI application (as opposed to an X11 application).
"""
import sys
def runningAsOSXApp():
""" Returns True iff running from the IDLE.app bundle on OSX """
return (sys.platform == 'darwin' and 'IDLE.app' in sys.argv[0])
def... | <commit_before>"""
A number of function that enhance IDLE on MacOSX when it used as a normal
GUI application (as opposed to an X11 application).
"""
import sys
def runningAsOSXApp():
""" Returns True iff running from the IDLE.app bundle on OSX """
return (sys.platform == 'darwin' and 'IDLE.app' in sys.... |
831c810b96c0ed1b6c254b0b6b2c3b1b259b51bb | src/pyckson/model/union.py | src/pyckson/model/union.py | from typing import Tuple, Union
def inspect_optional_typing(annotation) -> Tuple[bool, type]:
# seems like at some point internal behavior on typing Union changed
# https://bugs.launchpad.net/ubuntu/+source/python3.5/+bug/1650202
if "Union" not in str(annotation):
return False, type(None)
if ... | from typing import Tuple, Union
def inspect_optional_typing(annotation) -> Tuple[bool, type]:
# seems like at some point internal behavior on typing Union changed
# https://bugs.launchpad.net/ubuntu/+source/python3.5/+bug/1650202
if "Union" not in str(annotation) and "Optional" not in str(annotation):
... | Fix optional inspection in 3.9 | Fix optional inspection in 3.9
| Python | lgpl-2.1 | antidot/Pyckson | from typing import Tuple, Union
def inspect_optional_typing(annotation) -> Tuple[bool, type]:
# seems like at some point internal behavior on typing Union changed
# https://bugs.launchpad.net/ubuntu/+source/python3.5/+bug/1650202
if "Union" not in str(annotation):
return False, type(None)
if ... | from typing import Tuple, Union
def inspect_optional_typing(annotation) -> Tuple[bool, type]:
# seems like at some point internal behavior on typing Union changed
# https://bugs.launchpad.net/ubuntu/+source/python3.5/+bug/1650202
if "Union" not in str(annotation) and "Optional" not in str(annotation):
... | <commit_before>from typing import Tuple, Union
def inspect_optional_typing(annotation) -> Tuple[bool, type]:
# seems like at some point internal behavior on typing Union changed
# https://bugs.launchpad.net/ubuntu/+source/python3.5/+bug/1650202
if "Union" not in str(annotation):
return False, type... | from typing import Tuple, Union
def inspect_optional_typing(annotation) -> Tuple[bool, type]:
# seems like at some point internal behavior on typing Union changed
# https://bugs.launchpad.net/ubuntu/+source/python3.5/+bug/1650202
if "Union" not in str(annotation) and "Optional" not in str(annotation):
... | from typing import Tuple, Union
def inspect_optional_typing(annotation) -> Tuple[bool, type]:
# seems like at some point internal behavior on typing Union changed
# https://bugs.launchpad.net/ubuntu/+source/python3.5/+bug/1650202
if "Union" not in str(annotation):
return False, type(None)
if ... | <commit_before>from typing import Tuple, Union
def inspect_optional_typing(annotation) -> Tuple[bool, type]:
# seems like at some point internal behavior on typing Union changed
# https://bugs.launchpad.net/ubuntu/+source/python3.5/+bug/1650202
if "Union" not in str(annotation):
return False, type... |
a753841d01eb3e9493e08e20e8a28c9b08fdef53 | comics/sets/models.py | comics/sets/models.py | from django.db import models
from django.utils import timezone
from comics.core.models import Comic
class Set(models.Model):
name = models.SlugField(max_length=100, unique=True,
help_text='The set identifier')
add_new_comics = models.BooleanField(default=False,
help_text='Automatically add ne... | from django.db import models
from django.utils import timezone
from comics.core.models import Comic
class Set(models.Model):
name = models.SlugField(
max_length=100, unique=True,
help_text='The set identifier')
add_new_comics = models.BooleanField(
default=False,
help_text='Au... | Fix all warnings in sets app | flake8: Fix all warnings in sets app
| Python | agpl-3.0 | datagutten/comics,jodal/comics,jodal/comics,datagutten/comics,datagutten/comics,datagutten/comics,jodal/comics,jodal/comics | from django.db import models
from django.utils import timezone
from comics.core.models import Comic
class Set(models.Model):
name = models.SlugField(max_length=100, unique=True,
help_text='The set identifier')
add_new_comics = models.BooleanField(default=False,
help_text='Automatically add ne... | from django.db import models
from django.utils import timezone
from comics.core.models import Comic
class Set(models.Model):
name = models.SlugField(
max_length=100, unique=True,
help_text='The set identifier')
add_new_comics = models.BooleanField(
default=False,
help_text='Au... | <commit_before>from django.db import models
from django.utils import timezone
from comics.core.models import Comic
class Set(models.Model):
name = models.SlugField(max_length=100, unique=True,
help_text='The set identifier')
add_new_comics = models.BooleanField(default=False,
help_text='Autom... | from django.db import models
from django.utils import timezone
from comics.core.models import Comic
class Set(models.Model):
name = models.SlugField(
max_length=100, unique=True,
help_text='The set identifier')
add_new_comics = models.BooleanField(
default=False,
help_text='Au... | from django.db import models
from django.utils import timezone
from comics.core.models import Comic
class Set(models.Model):
name = models.SlugField(max_length=100, unique=True,
help_text='The set identifier')
add_new_comics = models.BooleanField(default=False,
help_text='Automatically add ne... | <commit_before>from django.db import models
from django.utils import timezone
from comics.core.models import Comic
class Set(models.Model):
name = models.SlugField(max_length=100, unique=True,
help_text='The set identifier')
add_new_comics = models.BooleanField(default=False,
help_text='Autom... |
4410e03df12b99c46467b6fe93f7b8cb206d441c | decorators.py | decorators.py | import time
def retry(ExceptionToCheck, tries=4, delay=3, backoff=2, logger=None):
"""Retry calling the decorated function using an exponential backoff.
http://www.saltycrane.com/blog/2009/11/trying-out-retry-decorator-python/
original from: http://wiki.python.org/moin/PythonDecoratorLibrary#Retry
:p... | import time
from functools import wraps
def retry(ExceptionToCheck, tries=4, delay=3, backoff=2, logger=None):
"""Retry calling the decorated function using an exponential backoff.
http://www.saltycrane.com/blog/2009/11/trying-out-retry-decorator-python/
original from: http://wiki.python.org/moin/PythonD... | Remove unreachable code. Use functools.wraps. | Remove unreachable code. Use functools.wraps.
- Remove code that was unreachable. Thanks Jaskirat
(http://www.saltycrane.com/blog/2009/11/trying-out-retry-decorator-python/#c24691)
- Use functools.wraps to make the retry decorator "well behaved"
- Fix typo
| Python | bsd-3-clause | saltycrane/retry-decorator | import time
def retry(ExceptionToCheck, tries=4, delay=3, backoff=2, logger=None):
"""Retry calling the decorated function using an exponential backoff.
http://www.saltycrane.com/blog/2009/11/trying-out-retry-decorator-python/
original from: http://wiki.python.org/moin/PythonDecoratorLibrary#Retry
:p... | import time
from functools import wraps
def retry(ExceptionToCheck, tries=4, delay=3, backoff=2, logger=None):
"""Retry calling the decorated function using an exponential backoff.
http://www.saltycrane.com/blog/2009/11/trying-out-retry-decorator-python/
original from: http://wiki.python.org/moin/PythonD... | <commit_before>import time
def retry(ExceptionToCheck, tries=4, delay=3, backoff=2, logger=None):
"""Retry calling the decorated function using an exponential backoff.
http://www.saltycrane.com/blog/2009/11/trying-out-retry-decorator-python/
original from: http://wiki.python.org/moin/PythonDecoratorLibrar... | import time
from functools import wraps
def retry(ExceptionToCheck, tries=4, delay=3, backoff=2, logger=None):
"""Retry calling the decorated function using an exponential backoff.
http://www.saltycrane.com/blog/2009/11/trying-out-retry-decorator-python/
original from: http://wiki.python.org/moin/PythonD... | import time
def retry(ExceptionToCheck, tries=4, delay=3, backoff=2, logger=None):
"""Retry calling the decorated function using an exponential backoff.
http://www.saltycrane.com/blog/2009/11/trying-out-retry-decorator-python/
original from: http://wiki.python.org/moin/PythonDecoratorLibrary#Retry
:p... | <commit_before>import time
def retry(ExceptionToCheck, tries=4, delay=3, backoff=2, logger=None):
"""Retry calling the decorated function using an exponential backoff.
http://www.saltycrane.com/blog/2009/11/trying-out-retry-decorator-python/
original from: http://wiki.python.org/moin/PythonDecoratorLibrar... |
ebd024b4f8ee6e490c183da0bada28a2aaf328d8 | comrade/users/urls.py | comrade/users/urls.py | from django.conf.urls.defaults import *
from django.core.urlresolvers import reverse
from django.utils.functional import lazy
reverse_lazy = lazy(reverse, unicode)
urlpatterns = patterns('django.contrib.auth.views',
url(r'^login/', 'login', name='login'),
url(r'^logout/', 'logout', {'next_page':'/'}, name='lo... | from django.conf.urls.defaults import *
from django.core.urlresolvers import reverse
from django.utils.functional import lazy
reverse_lazy = lazy(reverse, unicode)
urlpatterns = patterns('django.contrib.auth.views',
url(r'^login/', 'login', name='login'),
url(r'^logout/', 'logout', {'next_page':'/'}, name='lo... | Rename url namespace users -> account. | Rename url namespace users -> account.
| Python | mit | bueda/django-comrade | from django.conf.urls.defaults import *
from django.core.urlresolvers import reverse
from django.utils.functional import lazy
reverse_lazy = lazy(reverse, unicode)
urlpatterns = patterns('django.contrib.auth.views',
url(r'^login/', 'login', name='login'),
url(r'^logout/', 'logout', {'next_page':'/'}, name='lo... | from django.conf.urls.defaults import *
from django.core.urlresolvers import reverse
from django.utils.functional import lazy
reverse_lazy = lazy(reverse, unicode)
urlpatterns = patterns('django.contrib.auth.views',
url(r'^login/', 'login', name='login'),
url(r'^logout/', 'logout', {'next_page':'/'}, name='lo... | <commit_before>from django.conf.urls.defaults import *
from django.core.urlresolvers import reverse
from django.utils.functional import lazy
reverse_lazy = lazy(reverse, unicode)
urlpatterns = patterns('django.contrib.auth.views',
url(r'^login/', 'login', name='login'),
url(r'^logout/', 'logout', {'next_page'... | from django.conf.urls.defaults import *
from django.core.urlresolvers import reverse
from django.utils.functional import lazy
reverse_lazy = lazy(reverse, unicode)
urlpatterns = patterns('django.contrib.auth.views',
url(r'^login/', 'login', name='login'),
url(r'^logout/', 'logout', {'next_page':'/'}, name='lo... | from django.conf.urls.defaults import *
from django.core.urlresolvers import reverse
from django.utils.functional import lazy
reverse_lazy = lazy(reverse, unicode)
urlpatterns = patterns('django.contrib.auth.views',
url(r'^login/', 'login', name='login'),
url(r'^logout/', 'logout', {'next_page':'/'}, name='lo... | <commit_before>from django.conf.urls.defaults import *
from django.core.urlresolvers import reverse
from django.utils.functional import lazy
reverse_lazy = lazy(reverse, unicode)
urlpatterns = patterns('django.contrib.auth.views',
url(r'^login/', 'login', name='login'),
url(r'^logout/', 'logout', {'next_page'... |
37490a9bd916480775271cf7e0c91b11a7eac913 | distarray/tests/run_ipcluster.py | distarray/tests/run_ipcluster.py | import six
from subprocess import Popen, PIPE
def run_ipcluster(n=4):
"""Convenient way to start an ipcluster for testing.
You have to wait for it to start, however.
"""
# FIXME: This should be reimplemented to signal when the cluster has
# successfully started
if six.PY2:
cmd = 'ipcl... | import sys
import six
from subprocess import Popen, PIPE
if six.PY2:
ipcluster_cmd = 'ipcluster'
elif six.PY3:
ipcluster_cmd = 'ipcluster3'
else:
raise NotImplementedError("Not run with Python 2 *or* 3?")
def start(n=12):
"""Convenient way to start an ipcluster for testing.
You have to wait for... | Add a `stop` command to the script. | Add a `stop` command to the script. | Python | bsd-3-clause | enthought/distarray,enthought/distarray,RaoUmer/distarray,RaoUmer/distarray | import six
from subprocess import Popen, PIPE
def run_ipcluster(n=4):
"""Convenient way to start an ipcluster for testing.
You have to wait for it to start, however.
"""
# FIXME: This should be reimplemented to signal when the cluster has
# successfully started
if six.PY2:
cmd = 'ipcl... | import sys
import six
from subprocess import Popen, PIPE
if six.PY2:
ipcluster_cmd = 'ipcluster'
elif six.PY3:
ipcluster_cmd = 'ipcluster3'
else:
raise NotImplementedError("Not run with Python 2 *or* 3?")
def start(n=12):
"""Convenient way to start an ipcluster for testing.
You have to wait for... | <commit_before>import six
from subprocess import Popen, PIPE
def run_ipcluster(n=4):
"""Convenient way to start an ipcluster for testing.
You have to wait for it to start, however.
"""
# FIXME: This should be reimplemented to signal when the cluster has
# successfully started
if six.PY2:
... | import sys
import six
from subprocess import Popen, PIPE
if six.PY2:
ipcluster_cmd = 'ipcluster'
elif six.PY3:
ipcluster_cmd = 'ipcluster3'
else:
raise NotImplementedError("Not run with Python 2 *or* 3?")
def start(n=12):
"""Convenient way to start an ipcluster for testing.
You have to wait for... | import six
from subprocess import Popen, PIPE
def run_ipcluster(n=4):
"""Convenient way to start an ipcluster for testing.
You have to wait for it to start, however.
"""
# FIXME: This should be reimplemented to signal when the cluster has
# successfully started
if six.PY2:
cmd = 'ipcl... | <commit_before>import six
from subprocess import Popen, PIPE
def run_ipcluster(n=4):
"""Convenient way to start an ipcluster for testing.
You have to wait for it to start, however.
"""
# FIXME: This should be reimplemented to signal when the cluster has
# successfully started
if six.PY2:
... |
b471da17f2e7b13d30746481e5db13f4d88de4d6 | django/contrib/admin/__init__.py | django/contrib/admin/__init__.py | from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL
from django.contrib.admin.options import StackedInline, TabularInline
from django.contrib.admin.sites import AdminSite, site
def autodiscover():
"""
Auto-discover INSTALLED_APPS admin.py modules and fail silently when
not present. T... | # ACTION_CHECKBOX_NAME is unused, but should stay since its import from here
# has been referenced in documentation.
from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME
from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL
from django.contrib.admin.options import StackedInline, TabularInli... | Revert the removal of an unused import (in [14175]) that was referenced in documentation. Thanks for noticing, clong. | Revert the removal of an unused import (in [14175]) that was referenced in documentation. Thanks for noticing, clong.
--HG--
extra : convert_revision : svn%3Abcc190cf-cafb-0310-a4f2-bffc1f526a37/django/trunk%4014359
| Python | bsd-3-clause | adieu/django-nonrel,adieu/django-nonrel,adieu/django-nonrel | from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL
from django.contrib.admin.options import StackedInline, TabularInline
from django.contrib.admin.sites import AdminSite, site
def autodiscover():
"""
Auto-discover INSTALLED_APPS admin.py modules and fail silently when
not present. T... | # ACTION_CHECKBOX_NAME is unused, but should stay since its import from here
# has been referenced in documentation.
from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME
from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL
from django.contrib.admin.options import StackedInline, TabularInli... | <commit_before>from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL
from django.contrib.admin.options import StackedInline, TabularInline
from django.contrib.admin.sites import AdminSite, site
def autodiscover():
"""
Auto-discover INSTALLED_APPS admin.py modules and fail silently when
... | # ACTION_CHECKBOX_NAME is unused, but should stay since its import from here
# has been referenced in documentation.
from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME
from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL
from django.contrib.admin.options import StackedInline, TabularInli... | from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL
from django.contrib.admin.options import StackedInline, TabularInline
from django.contrib.admin.sites import AdminSite, site
def autodiscover():
"""
Auto-discover INSTALLED_APPS admin.py modules and fail silently when
not present. T... | <commit_before>from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL
from django.contrib.admin.options import StackedInline, TabularInline
from django.contrib.admin.sites import AdminSite, site
def autodiscover():
"""
Auto-discover INSTALLED_APPS admin.py modules and fail silently when
... |
0683e96d0cd55797639c84003e03c48ae7211912 | sidecar/__init__.py | sidecar/__init__.py | from pyramid.config import Configurator
from pyramid.events import BeforeRender
from sqlalchemy import engine_from_config
from . import helpers
from .model import Session, Base
def add_renderer_globals(event):
event['h'] = helpers
def main(global_config, **settings):
"""
This function returns a Pyramid... | from pyramid.config import Configurator
from pyramid.events import BeforeRender
from sqlalchemy import engine_from_config
from . import helpers
from .model import Session, Base
def add_renderer_globals(event):
event['h'] = helpers
def main(global_config, **settings):
"""
This function returns a Pyramid... | Disable config.scan() as well for now | Disable config.scan() as well for now
| Python | mit | storborg/sidecar,storborg/sidecar | from pyramid.config import Configurator
from pyramid.events import BeforeRender
from sqlalchemy import engine_from_config
from . import helpers
from .model import Session, Base
def add_renderer_globals(event):
event['h'] = helpers
def main(global_config, **settings):
"""
This function returns a Pyramid... | from pyramid.config import Configurator
from pyramid.events import BeforeRender
from sqlalchemy import engine_from_config
from . import helpers
from .model import Session, Base
def add_renderer_globals(event):
event['h'] = helpers
def main(global_config, **settings):
"""
This function returns a Pyramid... | <commit_before>from pyramid.config import Configurator
from pyramid.events import BeforeRender
from sqlalchemy import engine_from_config
from . import helpers
from .model import Session, Base
def add_renderer_globals(event):
event['h'] = helpers
def main(global_config, **settings):
"""
This function re... | from pyramid.config import Configurator
from pyramid.events import BeforeRender
from sqlalchemy import engine_from_config
from . import helpers
from .model import Session, Base
def add_renderer_globals(event):
event['h'] = helpers
def main(global_config, **settings):
"""
This function returns a Pyramid... | from pyramid.config import Configurator
from pyramid.events import BeforeRender
from sqlalchemy import engine_from_config
from . import helpers
from .model import Session, Base
def add_renderer_globals(event):
event['h'] = helpers
def main(global_config, **settings):
"""
This function returns a Pyramid... | <commit_before>from pyramid.config import Configurator
from pyramid.events import BeforeRender
from sqlalchemy import engine_from_config
from . import helpers
from .model import Session, Base
def add_renderer_globals(event):
event['h'] = helpers
def main(global_config, **settings):
"""
This function re... |
2d5710dfc8361bb4c383e8fe8a2e2ca267c11875 | luhn/luhn.py | luhn/luhn.py | # File: luhn.py
# Purpose: Write a program that can take a number and determine whether
# or not it is valid per the Luhn formula.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Sunday 18 September 2016, 09:55 PM
class Luhn(object):
def __init__(self, card_number):
... | # File: luhn.py
# Purpose: Write a program that can take a number and determine whether
# or not it is valid per the Luhn formula.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Sunday 18 September 2016, 09:55 PM
class Luhn(object):
def __init__(self, card_number):
... | Convert card number to string for iteration | Convert card number to string for iteration
| Python | mit | amalshehu/exercism-python | # File: luhn.py
# Purpose: Write a program that can take a number and determine whether
# or not it is valid per the Luhn formula.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Sunday 18 September 2016, 09:55 PM
class Luhn(object):
def __init__(self, card_number):
... | # File: luhn.py
# Purpose: Write a program that can take a number and determine whether
# or not it is valid per the Luhn formula.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Sunday 18 September 2016, 09:55 PM
class Luhn(object):
def __init__(self, card_number):
... | <commit_before># File: luhn.py
# Purpose: Write a program that can take a number and determine whether
# or not it is valid per the Luhn formula.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Sunday 18 September 2016, 09:55 PM
class Luhn(object):
def __init__(self, card_... | # File: luhn.py
# Purpose: Write a program that can take a number and determine whether
# or not it is valid per the Luhn formula.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Sunday 18 September 2016, 09:55 PM
class Luhn(object):
def __init__(self, card_number):
... | # File: luhn.py
# Purpose: Write a program that can take a number and determine whether
# or not it is valid per the Luhn formula.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Sunday 18 September 2016, 09:55 PM
class Luhn(object):
def __init__(self, card_number):
... | <commit_before># File: luhn.py
# Purpose: Write a program that can take a number and determine whether
# or not it is valid per the Luhn formula.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Sunday 18 September 2016, 09:55 PM
class Luhn(object):
def __init__(self, card_... |
88d93f580ce2f587ac5fa1b41e7ab3f67a9c6be4 | avalonstar/apps/live/urls.py | avalonstar/apps/live/urls.py | # -*- coding: utf-8 -*-
from django.conf import settings
from django.conf.urls import patterns, include, url
from .views import AwayView, BumperView, GameView, PrologueView
urlpatterns = patterns('',
url(r'^away/$', name='live-away', view=AwayView.as_view()),
url(r'^bumper/$', name='live-bumper', view=Bumper... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.conf.urls import patterns, include, url
from .views import (AwayView, BumperView, DiscussionView, GameView,
PrologueView)
urlpatterns = patterns('',
url(r'^away/$', name='live-away', view=AwayView.as_view()),
url(r'^bumper/$', name='liv... | Add DiscussionView to the URLs. | Add DiscussionView to the URLs.
| Python | apache-2.0 | bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv | # -*- coding: utf-8 -*-
from django.conf import settings
from django.conf.urls import patterns, include, url
from .views import AwayView, BumperView, GameView, PrologueView
urlpatterns = patterns('',
url(r'^away/$', name='live-away', view=AwayView.as_view()),
url(r'^bumper/$', name='live-bumper', view=Bumper... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.conf.urls import patterns, include, url
from .views import (AwayView, BumperView, DiscussionView, GameView,
PrologueView)
urlpatterns = patterns('',
url(r'^away/$', name='live-away', view=AwayView.as_view()),
url(r'^bumper/$', name='liv... | <commit_before># -*- coding: utf-8 -*-
from django.conf import settings
from django.conf.urls import patterns, include, url
from .views import AwayView, BumperView, GameView, PrologueView
urlpatterns = patterns('',
url(r'^away/$', name='live-away', view=AwayView.as_view()),
url(r'^bumper/$', name='live-bumpe... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.conf.urls import patterns, include, url
from .views import (AwayView, BumperView, DiscussionView, GameView,
PrologueView)
urlpatterns = patterns('',
url(r'^away/$', name='live-away', view=AwayView.as_view()),
url(r'^bumper/$', name='liv... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.conf.urls import patterns, include, url
from .views import AwayView, BumperView, GameView, PrologueView
urlpatterns = patterns('',
url(r'^away/$', name='live-away', view=AwayView.as_view()),
url(r'^bumper/$', name='live-bumper', view=Bumper... | <commit_before># -*- coding: utf-8 -*-
from django.conf import settings
from django.conf.urls import patterns, include, url
from .views import AwayView, BumperView, GameView, PrologueView
urlpatterns = patterns('',
url(r'^away/$', name='live-away', view=AwayView.as_view()),
url(r'^bumper/$', name='live-bumpe... |
0fed581409f0dfa4788964d02d066e8e30f1387f | webapp/byceps/blueprints/shop_admin/service.py | webapp/byceps/blueprints/shop_admin/service.py | # -*- coding: utf-8 -*-
"""
byceps.blueprints.shop_admin.service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2014 Jochen Kupperschmidt
"""
from collections import Counter
from ..shop.models import PaymentState
def count_ordered_articles(article):
"""Count how often the article has been ordered, grou... | # -*- coding: utf-8 -*-
"""
byceps.blueprints.shop_admin.service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2014 Jochen Kupperschmidt
"""
from collections import Counter
from ..shop.models import PaymentState
def count_ordered_articles(article):
"""Count how often the article has been ordered, grou... | Make sure every payment state is present in the counter. | Make sure every payment state is present in the counter.
| Python | bsd-3-clause | m-ober/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps | # -*- coding: utf-8 -*-
"""
byceps.blueprints.shop_admin.service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2014 Jochen Kupperschmidt
"""
from collections import Counter
from ..shop.models import PaymentState
def count_ordered_articles(article):
"""Count how often the article has been ordered, grou... | # -*- coding: utf-8 -*-
"""
byceps.blueprints.shop_admin.service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2014 Jochen Kupperschmidt
"""
from collections import Counter
from ..shop.models import PaymentState
def count_ordered_articles(article):
"""Count how often the article has been ordered, grou... | <commit_before># -*- coding: utf-8 -*-
"""
byceps.blueprints.shop_admin.service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2014 Jochen Kupperschmidt
"""
from collections import Counter
from ..shop.models import PaymentState
def count_ordered_articles(article):
"""Count how often the article has bee... | # -*- coding: utf-8 -*-
"""
byceps.blueprints.shop_admin.service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2014 Jochen Kupperschmidt
"""
from collections import Counter
from ..shop.models import PaymentState
def count_ordered_articles(article):
"""Count how often the article has been ordered, grou... | # -*- coding: utf-8 -*-
"""
byceps.blueprints.shop_admin.service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2014 Jochen Kupperschmidt
"""
from collections import Counter
from ..shop.models import PaymentState
def count_ordered_articles(article):
"""Count how often the article has been ordered, grou... | <commit_before># -*- coding: utf-8 -*-
"""
byceps.blueprints.shop_admin.service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2014 Jochen Kupperschmidt
"""
from collections import Counter
from ..shop.models import PaymentState
def count_ordered_articles(article):
"""Count how often the article has bee... |
0cb5447de992389be9587d7706637212bfe3b90b | tests/events/tests.py | tests/events/tests.py | # -*- coding: utf-8 -*-
from mock import Mock
from unittest2 import TestCase
from raven.events import Message
class MessageTest(TestCase):
def test_to_string(self):
unformatted_message = 'My message from %s about %s'
client = Mock()
message = Message(client)
message.logger = Mock... | # -*- coding: utf-8 -*-
from mock import Mock
from unittest2 import TestCase
from raven.events import Message
class MessageTest(TestCase):
def test_to_string(self):
unformatted_message = 'My message from %s about %s'
client = Mock()
message = Message(client)
message.logger = Mock... | Update test to match current behavior | Update test to match current behavior
| Python | bsd-3-clause | johansteffner/raven-python,Photonomie/raven-python,jbarbuto/raven-python,nikolas/raven-python,lepture/raven-python,smarkets/raven-python,arthurlogilab/raven-python,lepture/raven-python,hzy/raven-python,recht/raven-python,inspirehep/raven-python,nikolas/raven-python,openlabs/raven,patrys/opbeat_python,ewdurbin/raven-pyt... | # -*- coding: utf-8 -*-
from mock import Mock
from unittest2 import TestCase
from raven.events import Message
class MessageTest(TestCase):
def test_to_string(self):
unformatted_message = 'My message from %s about %s'
client = Mock()
message = Message(client)
message.logger = Mock... | # -*- coding: utf-8 -*-
from mock import Mock
from unittest2 import TestCase
from raven.events import Message
class MessageTest(TestCase):
def test_to_string(self):
unformatted_message = 'My message from %s about %s'
client = Mock()
message = Message(client)
message.logger = Mock... | <commit_before># -*- coding: utf-8 -*-
from mock import Mock
from unittest2 import TestCase
from raven.events import Message
class MessageTest(TestCase):
def test_to_string(self):
unformatted_message = 'My message from %s about %s'
client = Mock()
message = Message(client)
messag... | # -*- coding: utf-8 -*-
from mock import Mock
from unittest2 import TestCase
from raven.events import Message
class MessageTest(TestCase):
def test_to_string(self):
unformatted_message = 'My message from %s about %s'
client = Mock()
message = Message(client)
message.logger = Mock... | # -*- coding: utf-8 -*-
from mock import Mock
from unittest2 import TestCase
from raven.events import Message
class MessageTest(TestCase):
def test_to_string(self):
unformatted_message = 'My message from %s about %s'
client = Mock()
message = Message(client)
message.logger = Mock... | <commit_before># -*- coding: utf-8 -*-
from mock import Mock
from unittest2 import TestCase
from raven.events import Message
class MessageTest(TestCase):
def test_to_string(self):
unformatted_message = 'My message from %s about %s'
client = Mock()
message = Message(client)
messag... |
edf2388300b0c0b230cd1b1ec91268a13ee6e6ba | homepage/views.py | homepage/views.py | from django.views.generic import FormView, RedirectView
from django.contrib.auth.forms import AuthenticationForm
from django.core.urlresolvers import reverse
from django.contrib.auth import login, logout
class LoginView(FormView):
template_name = 'homepage/login.html'
form_class = AuthenticationForm
def ... | from django.views.generic import FormView, RedirectView
from django.contrib.auth.forms import AuthenticationForm
from django.core.urlresolvers import reverse
from django.contrib.auth import login, logout
class LoginView(FormView):
template_name = 'homepage/login.html'
form_class = AuthenticationForm
def ... | Fix wrong URL for success login | Fix wrong URL for success login
| Python | mit | polarkac/TaskTracker,polarkac/TaskTracker | from django.views.generic import FormView, RedirectView
from django.contrib.auth.forms import AuthenticationForm
from django.core.urlresolvers import reverse
from django.contrib.auth import login, logout
class LoginView(FormView):
template_name = 'homepage/login.html'
form_class = AuthenticationForm
def ... | from django.views.generic import FormView, RedirectView
from django.contrib.auth.forms import AuthenticationForm
from django.core.urlresolvers import reverse
from django.contrib.auth import login, logout
class LoginView(FormView):
template_name = 'homepage/login.html'
form_class = AuthenticationForm
def ... | <commit_before>from django.views.generic import FormView, RedirectView
from django.contrib.auth.forms import AuthenticationForm
from django.core.urlresolvers import reverse
from django.contrib.auth import login, logout
class LoginView(FormView):
template_name = 'homepage/login.html'
form_class = Authenticatio... | from django.views.generic import FormView, RedirectView
from django.contrib.auth.forms import AuthenticationForm
from django.core.urlresolvers import reverse
from django.contrib.auth import login, logout
class LoginView(FormView):
template_name = 'homepage/login.html'
form_class = AuthenticationForm
def ... | from django.views.generic import FormView, RedirectView
from django.contrib.auth.forms import AuthenticationForm
from django.core.urlresolvers import reverse
from django.contrib.auth import login, logout
class LoginView(FormView):
template_name = 'homepage/login.html'
form_class = AuthenticationForm
def ... | <commit_before>from django.views.generic import FormView, RedirectView
from django.contrib.auth.forms import AuthenticationForm
from django.core.urlresolvers import reverse
from django.contrib.auth import login, logout
class LoginView(FormView):
template_name = 'homepage/login.html'
form_class = Authenticatio... |
e7f97bf1ddcf05bee3c3b6fc79c5cefb36af280a | lingcod/layers/urls.py | lingcod/layers/urls.py | from django.conf.urls.defaults import *
urlpatterns = patterns('lingcod.layers.views',
url(r'^public/',
'get_public_layers',
name='public-data-layers'),
url(r'^kml_file/(?P<session_key>\w+)/(?P<uid>[\w_]+).kml',
'get_kml_file',
name='kml-file'),
url(r'^privatekml/(?P<se... | from django.conf.urls.defaults import *
import time
urlpatterns = patterns('lingcod.layers.views',
url(r'^public/$',
'get_public_layers',
name='public-data-layers'),
# Useful for debugging, avoids GE caching interference
url(r'^public/cachebuster/%s' % str(time.time()),
'get_pu... | Add another url pattern for debugging public layers | Add another url pattern for debugging public layers
| Python | bsd-3-clause | Ecotrust/madrona_addons,Ecotrust/madrona_addons | from django.conf.urls.defaults import *
urlpatterns = patterns('lingcod.layers.views',
url(r'^public/',
'get_public_layers',
name='public-data-layers'),
url(r'^kml_file/(?P<session_key>\w+)/(?P<uid>[\w_]+).kml',
'get_kml_file',
name='kml-file'),
url(r'^privatekml/(?P<se... | from django.conf.urls.defaults import *
import time
urlpatterns = patterns('lingcod.layers.views',
url(r'^public/$',
'get_public_layers',
name='public-data-layers'),
# Useful for debugging, avoids GE caching interference
url(r'^public/cachebuster/%s' % str(time.time()),
'get_pu... | <commit_before>from django.conf.urls.defaults import *
urlpatterns = patterns('lingcod.layers.views',
url(r'^public/',
'get_public_layers',
name='public-data-layers'),
url(r'^kml_file/(?P<session_key>\w+)/(?P<uid>[\w_]+).kml',
'get_kml_file',
name='kml-file'),
url(r'^pr... | from django.conf.urls.defaults import *
import time
urlpatterns = patterns('lingcod.layers.views',
url(r'^public/$',
'get_public_layers',
name='public-data-layers'),
# Useful for debugging, avoids GE caching interference
url(r'^public/cachebuster/%s' % str(time.time()),
'get_pu... | from django.conf.urls.defaults import *
urlpatterns = patterns('lingcod.layers.views',
url(r'^public/',
'get_public_layers',
name='public-data-layers'),
url(r'^kml_file/(?P<session_key>\w+)/(?P<uid>[\w_]+).kml',
'get_kml_file',
name='kml-file'),
url(r'^privatekml/(?P<se... | <commit_before>from django.conf.urls.defaults import *
urlpatterns = patterns('lingcod.layers.views',
url(r'^public/',
'get_public_layers',
name='public-data-layers'),
url(r'^kml_file/(?P<session_key>\w+)/(?P<uid>[\w_]+).kml',
'get_kml_file',
name='kml-file'),
url(r'^pr... |
f4f5a6ffa1fd60437b83bfc435a180ddf2433ea4 | tests/test_confirmation.py | tests/test_confirmation.py | import pytest
import linkatos.confirmation as confirmation
def test_no_confirmation_with_url():
expecting_confirmation = False
parsed_m = {'out': 'http://ex.org', 'channel': 'ch', 'type': 'url'}
assert confirmation.update_confirmation_if_url(parsed_m,
ex... | import pytest
import linkatos.confirmation as confirmation
def test_no_confirmation_with_url():
expecting_confirmation = False
parsed_m = {'out': 'http://ex.org', 'channel': 'ch', 'type': 'url'}
assert confirmation.update_if_url(parsed_m,
expecting_confi... | Fix change of function names | test: Fix change of function names
| Python | mit | iwi/linkatos,iwi/linkatos | import pytest
import linkatos.confirmation as confirmation
def test_no_confirmation_with_url():
expecting_confirmation = False
parsed_m = {'out': 'http://ex.org', 'channel': 'ch', 'type': 'url'}
assert confirmation.update_confirmation_if_url(parsed_m,
ex... | import pytest
import linkatos.confirmation as confirmation
def test_no_confirmation_with_url():
expecting_confirmation = False
parsed_m = {'out': 'http://ex.org', 'channel': 'ch', 'type': 'url'}
assert confirmation.update_if_url(parsed_m,
expecting_confi... | <commit_before>import pytest
import linkatos.confirmation as confirmation
def test_no_confirmation_with_url():
expecting_confirmation = False
parsed_m = {'out': 'http://ex.org', 'channel': 'ch', 'type': 'url'}
assert confirmation.update_confirmation_if_url(parsed_m,
... | import pytest
import linkatos.confirmation as confirmation
def test_no_confirmation_with_url():
expecting_confirmation = False
parsed_m = {'out': 'http://ex.org', 'channel': 'ch', 'type': 'url'}
assert confirmation.update_if_url(parsed_m,
expecting_confi... | import pytest
import linkatos.confirmation as confirmation
def test_no_confirmation_with_url():
expecting_confirmation = False
parsed_m = {'out': 'http://ex.org', 'channel': 'ch', 'type': 'url'}
assert confirmation.update_confirmation_if_url(parsed_m,
ex... | <commit_before>import pytest
import linkatos.confirmation as confirmation
def test_no_confirmation_with_url():
expecting_confirmation = False
parsed_m = {'out': 'http://ex.org', 'channel': 'ch', 'type': 'url'}
assert confirmation.update_confirmation_if_url(parsed_m,
... |
a2c55857cc9d910978c6c1ae963e0669176e061f | timezone_field/__init__.py | timezone_field/__init__.py | __version__ = '1.0'
__all__ = ['TimeZoneField', 'TimeZoneFormField']
from timezone_field.fields import TimeZoneField
from timezone_field.forms import TimeZoneFormField
| __version__ = '1.1'
__all__ = ['TimeZoneField', 'TimeZoneFormField']
from timezone_field.fields import TimeZoneField
from timezone_field.forms import TimeZoneFormField
| Bump version number to 1.1 | Bump version number to 1.1
| Python | bsd-2-clause | mfogel/django-timezone-field | __version__ = '1.0'
__all__ = ['TimeZoneField', 'TimeZoneFormField']
from timezone_field.fields import TimeZoneField
from timezone_field.forms import TimeZoneFormField
Bump version number to 1.1 | __version__ = '1.1'
__all__ = ['TimeZoneField', 'TimeZoneFormField']
from timezone_field.fields import TimeZoneField
from timezone_field.forms import TimeZoneFormField
| <commit_before>__version__ = '1.0'
__all__ = ['TimeZoneField', 'TimeZoneFormField']
from timezone_field.fields import TimeZoneField
from timezone_field.forms import TimeZoneFormField
<commit_msg>Bump version number to 1.1<commit_after> | __version__ = '1.1'
__all__ = ['TimeZoneField', 'TimeZoneFormField']
from timezone_field.fields import TimeZoneField
from timezone_field.forms import TimeZoneFormField
| __version__ = '1.0'
__all__ = ['TimeZoneField', 'TimeZoneFormField']
from timezone_field.fields import TimeZoneField
from timezone_field.forms import TimeZoneFormField
Bump version number to 1.1__version__ = '1.1'
__all__ = ['TimeZoneField', 'TimeZoneFormField']
from timezone_field.fields import TimeZoneField
from ti... | <commit_before>__version__ = '1.0'
__all__ = ['TimeZoneField', 'TimeZoneFormField']
from timezone_field.fields import TimeZoneField
from timezone_field.forms import TimeZoneFormField
<commit_msg>Bump version number to 1.1<commit_after>__version__ = '1.1'
__all__ = ['TimeZoneField', 'TimeZoneFormField']
from timezone_... |
96bb2ba0dc6e58195b598e03d177114becfeba7a | nxpy/util.py | nxpy/util.py | import re
from lxml import etree
def new_ele(tag, attrs={}, **extra):
etree.Element(tag, attrs, **extra)
def sub_ele(parent, tag, attrs={}, **extra):
etree.SubElement(parent, tag, attrs, **extra)
# Globals
tag_pattern = re.compile(r'({.*})?(.*)')
whitespace_pattern = re.compile(r'[\n\r\s]+')
| import re
# Globals
tag_pattern = re.compile(r'({.*})?(.*)')
whitespace_pattern = re.compile(r'[\n\r\s]+')
| Remove new_ele() and sub_ele() functions | Remove new_ele() and sub_ele() functions
| Python | apache-2.0 | Kent1/nxpy | import re
from lxml import etree
def new_ele(tag, attrs={}, **extra):
etree.Element(tag, attrs, **extra)
def sub_ele(parent, tag, attrs={}, **extra):
etree.SubElement(parent, tag, attrs, **extra)
# Globals
tag_pattern = re.compile(r'({.*})?(.*)')
whitespace_pattern = re.compile(r'[\n\r\s]+')
Remove new_ele... | import re
# Globals
tag_pattern = re.compile(r'({.*})?(.*)')
whitespace_pattern = re.compile(r'[\n\r\s]+')
| <commit_before>import re
from lxml import etree
def new_ele(tag, attrs={}, **extra):
etree.Element(tag, attrs, **extra)
def sub_ele(parent, tag, attrs={}, **extra):
etree.SubElement(parent, tag, attrs, **extra)
# Globals
tag_pattern = re.compile(r'({.*})?(.*)')
whitespace_pattern = re.compile(r'[\n\r\s]+')... | import re
# Globals
tag_pattern = re.compile(r'({.*})?(.*)')
whitespace_pattern = re.compile(r'[\n\r\s]+')
| import re
from lxml import etree
def new_ele(tag, attrs={}, **extra):
etree.Element(tag, attrs, **extra)
def sub_ele(parent, tag, attrs={}, **extra):
etree.SubElement(parent, tag, attrs, **extra)
# Globals
tag_pattern = re.compile(r'({.*})?(.*)')
whitespace_pattern = re.compile(r'[\n\r\s]+')
Remove new_ele... | <commit_before>import re
from lxml import etree
def new_ele(tag, attrs={}, **extra):
etree.Element(tag, attrs, **extra)
def sub_ele(parent, tag, attrs={}, **extra):
etree.SubElement(parent, tag, attrs, **extra)
# Globals
tag_pattern = re.compile(r'({.*})?(.*)')
whitespace_pattern = re.compile(r'[\n\r\s]+')... |
4e29782102f121cccfbfbcaccc28fe9ccc99e495 | trackon/update-trackers.py | trackon/update-trackers.py | from cgi import FieldStorage
from logging import debug, error, info
from time import time
from trackon import tracker
MAX_MIN_INTERVAL = 60*60*5
DEFAULT_CHECK_INTERVAL = 60*15
def main():
args = FieldStorage()
now = int(time())
if 'tracker-address' in args:
t = args['tracker-address'].value
... | from cgi import FieldStorage
from logging import debug, error, info
from time import time
from trackon import tracker
MAX_MIN_INTERVAL = 60*60*5
DEFAULT_CHECK_INTERVAL = 60*15
def main():
args = FieldStorage()
now = int(time())
if 'tracker-address' in args:
t = args['tracker-address'].value
... | Reduce frequency of 'random' ssl tests. | Reduce frequency of 'random' ssl tests.
| Python | mit | CorralPeltzer/newTrackon | from cgi import FieldStorage
from logging import debug, error, info
from time import time
from trackon import tracker
MAX_MIN_INTERVAL = 60*60*5
DEFAULT_CHECK_INTERVAL = 60*15
def main():
args = FieldStorage()
now = int(time())
if 'tracker-address' in args:
t = args['tracker-address'].value
... | from cgi import FieldStorage
from logging import debug, error, info
from time import time
from trackon import tracker
MAX_MIN_INTERVAL = 60*60*5
DEFAULT_CHECK_INTERVAL = 60*15
def main():
args = FieldStorage()
now = int(time())
if 'tracker-address' in args:
t = args['tracker-address'].value
... | <commit_before>from cgi import FieldStorage
from logging import debug, error, info
from time import time
from trackon import tracker
MAX_MIN_INTERVAL = 60*60*5
DEFAULT_CHECK_INTERVAL = 60*15
def main():
args = FieldStorage()
now = int(time())
if 'tracker-address' in args:
t = args['tracker-addre... | from cgi import FieldStorage
from logging import debug, error, info
from time import time
from trackon import tracker
MAX_MIN_INTERVAL = 60*60*5
DEFAULT_CHECK_INTERVAL = 60*15
def main():
args = FieldStorage()
now = int(time())
if 'tracker-address' in args:
t = args['tracker-address'].value
... | from cgi import FieldStorage
from logging import debug, error, info
from time import time
from trackon import tracker
MAX_MIN_INTERVAL = 60*60*5
DEFAULT_CHECK_INTERVAL = 60*15
def main():
args = FieldStorage()
now = int(time())
if 'tracker-address' in args:
t = args['tracker-address'].value
... | <commit_before>from cgi import FieldStorage
from logging import debug, error, info
from time import time
from trackon import tracker
MAX_MIN_INTERVAL = 60*60*5
DEFAULT_CHECK_INTERVAL = 60*15
def main():
args = FieldStorage()
now = int(time())
if 'tracker-address' in args:
t = args['tracker-addre... |
9130a94153b7d9f70883da737fb60d41db73e09a | try_telethon.py | try_telethon.py | #!/usr/bin/env python3
import traceback
from telethon_examples.interactive_telegram_client \
import InteractiveTelegramClient
def load_settings(path='api/settings'):
"""Loads the user settings located under `api/`"""
result = {}
with open(path, 'r', encoding='utf-8') as file:
for line in file... | #!/usr/bin/env python3
import traceback
from telethon_examples.interactive_telegram_client \
import InteractiveTelegramClient
def load_settings(path='api/settings'):
"""Loads the user settings located under `api/`"""
result = {}
with open(path, 'r', encoding='utf-8') as file:
for line in file... | Support configuring SOCKS proxy in the example | Support configuring SOCKS proxy in the example
| Python | mit | LonamiWebs/Telethon,LonamiWebs/Telethon,kyasabu/Telethon,andr-04/Telethon,LonamiWebs/Telethon,expectocode/Telethon,LonamiWebs/Telethon | #!/usr/bin/env python3
import traceback
from telethon_examples.interactive_telegram_client \
import InteractiveTelegramClient
def load_settings(path='api/settings'):
"""Loads the user settings located under `api/`"""
result = {}
with open(path, 'r', encoding='utf-8') as file:
for line in file... | #!/usr/bin/env python3
import traceback
from telethon_examples.interactive_telegram_client \
import InteractiveTelegramClient
def load_settings(path='api/settings'):
"""Loads the user settings located under `api/`"""
result = {}
with open(path, 'r', encoding='utf-8') as file:
for line in file... | <commit_before>#!/usr/bin/env python3
import traceback
from telethon_examples.interactive_telegram_client \
import InteractiveTelegramClient
def load_settings(path='api/settings'):
"""Loads the user settings located under `api/`"""
result = {}
with open(path, 'r', encoding='utf-8') as file:
f... | #!/usr/bin/env python3
import traceback
from telethon_examples.interactive_telegram_client \
import InteractiveTelegramClient
def load_settings(path='api/settings'):
"""Loads the user settings located under `api/`"""
result = {}
with open(path, 'r', encoding='utf-8') as file:
for line in file... | #!/usr/bin/env python3
import traceback
from telethon_examples.interactive_telegram_client \
import InteractiveTelegramClient
def load_settings(path='api/settings'):
"""Loads the user settings located under `api/`"""
result = {}
with open(path, 'r', encoding='utf-8') as file:
for line in file... | <commit_before>#!/usr/bin/env python3
import traceback
from telethon_examples.interactive_telegram_client \
import InteractiveTelegramClient
def load_settings(path='api/settings'):
"""Loads the user settings located under `api/`"""
result = {}
with open(path, 'r', encoding='utf-8') as file:
f... |
ee259a377bc574c113640601064ceb259707d35f | akhet/__init__.py | akhet/__init__.py | from akhet.static import add_static_route
def includeme(config):
"""Add certain useful methods to a Pyramid ``Configurator`` instance.
Currently this adds the ``.add_static_route()`` method. (See
``pyramid_sqla.static.add_static_route()``.)
"""
config.add_directive('add_static_route', add_static_r... | Add 'includeme' function. (Accidently put in SQLAHelper.) | Add 'includeme' function. (Accidently put in SQLAHelper.)
| Python | mit | koansys/akhet,koansys/akhet | Add 'includeme' function. (Accidently put in SQLAHelper.) | from akhet.static import add_static_route
def includeme(config):
"""Add certain useful methods to a Pyramid ``Configurator`` instance.
Currently this adds the ``.add_static_route()`` method. (See
``pyramid_sqla.static.add_static_route()``.)
"""
config.add_directive('add_static_route', add_static_r... | <commit_before><commit_msg>Add 'includeme' function. (Accidently put in SQLAHelper.)<commit_after> | from akhet.static import add_static_route
def includeme(config):
"""Add certain useful methods to a Pyramid ``Configurator`` instance.
Currently this adds the ``.add_static_route()`` method. (See
``pyramid_sqla.static.add_static_route()``.)
"""
config.add_directive('add_static_route', add_static_r... | Add 'includeme' function. (Accidently put in SQLAHelper.)from akhet.static import add_static_route
def includeme(config):
"""Add certain useful methods to a Pyramid ``Configurator`` instance.
Currently this adds the ``.add_static_route()`` method. (See
``pyramid_sqla.static.add_static_route()``.)
"""
... | <commit_before><commit_msg>Add 'includeme' function. (Accidently put in SQLAHelper.)<commit_after>from akhet.static import add_static_route
def includeme(config):
"""Add certain useful methods to a Pyramid ``Configurator`` instance.
Currently this adds the ``.add_static_route()`` method. (See
``pyramid_sq... | |
52b022869b7092fc519accc2132c3f842502aeae | create_input_files.py | create_input_files.py | from utils import write_csv_rows, read_csv_rows
class input_table:
def __init__(self, filename, content):
self.filename = filename
self.content = content
connect_tbl=input_table('connectivity.csv',
[['Connectivity Table'],
['x1','y1','x2','y2','E','... | from utils import write_csv_rows, read_csv_rows
class input_table:
def __init__(self, filename, name, headers, content=[]):
self.filename = filename
self.name = name
self.headers = headers
self.content = content
connect_filename = 'connectivity.csv'
connect_name = ['Connectivity Ta... | Clean up input tables class and instance declarations | Clean up input tables class and instance declarations
| Python | mit | ndebuhr/openfea,ndebuhr/openfea | from utils import write_csv_rows, read_csv_rows
class input_table:
def __init__(self, filename, content):
self.filename = filename
self.content = content
connect_tbl=input_table('connectivity.csv',
[['Connectivity Table'],
['x1','y1','x2','y2','E','... | from utils import write_csv_rows, read_csv_rows
class input_table:
def __init__(self, filename, name, headers, content=[]):
self.filename = filename
self.name = name
self.headers = headers
self.content = content
connect_filename = 'connectivity.csv'
connect_name = ['Connectivity Ta... | <commit_before>from utils import write_csv_rows, read_csv_rows
class input_table:
def __init__(self, filename, content):
self.filename = filename
self.content = content
connect_tbl=input_table('connectivity.csv',
[['Connectivity Table'],
['x1','y1',... | from utils import write_csv_rows, read_csv_rows
class input_table:
def __init__(self, filename, name, headers, content=[]):
self.filename = filename
self.name = name
self.headers = headers
self.content = content
connect_filename = 'connectivity.csv'
connect_name = ['Connectivity Ta... | from utils import write_csv_rows, read_csv_rows
class input_table:
def __init__(self, filename, content):
self.filename = filename
self.content = content
connect_tbl=input_table('connectivity.csv',
[['Connectivity Table'],
['x1','y1','x2','y2','E','... | <commit_before>from utils import write_csv_rows, read_csv_rows
class input_table:
def __init__(self, filename, content):
self.filename = filename
self.content = content
connect_tbl=input_table('connectivity.csv',
[['Connectivity Table'],
['x1','y1',... |
33620c30a7e79243a9a1f32cdad7e2af8e1fa278 | auditlog/admin.py | auditlog/admin.py | from django.contrib import admin
from auditlog.filters import ResourceTypeFilter
from auditlog.mixins import LogEntryAdminMixin
from auditlog.models import LogEntry
class LogEntryAdmin(admin.ModelAdmin, LogEntryAdminMixin):
list_display = ["created", "resource_url", "action", "msg_short", "user_url"]
search_... | from django.contrib import admin
from auditlog.filters import ResourceTypeFilter
from auditlog.mixins import LogEntryAdminMixin
from auditlog.models import LogEntry
class LogEntryAdmin(admin.ModelAdmin, LogEntryAdminMixin):
list_display = ["created", "resource_url", "action", "msg_short", "user_url"]
search_... | Add actor username to search fields | Add actor username to search fields
| Python | mit | jjkester/django-auditlog | from django.contrib import admin
from auditlog.filters import ResourceTypeFilter
from auditlog.mixins import LogEntryAdminMixin
from auditlog.models import LogEntry
class LogEntryAdmin(admin.ModelAdmin, LogEntryAdminMixin):
list_display = ["created", "resource_url", "action", "msg_short", "user_url"]
search_... | from django.contrib import admin
from auditlog.filters import ResourceTypeFilter
from auditlog.mixins import LogEntryAdminMixin
from auditlog.models import LogEntry
class LogEntryAdmin(admin.ModelAdmin, LogEntryAdminMixin):
list_display = ["created", "resource_url", "action", "msg_short", "user_url"]
search_... | <commit_before>from django.contrib import admin
from auditlog.filters import ResourceTypeFilter
from auditlog.mixins import LogEntryAdminMixin
from auditlog.models import LogEntry
class LogEntryAdmin(admin.ModelAdmin, LogEntryAdminMixin):
list_display = ["created", "resource_url", "action", "msg_short", "user_ur... | from django.contrib import admin
from auditlog.filters import ResourceTypeFilter
from auditlog.mixins import LogEntryAdminMixin
from auditlog.models import LogEntry
class LogEntryAdmin(admin.ModelAdmin, LogEntryAdminMixin):
list_display = ["created", "resource_url", "action", "msg_short", "user_url"]
search_... | from django.contrib import admin
from auditlog.filters import ResourceTypeFilter
from auditlog.mixins import LogEntryAdminMixin
from auditlog.models import LogEntry
class LogEntryAdmin(admin.ModelAdmin, LogEntryAdminMixin):
list_display = ["created", "resource_url", "action", "msg_short", "user_url"]
search_... | <commit_before>from django.contrib import admin
from auditlog.filters import ResourceTypeFilter
from auditlog.mixins import LogEntryAdminMixin
from auditlog.models import LogEntry
class LogEntryAdmin(admin.ModelAdmin, LogEntryAdminMixin):
list_display = ["created", "resource_url", "action", "msg_short", "user_ur... |
f25c0074a013255141371b46cff0a506ad0b2ab5 | axiom/__init__.py | axiom/__init__.py | # -*- test-case-name: axiom.test -*-
from axiom._version import __version__
from epsilon import asTwistedVersion
version = asTwistedVersion("axiom", __version__)
| # -*- test-case-name: axiom.test -*-
from axiom._version import __version__
from twisted.python import versions
def asTwistedVersion(packageName, versionString):
return versions.Version(packageName, *map(int, versionString.split(".")))
version = asTwistedVersion("axiom", __version__)
| Add a local asTwistedVersion implementation to Axiom, so as to not add another setup-time dependency on Epsilon | Add a local asTwistedVersion implementation to Axiom, so as to not add another setup-time dependency on Epsilon | Python | mit | hawkowl/axiom,twisted/axiom | # -*- test-case-name: axiom.test -*-
from axiom._version import __version__
from epsilon import asTwistedVersion
version = asTwistedVersion("axiom", __version__)
Add a local asTwistedVersion implementation to Axiom, so as to not add another setup-time dependency on Epsilon | # -*- test-case-name: axiom.test -*-
from axiom._version import __version__
from twisted.python import versions
def asTwistedVersion(packageName, versionString):
return versions.Version(packageName, *map(int, versionString.split(".")))
version = asTwistedVersion("axiom", __version__)
| <commit_before># -*- test-case-name: axiom.test -*-
from axiom._version import __version__
from epsilon import asTwistedVersion
version = asTwistedVersion("axiom", __version__)
<commit_msg>Add a local asTwistedVersion implementation to Axiom, so as to not add another setup-time dependency on Epsilon<commit_after> | # -*- test-case-name: axiom.test -*-
from axiom._version import __version__
from twisted.python import versions
def asTwistedVersion(packageName, versionString):
return versions.Version(packageName, *map(int, versionString.split(".")))
version = asTwistedVersion("axiom", __version__)
| # -*- test-case-name: axiom.test -*-
from axiom._version import __version__
from epsilon import asTwistedVersion
version = asTwistedVersion("axiom", __version__)
Add a local asTwistedVersion implementation to Axiom, so as to not add another setup-time dependency on Epsilon# -*- test-case-name: axiom.test -*-
from axio... | <commit_before># -*- test-case-name: axiom.test -*-
from axiom._version import __version__
from epsilon import asTwistedVersion
version = asTwistedVersion("axiom", __version__)
<commit_msg>Add a local asTwistedVersion implementation to Axiom, so as to not add another setup-time dependency on Epsilon<commit_after># -*-... |
0c3a0fd8eee8ca4ced29dbb69570aa1605ea0d5d | PEATSA/Database/Scripts/JobMailer.py | PEATSA/Database/Scripts/JobMailer.py | #! /usr/bin/python
import sys, time, optparse, os
import PEATSA.Core as Core
import PEATSA.WebApp as WebApp
import ConstructJob
import MySQLdb
usage = "usage: %prog [options]"
parser = optparse.OptionParser(usage=usage, version="% 0.1", description=__doc__)
parser.add_option("-c", "--configurationFile", dest="configu... | #! /usr/bin/python
import sys, time, optparse, os
import PEATSA.Core as Core
import PEATSA.WebApp as WebApp
import ConstructJob
import MySQLdb
usage = "usage: %prog [options]"
parser = optparse.OptionParser(usage=usage, version="% 0.1", description=__doc__)
parser.add_option("-c", "--configurationFile", dest="configu... | Print error on mailing a failed job note | Print error on mailing a failed job note | Python | mit | dmnfarrell/peat,dmnfarrell/peat,dmnfarrell/peat,dmnfarrell/peat,dmnfarrell/peat,dmnfarrell/peat,dmnfarrell/peat | #! /usr/bin/python
import sys, time, optparse, os
import PEATSA.Core as Core
import PEATSA.WebApp as WebApp
import ConstructJob
import MySQLdb
usage = "usage: %prog [options]"
parser = optparse.OptionParser(usage=usage, version="% 0.1", description=__doc__)
parser.add_option("-c", "--configurationFile", dest="configu... | #! /usr/bin/python
import sys, time, optparse, os
import PEATSA.Core as Core
import PEATSA.WebApp as WebApp
import ConstructJob
import MySQLdb
usage = "usage: %prog [options]"
parser = optparse.OptionParser(usage=usage, version="% 0.1", description=__doc__)
parser.add_option("-c", "--configurationFile", dest="configu... | <commit_before>#! /usr/bin/python
import sys, time, optparse, os
import PEATSA.Core as Core
import PEATSA.WebApp as WebApp
import ConstructJob
import MySQLdb
usage = "usage: %prog [options]"
parser = optparse.OptionParser(usage=usage, version="% 0.1", description=__doc__)
parser.add_option("-c", "--configurationFile"... | #! /usr/bin/python
import sys, time, optparse, os
import PEATSA.Core as Core
import PEATSA.WebApp as WebApp
import ConstructJob
import MySQLdb
usage = "usage: %prog [options]"
parser = optparse.OptionParser(usage=usage, version="% 0.1", description=__doc__)
parser.add_option("-c", "--configurationFile", dest="configu... | #! /usr/bin/python
import sys, time, optparse, os
import PEATSA.Core as Core
import PEATSA.WebApp as WebApp
import ConstructJob
import MySQLdb
usage = "usage: %prog [options]"
parser = optparse.OptionParser(usage=usage, version="% 0.1", description=__doc__)
parser.add_option("-c", "--configurationFile", dest="configu... | <commit_before>#! /usr/bin/python
import sys, time, optparse, os
import PEATSA.Core as Core
import PEATSA.WebApp as WebApp
import ConstructJob
import MySQLdb
usage = "usage: %prog [options]"
parser = optparse.OptionParser(usage=usage, version="% 0.1", description=__doc__)
parser.add_option("-c", "--configurationFile"... |
ddcb5b11a2f050e1eb8ae185888dde2ef1c66d72 | dedupe/convenience.py | dedupe/convenience.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Convenience functions for in memory deduplication
"""
import collections
import dedupe.core
def dataSample(data, sample_size):
'''Randomly sample pairs of records from a data dictionary'''
data_list = data.values()
random_pairs = dedupe.core.randomPair... | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Convenience functions for in memory deduplication
"""
import collections
import dedupe.core
def dataSample(data, sample_size):
'''Randomly sample pairs of records from a data dictionary'''
data_list = data.values()
random_pairs = dedupe.core.randomPair... | Index of the list should be an int | Index of the list should be an int
| Python | mit | dedupeio/dedupe-examples,dedupeio/dedupe,neozhangthe1/dedupe,tfmorris/dedupe,datamade/dedupe,pombredanne/dedupe,datamade/dedupe,nmiranda/dedupe,pombredanne/dedupe,neozhangthe1/dedupe,dedupeio/dedupe,davidkunio/dedupe,01-/dedupe,01-/dedupe,nmiranda/dedupe,tfmorris/dedupe,davidkunio/dedupe | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Convenience functions for in memory deduplication
"""
import collections
import dedupe.core
def dataSample(data, sample_size):
'''Randomly sample pairs of records from a data dictionary'''
data_list = data.values()
random_pairs = dedupe.core.randomPair... | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Convenience functions for in memory deduplication
"""
import collections
import dedupe.core
def dataSample(data, sample_size):
'''Randomly sample pairs of records from a data dictionary'''
data_list = data.values()
random_pairs = dedupe.core.randomPair... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Convenience functions for in memory deduplication
"""
import collections
import dedupe.core
def dataSample(data, sample_size):
'''Randomly sample pairs of records from a data dictionary'''
data_list = data.values()
random_pairs = dedupe.... | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Convenience functions for in memory deduplication
"""
import collections
import dedupe.core
def dataSample(data, sample_size):
'''Randomly sample pairs of records from a data dictionary'''
data_list = data.values()
random_pairs = dedupe.core.randomPair... | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Convenience functions for in memory deduplication
"""
import collections
import dedupe.core
def dataSample(data, sample_size):
'''Randomly sample pairs of records from a data dictionary'''
data_list = data.values()
random_pairs = dedupe.core.randomPair... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Convenience functions for in memory deduplication
"""
import collections
import dedupe.core
def dataSample(data, sample_size):
'''Randomly sample pairs of records from a data dictionary'''
data_list = data.values()
random_pairs = dedupe.... |
c8b28cc0afc45c2e7b7ca83a41bc67804c7e9506 | src/samples/showvideo.py | src/samples/showvideo.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from libavg import avg, app
import sys
class VideoPlayer(app.MainDiv):
def init(self):
self.videoNode = avg.VideoNode(
href=sys.argv[1],
parent=self)
self.videoNode.play()
app.App().run(VideoPlayer(), app_resolu... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from libavg import avg, app
import sys
class VideoPlayer(app.MainDiv):
def onArgvParserCreated(self, parser):
parser.set_usage("%prog <video>")
def onArgvParsed(self, options, args, parser):
if len(args) != 1:
parser.print_help()
... | Add checks for script parameters and correct onInit name | Add checks for script parameters and correct onInit name
| Python | lgpl-2.1 | libavg/libavg,libavg/libavg,libavg/libavg,libavg/libavg | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from libavg import avg, app
import sys
class VideoPlayer(app.MainDiv):
def init(self):
self.videoNode = avg.VideoNode(
href=sys.argv[1],
parent=self)
self.videoNode.play()
app.App().run(VideoPlayer(), app_resolu... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from libavg import avg, app
import sys
class VideoPlayer(app.MainDiv):
def onArgvParserCreated(self, parser):
parser.set_usage("%prog <video>")
def onArgvParsed(self, options, args, parser):
if len(args) != 1:
parser.print_help()
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from libavg import avg, app
import sys
class VideoPlayer(app.MainDiv):
def init(self):
self.videoNode = avg.VideoNode(
href=sys.argv[1],
parent=self)
self.videoNode.play()
app.App().run(VideoPlaye... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from libavg import avg, app
import sys
class VideoPlayer(app.MainDiv):
def onArgvParserCreated(self, parser):
parser.set_usage("%prog <video>")
def onArgvParsed(self, options, args, parser):
if len(args) != 1:
parser.print_help()
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from libavg import avg, app
import sys
class VideoPlayer(app.MainDiv):
def init(self):
self.videoNode = avg.VideoNode(
href=sys.argv[1],
parent=self)
self.videoNode.play()
app.App().run(VideoPlayer(), app_resolu... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from libavg import avg, app
import sys
class VideoPlayer(app.MainDiv):
def init(self):
self.videoNode = avg.VideoNode(
href=sys.argv[1],
parent=self)
self.videoNode.play()
app.App().run(VideoPlaye... |
97919d06b252af37e7c955ff800b309599e2debc | usingnamespace/forms/user.py | usingnamespace/forms/user.py | import colander
import deform
from csrf import CSRFSchema
class LoginForm(CSRFSchema):
"""The user login form."""
username = colander.SchemaNode(colander.String(),
title="Username",
widget=deform.widget.TextInputWidget(css_class='form-control'),
)
password = colander.Sc... | import colander
import deform
from schemaform import SchemaFormMixin
from csrf import CSRFSchema
class LoginForm(CSRFSchema, SchemaFormMixin):
"""The user login form."""
username = colander.SchemaNode(colander.String(),
title="Username",
__buttons__ = (deform.form.Button(name=_("Submit"), css... | Add SchemaFormMixin to the LoginForm | Add SchemaFormMixin to the LoginForm
| Python | isc | usingnamespace/usingnamespace | import colander
import deform
from csrf import CSRFSchema
class LoginForm(CSRFSchema):
"""The user login form."""
username = colander.SchemaNode(colander.String(),
title="Username",
widget=deform.widget.TextInputWidget(css_class='form-control'),
)
password = colander.Sc... | import colander
import deform
from schemaform import SchemaFormMixin
from csrf import CSRFSchema
class LoginForm(CSRFSchema, SchemaFormMixin):
"""The user login form."""
username = colander.SchemaNode(colander.String(),
title="Username",
__buttons__ = (deform.form.Button(name=_("Submit"), css... | <commit_before>import colander
import deform
from csrf import CSRFSchema
class LoginForm(CSRFSchema):
"""The user login form."""
username = colander.SchemaNode(colander.String(),
title="Username",
widget=deform.widget.TextInputWidget(css_class='form-control'),
)
passwor... | import colander
import deform
from schemaform import SchemaFormMixin
from csrf import CSRFSchema
class LoginForm(CSRFSchema, SchemaFormMixin):
"""The user login form."""
username = colander.SchemaNode(colander.String(),
title="Username",
__buttons__ = (deform.form.Button(name=_("Submit"), css... | import colander
import deform
from csrf import CSRFSchema
class LoginForm(CSRFSchema):
"""The user login form."""
username = colander.SchemaNode(colander.String(),
title="Username",
widget=deform.widget.TextInputWidget(css_class='form-control'),
)
password = colander.Sc... | <commit_before>import colander
import deform
from csrf import CSRFSchema
class LoginForm(CSRFSchema):
"""The user login form."""
username = colander.SchemaNode(colander.String(),
title="Username",
widget=deform.widget.TextInputWidget(css_class='form-control'),
)
passwor... |
85458434391144aa40101ba9f97c4ec47c975438 | zsh/scripts/pyjson_helper.py | zsh/scripts/pyjson_helper.py | import argparse
import json
parser = argparse.ArgumentParser()
parser.add_argument('json_file')
args = parser.parse_args()
if __name__ == '__main__':
with open(args.json_file) as f:
data = json.load(f)
print '\n###'
print 'Loaded JSON in variable `data`.'
print '###'
| import argparse
import json
import inspect
parser = argparse.ArgumentParser()
parser.add_argument('json_file')
args = parser.parse_args()
def load_json(json_file):
with open(json_file) as f:
return json.load(f)
if __name__ == '__main__':
data = load_json(args.json_file)
print '\n'
print inspe... | Print code used to load json in python helper | zsh: Print code used to load json in python helper
| Python | mit | achalddave/dotfiles,achalddave/dotfiles | import argparse
import json
parser = argparse.ArgumentParser()
parser.add_argument('json_file')
args = parser.parse_args()
if __name__ == '__main__':
with open(args.json_file) as f:
data = json.load(f)
print '\n###'
print 'Loaded JSON in variable `data`.'
print '###'
zsh: Print cod... | import argparse
import json
import inspect
parser = argparse.ArgumentParser()
parser.add_argument('json_file')
args = parser.parse_args()
def load_json(json_file):
with open(json_file) as f:
return json.load(f)
if __name__ == '__main__':
data = load_json(args.json_file)
print '\n'
print inspe... | <commit_before>import argparse
import json
parser = argparse.ArgumentParser()
parser.add_argument('json_file')
args = parser.parse_args()
if __name__ == '__main__':
with open(args.json_file) as f:
data = json.load(f)
print '\n###'
print 'Loaded JSON in variable `data`.'
print '###'... | import argparse
import json
import inspect
parser = argparse.ArgumentParser()
parser.add_argument('json_file')
args = parser.parse_args()
def load_json(json_file):
with open(json_file) as f:
return json.load(f)
if __name__ == '__main__':
data = load_json(args.json_file)
print '\n'
print inspe... | import argparse
import json
parser = argparse.ArgumentParser()
parser.add_argument('json_file')
args = parser.parse_args()
if __name__ == '__main__':
with open(args.json_file) as f:
data = json.load(f)
print '\n###'
print 'Loaded JSON in variable `data`.'
print '###'
zsh: Print cod... | <commit_before>import argparse
import json
parser = argparse.ArgumentParser()
parser.add_argument('json_file')
args = parser.parse_args()
if __name__ == '__main__':
with open(args.json_file) as f:
data = json.load(f)
print '\n###'
print 'Loaded JSON in variable `data`.'
print '###'... |
4102320e908dfa6e2fc320d73f118670ad5b1501 | tests/basics/fun_name.py | tests/basics/fun_name.py | def Fun():
pass
class A:
def __init__(self):
pass
def Fun(self):
pass
try:
print(Fun.__name__)
print(A.__init__.__name__)
print(A.Fun.__name__)
print(A().Fun.__name__)
except AttributeError:
print('SKIP')
raise SystemExit
# __name__ of a bound native method is not ... | def Fun():
pass
class A:
def __init__(self):
pass
def Fun(self):
pass
try:
print(Fun.__name__)
print(A.__init__.__name__)
print(A.Fun.__name__)
print(A().Fun.__name__)
except AttributeError:
print('SKIP')
raise SystemExit
# __name__ of a bound native method is not ... | Add test for getting name of func with closed over locals. | tests/basics: Add test for getting name of func with closed over locals.
Tests correct decoding of the prelude to get the function name.
| Python | mit | pozetroninc/micropython,adafruit/circuitpython,MrSurly/micropython,henriknelson/micropython,selste/micropython,kerneltask/micropython,trezor/micropython,pozetroninc/micropython,selste/micropython,pozetroninc/micropython,pramasoul/micropython,kerneltask/micropython,henriknelson/micropython,henriknelson/micropython,tobba... | def Fun():
pass
class A:
def __init__(self):
pass
def Fun(self):
pass
try:
print(Fun.__name__)
print(A.__init__.__name__)
print(A.Fun.__name__)
print(A().Fun.__name__)
except AttributeError:
print('SKIP')
raise SystemExit
# __name__ of a bound native method is not ... | def Fun():
pass
class A:
def __init__(self):
pass
def Fun(self):
pass
try:
print(Fun.__name__)
print(A.__init__.__name__)
print(A.Fun.__name__)
print(A().Fun.__name__)
except AttributeError:
print('SKIP')
raise SystemExit
# __name__ of a bound native method is not ... | <commit_before>def Fun():
pass
class A:
def __init__(self):
pass
def Fun(self):
pass
try:
print(Fun.__name__)
print(A.__init__.__name__)
print(A.Fun.__name__)
print(A().Fun.__name__)
except AttributeError:
print('SKIP')
raise SystemExit
# __name__ of a bound native... | def Fun():
pass
class A:
def __init__(self):
pass
def Fun(self):
pass
try:
print(Fun.__name__)
print(A.__init__.__name__)
print(A.Fun.__name__)
print(A().Fun.__name__)
except AttributeError:
print('SKIP')
raise SystemExit
# __name__ of a bound native method is not ... | def Fun():
pass
class A:
def __init__(self):
pass
def Fun(self):
pass
try:
print(Fun.__name__)
print(A.__init__.__name__)
print(A.Fun.__name__)
print(A().Fun.__name__)
except AttributeError:
print('SKIP')
raise SystemExit
# __name__ of a bound native method is not ... | <commit_before>def Fun():
pass
class A:
def __init__(self):
pass
def Fun(self):
pass
try:
print(Fun.__name__)
print(A.__init__.__name__)
print(A.Fun.__name__)
print(A().Fun.__name__)
except AttributeError:
print('SKIP')
raise SystemExit
# __name__ of a bound native... |
8fa89c8642721896b7b97ff928bc66e65470691a | pinax/stripe/tests/test_utils.py | pinax/stripe/tests/test_utils.py | import datetime
from django.test import TestCase
from django.utils import timezone
from ..utils import convert_tstamp, plan_from_stripe_id
class TestTimestampConversion(TestCase):
def test_conversion_without_field_name(self):
stamp = convert_tstamp(1365567407)
self.assertEquals(
sta... | import datetime
from django.test import TestCase
from django.utils import timezone
from ..utils import convert_tstamp
class TestTimestampConversion(TestCase):
def test_conversion_without_field_name(self):
stamp = convert_tstamp(1365567407)
self.assertEquals(
stamp,
datet... | Remove test for function that no longer exists | Remove test for function that no longer exists
| Python | mit | pinax/django-stripe-payments | import datetime
from django.test import TestCase
from django.utils import timezone
from ..utils import convert_tstamp, plan_from_stripe_id
class TestTimestampConversion(TestCase):
def test_conversion_without_field_name(self):
stamp = convert_tstamp(1365567407)
self.assertEquals(
sta... | import datetime
from django.test import TestCase
from django.utils import timezone
from ..utils import convert_tstamp
class TestTimestampConversion(TestCase):
def test_conversion_without_field_name(self):
stamp = convert_tstamp(1365567407)
self.assertEquals(
stamp,
datet... | <commit_before>import datetime
from django.test import TestCase
from django.utils import timezone
from ..utils import convert_tstamp, plan_from_stripe_id
class TestTimestampConversion(TestCase):
def test_conversion_without_field_name(self):
stamp = convert_tstamp(1365567407)
self.assertEquals(
... | import datetime
from django.test import TestCase
from django.utils import timezone
from ..utils import convert_tstamp
class TestTimestampConversion(TestCase):
def test_conversion_without_field_name(self):
stamp = convert_tstamp(1365567407)
self.assertEquals(
stamp,
datet... | import datetime
from django.test import TestCase
from django.utils import timezone
from ..utils import convert_tstamp, plan_from_stripe_id
class TestTimestampConversion(TestCase):
def test_conversion_without_field_name(self):
stamp = convert_tstamp(1365567407)
self.assertEquals(
sta... | <commit_before>import datetime
from django.test import TestCase
from django.utils import timezone
from ..utils import convert_tstamp, plan_from_stripe_id
class TestTimestampConversion(TestCase):
def test_conversion_without_field_name(self):
stamp = convert_tstamp(1365567407)
self.assertEquals(
... |
27b1d403540503f6e9d0ccd679918e3efe63ecf7 | tests/test_navigation.py | tests/test_navigation.py | def get_menu_titles(page) -> list:
page.wait_for_load_state()
menu_list = page.query_selector_all("//*[@class='toctree-wrapper compound']/ul/li/a")
return [title.as_element().inner_text() for title in menu_list]
flag = True
def test_check_titles(page):
global flag
if(flag):
page.goto("i... | def get_menu_titles(page) -> list:
page.wait_for_load_state()
menu_list = page.query_selector_all("//*[@class='toctree-wrapper compound']/ul/li/a")
return [title.as_element().inner_text() for title in menu_list]
flag = True
def test_check_titles(page):
global flag
if(flag):
page.goto("i... | Delete debug comments and tool | Delete debug comments and tool
| Python | agpl-3.0 | PyAr/PyZombis,PyAr/PyZombis,PyAr/PyZombis | def get_menu_titles(page) -> list:
page.wait_for_load_state()
menu_list = page.query_selector_all("//*[@class='toctree-wrapper compound']/ul/li/a")
return [title.as_element().inner_text() for title in menu_list]
flag = True
def test_check_titles(page):
global flag
if(flag):
page.goto("i... | def get_menu_titles(page) -> list:
page.wait_for_load_state()
menu_list = page.query_selector_all("//*[@class='toctree-wrapper compound']/ul/li/a")
return [title.as_element().inner_text() for title in menu_list]
flag = True
def test_check_titles(page):
global flag
if(flag):
page.goto("i... | <commit_before>def get_menu_titles(page) -> list:
page.wait_for_load_state()
menu_list = page.query_selector_all("//*[@class='toctree-wrapper compound']/ul/li/a")
return [title.as_element().inner_text() for title in menu_list]
flag = True
def test_check_titles(page):
global flag
if(flag):
... | def get_menu_titles(page) -> list:
page.wait_for_load_state()
menu_list = page.query_selector_all("//*[@class='toctree-wrapper compound']/ul/li/a")
return [title.as_element().inner_text() for title in menu_list]
flag = True
def test_check_titles(page):
global flag
if(flag):
page.goto("i... | def get_menu_titles(page) -> list:
page.wait_for_load_state()
menu_list = page.query_selector_all("//*[@class='toctree-wrapper compound']/ul/li/a")
return [title.as_element().inner_text() for title in menu_list]
flag = True
def test_check_titles(page):
global flag
if(flag):
page.goto("i... | <commit_before>def get_menu_titles(page) -> list:
page.wait_for_load_state()
menu_list = page.query_selector_all("//*[@class='toctree-wrapper compound']/ul/li/a")
return [title.as_element().inner_text() for title in menu_list]
flag = True
def test_check_titles(page):
global flag
if(flag):
... |
508c9ef5f7dfd974fdad650cf1a211dad9d41db5 | skipper/config.py | skipper/config.py | from string import Template
from collections import defaultdict
import os
import yaml
def load_defaults():
skipper_conf = 'skipper.yaml'
defaults = {}
if os.path.exists(skipper_conf):
with open(skipper_conf) as confile:
config = yaml.load(confile)
containers = config.pop('c... | from string import Template
from collections import defaultdict
import os
import yaml
def load_defaults():
skipper_conf = 'skipper.yaml'
defaults = {}
if os.path.exists(skipper_conf):
with open(skipper_conf) as confile:
config = yaml.load(confile)
containers = config.pop('c... | Handle env vars in volumes | Handle env vars in volumes
| Python | apache-2.0 | Stratoscale/skipper,Stratoscale/skipper | from string import Template
from collections import defaultdict
import os
import yaml
def load_defaults():
skipper_conf = 'skipper.yaml'
defaults = {}
if os.path.exists(skipper_conf):
with open(skipper_conf) as confile:
config = yaml.load(confile)
containers = config.pop('c... | from string import Template
from collections import defaultdict
import os
import yaml
def load_defaults():
skipper_conf = 'skipper.yaml'
defaults = {}
if os.path.exists(skipper_conf):
with open(skipper_conf) as confile:
config = yaml.load(confile)
containers = config.pop('c... | <commit_before>from string import Template
from collections import defaultdict
import os
import yaml
def load_defaults():
skipper_conf = 'skipper.yaml'
defaults = {}
if os.path.exists(skipper_conf):
with open(skipper_conf) as confile:
config = yaml.load(confile)
containers ... | from string import Template
from collections import defaultdict
import os
import yaml
def load_defaults():
skipper_conf = 'skipper.yaml'
defaults = {}
if os.path.exists(skipper_conf):
with open(skipper_conf) as confile:
config = yaml.load(confile)
containers = config.pop('c... | from string import Template
from collections import defaultdict
import os
import yaml
def load_defaults():
skipper_conf = 'skipper.yaml'
defaults = {}
if os.path.exists(skipper_conf):
with open(skipper_conf) as confile:
config = yaml.load(confile)
containers = config.pop('c... | <commit_before>from string import Template
from collections import defaultdict
import os
import yaml
def load_defaults():
skipper_conf = 'skipper.yaml'
defaults = {}
if os.path.exists(skipper_conf):
with open(skipper_conf) as confile:
config = yaml.load(confile)
containers ... |
1e150c4d5797f17ba8bea53d328cb613adc6bc0f | self_play.py | self_play.py | import random
from game import Game, DiscState
class SelfPlay:
def __init__(self, game):
self.game = game
def play(self):
while self.game.winner is None:
col_index = self.calc_move(self.game.current_player)
if self.game.can_add_disc(col_index):
success = self.game.try_turn(self.game.... | import random
from game import Game, DiscState
class SelfPlay:
def __init__(self, game):
self.game = game
self.log = []
def play(self):
while self.game.winner is None:
col_index = self.calc_move(self.game.current_player)
if self.game.can_add_disc(col_index):
success = self.game.t... | Add log to self play | Add log to self play
| Python | mit | misterwilliam/connect-four | import random
from game import Game, DiscState
class SelfPlay:
def __init__(self, game):
self.game = game
def play(self):
while self.game.winner is None:
col_index = self.calc_move(self.game.current_player)
if self.game.can_add_disc(col_index):
success = self.game.try_turn(self.game.... | import random
from game import Game, DiscState
class SelfPlay:
def __init__(self, game):
self.game = game
self.log = []
def play(self):
while self.game.winner is None:
col_index = self.calc_move(self.game.current_player)
if self.game.can_add_disc(col_index):
success = self.game.t... | <commit_before>import random
from game import Game, DiscState
class SelfPlay:
def __init__(self, game):
self.game = game
def play(self):
while self.game.winner is None:
col_index = self.calc_move(self.game.current_player)
if self.game.can_add_disc(col_index):
success = self.game.try_... | import random
from game import Game, DiscState
class SelfPlay:
def __init__(self, game):
self.game = game
self.log = []
def play(self):
while self.game.winner is None:
col_index = self.calc_move(self.game.current_player)
if self.game.can_add_disc(col_index):
success = self.game.t... | import random
from game import Game, DiscState
class SelfPlay:
def __init__(self, game):
self.game = game
def play(self):
while self.game.winner is None:
col_index = self.calc_move(self.game.current_player)
if self.game.can_add_disc(col_index):
success = self.game.try_turn(self.game.... | <commit_before>import random
from game import Game, DiscState
class SelfPlay:
def __init__(self, game):
self.game = game
def play(self):
while self.game.winner is None:
col_index = self.calc_move(self.game.current_player)
if self.game.can_add_disc(col_index):
success = self.game.try_... |
4dabc48455ebb8f22d37cd964ceb16373f784362 | mothermayi/colors.py | mothermayi/colors.py | BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
def green(text):
return GREEN + text + ENDC
def red(text):
return RED + text + ENDC
| BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
def green(text):
return GREEN + text + ENDC
def red(text):
return RED + text + ENDC
def yellow(text):
return YELLOW + text + ENDC
| Add a function for getting yellow | Add a function for getting yellow
| Python | mit | EliRibble/mothermayi | BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
def green(text):
return GREEN + text + ENDC
def red(text):
return RED + text + ENDC
Add a function for getting yellow | BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
def green(text):
return GREEN + text + ENDC
def red(text):
return RED + text + ENDC
def yellow(text):
return YELLOW + text + ENDC
| <commit_before>BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
def green(text):
return GREEN + text + ENDC
def red(text):
return RED + text + ENDC
<commit_msg>Add a function for getting yellow<commit_after> | BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
def green(text):
return GREEN + text + ENDC
def red(text):
return RED + text + ENDC
def yellow(text):
return YELLOW + text + ENDC
| BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
def green(text):
return GREEN + text + ENDC
def red(text):
return RED + text + ENDC
Add a function for getting yellowBLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = ... | <commit_before>BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
def green(text):
return GREEN + text + ENDC
def red(text):
return RED + text + ENDC
<commit_msg>Add a function for getting yellow<commit_after>BLUE = '\033[94m'
GREE... |
70cc77a9146f9d4afd78df9a2f8da8673f0320de | extractor.py | extractor.py | import extractor.ui.mainapplication as ui
import Tkinter as tk
def main():
## root = tk.Tk()
## root.title('SNES Wolfenstein 3D Extractor')
## root.minsize(400, 100)
## ui.MainApplication(root).pack(side="top", fill="both", expand=True)
## root.mainloop()
ui.MainApplication().mainloop()
main()
| import extractor.ui.mainapplication as ui
import Tkinter as tk
def main():
## root = tk.Tk()
## root.title('SNES Wolfenstein 3D Extractor')
## root.minsize(400, 100)
## ui.MainApplication(root).pack(side="top", fill="both", expand=True)
root = ui.MainApplication()
root.mainloop()
main()
| Split program call into two lines. | Split program call into two lines.
| Python | mit | adambiser/snes-wolf3d-extractor | import extractor.ui.mainapplication as ui
import Tkinter as tk
def main():
## root = tk.Tk()
## root.title('SNES Wolfenstein 3D Extractor')
## root.minsize(400, 100)
## ui.MainApplication(root).pack(side="top", fill="both", expand=True)
## root.mainloop()
ui.MainApplication().mainloop()
main()
Spli... | import extractor.ui.mainapplication as ui
import Tkinter as tk
def main():
## root = tk.Tk()
## root.title('SNES Wolfenstein 3D Extractor')
## root.minsize(400, 100)
## ui.MainApplication(root).pack(side="top", fill="both", expand=True)
root = ui.MainApplication()
root.mainloop()
main()
| <commit_before>import extractor.ui.mainapplication as ui
import Tkinter as tk
def main():
## root = tk.Tk()
## root.title('SNES Wolfenstein 3D Extractor')
## root.minsize(400, 100)
## ui.MainApplication(root).pack(side="top", fill="both", expand=True)
## root.mainloop()
ui.MainApplication().mainloop... | import extractor.ui.mainapplication as ui
import Tkinter as tk
def main():
## root = tk.Tk()
## root.title('SNES Wolfenstein 3D Extractor')
## root.minsize(400, 100)
## ui.MainApplication(root).pack(side="top", fill="both", expand=True)
root = ui.MainApplication()
root.mainloop()
main()
| import extractor.ui.mainapplication as ui
import Tkinter as tk
def main():
## root = tk.Tk()
## root.title('SNES Wolfenstein 3D Extractor')
## root.minsize(400, 100)
## ui.MainApplication(root).pack(side="top", fill="both", expand=True)
## root.mainloop()
ui.MainApplication().mainloop()
main()
Spli... | <commit_before>import extractor.ui.mainapplication as ui
import Tkinter as tk
def main():
## root = tk.Tk()
## root.title('SNES Wolfenstein 3D Extractor')
## root.minsize(400, 100)
## ui.MainApplication(root).pack(side="top", fill="both", expand=True)
## root.mainloop()
ui.MainApplication().mainloop... |
316a6583036ca18cfdf1a95a122aa2367237fa2c | get/views.py | get/views.py | from django.shortcuts import render_to_response
from django.shortcuts import redirect
from models import DownloadLink
def index(request):
links = DownloadLink.objects.all()
context = {'links': list(links)}
return render_to_response('get/listing.tpl', context)
| from django.shortcuts import render_to_response
from django.shortcuts import redirect
from models import DownloadLink
def index(request):
links = DownloadLink.objects.order_by('-pk')
context = {'links': list(links)}
return render_to_response('get/listing.tpl', context)
| Order download links by pk. | get: Order download links by pk.
| Python | bsd-3-clause | ProgVal/Supybot-website | from django.shortcuts import render_to_response
from django.shortcuts import redirect
from models import DownloadLink
def index(request):
links = DownloadLink.objects.all()
context = {'links': list(links)}
return render_to_response('get/listing.tpl', context)
get: Order download links by pk. | from django.shortcuts import render_to_response
from django.shortcuts import redirect
from models import DownloadLink
def index(request):
links = DownloadLink.objects.order_by('-pk')
context = {'links': list(links)}
return render_to_response('get/listing.tpl', context)
| <commit_before>from django.shortcuts import render_to_response
from django.shortcuts import redirect
from models import DownloadLink
def index(request):
links = DownloadLink.objects.all()
context = {'links': list(links)}
return render_to_response('get/listing.tpl', context)
<commit_msg>get: Order download... | from django.shortcuts import render_to_response
from django.shortcuts import redirect
from models import DownloadLink
def index(request):
links = DownloadLink.objects.order_by('-pk')
context = {'links': list(links)}
return render_to_response('get/listing.tpl', context)
| from django.shortcuts import render_to_response
from django.shortcuts import redirect
from models import DownloadLink
def index(request):
links = DownloadLink.objects.all()
context = {'links': list(links)}
return render_to_response('get/listing.tpl', context)
get: Order download links by pk.from django.sh... | <commit_before>from django.shortcuts import render_to_response
from django.shortcuts import redirect
from models import DownloadLink
def index(request):
links = DownloadLink.objects.all()
context = {'links': list(links)}
return render_to_response('get/listing.tpl', context)
<commit_msg>get: Order download... |
1e50bdf90756a79d45b0c35353d007c5dad2abfc | hand_data.py | hand_data.py | import time
from lib import Leap
from lib.Leap import Bone
'''
gets the current frame from controller
for each finger, stores the topmost end of each bone (4 points)
adjusts bone location relativity by subtracting the center of the palm
returns the adjusted bone locations in the form:
[(finger1bone1x, finger1bone1y, f... | import time
from lib import Leap
from lib.Leap import Bone
'''
gets the current frame from controller
for each finger, stores the topmost end of each bone (4 points)
adjusts bone location relativity by subtracting the center of the palm
returns the adjusted bone locations in the form:
{feat0=some_float, feat1=some_flo... | Return hand data as dictionary | Return hand data as dictionary
| Python | mit | ssaamm/sign-language-tutor,ssaamm/sign-language-translator,ssaamm/sign-language-translator,ssaamm/sign-language-tutor | import time
from lib import Leap
from lib.Leap import Bone
'''
gets the current frame from controller
for each finger, stores the topmost end of each bone (4 points)
adjusts bone location relativity by subtracting the center of the palm
returns the adjusted bone locations in the form:
[(finger1bone1x, finger1bone1y, f... | import time
from lib import Leap
from lib.Leap import Bone
'''
gets the current frame from controller
for each finger, stores the topmost end of each bone (4 points)
adjusts bone location relativity by subtracting the center of the palm
returns the adjusted bone locations in the form:
{feat0=some_float, feat1=some_flo... | <commit_before>import time
from lib import Leap
from lib.Leap import Bone
'''
gets the current frame from controller
for each finger, stores the topmost end of each bone (4 points)
adjusts bone location relativity by subtracting the center of the palm
returns the adjusted bone locations in the form:
[(finger1bone1x, f... | import time
from lib import Leap
from lib.Leap import Bone
'''
gets the current frame from controller
for each finger, stores the topmost end of each bone (4 points)
adjusts bone location relativity by subtracting the center of the palm
returns the adjusted bone locations in the form:
{feat0=some_float, feat1=some_flo... | import time
from lib import Leap
from lib.Leap import Bone
'''
gets the current frame from controller
for each finger, stores the topmost end of each bone (4 points)
adjusts bone location relativity by subtracting the center of the palm
returns the adjusted bone locations in the form:
[(finger1bone1x, finger1bone1y, f... | <commit_before>import time
from lib import Leap
from lib.Leap import Bone
'''
gets the current frame from controller
for each finger, stores the topmost end of each bone (4 points)
adjusts bone location relativity by subtracting the center of the palm
returns the adjusted bone locations in the form:
[(finger1bone1x, f... |
33f94c28500c96841b1bf5ce507e418364ea556f | StarWebTkeDesenv.py | StarWebTkeDesenv.py | import urllib.parse
import urllib.request
import http.cookiejar
url = 'http://stwebdv.thyssenkruppelevadores.com.br/scripts/gisdesenv.pl/swfw3.r'
values = {'usuario' : 'admin',
'senha' : 'tke'}
cj = http.cookiejar.CookieJar()
data = urllib.parse.urlencode(values).encode('utf-8')
opener = urllib.request.buil... | import urllib.parse
import urllib.request
import http.cookiejar
cj = http.cookiejar.CookieJar()
opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cj))
loginUrl = 'http://stwebdv.thyssenkruppelevadores.com.br/scripts/gisdesenv.pl/swfw3.r'
loginData = {'usuario' : 'admin', 'senha' : 'tke'}
postDa... | Add files to be compiled. | Add files to be compiled.
| Python | mit | taschetto/sublimeSettings,taschetto/sublimeSettings | import urllib.parse
import urllib.request
import http.cookiejar
url = 'http://stwebdv.thyssenkruppelevadores.com.br/scripts/gisdesenv.pl/swfw3.r'
values = {'usuario' : 'admin',
'senha' : 'tke'}
cj = http.cookiejar.CookieJar()
data = urllib.parse.urlencode(values).encode('utf-8')
opener = urllib.request.buil... | import urllib.parse
import urllib.request
import http.cookiejar
cj = http.cookiejar.CookieJar()
opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cj))
loginUrl = 'http://stwebdv.thyssenkruppelevadores.com.br/scripts/gisdesenv.pl/swfw3.r'
loginData = {'usuario' : 'admin', 'senha' : 'tke'}
postDa... | <commit_before>import urllib.parse
import urllib.request
import http.cookiejar
url = 'http://stwebdv.thyssenkruppelevadores.com.br/scripts/gisdesenv.pl/swfw3.r'
values = {'usuario' : 'admin',
'senha' : 'tke'}
cj = http.cookiejar.CookieJar()
data = urllib.parse.urlencode(values).encode('utf-8')
opener = urll... | import urllib.parse
import urllib.request
import http.cookiejar
cj = http.cookiejar.CookieJar()
opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cj))
loginUrl = 'http://stwebdv.thyssenkruppelevadores.com.br/scripts/gisdesenv.pl/swfw3.r'
loginData = {'usuario' : 'admin', 'senha' : 'tke'}
postDa... | import urllib.parse
import urllib.request
import http.cookiejar
url = 'http://stwebdv.thyssenkruppelevadores.com.br/scripts/gisdesenv.pl/swfw3.r'
values = {'usuario' : 'admin',
'senha' : 'tke'}
cj = http.cookiejar.CookieJar()
data = urllib.parse.urlencode(values).encode('utf-8')
opener = urllib.request.buil... | <commit_before>import urllib.parse
import urllib.request
import http.cookiejar
url = 'http://stwebdv.thyssenkruppelevadores.com.br/scripts/gisdesenv.pl/swfw3.r'
values = {'usuario' : 'admin',
'senha' : 'tke'}
cj = http.cookiejar.CookieJar()
data = urllib.parse.urlencode(values).encode('utf-8')
opener = urll... |
4bd6ed79562435c3e2ef96472f6990109c482117 | deen/constants.py | deen/constants.py | import sys
__version__ = '0.9.1'
ENCODINGS = ['Base64',
'Base64 URL',
'Base32',
'Hex',
'URL',
'HTML',
'Rot13',
'UTF8',
'UTF16']
COMPRESSIONS = ['Gzip',
'Bz2']
HASHS = ['MD5',
'SHA1',
... | import sys
__version__ = '0.9.2'
ENCODINGS = ['Base64',
'Base64 URL',
'Base32',
'Hex',
'URL',
'HTML',
'Rot13',
'UTF8',
'UTF16']
COMPRESSIONS = ['Gzip',
'Bz2']
HASHS = ['MD5',
'SHA1',
... | Add X509 support only when pyOpenSSL is installed | Add X509 support only when pyOpenSSL is installed
| Python | apache-2.0 | takeshixx/deen,takeshixx/deen | import sys
__version__ = '0.9.1'
ENCODINGS = ['Base64',
'Base64 URL',
'Base32',
'Hex',
'URL',
'HTML',
'Rot13',
'UTF8',
'UTF16']
COMPRESSIONS = ['Gzip',
'Bz2']
HASHS = ['MD5',
'SHA1',
... | import sys
__version__ = '0.9.2'
ENCODINGS = ['Base64',
'Base64 URL',
'Base32',
'Hex',
'URL',
'HTML',
'Rot13',
'UTF8',
'UTF16']
COMPRESSIONS = ['Gzip',
'Bz2']
HASHS = ['MD5',
'SHA1',
... | <commit_before>import sys
__version__ = '0.9.1'
ENCODINGS = ['Base64',
'Base64 URL',
'Base32',
'Hex',
'URL',
'HTML',
'Rot13',
'UTF8',
'UTF16']
COMPRESSIONS = ['Gzip',
'Bz2']
HASHS = ['MD5',
... | import sys
__version__ = '0.9.2'
ENCODINGS = ['Base64',
'Base64 URL',
'Base32',
'Hex',
'URL',
'HTML',
'Rot13',
'UTF8',
'UTF16']
COMPRESSIONS = ['Gzip',
'Bz2']
HASHS = ['MD5',
'SHA1',
... | import sys
__version__ = '0.9.1'
ENCODINGS = ['Base64',
'Base64 URL',
'Base32',
'Hex',
'URL',
'HTML',
'Rot13',
'UTF8',
'UTF16']
COMPRESSIONS = ['Gzip',
'Bz2']
HASHS = ['MD5',
'SHA1',
... | <commit_before>import sys
__version__ = '0.9.1'
ENCODINGS = ['Base64',
'Base64 URL',
'Base32',
'Hex',
'URL',
'HTML',
'Rot13',
'UTF8',
'UTF16']
COMPRESSIONS = ['Gzip',
'Bz2']
HASHS = ['MD5',
... |
ff06ce55d0856cff774bdec5f0e872e093216bce | diffs/__init__.py | diffs/__init__.py | from __future__ import absolute_import, unicode_literals
from django.apps import apps as django_apps
from .signals import connect
__version__ = '0.0.1'
default_app_config = 'diffs.apps.DiffLogConfig'
klasses_to_connect = []
def register(klass):
"""
Decorator function that registers a class to record diffs... | from __future__ import absolute_import, unicode_literals
from .signals import connect
__version__ = '0.0.1'
default_app_config = 'diffs.apps.DiffLogConfig'
klasses_to_connect = []
def register(klass):
"""
Decorator function that registers a class to record diffs.
@register
class ExampleModel(model... | Reorganize imports to be later | Reorganize imports to be later
| Python | mit | linuxlewis/django-diffs | from __future__ import absolute_import, unicode_literals
from django.apps import apps as django_apps
from .signals import connect
__version__ = '0.0.1'
default_app_config = 'diffs.apps.DiffLogConfig'
klasses_to_connect = []
def register(klass):
"""
Decorator function that registers a class to record diffs... | from __future__ import absolute_import, unicode_literals
from .signals import connect
__version__ = '0.0.1'
default_app_config = 'diffs.apps.DiffLogConfig'
klasses_to_connect = []
def register(klass):
"""
Decorator function that registers a class to record diffs.
@register
class ExampleModel(model... | <commit_before>from __future__ import absolute_import, unicode_literals
from django.apps import apps as django_apps
from .signals import connect
__version__ = '0.0.1'
default_app_config = 'diffs.apps.DiffLogConfig'
klasses_to_connect = []
def register(klass):
"""
Decorator function that registers a class ... | from __future__ import absolute_import, unicode_literals
from .signals import connect
__version__ = '0.0.1'
default_app_config = 'diffs.apps.DiffLogConfig'
klasses_to_connect = []
def register(klass):
"""
Decorator function that registers a class to record diffs.
@register
class ExampleModel(model... | from __future__ import absolute_import, unicode_literals
from django.apps import apps as django_apps
from .signals import connect
__version__ = '0.0.1'
default_app_config = 'diffs.apps.DiffLogConfig'
klasses_to_connect = []
def register(klass):
"""
Decorator function that registers a class to record diffs... | <commit_before>from __future__ import absolute_import, unicode_literals
from django.apps import apps as django_apps
from .signals import connect
__version__ = '0.0.1'
default_app_config = 'diffs.apps.DiffLogConfig'
klasses_to_connect = []
def register(klass):
"""
Decorator function that registers a class ... |
d0728b29514c0731dedee662ce19e73181bc4c34 | pyfarm/models/gpu.py | pyfarm/models/gpu.py | # No shebang line, this module is meant to be imported
#
# Copyright 2014 Ambient Entertainment GmbH & Co. KG
#
# 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/lice... | # No shebang line, this module is meant to be imported
#
# Copyright 2014 Ambient Entertainment GmbH & Co. KG
#
# 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/lice... | Fix docstring for module (minor) | Fix docstring for module (minor)
| Python | apache-2.0 | pyfarm/pyfarm-master,pyfarm/pyfarm-master,pyfarm/pyfarm-master | # No shebang line, this module is meant to be imported
#
# Copyright 2014 Ambient Entertainment GmbH & Co. KG
#
# 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/lice... | # No shebang line, this module is meant to be imported
#
# Copyright 2014 Ambient Entertainment GmbH & Co. KG
#
# 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/lice... | <commit_before># No shebang line, this module is meant to be imported
#
# Copyright 2014 Ambient Entertainment GmbH & Co. KG
#
# 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.... | # No shebang line, this module is meant to be imported
#
# Copyright 2014 Ambient Entertainment GmbH & Co. KG
#
# 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/lice... | # No shebang line, this module is meant to be imported
#
# Copyright 2014 Ambient Entertainment GmbH & Co. KG
#
# 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/lice... | <commit_before># No shebang line, this module is meant to be imported
#
# Copyright 2014 Ambient Entertainment GmbH & Co. KG
#
# 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.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.