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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4b43a2f50740bbeab95f64137eb8993ed8ac4617 | other/password_generator.py | other/password_generator.py | import string
from random import *
letters = string.ascii_letters
digits = string.digits
symbols = string.punctuation
chars = letters + digits + symbols
min_length = 8
max_length = 16
password = ''.join(choice(chars) for x in range(randint(min_length, max_length)))
print('Password: %s' % password)
print('[ If you are... | import string
import random
letters = [letter for letter in string.ascii_letters]
digits = [digit for digit in string.digits]
symbols = [symbol for symbol in string.punctuation]
chars = letters + digits + symbols
random.shuffle(chars)
min_length = 8
max_length = 16
password = ''.join(random.choice(chars) for x in ran... | Add another randomness into the password generator | Add another randomness into the password generator
Uses import random for namespace cleanliness
Uses list instead of string for 'chars' variable in order to shuffle, increases randomness
Instead of string formatting, uses string concatenation because (currently) it is simpler | Python | mit | TheAlgorithms/Python | import string
from random import *
letters = string.ascii_letters
digits = string.digits
symbols = string.punctuation
chars = letters + digits + symbols
min_length = 8
max_length = 16
password = ''.join(choice(chars) for x in range(randint(min_length, max_length)))
print('Password: %s' % password)
print('[ If you are... | import string
import random
letters = [letter for letter in string.ascii_letters]
digits = [digit for digit in string.digits]
symbols = [symbol for symbol in string.punctuation]
chars = letters + digits + symbols
random.shuffle(chars)
min_length = 8
max_length = 16
password = ''.join(random.choice(chars) for x in ran... | <commit_before>import string
from random import *
letters = string.ascii_letters
digits = string.digits
symbols = string.punctuation
chars = letters + digits + symbols
min_length = 8
max_length = 16
password = ''.join(choice(chars) for x in range(randint(min_length, max_length)))
print('Password: %s' % password)
prin... | import string
import random
letters = [letter for letter in string.ascii_letters]
digits = [digit for digit in string.digits]
symbols = [symbol for symbol in string.punctuation]
chars = letters + digits + symbols
random.shuffle(chars)
min_length = 8
max_length = 16
password = ''.join(random.choice(chars) for x in ran... | import string
from random import *
letters = string.ascii_letters
digits = string.digits
symbols = string.punctuation
chars = letters + digits + symbols
min_length = 8
max_length = 16
password = ''.join(choice(chars) for x in range(randint(min_length, max_length)))
print('Password: %s' % password)
print('[ If you are... | <commit_before>import string
from random import *
letters = string.ascii_letters
digits = string.digits
symbols = string.punctuation
chars = letters + digits + symbols
min_length = 8
max_length = 16
password = ''.join(choice(chars) for x in range(randint(min_length, max_length)))
print('Password: %s' % password)
prin... |
9e02f92fc19b7f833b25d0273143e98261a3b484 | democracy/admin/__init__.py | democracy/admin/__init__.py | from django.contrib import admin
from nested_admin.nested import NestedAdmin, NestedStackedInline
from democracy import models
# Inlines
class HearingImageInline(NestedStackedInline):
model = models.HearingImage
extra = 0
class SectionImageInline(NestedStackedInline):
model = models.SectionImage
... | from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from nested_admin.nested import NestedAdmin, NestedStackedInline
from democracy import models
# Inlines
class HearingImageInline(NestedStackedInline):
model = models.HearingImage
extra = 0
exclude = ("public", "tit... | Hide unnecessary fields in the admins | Hide unnecessary fields in the admins
* Hide some unnecessary fields from Hearings
* Hide Public and Commenting flags from Sections
(Section commenting option follows that of hearings.)
* Hide Public and Title fields from images
* Hide Public field from labels
Refs #118
| Python | mit | vikoivun/kerrokantasi,stephawe/kerrokantasi,stephawe/kerrokantasi,City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi,stephawe/kerrokantasi,vikoivun/kerrokantasi,City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi,vikoivun/kerrokantasi | from django.contrib import admin
from nested_admin.nested import NestedAdmin, NestedStackedInline
from democracy import models
# Inlines
class HearingImageInline(NestedStackedInline):
model = models.HearingImage
extra = 0
class SectionImageInline(NestedStackedInline):
model = models.SectionImage
... | from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from nested_admin.nested import NestedAdmin, NestedStackedInline
from democracy import models
# Inlines
class HearingImageInline(NestedStackedInline):
model = models.HearingImage
extra = 0
exclude = ("public", "tit... | <commit_before>from django.contrib import admin
from nested_admin.nested import NestedAdmin, NestedStackedInline
from democracy import models
# Inlines
class HearingImageInline(NestedStackedInline):
model = models.HearingImage
extra = 0
class SectionImageInline(NestedStackedInline):
model = models.Se... | from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from nested_admin.nested import NestedAdmin, NestedStackedInline
from democracy import models
# Inlines
class HearingImageInline(NestedStackedInline):
model = models.HearingImage
extra = 0
exclude = ("public", "tit... | from django.contrib import admin
from nested_admin.nested import NestedAdmin, NestedStackedInline
from democracy import models
# Inlines
class HearingImageInline(NestedStackedInline):
model = models.HearingImage
extra = 0
class SectionImageInline(NestedStackedInline):
model = models.SectionImage
... | <commit_before>from django.contrib import admin
from nested_admin.nested import NestedAdmin, NestedStackedInline
from democracy import models
# Inlines
class HearingImageInline(NestedStackedInline):
model = models.HearingImage
extra = 0
class SectionImageInline(NestedStackedInline):
model = models.Se... |
6b4e34a5091ec00dffb1add55fa8dc279cbc2c89 | scattertext/frequencyreaders/DefaultBackgroundFrequencies.py | scattertext/frequencyreaders/DefaultBackgroundFrequencies.py | import pkgutil
from io import StringIO
import pandas as pd
from scipy.stats import rankdata
class BackgroundFrequencies(object):
@staticmethod
def get_background_frequency_df(frequency_path=None):
raise Exception
@classmethod
def get_background_rank_df(cls, frequency_path=None):
df = cls.get_background_freq... | import pkgutil
from io import StringIO
import pandas as pd
from scipy.stats import rankdata
class BackgroundFrequencies(object):
@staticmethod
def get_background_frequency_df(frequency_path=None):
raise Exception
@classmethod
def get_background_rank_df(cls, frequency_path=None):
df =... | Fix FutureWarning: read_table is deprecated, use read_csv instead, passing sep='\t' | Fix FutureWarning: read_table is deprecated, use read_csv instead, passing sep='\t'
| Python | apache-2.0 | JasonKessler/scattertext,JasonKessler/scattertext,JasonKessler/scattertext,JasonKessler/scattertext | import pkgutil
from io import StringIO
import pandas as pd
from scipy.stats import rankdata
class BackgroundFrequencies(object):
@staticmethod
def get_background_frequency_df(frequency_path=None):
raise Exception
@classmethod
def get_background_rank_df(cls, frequency_path=None):
df = cls.get_background_freq... | import pkgutil
from io import StringIO
import pandas as pd
from scipy.stats import rankdata
class BackgroundFrequencies(object):
@staticmethod
def get_background_frequency_df(frequency_path=None):
raise Exception
@classmethod
def get_background_rank_df(cls, frequency_path=None):
df =... | <commit_before>import pkgutil
from io import StringIO
import pandas as pd
from scipy.stats import rankdata
class BackgroundFrequencies(object):
@staticmethod
def get_background_frequency_df(frequency_path=None):
raise Exception
@classmethod
def get_background_rank_df(cls, frequency_path=None):
df = cls.get_... | import pkgutil
from io import StringIO
import pandas as pd
from scipy.stats import rankdata
class BackgroundFrequencies(object):
@staticmethod
def get_background_frequency_df(frequency_path=None):
raise Exception
@classmethod
def get_background_rank_df(cls, frequency_path=None):
df =... | import pkgutil
from io import StringIO
import pandas as pd
from scipy.stats import rankdata
class BackgroundFrequencies(object):
@staticmethod
def get_background_frequency_df(frequency_path=None):
raise Exception
@classmethod
def get_background_rank_df(cls, frequency_path=None):
df = cls.get_background_freq... | <commit_before>import pkgutil
from io import StringIO
import pandas as pd
from scipy.stats import rankdata
class BackgroundFrequencies(object):
@staticmethod
def get_background_frequency_df(frequency_path=None):
raise Exception
@classmethod
def get_background_rank_df(cls, frequency_path=None):
df = cls.get_... |
40fc5c555e471f28959cbe3ad7d929636384595a | casexml/apps/stock/utils.py | casexml/apps/stock/utils.py | UNDERSTOCK_THRESHOLD = 0.5 # months
OVERSTOCK_THRESHOLD = 2. # months
def months_of_stock_remaining(stock, daily_consumption):
try:
return stock / (daily_consumption * 30)
except (TypeError, ZeroDivisionError):
return None
def stock_category(stock, daily_consumption):
if stock is None:... | from decimal import Decimal
UNDERSTOCK_THRESHOLD = 0.5 # months
OVERSTOCK_THRESHOLD = 2. # months
def months_of_stock_remaining(stock, daily_consumption):
if daily_consumption:
return stock / Decimal((daily_consumption * 30))
else:
return None
def stock_category(stock, daily_consumption):... | Fix error handling on aggregate status report | Fix error handling on aggregate status report
Previously the catch block was a little too aggressive. It was swallowing a
real error (since aggregate reports pass a float, not a decimal). Now we
prevent the original possible errors by converting no matter what the type is
and checking for zero/null values first.
| Python | bsd-3-clause | dimagi/commcare-hq,qedsoftware/commcare-hq,SEL-Columbia/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,SEL-Columbia/commcare-hq,SEL-Col... | UNDERSTOCK_THRESHOLD = 0.5 # months
OVERSTOCK_THRESHOLD = 2. # months
def months_of_stock_remaining(stock, daily_consumption):
try:
return stock / (daily_consumption * 30)
except (TypeError, ZeroDivisionError):
return None
def stock_category(stock, daily_consumption):
if stock is None:... | from decimal import Decimal
UNDERSTOCK_THRESHOLD = 0.5 # months
OVERSTOCK_THRESHOLD = 2. # months
def months_of_stock_remaining(stock, daily_consumption):
if daily_consumption:
return stock / Decimal((daily_consumption * 30))
else:
return None
def stock_category(stock, daily_consumption):... | <commit_before>UNDERSTOCK_THRESHOLD = 0.5 # months
OVERSTOCK_THRESHOLD = 2. # months
def months_of_stock_remaining(stock, daily_consumption):
try:
return stock / (daily_consumption * 30)
except (TypeError, ZeroDivisionError):
return None
def stock_category(stock, daily_consumption):
if... | from decimal import Decimal
UNDERSTOCK_THRESHOLD = 0.5 # months
OVERSTOCK_THRESHOLD = 2. # months
def months_of_stock_remaining(stock, daily_consumption):
if daily_consumption:
return stock / Decimal((daily_consumption * 30))
else:
return None
def stock_category(stock, daily_consumption):... | UNDERSTOCK_THRESHOLD = 0.5 # months
OVERSTOCK_THRESHOLD = 2. # months
def months_of_stock_remaining(stock, daily_consumption):
try:
return stock / (daily_consumption * 30)
except (TypeError, ZeroDivisionError):
return None
def stock_category(stock, daily_consumption):
if stock is None:... | <commit_before>UNDERSTOCK_THRESHOLD = 0.5 # months
OVERSTOCK_THRESHOLD = 2. # months
def months_of_stock_remaining(stock, daily_consumption):
try:
return stock / (daily_consumption * 30)
except (TypeError, ZeroDivisionError):
return None
def stock_category(stock, daily_consumption):
if... |
ceb32eb2cefadc04fdf7cf5c474a96d307a1618f | core/observables/file.py | core/observables/file.py | from __future__ import unicode_literals
from mongoengine import *
from core.observables import Observable
from core.observables import Hash
class File(Observable):
value = StringField(verbose_name="SHA256 hash")
mime_type = StringField(verbose_name="MIME type")
hashes = DictField(verbose_name="Hashes"... | from __future__ import unicode_literals
from flask import url_for
from flask_mongoengine.wtf import model_form
from mongoengine import *
from core.observables import Observable
from core.database import StringListField
class File(Observable):
value = StringField(verbose_name="Value")
mime_type = StringFie... | Clean up File edit view | Clean up File edit view
| Python | apache-2.0 | yeti-platform/yeti,yeti-platform/yeti,yeti-platform/yeti,yeti-platform/yeti | from __future__ import unicode_literals
from mongoengine import *
from core.observables import Observable
from core.observables import Hash
class File(Observable):
value = StringField(verbose_name="SHA256 hash")
mime_type = StringField(verbose_name="MIME type")
hashes = DictField(verbose_name="Hashes"... | from __future__ import unicode_literals
from flask import url_for
from flask_mongoengine.wtf import model_form
from mongoengine import *
from core.observables import Observable
from core.database import StringListField
class File(Observable):
value = StringField(verbose_name="Value")
mime_type = StringFie... | <commit_before>from __future__ import unicode_literals
from mongoengine import *
from core.observables import Observable
from core.observables import Hash
class File(Observable):
value = StringField(verbose_name="SHA256 hash")
mime_type = StringField(verbose_name="MIME type")
hashes = DictField(verbos... | from __future__ import unicode_literals
from flask import url_for
from flask_mongoengine.wtf import model_form
from mongoengine import *
from core.observables import Observable
from core.database import StringListField
class File(Observable):
value = StringField(verbose_name="Value")
mime_type = StringFie... | from __future__ import unicode_literals
from mongoengine import *
from core.observables import Observable
from core.observables import Hash
class File(Observable):
value = StringField(verbose_name="SHA256 hash")
mime_type = StringField(verbose_name="MIME type")
hashes = DictField(verbose_name="Hashes"... | <commit_before>from __future__ import unicode_literals
from mongoengine import *
from core.observables import Observable
from core.observables import Hash
class File(Observable):
value = StringField(verbose_name="SHA256 hash")
mime_type = StringField(verbose_name="MIME type")
hashes = DictField(verbos... |
6172eafbaf65b859462985056bb33490b98b0749 | peloid/app/shell/service.py | peloid/app/shell/service.py | from twisted.cred import portal
from twisted.conch import manhole_ssh
from twisted.conch.checkers import SSHPublicKeyDatabase
from carapace.util import ssh as util
from peloid.app.shell import gameshell, setupshell
def getGameShellFactory(**namespace):
game = None
sshRealm = gameshell.TerminalRealm(namespac... | from twisted.cred import portal
from twisted.conch import manhole_ssh
from twisted.conch.checkers import SSHPublicKeyDatabase
from carapace.util import ssh as util
from peloid.app import mud
from peloid.app.shell import gameshell, setupshell
def getGameShellFactory(**namespace):
game = mud.Game()
sshRealm =... | Use the new Game class. | Use the new Game class.
| Python | mit | oubiwann/peloid | from twisted.cred import portal
from twisted.conch import manhole_ssh
from twisted.conch.checkers import SSHPublicKeyDatabase
from carapace.util import ssh as util
from peloid.app.shell import gameshell, setupshell
def getGameShellFactory(**namespace):
game = None
sshRealm = gameshell.TerminalRealm(namespac... | from twisted.cred import portal
from twisted.conch import manhole_ssh
from twisted.conch.checkers import SSHPublicKeyDatabase
from carapace.util import ssh as util
from peloid.app import mud
from peloid.app.shell import gameshell, setupshell
def getGameShellFactory(**namespace):
game = mud.Game()
sshRealm =... | <commit_before>from twisted.cred import portal
from twisted.conch import manhole_ssh
from twisted.conch.checkers import SSHPublicKeyDatabase
from carapace.util import ssh as util
from peloid.app.shell import gameshell, setupshell
def getGameShellFactory(**namespace):
game = None
sshRealm = gameshell.Termina... | from twisted.cred import portal
from twisted.conch import manhole_ssh
from twisted.conch.checkers import SSHPublicKeyDatabase
from carapace.util import ssh as util
from peloid.app import mud
from peloid.app.shell import gameshell, setupshell
def getGameShellFactory(**namespace):
game = mud.Game()
sshRealm =... | from twisted.cred import portal
from twisted.conch import manhole_ssh
from twisted.conch.checkers import SSHPublicKeyDatabase
from carapace.util import ssh as util
from peloid.app.shell import gameshell, setupshell
def getGameShellFactory(**namespace):
game = None
sshRealm = gameshell.TerminalRealm(namespac... | <commit_before>from twisted.cred import portal
from twisted.conch import manhole_ssh
from twisted.conch.checkers import SSHPublicKeyDatabase
from carapace.util import ssh as util
from peloid.app.shell import gameshell, setupshell
def getGameShellFactory(**namespace):
game = None
sshRealm = gameshell.Termina... |
f4b1b92033995eb4552401fb9e09669411787964 | setup.py | setup.py | from setuptools import find_packages
from setuptools import setup
REQUIRED_PACKAGES = ['distance', 'tensorflow', 'numpy', 'six', 'pillow']
VERSION = '0.0.2'
try:
import pypandoc
README = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
README = open('README.md').read()
setup(
name='... | from setuptools import find_packages
from setuptools import setup
REQUIRED_PACKAGES = ['distance', 'numpy', 'six', 'pillow']
VERSION = '0.0.3'
try:
import pypandoc
README = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
README = open('README.md').read()
setup(
name='aocr',
url... | Remove tensorflow from hard dependencies and update the version | Remove tensorflow from hard dependencies and update the version
| Python | mit | emedvedev/attention-ocr | from setuptools import find_packages
from setuptools import setup
REQUIRED_PACKAGES = ['distance', 'tensorflow', 'numpy', 'six', 'pillow']
VERSION = '0.0.2'
try:
import pypandoc
README = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
README = open('README.md').read()
setup(
name='... | from setuptools import find_packages
from setuptools import setup
REQUIRED_PACKAGES = ['distance', 'numpy', 'six', 'pillow']
VERSION = '0.0.3'
try:
import pypandoc
README = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
README = open('README.md').read()
setup(
name='aocr',
url... | <commit_before>from setuptools import find_packages
from setuptools import setup
REQUIRED_PACKAGES = ['distance', 'tensorflow', 'numpy', 'six', 'pillow']
VERSION = '0.0.2'
try:
import pypandoc
README = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
README = open('README.md').read()
se... | from setuptools import find_packages
from setuptools import setup
REQUIRED_PACKAGES = ['distance', 'numpy', 'six', 'pillow']
VERSION = '0.0.3'
try:
import pypandoc
README = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
README = open('README.md').read()
setup(
name='aocr',
url... | from setuptools import find_packages
from setuptools import setup
REQUIRED_PACKAGES = ['distance', 'tensorflow', 'numpy', 'six', 'pillow']
VERSION = '0.0.2'
try:
import pypandoc
README = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
README = open('README.md').read()
setup(
name='... | <commit_before>from setuptools import find_packages
from setuptools import setup
REQUIRED_PACKAGES = ['distance', 'tensorflow', 'numpy', 'six', 'pillow']
VERSION = '0.0.2'
try:
import pypandoc
README = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
README = open('README.md').read()
se... |
258049876c4e9edd2c52d2f25f3f27caf976dd80 | setup.py | setup.py | # -*- encoding: utf8 -*-
from setuptools import setup, find_packages
import os
setup(
name="aspectlib",
version="0.7.0",
url='https://github.com/ionelmc/python-aspectlib',
download_url='',
license='BSD',
description="Aspect-Oriented Programming toolkit.",
long_description=open(os.path.join... | # -*- encoding: utf8 -*-
from setuptools import setup, find_packages
import os
read = lambda *names: open(os.path.join(os.path.dirname(__file__), *names)).read()
setup(
name="aspectlib",
version="0.8.0",
url='https://github.com/ionelmc/python-aspectlib',
download_url='',
license='BSD',
descript... | Include changelog in package registration. Up version. | Include changelog in package registration. Up version.
| Python | bsd-2-clause | svetlyak40wt/python-aspectlib,ionelmc/python-aspectlib | # -*- encoding: utf8 -*-
from setuptools import setup, find_packages
import os
setup(
name="aspectlib",
version="0.7.0",
url='https://github.com/ionelmc/python-aspectlib',
download_url='',
license='BSD',
description="Aspect-Oriented Programming toolkit.",
long_description=open(os.path.join... | # -*- encoding: utf8 -*-
from setuptools import setup, find_packages
import os
read = lambda *names: open(os.path.join(os.path.dirname(__file__), *names)).read()
setup(
name="aspectlib",
version="0.8.0",
url='https://github.com/ionelmc/python-aspectlib',
download_url='',
license='BSD',
descript... | <commit_before># -*- encoding: utf8 -*-
from setuptools import setup, find_packages
import os
setup(
name="aspectlib",
version="0.7.0",
url='https://github.com/ionelmc/python-aspectlib',
download_url='',
license='BSD',
description="Aspect-Oriented Programming toolkit.",
long_description=op... | # -*- encoding: utf8 -*-
from setuptools import setup, find_packages
import os
read = lambda *names: open(os.path.join(os.path.dirname(__file__), *names)).read()
setup(
name="aspectlib",
version="0.8.0",
url='https://github.com/ionelmc/python-aspectlib',
download_url='',
license='BSD',
descript... | # -*- encoding: utf8 -*-
from setuptools import setup, find_packages
import os
setup(
name="aspectlib",
version="0.7.0",
url='https://github.com/ionelmc/python-aspectlib',
download_url='',
license='BSD',
description="Aspect-Oriented Programming toolkit.",
long_description=open(os.path.join... | <commit_before># -*- encoding: utf8 -*-
from setuptools import setup, find_packages
import os
setup(
name="aspectlib",
version="0.7.0",
url='https://github.com/ionelmc/python-aspectlib',
download_url='',
license='BSD',
description="Aspect-Oriented Programming toolkit.",
long_description=op... |
261e76669480df4becbc5fbc81fbd5f8d5fa3e5c | setup.py | setup.py | #!/usr/bin/env python3
from setuptools import setup
with open("README.rst") as fd:
long_description = fd.read()
setup(
name="tvnamer",
version="1.0.0-dev",
description="Utility to rename lots of TV video files using the TheTVDB.",
long_description=long_description,
author="Tom Leese",
aut... | #!/usr/bin/env python3
from setuptools import setup
with open("README.rst") as fd:
long_description = fd.read()
setup(
name="tvnamer",
version="1.0.0-dev",
description="Utility to rename lots of TV video files using the TheTVDB.",
long_description=long_description,
author="Tom Leese",
aut... | Mark 'tvnamer-gui' as a GUI script | Mark 'tvnamer-gui' as a GUI script
| Python | mit | tomleese/tvnamer,thomasleese/tvnamer | #!/usr/bin/env python3
from setuptools import setup
with open("README.rst") as fd:
long_description = fd.read()
setup(
name="tvnamer",
version="1.0.0-dev",
description="Utility to rename lots of TV video files using the TheTVDB.",
long_description=long_description,
author="Tom Leese",
aut... | #!/usr/bin/env python3
from setuptools import setup
with open("README.rst") as fd:
long_description = fd.read()
setup(
name="tvnamer",
version="1.0.0-dev",
description="Utility to rename lots of TV video files using the TheTVDB.",
long_description=long_description,
author="Tom Leese",
aut... | <commit_before>#!/usr/bin/env python3
from setuptools import setup
with open("README.rst") as fd:
long_description = fd.read()
setup(
name="tvnamer",
version="1.0.0-dev",
description="Utility to rename lots of TV video files using the TheTVDB.",
long_description=long_description,
author="Tom ... | #!/usr/bin/env python3
from setuptools import setup
with open("README.rst") as fd:
long_description = fd.read()
setup(
name="tvnamer",
version="1.0.0-dev",
description="Utility to rename lots of TV video files using the TheTVDB.",
long_description=long_description,
author="Tom Leese",
aut... | #!/usr/bin/env python3
from setuptools import setup
with open("README.rst") as fd:
long_description = fd.read()
setup(
name="tvnamer",
version="1.0.0-dev",
description="Utility to rename lots of TV video files using the TheTVDB.",
long_description=long_description,
author="Tom Leese",
aut... | <commit_before>#!/usr/bin/env python3
from setuptools import setup
with open("README.rst") as fd:
long_description = fd.read()
setup(
name="tvnamer",
version="1.0.0-dev",
description="Utility to rename lots of TV video files using the TheTVDB.",
long_description=long_description,
author="Tom ... |
d33700b259cf281162352315c91743e3c26d94f7 | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name="yasha",
author="Kim Blomqvist",
author_email="[email protected]",
version="1.1",
description="A command-line tool to render Jinja templates",
keywords=["jinja", "code generator"],
packages=find_packages(),
include_package_data=Tru... | from setuptools import setup, find_packages
setup(
name="yasha",
author="Kim Blomqvist",
author_email="[email protected]",
version="1.1",
description="A command-line tool to render Jinja templates",
keywords=["jinja", "code generator"],
packages=find_packages(),
include_package_data=Tru... | Add new PyPi classifier "Development Status" | Add new PyPi classifier "Development Status" | Python | mit | kblomqvist/yasha | from setuptools import setup, find_packages
setup(
name="yasha",
author="Kim Blomqvist",
author_email="[email protected]",
version="1.1",
description="A command-line tool to render Jinja templates",
keywords=["jinja", "code generator"],
packages=find_packages(),
include_package_data=Tru... | from setuptools import setup, find_packages
setup(
name="yasha",
author="Kim Blomqvist",
author_email="[email protected]",
version="1.1",
description="A command-line tool to render Jinja templates",
keywords=["jinja", "code generator"],
packages=find_packages(),
include_package_data=Tru... | <commit_before>from setuptools import setup, find_packages
setup(
name="yasha",
author="Kim Blomqvist",
author_email="[email protected]",
version="1.1",
description="A command-line tool to render Jinja templates",
keywords=["jinja", "code generator"],
packages=find_packages(),
include_p... | from setuptools import setup, find_packages
setup(
name="yasha",
author="Kim Blomqvist",
author_email="[email protected]",
version="1.1",
description="A command-line tool to render Jinja templates",
keywords=["jinja", "code generator"],
packages=find_packages(),
include_package_data=Tru... | from setuptools import setup, find_packages
setup(
name="yasha",
author="Kim Blomqvist",
author_email="[email protected]",
version="1.1",
description="A command-line tool to render Jinja templates",
keywords=["jinja", "code generator"],
packages=find_packages(),
include_package_data=Tru... | <commit_before>from setuptools import setup, find_packages
setup(
name="yasha",
author="Kim Blomqvist",
author_email="[email protected]",
version="1.1",
description="A command-line tool to render Jinja templates",
keywords=["jinja", "code generator"],
packages=find_packages(),
include_p... |
6b86d37808c6d13ef9c7c79c879b86ff9c04104d | setup.py | setup.py | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='mafiademonstration',
version='0.4.5',
author='Isaac Smith, Hei Jing Tsang',
author_email='[email protected]',
description='A user friendly... | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='mafiademonstration',
version='0.4.5',
author='Isaac Smith, Hei Jing Tsang',
author_email='[email protected]',
description='A user friendly... | Fix the test command in the makefile | Fix the test command in the makefile
| Python | mit | Zenohm/mafiademonstration | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='mafiademonstration',
version='0.4.5',
author='Isaac Smith, Hei Jing Tsang',
author_email='[email protected]',
description='A user friendly... | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='mafiademonstration',
version='0.4.5',
author='Isaac Smith, Hei Jing Tsang',
author_email='[email protected]',
description='A user friendly... | <commit_before>import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='mafiademonstration',
version='0.4.5',
author='Isaac Smith, Hei Jing Tsang',
author_email='[email protected]',
description='... | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='mafiademonstration',
version='0.4.5',
author='Isaac Smith, Hei Jing Tsang',
author_email='[email protected]',
description='A user friendly... | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='mafiademonstration',
version='0.4.5',
author='Isaac Smith, Hei Jing Tsang',
author_email='[email protected]',
description='A user friendly... | <commit_before>import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='mafiademonstration',
version='0.4.5',
author='Isaac Smith, Hei Jing Tsang',
author_email='[email protected]',
description='... |
fa09d3b526bdf04dcabda603ef1e0adac8ae68bd | setup.py | setup.py | from setuptools import setup
setup(
name='python-binary-memcached',
version='0.24.6',
author='Jayson Reis',
author_email='[email protected]',
description='A pure python module to access memcached via it\'s binary protocol with SASL auth support',
url='https://github.com/jaysonsantos/python... | from setuptools import setup
setup(
name='python-binary-memcached',
version='0.24.6',
author='Jayson Reis',
author_email='[email protected]',
description='A pure python module to access memcached via its binary protocol with SASL auth support',
url='https://github.com/jaysonsantos/python-b... | Fix a typo in description: it's => its | Fix a typo in description: it's => its | Python | mit | jaysonsantos/python-binary-memcached,jaysonsantos/python-binary-memcached | from setuptools import setup
setup(
name='python-binary-memcached',
version='0.24.6',
author='Jayson Reis',
author_email='[email protected]',
description='A pure python module to access memcached via it\'s binary protocol with SASL auth support',
url='https://github.com/jaysonsantos/python... | from setuptools import setup
setup(
name='python-binary-memcached',
version='0.24.6',
author='Jayson Reis',
author_email='[email protected]',
description='A pure python module to access memcached via its binary protocol with SASL auth support',
url='https://github.com/jaysonsantos/python-b... | <commit_before>from setuptools import setup
setup(
name='python-binary-memcached',
version='0.24.6',
author='Jayson Reis',
author_email='[email protected]',
description='A pure python module to access memcached via it\'s binary protocol with SASL auth support',
url='https://github.com/jays... | from setuptools import setup
setup(
name='python-binary-memcached',
version='0.24.6',
author='Jayson Reis',
author_email='[email protected]',
description='A pure python module to access memcached via its binary protocol with SASL auth support',
url='https://github.com/jaysonsantos/python-b... | from setuptools import setup
setup(
name='python-binary-memcached',
version='0.24.6',
author='Jayson Reis',
author_email='[email protected]',
description='A pure python module to access memcached via it\'s binary protocol with SASL auth support',
url='https://github.com/jaysonsantos/python... | <commit_before>from setuptools import setup
setup(
name='python-binary-memcached',
version='0.24.6',
author='Jayson Reis',
author_email='[email protected]',
description='A pure python module to access memcached via it\'s binary protocol with SASL auth support',
url='https://github.com/jays... |
2b47f180ed79bbfe553e3c477ad12c5fa69e2823 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
tests_require = []
setup(
name='ashlar',
version='0.0.2',
description='Define and validate schemas for metadata for geotemporal event records',
author='Azavea, Inc.',
author_email='[email protected]',
keywords='gis jsonschema',
... | #!/usr/bin/env python
from setuptools import setup, find_packages
tests_require = []
setup(
name='ashlar',
version='0.0.2',
description='Define and validate schemas for metadata for geotemporal event records',
author='Azavea, Inc.',
author_email='[email protected]',
keywords='gis jsonschema',
... | Upgrade djsonb to fix syntax error | Upgrade djsonb to fix syntax error
| Python | mit | flibbertigibbet/ashlar,flibbertigibbet/ashlar,azavea/ashlar,azavea/ashlar | #!/usr/bin/env python
from setuptools import setup, find_packages
tests_require = []
setup(
name='ashlar',
version='0.0.2',
description='Define and validate schemas for metadata for geotemporal event records',
author='Azavea, Inc.',
author_email='[email protected]',
keywords='gis jsonschema',
... | #!/usr/bin/env python
from setuptools import setup, find_packages
tests_require = []
setup(
name='ashlar',
version='0.0.2',
description='Define and validate schemas for metadata for geotemporal event records',
author='Azavea, Inc.',
author_email='[email protected]',
keywords='gis jsonschema',
... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
tests_require = []
setup(
name='ashlar',
version='0.0.2',
description='Define and validate schemas for metadata for geotemporal event records',
author='Azavea, Inc.',
author_email='[email protected]',
keywords='gis... | #!/usr/bin/env python
from setuptools import setup, find_packages
tests_require = []
setup(
name='ashlar',
version='0.0.2',
description='Define and validate schemas for metadata for geotemporal event records',
author='Azavea, Inc.',
author_email='[email protected]',
keywords='gis jsonschema',
... | #!/usr/bin/env python
from setuptools import setup, find_packages
tests_require = []
setup(
name='ashlar',
version='0.0.2',
description='Define and validate schemas for metadata for geotemporal event records',
author='Azavea, Inc.',
author_email='[email protected]',
keywords='gis jsonschema',
... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
tests_require = []
setup(
name='ashlar',
version='0.0.2',
description='Define and validate schemas for metadata for geotemporal event records',
author='Azavea, Inc.',
author_email='[email protected]',
keywords='gis... |
bac7bc1bb9663adebe0c1768d67c4ed1d1f452fc | setup.py | setup.py | #! /usr/bin/env python
from setuptools import find_packages, setup
setup(
name='natsort',
version='6.0.0',
packages=find_packages(),
entry_points={'console_scripts': ['natsort = natsort.__main__:main']},
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
extras_require={
'fast... | #! /usr/bin/env python
from setuptools import find_packages, setup
setup(
name='natsort',
version='6.0.0',
packages=find_packages(),
entry_points={'console_scripts': ['natsort = natsort.__main__:main']},
python_requires=">=3.4",
extras_require={
'fast': ["fastnumbers >= 2.0.0"],
... | Remove support for Python 2 | Remove support for Python 2
This commit will prevent pip from installing natsort on any Python
version older than 3.4.
| Python | mit | SethMMorton/natsort | #! /usr/bin/env python
from setuptools import find_packages, setup
setup(
name='natsort',
version='6.0.0',
packages=find_packages(),
entry_points={'console_scripts': ['natsort = natsort.__main__:main']},
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
extras_require={
'fast... | #! /usr/bin/env python
from setuptools import find_packages, setup
setup(
name='natsort',
version='6.0.0',
packages=find_packages(),
entry_points={'console_scripts': ['natsort = natsort.__main__:main']},
python_requires=">=3.4",
extras_require={
'fast': ["fastnumbers >= 2.0.0"],
... | <commit_before>#! /usr/bin/env python
from setuptools import find_packages, setup
setup(
name='natsort',
version='6.0.0',
packages=find_packages(),
entry_points={'console_scripts': ['natsort = natsort.__main__:main']},
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
extras_require=... | #! /usr/bin/env python
from setuptools import find_packages, setup
setup(
name='natsort',
version='6.0.0',
packages=find_packages(),
entry_points={'console_scripts': ['natsort = natsort.__main__:main']},
python_requires=">=3.4",
extras_require={
'fast': ["fastnumbers >= 2.0.0"],
... | #! /usr/bin/env python
from setuptools import find_packages, setup
setup(
name='natsort',
version='6.0.0',
packages=find_packages(),
entry_points={'console_scripts': ['natsort = natsort.__main__:main']},
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
extras_require={
'fast... | <commit_before>#! /usr/bin/env python
from setuptools import find_packages, setup
setup(
name='natsort',
version='6.0.0',
packages=find_packages(),
entry_points={'console_scripts': ['natsort = natsort.__main__:main']},
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
extras_require=... |
9564692c1044779467e926f830b8f28e1661cb73 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
import argparse_addons
setup(name='argparse_addons',
version=argparse_addons.__version__,
description=('Additional argparse types and actions.'),
long_description=open('README.rst', 'r').read(),
author='Erik Moqvist',
author_email='erik.... | #!/usr/bin/env python
from setuptools import setup
import argparse_addons
setup(name='argparse_addons',
version=argparse_addons.__version__,
description=('Additional argparse types and actions.'),
long_description=open('README.rst', 'r').read(),
author='Erik Moqvist',
author_email='erik.... | Remove per patch version classifiers | Remove per patch version classifiers | Python | mit | eerimoq/argparse_addons | #!/usr/bin/env python
from setuptools import setup
import argparse_addons
setup(name='argparse_addons',
version=argparse_addons.__version__,
description=('Additional argparse types and actions.'),
long_description=open('README.rst', 'r').read(),
author='Erik Moqvist',
author_email='erik.... | #!/usr/bin/env python
from setuptools import setup
import argparse_addons
setup(name='argparse_addons',
version=argparse_addons.__version__,
description=('Additional argparse types and actions.'),
long_description=open('README.rst', 'r').read(),
author='Erik Moqvist',
author_email='erik.... | <commit_before>#!/usr/bin/env python
from setuptools import setup
import argparse_addons
setup(name='argparse_addons',
version=argparse_addons.__version__,
description=('Additional argparse types and actions.'),
long_description=open('README.rst', 'r').read(),
author='Erik Moqvist',
auth... | #!/usr/bin/env python
from setuptools import setup
import argparse_addons
setup(name='argparse_addons',
version=argparse_addons.__version__,
description=('Additional argparse types and actions.'),
long_description=open('README.rst', 'r').read(),
author='Erik Moqvist',
author_email='erik.... | #!/usr/bin/env python
from setuptools import setup
import argparse_addons
setup(name='argparse_addons',
version=argparse_addons.__version__,
description=('Additional argparse types and actions.'),
long_description=open('README.rst', 'r').read(),
author='Erik Moqvist',
author_email='erik.... | <commit_before>#!/usr/bin/env python
from setuptools import setup
import argparse_addons
setup(name='argparse_addons',
version=argparse_addons.__version__,
description=('Additional argparse types and actions.'),
long_description=open('README.rst', 'r').read(),
author='Erik Moqvist',
auth... |
0881a34fe78d8967bfbe85f7c16839ce2a802aa2 | setup.py | setup.py | #!/usr/bin/env python3
from setuptools import find_packages, setup
setup(
name='magical',
version='0.0.1',
packages=find_packages(),
install_requires=[
'pymunk~=5.6.0',
'pyglet==1.5.*',
'gym==0.17.*',
'Click>=7.0',
'numpy>=1.17.4',
'cloudpickle>=1.2.2',
... | #!/usr/bin/env python3
from setuptools import find_packages, setup
setup(
name='magical-il',
version='0.0.1alpha0',
packages=find_packages(),
install_requires=[
'pymunk~=5.6.0',
'pyglet==1.5.*',
'gym==0.17.*',
'Click>=7.0',
'numpy>=1.17.4',
'cloudpickle>=... | Change PyPI wheel name to 'magical-il' | Change PyPI wheel name to 'magical-il'
| Python | isc | qxcv/magical,qxcv/magical | #!/usr/bin/env python3
from setuptools import find_packages, setup
setup(
name='magical',
version='0.0.1',
packages=find_packages(),
install_requires=[
'pymunk~=5.6.0',
'pyglet==1.5.*',
'gym==0.17.*',
'Click>=7.0',
'numpy>=1.17.4',
'cloudpickle>=1.2.2',
... | #!/usr/bin/env python3
from setuptools import find_packages, setup
setup(
name='magical-il',
version='0.0.1alpha0',
packages=find_packages(),
install_requires=[
'pymunk~=5.6.0',
'pyglet==1.5.*',
'gym==0.17.*',
'Click>=7.0',
'numpy>=1.17.4',
'cloudpickle>=... | <commit_before>#!/usr/bin/env python3
from setuptools import find_packages, setup
setup(
name='magical',
version='0.0.1',
packages=find_packages(),
install_requires=[
'pymunk~=5.6.0',
'pyglet==1.5.*',
'gym==0.17.*',
'Click>=7.0',
'numpy>=1.17.4',
'cloudpi... | #!/usr/bin/env python3
from setuptools import find_packages, setup
setup(
name='magical-il',
version='0.0.1alpha0',
packages=find_packages(),
install_requires=[
'pymunk~=5.6.0',
'pyglet==1.5.*',
'gym==0.17.*',
'Click>=7.0',
'numpy>=1.17.4',
'cloudpickle>=... | #!/usr/bin/env python3
from setuptools import find_packages, setup
setup(
name='magical',
version='0.0.1',
packages=find_packages(),
install_requires=[
'pymunk~=5.6.0',
'pyglet==1.5.*',
'gym==0.17.*',
'Click>=7.0',
'numpy>=1.17.4',
'cloudpickle>=1.2.2',
... | <commit_before>#!/usr/bin/env python3
from setuptools import find_packages, setup
setup(
name='magical',
version='0.0.1',
packages=find_packages(),
install_requires=[
'pymunk~=5.6.0',
'pyglet==1.5.*',
'gym==0.17.*',
'Click>=7.0',
'numpy>=1.17.4',
'cloudpi... |
e89faebd357cc9c929950ef38cafc97524dee205 | setup.py | setup.py | from setuptools import setup, find_packages
import os
version = '0.1'
long_description = (
open('README.txt').read()
+ '\n' +
'Contributors\n'
'============\n'
+ '\n' +
open('CONTRIBUTORS.txt').read()
+ '\n' +
open('CHANGES.txt').read()
+ '\n')
requires = ['pyramid', 'PasteScript'... | from setuptools import setup, find_packages
import os
version = '0.1'
long_description = (
open('README.txt').read()
+ '\n' +
'Contributors\n'
'============\n'
+ '\n' +
open('CONTRIBUTORS.txt').read()
+ '\n' +
open('CHANGES.txt').read()
+ '\n')
requires = ['pyramid', 'PasteScript'... | Comment out numpy, scipy which cause problems in buildout | Comment out numpy, scipy which cause problems in buildout
| Python | apache-2.0 | mistio/mist.monitor,mistio/mist.monitor | from setuptools import setup, find_packages
import os
version = '0.1'
long_description = (
open('README.txt').read()
+ '\n' +
'Contributors\n'
'============\n'
+ '\n' +
open('CONTRIBUTORS.txt').read()
+ '\n' +
open('CHANGES.txt').read()
+ '\n')
requires = ['pyramid', 'PasteScript'... | from setuptools import setup, find_packages
import os
version = '0.1'
long_description = (
open('README.txt').read()
+ '\n' +
'Contributors\n'
'============\n'
+ '\n' +
open('CONTRIBUTORS.txt').read()
+ '\n' +
open('CHANGES.txt').read()
+ '\n')
requires = ['pyramid', 'PasteScript'... | <commit_before>from setuptools import setup, find_packages
import os
version = '0.1'
long_description = (
open('README.txt').read()
+ '\n' +
'Contributors\n'
'============\n'
+ '\n' +
open('CONTRIBUTORS.txt').read()
+ '\n' +
open('CHANGES.txt').read()
+ '\n')
requires = ['pyramid'... | from setuptools import setup, find_packages
import os
version = '0.1'
long_description = (
open('README.txt').read()
+ '\n' +
'Contributors\n'
'============\n'
+ '\n' +
open('CONTRIBUTORS.txt').read()
+ '\n' +
open('CHANGES.txt').read()
+ '\n')
requires = ['pyramid', 'PasteScript'... | from setuptools import setup, find_packages
import os
version = '0.1'
long_description = (
open('README.txt').read()
+ '\n' +
'Contributors\n'
'============\n'
+ '\n' +
open('CONTRIBUTORS.txt').read()
+ '\n' +
open('CHANGES.txt').read()
+ '\n')
requires = ['pyramid', 'PasteScript'... | <commit_before>from setuptools import setup, find_packages
import os
version = '0.1'
long_description = (
open('README.txt').read()
+ '\n' +
'Contributors\n'
'============\n'
+ '\n' +
open('CONTRIBUTORS.txt').read()
+ '\n' +
open('CHANGES.txt').read()
+ '\n')
requires = ['pyramid'... |
3d1e073ed73644b5ff0db94b4129cbd6cdd26d89 | setup.py | setup.py | import sys
from setuptools import setup, find_packages
import populous
requirements = [
"click",
"cached-property",
"fake-factory",
]
if sys.version_info < (3, 2):
requirements.append('functools32')
setup(
name="populous",
version=populous.__version__,
url=populous.__url__,
descript... | import sys
from setuptools import setup, find_packages
import populous
requirements = [
"click",
"cached-property",
"fake-factory",
"dateutils"
]
if sys.version_info < (3, 2):
requirements.append('functools32')
setup(
name="populous",
version=populous.__version__,
url=populous.__url... | Add dateutils to the requirements | Add dateutils to the requirements
| Python | mit | novafloss/populous | import sys
from setuptools import setup, find_packages
import populous
requirements = [
"click",
"cached-property",
"fake-factory",
]
if sys.version_info < (3, 2):
requirements.append('functools32')
setup(
name="populous",
version=populous.__version__,
url=populous.__url__,
descript... | import sys
from setuptools import setup, find_packages
import populous
requirements = [
"click",
"cached-property",
"fake-factory",
"dateutils"
]
if sys.version_info < (3, 2):
requirements.append('functools32')
setup(
name="populous",
version=populous.__version__,
url=populous.__url... | <commit_before>import sys
from setuptools import setup, find_packages
import populous
requirements = [
"click",
"cached-property",
"fake-factory",
]
if sys.version_info < (3, 2):
requirements.append('functools32')
setup(
name="populous",
version=populous.__version__,
url=populous.__url_... | import sys
from setuptools import setup, find_packages
import populous
requirements = [
"click",
"cached-property",
"fake-factory",
"dateutils"
]
if sys.version_info < (3, 2):
requirements.append('functools32')
setup(
name="populous",
version=populous.__version__,
url=populous.__url... | import sys
from setuptools import setup, find_packages
import populous
requirements = [
"click",
"cached-property",
"fake-factory",
]
if sys.version_info < (3, 2):
requirements.append('functools32')
setup(
name="populous",
version=populous.__version__,
url=populous.__url__,
descript... | <commit_before>import sys
from setuptools import setup, find_packages
import populous
requirements = [
"click",
"cached-property",
"fake-factory",
]
if sys.version_info < (3, 2):
requirements.append('functools32')
setup(
name="populous",
version=populous.__version__,
url=populous.__url_... |
dc5748eb6dad4bf2cdf5c88ab15c489a88c6bf21 | setup.py | setup.py | import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'parserutils.tests.tes... | import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'parserutils.tests.tes... | Increment minor version once more | Increment minor version once more | Python | bsd-3-clause | consbio/parserutils | import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'parserutils.tests.tes... | import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'parserutils.tests.tes... | <commit_before>import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'parser... | import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'parserutils.tests.tes... | import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'parserutils.tests.tes... | <commit_before>import subprocess
import sys
from setuptools import Command, setup
class RunTests(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, '-m', 'unittest', 'parser... |
f70d73b5a67ca13dc243f72ed701e1f8d5924405 | setup.py | setup.py | from setuptools import setup
DESCRIPTION = "A Django oriented templated / transaction email abstraction"
LONG_DESCRIPTION = None
try:
LONG_DESCRIPTION = open('README.rst').read()
except:
pass
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Licens... | from setuptools import setup
DESCRIPTION = "A Django oriented templated / transaction email abstraction"
LONG_DESCRIPTION = None
try:
LONG_DESCRIPTION = open('README.rst').read()
except:
pass
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Licens... | Revert "Perhaps need to modify the name" | Revert "Perhaps need to modify the name"
This reverts commit d4ee1a1d91cd13bf0cb844be032eaa527806fad1.
| Python | mit | dpetzold/django-templated-email,vintasoftware/django-templated-email,ScanTrust/django-templated-email,vintasoftware/django-templated-email,mypebble/django-templated-email,dpetzold/django-templated-email,BradWhittington/django-templated-email,hator/django-templated-email,ScanTrust/django-templated-email,BradWhittington/... | from setuptools import setup
DESCRIPTION = "A Django oriented templated / transaction email abstraction"
LONG_DESCRIPTION = None
try:
LONG_DESCRIPTION = open('README.rst').read()
except:
pass
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Licens... | from setuptools import setup
DESCRIPTION = "A Django oriented templated / transaction email abstraction"
LONG_DESCRIPTION = None
try:
LONG_DESCRIPTION = open('README.rst').read()
except:
pass
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Licens... | <commit_before>from setuptools import setup
DESCRIPTION = "A Django oriented templated / transaction email abstraction"
LONG_DESCRIPTION = None
try:
LONG_DESCRIPTION = open('README.rst').read()
except:
pass
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developer... | from setuptools import setup
DESCRIPTION = "A Django oriented templated / transaction email abstraction"
LONG_DESCRIPTION = None
try:
LONG_DESCRIPTION = open('README.rst').read()
except:
pass
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Licens... | from setuptools import setup
DESCRIPTION = "A Django oriented templated / transaction email abstraction"
LONG_DESCRIPTION = None
try:
LONG_DESCRIPTION = open('README.rst').read()
except:
pass
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Licens... | <commit_before>from setuptools import setup
DESCRIPTION = "A Django oriented templated / transaction email abstraction"
LONG_DESCRIPTION = None
try:
LONG_DESCRIPTION = open('README.rst').read()
except:
pass
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developer... |
7b77297f9099019f4424c7115deb933dd51eaf80 | setup.py | setup.py | #!/usr/local/bin/python3
from distutils.core import setup, Extension
setup(
name = 'Encoder',
version = '1.0',
description = 'Encode stuff',
ext_modules = [
Extension(
name = '_encoder',
sources = [
'src/encoder.c',
'src/module.c',
... | #!/usr/local/bin/python3
from distutils.core import setup, Extension
setup(
name = 'Encoder',
version = '1.0',
description = 'Encode stuff',
ext_modules = [
Extension(
name = '_encoder',
sources = [
'src/encoder.c',
'src/module.c',
... | Include buffer.h as a dependency for rebuilds | Include buffer.h as a dependency for rebuilds
| Python | apache-2.0 | blake-sheridan/py-serializer,blake-sheridan/py-serializer | #!/usr/local/bin/python3
from distutils.core import setup, Extension
setup(
name = 'Encoder',
version = '1.0',
description = 'Encode stuff',
ext_modules = [
Extension(
name = '_encoder',
sources = [
'src/encoder.c',
'src/module.c',
... | #!/usr/local/bin/python3
from distutils.core import setup, Extension
setup(
name = 'Encoder',
version = '1.0',
description = 'Encode stuff',
ext_modules = [
Extension(
name = '_encoder',
sources = [
'src/encoder.c',
'src/module.c',
... | <commit_before>#!/usr/local/bin/python3
from distutils.core import setup, Extension
setup(
name = 'Encoder',
version = '1.0',
description = 'Encode stuff',
ext_modules = [
Extension(
name = '_encoder',
sources = [
'src/encoder.c',
'src/mo... | #!/usr/local/bin/python3
from distutils.core import setup, Extension
setup(
name = 'Encoder',
version = '1.0',
description = 'Encode stuff',
ext_modules = [
Extension(
name = '_encoder',
sources = [
'src/encoder.c',
'src/module.c',
... | #!/usr/local/bin/python3
from distutils.core import setup, Extension
setup(
name = 'Encoder',
version = '1.0',
description = 'Encode stuff',
ext_modules = [
Extension(
name = '_encoder',
sources = [
'src/encoder.c',
'src/module.c',
... | <commit_before>#!/usr/local/bin/python3
from distutils.core import setup, Extension
setup(
name = 'Encoder',
version = '1.0',
description = 'Encode stuff',
ext_modules = [
Extension(
name = '_encoder',
sources = [
'src/encoder.c',
'src/mo... |
32a1f4915216dc77e4c2c0a834a26c5401068e25 | setup.py | setup.py | #!/usr/bin/python
# Copyright 2011 Tomo Krajina
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | #!/usr/bin/python
# Copyright 2011 Tomo Krajina
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | Add python_requires to help pip | Add python_requires to help pip
| Python | apache-2.0 | tkrajina/gpxpy | #!/usr/bin/python
# Copyright 2011 Tomo Krajina
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | #!/usr/bin/python
# Copyright 2011 Tomo Krajina
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | <commit_before>#!/usr/bin/python
# Copyright 2011 Tomo Krajina
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | #!/usr/bin/python
# Copyright 2011 Tomo Krajina
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | #!/usr/bin/python
# Copyright 2011 Tomo Krajina
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | <commit_before>#!/usr/bin/python
# Copyright 2011 Tomo Krajina
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... |
d4c37810c430f3b1a5a0bdc85c481cc313fc2a72 | setup.py | setup.py | from setuptools import setup, find_packages
long_desc = """
XYPath is aiming to be XPath for spreadsheets: it offers a framework for
navigating around and extracting values from tabular data.
"""
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers for classifiers
setup(
name='xypath',
version='1.0.1... | from setuptools import setup, find_packages
long_desc = """
XYPath is aiming to be XPath for spreadsheets: it offers a framework for
navigating around and extracting values from tabular data.
"""
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers for classifiers
setup(
name='xypath',
version='1.0.1... | Use same version of messytables as in requirements | Use same version of messytables as in requirements
Also pin the version too as it is in requirements.txt.
| Python | bsd-2-clause | scraperwiki/xypath | from setuptools import setup, find_packages
long_desc = """
XYPath is aiming to be XPath for spreadsheets: it offers a framework for
navigating around and extracting values from tabular data.
"""
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers for classifiers
setup(
name='xypath',
version='1.0.1... | from setuptools import setup, find_packages
long_desc = """
XYPath is aiming to be XPath for spreadsheets: it offers a framework for
navigating around and extracting values from tabular data.
"""
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers for classifiers
setup(
name='xypath',
version='1.0.1... | <commit_before>from setuptools import setup, find_packages
long_desc = """
XYPath is aiming to be XPath for spreadsheets: it offers a framework for
navigating around and extracting values from tabular data.
"""
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers for classifiers
setup(
name='xypath',
... | from setuptools import setup, find_packages
long_desc = """
XYPath is aiming to be XPath for spreadsheets: it offers a framework for
navigating around and extracting values from tabular data.
"""
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers for classifiers
setup(
name='xypath',
version='1.0.1... | from setuptools import setup, find_packages
long_desc = """
XYPath is aiming to be XPath for spreadsheets: it offers a framework for
navigating around and extracting values from tabular data.
"""
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers for classifiers
setup(
name='xypath',
version='1.0.1... | <commit_before>from setuptools import setup, find_packages
long_desc = """
XYPath is aiming to be XPath for spreadsheets: it offers a framework for
navigating around and extracting values from tabular data.
"""
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers for classifiers
setup(
name='xypath',
... |
3c7d840c56f70e7f6ec5df1cd7457e4b086aebe6 | setup.py | setup.py | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
import io
from setuptools import setup
with open('requirements.txt', 'r') as fh:
dependencies = [l.strip() for l in fh]
setup(name='coil',
version='1.3.1',
description='A user-friendly CMS frontend for Nikola.',
keywords='coil,nikola,cms',
au... | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
import io
from setuptools import setup
with open('requirements.txt', 'r') as fh:
dependencies = [l.strip() for l in fh]
setup(name='coil',
version='1.3.1',
description='A user-friendly CMS frontend for Nikola.',
keywords='coil,nikola,cms',
au... | Set status to 5 - Production/Stable | Set status to 5 - Production/Stable
Signed-off-by: Chris Warrick <[email protected]>
| Python | mit | dpaleino/coil,getnikola/coil,dpaleino/coil,dpaleino/coil,getnikola/coil,getnikola/coil | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
import io
from setuptools import setup
with open('requirements.txt', 'r') as fh:
dependencies = [l.strip() for l in fh]
setup(name='coil',
version='1.3.1',
description='A user-friendly CMS frontend for Nikola.',
keywords='coil,nikola,cms',
au... | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
import io
from setuptools import setup
with open('requirements.txt', 'r') as fh:
dependencies = [l.strip() for l in fh]
setup(name='coil',
version='1.3.1',
description='A user-friendly CMS frontend for Nikola.',
keywords='coil,nikola,cms',
au... | <commit_before>#!/usr/bin/env python
# -*- encoding: utf-8 -*-
import io
from setuptools import setup
with open('requirements.txt', 'r') as fh:
dependencies = [l.strip() for l in fh]
setup(name='coil',
version='1.3.1',
description='A user-friendly CMS frontend for Nikola.',
keywords='coil,nikola... | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
import io
from setuptools import setup
with open('requirements.txt', 'r') as fh:
dependencies = [l.strip() for l in fh]
setup(name='coil',
version='1.3.1',
description='A user-friendly CMS frontend for Nikola.',
keywords='coil,nikola,cms',
au... | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
import io
from setuptools import setup
with open('requirements.txt', 'r') as fh:
dependencies = [l.strip() for l in fh]
setup(name='coil',
version='1.3.1',
description='A user-friendly CMS frontend for Nikola.',
keywords='coil,nikola,cms',
au... | <commit_before>#!/usr/bin/env python
# -*- encoding: utf-8 -*-
import io
from setuptools import setup
with open('requirements.txt', 'r') as fh:
dependencies = [l.strip() for l in fh]
setup(name='coil',
version='1.3.1',
description='A user-friendly CMS frontend for Nikola.',
keywords='coil,nikola... |
381e26a02ee46437ea840babe6462f48c496f5fe | setup.py | setup.py | #!/usr/bin/env python
import os
from setuptools import setup
README_PATH = os.path.join(os.path.dirname(__file__), "README.md")
with open(README_PATH, "r") as README_FILE:
README = README_FILE.read()
setup(
name="parse_this",
version="1.0.3",
description=(
"Makes it easy to create a command li... | #!/usr/bin/env python
import os
from setuptools import setup
README_PATH = os.path.join(os.path.dirname(__file__), "README.md")
with open(README_PATH, "r") as README_FILE:
README = README_FILE.read()
setup(
name="parse_this",
version="2.0.0",
description=(
"Makes it easy to create a command li... | Update to v2.0.0 with py3 only support | Update to v2.0.0 with py3 only support
| Python | mit | bertrandvidal/parse_this | #!/usr/bin/env python
import os
from setuptools import setup
README_PATH = os.path.join(os.path.dirname(__file__), "README.md")
with open(README_PATH, "r") as README_FILE:
README = README_FILE.read()
setup(
name="parse_this",
version="1.0.3",
description=(
"Makes it easy to create a command li... | #!/usr/bin/env python
import os
from setuptools import setup
README_PATH = os.path.join(os.path.dirname(__file__), "README.md")
with open(README_PATH, "r") as README_FILE:
README = README_FILE.read()
setup(
name="parse_this",
version="2.0.0",
description=(
"Makes it easy to create a command li... | <commit_before>#!/usr/bin/env python
import os
from setuptools import setup
README_PATH = os.path.join(os.path.dirname(__file__), "README.md")
with open(README_PATH, "r") as README_FILE:
README = README_FILE.read()
setup(
name="parse_this",
version="1.0.3",
description=(
"Makes it easy to crea... | #!/usr/bin/env python
import os
from setuptools import setup
README_PATH = os.path.join(os.path.dirname(__file__), "README.md")
with open(README_PATH, "r") as README_FILE:
README = README_FILE.read()
setup(
name="parse_this",
version="2.0.0",
description=(
"Makes it easy to create a command li... | #!/usr/bin/env python
import os
from setuptools import setup
README_PATH = os.path.join(os.path.dirname(__file__), "README.md")
with open(README_PATH, "r") as README_FILE:
README = README_FILE.read()
setup(
name="parse_this",
version="1.0.3",
description=(
"Makes it easy to create a command li... | <commit_before>#!/usr/bin/env python
import os
from setuptools import setup
README_PATH = os.path.join(os.path.dirname(__file__), "README.md")
with open(README_PATH, "r") as README_FILE:
README = README_FILE.read()
setup(
name="parse_this",
version="1.0.3",
description=(
"Makes it easy to crea... |
0d2ff0efacea836be7a1fbfa49c6fec0dd5fe689 | setup.py | setup.py | #!/usr/bin/env python
import os
from glob import glob
if os.environ.get('USE_SETUPTOOLS'):
from setuptools import setup
setup_kwargs = dict(zip_safe=0)
else:
from distutils.core import setup
setup_kwargs = dict()
storage_dirs = [ ('storage/whisper',[]), ('storage/lists',[]),
('storage/log'... | #!/usr/bin/env python
import os
from glob import glob
if os.environ.get('USE_SETUPTOOLS'):
from setuptools import setup
setup_kwargs = dict(zip_safe=0)
else:
from distutils.core import setup
setup_kwargs = dict()
storage_dirs = [ ('storage/whisper',[]), ('storage/lists',[]),
('storage/log'... | Modify version string, data files to include init script | Modify version string, data files to include init script
| Python | apache-2.0 | kharandziuk/carbon,deniszh/carbon,graphite-server/carbon,benburry/carbon,graphite-server/carbon,pratX/carbon,piotr1212/carbon,lyft/carbon,johnseekins/carbon,graphite-project/carbon,protochron/carbon,piotr1212/carbon,benburry/carbon,iain-buclaw-sociomantic/carbon,pu239ppy/carbon,mleinart/carbon,cbowman0/carbon,cbowman0/... | #!/usr/bin/env python
import os
from glob import glob
if os.environ.get('USE_SETUPTOOLS'):
from setuptools import setup
setup_kwargs = dict(zip_safe=0)
else:
from distutils.core import setup
setup_kwargs = dict()
storage_dirs = [ ('storage/whisper',[]), ('storage/lists',[]),
('storage/log'... | #!/usr/bin/env python
import os
from glob import glob
if os.environ.get('USE_SETUPTOOLS'):
from setuptools import setup
setup_kwargs = dict(zip_safe=0)
else:
from distutils.core import setup
setup_kwargs = dict()
storage_dirs = [ ('storage/whisper',[]), ('storage/lists',[]),
('storage/log'... | <commit_before>#!/usr/bin/env python
import os
from glob import glob
if os.environ.get('USE_SETUPTOOLS'):
from setuptools import setup
setup_kwargs = dict(zip_safe=0)
else:
from distutils.core import setup
setup_kwargs = dict()
storage_dirs = [ ('storage/whisper',[]), ('storage/lists',[]),
... | #!/usr/bin/env python
import os
from glob import glob
if os.environ.get('USE_SETUPTOOLS'):
from setuptools import setup
setup_kwargs = dict(zip_safe=0)
else:
from distutils.core import setup
setup_kwargs = dict()
storage_dirs = [ ('storage/whisper',[]), ('storage/lists',[]),
('storage/log'... | #!/usr/bin/env python
import os
from glob import glob
if os.environ.get('USE_SETUPTOOLS'):
from setuptools import setup
setup_kwargs = dict(zip_safe=0)
else:
from distutils.core import setup
setup_kwargs = dict()
storage_dirs = [ ('storage/whisper',[]), ('storage/lists',[]),
('storage/log'... | <commit_before>#!/usr/bin/env python
import os
from glob import glob
if os.environ.get('USE_SETUPTOOLS'):
from setuptools import setup
setup_kwargs = dict(zip_safe=0)
else:
from distutils.core import setup
setup_kwargs = dict()
storage_dirs = [ ('storage/whisper',[]), ('storage/lists',[]),
... |
010b209090ce31de1f20b60e641fd6b4296f834c | base/view_utils.py | base/view_utils.py | # django
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
# standard library
def paginate(request, objects, page_size=25):
paginator = Paginator(objects, page_size)
page = request.GET.get('p')
try:
paginated_objects = paginator.page(page)
except PageNotAnInteger:
... | # django
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
# standard library
def paginate(request, objects, page_size=25):
paginator = Paginator(objects, page_size)
page = request.GET.get('p')
try:
paginated_objects = paginator.page(page)
except PageNotAnInteger:
... | Use keys instead of iterkeys to go through all keys on clean_query_set | Use keys instead of iterkeys to go through all keys on clean_query_set
| Python | mit | magnet-cl/django-project-template-py3,magnet-cl/django-project-template-py3,Angoreher/xcero,Angoreher/xcero,Angoreher/xcero,magnet-cl/django-project-template-py3,Angoreher/xcero,magnet-cl/django-project-template-py3 | # django
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
# standard library
def paginate(request, objects, page_size=25):
paginator = Paginator(objects, page_size)
page = request.GET.get('p')
try:
paginated_objects = paginator.page(page)
except PageNotAnInteger:
... | # django
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
# standard library
def paginate(request, objects, page_size=25):
paginator = Paginator(objects, page_size)
page = request.GET.get('p')
try:
paginated_objects = paginator.page(page)
except PageNotAnInteger:
... | <commit_before># django
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
# standard library
def paginate(request, objects, page_size=25):
paginator = Paginator(objects, page_size)
page = request.GET.get('p')
try:
paginated_objects = paginator.page(page)
except PageNot... | # django
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
# standard library
def paginate(request, objects, page_size=25):
paginator = Paginator(objects, page_size)
page = request.GET.get('p')
try:
paginated_objects = paginator.page(page)
except PageNotAnInteger:
... | # django
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
# standard library
def paginate(request, objects, page_size=25):
paginator = Paginator(objects, page_size)
page = request.GET.get('p')
try:
paginated_objects = paginator.page(page)
except PageNotAnInteger:
... | <commit_before># django
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
# standard library
def paginate(request, objects, page_size=25):
paginator = Paginator(objects, page_size)
page = request.GET.get('p')
try:
paginated_objects = paginator.page(page)
except PageNot... |
346ddf5e26351fe1fadbed1bf06482565080a728 | stack.py | stack.py | #!/usr/bin/env python
'''Implementation of a simple stack data structure.
The stack has push, pop, and peek methods. Items in the stack have a value,
and next_item attribute. The stack has a top attribute.
'''
class Item(object):
def __init__(self, value, next_item=None):
self.value = value
self.... | #!/usr/bin/env python
'''Implementation of a simple stack data structure.
The stack has push, pop, and peek methods. Items in the stack have a value,
and next_item attribute. The stack has a top attribute.
'''
class Item(object):
def __init__(self, value, next_item=None):
self.value = value
self.... | Add pop method on Stack class | Add pop method on Stack class
| Python | mit | jwarren116/data-structures-deux | #!/usr/bin/env python
'''Implementation of a simple stack data structure.
The stack has push, pop, and peek methods. Items in the stack have a value,
and next_item attribute. The stack has a top attribute.
'''
class Item(object):
def __init__(self, value, next_item=None):
self.value = value
self.... | #!/usr/bin/env python
'''Implementation of a simple stack data structure.
The stack has push, pop, and peek methods. Items in the stack have a value,
and next_item attribute. The stack has a top attribute.
'''
class Item(object):
def __init__(self, value, next_item=None):
self.value = value
self.... | <commit_before>#!/usr/bin/env python
'''Implementation of a simple stack data structure.
The stack has push, pop, and peek methods. Items in the stack have a value,
and next_item attribute. The stack has a top attribute.
'''
class Item(object):
def __init__(self, value, next_item=None):
self.value = valu... | #!/usr/bin/env python
'''Implementation of a simple stack data structure.
The stack has push, pop, and peek methods. Items in the stack have a value,
and next_item attribute. The stack has a top attribute.
'''
class Item(object):
def __init__(self, value, next_item=None):
self.value = value
self.... | #!/usr/bin/env python
'''Implementation of a simple stack data structure.
The stack has push, pop, and peek methods. Items in the stack have a value,
and next_item attribute. The stack has a top attribute.
'''
class Item(object):
def __init__(self, value, next_item=None):
self.value = value
self.... | <commit_before>#!/usr/bin/env python
'''Implementation of a simple stack data structure.
The stack has push, pop, and peek methods. Items in the stack have a value,
and next_item attribute. The stack has a top attribute.
'''
class Item(object):
def __init__(self, value, next_item=None):
self.value = valu... |
0d475a69ca53eee62aeb39f35b3d3a8f875d5e71 | tests/menu_test_5.py | tests/menu_test_5.py | """Tests the menu features."""
##==============================================================#
## SECTION: Imports #
##==============================================================#
from testlib import *
from qprompt import enum_menu
##=================================... | """Tests the menu features."""
##==============================================================#
## SECTION: Imports #
##==============================================================#
from testlib import *
from qprompt import enum_menu
##=================================... | Change to get test to pass. | Change to get test to pass.
| Python | mit | jeffrimko/Qprompt | """Tests the menu features."""
##==============================================================#
## SECTION: Imports #
##==============================================================#
from testlib import *
from qprompt import enum_menu
##=================================... | """Tests the menu features."""
##==============================================================#
## SECTION: Imports #
##==============================================================#
from testlib import *
from qprompt import enum_menu
##=================================... | <commit_before>"""Tests the menu features."""
##==============================================================#
## SECTION: Imports #
##==============================================================#
from testlib import *
from qprompt import enum_menu
##==================... | """Tests the menu features."""
##==============================================================#
## SECTION: Imports #
##==============================================================#
from testlib import *
from qprompt import enum_menu
##=================================... | """Tests the menu features."""
##==============================================================#
## SECTION: Imports #
##==============================================================#
from testlib import *
from qprompt import enum_menu
##=================================... | <commit_before>"""Tests the menu features."""
##==============================================================#
## SECTION: Imports #
##==============================================================#
from testlib import *
from qprompt import enum_menu
##==================... |
ab41fe934ce241a4dbe5f73f648858f6f9351d5c | tests/settings.py | tests/settings.py | import dj_database_url
DATABASES = {
'default': dj_database_url.config(
default='postgres://localhost/test_utils',
),
}
INSTALLED_APPS = (
'incuna_test_utils',
'tests',
'feincms.module.page',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'... | import dj_database_url
DATABASES = {
'default': dj_database_url.config(
default='postgres://localhost/test_utils',
),
}
INSTALLED_APPS = (
'incuna_test_utils',
'tests',
'feincms.module.page',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'... | Fix TEMPLATES warning on Django 1.9 | Fix TEMPLATES warning on Django 1.9
| Python | bsd-2-clause | incuna/incuna-test-utils,incuna/incuna-test-utils | import dj_database_url
DATABASES = {
'default': dj_database_url.config(
default='postgres://localhost/test_utils',
),
}
INSTALLED_APPS = (
'incuna_test_utils',
'tests',
'feincms.module.page',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'... | import dj_database_url
DATABASES = {
'default': dj_database_url.config(
default='postgres://localhost/test_utils',
),
}
INSTALLED_APPS = (
'incuna_test_utils',
'tests',
'feincms.module.page',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'... | <commit_before>import dj_database_url
DATABASES = {
'default': dj_database_url.config(
default='postgres://localhost/test_utils',
),
}
INSTALLED_APPS = (
'incuna_test_utils',
'tests',
'feincms.module.page',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.conte... | import dj_database_url
DATABASES = {
'default': dj_database_url.config(
default='postgres://localhost/test_utils',
),
}
INSTALLED_APPS = (
'incuna_test_utils',
'tests',
'feincms.module.page',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'... | import dj_database_url
DATABASES = {
'default': dj_database_url.config(
default='postgres://localhost/test_utils',
),
}
INSTALLED_APPS = (
'incuna_test_utils',
'tests',
'feincms.module.page',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'... | <commit_before>import dj_database_url
DATABASES = {
'default': dj_database_url.config(
default='postgres://localhost/test_utils',
),
}
INSTALLED_APPS = (
'incuna_test_utils',
'tests',
'feincms.module.page',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.conte... |
f3cd06721efaf3045d09f2d3c2c067e01b27953a | tests/som_test.py | tests/som_test.py | import unittest
from parameterized import parameterized
from som.vm.universe import Universe
class SomTest(unittest.TestCase):
@parameterized.expand([
("ClassStructure",),
("Array" ,),
("Block" ,),
("ClassLoading" ,),
("Closure" ,),
("Coercio... | import unittest
from parameterized import parameterized
from som.vm.universe import Universe
class SomTest(unittest.TestCase):
@parameterized.expand([
("Array" ,),
("Block" ,),
("ClassLoading" ,),
("ClassStructure",),
("Closure" ,),
("Coercio... | Sort tests, to verify they are complete | Sort tests, to verify they are complete
Signed-off-by: Stefan Marr <[email protected]>
| Python | mit | SOM-st/PySOM,SOM-st/RPySOM,SOM-st/RTruffleSOM,SOM-st/RPySOM,smarr/PySOM,smarr/PySOM,smarr/RTruffleSOM,SOM-st/RTruffleSOM,smarr/RTruffleSOM,SOM-st/PySOM | import unittest
from parameterized import parameterized
from som.vm.universe import Universe
class SomTest(unittest.TestCase):
@parameterized.expand([
("ClassStructure",),
("Array" ,),
("Block" ,),
("ClassLoading" ,),
("Closure" ,),
("Coercio... | import unittest
from parameterized import parameterized
from som.vm.universe import Universe
class SomTest(unittest.TestCase):
@parameterized.expand([
("Array" ,),
("Block" ,),
("ClassLoading" ,),
("ClassStructure",),
("Closure" ,),
("Coercio... | <commit_before>import unittest
from parameterized import parameterized
from som.vm.universe import Universe
class SomTest(unittest.TestCase):
@parameterized.expand([
("ClassStructure",),
("Array" ,),
("Block" ,),
("ClassLoading" ,),
("Closure" ,),
... | import unittest
from parameterized import parameterized
from som.vm.universe import Universe
class SomTest(unittest.TestCase):
@parameterized.expand([
("Array" ,),
("Block" ,),
("ClassLoading" ,),
("ClassStructure",),
("Closure" ,),
("Coercio... | import unittest
from parameterized import parameterized
from som.vm.universe import Universe
class SomTest(unittest.TestCase):
@parameterized.expand([
("ClassStructure",),
("Array" ,),
("Block" ,),
("ClassLoading" ,),
("Closure" ,),
("Coercio... | <commit_before>import unittest
from parameterized import parameterized
from som.vm.universe import Universe
class SomTest(unittest.TestCase):
@parameterized.expand([
("ClassStructure",),
("Array" ,),
("Block" ,),
("ClassLoading" ,),
("Closure" ,),
... |
4f3f738d7fc4b1728c74d6ffc7bf3064ce969520 | tests/test_cli.py | tests/test_cli.py | import subprocess
def test_cli_usage():
cmd = ["salib"]
out = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
out = out.decode()
assert len(out) > 0 and "usage" in out.lower(), \
"Incorrect message returned from utility"
def test_cli_setup():
cmd = ["salib", "sample", ... | import subprocess
import importlib
from SALib.util import avail_approaches
def test_cli_usage():
cmd = ["salib"]
out = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
out = out.decode()
assert len(out) > 0 and "usage" in out.lower(), \
"Incorrect message returned from utilit... | Test to ensure all samplers and analyzers have required functions | Test to ensure all samplers and analyzers have required functions
All methods should have `cli_parse` and `cli_action` functions available | Python | mit | willu47/SALib,willu47/SALib,jdherman/SALib,jdherman/SALib,SALib/SALib | import subprocess
def test_cli_usage():
cmd = ["salib"]
out = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
out = out.decode()
assert len(out) > 0 and "usage" in out.lower(), \
"Incorrect message returned from utility"
def test_cli_setup():
cmd = ["salib", "sample", ... | import subprocess
import importlib
from SALib.util import avail_approaches
def test_cli_usage():
cmd = ["salib"]
out = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
out = out.decode()
assert len(out) > 0 and "usage" in out.lower(), \
"Incorrect message returned from utilit... | <commit_before>import subprocess
def test_cli_usage():
cmd = ["salib"]
out = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
out = out.decode()
assert len(out) > 0 and "usage" in out.lower(), \
"Incorrect message returned from utility"
def test_cli_setup():
cmd = ["sal... | import subprocess
import importlib
from SALib.util import avail_approaches
def test_cli_usage():
cmd = ["salib"]
out = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
out = out.decode()
assert len(out) > 0 and "usage" in out.lower(), \
"Incorrect message returned from utilit... | import subprocess
def test_cli_usage():
cmd = ["salib"]
out = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
out = out.decode()
assert len(out) > 0 and "usage" in out.lower(), \
"Incorrect message returned from utility"
def test_cli_setup():
cmd = ["salib", "sample", ... | <commit_before>import subprocess
def test_cli_usage():
cmd = ["salib"]
out = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
out = out.decode()
assert len(out) > 0 and "usage" in out.lower(), \
"Incorrect message returned from utility"
def test_cli_setup():
cmd = ["sal... |
658fa530c888eb31b28d5937592fb94d503902fb | allmychanges/validators.py | allmychanges/validators.py | import re
from django.core import validators
class URLValidator(validators.URLValidator):
"""Custom url validator to include git urls and urls with http+ like prefixes
"""
regex = re.compile(
r'^(?:(?:(?:(?:http|git|hg)\+)?' # optional http+ or git+ or hg+
r'(?:http|ftp|)s?|git)://|git... | import re
from django.core import validators
class URLValidator(validators.URLValidator):
"""Custom url validator to include git urls and urls with http+ like prefixes
"""
regex = re.compile(
r'^(?:(?:(?:(?:http|git|hg|rechttp)\+)?' # optional http+ or git+ or hg+
r'(?:http|ftp|)s?|git... | Allow rechttp prefix for source field. | Allow rechttp prefix for source field.
| Python | bsd-2-clause | AllMyChanges/allmychanges.com,AllMyChanges/allmychanges.com,AllMyChanges/allmychanges.com,AllMyChanges/allmychanges.com | import re
from django.core import validators
class URLValidator(validators.URLValidator):
"""Custom url validator to include git urls and urls with http+ like prefixes
"""
regex = re.compile(
r'^(?:(?:(?:(?:http|git|hg)\+)?' # optional http+ or git+ or hg+
r'(?:http|ftp|)s?|git)://|git... | import re
from django.core import validators
class URLValidator(validators.URLValidator):
"""Custom url validator to include git urls and urls with http+ like prefixes
"""
regex = re.compile(
r'^(?:(?:(?:(?:http|git|hg|rechttp)\+)?' # optional http+ or git+ or hg+
r'(?:http|ftp|)s?|git... | <commit_before>import re
from django.core import validators
class URLValidator(validators.URLValidator):
"""Custom url validator to include git urls and urls with http+ like prefixes
"""
regex = re.compile(
r'^(?:(?:(?:(?:http|git|hg)\+)?' # optional http+ or git+ or hg+
r'(?:http|ftp|... | import re
from django.core import validators
class URLValidator(validators.URLValidator):
"""Custom url validator to include git urls and urls with http+ like prefixes
"""
regex = re.compile(
r'^(?:(?:(?:(?:http|git|hg|rechttp)\+)?' # optional http+ or git+ or hg+
r'(?:http|ftp|)s?|git... | import re
from django.core import validators
class URLValidator(validators.URLValidator):
"""Custom url validator to include git urls and urls with http+ like prefixes
"""
regex = re.compile(
r'^(?:(?:(?:(?:http|git|hg)\+)?' # optional http+ or git+ or hg+
r'(?:http|ftp|)s?|git)://|git... | <commit_before>import re
from django.core import validators
class URLValidator(validators.URLValidator):
"""Custom url validator to include git urls and urls with http+ like prefixes
"""
regex = re.compile(
r'^(?:(?:(?:(?:http|git|hg)\+)?' # optional http+ or git+ or hg+
r'(?:http|ftp|... |
ace38e69c66a5957a155091fbd3c746952f982fc | tests.py | tests.py | from scraper.tivix import get_list_of_tivix_members
from scraper.tivix import get_random_tivix_member_bio
def test_get_all_tivix_members():
members = get_list_of_tivix_members()
assert members
assert '/team-members/jack-muratore/' in members
assert '/team-members/kyle-connors/' in members
assert '... | from scraper.tivix import get_list_of_tivix_members
from scraper.tivix import get_random_tivix_member_bio
def test_get_all_tivix_members():
members = get_list_of_tivix_members()
assert members
assert '/team-members/jack-muratore/' in members
assert '/team-members/kyle-connors/' in members
assert '... | Rename test to be more fitting | Rename test to be more fitting
| Python | mit | banjocat/alexa-tivix-members | from scraper.tivix import get_list_of_tivix_members
from scraper.tivix import get_random_tivix_member_bio
def test_get_all_tivix_members():
members = get_list_of_tivix_members()
assert members
assert '/team-members/jack-muratore/' in members
assert '/team-members/kyle-connors/' in members
assert '... | from scraper.tivix import get_list_of_tivix_members
from scraper.tivix import get_random_tivix_member_bio
def test_get_all_tivix_members():
members = get_list_of_tivix_members()
assert members
assert '/team-members/jack-muratore/' in members
assert '/team-members/kyle-connors/' in members
assert '... | <commit_before>from scraper.tivix import get_list_of_tivix_members
from scraper.tivix import get_random_tivix_member_bio
def test_get_all_tivix_members():
members = get_list_of_tivix_members()
assert members
assert '/team-members/jack-muratore/' in members
assert '/team-members/kyle-connors/' in membe... | from scraper.tivix import get_list_of_tivix_members
from scraper.tivix import get_random_tivix_member_bio
def test_get_all_tivix_members():
members = get_list_of_tivix_members()
assert members
assert '/team-members/jack-muratore/' in members
assert '/team-members/kyle-connors/' in members
assert '... | from scraper.tivix import get_list_of_tivix_members
from scraper.tivix import get_random_tivix_member_bio
def test_get_all_tivix_members():
members = get_list_of_tivix_members()
assert members
assert '/team-members/jack-muratore/' in members
assert '/team-members/kyle-connors/' in members
assert '... | <commit_before>from scraper.tivix import get_list_of_tivix_members
from scraper.tivix import get_random_tivix_member_bio
def test_get_all_tivix_members():
members = get_list_of_tivix_members()
assert members
assert '/team-members/jack-muratore/' in members
assert '/team-members/kyle-connors/' in membe... |
797e9f3e4fad744e9211c07067992c245a344fb5 | tests/test_whatcd.py | tests/test_whatcd.py | from __future__ import unicode_literals, division, absolute_import
from tests import FlexGetBase, use_vcr
class TestInputWhatCD(FlexGetBase):
__yaml__ = """
tasks:
no_fields:
whatcd:
no_user:
whatcd:
password: test
no_pass:
... | from __future__ import unicode_literals, division, absolute_import
from tests import FlexGetBase, use_vcr
class TestWhatCDOnline(FlexGetBase):
__yaml__ = """
tasks:
badlogin:
whatcd:
username: invalid
password: invalid
"""
@use_vcr
def test_... | Remove schema validation unit tests frow whatcd | Remove schema validation unit tests frow whatcd
| Python | mit | JorisDeRieck/Flexget,Danfocus/Flexget,qk4l/Flexget,Flexget/Flexget,JorisDeRieck/Flexget,qk4l/Flexget,ianstalk/Flexget,dsemi/Flexget,oxc/Flexget,crawln45/Flexget,qvazzler/Flexget,Flexget/Flexget,sean797/Flexget,oxc/Flexget,Flexget/Flexget,dsemi/Flexget,drwyrm/Flexget,OmgOhnoes/Flexget,drwyrm/Flexget,jacobmetrick/Flexget... | from __future__ import unicode_literals, division, absolute_import
from tests import FlexGetBase, use_vcr
class TestInputWhatCD(FlexGetBase):
__yaml__ = """
tasks:
no_fields:
whatcd:
no_user:
whatcd:
password: test
no_pass:
... | from __future__ import unicode_literals, division, absolute_import
from tests import FlexGetBase, use_vcr
class TestWhatCDOnline(FlexGetBase):
__yaml__ = """
tasks:
badlogin:
whatcd:
username: invalid
password: invalid
"""
@use_vcr
def test_... | <commit_before>from __future__ import unicode_literals, division, absolute_import
from tests import FlexGetBase, use_vcr
class TestInputWhatCD(FlexGetBase):
__yaml__ = """
tasks:
no_fields:
whatcd:
no_user:
whatcd:
password: test
no_pas... | from __future__ import unicode_literals, division, absolute_import
from tests import FlexGetBase, use_vcr
class TestWhatCDOnline(FlexGetBase):
__yaml__ = """
tasks:
badlogin:
whatcd:
username: invalid
password: invalid
"""
@use_vcr
def test_... | from __future__ import unicode_literals, division, absolute_import
from tests import FlexGetBase, use_vcr
class TestInputWhatCD(FlexGetBase):
__yaml__ = """
tasks:
no_fields:
whatcd:
no_user:
whatcd:
password: test
no_pass:
... | <commit_before>from __future__ import unicode_literals, division, absolute_import
from tests import FlexGetBase, use_vcr
class TestInputWhatCD(FlexGetBase):
__yaml__ = """
tasks:
no_fields:
whatcd:
no_user:
whatcd:
password: test
no_pas... |
e07e1468128d423bbb9f0dd0cb79d09620b69e48 | misc/decode-mirax-tile-position.py | misc/decode-mirax-tile-position.py | #!/usr/bin/python
import struct, sys, os
f = open(sys.argv[1])
HEADER_OFFSET = 296
f.seek(HEADER_OFFSET)
try:
while True:
x = int(struct.unpack("<i", f.read(4))[0]) / 256.0
y = int(struct.unpack("<i", f.read(4))[0]) / 256.0
zz = f.read(1)
print '%10g %10g' % (x, y)
except:
... | #!/usr/bin/python
import struct, sys, os
f = open(sys.argv[1])
HEADER_OFFSET = 296
f.seek(HEADER_OFFSET)
try:
while True:
x = int(struct.unpack("<i", f.read(4))[0]) / 256.0
y = int(struct.unpack("<i", f.read(4))[0]) / 256.0
zz = f.read(1)
print '%10.100g %10.100g' % (x, y)
exce... | Fix numerical printout in python script | Fix numerical printout in python script
| Python | lgpl-2.1 | openslide/openslide,openslide/openslide,openslide/openslide,openslide/openslide | #!/usr/bin/python
import struct, sys, os
f = open(sys.argv[1])
HEADER_OFFSET = 296
f.seek(HEADER_OFFSET)
try:
while True:
x = int(struct.unpack("<i", f.read(4))[0]) / 256.0
y = int(struct.unpack("<i", f.read(4))[0]) / 256.0
zz = f.read(1)
print '%10g %10g' % (x, y)
except:
... | #!/usr/bin/python
import struct, sys, os
f = open(sys.argv[1])
HEADER_OFFSET = 296
f.seek(HEADER_OFFSET)
try:
while True:
x = int(struct.unpack("<i", f.read(4))[0]) / 256.0
y = int(struct.unpack("<i", f.read(4))[0]) / 256.0
zz = f.read(1)
print '%10.100g %10.100g' % (x, y)
exce... | <commit_before>#!/usr/bin/python
import struct, sys, os
f = open(sys.argv[1])
HEADER_OFFSET = 296
f.seek(HEADER_OFFSET)
try:
while True:
x = int(struct.unpack("<i", f.read(4))[0]) / 256.0
y = int(struct.unpack("<i", f.read(4))[0]) / 256.0
zz = f.read(1)
print '%10g %10g' % (x, ... | #!/usr/bin/python
import struct, sys, os
f = open(sys.argv[1])
HEADER_OFFSET = 296
f.seek(HEADER_OFFSET)
try:
while True:
x = int(struct.unpack("<i", f.read(4))[0]) / 256.0
y = int(struct.unpack("<i", f.read(4))[0]) / 256.0
zz = f.read(1)
print '%10.100g %10.100g' % (x, y)
exce... | #!/usr/bin/python
import struct, sys, os
f = open(sys.argv[1])
HEADER_OFFSET = 296
f.seek(HEADER_OFFSET)
try:
while True:
x = int(struct.unpack("<i", f.read(4))[0]) / 256.0
y = int(struct.unpack("<i", f.read(4))[0]) / 256.0
zz = f.read(1)
print '%10g %10g' % (x, y)
except:
... | <commit_before>#!/usr/bin/python
import struct, sys, os
f = open(sys.argv[1])
HEADER_OFFSET = 296
f.seek(HEADER_OFFSET)
try:
while True:
x = int(struct.unpack("<i", f.read(4))[0]) / 256.0
y = int(struct.unpack("<i", f.read(4))[0]) / 256.0
zz = f.read(1)
print '%10g %10g' % (x, ... |
e3a3f55b0db2a5ed323e23dc0d949378a9871a15 | nex/parsing/general_text_parser.py | nex/parsing/general_text_parser.py | from ..tokens import BuiltToken
from .common_parsing import pg as common_pg
gen_txt_pg = common_pg.copy_to_extend()
@gen_txt_pg.production('general_text : filler LEFT_BRACE BALANCED_TEXT_AND_RIGHT_BRACE')
def general_text(p):
return BuiltToken(type_='general_text', value=p[2].value,
posit... | from ..rply import ParserGenerator
from ..tokens import BuiltToken
term_types = ['SPACE', 'RELAX', 'LEFT_BRACE', 'BALANCED_TEXT_AND_RIGHT_BRACE']
gen_txt_pg = ParserGenerator(term_types, cache_id="general_text")
@gen_txt_pg.production('general_text : filler LEFT_BRACE BALANCED_TEXT_AND_RIGHT_BRACE')
def general_tex... | Duplicate small parts to make general text parser independent and simple | Duplicate small parts to make general text parser independent and simple
| Python | mit | eddiejessup/nex | from ..tokens import BuiltToken
from .common_parsing import pg as common_pg
gen_txt_pg = common_pg.copy_to_extend()
@gen_txt_pg.production('general_text : filler LEFT_BRACE BALANCED_TEXT_AND_RIGHT_BRACE')
def general_text(p):
return BuiltToken(type_='general_text', value=p[2].value,
posit... | from ..rply import ParserGenerator
from ..tokens import BuiltToken
term_types = ['SPACE', 'RELAX', 'LEFT_BRACE', 'BALANCED_TEXT_AND_RIGHT_BRACE']
gen_txt_pg = ParserGenerator(term_types, cache_id="general_text")
@gen_txt_pg.production('general_text : filler LEFT_BRACE BALANCED_TEXT_AND_RIGHT_BRACE')
def general_tex... | <commit_before>from ..tokens import BuiltToken
from .common_parsing import pg as common_pg
gen_txt_pg = common_pg.copy_to_extend()
@gen_txt_pg.production('general_text : filler LEFT_BRACE BALANCED_TEXT_AND_RIGHT_BRACE')
def general_text(p):
return BuiltToken(type_='general_text', value=p[2].value,
... | from ..rply import ParserGenerator
from ..tokens import BuiltToken
term_types = ['SPACE', 'RELAX', 'LEFT_BRACE', 'BALANCED_TEXT_AND_RIGHT_BRACE']
gen_txt_pg = ParserGenerator(term_types, cache_id="general_text")
@gen_txt_pg.production('general_text : filler LEFT_BRACE BALANCED_TEXT_AND_RIGHT_BRACE')
def general_tex... | from ..tokens import BuiltToken
from .common_parsing import pg as common_pg
gen_txt_pg = common_pg.copy_to_extend()
@gen_txt_pg.production('general_text : filler LEFT_BRACE BALANCED_TEXT_AND_RIGHT_BRACE')
def general_text(p):
return BuiltToken(type_='general_text', value=p[2].value,
posit... | <commit_before>from ..tokens import BuiltToken
from .common_parsing import pg as common_pg
gen_txt_pg = common_pg.copy_to_extend()
@gen_txt_pg.production('general_text : filler LEFT_BRACE BALANCED_TEXT_AND_RIGHT_BRACE')
def general_text(p):
return BuiltToken(type_='general_text', value=p[2].value,
... |
c6b8ff0f5c8b67dd6d48ccfe8c82b98d33b979a6 | openfisca_web_api/scripts/serve.py | openfisca_web_api/scripts/serve.py | # -*- coding: utf-8 -*-
import os
import sys
from logging.config import fileConfig
from wsgiref.simple_server import make_server
from paste.deploy import loadapp
hostname = 'localhost'
port = 2000
def main():
conf_file_path = os.path.join(sys.prefix, 'share', 'openfisca', 'openfisca-web-api', 'development-fr... | # -*- coding: utf-8 -*-
import os
import sys
from logging.config import fileConfig
from wsgiref.simple_server import make_server
from paste.deploy import loadapp
hostname = 'localhost'
port = 2000
def main():
conf_file_path = os.path.join(sys.prefix, 'share', 'openfisca', 'openfisca-web-api', 'development-fr... | Manage case where api installed with --editable | Manage case where api installed with --editable
| Python | agpl-3.0 | openfisca/openfisca-web-api,openfisca/openfisca-web-api | # -*- coding: utf-8 -*-
import os
import sys
from logging.config import fileConfig
from wsgiref.simple_server import make_server
from paste.deploy import loadapp
hostname = 'localhost'
port = 2000
def main():
conf_file_path = os.path.join(sys.prefix, 'share', 'openfisca', 'openfisca-web-api', 'development-fr... | # -*- coding: utf-8 -*-
import os
import sys
from logging.config import fileConfig
from wsgiref.simple_server import make_server
from paste.deploy import loadapp
hostname = 'localhost'
port = 2000
def main():
conf_file_path = os.path.join(sys.prefix, 'share', 'openfisca', 'openfisca-web-api', 'development-fr... | <commit_before># -*- coding: utf-8 -*-
import os
import sys
from logging.config import fileConfig
from wsgiref.simple_server import make_server
from paste.deploy import loadapp
hostname = 'localhost'
port = 2000
def main():
conf_file_path = os.path.join(sys.prefix, 'share', 'openfisca', 'openfisca-web-api', ... | # -*- coding: utf-8 -*-
import os
import sys
from logging.config import fileConfig
from wsgiref.simple_server import make_server
from paste.deploy import loadapp
hostname = 'localhost'
port = 2000
def main():
conf_file_path = os.path.join(sys.prefix, 'share', 'openfisca', 'openfisca-web-api', 'development-fr... | # -*- coding: utf-8 -*-
import os
import sys
from logging.config import fileConfig
from wsgiref.simple_server import make_server
from paste.deploy import loadapp
hostname = 'localhost'
port = 2000
def main():
conf_file_path = os.path.join(sys.prefix, 'share', 'openfisca', 'openfisca-web-api', 'development-fr... | <commit_before># -*- coding: utf-8 -*-
import os
import sys
from logging.config import fileConfig
from wsgiref.simple_server import make_server
from paste.deploy import loadapp
hostname = 'localhost'
port = 2000
def main():
conf_file_path = os.path.join(sys.prefix, 'share', 'openfisca', 'openfisca-web-api', ... |
537cf5da8b0328d7e6d745a4ab5456b77702e124 | delivery/services/external_program_service.py | delivery/services/external_program_service.py |
import subprocess
import logging
from delivery.models.execution import ExecutionResult, Execution
log = logging.getLogger(__name__)
class ExternalProgramService(object):
"""
A service for running external programs
"""
@staticmethod
def run(cmd):
"""
Run a process and do not wai... |
from tornado.process import Subprocess
from tornado import gen
from subprocess import PIPE
from delivery.models.execution import ExecutionResult, Execution
class ExternalProgramService(object):
"""
A service for running external programs
"""
@staticmethod
def run(cmd):
"""
Run... | Make ExternalProgramService use async process from tornado | Make ExternalProgramService use async process from tornado
| Python | mit | arteria-project/arteria-delivery |
import subprocess
import logging
from delivery.models.execution import ExecutionResult, Execution
log = logging.getLogger(__name__)
class ExternalProgramService(object):
"""
A service for running external programs
"""
@staticmethod
def run(cmd):
"""
Run a process and do not wai... |
from tornado.process import Subprocess
from tornado import gen
from subprocess import PIPE
from delivery.models.execution import ExecutionResult, Execution
class ExternalProgramService(object):
"""
A service for running external programs
"""
@staticmethod
def run(cmd):
"""
Run... | <commit_before>
import subprocess
import logging
from delivery.models.execution import ExecutionResult, Execution
log = logging.getLogger(__name__)
class ExternalProgramService(object):
"""
A service for running external programs
"""
@staticmethod
def run(cmd):
"""
Run a process... |
from tornado.process import Subprocess
from tornado import gen
from subprocess import PIPE
from delivery.models.execution import ExecutionResult, Execution
class ExternalProgramService(object):
"""
A service for running external programs
"""
@staticmethod
def run(cmd):
"""
Run... |
import subprocess
import logging
from delivery.models.execution import ExecutionResult, Execution
log = logging.getLogger(__name__)
class ExternalProgramService(object):
"""
A service for running external programs
"""
@staticmethod
def run(cmd):
"""
Run a process and do not wai... | <commit_before>
import subprocess
import logging
from delivery.models.execution import ExecutionResult, Execution
log = logging.getLogger(__name__)
class ExternalProgramService(object):
"""
A service for running external programs
"""
@staticmethod
def run(cmd):
"""
Run a process... |
5827c09e3a003f53baa5abe2d2d0fc5d695d4334 | arxiv_vanity/papers/management/commands/delete_all_expired_renders.py | arxiv_vanity/papers/management/commands/delete_all_expired_renders.py | from django.core.management.base import BaseCommand, CommandError
from ...models import Render
class Command(BaseCommand):
help = 'Deletes output of all expired renders'
def handle(self, *args, **options):
for render in Render.objects.expired().iterator():
try:
render.dele... | from django.core.management.base import BaseCommand, CommandError
from ...models import Render
class Command(BaseCommand):
help = 'Deletes output of all expired renders'
def handle(self, *args, **options):
for render in Render.objects.expired().iterator():
try:
render.dele... | Add flush to delete all renders print | Add flush to delete all renders print
| Python | apache-2.0 | arxiv-vanity/arxiv-vanity,arxiv-vanity/arxiv-vanity,arxiv-vanity/arxiv-vanity,arxiv-vanity/arxiv-vanity | from django.core.management.base import BaseCommand, CommandError
from ...models import Render
class Command(BaseCommand):
help = 'Deletes output of all expired renders'
def handle(self, *args, **options):
for render in Render.objects.expired().iterator():
try:
render.dele... | from django.core.management.base import BaseCommand, CommandError
from ...models import Render
class Command(BaseCommand):
help = 'Deletes output of all expired renders'
def handle(self, *args, **options):
for render in Render.objects.expired().iterator():
try:
render.dele... | <commit_before>from django.core.management.base import BaseCommand, CommandError
from ...models import Render
class Command(BaseCommand):
help = 'Deletes output of all expired renders'
def handle(self, *args, **options):
for render in Render.objects.expired().iterator():
try:
... | from django.core.management.base import BaseCommand, CommandError
from ...models import Render
class Command(BaseCommand):
help = 'Deletes output of all expired renders'
def handle(self, *args, **options):
for render in Render.objects.expired().iterator():
try:
render.dele... | from django.core.management.base import BaseCommand, CommandError
from ...models import Render
class Command(BaseCommand):
help = 'Deletes output of all expired renders'
def handle(self, *args, **options):
for render in Render.objects.expired().iterator():
try:
render.dele... | <commit_before>from django.core.management.base import BaseCommand, CommandError
from ...models import Render
class Command(BaseCommand):
help = 'Deletes output of all expired renders'
def handle(self, *args, **options):
for render in Render.objects.expired().iterator():
try:
... |
38a6486cb4909b552181482bbf3360fd51168cd1 | pywikibot/echo.py | pywikibot/echo.py | # -*- coding: utf-8 -*-
"""Classes and functions for working with the Echo extension."""
from __future__ import absolute_import, unicode_literals
import pywikibot
class Notification(object):
"""A notification issued by the Echo extension."""
def __init__(self, site):
"""Construct an empty Notifica... | # -*- coding: utf-8 -*-
"""Classes and functions for working with the Echo extension."""
from __future__ import absolute_import, unicode_literals
import pywikibot
class Notification(object):
"""A notification issued by the Echo extension."""
def __init__(self, site):
"""Construct an empty Notifica... | Add revid to Notification object | Add revid to Notification object
Since most edit-related notifications include revid attributes,
we should include the revids in the Notification objects as we're
building them (if they exist).
Change-Id: Ifdb98e7c79729a1c2f7a5c4c4366e28071a48239
| Python | mit | wikimedia/pywikibot-core,jayvdb/pywikibot-core,npdoty/pywikibot,PersianWikipedia/pywikibot-core,hasteur/g13bot_tools_new,wikimedia/pywikibot-core,happy5214/pywikibot-core,happy5214/pywikibot-core,npdoty/pywikibot,Darkdadaah/pywikibot-core,magul/pywikibot-core,jayvdb/pywikibot-core,hasteur/g13bot_tools_new,magul/pywikib... | # -*- coding: utf-8 -*-
"""Classes and functions for working with the Echo extension."""
from __future__ import absolute_import, unicode_literals
import pywikibot
class Notification(object):
"""A notification issued by the Echo extension."""
def __init__(self, site):
"""Construct an empty Notifica... | # -*- coding: utf-8 -*-
"""Classes and functions for working with the Echo extension."""
from __future__ import absolute_import, unicode_literals
import pywikibot
class Notification(object):
"""A notification issued by the Echo extension."""
def __init__(self, site):
"""Construct an empty Notifica... | <commit_before># -*- coding: utf-8 -*-
"""Classes and functions for working with the Echo extension."""
from __future__ import absolute_import, unicode_literals
import pywikibot
class Notification(object):
"""A notification issued by the Echo extension."""
def __init__(self, site):
"""Construct an... | # -*- coding: utf-8 -*-
"""Classes and functions for working with the Echo extension."""
from __future__ import absolute_import, unicode_literals
import pywikibot
class Notification(object):
"""A notification issued by the Echo extension."""
def __init__(self, site):
"""Construct an empty Notifica... | # -*- coding: utf-8 -*-
"""Classes and functions for working with the Echo extension."""
from __future__ import absolute_import, unicode_literals
import pywikibot
class Notification(object):
"""A notification issued by the Echo extension."""
def __init__(self, site):
"""Construct an empty Notifica... | <commit_before># -*- coding: utf-8 -*-
"""Classes and functions for working with the Echo extension."""
from __future__ import absolute_import, unicode_literals
import pywikibot
class Notification(object):
"""A notification issued by the Echo extension."""
def __init__(self, site):
"""Construct an... |
16ad5a3f17fdb96f2660019fabbd7bb787ae4ffb | pywsd/baseline.py | pywsd/baseline.py | #!/usr/bin/env python -*- coding: utf-8 -*-
#
# Python Word Sense Disambiguation (pyWSD): Baseline WSD
#
# Copyright (C) 2014-2020 alvations
# URL:
# For license information, see LICENSE.md
import random
custom_random = random.Random(0)
def random_sense(ambiguous_word, pos=None):
""" Returns a random sense. """
... | #!/usr/bin/env python -*- coding: utf-8 -*-
#
# Python Word Sense Disambiguation (pyWSD): Baseline WSD
#
# Copyright (C) 2014-2020 alvations
# URL:
# For license information, see LICENSE.md
import random
custom_random = random.Random(0)
def random_sense(ambiguous_word, pos=None):
""" Returns a random sense. """
... | Add pos for max_lemma_count also | Add pos for max_lemma_count also
| Python | mit | alvations/pywsd,alvations/pywsd | #!/usr/bin/env python -*- coding: utf-8 -*-
#
# Python Word Sense Disambiguation (pyWSD): Baseline WSD
#
# Copyright (C) 2014-2020 alvations
# URL:
# For license information, see LICENSE.md
import random
custom_random = random.Random(0)
def random_sense(ambiguous_word, pos=None):
""" Returns a random sense. """
... | #!/usr/bin/env python -*- coding: utf-8 -*-
#
# Python Word Sense Disambiguation (pyWSD): Baseline WSD
#
# Copyright (C) 2014-2020 alvations
# URL:
# For license information, see LICENSE.md
import random
custom_random = random.Random(0)
def random_sense(ambiguous_word, pos=None):
""" Returns a random sense. """
... | <commit_before>#!/usr/bin/env python -*- coding: utf-8 -*-
#
# Python Word Sense Disambiguation (pyWSD): Baseline WSD
#
# Copyright (C) 2014-2020 alvations
# URL:
# For license information, see LICENSE.md
import random
custom_random = random.Random(0)
def random_sense(ambiguous_word, pos=None):
""" Returns a rand... | #!/usr/bin/env python -*- coding: utf-8 -*-
#
# Python Word Sense Disambiguation (pyWSD): Baseline WSD
#
# Copyright (C) 2014-2020 alvations
# URL:
# For license information, see LICENSE.md
import random
custom_random = random.Random(0)
def random_sense(ambiguous_word, pos=None):
""" Returns a random sense. """
... | #!/usr/bin/env python -*- coding: utf-8 -*-
#
# Python Word Sense Disambiguation (pyWSD): Baseline WSD
#
# Copyright (C) 2014-2020 alvations
# URL:
# For license information, see LICENSE.md
import random
custom_random = random.Random(0)
def random_sense(ambiguous_word, pos=None):
""" Returns a random sense. """
... | <commit_before>#!/usr/bin/env python -*- coding: utf-8 -*-
#
# Python Word Sense Disambiguation (pyWSD): Baseline WSD
#
# Copyright (C) 2014-2020 alvations
# URL:
# For license information, see LICENSE.md
import random
custom_random = random.Random(0)
def random_sense(ambiguous_word, pos=None):
""" Returns a rand... |
bfedd0eb87ad5bdf937a1f5f3e143a8e538ce86f | rafem/__init__.py | rafem/__init__.py | """River Avulsion Module."""
from .riverbmi import BmiRiverModule
from .rivermodule import RiverModule
__all__ = ['BmiRiverModule', 'RiverModule']
| """River Avulsion Module."""
from .riverbmi import BmiRiverModule
from .rivermodule import rivermodule
__all__ = ['BmiRiverModule', 'rivermodule']
| Rename package from avulsion to rafem. | Rename package from avulsion to rafem.
| Python | mit | katmratliff/avulsion-bmi,mcflugen/avulsion-bmi | """River Avulsion Module."""
from .riverbmi import BmiRiverModule
from .rivermodule import RiverModule
__all__ = ['BmiRiverModule', 'RiverModule']
Rename package from avulsion to rafem. | """River Avulsion Module."""
from .riverbmi import BmiRiverModule
from .rivermodule import rivermodule
__all__ = ['BmiRiverModule', 'rivermodule']
| <commit_before>"""River Avulsion Module."""
from .riverbmi import BmiRiverModule
from .rivermodule import RiverModule
__all__ = ['BmiRiverModule', 'RiverModule']
<commit_msg>Rename package from avulsion to rafem.<commit_after> | """River Avulsion Module."""
from .riverbmi import BmiRiverModule
from .rivermodule import rivermodule
__all__ = ['BmiRiverModule', 'rivermodule']
| """River Avulsion Module."""
from .riverbmi import BmiRiverModule
from .rivermodule import RiverModule
__all__ = ['BmiRiverModule', 'RiverModule']
Rename package from avulsion to rafem."""River Avulsion Module."""
from .riverbmi import BmiRiverModule
from .rivermodule import rivermodule
__all__ = ['BmiRiverModule... | <commit_before>"""River Avulsion Module."""
from .riverbmi import BmiRiverModule
from .rivermodule import RiverModule
__all__ = ['BmiRiverModule', 'RiverModule']
<commit_msg>Rename package from avulsion to rafem.<commit_after>"""River Avulsion Module."""
from .riverbmi import BmiRiverModule
from .rivermodule import... |
dfbe71a6d6a1e8591b1a6d7d5baeda20f2e40c47 | indra/explanation/model_checker/__init__.py | indra/explanation/model_checker/__init__.py | from .model_checker import ModelChecker, PathResult, PathMetric, get_path_iter
from .pysb import PysbModelChecker
from .signed_graph import SignedGraphModelChecker
from .unsigned_graph import UnsignedGraphModelChecker
from .pybel import PybelModelChecker
| from .model_checker import ModelChecker, PathResult, PathMetric, get_path_iter
from .pysb import PysbModelChecker
from .signed_graph import SignedGraphModelChecker
from .unsigned_graph import UnsignedGraphModelChecker
from .pybel import PybelModelChecker
from .model_checker import signed_edges_to_signed_nodes, prune_si... | Make function top level importable | Make function top level importable
| Python | bsd-2-clause | bgyori/indra,johnbachman/belpy,sorgerlab/belpy,johnbachman/indra,sorgerlab/belpy,sorgerlab/indra,sorgerlab/indra,bgyori/indra,johnbachman/indra,johnbachman/belpy,johnbachman/indra,bgyori/indra,sorgerlab/indra,sorgerlab/belpy,johnbachman/belpy | from .model_checker import ModelChecker, PathResult, PathMetric, get_path_iter
from .pysb import PysbModelChecker
from .signed_graph import SignedGraphModelChecker
from .unsigned_graph import UnsignedGraphModelChecker
from .pybel import PybelModelChecker
Make function top level importable | from .model_checker import ModelChecker, PathResult, PathMetric, get_path_iter
from .pysb import PysbModelChecker
from .signed_graph import SignedGraphModelChecker
from .unsigned_graph import UnsignedGraphModelChecker
from .pybel import PybelModelChecker
from .model_checker import signed_edges_to_signed_nodes, prune_si... | <commit_before>from .model_checker import ModelChecker, PathResult, PathMetric, get_path_iter
from .pysb import PysbModelChecker
from .signed_graph import SignedGraphModelChecker
from .unsigned_graph import UnsignedGraphModelChecker
from .pybel import PybelModelChecker
<commit_msg>Make function top level importable<com... | from .model_checker import ModelChecker, PathResult, PathMetric, get_path_iter
from .pysb import PysbModelChecker
from .signed_graph import SignedGraphModelChecker
from .unsigned_graph import UnsignedGraphModelChecker
from .pybel import PybelModelChecker
from .model_checker import signed_edges_to_signed_nodes, prune_si... | from .model_checker import ModelChecker, PathResult, PathMetric, get_path_iter
from .pysb import PysbModelChecker
from .signed_graph import SignedGraphModelChecker
from .unsigned_graph import UnsignedGraphModelChecker
from .pybel import PybelModelChecker
Make function top level importablefrom .model_checker import Mode... | <commit_before>from .model_checker import ModelChecker, PathResult, PathMetric, get_path_iter
from .pysb import PysbModelChecker
from .signed_graph import SignedGraphModelChecker
from .unsigned_graph import UnsignedGraphModelChecker
from .pybel import PybelModelChecker
<commit_msg>Make function top level importable<com... |
d0e5c03fe37d89747e870c57312701df0e2949c0 | ulp/urlextract.py | ulp/urlextract.py | # coding=utf-8
import re
import os
import sys
# Regex for matching URLs
# See https://mathiasbynens.be/demo/url-regex
url_regex = re.compile(r"((https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?)")
ansi_escape_regex = re.compile(r"(\x9B|\x1B\[)[0-?]*[ -/]*[@-~]", re.IGNORECASE)
INPUT_FILE = os.path.join(os.getenv('HOM... | # coding=utf-8
import re
import os
import sys
# Regex for matching URLs
# See https://mathiasbynens.be/demo/url-regex
url_regex = re.compile(r"((https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?)")
ansi_escape_regex = re.compile(r"(\x9B|\x1B\[)[0-?]*[ -/]*[@-~]", re.IGNORECASE)
INPUT_FILE = os.path.join(os.getenv('HOM... | Move ansi_escape to generic function | Move ansi_escape to generic function
| Python | mit | victal/ulp,victal/ulp | # coding=utf-8
import re
import os
import sys
# Regex for matching URLs
# See https://mathiasbynens.be/demo/url-regex
url_regex = re.compile(r"((https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?)")
ansi_escape_regex = re.compile(r"(\x9B|\x1B\[)[0-?]*[ -/]*[@-~]", re.IGNORECASE)
INPUT_FILE = os.path.join(os.getenv('HOM... | # coding=utf-8
import re
import os
import sys
# Regex for matching URLs
# See https://mathiasbynens.be/demo/url-regex
url_regex = re.compile(r"((https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?)")
ansi_escape_regex = re.compile(r"(\x9B|\x1B\[)[0-?]*[ -/]*[@-~]", re.IGNORECASE)
INPUT_FILE = os.path.join(os.getenv('HOM... | <commit_before># coding=utf-8
import re
import os
import sys
# Regex for matching URLs
# See https://mathiasbynens.be/demo/url-regex
url_regex = re.compile(r"((https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?)")
ansi_escape_regex = re.compile(r"(\x9B|\x1B\[)[0-?]*[ -/]*[@-~]", re.IGNORECASE)
INPUT_FILE = os.path.join... | # coding=utf-8
import re
import os
import sys
# Regex for matching URLs
# See https://mathiasbynens.be/demo/url-regex
url_regex = re.compile(r"((https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?)")
ansi_escape_regex = re.compile(r"(\x9B|\x1B\[)[0-?]*[ -/]*[@-~]", re.IGNORECASE)
INPUT_FILE = os.path.join(os.getenv('HOM... | # coding=utf-8
import re
import os
import sys
# Regex for matching URLs
# See https://mathiasbynens.be/demo/url-regex
url_regex = re.compile(r"((https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?)")
ansi_escape_regex = re.compile(r"(\x9B|\x1B\[)[0-?]*[ -/]*[@-~]", re.IGNORECASE)
INPUT_FILE = os.path.join(os.getenv('HOM... | <commit_before># coding=utf-8
import re
import os
import sys
# Regex for matching URLs
# See https://mathiasbynens.be/demo/url-regex
url_regex = re.compile(r"((https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?)")
ansi_escape_regex = re.compile(r"(\x9B|\x1B\[)[0-?]*[ -/]*[@-~]", re.IGNORECASE)
INPUT_FILE = os.path.join... |
b4f4e870877e4eae8e7dbf2dd9c961e5eec6980d | devtools/ci/push-docs-to-s3.py | devtools/ci/push-docs-to-s3.py | import os
import pip
import tempfile
import subprocess
import openpathsampling.version
BUCKET_NAME = 'openpathsampling.org'
if not openpathsampling.version.release:
PREFIX = 'latest'
else:
PREFIX = openpathsampling.version.short_version
if not any(d.project_name == 's3cmd' for d in pip.get_installed_distribu... | import os
import pip
import tempfile
import subprocess
import openpathsampling.version
BUCKET_NAME = 'openpathsampling.org'
if not openpathsampling.version.release:
PREFIX = 'latest'
else:
PREFIX = openpathsampling.version.short_version
if not any(d.project_name == 's3cmd' for d in pip.get_installed_distribu... | Add MIME-handling options to s3cmd | Add MIME-handling options to s3cmd
| Python | mit | openpathsampling/openpathsampling,choderalab/openpathsampling,choderalab/openpathsampling,dwhswenson/openpathsampling,openpathsampling/openpathsampling,choderalab/openpathsampling,dwhswenson/openpathsampling,dwhswenson/openpathsampling,openpathsampling/openpathsampling,dwhswenson/openpathsampling,openpathsampling/openp... | import os
import pip
import tempfile
import subprocess
import openpathsampling.version
BUCKET_NAME = 'openpathsampling.org'
if not openpathsampling.version.release:
PREFIX = 'latest'
else:
PREFIX = openpathsampling.version.short_version
if not any(d.project_name == 's3cmd' for d in pip.get_installed_distribu... | import os
import pip
import tempfile
import subprocess
import openpathsampling.version
BUCKET_NAME = 'openpathsampling.org'
if not openpathsampling.version.release:
PREFIX = 'latest'
else:
PREFIX = openpathsampling.version.short_version
if not any(d.project_name == 's3cmd' for d in pip.get_installed_distribu... | <commit_before>import os
import pip
import tempfile
import subprocess
import openpathsampling.version
BUCKET_NAME = 'openpathsampling.org'
if not openpathsampling.version.release:
PREFIX = 'latest'
else:
PREFIX = openpathsampling.version.short_version
if not any(d.project_name == 's3cmd' for d in pip.get_ins... | import os
import pip
import tempfile
import subprocess
import openpathsampling.version
BUCKET_NAME = 'openpathsampling.org'
if not openpathsampling.version.release:
PREFIX = 'latest'
else:
PREFIX = openpathsampling.version.short_version
if not any(d.project_name == 's3cmd' for d in pip.get_installed_distribu... | import os
import pip
import tempfile
import subprocess
import openpathsampling.version
BUCKET_NAME = 'openpathsampling.org'
if not openpathsampling.version.release:
PREFIX = 'latest'
else:
PREFIX = openpathsampling.version.short_version
if not any(d.project_name == 's3cmd' for d in pip.get_installed_distribu... | <commit_before>import os
import pip
import tempfile
import subprocess
import openpathsampling.version
BUCKET_NAME = 'openpathsampling.org'
if not openpathsampling.version.release:
PREFIX = 'latest'
else:
PREFIX = openpathsampling.version.short_version
if not any(d.project_name == 's3cmd' for d in pip.get_ins... |
40491b243beca358e81184857a155fb4d2d52157 | drogher/shippers/base.py | drogher/shippers/base.py | import re
class Shipper(object):
barcode = None
barcode_pattern = None
shipper = None
def __init__(self, barcode):
self.barcode = barcode
@property
def is_valid(self):
if self.matches_barcode and self.valid_checksum:
return True
return False
@property... | import re
class Shipper(object):
barcode = None
barcode_pattern = None
shipper = None
def __init__(self, barcode):
self.barcode = barcode
def __repr__(self):
return "%s('%s')" % ('shippers.' + self.__class__.__name__, self.barcode)
@property
def is_valid(self):
i... | Add a more useful representation of Shipper objects | Add a more useful representation of Shipper objects
| Python | bsd-3-clause | jbittel/drogher | import re
class Shipper(object):
barcode = None
barcode_pattern = None
shipper = None
def __init__(self, barcode):
self.barcode = barcode
@property
def is_valid(self):
if self.matches_barcode and self.valid_checksum:
return True
return False
@property... | import re
class Shipper(object):
barcode = None
barcode_pattern = None
shipper = None
def __init__(self, barcode):
self.barcode = barcode
def __repr__(self):
return "%s('%s')" % ('shippers.' + self.__class__.__name__, self.barcode)
@property
def is_valid(self):
i... | <commit_before>import re
class Shipper(object):
barcode = None
barcode_pattern = None
shipper = None
def __init__(self, barcode):
self.barcode = barcode
@property
def is_valid(self):
if self.matches_barcode and self.valid_checksum:
return True
return False... | import re
class Shipper(object):
barcode = None
barcode_pattern = None
shipper = None
def __init__(self, barcode):
self.barcode = barcode
def __repr__(self):
return "%s('%s')" % ('shippers.' + self.__class__.__name__, self.barcode)
@property
def is_valid(self):
i... | import re
class Shipper(object):
barcode = None
barcode_pattern = None
shipper = None
def __init__(self, barcode):
self.barcode = barcode
@property
def is_valid(self):
if self.matches_barcode and self.valid_checksum:
return True
return False
@property... | <commit_before>import re
class Shipper(object):
barcode = None
barcode_pattern = None
shipper = None
def __init__(self, barcode):
self.barcode = barcode
@property
def is_valid(self):
if self.matches_barcode and self.valid_checksum:
return True
return False... |
9f363aee856b46570707af844092126dfa6ecf1e | instrument-classification/predict_webapp.py | instrument-classification/predict_webapp.py | from flask import Flask, redirect, render_template, request
from gevent.wsgi import WSGIServer
from predict import InstrumentClassifier
app = Flask(__name__)
app.config['MAX_CONTENT_LENGTH'] = 1 * 2**20
model = InstrumentClassifier(model_dir='data/working/single-notes-2000/model')
@app.route('/')
def hello():
r... | from flask import Flask, redirect, render_template, request
from gevent.wsgi import WSGIServer
from predict import InstrumentClassifier
from leaderboard import LeaderBoard
app = Flask(__name__)
app.config['MAX_CONTENT_LENGTH'] = 1 * 2**20
model_dir = 'data/working/single-notes-2000/models'
model_id = LeaderBoard(mod... | Use the best model from the leader board in the prediction web app. | Use the best model from the leader board in the prediction web app.
| Python | mit | bzamecnik/ml,bzamecnik/ml-playground,bzamecnik/ml,bzamecnik/ml-playground,bzamecnik/ml | from flask import Flask, redirect, render_template, request
from gevent.wsgi import WSGIServer
from predict import InstrumentClassifier
app = Flask(__name__)
app.config['MAX_CONTENT_LENGTH'] = 1 * 2**20
model = InstrumentClassifier(model_dir='data/working/single-notes-2000/model')
@app.route('/')
def hello():
r... | from flask import Flask, redirect, render_template, request
from gevent.wsgi import WSGIServer
from predict import InstrumentClassifier
from leaderboard import LeaderBoard
app = Flask(__name__)
app.config['MAX_CONTENT_LENGTH'] = 1 * 2**20
model_dir = 'data/working/single-notes-2000/models'
model_id = LeaderBoard(mod... | <commit_before>from flask import Flask, redirect, render_template, request
from gevent.wsgi import WSGIServer
from predict import InstrumentClassifier
app = Flask(__name__)
app.config['MAX_CONTENT_LENGTH'] = 1 * 2**20
model = InstrumentClassifier(model_dir='data/working/single-notes-2000/model')
@app.route('/')
def... | from flask import Flask, redirect, render_template, request
from gevent.wsgi import WSGIServer
from predict import InstrumentClassifier
from leaderboard import LeaderBoard
app = Flask(__name__)
app.config['MAX_CONTENT_LENGTH'] = 1 * 2**20
model_dir = 'data/working/single-notes-2000/models'
model_id = LeaderBoard(mod... | from flask import Flask, redirect, render_template, request
from gevent.wsgi import WSGIServer
from predict import InstrumentClassifier
app = Flask(__name__)
app.config['MAX_CONTENT_LENGTH'] = 1 * 2**20
model = InstrumentClassifier(model_dir='data/working/single-notes-2000/model')
@app.route('/')
def hello():
r... | <commit_before>from flask import Flask, redirect, render_template, request
from gevent.wsgi import WSGIServer
from predict import InstrumentClassifier
app = Flask(__name__)
app.config['MAX_CONTENT_LENGTH'] = 1 * 2**20
model = InstrumentClassifier(model_dir='data/working/single-notes-2000/model')
@app.route('/')
def... |
25b56a4bb7c5937671a509aa92b9fd28d972bff9 | fabfile.py | fabfile.py | from fabric.api import *
"""
Overview
========
This fabric file automates the process of pip packaging and
deploying your new pip package to our private pip repository.
Requirements
------------
- Must have fabric installed via `pip install fabric`
- Must have your setup.py working ... | from fabric.api import *
"""
Overview
========
This fabric file automates the process of pip packaging and
deploying your new pip package to our private pip repository.
Requirements
------------
- Must have fabric installed via `pip install fabric`
- Must have your setup.py working ... | Use pip2pi, not dir2pi for deploys | Use pip2pi, not dir2pi for deploys
| Python | mit | istresearch/traptor,istresearch/traptor | from fabric.api import *
"""
Overview
========
This fabric file automates the process of pip packaging and
deploying your new pip package to our private pip repository.
Requirements
------------
- Must have fabric installed via `pip install fabric`
- Must have your setup.py working ... | from fabric.api import *
"""
Overview
========
This fabric file automates the process of pip packaging and
deploying your new pip package to our private pip repository.
Requirements
------------
- Must have fabric installed via `pip install fabric`
- Must have your setup.py working ... | <commit_before>from fabric.api import *
"""
Overview
========
This fabric file automates the process of pip packaging and
deploying your new pip package to our private pip repository.
Requirements
------------
- Must have fabric installed via `pip install fabric`
- Must have your se... | from fabric.api import *
"""
Overview
========
This fabric file automates the process of pip packaging and
deploying your new pip package to our private pip repository.
Requirements
------------
- Must have fabric installed via `pip install fabric`
- Must have your setup.py working ... | from fabric.api import *
"""
Overview
========
This fabric file automates the process of pip packaging and
deploying your new pip package to our private pip repository.
Requirements
------------
- Must have fabric installed via `pip install fabric`
- Must have your setup.py working ... | <commit_before>from fabric.api import *
"""
Overview
========
This fabric file automates the process of pip packaging and
deploying your new pip package to our private pip repository.
Requirements
------------
- Must have fabric installed via `pip install fabric`
- Must have your se... |
5a44392b810800c4440b04aa92a4614e45c12e86 | mla_game/apps/transcript/management/commands/fake_game_one_gameplay.py | mla_game/apps/transcript/management/commands/fake_game_one_gameplay.py | import random
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from mla_game.apps.accounts.models import Profile
from ...models import (
Transcript, TranscriptPhraseDownvote
)
class Command(BaseCommand):
help = 'Creates random votes for all phrases in a random... | import random
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from mla_game.apps.accounts.models import Profile
from ...models import (
Transcript, TranscriptPhraseDownvote
)
class Command(BaseCommand):
help = 'Creates random votes for all phrases in a random... | Fix fake game one script | Fix fake game one script
| Python | mit | WGBH/FixIt,WGBH/FixIt,WGBH/FixIt | import random
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from mla_game.apps.accounts.models import Profile
from ...models import (
Transcript, TranscriptPhraseDownvote
)
class Command(BaseCommand):
help = 'Creates random votes for all phrases in a random... | import random
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from mla_game.apps.accounts.models import Profile
from ...models import (
Transcript, TranscriptPhraseDownvote
)
class Command(BaseCommand):
help = 'Creates random votes for all phrases in a random... | <commit_before>import random
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from mla_game.apps.accounts.models import Profile
from ...models import (
Transcript, TranscriptPhraseDownvote
)
class Command(BaseCommand):
help = 'Creates random votes for all phra... | import random
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from mla_game.apps.accounts.models import Profile
from ...models import (
Transcript, TranscriptPhraseDownvote
)
class Command(BaseCommand):
help = 'Creates random votes for all phrases in a random... | import random
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from mla_game.apps.accounts.models import Profile
from ...models import (
Transcript, TranscriptPhraseDownvote
)
class Command(BaseCommand):
help = 'Creates random votes for all phrases in a random... | <commit_before>import random
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from mla_game.apps.accounts.models import Profile
from ...models import (
Transcript, TranscriptPhraseDownvote
)
class Command(BaseCommand):
help = 'Creates random votes for all phra... |
a595e75968fa26a49b3d08661b9a0e3bb192929e | kokki/cookbooks/cloudera/recipes/default.py | kokki/cookbooks/cloudera/recipes/default.py |
from kokki import *
apt_list_path = '/etc/apt/sources.list.d/cloudera.list'
apt = (
"deb http://archive.cloudera.com/debian {distro}-cdh3 contrib\n"
"deb-src http://archive.cloudera.com/debian {distro}-cdh3 contrib\n"
).format(distro=env.system.lsb['codename'])
Execute("apt-get update", action="nothing")
Ex... |
from kokki import *
env.include_recipe("java.jre")
apt_list_path = '/etc/apt/sources.list.d/cloudera.list'
apt = (
"deb http://archive.cloudera.com/debian {distro}-cdh3 contrib\n"
"deb-src http://archive.cloudera.com/debian {distro}-cdh3 contrib\n"
).format(distro=env.system.lsb['codename'])
Execute("apt-ge... | Install sun java when using cloudera | Install sun java when using cloudera
| Python | bsd-3-clause | samuel/kokki |
from kokki import *
apt_list_path = '/etc/apt/sources.list.d/cloudera.list'
apt = (
"deb http://archive.cloudera.com/debian {distro}-cdh3 contrib\n"
"deb-src http://archive.cloudera.com/debian {distro}-cdh3 contrib\n"
).format(distro=env.system.lsb['codename'])
Execute("apt-get update", action="nothing")
Ex... |
from kokki import *
env.include_recipe("java.jre")
apt_list_path = '/etc/apt/sources.list.d/cloudera.list'
apt = (
"deb http://archive.cloudera.com/debian {distro}-cdh3 contrib\n"
"deb-src http://archive.cloudera.com/debian {distro}-cdh3 contrib\n"
).format(distro=env.system.lsb['codename'])
Execute("apt-ge... | <commit_before>
from kokki import *
apt_list_path = '/etc/apt/sources.list.d/cloudera.list'
apt = (
"deb http://archive.cloudera.com/debian {distro}-cdh3 contrib\n"
"deb-src http://archive.cloudera.com/debian {distro}-cdh3 contrib\n"
).format(distro=env.system.lsb['codename'])
Execute("apt-get update", action... |
from kokki import *
env.include_recipe("java.jre")
apt_list_path = '/etc/apt/sources.list.d/cloudera.list'
apt = (
"deb http://archive.cloudera.com/debian {distro}-cdh3 contrib\n"
"deb-src http://archive.cloudera.com/debian {distro}-cdh3 contrib\n"
).format(distro=env.system.lsb['codename'])
Execute("apt-ge... |
from kokki import *
apt_list_path = '/etc/apt/sources.list.d/cloudera.list'
apt = (
"deb http://archive.cloudera.com/debian {distro}-cdh3 contrib\n"
"deb-src http://archive.cloudera.com/debian {distro}-cdh3 contrib\n"
).format(distro=env.system.lsb['codename'])
Execute("apt-get update", action="nothing")
Ex... | <commit_before>
from kokki import *
apt_list_path = '/etc/apt/sources.list.d/cloudera.list'
apt = (
"deb http://archive.cloudera.com/debian {distro}-cdh3 contrib\n"
"deb-src http://archive.cloudera.com/debian {distro}-cdh3 contrib\n"
).format(distro=env.system.lsb['codename'])
Execute("apt-get update", action... |
0b69f5882f251162e7898b9eadaa6874b76215d7 | example_config.py | example_config.py | """
File to easily switch between configurations between production and
development, etc.
"""
import os
# You must set each of these in your heroku environment with the heroku
# config:set command. See README.md for more information.
HEROKU_ENV_REQUIREMENTS = ('HEROKU', 'SECRET_KEY', 'GITHUB_CLIENT_ID',
... | """
File to easily switch between configurations between production and
development, etc.
"""
import os
# You must set each of these in your heroku environment with the heroku
# config:set command. See README.md for more information.
HEROKU_ENV_REQUIREMENTS = ('HEROKU', 'SECRET_KEY', 'GITHUB_CLIENT_ID',
... | Add new environment variable so we can create articles with different committer and author | Add new environment variable so we can create articles with different committer and author
| Python | agpl-3.0 | pluralsight/guides-cms,paulocheque/guides-cms,paulocheque/guides-cms,pluralsight/guides-cms,paulocheque/guides-cms,pluralsight/guides-cms | """
File to easily switch between configurations between production and
development, etc.
"""
import os
# You must set each of these in your heroku environment with the heroku
# config:set command. See README.md for more information.
HEROKU_ENV_REQUIREMENTS = ('HEROKU', 'SECRET_KEY', 'GITHUB_CLIENT_ID',
... | """
File to easily switch between configurations between production and
development, etc.
"""
import os
# You must set each of these in your heroku environment with the heroku
# config:set command. See README.md for more information.
HEROKU_ENV_REQUIREMENTS = ('HEROKU', 'SECRET_KEY', 'GITHUB_CLIENT_ID',
... | <commit_before>"""
File to easily switch between configurations between production and
development, etc.
"""
import os
# You must set each of these in your heroku environment with the heroku
# config:set command. See README.md for more information.
HEROKU_ENV_REQUIREMENTS = ('HEROKU', 'SECRET_KEY', 'GITHUB_CLIENT_ID... | """
File to easily switch between configurations between production and
development, etc.
"""
import os
# You must set each of these in your heroku environment with the heroku
# config:set command. See README.md for more information.
HEROKU_ENV_REQUIREMENTS = ('HEROKU', 'SECRET_KEY', 'GITHUB_CLIENT_ID',
... | """
File to easily switch between configurations between production and
development, etc.
"""
import os
# You must set each of these in your heroku environment with the heroku
# config:set command. See README.md for more information.
HEROKU_ENV_REQUIREMENTS = ('HEROKU', 'SECRET_KEY', 'GITHUB_CLIENT_ID',
... | <commit_before>"""
File to easily switch between configurations between production and
development, etc.
"""
import os
# You must set each of these in your heroku environment with the heroku
# config:set command. See README.md for more information.
HEROKU_ENV_REQUIREMENTS = ('HEROKU', 'SECRET_KEY', 'GITHUB_CLIENT_ID... |
700912cc3db69cfd99e33b715dcba7b6717aa225 | apps/bluebottle_utils/models.py | apps/bluebottle_utils/models.py | from django.db import models
from django_countries import CountryField
class Address(models.Model):
"""
A postal address.
"""
address_line1 = models.CharField(max_length=100, blank=True)
address_line2 = models.CharField(max_length=100, blank=True)
city = models.CharField(max_length=100, blank... | from django.db import models
from django_countries import CountryField
class Address(models.Model):
"""
A postal address.
"""
line1 = models.CharField(max_length=100, blank=True)
line2 = models.CharField(max_length=100, blank=True)
city = models.CharField(max_length=100, blank=True)
state ... | Remove the address_ prefix from line1 and line2 in the Address model. | Remove the address_ prefix from line1 and line2 in the Address model.
The address_ prefix is redundant now that we have an Address model.
| Python | bsd-3-clause | onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site | from django.db import models
from django_countries import CountryField
class Address(models.Model):
"""
A postal address.
"""
address_line1 = models.CharField(max_length=100, blank=True)
address_line2 = models.CharField(max_length=100, blank=True)
city = models.CharField(max_length=100, blank... | from django.db import models
from django_countries import CountryField
class Address(models.Model):
"""
A postal address.
"""
line1 = models.CharField(max_length=100, blank=True)
line2 = models.CharField(max_length=100, blank=True)
city = models.CharField(max_length=100, blank=True)
state ... | <commit_before>from django.db import models
from django_countries import CountryField
class Address(models.Model):
"""
A postal address.
"""
address_line1 = models.CharField(max_length=100, blank=True)
address_line2 = models.CharField(max_length=100, blank=True)
city = models.CharField(max_le... | from django.db import models
from django_countries import CountryField
class Address(models.Model):
"""
A postal address.
"""
line1 = models.CharField(max_length=100, blank=True)
line2 = models.CharField(max_length=100, blank=True)
city = models.CharField(max_length=100, blank=True)
state ... | from django.db import models
from django_countries import CountryField
class Address(models.Model):
"""
A postal address.
"""
address_line1 = models.CharField(max_length=100, blank=True)
address_line2 = models.CharField(max_length=100, blank=True)
city = models.CharField(max_length=100, blank... | <commit_before>from django.db import models
from django_countries import CountryField
class Address(models.Model):
"""
A postal address.
"""
address_line1 = models.CharField(max_length=100, blank=True)
address_line2 = models.CharField(max_length=100, blank=True)
city = models.CharField(max_le... |
efaa172668b8961734fa8a10650dc3191b4a7348 | website/project/metadata/authorizers/__init__.py | website/project/metadata/authorizers/__init__.py | import json
import os
import logging
logger = logging.getLogger(__name__)
HERE = os.path.dirname(os.path.realpath(__file__))
groups = json.load(open('{0}/defaults.json'.format(HERE)))
try:
fp = open('{0}/local.json'.format(HERE))
except IOError:
logger.info('No local.json found to populate lists of DraftRegi... | import json
import os
import logging
logger = logging.getLogger(__name__)
HERE = os.path.dirname(os.path.realpath(__file__))
groups = json.load(open('{0}/defaults.json'.format(HERE)))
fp = None
try:
fp = open('{0}/local.json'.format(HERE))
except IOError:
logger.info('No local.json found to populate lists of... | Allow local.json to be missing | Allow local.json to be missing
| Python | apache-2.0 | kch8qx/osf.io,acshi/osf.io,binoculars/osf.io,abought/osf.io,mluo613/osf.io,cslzchen/osf.io,chrisseto/osf.io,ticklemepierce/osf.io,cslzchen/osf.io,brianjgeiger/osf.io,kwierman/osf.io,brandonPurvis/osf.io,icereval/osf.io,TomBaxter/osf.io,doublebits/osf.io,mluke93/osf.io,wearpants/osf.io,alexschiller/osf.io,billyhunt/osf.... | import json
import os
import logging
logger = logging.getLogger(__name__)
HERE = os.path.dirname(os.path.realpath(__file__))
groups = json.load(open('{0}/defaults.json'.format(HERE)))
try:
fp = open('{0}/local.json'.format(HERE))
except IOError:
logger.info('No local.json found to populate lists of DraftRegi... | import json
import os
import logging
logger = logging.getLogger(__name__)
HERE = os.path.dirname(os.path.realpath(__file__))
groups = json.load(open('{0}/defaults.json'.format(HERE)))
fp = None
try:
fp = open('{0}/local.json'.format(HERE))
except IOError:
logger.info('No local.json found to populate lists of... | <commit_before>import json
import os
import logging
logger = logging.getLogger(__name__)
HERE = os.path.dirname(os.path.realpath(__file__))
groups = json.load(open('{0}/defaults.json'.format(HERE)))
try:
fp = open('{0}/local.json'.format(HERE))
except IOError:
logger.info('No local.json found to populate lis... | import json
import os
import logging
logger = logging.getLogger(__name__)
HERE = os.path.dirname(os.path.realpath(__file__))
groups = json.load(open('{0}/defaults.json'.format(HERE)))
fp = None
try:
fp = open('{0}/local.json'.format(HERE))
except IOError:
logger.info('No local.json found to populate lists of... | import json
import os
import logging
logger = logging.getLogger(__name__)
HERE = os.path.dirname(os.path.realpath(__file__))
groups = json.load(open('{0}/defaults.json'.format(HERE)))
try:
fp = open('{0}/local.json'.format(HERE))
except IOError:
logger.info('No local.json found to populate lists of DraftRegi... | <commit_before>import json
import os
import logging
logger = logging.getLogger(__name__)
HERE = os.path.dirname(os.path.realpath(__file__))
groups = json.load(open('{0}/defaults.json'.format(HERE)))
try:
fp = open('{0}/local.json'.format(HERE))
except IOError:
logger.info('No local.json found to populate lis... |
07823ae7f7368f4bc4a4e4436129319f7215150b | faker/utils/distribution.py | faker/utils/distribution.py | # coding=utf-8
import bisect
from faker.generator import random
def random_sample():
return random.uniform(0.0, 1.0)
def cumsum(it):
total = 0
for x in it:
total += x
yield total
def choice_distribution(a, p):
assert len(a) == len(p)
cdf = list(cumsum(p))
normal = cdf[-1]
... | # coding=utf-8
import bisect
from sys import version_info
from faker.generator import random
def random_sample():
return random.uniform(0.0, 1.0)
def cumsum(it):
total = 0
for x in it:
total += x
yield total
def choice_distribution(a, p):
assert len(a) == len(p)
if version_inf... | Use random.choices when available for better performance | Use random.choices when available for better performance
| Python | mit | joke2k/faker,joke2k/faker,danhuss/faker | # coding=utf-8
import bisect
from faker.generator import random
def random_sample():
return random.uniform(0.0, 1.0)
def cumsum(it):
total = 0
for x in it:
total += x
yield total
def choice_distribution(a, p):
assert len(a) == len(p)
cdf = list(cumsum(p))
normal = cdf[-1]
... | # coding=utf-8
import bisect
from sys import version_info
from faker.generator import random
def random_sample():
return random.uniform(0.0, 1.0)
def cumsum(it):
total = 0
for x in it:
total += x
yield total
def choice_distribution(a, p):
assert len(a) == len(p)
if version_inf... | <commit_before># coding=utf-8
import bisect
from faker.generator import random
def random_sample():
return random.uniform(0.0, 1.0)
def cumsum(it):
total = 0
for x in it:
total += x
yield total
def choice_distribution(a, p):
assert len(a) == len(p)
cdf = list(cumsum(p))
no... | # coding=utf-8
import bisect
from sys import version_info
from faker.generator import random
def random_sample():
return random.uniform(0.0, 1.0)
def cumsum(it):
total = 0
for x in it:
total += x
yield total
def choice_distribution(a, p):
assert len(a) == len(p)
if version_inf... | # coding=utf-8
import bisect
from faker.generator import random
def random_sample():
return random.uniform(0.0, 1.0)
def cumsum(it):
total = 0
for x in it:
total += x
yield total
def choice_distribution(a, p):
assert len(a) == len(p)
cdf = list(cumsum(p))
normal = cdf[-1]
... | <commit_before># coding=utf-8
import bisect
from faker.generator import random
def random_sample():
return random.uniform(0.0, 1.0)
def cumsum(it):
total = 0
for x in it:
total += x
yield total
def choice_distribution(a, p):
assert len(a) == len(p)
cdf = list(cumsum(p))
no... |
4e0db2766a719a347cbdf5b3e2fadd5a807d4a83 | tests/ipy_test_runner.py | tests/ipy_test_runner.py | from __future__ import print_function
import os
import pytest
HERE = os.path.dirname(__file__)
if __name__ == '__main__':
# Fake Rhino modules
pytest.load_fake_module('Rhino')
pytest.load_fake_module('Rhino.Geometry', fake_types=['RTree', 'Sphere', 'Point3d'])
pytest.run(HERE, ['tests/compas/files/... | from __future__ import print_function
import os
import pytest
HERE = os.path.dirname(__file__)
if __name__ == '__main__':
# Fake Rhino modules
pytest.load_fake_module('Rhino')
pytest.load_fake_module('Rhino.Geometry', fake_types=['RTree', 'Sphere', 'Point3d'])
pytest.run(HERE)
| Remove deleted test from ignore list | Remove deleted test from ignore list
| Python | mit | compas-dev/compas | from __future__ import print_function
import os
import pytest
HERE = os.path.dirname(__file__)
if __name__ == '__main__':
# Fake Rhino modules
pytest.load_fake_module('Rhino')
pytest.load_fake_module('Rhino.Geometry', fake_types=['RTree', 'Sphere', 'Point3d'])
pytest.run(HERE, ['tests/compas/files/... | from __future__ import print_function
import os
import pytest
HERE = os.path.dirname(__file__)
if __name__ == '__main__':
# Fake Rhino modules
pytest.load_fake_module('Rhino')
pytest.load_fake_module('Rhino.Geometry', fake_types=['RTree', 'Sphere', 'Point3d'])
pytest.run(HERE)
| <commit_before>from __future__ import print_function
import os
import pytest
HERE = os.path.dirname(__file__)
if __name__ == '__main__':
# Fake Rhino modules
pytest.load_fake_module('Rhino')
pytest.load_fake_module('Rhino.Geometry', fake_types=['RTree', 'Sphere', 'Point3d'])
pytest.run(HERE, ['test... | from __future__ import print_function
import os
import pytest
HERE = os.path.dirname(__file__)
if __name__ == '__main__':
# Fake Rhino modules
pytest.load_fake_module('Rhino')
pytest.load_fake_module('Rhino.Geometry', fake_types=['RTree', 'Sphere', 'Point3d'])
pytest.run(HERE)
| from __future__ import print_function
import os
import pytest
HERE = os.path.dirname(__file__)
if __name__ == '__main__':
# Fake Rhino modules
pytest.load_fake_module('Rhino')
pytest.load_fake_module('Rhino.Geometry', fake_types=['RTree', 'Sphere', 'Point3d'])
pytest.run(HERE, ['tests/compas/files/... | <commit_before>from __future__ import print_function
import os
import pytest
HERE = os.path.dirname(__file__)
if __name__ == '__main__':
# Fake Rhino modules
pytest.load_fake_module('Rhino')
pytest.load_fake_module('Rhino.Geometry', fake_types=['RTree', 'Sphere', 'Point3d'])
pytest.run(HERE, ['test... |
6290b81234f92073262a3fa784ae4e94f16192a8 | tests/test_autoconfig.py | tests/test_autoconfig.py | # coding: utf-8
import os
import pytest
from mock import patch
from decouple import AutoConfig
def test_autoconfig_env():
config = AutoConfig()
path = os.path.join(os.path.dirname(__file__), 'autoconfig', 'env', 'project')
with patch.object(config, '_caller_path', return_value=path):
assert 'ENV' ... | # coding: utf-8
import os
import pytest
from mock import patch
from decouple import AutoConfig
def test_autoconfig_env():
config = AutoConfig()
path = os.path.join(os.path.dirname(__file__), 'autoconfig', 'env', 'project')
with patch.object(config, '_caller_path', return_value=path):
assert 'ENV' ... | Test we have access to envvar when we have no file | Test we have access to envvar when we have no file
| Python | mit | henriquebastos/python-decouple,flaviohenriqu/python-decouple,mrkschan/python-decouple,henriquebastos/django-decouple,liukaijv/python-decouple | # coding: utf-8
import os
import pytest
from mock import patch
from decouple import AutoConfig
def test_autoconfig_env():
config = AutoConfig()
path = os.path.join(os.path.dirname(__file__), 'autoconfig', 'env', 'project')
with patch.object(config, '_caller_path', return_value=path):
assert 'ENV' ... | # coding: utf-8
import os
import pytest
from mock import patch
from decouple import AutoConfig
def test_autoconfig_env():
config = AutoConfig()
path = os.path.join(os.path.dirname(__file__), 'autoconfig', 'env', 'project')
with patch.object(config, '_caller_path', return_value=path):
assert 'ENV' ... | <commit_before># coding: utf-8
import os
import pytest
from mock import patch
from decouple import AutoConfig
def test_autoconfig_env():
config = AutoConfig()
path = os.path.join(os.path.dirname(__file__), 'autoconfig', 'env', 'project')
with patch.object(config, '_caller_path', return_value=path):
... | # coding: utf-8
import os
import pytest
from mock import patch
from decouple import AutoConfig
def test_autoconfig_env():
config = AutoConfig()
path = os.path.join(os.path.dirname(__file__), 'autoconfig', 'env', 'project')
with patch.object(config, '_caller_path', return_value=path):
assert 'ENV' ... | # coding: utf-8
import os
import pytest
from mock import patch
from decouple import AutoConfig
def test_autoconfig_env():
config = AutoConfig()
path = os.path.join(os.path.dirname(__file__), 'autoconfig', 'env', 'project')
with patch.object(config, '_caller_path', return_value=path):
assert 'ENV' ... | <commit_before># coding: utf-8
import os
import pytest
from mock import patch
from decouple import AutoConfig
def test_autoconfig_env():
config = AutoConfig()
path = os.path.join(os.path.dirname(__file__), 'autoconfig', 'env', 'project')
with patch.object(config, '_caller_path', return_value=path):
... |
5251c84a8e409a279cf8dc205673d57406be0782 | tests/test_serializer.py | tests/test_serializer.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
from pprint import pprint
from django.test import TestCase
from mock import Mock
from rest_framework_webdav.serializers import *
from rest_framework_webdav.resources import *
from .resources import MockResource
class TestPropfindSerializer(Tes... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
from pprint import pprint
from django.test import TestCase
from mock import Mock
from rest_framework_webdav.serializers import *
from rest_framework_webdav.resources import *
from .resources import MockResource
class TestPropfindSerializer(Tes... | Make tests a little better | Make tests a little better
| Python | agpl-3.0 | pellaeon/django-rest-framework-webdav | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
from pprint import pprint
from django.test import TestCase
from mock import Mock
from rest_framework_webdav.serializers import *
from rest_framework_webdav.resources import *
from .resources import MockResource
class TestPropfindSerializer(Tes... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
from pprint import pprint
from django.test import TestCase
from mock import Mock
from rest_framework_webdav.serializers import *
from rest_framework_webdav.resources import *
from .resources import MockResource
class TestPropfindSerializer(Tes... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
from pprint import pprint
from django.test import TestCase
from mock import Mock
from rest_framework_webdav.serializers import *
from rest_framework_webdav.resources import *
from .resources import MockResource
class TestPropfin... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
from pprint import pprint
from django.test import TestCase
from mock import Mock
from rest_framework_webdav.serializers import *
from rest_framework_webdav.resources import *
from .resources import MockResource
class TestPropfindSerializer(Tes... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
from pprint import pprint
from django.test import TestCase
from mock import Mock
from rest_framework_webdav.serializers import *
from rest_framework_webdav.resources import *
from .resources import MockResource
class TestPropfindSerializer(Tes... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
from pprint import pprint
from django.test import TestCase
from mock import Mock
from rest_framework_webdav.serializers import *
from rest_framework_webdav.resources import *
from .resources import MockResource
class TestPropfin... |
d976bc3b992811911e5b28cf29df1df936ca7cc5 | localtv/subsite/__init__.py | localtv/subsite/__init__.py | from django.conf import settings
from django.contrib.sites.models import Site
from localtv import models
def context_processor(request):
sitelocation = models.SiteLocation.objects.get(
site=Site.objects.get_current())
display_submit_button = sitelocation.display_submit_button
if display_subm... | import urlparse
from django.conf import settings
from django.contrib.sites.models import Site
from localtv import models
class FixAJAXMiddleware:
"""
Firefox doesn't handle redirects in XMLHttpRequests correctly (it doesn't
set X-Requested-With) so we fake it with a GET argument.
"""
def process_... | Add a middleware class to fix Firefox's bad AJAX redirect handling | Add a middleware class to fix Firefox's bad AJAX redirect handling
| Python | agpl-3.0 | pculture/mirocommunity,natea/Miro-Community,pculture/mirocommunity,natea/Miro-Community,pculture/mirocommunity,pculture/mirocommunity | from django.conf import settings
from django.contrib.sites.models import Site
from localtv import models
def context_processor(request):
sitelocation = models.SiteLocation.objects.get(
site=Site.objects.get_current())
display_submit_button = sitelocation.display_submit_button
if display_subm... | import urlparse
from django.conf import settings
from django.contrib.sites.models import Site
from localtv import models
class FixAJAXMiddleware:
"""
Firefox doesn't handle redirects in XMLHttpRequests correctly (it doesn't
set X-Requested-With) so we fake it with a GET argument.
"""
def process_... | <commit_before>from django.conf import settings
from django.contrib.sites.models import Site
from localtv import models
def context_processor(request):
sitelocation = models.SiteLocation.objects.get(
site=Site.objects.get_current())
display_submit_button = sitelocation.display_submit_button
... | import urlparse
from django.conf import settings
from django.contrib.sites.models import Site
from localtv import models
class FixAJAXMiddleware:
"""
Firefox doesn't handle redirects in XMLHttpRequests correctly (it doesn't
set X-Requested-With) so we fake it with a GET argument.
"""
def process_... | from django.conf import settings
from django.contrib.sites.models import Site
from localtv import models
def context_processor(request):
sitelocation = models.SiteLocation.objects.get(
site=Site.objects.get_current())
display_submit_button = sitelocation.display_submit_button
if display_subm... | <commit_before>from django.conf import settings
from django.contrib.sites.models import Site
from localtv import models
def context_processor(request):
sitelocation = models.SiteLocation.objects.get(
site=Site.objects.get_current())
display_submit_button = sitelocation.display_submit_button
... |
8278da2e22bc1a10ada43585685aa4a0841d14c5 | apps/bluebottle_utils/tests.py | apps/bluebottle_utils/tests.py | import uuid
from django.contrib.auth.models import User
class UserTestsMixin(object):
""" Mixin base class for tests requiring users. """
def create_user(self, username=None, password=None):
""" Create, save and return a new user. """
if not username:
# Generate a random usernam... | import uuid
from django.contrib.auth.models import User
class UserTestsMixin(object):
""" Mixin base class for tests requiring users. """
def create_user(self, username=None, password=None):
""" Create, save and return a new user. """
# If no username is set, create a random unique username... | Make sure generated usernames are unique. | Make sure generated usernames are unique.
| Python | bsd-3-clause | onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site | import uuid
from django.contrib.auth.models import User
class UserTestsMixin(object):
""" Mixin base class for tests requiring users. """
def create_user(self, username=None, password=None):
""" Create, save and return a new user. """
if not username:
# Generate a random usernam... | import uuid
from django.contrib.auth.models import User
class UserTestsMixin(object):
""" Mixin base class for tests requiring users. """
def create_user(self, username=None, password=None):
""" Create, save and return a new user. """
# If no username is set, create a random unique username... | <commit_before>import uuid
from django.contrib.auth.models import User
class UserTestsMixin(object):
""" Mixin base class for tests requiring users. """
def create_user(self, username=None, password=None):
""" Create, save and return a new user. """
if not username:
# Generate a... | import uuid
from django.contrib.auth.models import User
class UserTestsMixin(object):
""" Mixin base class for tests requiring users. """
def create_user(self, username=None, password=None):
""" Create, save and return a new user. """
# If no username is set, create a random unique username... | import uuid
from django.contrib.auth.models import User
class UserTestsMixin(object):
""" Mixin base class for tests requiring users. """
def create_user(self, username=None, password=None):
""" Create, save and return a new user. """
if not username:
# Generate a random usernam... | <commit_before>import uuid
from django.contrib.auth.models import User
class UserTestsMixin(object):
""" Mixin base class for tests requiring users. """
def create_user(self, username=None, password=None):
""" Create, save and return a new user. """
if not username:
# Generate a... |
ea250cdd086059ea7976a38c8e94cb4a39709357 | feincms/views/decorators.py | feincms/views/decorators.py | try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps
from feincms.models import Page
def add_page_to_extra_context(view_func):
def inner(request, *args, **kwargs):
kwargs.setdefault('extra_context', {})
kwargs['extra_context']['feincms_page'] = Pa... | try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps
from feincms.models import Page
def add_page_to_extra_context(view_func):
def inner(request, *args, **kwargs):
kwargs.setdefault('extra_context', {})
kwargs['extra_context']['feincms_page'] = Pa... | Call the setup_request page method too in generic views replacements | Call the setup_request page method too in generic views replacements
| Python | bsd-3-clause | mjl/feincms,matthiask/django-content-editor,pjdelport/feincms,hgrimelid/feincms,nickburlett/feincms,mjl/feincms,matthiask/feincms2-content,michaelkuty/feincms,joshuajonah/feincms,michaelkuty/feincms,matthiask/feincms2-content,feincms/feincms,hgrimelid/feincms,mjl/feincms,matthiask/django-content-editor,pjdelport/feincm... | try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps
from feincms.models import Page
def add_page_to_extra_context(view_func):
def inner(request, *args, **kwargs):
kwargs.setdefault('extra_context', {})
kwargs['extra_context']['feincms_page'] = Pa... | try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps
from feincms.models import Page
def add_page_to_extra_context(view_func):
def inner(request, *args, **kwargs):
kwargs.setdefault('extra_context', {})
kwargs['extra_context']['feincms_page'] = Pa... | <commit_before>try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps
from feincms.models import Page
def add_page_to_extra_context(view_func):
def inner(request, *args, **kwargs):
kwargs.setdefault('extra_context', {})
kwargs['extra_context']['fein... | try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps
from feincms.models import Page
def add_page_to_extra_context(view_func):
def inner(request, *args, **kwargs):
kwargs.setdefault('extra_context', {})
kwargs['extra_context']['feincms_page'] = Pa... | try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps
from feincms.models import Page
def add_page_to_extra_context(view_func):
def inner(request, *args, **kwargs):
kwargs.setdefault('extra_context', {})
kwargs['extra_context']['feincms_page'] = Pa... | <commit_before>try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps
from feincms.models import Page
def add_page_to_extra_context(view_func):
def inner(request, *args, **kwargs):
kwargs.setdefault('extra_context', {})
kwargs['extra_context']['fein... |
d1a868ab1ac8163828479e61d1d3efcae127543b | fileapi/tests/test_qunit.py | fileapi/tests/test_qunit.py | import os
from django.conf import settings
from django.contrib.staticfiles import finders, storage
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from django.test.utils import modify_settings
from django.utils.functional import empty
from selenium import webdriver
from selenium.webdriver.comm... | import os
from django.conf import settings
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from django.test.utils import modify_settings
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions
from selenium.webdriver... | Remove code which worked around a Django bug which is fixed in 1.8+ | Remove code which worked around a Django bug which is fixed in 1.8+
| Python | bsd-2-clause | mlavin/fileapi,mlavin/fileapi,mlavin/fileapi | import os
from django.conf import settings
from django.contrib.staticfiles import finders, storage
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from django.test.utils import modify_settings
from django.utils.functional import empty
from selenium import webdriver
from selenium.webdriver.comm... | import os
from django.conf import settings
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from django.test.utils import modify_settings
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions
from selenium.webdriver... | <commit_before>import os
from django.conf import settings
from django.contrib.staticfiles import finders, storage
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from django.test.utils import modify_settings
from django.utils.functional import empty
from selenium import webdriver
from selenium... | import os
from django.conf import settings
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from django.test.utils import modify_settings
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions
from selenium.webdriver... | import os
from django.conf import settings
from django.contrib.staticfiles import finders, storage
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from django.test.utils import modify_settings
from django.utils.functional import empty
from selenium import webdriver
from selenium.webdriver.comm... | <commit_before>import os
from django.conf import settings
from django.contrib.staticfiles import finders, storage
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from django.test.utils import modify_settings
from django.utils.functional import empty
from selenium import webdriver
from selenium... |
b6c44e90df31c42137a80a64f6069056b16e3239 | plugins/auth/crypto/algo_bcrypt.py | plugins/auth/crypto/algo_bcrypt.py | # coding=utf-8
from plugins.auth.crypto.algo_base import BaseAlgorithm
import bcrypt
__author__ = 'Gareth Coles'
class BcryptAlgo(BaseAlgorithm):
def check(self, hash, value, salt=None):
return hash == self.hash(value, hash)
def hash(self, value, salt):
return bcrypt.hashpw(
va... | # coding=utf-8
import bcrypt
from kitchen.text.converters import to_bytes
from plugins.auth.crypto.algo_base import BaseAlgorithm
__author__ = 'Gareth Coles'
class BcryptAlgo(BaseAlgorithm):
def check(self, hash, value, salt=None):
return hash == self.hash(value, hash)
def hash(self, value, salt):
... | Make bcrypt work with Unicode passwords | [Auth] Make bcrypt work with Unicode passwords
| Python | artistic-2.0 | UltrosBot/Ultros,UltrosBot/Ultros | # coding=utf-8
from plugins.auth.crypto.algo_base import BaseAlgorithm
import bcrypt
__author__ = 'Gareth Coles'
class BcryptAlgo(BaseAlgorithm):
def check(self, hash, value, salt=None):
return hash == self.hash(value, hash)
def hash(self, value, salt):
return bcrypt.hashpw(
va... | # coding=utf-8
import bcrypt
from kitchen.text.converters import to_bytes
from plugins.auth.crypto.algo_base import BaseAlgorithm
__author__ = 'Gareth Coles'
class BcryptAlgo(BaseAlgorithm):
def check(self, hash, value, salt=None):
return hash == self.hash(value, hash)
def hash(self, value, salt):
... | <commit_before># coding=utf-8
from plugins.auth.crypto.algo_base import BaseAlgorithm
import bcrypt
__author__ = 'Gareth Coles'
class BcryptAlgo(BaseAlgorithm):
def check(self, hash, value, salt=None):
return hash == self.hash(value, hash)
def hash(self, value, salt):
return bcrypt.hashpw(... | # coding=utf-8
import bcrypt
from kitchen.text.converters import to_bytes
from plugins.auth.crypto.algo_base import BaseAlgorithm
__author__ = 'Gareth Coles'
class BcryptAlgo(BaseAlgorithm):
def check(self, hash, value, salt=None):
return hash == self.hash(value, hash)
def hash(self, value, salt):
... | # coding=utf-8
from plugins.auth.crypto.algo_base import BaseAlgorithm
import bcrypt
__author__ = 'Gareth Coles'
class BcryptAlgo(BaseAlgorithm):
def check(self, hash, value, salt=None):
return hash == self.hash(value, hash)
def hash(self, value, salt):
return bcrypt.hashpw(
va... | <commit_before># coding=utf-8
from plugins.auth.crypto.algo_base import BaseAlgorithm
import bcrypt
__author__ = 'Gareth Coles'
class BcryptAlgo(BaseAlgorithm):
def check(self, hash, value, salt=None):
return hash == self.hash(value, hash)
def hash(self, value, salt):
return bcrypt.hashpw(... |
83f606e50b2a2ba2f283434d6449a46ad405e548 | flask_mongorest/utils.py | flask_mongorest/utils.py | import json
import decimal
import datetime
from bson.dbref import DBRef
from bson.objectid import ObjectId
from mongoengine.base import BaseDocument
isbound = lambda m: getattr(m, 'im_self', None) is not None
class MongoEncoder(json.JSONEncoder):
def default(self, value, **kwargs):
if isinstance(value, Ob... | import json
import decimal
import datetime
from bson.dbref import DBRef
from bson.objectid import ObjectId
from mongoengine.base import BaseDocument
isbound = lambda m: getattr(m, 'im_self', None) is not None
class MongoEncoder(json.JSONEncoder):
def default(self, value, **kwargs):
if isinstance(value, Ob... | Fix bad call to superclass method | Fix bad call to superclass method
| Python | bsd-3-clause | elasticsales/flask-mongorest,DropD/flask-mongorest,elasticsales/flask-mongorest,DropD/flask-mongorest | import json
import decimal
import datetime
from bson.dbref import DBRef
from bson.objectid import ObjectId
from mongoengine.base import BaseDocument
isbound = lambda m: getattr(m, 'im_self', None) is not None
class MongoEncoder(json.JSONEncoder):
def default(self, value, **kwargs):
if isinstance(value, Ob... | import json
import decimal
import datetime
from bson.dbref import DBRef
from bson.objectid import ObjectId
from mongoengine.base import BaseDocument
isbound = lambda m: getattr(m, 'im_self', None) is not None
class MongoEncoder(json.JSONEncoder):
def default(self, value, **kwargs):
if isinstance(value, Ob... | <commit_before>import json
import decimal
import datetime
from bson.dbref import DBRef
from bson.objectid import ObjectId
from mongoengine.base import BaseDocument
isbound = lambda m: getattr(m, 'im_self', None) is not None
class MongoEncoder(json.JSONEncoder):
def default(self, value, **kwargs):
if isins... | import json
import decimal
import datetime
from bson.dbref import DBRef
from bson.objectid import ObjectId
from mongoengine.base import BaseDocument
isbound = lambda m: getattr(m, 'im_self', None) is not None
class MongoEncoder(json.JSONEncoder):
def default(self, value, **kwargs):
if isinstance(value, Ob... | import json
import decimal
import datetime
from bson.dbref import DBRef
from bson.objectid import ObjectId
from mongoengine.base import BaseDocument
isbound = lambda m: getattr(m, 'im_self', None) is not None
class MongoEncoder(json.JSONEncoder):
def default(self, value, **kwargs):
if isinstance(value, Ob... | <commit_before>import json
import decimal
import datetime
from bson.dbref import DBRef
from bson.objectid import ObjectId
from mongoengine.base import BaseDocument
isbound = lambda m: getattr(m, 'im_self', None) is not None
class MongoEncoder(json.JSONEncoder):
def default(self, value, **kwargs):
if isins... |
9fb17d4612fa250ebce09334cd8141ac071532cc | utils/addressTest.py | utils/addressTest.py | #!/usr/bin/python
import minimalmodbus
from time import sleep
ADDRESS1 = 1
ADDRESS2 = 2
minimalmodbus.CLOSE_PORT_AFTER_EACH_CALL = True
sensor = minimalmodbus.Instrument('/dev/ttyUSB5', slaveaddress=ADDRESS1)
print("writing new address: " + str(ADDRESS2))
sensor.write_register(0, value=ADDRESS2, functioncode=6)
sleep... | #!/usr/bin/python
"""Looks for sensor with ADDRESS1 and changes it's address to ADDRESS2 then changes it back to ADDRESS1"""
import minimalmodbus
import serial
from time import sleep
ADDRESS1 = 1
ADDRESS2 = 2
minimalmodbus.CLOSE_PORT_AFTER_EACH_CALL = True
minimalmodbus.PARITY=serial.PARITY_NONE
minimalmodbus.STOPB... | Add utility for address change functionality testing | Add utility for address change functionality testing
| Python | apache-2.0 | Miceuz/rs485-moist-sensor,Miceuz/rs485-moist-sensor | #!/usr/bin/python
import minimalmodbus
from time import sleep
ADDRESS1 = 1
ADDRESS2 = 2
minimalmodbus.CLOSE_PORT_AFTER_EACH_CALL = True
sensor = minimalmodbus.Instrument('/dev/ttyUSB5', slaveaddress=ADDRESS1)
print("writing new address: " + str(ADDRESS2))
sensor.write_register(0, value=ADDRESS2, functioncode=6)
sleep... | #!/usr/bin/python
"""Looks for sensor with ADDRESS1 and changes it's address to ADDRESS2 then changes it back to ADDRESS1"""
import minimalmodbus
import serial
from time import sleep
ADDRESS1 = 1
ADDRESS2 = 2
minimalmodbus.CLOSE_PORT_AFTER_EACH_CALL = True
minimalmodbus.PARITY=serial.PARITY_NONE
minimalmodbus.STOPB... | <commit_before>#!/usr/bin/python
import minimalmodbus
from time import sleep
ADDRESS1 = 1
ADDRESS2 = 2
minimalmodbus.CLOSE_PORT_AFTER_EACH_CALL = True
sensor = minimalmodbus.Instrument('/dev/ttyUSB5', slaveaddress=ADDRESS1)
print("writing new address: " + str(ADDRESS2))
sensor.write_register(0, value=ADDRESS2, functio... | #!/usr/bin/python
"""Looks for sensor with ADDRESS1 and changes it's address to ADDRESS2 then changes it back to ADDRESS1"""
import minimalmodbus
import serial
from time import sleep
ADDRESS1 = 1
ADDRESS2 = 2
minimalmodbus.CLOSE_PORT_AFTER_EACH_CALL = True
minimalmodbus.PARITY=serial.PARITY_NONE
minimalmodbus.STOPB... | #!/usr/bin/python
import minimalmodbus
from time import sleep
ADDRESS1 = 1
ADDRESS2 = 2
minimalmodbus.CLOSE_PORT_AFTER_EACH_CALL = True
sensor = minimalmodbus.Instrument('/dev/ttyUSB5', slaveaddress=ADDRESS1)
print("writing new address: " + str(ADDRESS2))
sensor.write_register(0, value=ADDRESS2, functioncode=6)
sleep... | <commit_before>#!/usr/bin/python
import minimalmodbus
from time import sleep
ADDRESS1 = 1
ADDRESS2 = 2
minimalmodbus.CLOSE_PORT_AFTER_EACH_CALL = True
sensor = minimalmodbus.Instrument('/dev/ttyUSB5', slaveaddress=ADDRESS1)
print("writing new address: " + str(ADDRESS2))
sensor.write_register(0, value=ADDRESS2, functio... |
0e1dd74c70a2fa682b3cd3b0027162ad50ee9998 | social/app/views/friend.py | social/app/views/friend.py | from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views import generic
from social.app.models.author import Author
class FriendRequestsListView(generic.ListView):
context_object_name = "all_friend_requests"
template_name = "app/friend_requests_list.html"
def get_qu... | from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views import generic
from social.app.models.author import Author
class FriendRequestsListView(generic.ListView):
context_object_name = "all_friend_requests"
template_name = "app/friend_requests_list.html"
def get_qu... | Put in a raise for status for now | Put in a raise for status for now
| Python | apache-2.0 | TeamAADGT/CMPUT404-project-socialdistribution,TeamAADGT/CMPUT404-project-socialdistribution,TeamAADGT/CMPUT404-project-socialdistribution | from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views import generic
from social.app.models.author import Author
class FriendRequestsListView(generic.ListView):
context_object_name = "all_friend_requests"
template_name = "app/friend_requests_list.html"
def get_qu... | from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views import generic
from social.app.models.author import Author
class FriendRequestsListView(generic.ListView):
context_object_name = "all_friend_requests"
template_name = "app/friend_requests_list.html"
def get_qu... | <commit_before>from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views import generic
from social.app.models.author import Author
class FriendRequestsListView(generic.ListView):
context_object_name = "all_friend_requests"
template_name = "app/friend_requests_list.html"
... | from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views import generic
from social.app.models.author import Author
class FriendRequestsListView(generic.ListView):
context_object_name = "all_friend_requests"
template_name = "app/friend_requests_list.html"
def get_qu... | from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views import generic
from social.app.models.author import Author
class FriendRequestsListView(generic.ListView):
context_object_name = "all_friend_requests"
template_name = "app/friend_requests_list.html"
def get_qu... | <commit_before>from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views import generic
from social.app.models.author import Author
class FriendRequestsListView(generic.ListView):
context_object_name = "all_friend_requests"
template_name = "app/friend_requests_list.html"
... |
8e87689fd0edaf36349c3a6390fd8a6d18038f41 | fortuitus/fcore/views.py | fortuitus/fcore/views.py | from django.contrib import messages, auth
from django.shortcuts import redirect
from django.template.response import TemplateResponse
from django.views.generic.base import TemplateView
from fortuitus.fcore import forms
class Home(TemplateView):
""" Home page. """
template_name = 'fortuitus/fcore/home.html'
... | from django.contrib import messages, auth
from django.contrib.auth.models import User
from django.shortcuts import redirect
from django.template.response import TemplateResponse
from django.views.generic.base import TemplateView
from fortuitus.fcore import forms
class Home(TemplateView):
""" Home page. """
t... | Add auto-login feature for demo view | Add auto-login feature for demo view
| Python | mit | elegion/djangodash2012,elegion/djangodash2012 | from django.contrib import messages, auth
from django.shortcuts import redirect
from django.template.response import TemplateResponse
from django.views.generic.base import TemplateView
from fortuitus.fcore import forms
class Home(TemplateView):
""" Home page. """
template_name = 'fortuitus/fcore/home.html'
... | from django.contrib import messages, auth
from django.contrib.auth.models import User
from django.shortcuts import redirect
from django.template.response import TemplateResponse
from django.views.generic.base import TemplateView
from fortuitus.fcore import forms
class Home(TemplateView):
""" Home page. """
t... | <commit_before>from django.contrib import messages, auth
from django.shortcuts import redirect
from django.template.response import TemplateResponse
from django.views.generic.base import TemplateView
from fortuitus.fcore import forms
class Home(TemplateView):
""" Home page. """
template_name = 'fortuitus/fco... | from django.contrib import messages, auth
from django.contrib.auth.models import User
from django.shortcuts import redirect
from django.template.response import TemplateResponse
from django.views.generic.base import TemplateView
from fortuitus.fcore import forms
class Home(TemplateView):
""" Home page. """
t... | from django.contrib import messages, auth
from django.shortcuts import redirect
from django.template.response import TemplateResponse
from django.views.generic.base import TemplateView
from fortuitus.fcore import forms
class Home(TemplateView):
""" Home page. """
template_name = 'fortuitus/fcore/home.html'
... | <commit_before>from django.contrib import messages, auth
from django.shortcuts import redirect
from django.template.response import TemplateResponse
from django.views.generic.base import TemplateView
from fortuitus.fcore import forms
class Home(TemplateView):
""" Home page. """
template_name = 'fortuitus/fco... |
cbb11e996381197d551425585fca225d630fa383 | tests/test_simpleflow/utils/test_misc.py | tests/test_simpleflow/utils/test_misc.py | import unittest
from simpleflow.utils import format_exc
class MyTestCase(unittest.TestCase):
def test_format_final_exc_line(self):
line = None
try:
1/0
except Exception as e:
line = format_exc(e)
self.assertEqual("ZeroDivisionError: division by zero", line)... | import unittest
from simpleflow.utils import format_exc
class MyTestCase(unittest.TestCase):
def test_format_final_exc_line(self):
line = None
try:
{}[1]
except Exception as e:
line = format_exc(e)
self.assertEqual("KeyError: 1", line)
if __name__ == '__m... | Remove version-specific exception text test | Remove version-specific exception text test
Signed-off-by: Yves Bastide <[email protected]>
| Python | mit | botify-labs/simpleflow,botify-labs/simpleflow | import unittest
from simpleflow.utils import format_exc
class MyTestCase(unittest.TestCase):
def test_format_final_exc_line(self):
line = None
try:
1/0
except Exception as e:
line = format_exc(e)
self.assertEqual("ZeroDivisionError: division by zero", line)... | import unittest
from simpleflow.utils import format_exc
class MyTestCase(unittest.TestCase):
def test_format_final_exc_line(self):
line = None
try:
{}[1]
except Exception as e:
line = format_exc(e)
self.assertEqual("KeyError: 1", line)
if __name__ == '__m... | <commit_before>import unittest
from simpleflow.utils import format_exc
class MyTestCase(unittest.TestCase):
def test_format_final_exc_line(self):
line = None
try:
1/0
except Exception as e:
line = format_exc(e)
self.assertEqual("ZeroDivisionError: division ... | import unittest
from simpleflow.utils import format_exc
class MyTestCase(unittest.TestCase):
def test_format_final_exc_line(self):
line = None
try:
{}[1]
except Exception as e:
line = format_exc(e)
self.assertEqual("KeyError: 1", line)
if __name__ == '__m... | import unittest
from simpleflow.utils import format_exc
class MyTestCase(unittest.TestCase):
def test_format_final_exc_line(self):
line = None
try:
1/0
except Exception as e:
line = format_exc(e)
self.assertEqual("ZeroDivisionError: division by zero", line)... | <commit_before>import unittest
from simpleflow.utils import format_exc
class MyTestCase(unittest.TestCase):
def test_format_final_exc_line(self):
line = None
try:
1/0
except Exception as e:
line = format_exc(e)
self.assertEqual("ZeroDivisionError: division ... |
39314b70125d41fb57a468684209bdcfdfb8096f | frigg/builds/serializers.py | frigg/builds/serializers.py | from rest_framework import serializers
from frigg.projects.models import Project
from .models import Build, BuildResult
class ProjectInlineSerializer(serializers.ModelSerializer):
class Meta:
model = Project
fields = (
'id',
'owner',
'name',
'priv... | from rest_framework import serializers
from frigg.projects.models import Project
from .models import Build, BuildResult
class ProjectInlineSerializer(serializers.ModelSerializer):
class Meta:
model = Project
fields = (
'id',
'owner',
'name',
'priv... | Add still_running to build result serializer | Add still_running to build result serializer
| Python | mit | frigg/frigg-hq,frigg/frigg-hq,frigg/frigg-hq | from rest_framework import serializers
from frigg.projects.models import Project
from .models import Build, BuildResult
class ProjectInlineSerializer(serializers.ModelSerializer):
class Meta:
model = Project
fields = (
'id',
'owner',
'name',
'priv... | from rest_framework import serializers
from frigg.projects.models import Project
from .models import Build, BuildResult
class ProjectInlineSerializer(serializers.ModelSerializer):
class Meta:
model = Project
fields = (
'id',
'owner',
'name',
'priv... | <commit_before>from rest_framework import serializers
from frigg.projects.models import Project
from .models import Build, BuildResult
class ProjectInlineSerializer(serializers.ModelSerializer):
class Meta:
model = Project
fields = (
'id',
'owner',
'name',
... | from rest_framework import serializers
from frigg.projects.models import Project
from .models import Build, BuildResult
class ProjectInlineSerializer(serializers.ModelSerializer):
class Meta:
model = Project
fields = (
'id',
'owner',
'name',
'priv... | from rest_framework import serializers
from frigg.projects.models import Project
from .models import Build, BuildResult
class ProjectInlineSerializer(serializers.ModelSerializer):
class Meta:
model = Project
fields = (
'id',
'owner',
'name',
'priv... | <commit_before>from rest_framework import serializers
from frigg.projects.models import Project
from .models import Build, BuildResult
class ProjectInlineSerializer(serializers.ModelSerializer):
class Meta:
model = Project
fields = (
'id',
'owner',
'name',
... |
8e907ad431dfe5395741d26ea46c50c118355d69 | src/webassets/ext/werkzeug.py | src/webassets/ext/werkzeug.py | import logging
from webassets.script import CommandLineEnvironment
__all__ = ('make_assets_action',)
def make_assets_action(environment, loaders=[]):
"""Creates a ``werkzeug.script`` action which interfaces
with the webassets command line tools.
Since Werkzeug does not provide a way to have subcommands... | import logging
from webassets.script import CommandLineEnvironment
__all__ = ('make_assets_action',)
def make_assets_action(environment, loaders=[]):
"""Creates a ``werkzeug.script`` action which interfaces
with the webassets command line tools.
Since Werkzeug does not provide a way to have subcommands... | Make the "check" command available via the Werkzeug extension. | Make the "check" command available via the Werkzeug extension.
| Python | bsd-2-clause | scorphus/webassets,wijerasa/webassets,JDeuce/webassets,heynemann/webassets,heynemann/webassets,heynemann/webassets,aconrad/webassets,aconrad/webassets,glorpen/webassets,glorpen/webassets,john2x/webassets,florianjacob/webassets,0x1997/webassets,JDeuce/webassets,0x1997/webassets,wijerasa/webassets,glorpen/webassets,aconr... | import logging
from webassets.script import CommandLineEnvironment
__all__ = ('make_assets_action',)
def make_assets_action(environment, loaders=[]):
"""Creates a ``werkzeug.script`` action which interfaces
with the webassets command line tools.
Since Werkzeug does not provide a way to have subcommands... | import logging
from webassets.script import CommandLineEnvironment
__all__ = ('make_assets_action',)
def make_assets_action(environment, loaders=[]):
"""Creates a ``werkzeug.script`` action which interfaces
with the webassets command line tools.
Since Werkzeug does not provide a way to have subcommands... | <commit_before>import logging
from webassets.script import CommandLineEnvironment
__all__ = ('make_assets_action',)
def make_assets_action(environment, loaders=[]):
"""Creates a ``werkzeug.script`` action which interfaces
with the webassets command line tools.
Since Werkzeug does not provide a way to h... | import logging
from webassets.script import CommandLineEnvironment
__all__ = ('make_assets_action',)
def make_assets_action(environment, loaders=[]):
"""Creates a ``werkzeug.script`` action which interfaces
with the webassets command line tools.
Since Werkzeug does not provide a way to have subcommands... | import logging
from webassets.script import CommandLineEnvironment
__all__ = ('make_assets_action',)
def make_assets_action(environment, loaders=[]):
"""Creates a ``werkzeug.script`` action which interfaces
with the webassets command line tools.
Since Werkzeug does not provide a way to have subcommands... | <commit_before>import logging
from webassets.script import CommandLineEnvironment
__all__ = ('make_assets_action',)
def make_assets_action(environment, loaders=[]):
"""Creates a ``werkzeug.script`` action which interfaces
with the webassets command line tools.
Since Werkzeug does not provide a way to h... |
2c2604527cfe0ceb3dbf052bbcaf9e2e660b9e47 | app.py | app.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ephemeral by st0le
# quick way share text between your network devices
from flask import Flask, request, render_template, redirect, url_for
db = {}
app = Flask(__name__)
@app.route('/')
def get():
ip = request.remote_addr
return render_template("index.html", t... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ephemeral by st0le
# quick way share text between your network devices
from flask import Flask, request, render_template, redirect, url_for
db = {}
app = Flask(__name__)
def get_client_ip(request):
# PythonAnywhere.com calls our service through a loabalancer
#... | Fix for PythonAnywhere LoadBalancer IP | Fix for PythonAnywhere LoadBalancer IP
| Python | mit | st0le/ephemeral,st0le/ephemeral | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ephemeral by st0le
# quick way share text between your network devices
from flask import Flask, request, render_template, redirect, url_for
db = {}
app = Flask(__name__)
@app.route('/')
def get():
ip = request.remote_addr
return render_template("index.html", t... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ephemeral by st0le
# quick way share text between your network devices
from flask import Flask, request, render_template, redirect, url_for
db = {}
app = Flask(__name__)
def get_client_ip(request):
# PythonAnywhere.com calls our service through a loabalancer
#... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# ephemeral by st0le
# quick way share text between your network devices
from flask import Flask, request, render_template, redirect, url_for
db = {}
app = Flask(__name__)
@app.route('/')
def get():
ip = request.remote_addr
return render_template(... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ephemeral by st0le
# quick way share text between your network devices
from flask import Flask, request, render_template, redirect, url_for
db = {}
app = Flask(__name__)
def get_client_ip(request):
# PythonAnywhere.com calls our service through a loabalancer
#... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ephemeral by st0le
# quick way share text between your network devices
from flask import Flask, request, render_template, redirect, url_for
db = {}
app = Flask(__name__)
@app.route('/')
def get():
ip = request.remote_addr
return render_template("index.html", t... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# ephemeral by st0le
# quick way share text between your network devices
from flask import Flask, request, render_template, redirect, url_for
db = {}
app = Flask(__name__)
@app.route('/')
def get():
ip = request.remote_addr
return render_template(... |
816b222dd771c84267b3f8c64fd2c1ec7dabfbc4 | ex6.py | ex6.py | x = f"There are {10} types of people."
binary = "binary"
do_not = "don't"
y = f"Those who know {binary} and those who {do_not}."
print(x)
print(y)
print("I said: {x}.")
print("I also said: '{y}'.")
hilarious = False
joke_evaluation = "Isn't that joke so funny?! {}"
print(joke_evaluation.format(hilarious))
w = "Thi... | # left out assignment for types_of_people mentioned in intro
types_of_people = 10
# change variable from 10 to types_of_people
x = f"There are {types_of_people} types of people."
binary = "binary"
do_not = "don't"
y = f"Those who know {binary} and those who {do_not}."
print(x)
print(y)
# left out f in front of strin... | Add missing variable and correct f-strings | fix: Add missing variable and correct f-strings
See commented lines for changes to ex6.py:
- add types_of_people variable assigment
- change variable from 10 to types_of_people
- add letter f before f-strings
- omit unnecessary periods
| Python | mit | zedshaw/learn-python3-thw-code,zedshaw/learn-python3-thw-code,zedshaw/learn-python3-thw-code | x = f"There are {10} types of people."
binary = "binary"
do_not = "don't"
y = f"Those who know {binary} and those who {do_not}."
print(x)
print(y)
print("I said: {x}.")
print("I also said: '{y}'.")
hilarious = False
joke_evaluation = "Isn't that joke so funny?! {}"
print(joke_evaluation.format(hilarious))
w = "Thi... | # left out assignment for types_of_people mentioned in intro
types_of_people = 10
# change variable from 10 to types_of_people
x = f"There are {types_of_people} types of people."
binary = "binary"
do_not = "don't"
y = f"Those who know {binary} and those who {do_not}."
print(x)
print(y)
# left out f in front of strin... | <commit_before>x = f"There are {10} types of people."
binary = "binary"
do_not = "don't"
y = f"Those who know {binary} and those who {do_not}."
print(x)
print(y)
print("I said: {x}.")
print("I also said: '{y}'.")
hilarious = False
joke_evaluation = "Isn't that joke so funny?! {}"
print(joke_evaluation.format(hilari... | # left out assignment for types_of_people mentioned in intro
types_of_people = 10
# change variable from 10 to types_of_people
x = f"There are {types_of_people} types of people."
binary = "binary"
do_not = "don't"
y = f"Those who know {binary} and those who {do_not}."
print(x)
print(y)
# left out f in front of strin... | x = f"There are {10} types of people."
binary = "binary"
do_not = "don't"
y = f"Those who know {binary} and those who {do_not}."
print(x)
print(y)
print("I said: {x}.")
print("I also said: '{y}'.")
hilarious = False
joke_evaluation = "Isn't that joke so funny?! {}"
print(joke_evaluation.format(hilarious))
w = "Thi... | <commit_before>x = f"There are {10} types of people."
binary = "binary"
do_not = "don't"
y = f"Those who know {binary} and those who {do_not}."
print(x)
print(y)
print("I said: {x}.")
print("I also said: '{y}'.")
hilarious = False
joke_evaluation = "Isn't that joke so funny?! {}"
print(joke_evaluation.format(hilari... |
0260e50ab4d1449fa95b8e712861b7e44ac21965 | umessages/appsettings.py | umessages/appsettings.py | # Umessages settings file.
#
# Please consult the docs for more information about each setting.
from django.conf import settings
gettext = lambda s: s
"""
Boolean value that defines ifumessages should use the django messages
framework to notify the user of any changes.
"""
UMESSAGES_USE_MESSAGES = getattr(settings,
... | # Umessages settings file.
#
# Please consult the docs for more information about each setting.
from django.conf import settings
gettext = lambda s: s
CRISPY_TEMPLATE_PACK = getattr(settings, 'CRISPY_TEMPLATE_PACK', 'bootstrap')
"""
Boolean value that defines ifumessages should use the django messages
framework to n... | Use bootstrap template pack by default | Use bootstrap template pack by default
| Python | bsd-3-clause | euanlau/django-umessages,euanlau/django-umessages | # Umessages settings file.
#
# Please consult the docs for more information about each setting.
from django.conf import settings
gettext = lambda s: s
"""
Boolean value that defines ifumessages should use the django messages
framework to notify the user of any changes.
"""
UMESSAGES_USE_MESSAGES = getattr(settings,
... | # Umessages settings file.
#
# Please consult the docs for more information about each setting.
from django.conf import settings
gettext = lambda s: s
CRISPY_TEMPLATE_PACK = getattr(settings, 'CRISPY_TEMPLATE_PACK', 'bootstrap')
"""
Boolean value that defines ifumessages should use the django messages
framework to n... | <commit_before># Umessages settings file.
#
# Please consult the docs for more information about each setting.
from django.conf import settings
gettext = lambda s: s
"""
Boolean value that defines ifumessages should use the django messages
framework to notify the user of any changes.
"""
UMESSAGES_USE_MESSAGES = geta... | # Umessages settings file.
#
# Please consult the docs for more information about each setting.
from django.conf import settings
gettext = lambda s: s
CRISPY_TEMPLATE_PACK = getattr(settings, 'CRISPY_TEMPLATE_PACK', 'bootstrap')
"""
Boolean value that defines ifumessages should use the django messages
framework to n... | # Umessages settings file.
#
# Please consult the docs for more information about each setting.
from django.conf import settings
gettext = lambda s: s
"""
Boolean value that defines ifumessages should use the django messages
framework to notify the user of any changes.
"""
UMESSAGES_USE_MESSAGES = getattr(settings,
... | <commit_before># Umessages settings file.
#
# Please consult the docs for more information about each setting.
from django.conf import settings
gettext = lambda s: s
"""
Boolean value that defines ifumessages should use the django messages
framework to notify the user of any changes.
"""
UMESSAGES_USE_MESSAGES = geta... |
497f3a61b7f7fb758ba7093e04310621842bbcd7 | splunklib/__init__.py | splunklib/__init__.py | # Copyright 2011-2012 Splunk, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"): you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | # Copyright 2011-2012 Splunk, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"): you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | Bump version number if preparation for release. | Bump version number if preparation for release.
| Python | apache-2.0 | sullivanmatt/splunk-sdk-python,kkirsche/splunk-sdk-python,kkirsche/splunk-sdk-python,kkirsche/splunk-sdk-python,splunk/splunk-sdk-python,ww9rivers/splunk-sdk-python,splunk/splunk-sdk-python,lowtalker/splunk-sdk-python,kkirsche/splunk-sdk-python | # Copyright 2011-2012 Splunk, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"): you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | # Copyright 2011-2012 Splunk, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"): you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | <commit_before># Copyright 2011-2012 Splunk, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"): you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | # Copyright 2011-2012 Splunk, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"): you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | # Copyright 2011-2012 Splunk, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"): you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | <commit_before># Copyright 2011-2012 Splunk, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"): you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
bc9c0120523548d5a28c6a21f48831c1daa39af3 | tests/test_data_structures.py | tests/test_data_structures.py | try:
import unittest2 as unittest
except ImportError:
import unittest
import zstd
class TestCompressionParameters(unittest.TestCase):
def test_init_bad_arg_type(self):
with self.assertRaises(TypeError):
zstd.CompressionParameters()
with self.assertRaises(TypeError):
... | try:
import unittest2 as unittest
except ImportError:
import unittest
try:
import hypothesis
import hypothesis.strategies as strategies
except ImportError:
hypothesis = None
import zstd
class TestCompressionParameters(unittest.TestCase):
def test_init_bad_arg_type(self):
with self.ass... | Add hypothesis test to randomly generate CompressionParameters | Add hypothesis test to randomly generate CompressionParameters | Python | bsd-3-clause | terrelln/python-zstandard,indygreg/python-zstandard,terrelln/python-zstandard,terrelln/python-zstandard,indygreg/python-zstandard,indygreg/python-zstandard,indygreg/python-zstandard,terrelln/python-zstandard | try:
import unittest2 as unittest
except ImportError:
import unittest
import zstd
class TestCompressionParameters(unittest.TestCase):
def test_init_bad_arg_type(self):
with self.assertRaises(TypeError):
zstd.CompressionParameters()
with self.assertRaises(TypeError):
... | try:
import unittest2 as unittest
except ImportError:
import unittest
try:
import hypothesis
import hypothesis.strategies as strategies
except ImportError:
hypothesis = None
import zstd
class TestCompressionParameters(unittest.TestCase):
def test_init_bad_arg_type(self):
with self.ass... | <commit_before>try:
import unittest2 as unittest
except ImportError:
import unittest
import zstd
class TestCompressionParameters(unittest.TestCase):
def test_init_bad_arg_type(self):
with self.assertRaises(TypeError):
zstd.CompressionParameters()
with self.assertRaises(TypeErr... | try:
import unittest2 as unittest
except ImportError:
import unittest
try:
import hypothesis
import hypothesis.strategies as strategies
except ImportError:
hypothesis = None
import zstd
class TestCompressionParameters(unittest.TestCase):
def test_init_bad_arg_type(self):
with self.ass... | try:
import unittest2 as unittest
except ImportError:
import unittest
import zstd
class TestCompressionParameters(unittest.TestCase):
def test_init_bad_arg_type(self):
with self.assertRaises(TypeError):
zstd.CompressionParameters()
with self.assertRaises(TypeError):
... | <commit_before>try:
import unittest2 as unittest
except ImportError:
import unittest
import zstd
class TestCompressionParameters(unittest.TestCase):
def test_init_bad_arg_type(self):
with self.assertRaises(TypeError):
zstd.CompressionParameters()
with self.assertRaises(TypeErr... |
4ca1c0bf5e950ab9710d8a76aa788a5f22641395 | wagtail_mvc/tests.py | wagtail_mvc/tests.py | # -*- coding: utf-8 -*-
"""
wagtail_mvc tests
"""
from __future__ import unicode_literals
from django.test import TestCase
from mock import Mock
from wagtail_mvc.models import WagtailMvcViewWrapper
class WagtailMvcViewWrapperTestCase(TestCase):
"""
Tests the WagtailMvcViewWrapper
"""
def setUp(self):
... | # -*- coding: utf-8 -*-
"""
wagtail_mvc tests
"""
from __future__ import unicode_literals
from django.test import TestCase
from mock import Mock
from wagtail_mvc.models import WagtailMvcViewWrapper
class WagtailMvcViewWrapperTestCase(TestCase):
"""
Tests the WagtailMvcViewWrapper
"""
def setUp(self):
... | Add test stubs for Model Mixin behaviour | Add test stubs for Model Mixin behaviour
| Python | mit | fatboystring/Wagtail-MVC,fatboystring/Wagtail-MVC | # -*- coding: utf-8 -*-
"""
wagtail_mvc tests
"""
from __future__ import unicode_literals
from django.test import TestCase
from mock import Mock
from wagtail_mvc.models import WagtailMvcViewWrapper
class WagtailMvcViewWrapperTestCase(TestCase):
"""
Tests the WagtailMvcViewWrapper
"""
def setUp(self):
... | # -*- coding: utf-8 -*-
"""
wagtail_mvc tests
"""
from __future__ import unicode_literals
from django.test import TestCase
from mock import Mock
from wagtail_mvc.models import WagtailMvcViewWrapper
class WagtailMvcViewWrapperTestCase(TestCase):
"""
Tests the WagtailMvcViewWrapper
"""
def setUp(self):
... | <commit_before># -*- coding: utf-8 -*-
"""
wagtail_mvc tests
"""
from __future__ import unicode_literals
from django.test import TestCase
from mock import Mock
from wagtail_mvc.models import WagtailMvcViewWrapper
class WagtailMvcViewWrapperTestCase(TestCase):
"""
Tests the WagtailMvcViewWrapper
"""
de... | # -*- coding: utf-8 -*-
"""
wagtail_mvc tests
"""
from __future__ import unicode_literals
from django.test import TestCase
from mock import Mock
from wagtail_mvc.models import WagtailMvcViewWrapper
class WagtailMvcViewWrapperTestCase(TestCase):
"""
Tests the WagtailMvcViewWrapper
"""
def setUp(self):
... | # -*- coding: utf-8 -*-
"""
wagtail_mvc tests
"""
from __future__ import unicode_literals
from django.test import TestCase
from mock import Mock
from wagtail_mvc.models import WagtailMvcViewWrapper
class WagtailMvcViewWrapperTestCase(TestCase):
"""
Tests the WagtailMvcViewWrapper
"""
def setUp(self):
... | <commit_before># -*- coding: utf-8 -*-
"""
wagtail_mvc tests
"""
from __future__ import unicode_literals
from django.test import TestCase
from mock import Mock
from wagtail_mvc.models import WagtailMvcViewWrapper
class WagtailMvcViewWrapperTestCase(TestCase):
"""
Tests the WagtailMvcViewWrapper
"""
de... |
9c596afebfe5fb6746ec2a157d71bb315b02c0cf | tests/unit/test_exceptions.py | tests/unit/test_exceptions.py | #!/usr/bin/env
# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "licens... | #!/usr/bin/env
# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "licens... | Add test to check excplicitly if the attribute is set | Add test to check excplicitly if the attribute is set
| Python | apache-2.0 | boto/botocore,pplu/botocore | #!/usr/bin/env
# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "licens... | #!/usr/bin/env
# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "licens... | <commit_before>#!/usr/bin/env
# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or... | #!/usr/bin/env
# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "licens... | #!/usr/bin/env
# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "licens... | <commit_before>#!/usr/bin/env
# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or... |
e4580a598e7d930ad90f5480751804fc1fa89826 | pronto/__init__.py | pronto/__init__.py | import pkg_resources
__author__ = "Martin Larralde <[email protected]>"
__license__ = "MIT"
__version__ = pkg_resources.resource_string(__name__, "_version.txt").decode('utf-8').strip()
from .ontology import Ontology # noqa: F401
from .term import Term # noqa: F401
from .definition import Definition # noqa: ... | import pkg_resources
__author__ = "Martin Larralde <[email protected]>"
__license__ = "MIT"
__version__ = (
__import__('pkg_resources')
.resource_string(__name__, "_version.txt")
.decode('utf-8')
.strip()
)
from .ontology import Ontology # noqa: F401
from .term import Term # noqa: F401
from .d... | Remove `pkg_resources` from the top-level package | Remove `pkg_resources` from the top-level package
| Python | mit | althonos/pronto | import pkg_resources
__author__ = "Martin Larralde <[email protected]>"
__license__ = "MIT"
__version__ = pkg_resources.resource_string(__name__, "_version.txt").decode('utf-8').strip()
from .ontology import Ontology # noqa: F401
from .term import Term # noqa: F401
from .definition import Definition # noqa: ... | import pkg_resources
__author__ = "Martin Larralde <[email protected]>"
__license__ = "MIT"
__version__ = (
__import__('pkg_resources')
.resource_string(__name__, "_version.txt")
.decode('utf-8')
.strip()
)
from .ontology import Ontology # noqa: F401
from .term import Term # noqa: F401
from .d... | <commit_before>import pkg_resources
__author__ = "Martin Larralde <[email protected]>"
__license__ = "MIT"
__version__ = pkg_resources.resource_string(__name__, "_version.txt").decode('utf-8').strip()
from .ontology import Ontology # noqa: F401
from .term import Term # noqa: F401
from .definition import Defin... | import pkg_resources
__author__ = "Martin Larralde <[email protected]>"
__license__ = "MIT"
__version__ = (
__import__('pkg_resources')
.resource_string(__name__, "_version.txt")
.decode('utf-8')
.strip()
)
from .ontology import Ontology # noqa: F401
from .term import Term # noqa: F401
from .d... | import pkg_resources
__author__ = "Martin Larralde <[email protected]>"
__license__ = "MIT"
__version__ = pkg_resources.resource_string(__name__, "_version.txt").decode('utf-8').strip()
from .ontology import Ontology # noqa: F401
from .term import Term # noqa: F401
from .definition import Definition # noqa: ... | <commit_before>import pkg_resources
__author__ = "Martin Larralde <[email protected]>"
__license__ = "MIT"
__version__ = pkg_resources.resource_string(__name__, "_version.txt").decode('utf-8').strip()
from .ontology import Ontology # noqa: F401
from .term import Term # noqa: F401
from .definition import Defin... |
1c65f476c34345267cadb4851fb4fb2ca21333c4 | axelrod/strategies/__init__.py | axelrod/strategies/__init__.py | from cooperator import *
from defector import *
from grudger import *
from rand import *
from titfortat import *
from gobymajority import *
from alternator import *
from averagecopier import *
from grumpy import *
strategies = [
Defector,
Cooperator,
TitForTat,
Grudger,
GoByMaj... | from cooperator import *
from defector import *
from grudger import *
from rand import *
from titfortat import *
from gobymajority import *
from alternator import *
from averagecopier import *
from grumpy import *
from inverse import *
strategies = [
Defector,
Cooperator,
TitForTat,
Gr... | Change init to add inverse strategy | Change init to add inverse strategy | Python | mit | bootandy/Axelrod,emmagordon/Axelrod,mojones/Axelrod,drvinceknight/Axelrod,emmagordon/Axelrod,kathryncrouch/Axelrod,bootandy/Axelrod,risicle/Axelrod,uglyfruitcake/Axelrod,kathryncrouch/Axelrod,mojones/Axelrod,uglyfruitcake/Axelrod,risicle/Axelrod | from cooperator import *
from defector import *
from grudger import *
from rand import *
from titfortat import *
from gobymajority import *
from alternator import *
from averagecopier import *
from grumpy import *
strategies = [
Defector,
Cooperator,
TitForTat,
Grudger,
GoByMaj... | from cooperator import *
from defector import *
from grudger import *
from rand import *
from titfortat import *
from gobymajority import *
from alternator import *
from averagecopier import *
from grumpy import *
from inverse import *
strategies = [
Defector,
Cooperator,
TitForTat,
Gr... | <commit_before>from cooperator import *
from defector import *
from grudger import *
from rand import *
from titfortat import *
from gobymajority import *
from alternator import *
from averagecopier import *
from grumpy import *
strategies = [
Defector,
Cooperator,
TitForTat,
Grudger,
... | from cooperator import *
from defector import *
from grudger import *
from rand import *
from titfortat import *
from gobymajority import *
from alternator import *
from averagecopier import *
from grumpy import *
from inverse import *
strategies = [
Defector,
Cooperator,
TitForTat,
Gr... | from cooperator import *
from defector import *
from grudger import *
from rand import *
from titfortat import *
from gobymajority import *
from alternator import *
from averagecopier import *
from grumpy import *
strategies = [
Defector,
Cooperator,
TitForTat,
Grudger,
GoByMaj... | <commit_before>from cooperator import *
from defector import *
from grudger import *
from rand import *
from titfortat import *
from gobymajority import *
from alternator import *
from averagecopier import *
from grumpy import *
strategies = [
Defector,
Cooperator,
TitForTat,
Grudger,
... |
074c6fb8bf3f7092920ccae04de26a1a822c38a9 | tohu/v3/derived_generators.py | tohu/v3/derived_generators.py | from .base import TohuBaseGenerator
DERIVED_GENERATORS = ['Apply']
__all__ = DERIVED_GENERATORS + ['DERIVED_GENERATORS']
class Apply(TohuBaseGenerator):
def __init__(self, func, *arg_gens, **kwarg_gens):
self.func = func
self.orig_arg_gens = arg_gens
self.orig_kwarg_gens = kwarg_gens
... | from .base import TohuBaseGenerator
DERIVED_GENERATORS = ['Apply']
__all__ = DERIVED_GENERATORS + ['DERIVED_GENERATORS']
class Apply(TohuBaseGenerator):
def __init__(self, func, *arg_gens, **kwarg_gens):
super().__init__()
self.func = func
self.orig_arg_gens = arg_gens
self.orig... | Add spawn method to Apply; initialise clones by calling super().__init__() | Add spawn method to Apply; initialise clones by calling super().__init__()
| Python | mit | maxalbert/tohu | from .base import TohuBaseGenerator
DERIVED_GENERATORS = ['Apply']
__all__ = DERIVED_GENERATORS + ['DERIVED_GENERATORS']
class Apply(TohuBaseGenerator):
def __init__(self, func, *arg_gens, **kwarg_gens):
self.func = func
self.orig_arg_gens = arg_gens
self.orig_kwarg_gens = kwarg_gens
... | from .base import TohuBaseGenerator
DERIVED_GENERATORS = ['Apply']
__all__ = DERIVED_GENERATORS + ['DERIVED_GENERATORS']
class Apply(TohuBaseGenerator):
def __init__(self, func, *arg_gens, **kwarg_gens):
super().__init__()
self.func = func
self.orig_arg_gens = arg_gens
self.orig... | <commit_before>from .base import TohuBaseGenerator
DERIVED_GENERATORS = ['Apply']
__all__ = DERIVED_GENERATORS + ['DERIVED_GENERATORS']
class Apply(TohuBaseGenerator):
def __init__(self, func, *arg_gens, **kwarg_gens):
self.func = func
self.orig_arg_gens = arg_gens
self.orig_kwarg_gens ... | from .base import TohuBaseGenerator
DERIVED_GENERATORS = ['Apply']
__all__ = DERIVED_GENERATORS + ['DERIVED_GENERATORS']
class Apply(TohuBaseGenerator):
def __init__(self, func, *arg_gens, **kwarg_gens):
super().__init__()
self.func = func
self.orig_arg_gens = arg_gens
self.orig... | from .base import TohuBaseGenerator
DERIVED_GENERATORS = ['Apply']
__all__ = DERIVED_GENERATORS + ['DERIVED_GENERATORS']
class Apply(TohuBaseGenerator):
def __init__(self, func, *arg_gens, **kwarg_gens):
self.func = func
self.orig_arg_gens = arg_gens
self.orig_kwarg_gens = kwarg_gens
... | <commit_before>from .base import TohuBaseGenerator
DERIVED_GENERATORS = ['Apply']
__all__ = DERIVED_GENERATORS + ['DERIVED_GENERATORS']
class Apply(TohuBaseGenerator):
def __init__(self, func, *arg_gens, **kwarg_gens):
self.func = func
self.orig_arg_gens = arg_gens
self.orig_kwarg_gens ... |
e2fc339b20f013d561ed7365a20d0b39c24dcb46 | scikits/talkbox/__init__.py | scikits/talkbox/__init__.py | from lpc import *
import lpc
__all__ = lpc.__all__
| from lpc import *
import lpc
__all__ = lpc.__all__
from tools import *
import tools
__all__ += tools.__all__
| Add tools general imports to talkbox namespace. | Add tools general imports to talkbox namespace.
| Python | mit | cournape/talkbox,cournape/talkbox | from lpc import *
import lpc
__all__ = lpc.__all__
Add tools general imports to talkbox namespace. | from lpc import *
import lpc
__all__ = lpc.__all__
from tools import *
import tools
__all__ += tools.__all__
| <commit_before>from lpc import *
import lpc
__all__ = lpc.__all__
<commit_msg>Add tools general imports to talkbox namespace.<commit_after> | from lpc import *
import lpc
__all__ = lpc.__all__
from tools import *
import tools
__all__ += tools.__all__
| from lpc import *
import lpc
__all__ = lpc.__all__
Add tools general imports to talkbox namespace.from lpc import *
import lpc
__all__ = lpc.__all__
from tools import *
import tools
__all__ += tools.__all__
| <commit_before>from lpc import *
import lpc
__all__ = lpc.__all__
<commit_msg>Add tools general imports to talkbox namespace.<commit_after>from lpc import *
import lpc
__all__ = lpc.__all__
from tools import *
import tools
__all__ += tools.__all__
|
e9fd097aac951e6d38246fc4fb01db0e0b6513eb | scikits/talkbox/__init__.py | scikits/talkbox/__init__.py | from linpred import *
import linpred
__all__ = linpred.__all__
from tools import *
import tools
__all__ += tools.__all__
| from linpred import *
import linpred
__all__ = linpred.__all__
from tools import *
import tools
__all__ += tools.__all__
from numpy.testing import Tester
test = Tester().test
bench = Tester().bench
| Add module-wide bench and test functions. | Add module-wide bench and test functions.
| Python | mit | cournape/talkbox,cournape/talkbox | from linpred import *
import linpred
__all__ = linpred.__all__
from tools import *
import tools
__all__ += tools.__all__
Add module-wide bench and test functions. | from linpred import *
import linpred
__all__ = linpred.__all__
from tools import *
import tools
__all__ += tools.__all__
from numpy.testing import Tester
test = Tester().test
bench = Tester().bench
| <commit_before>from linpred import *
import linpred
__all__ = linpred.__all__
from tools import *
import tools
__all__ += tools.__all__
<commit_msg>Add module-wide bench and test functions.<commit_after> | from linpred import *
import linpred
__all__ = linpred.__all__
from tools import *
import tools
__all__ += tools.__all__
from numpy.testing import Tester
test = Tester().test
bench = Tester().bench
| from linpred import *
import linpred
__all__ = linpred.__all__
from tools import *
import tools
__all__ += tools.__all__
Add module-wide bench and test functions.from linpred import *
import linpred
__all__ = linpred.__all__
from tools import *
import tools
__all__ += tools.__all__
from numpy.testing import Tester
... | <commit_before>from linpred import *
import linpred
__all__ = linpred.__all__
from tools import *
import tools
__all__ += tools.__all__
<commit_msg>Add module-wide bench and test functions.<commit_after>from linpred import *
import linpred
__all__ = linpred.__all__
from tools import *
import tools
__all__ += tools.__... |
5252e86a9613545cbd6db2f0867276abac994282 | run.py | run.py | from flask import Flask, request, redirect
import twilio.twiml
app = Flask(__name__)
@app.route("/", methods=['GET', 'POST'])
def hello_monkey():
"""Respond to incoming requests"""
resp = twilio.twiml.Response()
with resp.gather(numDigits=1, action="/handle-key", method="POST") as g:
g.say("pres... | from flask import Flask, request, redirect
import twilio.twiml
app = Flask(__name__)
@app.route("/", methods=['GET', 'POST'])
def hello_monkey():
"""Respond to incoming requests"""
resp = twilio.twiml.Response()
with resp.gather(numDigits=1, action="/handle-key", method="POST") as g:
g.say("pres... | Add ability to programatically play sound after button press | Add ability to programatically play sound after button press
| Python | mit | ColdSauce/tw-1,zachlatta/tw-1,christophert/tw-1 | from flask import Flask, request, redirect
import twilio.twiml
app = Flask(__name__)
@app.route("/", methods=['GET', 'POST'])
def hello_monkey():
"""Respond to incoming requests"""
resp = twilio.twiml.Response()
with resp.gather(numDigits=1, action="/handle-key", method="POST") as g:
g.say("pres... | from flask import Flask, request, redirect
import twilio.twiml
app = Flask(__name__)
@app.route("/", methods=['GET', 'POST'])
def hello_monkey():
"""Respond to incoming requests"""
resp = twilio.twiml.Response()
with resp.gather(numDigits=1, action="/handle-key", method="POST") as g:
g.say("pres... | <commit_before>from flask import Flask, request, redirect
import twilio.twiml
app = Flask(__name__)
@app.route("/", methods=['GET', 'POST'])
def hello_monkey():
"""Respond to incoming requests"""
resp = twilio.twiml.Response()
with resp.gather(numDigits=1, action="/handle-key", method="POST") as g:
... | from flask import Flask, request, redirect
import twilio.twiml
app = Flask(__name__)
@app.route("/", methods=['GET', 'POST'])
def hello_monkey():
"""Respond to incoming requests"""
resp = twilio.twiml.Response()
with resp.gather(numDigits=1, action="/handle-key", method="POST") as g:
g.say("pres... | from flask import Flask, request, redirect
import twilio.twiml
app = Flask(__name__)
@app.route("/", methods=['GET', 'POST'])
def hello_monkey():
"""Respond to incoming requests"""
resp = twilio.twiml.Response()
with resp.gather(numDigits=1, action="/handle-key", method="POST") as g:
g.say("pres... | <commit_before>from flask import Flask, request, redirect
import twilio.twiml
app = Flask(__name__)
@app.route("/", methods=['GET', 'POST'])
def hello_monkey():
"""Respond to incoming requests"""
resp = twilio.twiml.Response()
with resp.gather(numDigits=1, action="/handle-key", method="POST") as g:
... |
2cd0412ab14b92b7607d283d51e1650d008b6ad4 | scipy/spatial/setupscons.py | scipy/spatial/setupscons.py | #!/usr/bin/env python
from os.path import join
def configuration(parent_package = '', top_path = None):
from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
config = Configuration('cluster', parent_package, top_path)
config.add_data_dir('tests')
#config.add_extension('_vq',
... | #!/usr/bin/env python
from os.path import join
def configuration(parent_package = '', top_path = None):
from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
config = Configuration('spatial', parent_package, top_path)
config.add_data_dir('tests')
#config.add_extension('_vq',
... | Update setup.py file for numscons build. | Update setup.py file for numscons build.
git-svn-id: 003f22d385e25de9cff933a5ea4efd77cb5e7b28@4958 d6536bca-fef9-0310-8506-e4c0a848fbcf
| Python | bsd-3-clause | scipy/scipy-svn,scipy/scipy-svn,scipy/scipy-svn,jasonmccampbell/scipy-refactor,jasonmccampbell/scipy-refactor,jasonmccampbell/scipy-refactor,lesserwhirls/scipy-cwt,lesserwhirls/scipy-cwt,scipy/scipy-svn,lesserwhirls/scipy-cwt,lesserwhirls/scipy-cwt,jasonmccampbell/scipy-refactor | #!/usr/bin/env python
from os.path import join
def configuration(parent_package = '', top_path = None):
from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
config = Configuration('cluster', parent_package, top_path)
config.add_data_dir('tests')
#config.add_extension('_vq',
... | #!/usr/bin/env python
from os.path import join
def configuration(parent_package = '', top_path = None):
from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
config = Configuration('spatial', parent_package, top_path)
config.add_data_dir('tests')
#config.add_extension('_vq',
... | <commit_before>#!/usr/bin/env python
from os.path import join
def configuration(parent_package = '', top_path = None):
from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
config = Configuration('cluster', parent_package, top_path)
config.add_data_dir('tests')
#config.add_exte... | #!/usr/bin/env python
from os.path import join
def configuration(parent_package = '', top_path = None):
from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
config = Configuration('spatial', parent_package, top_path)
config.add_data_dir('tests')
#config.add_extension('_vq',
... | #!/usr/bin/env python
from os.path import join
def configuration(parent_package = '', top_path = None):
from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
config = Configuration('cluster', parent_package, top_path)
config.add_data_dir('tests')
#config.add_extension('_vq',
... | <commit_before>#!/usr/bin/env python
from os.path import join
def configuration(parent_package = '', top_path = None):
from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
config = Configuration('cluster', parent_package, top_path)
config.add_data_dir('tests')
#config.add_exte... |
a9bdf9ec691f0e688af41be1216977b9ce9c8976 | helpers.py | helpers.py | """ A bunch of helper functions that, when fixed up, will return the things we
need to make this website work! These functions use the weather and twitter APIs!!!
"""
## Import python libraries we need up here.
###############################################
### Problem One! ###
#########... | """ A bunch of helper functions that, when fixed up, will return the things we
need to make this website work! These functions use the weather and twitter APIs!!!
"""
## Import python libraries we need up here.
###############################################
### Problem One! ###
#########... | Set tweet limit to 30 tweets | Set tweet limit to 30 tweets
| Python | apache-2.0 | samanehsan/spark_github,samanehsan/spark_github,samanehsan/learn-git,samanehsan/learn-git | """ A bunch of helper functions that, when fixed up, will return the things we
need to make this website work! These functions use the weather and twitter APIs!!!
"""
## Import python libraries we need up here.
###############################################
### Problem One! ###
#########... | """ A bunch of helper functions that, when fixed up, will return the things we
need to make this website work! These functions use the weather and twitter APIs!!!
"""
## Import python libraries we need up here.
###############################################
### Problem One! ###
#########... | <commit_before>""" A bunch of helper functions that, when fixed up, will return the things we
need to make this website work! These functions use the weather and twitter APIs!!!
"""
## Import python libraries we need up here.
###############################################
### Problem One! ... | """ A bunch of helper functions that, when fixed up, will return the things we
need to make this website work! These functions use the weather and twitter APIs!!!
"""
## Import python libraries we need up here.
###############################################
### Problem One! ###
#########... | """ A bunch of helper functions that, when fixed up, will return the things we
need to make this website work! These functions use the weather and twitter APIs!!!
"""
## Import python libraries we need up here.
###############################################
### Problem One! ###
#########... | <commit_before>""" A bunch of helper functions that, when fixed up, will return the things we
need to make this website work! These functions use the weather and twitter APIs!!!
"""
## Import python libraries we need up here.
###############################################
### Problem One! ... |
93bd76fc99ef6f399393761aef11c0840e587b2d | update-zips.py | update-zips.py | #!/usr/bin/env python3
"""Remake the ziptestdata.zip file.
Run this to rebuild the importlib_resources/tests/data/ziptestdata.zip file,
e.g. if you want to add a new file to the zip.
This will replace the file with the new build, but it won't commit anything to
git.
"""
import contextlib
import os
import pathlib
fr... | #!/usr/bin/env python3
"""Remake the ziptestdata.zip file.
Run this to rebuild the importlib_resources/tests/data/ziptestdata.zip file,
e.g. if you want to add a new file to the zip.
This will replace the file with the new build, but it won't commit anything to
git.
"""
import contextlib
import os
import pathlib
fr... | Use relative_to instead of string manipulation | Use relative_to instead of string manipulation
| Python | apache-2.0 | python/importlib_resources | #!/usr/bin/env python3
"""Remake the ziptestdata.zip file.
Run this to rebuild the importlib_resources/tests/data/ziptestdata.zip file,
e.g. if you want to add a new file to the zip.
This will replace the file with the new build, but it won't commit anything to
git.
"""
import contextlib
import os
import pathlib
fr... | #!/usr/bin/env python3
"""Remake the ziptestdata.zip file.
Run this to rebuild the importlib_resources/tests/data/ziptestdata.zip file,
e.g. if you want to add a new file to the zip.
This will replace the file with the new build, but it won't commit anything to
git.
"""
import contextlib
import os
import pathlib
fr... | <commit_before>#!/usr/bin/env python3
"""Remake the ziptestdata.zip file.
Run this to rebuild the importlib_resources/tests/data/ziptestdata.zip file,
e.g. if you want to add a new file to the zip.
This will replace the file with the new build, but it won't commit anything to
git.
"""
import contextlib
import os
im... | #!/usr/bin/env python3
"""Remake the ziptestdata.zip file.
Run this to rebuild the importlib_resources/tests/data/ziptestdata.zip file,
e.g. if you want to add a new file to the zip.
This will replace the file with the new build, but it won't commit anything to
git.
"""
import contextlib
import os
import pathlib
fr... | #!/usr/bin/env python3
"""Remake the ziptestdata.zip file.
Run this to rebuild the importlib_resources/tests/data/ziptestdata.zip file,
e.g. if you want to add a new file to the zip.
This will replace the file with the new build, but it won't commit anything to
git.
"""
import contextlib
import os
import pathlib
fr... | <commit_before>#!/usr/bin/env python3
"""Remake the ziptestdata.zip file.
Run this to rebuild the importlib_resources/tests/data/ziptestdata.zip file,
e.g. if you want to add a new file to the zip.
This will replace the file with the new build, but it won't commit anything to
git.
"""
import contextlib
import os
im... |
c6716b20a43bafc0fbcec0d1c159fe55e87b22cc | totalimpactwebapp/__init__.py | totalimpactwebapp/__init__.py | import os, logging, sys
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager
# set up logging
# see http://wiki.pylonshq.com/display/pylonscookbook/Alternative+logging+configuration
logging.basicConfig(
stream=sys.stdout,
level=logging.DEBUG,
format='... | import os, logging, sys
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager
# set up logging
# see http://wiki.pylonshq.com/display/pylonscookbook/Alternative+logging+configuration
logging.basicConfig(
stream=sys.stdout,
level=logging.DEBUG,
format='... | Allow URLs to end with spaces even if they're not defined that way in views. | Allow URLs to end with spaces even if they're not defined that way in views.
Closes #35
See http://flask.pocoo.org/mailinglist/archive/2011/2/27/re-automatic-removal-of-trailing-slashes/#043b1a0b6e841ab8e7d38bd7374cbb58
| Python | mit | total-impact/total-impact-webapp,Impactstory/total-impact-webapp,total-impact/total-impact-webapp,Impactstory/total-impact-webapp,Impactstory/total-impact-webapp,total-impact/total-impact-webapp,Impactstory/total-impact-webapp,total-impact/total-impact-webapp | import os, logging, sys
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager
# set up logging
# see http://wiki.pylonshq.com/display/pylonscookbook/Alternative+logging+configuration
logging.basicConfig(
stream=sys.stdout,
level=logging.DEBUG,
format='... | import os, logging, sys
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager
# set up logging
# see http://wiki.pylonshq.com/display/pylonscookbook/Alternative+logging+configuration
logging.basicConfig(
stream=sys.stdout,
level=logging.DEBUG,
format='... | <commit_before>import os, logging, sys
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager
# set up logging
# see http://wiki.pylonshq.com/display/pylonscookbook/Alternative+logging+configuration
logging.basicConfig(
stream=sys.stdout,
level=logging.DEBU... | import os, logging, sys
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager
# set up logging
# see http://wiki.pylonshq.com/display/pylonscookbook/Alternative+logging+configuration
logging.basicConfig(
stream=sys.stdout,
level=logging.DEBUG,
format='... | import os, logging, sys
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager
# set up logging
# see http://wiki.pylonshq.com/display/pylonscookbook/Alternative+logging+configuration
logging.basicConfig(
stream=sys.stdout,
level=logging.DEBUG,
format='... | <commit_before>import os, logging, sys
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager
# set up logging
# see http://wiki.pylonshq.com/display/pylonscookbook/Alternative+logging+configuration
logging.basicConfig(
stream=sys.stdout,
level=logging.DEBU... |
97940ed6ddd7d50feb47a932be096be5b223b1f0 | assassins/assassins/views.py | assassins/assassins/views.py | from django.shortcuts import render, redirect
from django.contrib.auth import views as auth_views
# Create your views here.
def index(request):
pass
def login(request, **kwargs):
if request.user.is_authenticated():
return redirect('index')
else:
return auth_views.login(request)
| from django.shortcuts import render, redirect
from django.contrib.auth import views as auth_views
from django.views.decorators.http import require_POST
# Create your views here.
def index(request):
pass
@require_POST
def login(request, **kwargs):
if request.user.is_authenticated():
return redirect('index')
else:... | Modify login view to be a post endpoint | Modify login view to be a post endpoint
| Python | mit | Squa256/assassins,bobandbetty/assassins,bobandbetty/assassins,bobandbetty/assassins,Squa256/assassins,Squa256/assassins | from django.shortcuts import render, redirect
from django.contrib.auth import views as auth_views
# Create your views here.
def index(request):
pass
def login(request, **kwargs):
if request.user.is_authenticated():
return redirect('index')
else:
return auth_views.login(request)
Modify login view to be a post e... | from django.shortcuts import render, redirect
from django.contrib.auth import views as auth_views
from django.views.decorators.http import require_POST
# Create your views here.
def index(request):
pass
@require_POST
def login(request, **kwargs):
if request.user.is_authenticated():
return redirect('index')
else:... | <commit_before>from django.shortcuts import render, redirect
from django.contrib.auth import views as auth_views
# Create your views here.
def index(request):
pass
def login(request, **kwargs):
if request.user.is_authenticated():
return redirect('index')
else:
return auth_views.login(request)
<commit_msg>Modif... | from django.shortcuts import render, redirect
from django.contrib.auth import views as auth_views
from django.views.decorators.http import require_POST
# Create your views here.
def index(request):
pass
@require_POST
def login(request, **kwargs):
if request.user.is_authenticated():
return redirect('index')
else:... | from django.shortcuts import render, redirect
from django.contrib.auth import views as auth_views
# Create your views here.
def index(request):
pass
def login(request, **kwargs):
if request.user.is_authenticated():
return redirect('index')
else:
return auth_views.login(request)
Modify login view to be a post e... | <commit_before>from django.shortcuts import render, redirect
from django.contrib.auth import views as auth_views
# Create your views here.
def index(request):
pass
def login(request, **kwargs):
if request.user.is_authenticated():
return redirect('index')
else:
return auth_views.login(request)
<commit_msg>Modif... |
da990bff61c0088f239defac486da1303f97c08a | app/admin/routes.py | app/admin/routes.py | from flask import render_template, redirect, url_for, flash, request
from flask.ext.login import login_required, current_user
from . import admin
from .forms import ProfileForm
from .. import db
from ..models import User
@admin.route('/')
@login_required
def index():
return render_template('admin/user.html', user=... | from flask import render_template, redirect, url_for, flash, request
from flask.ext.login import login_required, current_user
from . import admin
from .forms import ProfileForm
from .. import db
from ..models import User
@admin.route('/')
@login_required
def index():
return render_template('admin/user.html', user=... | Add a route to admin/news | Add a route to admin/news
| Python | mit | finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is | from flask import render_template, redirect, url_for, flash, request
from flask.ext.login import login_required, current_user
from . import admin
from .forms import ProfileForm
from .. import db
from ..models import User
@admin.route('/')
@login_required
def index():
return render_template('admin/user.html', user=... | from flask import render_template, redirect, url_for, flash, request
from flask.ext.login import login_required, current_user
from . import admin
from .forms import ProfileForm
from .. import db
from ..models import User
@admin.route('/')
@login_required
def index():
return render_template('admin/user.html', user=... | <commit_before>from flask import render_template, redirect, url_for, flash, request
from flask.ext.login import login_required, current_user
from . import admin
from .forms import ProfileForm
from .. import db
from ..models import User
@admin.route('/')
@login_required
def index():
return render_template('admin/us... | from flask import render_template, redirect, url_for, flash, request
from flask.ext.login import login_required, current_user
from . import admin
from .forms import ProfileForm
from .. import db
from ..models import User
@admin.route('/')
@login_required
def index():
return render_template('admin/user.html', user=... | from flask import render_template, redirect, url_for, flash, request
from flask.ext.login import login_required, current_user
from . import admin
from .forms import ProfileForm
from .. import db
from ..models import User
@admin.route('/')
@login_required
def index():
return render_template('admin/user.html', user=... | <commit_before>from flask import render_template, redirect, url_for, flash, request
from flask.ext.login import login_required, current_user
from . import admin
from .forms import ProfileForm
from .. import db
from ..models import User
@admin.route('/')
@login_required
def index():
return render_template('admin/us... |
8c2b5fd2813c6d89fb8ac71c08760a8d799c31a2 | dev_config.py | dev_config.py | DEBUG = True
BOOTSTRAP_USE_MINIFIED = False
BOOTSTRAP_USE_CDN = False
BOOTSTRAP_FONTAWESOME = True
SECRET_KEY = "\xdb\xf1\xf6\x14\x88\xd4i\xda\xbc/E'4\x7f`iz\x98r\xb9s\x1c\xca\xcd"
SQLALCHEMY_DATABASE_URI = 'sqlite:///datamart.db'
| DEBUG = True
BOOTSTRAP_USE_MINIFIED = False
BOOTSTRAP_USE_CDN = False
BOOTSTRAP_FONTAWESOME = True
SECRET_KEY = "\xdb\xf1\xf6\x14\x88\xd4i\xda\xbc/E'4\x7f`iz\x98r\xb9s\x1c\xca\xcd"
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://datamart:datamart@localhost/datamart'
| Correct DB URI for postgres and hstore. | Correct DB URI for postgres and hstore.
| Python | mit | msscully/datamart,msscully/datamart,msscully/datamart | DEBUG = True
BOOTSTRAP_USE_MINIFIED = False
BOOTSTRAP_USE_CDN = False
BOOTSTRAP_FONTAWESOME = True
SECRET_KEY = "\xdb\xf1\xf6\x14\x88\xd4i\xda\xbc/E'4\x7f`iz\x98r\xb9s\x1c\xca\xcd"
SQLALCHEMY_DATABASE_URI = 'sqlite:///datamart.db'
Correct DB URI for postgres and hstore. | DEBUG = True
BOOTSTRAP_USE_MINIFIED = False
BOOTSTRAP_USE_CDN = False
BOOTSTRAP_FONTAWESOME = True
SECRET_KEY = "\xdb\xf1\xf6\x14\x88\xd4i\xda\xbc/E'4\x7f`iz\x98r\xb9s\x1c\xca\xcd"
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://datamart:datamart@localhost/datamart'
| <commit_before>DEBUG = True
BOOTSTRAP_USE_MINIFIED = False
BOOTSTRAP_USE_CDN = False
BOOTSTRAP_FONTAWESOME = True
SECRET_KEY = "\xdb\xf1\xf6\x14\x88\xd4i\xda\xbc/E'4\x7f`iz\x98r\xb9s\x1c\xca\xcd"
SQLALCHEMY_DATABASE_URI = 'sqlite:///datamart.db'
<commit_msg>Correct DB URI for postgres and hstore.<commit_after> | DEBUG = True
BOOTSTRAP_USE_MINIFIED = False
BOOTSTRAP_USE_CDN = False
BOOTSTRAP_FONTAWESOME = True
SECRET_KEY = "\xdb\xf1\xf6\x14\x88\xd4i\xda\xbc/E'4\x7f`iz\x98r\xb9s\x1c\xca\xcd"
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://datamart:datamart@localhost/datamart'
| DEBUG = True
BOOTSTRAP_USE_MINIFIED = False
BOOTSTRAP_USE_CDN = False
BOOTSTRAP_FONTAWESOME = True
SECRET_KEY = "\xdb\xf1\xf6\x14\x88\xd4i\xda\xbc/E'4\x7f`iz\x98r\xb9s\x1c\xca\xcd"
SQLALCHEMY_DATABASE_URI = 'sqlite:///datamart.db'
Correct DB URI for postgres and hstore.DEBUG = True
BOOTSTRAP_USE_MINIFIED = False
BOOTST... | <commit_before>DEBUG = True
BOOTSTRAP_USE_MINIFIED = False
BOOTSTRAP_USE_CDN = False
BOOTSTRAP_FONTAWESOME = True
SECRET_KEY = "\xdb\xf1\xf6\x14\x88\xd4i\xda\xbc/E'4\x7f`iz\x98r\xb9s\x1c\xca\xcd"
SQLALCHEMY_DATABASE_URI = 'sqlite:///datamart.db'
<commit_msg>Correct DB URI for postgres and hstore.<commit_after>DEBUG = T... |
992525f8b371582598fa915128eccd3528e427a6 | main.py | main.py | # coding: utf-8
from flask import Flask, abort, request, redirect, render_template, url_for
from log import log
import util
app = Flask(__name__)
app.config.from_pyfile('config.cfg', silent=True)
@app.route('/')
def home():
log.info('Fetching demo gist.')
gist_id = '5123482'
gist = util.get_gist_by_id(gis... | # coding: utf-8
from flask import Flask, abort, request, redirect, render_template, url_for
from log import log
import util
import os
app = Flask(__name__)
app.config.from_pyfile(os.path.join(os.path.dirname(__file__), 'config.cfg'), silent=True)
@app.route('/')
def home():
log.info('Fetching demo gist.')
gis... | Fix config file path error on the server | Fix config file path error on the server
| Python | mit | moreati/remarks,greatghoul/remarks,greatghoul/remarks,moreati/remarks,greatghoul/remarks,moreati/remarks | # coding: utf-8
from flask import Flask, abort, request, redirect, render_template, url_for
from log import log
import util
app = Flask(__name__)
app.config.from_pyfile('config.cfg', silent=True)
@app.route('/')
def home():
log.info('Fetching demo gist.')
gist_id = '5123482'
gist = util.get_gist_by_id(gis... | # coding: utf-8
from flask import Flask, abort, request, redirect, render_template, url_for
from log import log
import util
import os
app = Flask(__name__)
app.config.from_pyfile(os.path.join(os.path.dirname(__file__), 'config.cfg'), silent=True)
@app.route('/')
def home():
log.info('Fetching demo gist.')
gis... | <commit_before># coding: utf-8
from flask import Flask, abort, request, redirect, render_template, url_for
from log import log
import util
app = Flask(__name__)
app.config.from_pyfile('config.cfg', silent=True)
@app.route('/')
def home():
log.info('Fetching demo gist.')
gist_id = '5123482'
gist = util.get... | # coding: utf-8
from flask import Flask, abort, request, redirect, render_template, url_for
from log import log
import util
import os
app = Flask(__name__)
app.config.from_pyfile(os.path.join(os.path.dirname(__file__), 'config.cfg'), silent=True)
@app.route('/')
def home():
log.info('Fetching demo gist.')
gis... | # coding: utf-8
from flask import Flask, abort, request, redirect, render_template, url_for
from log import log
import util
app = Flask(__name__)
app.config.from_pyfile('config.cfg', silent=True)
@app.route('/')
def home():
log.info('Fetching demo gist.')
gist_id = '5123482'
gist = util.get_gist_by_id(gis... | <commit_before># coding: utf-8
from flask import Flask, abort, request, redirect, render_template, url_for
from log import log
import util
app = Flask(__name__)
app.config.from_pyfile('config.cfg', silent=True)
@app.route('/')
def home():
log.info('Fetching demo gist.')
gist_id = '5123482'
gist = util.get... |
2d8b7253445193131d027bd12d3389bbc03858e5 | massa/__init__.py | massa/__init__.py | # -*- coding: utf-8 -*-
from flask import Flask, render_template, g
from .container import build
from .web import bp as web
from .api import bp as api
from .middleware import HTTPMethodOverrideMiddleware
def create_app(config=None):
app = Flask('massa')
app.config.from_object(config or 'massa.config.Producti... | # -*- coding: utf-8 -*-
from flask import Flask, g
from .container import build
from .web import bp as web
from .api import bp as api
from .middleware import HTTPMethodOverrideMiddleware
def create_app(config=None):
app = Flask('massa')
app.config.from_object(config or 'massa.config.Production')
app.conf... | Remove unused render_template from import statement. | Remove unused render_template from import statement. | Python | mit | jaapverloop/massa | # -*- coding: utf-8 -*-
from flask import Flask, render_template, g
from .container import build
from .web import bp as web
from .api import bp as api
from .middleware import HTTPMethodOverrideMiddleware
def create_app(config=None):
app = Flask('massa')
app.config.from_object(config or 'massa.config.Producti... | # -*- coding: utf-8 -*-
from flask import Flask, g
from .container import build
from .web import bp as web
from .api import bp as api
from .middleware import HTTPMethodOverrideMiddleware
def create_app(config=None):
app = Flask('massa')
app.config.from_object(config or 'massa.config.Production')
app.conf... | <commit_before># -*- coding: utf-8 -*-
from flask import Flask, render_template, g
from .container import build
from .web import bp as web
from .api import bp as api
from .middleware import HTTPMethodOverrideMiddleware
def create_app(config=None):
app = Flask('massa')
app.config.from_object(config or 'massa.... | # -*- coding: utf-8 -*-
from flask import Flask, g
from .container import build
from .web import bp as web
from .api import bp as api
from .middleware import HTTPMethodOverrideMiddleware
def create_app(config=None):
app = Flask('massa')
app.config.from_object(config or 'massa.config.Production')
app.conf... | # -*- coding: utf-8 -*-
from flask import Flask, render_template, g
from .container import build
from .web import bp as web
from .api import bp as api
from .middleware import HTTPMethodOverrideMiddleware
def create_app(config=None):
app = Flask('massa')
app.config.from_object(config or 'massa.config.Producti... | <commit_before># -*- coding: utf-8 -*-
from flask import Flask, render_template, g
from .container import build
from .web import bp as web
from .api import bp as api
from .middleware import HTTPMethodOverrideMiddleware
def create_app(config=None):
app = Flask('massa')
app.config.from_object(config or 'massa.... |
4c258d04f8859632a1d7728a143b6a60e37199cf | plasmapy/utils/tests/test_pytest_helpers.py | plasmapy/utils/tests/test_pytest_helpers.py | import pytest
from ..pytest_helpers import (
_function_call_string,
run_test_of_function,
)
def f(*args, **kwargs):
return None
# f, args, kwargs, expected
call_string_table = [
(f, (), {}, "f()"),
(f, (1), {}, "f(1)"),
(f, ('x'), {}, "f('x')"),
(f, (1, 'b', {}), {}, "f(1, 'b', {})"),
... | Add tests for function to reproduce a call string | Add tests for function to reproduce a call string
| Python | bsd-3-clause | StanczakDominik/PlasmaPy | Add tests for function to reproduce a call string | import pytest
from ..pytest_helpers import (
_function_call_string,
run_test_of_function,
)
def f(*args, **kwargs):
return None
# f, args, kwargs, expected
call_string_table = [
(f, (), {}, "f()"),
(f, (1), {}, "f(1)"),
(f, ('x'), {}, "f('x')"),
(f, (1, 'b', {}), {}, "f(1, 'b', {})"),
... | <commit_before><commit_msg>Add tests for function to reproduce a call string<commit_after> | import pytest
from ..pytest_helpers import (
_function_call_string,
run_test_of_function,
)
def f(*args, **kwargs):
return None
# f, args, kwargs, expected
call_string_table = [
(f, (), {}, "f()"),
(f, (1), {}, "f(1)"),
(f, ('x'), {}, "f('x')"),
(f, (1, 'b', {}), {}, "f(1, 'b', {})"),
... | Add tests for function to reproduce a call stringimport pytest
from ..pytest_helpers import (
_function_call_string,
run_test_of_function,
)
def f(*args, **kwargs):
return None
# f, args, kwargs, expected
call_string_table = [
(f, (), {}, "f()"),
(f, (1), {}, "f(1)"),
(f, ('x'), {}, "f('x')... | <commit_before><commit_msg>Add tests for function to reproduce a call string<commit_after>import pytest
from ..pytest_helpers import (
_function_call_string,
run_test_of_function,
)
def f(*args, **kwargs):
return None
# f, args, kwargs, expected
call_string_table = [
(f, (), {}, "f()"),
(f, (1)... | |
a1e1340285e190f5b0cc3cce2c4155cb313df6a7 | wafer/schedule/serializers.py | wafer/schedule/serializers.py | from rest_framework import serializers
from wafer.talks.models import Talk
from wafer.pages.models import Page
from wafer.schedule.models import ScheduleItem, Venue, Slot
class ScheduleItemSerializer(serializers.HyperlinkedModelSerializer):
page = serializers.PrimaryKeyRelatedField(
allow_null=True, quer... | from rest_framework import serializers
from wafer.talks.models import Talk
from wafer.pages.models import Page
from wafer.schedule.models import ScheduleItem, Venue, Slot
class ScheduleItemSerializer(serializers.HyperlinkedModelSerializer):
page = serializers.PrimaryKeyRelatedField(
allow_null=True, quer... | Clear extra fields when changing items through the schedule view | Clear extra fields when changing items through the schedule view
| Python | isc | CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer | from rest_framework import serializers
from wafer.talks.models import Talk
from wafer.pages.models import Page
from wafer.schedule.models import ScheduleItem, Venue, Slot
class ScheduleItemSerializer(serializers.HyperlinkedModelSerializer):
page = serializers.PrimaryKeyRelatedField(
allow_null=True, quer... | from rest_framework import serializers
from wafer.talks.models import Talk
from wafer.pages.models import Page
from wafer.schedule.models import ScheduleItem, Venue, Slot
class ScheduleItemSerializer(serializers.HyperlinkedModelSerializer):
page = serializers.PrimaryKeyRelatedField(
allow_null=True, quer... | <commit_before>from rest_framework import serializers
from wafer.talks.models import Talk
from wafer.pages.models import Page
from wafer.schedule.models import ScheduleItem, Venue, Slot
class ScheduleItemSerializer(serializers.HyperlinkedModelSerializer):
page = serializers.PrimaryKeyRelatedField(
allow_... | from rest_framework import serializers
from wafer.talks.models import Talk
from wafer.pages.models import Page
from wafer.schedule.models import ScheduleItem, Venue, Slot
class ScheduleItemSerializer(serializers.HyperlinkedModelSerializer):
page = serializers.PrimaryKeyRelatedField(
allow_null=True, quer... | from rest_framework import serializers
from wafer.talks.models import Talk
from wafer.pages.models import Page
from wafer.schedule.models import ScheduleItem, Venue, Slot
class ScheduleItemSerializer(serializers.HyperlinkedModelSerializer):
page = serializers.PrimaryKeyRelatedField(
allow_null=True, quer... | <commit_before>from rest_framework import serializers
from wafer.talks.models import Talk
from wafer.pages.models import Page
from wafer.schedule.models import ScheduleItem, Venue, Slot
class ScheduleItemSerializer(serializers.HyperlinkedModelSerializer):
page = serializers.PrimaryKeyRelatedField(
allow_... |
8684376106d2b6763823573662ffde574d075d1b | workers/subscriptions.py | workers/subscriptions.py | import os
import telegram
from leonard import Leonard
if __name__ == '__main__':
os.chdir('../')
telegram_client = telegram.Bot(os.environ['BOT_TOKEN'])
bot = Leonard(telegram_client)
i = 0
while True:
if i % 10 == 0:
bot.collect_plugins()
for name, check, send in bot.... | import os
import time
import telegram
from leonard import Leonard
if __name__ == '__main__':
os.chdir('../')
telegram_client = telegram.Bot(os.environ['BOT_TOKEN'])
bot = Leonard(telegram_client)
bot.collect_plugins()
while True:
for name, check, send in bot.subscriptions:
sen... | Remove collecting plugins every second | Remove collecting plugins every second
| Python | mit | sevazhidkov/leonard | import os
import telegram
from leonard import Leonard
if __name__ == '__main__':
os.chdir('../')
telegram_client = telegram.Bot(os.environ['BOT_TOKEN'])
bot = Leonard(telegram_client)
i = 0
while True:
if i % 10 == 0:
bot.collect_plugins()
for name, check, send in bot.... | import os
import time
import telegram
from leonard import Leonard
if __name__ == '__main__':
os.chdir('../')
telegram_client = telegram.Bot(os.environ['BOT_TOKEN'])
bot = Leonard(telegram_client)
bot.collect_plugins()
while True:
for name, check, send in bot.subscriptions:
sen... | <commit_before>import os
import telegram
from leonard import Leonard
if __name__ == '__main__':
os.chdir('../')
telegram_client = telegram.Bot(os.environ['BOT_TOKEN'])
bot = Leonard(telegram_client)
i = 0
while True:
if i % 10 == 0:
bot.collect_plugins()
for name, chec... | import os
import time
import telegram
from leonard import Leonard
if __name__ == '__main__':
os.chdir('../')
telegram_client = telegram.Bot(os.environ['BOT_TOKEN'])
bot = Leonard(telegram_client)
bot.collect_plugins()
while True:
for name, check, send in bot.subscriptions:
sen... | import os
import telegram
from leonard import Leonard
if __name__ == '__main__':
os.chdir('../')
telegram_client = telegram.Bot(os.environ['BOT_TOKEN'])
bot = Leonard(telegram_client)
i = 0
while True:
if i % 10 == 0:
bot.collect_plugins()
for name, check, send in bot.... | <commit_before>import os
import telegram
from leonard import Leonard
if __name__ == '__main__':
os.chdir('../')
telegram_client = telegram.Bot(os.environ['BOT_TOKEN'])
bot = Leonard(telegram_client)
i = 0
while True:
if i % 10 == 0:
bot.collect_plugins()
for name, chec... |
854b0968afc41894d8cf79d712175b497df9828e | bolt/spark/utils.py | bolt/spark/utils.py | def get_kv_shape(shape, key_axes):
func = lambda axis: shape[axis]
return _get_kv_func(func, shape, key_axes)
def get_kv_axes(shape, key_axes):
func = lambda axis: axis
return _get_kv_func(func, shape, key_axes)
def _get_kv_func(func, shape, key_axes):
key_res = [func(axis) for axis in key_axes]
... | def get_kv_shape(shape, key_axes):
func = lambda axis: shape[axis]
return _get_kv_func(func, shape, key_axes)
def get_kv_axes(shape, key_axes):
func = lambda axis: axis
return _get_kv_func(func, shape, key_axes)
def _get_kv_func(func, shape, key_axes):
key_res = [func(axis) for axis in key_axes]
... | Fix for count with one partition | Fix for count with one partition
| Python | apache-2.0 | bolt-project/bolt,andrewosh/bolt,jwittenbach/bolt | def get_kv_shape(shape, key_axes):
func = lambda axis: shape[axis]
return _get_kv_func(func, shape, key_axes)
def get_kv_axes(shape, key_axes):
func = lambda axis: axis
return _get_kv_func(func, shape, key_axes)
def _get_kv_func(func, shape, key_axes):
key_res = [func(axis) for axis in key_axes]
... | def get_kv_shape(shape, key_axes):
func = lambda axis: shape[axis]
return _get_kv_func(func, shape, key_axes)
def get_kv_axes(shape, key_axes):
func = lambda axis: axis
return _get_kv_func(func, shape, key_axes)
def _get_kv_func(func, shape, key_axes):
key_res = [func(axis) for axis in key_axes]
... | <commit_before>def get_kv_shape(shape, key_axes):
func = lambda axis: shape[axis]
return _get_kv_func(func, shape, key_axes)
def get_kv_axes(shape, key_axes):
func = lambda axis: axis
return _get_kv_func(func, shape, key_axes)
def _get_kv_func(func, shape, key_axes):
key_res = [func(axis) for axis... | def get_kv_shape(shape, key_axes):
func = lambda axis: shape[axis]
return _get_kv_func(func, shape, key_axes)
def get_kv_axes(shape, key_axes):
func = lambda axis: axis
return _get_kv_func(func, shape, key_axes)
def _get_kv_func(func, shape, key_axes):
key_res = [func(axis) for axis in key_axes]
... | def get_kv_shape(shape, key_axes):
func = lambda axis: shape[axis]
return _get_kv_func(func, shape, key_axes)
def get_kv_axes(shape, key_axes):
func = lambda axis: axis
return _get_kv_func(func, shape, key_axes)
def _get_kv_func(func, shape, key_axes):
key_res = [func(axis) for axis in key_axes]
... | <commit_before>def get_kv_shape(shape, key_axes):
func = lambda axis: shape[axis]
return _get_kv_func(func, shape, key_axes)
def get_kv_axes(shape, key_axes):
func = lambda axis: axis
return _get_kv_func(func, shape, key_axes)
def _get_kv_func(func, shape, key_axes):
key_res = [func(axis) for axis... |
d53ff6a32f9de757c7eef841d35d110a389419ae | cattle/plugins/docker/agent.py | cattle/plugins/docker/agent.py | from cattle import Config
from cattle.plugins.docker.util import add_to_env
from urlparse import urlparse
def setup_cattle_config_url(instance, create_config):
if instance.get('agentId') is None:
return
if 'labels' not in create_config:
create_config['labels'] = {}
create_config['labels'... | from cattle import Config
from cattle.plugins.docker.util import add_to_env
from urlparse import urlparse
def _has_label(instance):
try:
return instance.labels['io.rancher.container.cattle_url'] == 'true'
except:
pass
return False
def setup_cattle_config_url(instance, create_config):
... | Add label io.rancher.container.cattle_url=true to get CATTLE_URL env var | Add label io.rancher.container.cattle_url=true to get CATTLE_URL env var
| Python | apache-2.0 | rancherio/python-agent,rancherio/python-agent,rancher/python-agent,rancher/python-agent | from cattle import Config
from cattle.plugins.docker.util import add_to_env
from urlparse import urlparse
def setup_cattle_config_url(instance, create_config):
if instance.get('agentId') is None:
return
if 'labels' not in create_config:
create_config['labels'] = {}
create_config['labels'... | from cattle import Config
from cattle.plugins.docker.util import add_to_env
from urlparse import urlparse
def _has_label(instance):
try:
return instance.labels['io.rancher.container.cattle_url'] == 'true'
except:
pass
return False
def setup_cattle_config_url(instance, create_config):
... | <commit_before>from cattle import Config
from cattle.plugins.docker.util import add_to_env
from urlparse import urlparse
def setup_cattle_config_url(instance, create_config):
if instance.get('agentId') is None:
return
if 'labels' not in create_config:
create_config['labels'] = {}
create_... | from cattle import Config
from cattle.plugins.docker.util import add_to_env
from urlparse import urlparse
def _has_label(instance):
try:
return instance.labels['io.rancher.container.cattle_url'] == 'true'
except:
pass
return False
def setup_cattle_config_url(instance, create_config):
... | from cattle import Config
from cattle.plugins.docker.util import add_to_env
from urlparse import urlparse
def setup_cattle_config_url(instance, create_config):
if instance.get('agentId') is None:
return
if 'labels' not in create_config:
create_config['labels'] = {}
create_config['labels'... | <commit_before>from cattle import Config
from cattle.plugins.docker.util import add_to_env
from urlparse import urlparse
def setup_cattle_config_url(instance, create_config):
if instance.get('agentId') is None:
return
if 'labels' not in create_config:
create_config['labels'] = {}
create_... |
9a251ec185d53ad0bc11d492443ac15e45b95d5e | cbagent/collectors/__init__.py | cbagent/collectors/__init__.py | from collector import Collector
from active_tasks import ActiveTasks
from atop import Atop
from iostat import IO
from latency import Latency
from observe import ObserveLatency
from net import Net
from ns_server import NSServer
from secondary_stats import SecondaryStats
from n1ql_stats import N1QLStats
from ps import PS... | from collector import Collector
from active_tasks import ActiveTasks
from atop import Atop
from iostat import IO
from latency import Latency
from observe import ObserveLatency
from net import Net
from ns_server import NSServer
from secondary_stats import SecondaryStats
from secondary_debugstats import SecondaryDebugSta... | Revert "CBD: 1686 cbagent changes for cbagent" | Revert "CBD: 1686 cbagent changes for cbagent"
This reverts commit 9fb8d1f0f9548a4a5fb5438b0e04996b9828f202.
Change-Id: Ifcc2e797ba28dcc838c7dae7541e0bc325d954be
Reviewed-on: http://review.couchbase.org/59921
Reviewed-by: sandip nandi <[email protected]>
Tested-by: sandip nandi <7... | Python | apache-2.0 | couchbase/cbagent | from collector import Collector
from active_tasks import ActiveTasks
from atop import Atop
from iostat import IO
from latency import Latency
from observe import ObserveLatency
from net import Net
from ns_server import NSServer
from secondary_stats import SecondaryStats
from n1ql_stats import N1QLStats
from ps import PS... | from collector import Collector
from active_tasks import ActiveTasks
from atop import Atop
from iostat import IO
from latency import Latency
from observe import ObserveLatency
from net import Net
from ns_server import NSServer
from secondary_stats import SecondaryStats
from secondary_debugstats import SecondaryDebugSta... | <commit_before>from collector import Collector
from active_tasks import ActiveTasks
from atop import Atop
from iostat import IO
from latency import Latency
from observe import ObserveLatency
from net import Net
from ns_server import NSServer
from secondary_stats import SecondaryStats
from n1ql_stats import N1QLStats
fr... | from collector import Collector
from active_tasks import ActiveTasks
from atop import Atop
from iostat import IO
from latency import Latency
from observe import ObserveLatency
from net import Net
from ns_server import NSServer
from secondary_stats import SecondaryStats
from secondary_debugstats import SecondaryDebugSta... | from collector import Collector
from active_tasks import ActiveTasks
from atop import Atop
from iostat import IO
from latency import Latency
from observe import ObserveLatency
from net import Net
from ns_server import NSServer
from secondary_stats import SecondaryStats
from n1ql_stats import N1QLStats
from ps import PS... | <commit_before>from collector import Collector
from active_tasks import ActiveTasks
from atop import Atop
from iostat import IO
from latency import Latency
from observe import ObserveLatency
from net import Net
from ns_server import NSServer
from secondary_stats import SecondaryStats
from n1ql_stats import N1QLStats
fr... |
44d437e7c7daf3255c3ab9b0dbaa9bdd700008a4 | foliant/gdrive.py | foliant/gdrive.py | import os.path
import webbrowser
import pydrive.auth, pydrive.drive
def upload(document):
"""Upload .docx file to Google Drive and return a web view link to it."""
auth = pydrive.auth.GoogleAuth()
auth.LocalWebserverAuth()
gdrive = pydrive.drive.GoogleDrive(auth)
gdoc = gdrive.CreateFile({
... | import os.path
import webbrowser
import pydrive.auth, pydrive.drive
def upload(document):
"""Upload .docx file to Google Drive and return a web view link to it."""
auth = pydrive.auth.GoogleAuth()
auth.CommandLineAuth()
gdrive = pydrive.drive.GoogleDrive(auth)
gdoc = gdrive.CreateFile({
... | Switch from local server to command line auth to fix upload in Docker. | GDrive: Switch from local server to command line auth to fix upload in Docker.
| Python | mit | foliant-docs/foliant | import os.path
import webbrowser
import pydrive.auth, pydrive.drive
def upload(document):
"""Upload .docx file to Google Drive and return a web view link to it."""
auth = pydrive.auth.GoogleAuth()
auth.LocalWebserverAuth()
gdrive = pydrive.drive.GoogleDrive(auth)
gdoc = gdrive.CreateFile({
... | import os.path
import webbrowser
import pydrive.auth, pydrive.drive
def upload(document):
"""Upload .docx file to Google Drive and return a web view link to it."""
auth = pydrive.auth.GoogleAuth()
auth.CommandLineAuth()
gdrive = pydrive.drive.GoogleDrive(auth)
gdoc = gdrive.CreateFile({
... | <commit_before>import os.path
import webbrowser
import pydrive.auth, pydrive.drive
def upload(document):
"""Upload .docx file to Google Drive and return a web view link to it."""
auth = pydrive.auth.GoogleAuth()
auth.LocalWebserverAuth()
gdrive = pydrive.drive.GoogleDrive(auth)
gdoc = gdrive.Cre... | import os.path
import webbrowser
import pydrive.auth, pydrive.drive
def upload(document):
"""Upload .docx file to Google Drive and return a web view link to it."""
auth = pydrive.auth.GoogleAuth()
auth.CommandLineAuth()
gdrive = pydrive.drive.GoogleDrive(auth)
gdoc = gdrive.CreateFile({
... | import os.path
import webbrowser
import pydrive.auth, pydrive.drive
def upload(document):
"""Upload .docx file to Google Drive and return a web view link to it."""
auth = pydrive.auth.GoogleAuth()
auth.LocalWebserverAuth()
gdrive = pydrive.drive.GoogleDrive(auth)
gdoc = gdrive.CreateFile({
... | <commit_before>import os.path
import webbrowser
import pydrive.auth, pydrive.drive
def upload(document):
"""Upload .docx file to Google Drive and return a web view link to it."""
auth = pydrive.auth.GoogleAuth()
auth.LocalWebserverAuth()
gdrive = pydrive.drive.GoogleDrive(auth)
gdoc = gdrive.Cre... |
45f56adc0e9c935f5377791f3735e692b6e57c74 | pinax_theme_bootstrap/templatetags/pinax_theme_bootstrap_tags.py | pinax_theme_bootstrap/templatetags/pinax_theme_bootstrap_tags.py | from django import template
from django.contrib.messages.utils import get_level_tags
from django.utils.encoding import force_text
LEVEL_TAGS = get_level_tags()
register = template.Library()
@register.simple_tag()
def get_message_tags(message):
"""
Returns the message's level_tag prefixed with Bootstrap's "... | from django import template
from django.contrib.messages.utils import get_level_tags
from django.utils.encoding import force_text
LEVEL_TAGS = get_level_tags()
register = template.Library()
@register.simple_tag()
def get_message_tags(message):
"""
Returns the message's level_tag prefixed with Bootstrap's "... | Handle instances where level_tag is undefined | Handle instances where level_tag is undefined
Better mimics the implementation of message.tags in Django 1.7
| Python | mit | foraliving/foraliving,druss16/danslist,grahamu/pinax-theme-bootstrap,foraliving/foraliving,jacobwegner/pinax-theme-bootstrap,druss16/danslist,jacobwegner/pinax-theme-bootstrap,druss16/danslist,foraliving/foraliving,grahamu/pinax-theme-bootstrap,grahamu/pinax-theme-bootstrap,jacobwegner/pinax-theme-bootstrap | from django import template
from django.contrib.messages.utils import get_level_tags
from django.utils.encoding import force_text
LEVEL_TAGS = get_level_tags()
register = template.Library()
@register.simple_tag()
def get_message_tags(message):
"""
Returns the message's level_tag prefixed with Bootstrap's "... | from django import template
from django.contrib.messages.utils import get_level_tags
from django.utils.encoding import force_text
LEVEL_TAGS = get_level_tags()
register = template.Library()
@register.simple_tag()
def get_message_tags(message):
"""
Returns the message's level_tag prefixed with Bootstrap's "... | <commit_before>from django import template
from django.contrib.messages.utils import get_level_tags
from django.utils.encoding import force_text
LEVEL_TAGS = get_level_tags()
register = template.Library()
@register.simple_tag()
def get_message_tags(message):
"""
Returns the message's level_tag prefixed wit... | from django import template
from django.contrib.messages.utils import get_level_tags
from django.utils.encoding import force_text
LEVEL_TAGS = get_level_tags()
register = template.Library()
@register.simple_tag()
def get_message_tags(message):
"""
Returns the message's level_tag prefixed with Bootstrap's "... | from django import template
from django.contrib.messages.utils import get_level_tags
from django.utils.encoding import force_text
LEVEL_TAGS = get_level_tags()
register = template.Library()
@register.simple_tag()
def get_message_tags(message):
"""
Returns the message's level_tag prefixed with Bootstrap's "... | <commit_before>from django import template
from django.contrib.messages.utils import get_level_tags
from django.utils.encoding import force_text
LEVEL_TAGS = get_level_tags()
register = template.Library()
@register.simple_tag()
def get_message_tags(message):
"""
Returns the message's level_tag prefixed wit... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.