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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3c5e708961e336f71805d79465944e6503b83538 | tests/test_screen19.py | tests/test_screen19.py | from __future__ import absolute_import, division, print_function
import pytest
from screen19.screen import Screen19
def test_screen19_command_line_help_does_not_crash():
Screen19().run([])
def test_screen19(dials_data, tmpdir):
data_dir = dials_data("x4wide").strpath
with tmpdir.as_cwd():
Scree... | from __future__ import absolute_import, division, print_function
import pytest
from screen19.screen import Screen19
def test_screen19_command_line_help_does_not_crash():
Screen19().run([])
def test_screen19(dials_data, tmpdir):
data_dir = dials_data("x4wide").strpath
with tmpdir.as_cwd():
Scree... | Fix tests broken by new log configuration option | Fix tests broken by new log configuration option
| Python | bsd-3-clause | xia2/i19 | from __future__ import absolute_import, division, print_function
import pytest
from screen19.screen import Screen19
def test_screen19_command_line_help_does_not_crash():
Screen19().run([])
def test_screen19(dials_data, tmpdir):
data_dir = dials_data("x4wide").strpath
with tmpdir.as_cwd():
Scree... | from __future__ import absolute_import, division, print_function
import pytest
from screen19.screen import Screen19
def test_screen19_command_line_help_does_not_crash():
Screen19().run([])
def test_screen19(dials_data, tmpdir):
data_dir = dials_data("x4wide").strpath
with tmpdir.as_cwd():
Scree... | <commit_before>from __future__ import absolute_import, division, print_function
import pytest
from screen19.screen import Screen19
def test_screen19_command_line_help_does_not_crash():
Screen19().run([])
def test_screen19(dials_data, tmpdir):
data_dir = dials_data("x4wide").strpath
with tmpdir.as_cwd()... | from __future__ import absolute_import, division, print_function
import pytest
from screen19.screen import Screen19
def test_screen19_command_line_help_does_not_crash():
Screen19().run([])
def test_screen19(dials_data, tmpdir):
data_dir = dials_data("x4wide").strpath
with tmpdir.as_cwd():
Scree... | from __future__ import absolute_import, division, print_function
import pytest
from screen19.screen import Screen19
def test_screen19_command_line_help_does_not_crash():
Screen19().run([])
def test_screen19(dials_data, tmpdir):
data_dir = dials_data("x4wide").strpath
with tmpdir.as_cwd():
Scree... | <commit_before>from __future__ import absolute_import, division, print_function
import pytest
from screen19.screen import Screen19
def test_screen19_command_line_help_does_not_crash():
Screen19().run([])
def test_screen19(dials_data, tmpdir):
data_dir = dials_data("x4wide").strpath
with tmpdir.as_cwd()... |
a21b02b93b8b92693be6dbdfe9c8d454ee233cc1 | fabdefs.py | fabdefs.py | from fabric.api import *
"""
Define the server environments that this app will be deployed to.
Ensure that you have SSH access to the servers for the scripts in 'fabfile.py' to work.
"""
def production():
"""
Env parameters for the production environment.
"""
env.host_string = 'ubuntu@xxx'
env.k... | from fabric.api import *
"""
Define the server environments that this app will be deployed to.
Ensure that you have SSH access to the servers for the scripts in 'fabfile.py' to work.
"""
def production():
"""
Env parameters for the production environment.
"""
env.host_string = 'ubuntu@54.76.117.251'... | Add details of demo EC2 server. | Add details of demo EC2 server.
| Python | apache-2.0 | Code4SA/pmg-cms-2,Code4SA/pmg-cms-2,Code4SA/pmg-cms-2 | from fabric.api import *
"""
Define the server environments that this app will be deployed to.
Ensure that you have SSH access to the servers for the scripts in 'fabfile.py' to work.
"""
def production():
"""
Env parameters for the production environment.
"""
env.host_string = 'ubuntu@xxx'
env.k... | from fabric.api import *
"""
Define the server environments that this app will be deployed to.
Ensure that you have SSH access to the servers for the scripts in 'fabfile.py' to work.
"""
def production():
"""
Env parameters for the production environment.
"""
env.host_string = 'ubuntu@54.76.117.251'... | <commit_before>from fabric.api import *
"""
Define the server environments that this app will be deployed to.
Ensure that you have SSH access to the servers for the scripts in 'fabfile.py' to work.
"""
def production():
"""
Env parameters for the production environment.
"""
env.host_string = 'ubuntu... | from fabric.api import *
"""
Define the server environments that this app will be deployed to.
Ensure that you have SSH access to the servers for the scripts in 'fabfile.py' to work.
"""
def production():
"""
Env parameters for the production environment.
"""
env.host_string = 'ubuntu@54.76.117.251'... | from fabric.api import *
"""
Define the server environments that this app will be deployed to.
Ensure that you have SSH access to the servers for the scripts in 'fabfile.py' to work.
"""
def production():
"""
Env parameters for the production environment.
"""
env.host_string = 'ubuntu@xxx'
env.k... | <commit_before>from fabric.api import *
"""
Define the server environments that this app will be deployed to.
Ensure that you have SSH access to the servers for the scripts in 'fabfile.py' to work.
"""
def production():
"""
Env parameters for the production environment.
"""
env.host_string = 'ubuntu... |
1606445e137ecae5a1f5c50edcc5e851d399b313 | project_euler/025.1000_digit_fibonacci_number.py | project_euler/025.1000_digit_fibonacci_number.py | '''
Problem 025
The Fibonacci sequence is defined by the recurrence relation:
Fn = Fn−1 + Fn−2, where F1 = 1 and F2 = 1.
Hence the first 12 terms will be:
F1 = 1
F2 = 1
F3 = 2
F4 = 3
F5 = 5
F6 = 8
F7 = 13
F8 = 21
F9 = 34
F10 = 55
F11 = 89
F12 = 144
The 12th term, F12, is the first term to contain three digits.
What... | '''
Problem 025
The Fibonacci sequence is defined by the recurrence relation:
Fn = Fn−1 + Fn−2, where F1 = 1 and F2 = 1.
Hence the first 12 terms will be:
F1 = 1
F2 = 1
F3 = 2
F4 = 3
F5 = 5
F6 = 8
F7 = 13
F8 = 21
F9 = 34
F10 = 55
F11 = 89
F12 = 144
The 12th term, F12, is the first term to contain three digits.
What... | Solve 1000 digit fib number | Solve 1000 digit fib number
| Python | mit | daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various | '''
Problem 025
The Fibonacci sequence is defined by the recurrence relation:
Fn = Fn−1 + Fn−2, where F1 = 1 and F2 = 1.
Hence the first 12 terms will be:
F1 = 1
F2 = 1
F3 = 2
F4 = 3
F5 = 5
F6 = 8
F7 = 13
F8 = 21
F9 = 34
F10 = 55
F11 = 89
F12 = 144
The 12th term, F12, is the first term to contain three digits.
What... | '''
Problem 025
The Fibonacci sequence is defined by the recurrence relation:
Fn = Fn−1 + Fn−2, where F1 = 1 and F2 = 1.
Hence the first 12 terms will be:
F1 = 1
F2 = 1
F3 = 2
F4 = 3
F5 = 5
F6 = 8
F7 = 13
F8 = 21
F9 = 34
F10 = 55
F11 = 89
F12 = 144
The 12th term, F12, is the first term to contain three digits.
What... | <commit_before>'''
Problem 025
The Fibonacci sequence is defined by the recurrence relation:
Fn = Fn−1 + Fn−2, where F1 = 1 and F2 = 1.
Hence the first 12 terms will be:
F1 = 1
F2 = 1
F3 = 2
F4 = 3
F5 = 5
F6 = 8
F7 = 13
F8 = 21
F9 = 34
F10 = 55
F11 = 89
F12 = 144
The 12th term, F12, is the first term to contain thre... | '''
Problem 025
The Fibonacci sequence is defined by the recurrence relation:
Fn = Fn−1 + Fn−2, where F1 = 1 and F2 = 1.
Hence the first 12 terms will be:
F1 = 1
F2 = 1
F3 = 2
F4 = 3
F5 = 5
F6 = 8
F7 = 13
F8 = 21
F9 = 34
F10 = 55
F11 = 89
F12 = 144
The 12th term, F12, is the first term to contain three digits.
What... | '''
Problem 025
The Fibonacci sequence is defined by the recurrence relation:
Fn = Fn−1 + Fn−2, where F1 = 1 and F2 = 1.
Hence the first 12 terms will be:
F1 = 1
F2 = 1
F3 = 2
F4 = 3
F5 = 5
F6 = 8
F7 = 13
F8 = 21
F9 = 34
F10 = 55
F11 = 89
F12 = 144
The 12th term, F12, is the first term to contain three digits.
What... | <commit_before>'''
Problem 025
The Fibonacci sequence is defined by the recurrence relation:
Fn = Fn−1 + Fn−2, where F1 = 1 and F2 = 1.
Hence the first 12 terms will be:
F1 = 1
F2 = 1
F3 = 2
F4 = 3
F5 = 5
F6 = 8
F7 = 13
F8 = 21
F9 = 34
F10 = 55
F11 = 89
F12 = 144
The 12th term, F12, is the first term to contain thre... |
accd91b9b180f88facd5a61bddbb073b5a35af63 | ratechecker/migrations/0002_remove_fee_loader.py | ratechecker/migrations/0002_remove_fee_loader.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'DROP INDEX IF EXISTS idx_16977_pro... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'DROP INDEX IF EXISTS idx_16977_pro... | Fix order of migration in operations | Fix order of migration in operations
| Python | cc0-1.0 | cfpb/owning-a-home-api | # -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'DROP INDEX IF EXISTS idx_16977_pro... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'DROP INDEX IF EXISTS idx_16977_pro... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'DROP INDEX IF EXIST... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'DROP INDEX IF EXISTS idx_16977_pro... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'DROP INDEX IF EXISTS idx_16977_pro... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.22 on 2019-10-31 16:33
from __future__ import unicode_literals
from django.db import migrations, OperationalError, ProgrammingError
def fix_fee_product_index(apps, schema_editor):
try:
schema_editor.execute(
'DROP INDEX IF EXIST... |
9ed7649d98bc4b1d3412047d0d5c50c1a5c8116c | tests/system/conftest.py | tests/system/conftest.py | # This file contains pytest fixtures as well as some config
API_BASE = "http://localhost:5555/n/"
TEST_MAX_DURATION_SECS = 240
TEST_GRANULARITY_CHECK_SECS = 0.1
# we don't want to commit passwords to the repo.
# load them from an external json file.
try:
from accounts import credentials
passwords = []
for... | # This file contains pytest fixtures as well as some config
API_BASE = "http://localhost:5555/n/"
TEST_MAX_DURATION_SECS = 240
TEST_GRANULARITY_CHECK_SECS = 0.1
# we don't want to commit passwords to the repo.
# load them from an external json file.
try:
from accounts import credentials
passwords = []
for... | Fix check for accounts.py file in system tests. | Fix check for accounts.py file in system tests.
| Python | agpl-3.0 | Eagles2F/sync-engine,ErinCall/sync-engine,closeio/nylas,gale320/sync-engine,nylas/sync-engine,EthanBlackburn/sync-engine,wakermahmud/sync-engine,Eagles2F/sync-engine,jobscore/sync-engine,wakermahmud/sync-engine,gale320/sync-engine,ErinCall/sync-engine,gale320/sync-engine,PriviPK/privipk-sync-engine,nylas/sync-engine,ny... | # This file contains pytest fixtures as well as some config
API_BASE = "http://localhost:5555/n/"
TEST_MAX_DURATION_SECS = 240
TEST_GRANULARITY_CHECK_SECS = 0.1
# we don't want to commit passwords to the repo.
# load them from an external json file.
try:
from accounts import credentials
passwords = []
for... | # This file contains pytest fixtures as well as some config
API_BASE = "http://localhost:5555/n/"
TEST_MAX_DURATION_SECS = 240
TEST_GRANULARITY_CHECK_SECS = 0.1
# we don't want to commit passwords to the repo.
# load them from an external json file.
try:
from accounts import credentials
passwords = []
for... | <commit_before># This file contains pytest fixtures as well as some config
API_BASE = "http://localhost:5555/n/"
TEST_MAX_DURATION_SECS = 240
TEST_GRANULARITY_CHECK_SECS = 0.1
# we don't want to commit passwords to the repo.
# load them from an external json file.
try:
from accounts import credentials
passwor... | # This file contains pytest fixtures as well as some config
API_BASE = "http://localhost:5555/n/"
TEST_MAX_DURATION_SECS = 240
TEST_GRANULARITY_CHECK_SECS = 0.1
# we don't want to commit passwords to the repo.
# load them from an external json file.
try:
from accounts import credentials
passwords = []
for... | # This file contains pytest fixtures as well as some config
API_BASE = "http://localhost:5555/n/"
TEST_MAX_DURATION_SECS = 240
TEST_GRANULARITY_CHECK_SECS = 0.1
# we don't want to commit passwords to the repo.
# load them from an external json file.
try:
from accounts import credentials
passwords = []
for... | <commit_before># This file contains pytest fixtures as well as some config
API_BASE = "http://localhost:5555/n/"
TEST_MAX_DURATION_SECS = 240
TEST_GRANULARITY_CHECK_SECS = 0.1
# we don't want to commit passwords to the repo.
# load them from an external json file.
try:
from accounts import credentials
passwor... |
0912f6910ac436f8f09848b4485e39e5c308f70e | indra/tools/live_curation/dump_index.py | indra/tools/live_curation/dump_index.py | """This is a script to dump all the corpora on S3 into an index file."""
import boto3
res = s3.list_objects(Bucket='world-modelers', Prefix='indra_models')
s3 = boto3.session.Session(profile_name='wm').client('s3')
corpora = []
for entry in res['Content']:
if entry['Key'].endswith('/statements.json'):
co... | """This is a script to dump all the corpora on S3 into an index file."""
import boto3
if __name__ == '__main__':
s3 = boto3.session.Session(profile_name='wm').client('s3')
res = s3.list_objects(Bucket='world-modelers', Prefix='indra_models')
corpora = []
for entry in res['Content']:
if entry... | Fix the index dumper code | Fix the index dumper code
| Python | bsd-2-clause | sorgerlab/indra,bgyori/indra,bgyori/indra,johnbachman/belpy,johnbachman/indra,sorgerlab/belpy,sorgerlab/belpy,johnbachman/belpy,sorgerlab/indra,johnbachman/indra,sorgerlab/belpy,johnbachman/indra,sorgerlab/indra,johnbachman/belpy,bgyori/indra | """This is a script to dump all the corpora on S3 into an index file."""
import boto3
res = s3.list_objects(Bucket='world-modelers', Prefix='indra_models')
s3 = boto3.session.Session(profile_name='wm').client('s3')
corpora = []
for entry in res['Content']:
if entry['Key'].endswith('/statements.json'):
co... | """This is a script to dump all the corpora on S3 into an index file."""
import boto3
if __name__ == '__main__':
s3 = boto3.session.Session(profile_name='wm').client('s3')
res = s3.list_objects(Bucket='world-modelers', Prefix='indra_models')
corpora = []
for entry in res['Content']:
if entry... | <commit_before>"""This is a script to dump all the corpora on S3 into an index file."""
import boto3
res = s3.list_objects(Bucket='world-modelers', Prefix='indra_models')
s3 = boto3.session.Session(profile_name='wm').client('s3')
corpora = []
for entry in res['Content']:
if entry['Key'].endswith('/statements.jso... | """This is a script to dump all the corpora on S3 into an index file."""
import boto3
if __name__ == '__main__':
s3 = boto3.session.Session(profile_name='wm').client('s3')
res = s3.list_objects(Bucket='world-modelers', Prefix='indra_models')
corpora = []
for entry in res['Content']:
if entry... | """This is a script to dump all the corpora on S3 into an index file."""
import boto3
res = s3.list_objects(Bucket='world-modelers', Prefix='indra_models')
s3 = boto3.session.Session(profile_name='wm').client('s3')
corpora = []
for entry in res['Content']:
if entry['Key'].endswith('/statements.json'):
co... | <commit_before>"""This is a script to dump all the corpora on S3 into an index file."""
import boto3
res = s3.list_objects(Bucket='world-modelers', Prefix='indra_models')
s3 = boto3.session.Session(profile_name='wm').client('s3')
corpora = []
for entry in res['Content']:
if entry['Key'].endswith('/statements.jso... |
81c401daf5d418a917d6bda4b5cbf0eb3870ce15 | vip_hci/__init__.py | vip_hci/__init__.py | __version__ = "1.1.3"
from . import preproc
from . import config
from . import fits
from . import invprob
from . import psfsub
from . import fm
from . import metrics
from . import stats
from . import var
from .hci_dataset import *
from .hci_postproc import *
from .vip_ds9 import * | __version__ = "1.2.0"
from . import preproc
from . import config
from . import fits
from . import invprob
from . import psfsub
from . import fm
from . import metrics
from . import stats
from . import var
from .hci_dataset import *
from .hci_postproc import *
from .vip_ds9 import * | Update to version 1.2.0 - version needed for exoplanet data challenge | Update to version 1.2.0 - version needed for exoplanet data challenge
| Python | mit | henry-ngo/VIP,vortex-exoplanet/VIP | __version__ = "1.1.3"
from . import preproc
from . import config
from . import fits
from . import invprob
from . import psfsub
from . import fm
from . import metrics
from . import stats
from . import var
from .hci_dataset import *
from .hci_postproc import *
from .vip_ds9 import *Update to version 1.2.0 - version need... | __version__ = "1.2.0"
from . import preproc
from . import config
from . import fits
from . import invprob
from . import psfsub
from . import fm
from . import metrics
from . import stats
from . import var
from .hci_dataset import *
from .hci_postproc import *
from .vip_ds9 import * | <commit_before>__version__ = "1.1.3"
from . import preproc
from . import config
from . import fits
from . import invprob
from . import psfsub
from . import fm
from . import metrics
from . import stats
from . import var
from .hci_dataset import *
from .hci_postproc import *
from .vip_ds9 import *<commit_msg>Update to v... | __version__ = "1.2.0"
from . import preproc
from . import config
from . import fits
from . import invprob
from . import psfsub
from . import fm
from . import metrics
from . import stats
from . import var
from .hci_dataset import *
from .hci_postproc import *
from .vip_ds9 import * | __version__ = "1.1.3"
from . import preproc
from . import config
from . import fits
from . import invprob
from . import psfsub
from . import fm
from . import metrics
from . import stats
from . import var
from .hci_dataset import *
from .hci_postproc import *
from .vip_ds9 import *Update to version 1.2.0 - version need... | <commit_before>__version__ = "1.1.3"
from . import preproc
from . import config
from . import fits
from . import invprob
from . import psfsub
from . import fm
from . import metrics
from . import stats
from . import var
from .hci_dataset import *
from .hci_postproc import *
from .vip_ds9 import *<commit_msg>Update to v... |
7d0691eae614da96f8fe14a5f5338659ef9638df | ml/pytorch/image_classification/architectures.py | ml/pytorch/image_classification/architectures.py | import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
################################################################################
# SUPPORT
################################################################################
class Flat... | import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
################################################################################
# SUPPORT
################################################################################
class Flat... | Add custom conv layer module | FEAT: Add custom conv layer module
| Python | apache-2.0 | ronrest/convenience_py,ronrest/convenience_py | import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
################################################################################
# SUPPORT
################################################################################
class Flat... | import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
################################################################################
# SUPPORT
################################################################################
class Flat... | <commit_before>import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
################################################################################
# SUPPORT
############################################################################... | import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
################################################################################
# SUPPORT
################################################################################
class Flat... | import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
################################################################################
# SUPPORT
################################################################################
class Flat... | <commit_before>import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
################################################################################
# SUPPORT
############################################################################... |
93870152b4afb04f1547378184e2cee0bd0dd45f | kobo/apps/languages/serializers/base.py | kobo/apps/languages/serializers/base.py | # coding: utf-8
from collections import defaultdict, OrderedDict
from django.db import models
from rest_framework import serializers
class BaseServiceSerializer(serializers.ModelSerializer):
class Meta:
fields = [
'name',
'code',
]
class BaseServiceLanguageM2MSerializer... | # coding: utf-8
from collections import defaultdict, OrderedDict
from django.db import models
from rest_framework import serializers
class BaseServiceSerializer(serializers.ModelSerializer):
class Meta:
fields = [
'name',
'code',
]
class BaseServiceLanguageM2MSerializer... | Return a dictionary for transcription/translation services (instead of list) | Return a dictionary for transcription/translation services (instead of list)
| Python | agpl-3.0 | kobotoolbox/kpi,kobotoolbox/kpi,kobotoolbox/kpi,kobotoolbox/kpi,kobotoolbox/kpi | # coding: utf-8
from collections import defaultdict, OrderedDict
from django.db import models
from rest_framework import serializers
class BaseServiceSerializer(serializers.ModelSerializer):
class Meta:
fields = [
'name',
'code',
]
class BaseServiceLanguageM2MSerializer... | # coding: utf-8
from collections import defaultdict, OrderedDict
from django.db import models
from rest_framework import serializers
class BaseServiceSerializer(serializers.ModelSerializer):
class Meta:
fields = [
'name',
'code',
]
class BaseServiceLanguageM2MSerializer... | <commit_before># coding: utf-8
from collections import defaultdict, OrderedDict
from django.db import models
from rest_framework import serializers
class BaseServiceSerializer(serializers.ModelSerializer):
class Meta:
fields = [
'name',
'code',
]
class BaseServiceLangua... | # coding: utf-8
from collections import defaultdict, OrderedDict
from django.db import models
from rest_framework import serializers
class BaseServiceSerializer(serializers.ModelSerializer):
class Meta:
fields = [
'name',
'code',
]
class BaseServiceLanguageM2MSerializer... | # coding: utf-8
from collections import defaultdict, OrderedDict
from django.db import models
from rest_framework import serializers
class BaseServiceSerializer(serializers.ModelSerializer):
class Meta:
fields = [
'name',
'code',
]
class BaseServiceLanguageM2MSerializer... | <commit_before># coding: utf-8
from collections import defaultdict, OrderedDict
from django.db import models
from rest_framework import serializers
class BaseServiceSerializer(serializers.ModelSerializer):
class Meta:
fields = [
'name',
'code',
]
class BaseServiceLangua... |
bab9d6b28ca37ff5a34bf535d366ef81f10a5f90 | pyinfra/modules/virtualenv.py | pyinfra/modules/virtualenv.py | # pyinfra
# File: pyinfra/modules/pip.py
# Desc: manage virtualenvs
'''
Manage Python virtual environments
'''
from __future__ import unicode_literals
from pyinfra.api import operation
from pyinfra.modules import files
@operation
def virtualenv(
state, host,
path, python=None, site_packages=False, always_c... | # pyinfra
# File: pyinfra/modules/pip.py
# Desc: manage virtualenvs
'''
Manage Python virtual environments
'''
from __future__ import unicode_literals
from pyinfra.api import operation
from pyinfra.modules import files
@operation
def virtualenv(
state, host,
path, python=None, site_packages=False, always_c... | Refactor building command using join() | Refactor building command using join()
| Python | mit | Fizzadar/pyinfra,Fizzadar/pyinfra | # pyinfra
# File: pyinfra/modules/pip.py
# Desc: manage virtualenvs
'''
Manage Python virtual environments
'''
from __future__ import unicode_literals
from pyinfra.api import operation
from pyinfra.modules import files
@operation
def virtualenv(
state, host,
path, python=None, site_packages=False, always_c... | # pyinfra
# File: pyinfra/modules/pip.py
# Desc: manage virtualenvs
'''
Manage Python virtual environments
'''
from __future__ import unicode_literals
from pyinfra.api import operation
from pyinfra.modules import files
@operation
def virtualenv(
state, host,
path, python=None, site_packages=False, always_c... | <commit_before># pyinfra
# File: pyinfra/modules/pip.py
# Desc: manage virtualenvs
'''
Manage Python virtual environments
'''
from __future__ import unicode_literals
from pyinfra.api import operation
from pyinfra.modules import files
@operation
def virtualenv(
state, host,
path, python=None, site_packages=... | # pyinfra
# File: pyinfra/modules/pip.py
# Desc: manage virtualenvs
'''
Manage Python virtual environments
'''
from __future__ import unicode_literals
from pyinfra.api import operation
from pyinfra.modules import files
@operation
def virtualenv(
state, host,
path, python=None, site_packages=False, always_c... | # pyinfra
# File: pyinfra/modules/pip.py
# Desc: manage virtualenvs
'''
Manage Python virtual environments
'''
from __future__ import unicode_literals
from pyinfra.api import operation
from pyinfra.modules import files
@operation
def virtualenv(
state, host,
path, python=None, site_packages=False, always_c... | <commit_before># pyinfra
# File: pyinfra/modules/pip.py
# Desc: manage virtualenvs
'''
Manage Python virtual environments
'''
from __future__ import unicode_literals
from pyinfra.api import operation
from pyinfra.modules import files
@operation
def virtualenv(
state, host,
path, python=None, site_packages=... |
0b1cdfac668b15ab9d48b1eb8a4ac4bff7b8c98e | pylinks/main/templatetags/menu_li.py | pylinks/main/templatetags/menu_li.py | from django.template import Library
from django.template.defaulttags import URLNode, url
from django.utils.html import escape, mark_safe
register = Library()
class MenuLINode(URLNode):
def render(self, context):
# Pull out the match and hijack asvar
# to be used for the link title
request... | from django.template import Library
from django.template.defaulttags import URLNode, url
from django.utils.html import escape, mark_safe
register = Library()
class MenuLINode(URLNode):
def render(self, context):
# Pull out the match and hijack asvar
# to be used for the link title
match =... | Fix check for valid resolver_match | Fix check for valid resolver_match
| Python | mit | michaelmior/pylinks,michaelmior/pylinks,michaelmior/pylinks | from django.template import Library
from django.template.defaulttags import URLNode, url
from django.utils.html import escape, mark_safe
register = Library()
class MenuLINode(URLNode):
def render(self, context):
# Pull out the match and hijack asvar
# to be used for the link title
request... | from django.template import Library
from django.template.defaulttags import URLNode, url
from django.utils.html import escape, mark_safe
register = Library()
class MenuLINode(URLNode):
def render(self, context):
# Pull out the match and hijack asvar
# to be used for the link title
match =... | <commit_before>from django.template import Library
from django.template.defaulttags import URLNode, url
from django.utils.html import escape, mark_safe
register = Library()
class MenuLINode(URLNode):
def render(self, context):
# Pull out the match and hijack asvar
# to be used for the link title
... | from django.template import Library
from django.template.defaulttags import URLNode, url
from django.utils.html import escape, mark_safe
register = Library()
class MenuLINode(URLNode):
def render(self, context):
# Pull out the match and hijack asvar
# to be used for the link title
match =... | from django.template import Library
from django.template.defaulttags import URLNode, url
from django.utils.html import escape, mark_safe
register = Library()
class MenuLINode(URLNode):
def render(self, context):
# Pull out the match and hijack asvar
# to be used for the link title
request... | <commit_before>from django.template import Library
from django.template.defaulttags import URLNode, url
from django.utils.html import escape, mark_safe
register = Library()
class MenuLINode(URLNode):
def render(self, context):
# Pull out the match and hijack asvar
# to be used for the link title
... |
36f9faf31bf7002d95aaa43b1427367a3a781ffa | plugins/httptitle.py | plugins/httptitle.py | import plugin
import urllib2
import logging
import re
from httplib import HTTPException
from htmllib import HTMLParser
class Plugin(plugin.baseplugin):
def __init__(self, bot):
self._regex = re.compile("(https?://.+)\s?")
self._ua = "Mozilla/5.0 (X11; Linux x86_64; rv:2.0b8) Gecko/20100101 Firefox... | import plugin
import urllib2
import logging
import re
from httplib import HTTPException
import HTMLParser
class Plugin(plugin.baseplugin):
def __init__(self, bot):
self._regex = re.compile("(https?://.+)\s?")
self._ua = "Mozilla/5.0 (X11; Linux x86_64; rv:2.0b8) Gecko/20100101 Firefox/4.0b8"
... | Use the HTMLParser module instead of htmllib | Use the HTMLParser module instead of htmllib
| Python | mit | mineo/lala,mineo/lala | import plugin
import urllib2
import logging
import re
from httplib import HTTPException
from htmllib import HTMLParser
class Plugin(plugin.baseplugin):
def __init__(self, bot):
self._regex = re.compile("(https?://.+)\s?")
self._ua = "Mozilla/5.0 (X11; Linux x86_64; rv:2.0b8) Gecko/20100101 Firefox... | import plugin
import urllib2
import logging
import re
from httplib import HTTPException
import HTMLParser
class Plugin(plugin.baseplugin):
def __init__(self, bot):
self._regex = re.compile("(https?://.+)\s?")
self._ua = "Mozilla/5.0 (X11; Linux x86_64; rv:2.0b8) Gecko/20100101 Firefox/4.0b8"
... | <commit_before>import plugin
import urllib2
import logging
import re
from httplib import HTTPException
from htmllib import HTMLParser
class Plugin(plugin.baseplugin):
def __init__(self, bot):
self._regex = re.compile("(https?://.+)\s?")
self._ua = "Mozilla/5.0 (X11; Linux x86_64; rv:2.0b8) Gecko/2... | import plugin
import urllib2
import logging
import re
from httplib import HTTPException
import HTMLParser
class Plugin(plugin.baseplugin):
def __init__(self, bot):
self._regex = re.compile("(https?://.+)\s?")
self._ua = "Mozilla/5.0 (X11; Linux x86_64; rv:2.0b8) Gecko/20100101 Firefox/4.0b8"
... | import plugin
import urllib2
import logging
import re
from httplib import HTTPException
from htmllib import HTMLParser
class Plugin(plugin.baseplugin):
def __init__(self, bot):
self._regex = re.compile("(https?://.+)\s?")
self._ua = "Mozilla/5.0 (X11; Linux x86_64; rv:2.0b8) Gecko/20100101 Firefox... | <commit_before>import plugin
import urllib2
import logging
import re
from httplib import HTTPException
from htmllib import HTMLParser
class Plugin(plugin.baseplugin):
def __init__(self, bot):
self._regex = re.compile("(https?://.+)\s?")
self._ua = "Mozilla/5.0 (X11; Linux x86_64; rv:2.0b8) Gecko/2... |
3d6cc53a3fa5f272086612fa487589acc9b13737 | federez_ldap/wsgi.py | federez_ldap/wsgi.py | """
WSGI config for federez_ldap project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATI... | """
WSGI config for federez_ldap project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATI... | Append app path to Python path in WSGI | Append app path to Python path in WSGI
| Python | mit | FedeRez/webldap,FedeRez/webldap,FedeRez/webldap | """
WSGI config for federez_ldap project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATI... | """
WSGI config for federez_ldap project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATI... | <commit_before>"""
WSGI config for federez_ldap project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the `... | """
WSGI config for federez_ldap project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATI... | """
WSGI config for federez_ldap project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATI... | <commit_before>"""
WSGI config for federez_ldap project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the `... |
daaeb002d7a4a2845052dd3078512e66189c5a88 | linguist/tests/base.py | linguist/tests/base.py | # -*- coding: utf-8 -*-
from django.test import TestCase
from ..registry import LinguistRegistry as Registry
from ..models import Translation
from . import settings
from .translations import FooModel, FooTranslation
class BaseTestCase(TestCase):
"""
Base test class mixin.
"""
@property
def lang... | # -*- coding: utf-8 -*-
from django.test import TestCase
from ..models import Translation
from . import settings
from .translations import FooModel
class BaseTestCase(TestCase):
"""
Base test class mixin.
"""
@property
def languages(self):
return [language[0] for language in settings.LA... | Update BaseTest class (removing registry). | Update BaseTest class (removing registry).
| Python | mit | ulule/django-linguist | # -*- coding: utf-8 -*-
from django.test import TestCase
from ..registry import LinguistRegistry as Registry
from ..models import Translation
from . import settings
from .translations import FooModel, FooTranslation
class BaseTestCase(TestCase):
"""
Base test class mixin.
"""
@property
def lang... | # -*- coding: utf-8 -*-
from django.test import TestCase
from ..models import Translation
from . import settings
from .translations import FooModel
class BaseTestCase(TestCase):
"""
Base test class mixin.
"""
@property
def languages(self):
return [language[0] for language in settings.LA... | <commit_before># -*- coding: utf-8 -*-
from django.test import TestCase
from ..registry import LinguistRegistry as Registry
from ..models import Translation
from . import settings
from .translations import FooModel, FooTranslation
class BaseTestCase(TestCase):
"""
Base test class mixin.
"""
@proper... | # -*- coding: utf-8 -*-
from django.test import TestCase
from ..models import Translation
from . import settings
from .translations import FooModel
class BaseTestCase(TestCase):
"""
Base test class mixin.
"""
@property
def languages(self):
return [language[0] for language in settings.LA... | # -*- coding: utf-8 -*-
from django.test import TestCase
from ..registry import LinguistRegistry as Registry
from ..models import Translation
from . import settings
from .translations import FooModel, FooTranslation
class BaseTestCase(TestCase):
"""
Base test class mixin.
"""
@property
def lang... | <commit_before># -*- coding: utf-8 -*-
from django.test import TestCase
from ..registry import LinguistRegistry as Registry
from ..models import Translation
from . import settings
from .translations import FooModel, FooTranslation
class BaseTestCase(TestCase):
"""
Base test class mixin.
"""
@proper... |
213a7a36bd599279d060edc053a86b602c9731b1 | python/turbodbc_test/test_has_numpy_support.py | python/turbodbc_test/test_has_numpy_support.py | from mock import patch
from turbodbc.cursor import _has_numpy_support
def test_has_numpy_support_fails():
with patch('__builtin__.__import__', side_effect=ImportError):
assert _has_numpy_support() == False
def test_has_numpy_support_succeeds():
assert _has_numpy_support() == True | import six
from mock import patch
from turbodbc.cursor import _has_numpy_support
# Python 2/3 compatibility
_IMPORT_FUNCTION_NAME = "{}.__import__".format(six.moves.builtins.__name__)
def test_has_numpy_support_fails():
with patch(_IMPORT_FUNCTION_NAME, side_effect=ImportError):
assert _has_numpy_supp... | Fix test issue with mocking import for Python 3 | Fix test issue with mocking import for Python 3
| Python | mit | blue-yonder/turbodbc,blue-yonder/turbodbc,blue-yonder/turbodbc,blue-yonder/turbodbc | from mock import patch
from turbodbc.cursor import _has_numpy_support
def test_has_numpy_support_fails():
with patch('__builtin__.__import__', side_effect=ImportError):
assert _has_numpy_support() == False
def test_has_numpy_support_succeeds():
assert _has_numpy_support() == TrueFix test issue with ... | import six
from mock import patch
from turbodbc.cursor import _has_numpy_support
# Python 2/3 compatibility
_IMPORT_FUNCTION_NAME = "{}.__import__".format(six.moves.builtins.__name__)
def test_has_numpy_support_fails():
with patch(_IMPORT_FUNCTION_NAME, side_effect=ImportError):
assert _has_numpy_supp... | <commit_before>from mock import patch
from turbodbc.cursor import _has_numpy_support
def test_has_numpy_support_fails():
with patch('__builtin__.__import__', side_effect=ImportError):
assert _has_numpy_support() == False
def test_has_numpy_support_succeeds():
assert _has_numpy_support() == True<comm... | import six
from mock import patch
from turbodbc.cursor import _has_numpy_support
# Python 2/3 compatibility
_IMPORT_FUNCTION_NAME = "{}.__import__".format(six.moves.builtins.__name__)
def test_has_numpy_support_fails():
with patch(_IMPORT_FUNCTION_NAME, side_effect=ImportError):
assert _has_numpy_supp... | from mock import patch
from turbodbc.cursor import _has_numpy_support
def test_has_numpy_support_fails():
with patch('__builtin__.__import__', side_effect=ImportError):
assert _has_numpy_support() == False
def test_has_numpy_support_succeeds():
assert _has_numpy_support() == TrueFix test issue with ... | <commit_before>from mock import patch
from turbodbc.cursor import _has_numpy_support
def test_has_numpy_support_fails():
with patch('__builtin__.__import__', side_effect=ImportError):
assert _has_numpy_support() == False
def test_has_numpy_support_succeeds():
assert _has_numpy_support() == True<comm... |
254702c1b5a76701a1437d6dc3d732ec27ebaa81 | backslash/api_object.py | backslash/api_object.py |
class APIObject(object):
def __init__(self, client, json_data):
super(APIObject, self).__init__()
self.client = client
self._data = json_data
def __eq__(self, other):
if not isinstance(other, APIObject):
return NotImplemented
return self.client is other.cli... |
class APIObject(object):
def __init__(self, client, json_data):
super(APIObject, self).__init__()
self.client = client
self._data = json_data
def __eq__(self, other):
if not isinstance(other, APIObject):
return NotImplemented
return self.client is other.cli... | Make `refresh` return self for chaining actions | Make `refresh` return self for chaining actions
| Python | bsd-3-clause | slash-testing/backslash-python,vmalloc/backslash-python |
class APIObject(object):
def __init__(self, client, json_data):
super(APIObject, self).__init__()
self.client = client
self._data = json_data
def __eq__(self, other):
if not isinstance(other, APIObject):
return NotImplemented
return self.client is other.cli... |
class APIObject(object):
def __init__(self, client, json_data):
super(APIObject, self).__init__()
self.client = client
self._data = json_data
def __eq__(self, other):
if not isinstance(other, APIObject):
return NotImplemented
return self.client is other.cli... | <commit_before>
class APIObject(object):
def __init__(self, client, json_data):
super(APIObject, self).__init__()
self.client = client
self._data = json_data
def __eq__(self, other):
if not isinstance(other, APIObject):
return NotImplemented
return self.clie... |
class APIObject(object):
def __init__(self, client, json_data):
super(APIObject, self).__init__()
self.client = client
self._data = json_data
def __eq__(self, other):
if not isinstance(other, APIObject):
return NotImplemented
return self.client is other.cli... |
class APIObject(object):
def __init__(self, client, json_data):
super(APIObject, self).__init__()
self.client = client
self._data = json_data
def __eq__(self, other):
if not isinstance(other, APIObject):
return NotImplemented
return self.client is other.cli... | <commit_before>
class APIObject(object):
def __init__(self, client, json_data):
super(APIObject, self).__init__()
self.client = client
self._data = json_data
def __eq__(self, other):
if not isinstance(other, APIObject):
return NotImplemented
return self.clie... |
8ee40b1cd12f5c39a239b911a2a04b293553f1f6 | flasgger/__init__.py | flasgger/__init__.py |
__version__ = '0.9.1.dev0'
__author__ = 'Bruno Rocha'
__email__ = 'rochacbruno@gmail.com'
from jsonschema import ValidationError # noqa
from .base import Swagger, Flasgger, NO_SANITIZER, BR_SANITIZER, MK_SANITIZER, LazyJSONEncoder # noqa
from .utils import swag_from, validate, apispec_to_template, LazyString # no... |
__version__ = '0.9.1'
__author__ = 'Bruno Rocha'
__email__ = 'rochacbruno@gmail.com'
from jsonschema import ValidationError # noqa
from .base import Swagger, Flasgger, NO_SANITIZER, BR_SANITIZER, MK_SANITIZER, LazyJSONEncoder # noqa
from .utils import swag_from, validate, apispec_to_template, LazyString # noqa
fr... | Set __version__ to 0.9.1 for release. | Set __version__ to 0.9.1 for release.
| Python | mit | rochacbruno/flasgger,flasgger/flasgger,flasgger/flasgger,rochacbruno/flasgger,rochacbruno/flasgger,flasgger/flasgger,flasgger/flasgger |
__version__ = '0.9.1.dev0'
__author__ = 'Bruno Rocha'
__email__ = 'rochacbruno@gmail.com'
from jsonschema import ValidationError # noqa
from .base import Swagger, Flasgger, NO_SANITIZER, BR_SANITIZER, MK_SANITIZER, LazyJSONEncoder # noqa
from .utils import swag_from, validate, apispec_to_template, LazyString # no... |
__version__ = '0.9.1'
__author__ = 'Bruno Rocha'
__email__ = 'rochacbruno@gmail.com'
from jsonschema import ValidationError # noqa
from .base import Swagger, Flasgger, NO_SANITIZER, BR_SANITIZER, MK_SANITIZER, LazyJSONEncoder # noqa
from .utils import swag_from, validate, apispec_to_template, LazyString # noqa
fr... | <commit_before>
__version__ = '0.9.1.dev0'
__author__ = 'Bruno Rocha'
__email__ = 'rochacbruno@gmail.com'
from jsonschema import ValidationError # noqa
from .base import Swagger, Flasgger, NO_SANITIZER, BR_SANITIZER, MK_SANITIZER, LazyJSONEncoder # noqa
from .utils import swag_from, validate, apispec_to_template, L... |
__version__ = '0.9.1'
__author__ = 'Bruno Rocha'
__email__ = 'rochacbruno@gmail.com'
from jsonschema import ValidationError # noqa
from .base import Swagger, Flasgger, NO_SANITIZER, BR_SANITIZER, MK_SANITIZER, LazyJSONEncoder # noqa
from .utils import swag_from, validate, apispec_to_template, LazyString # noqa
fr... |
__version__ = '0.9.1.dev0'
__author__ = 'Bruno Rocha'
__email__ = 'rochacbruno@gmail.com'
from jsonschema import ValidationError # noqa
from .base import Swagger, Flasgger, NO_SANITIZER, BR_SANITIZER, MK_SANITIZER, LazyJSONEncoder # noqa
from .utils import swag_from, validate, apispec_to_template, LazyString # no... | <commit_before>
__version__ = '0.9.1.dev0'
__author__ = 'Bruno Rocha'
__email__ = 'rochacbruno@gmail.com'
from jsonschema import ValidationError # noqa
from .base import Swagger, Flasgger, NO_SANITIZER, BR_SANITIZER, MK_SANITIZER, LazyJSONEncoder # noqa
from .utils import swag_from, validate, apispec_to_template, L... |
35e0d3e5f275c79a80aa843700f621da59fefd6b | scripts/environment.py | scripts/environment.py | import json
import logging
import os
log_format = "[{levelname}][{name}] {message}"
def configure_logging(log_level):
logging.basicConfig(level = log_level, format = log_format, style = "{")
logging.addLevelName(logging.DEBUG, "Debug")
logging.addLevelName(logging.INFO, "Info")
logging.addLevelName(logging.WARN... | import json
import logging
import os
import sys
log_format = "[{levelname}][{name}] {message}"
def configure_logging(log_level):
logging.basicConfig(level = log_level, format = log_format, style = "{")
logging.addLevelName(logging.DEBUG, "Debug")
logging.addLevelName(logging.INFO, "Info")
logging.addLevelName(l... | Use sys.executable as the default python executable | Use sys.executable as the default python executable
| Python | mit | BenjaminHamon/MyWebsite,BenjaminHamon/MyWebsite | import json
import logging
import os
log_format = "[{levelname}][{name}] {message}"
def configure_logging(log_level):
logging.basicConfig(level = log_level, format = log_format, style = "{")
logging.addLevelName(logging.DEBUG, "Debug")
logging.addLevelName(logging.INFO, "Info")
logging.addLevelName(logging.WARN... | import json
import logging
import os
import sys
log_format = "[{levelname}][{name}] {message}"
def configure_logging(log_level):
logging.basicConfig(level = log_level, format = log_format, style = "{")
logging.addLevelName(logging.DEBUG, "Debug")
logging.addLevelName(logging.INFO, "Info")
logging.addLevelName(l... | <commit_before>import json
import logging
import os
log_format = "[{levelname}][{name}] {message}"
def configure_logging(log_level):
logging.basicConfig(level = log_level, format = log_format, style = "{")
logging.addLevelName(logging.DEBUG, "Debug")
logging.addLevelName(logging.INFO, "Info")
logging.addLevelNa... | import json
import logging
import os
import sys
log_format = "[{levelname}][{name}] {message}"
def configure_logging(log_level):
logging.basicConfig(level = log_level, format = log_format, style = "{")
logging.addLevelName(logging.DEBUG, "Debug")
logging.addLevelName(logging.INFO, "Info")
logging.addLevelName(l... | import json
import logging
import os
log_format = "[{levelname}][{name}] {message}"
def configure_logging(log_level):
logging.basicConfig(level = log_level, format = log_format, style = "{")
logging.addLevelName(logging.DEBUG, "Debug")
logging.addLevelName(logging.INFO, "Info")
logging.addLevelName(logging.WARN... | <commit_before>import json
import logging
import os
log_format = "[{levelname}][{name}] {message}"
def configure_logging(log_level):
logging.basicConfig(level = log_level, format = log_format, style = "{")
logging.addLevelName(logging.DEBUG, "Debug")
logging.addLevelName(logging.INFO, "Info")
logging.addLevelNa... |
01aa219b0058cbfbdb96e890f510fa275f3ef790 | python/Completion.py | python/Completion.py | import vim, syncrequest, types
class Completion:
def get_completions(self, column, partialWord):
parameters = {}
parameters['column'] = vim.eval(column)
parameters['wordToComplete'] = vim.eval(partialWord)
parameters['WantDocumentationForEveryCompletionResult'] = \
bool(... | import vim, syncrequest, types
class Completion:
def get_completions(self, column, partialWord):
parameters = {}
parameters['column'] = vim.eval(column)
parameters['wordToComplete'] = vim.eval(partialWord)
parameters['WantDocumentationForEveryCompletionResult'] = \
bool(... | Use or operator in python to tidy up completion building. | Use or operator in python to tidy up completion building.
| Python | mit | OmniSharp/omnisharp-vim,OmniSharp/omnisharp-vim,OmniSharp/omnisharp-vim | import vim, syncrequest, types
class Completion:
def get_completions(self, column, partialWord):
parameters = {}
parameters['column'] = vim.eval(column)
parameters['wordToComplete'] = vim.eval(partialWord)
parameters['WantDocumentationForEveryCompletionResult'] = \
bool(... | import vim, syncrequest, types
class Completion:
def get_completions(self, column, partialWord):
parameters = {}
parameters['column'] = vim.eval(column)
parameters['wordToComplete'] = vim.eval(partialWord)
parameters['WantDocumentationForEveryCompletionResult'] = \
bool(... | <commit_before>import vim, syncrequest, types
class Completion:
def get_completions(self, column, partialWord):
parameters = {}
parameters['column'] = vim.eval(column)
parameters['wordToComplete'] = vim.eval(partialWord)
parameters['WantDocumentationForEveryCompletionResult'] = \
... | import vim, syncrequest, types
class Completion:
def get_completions(self, column, partialWord):
parameters = {}
parameters['column'] = vim.eval(column)
parameters['wordToComplete'] = vim.eval(partialWord)
parameters['WantDocumentationForEveryCompletionResult'] = \
bool(... | import vim, syncrequest, types
class Completion:
def get_completions(self, column, partialWord):
parameters = {}
parameters['column'] = vim.eval(column)
parameters['wordToComplete'] = vim.eval(partialWord)
parameters['WantDocumentationForEveryCompletionResult'] = \
bool(... | <commit_before>import vim, syncrequest, types
class Completion:
def get_completions(self, column, partialWord):
parameters = {}
parameters['column'] = vim.eval(column)
parameters['wordToComplete'] = vim.eval(partialWord)
parameters['WantDocumentationForEveryCompletionResult'] = \
... |
76dd8c7b000a97b4c6b808d69294e5f1d3eee3e4 | rdmo/core/exports.py | rdmo/core/exports.py | from xml.dom.minidom import parseString
from django.http import HttpResponse
class XMLResponse(HttpResponse):
def __init__(self, xml, name=None):
super().__init__(prettify_xml(xml), content_type='application/xml')
if name:
self['Content-Disposition'] = 'filename="{}.xml"'.format(name... | from xml.dom.minidom import parseString
from django.http import HttpResponse
class XMLResponse(HttpResponse):
def __init__(self, xml, name=None):
super().__init__(prettify_xml(xml), content_type='application/xml')
if name:
self['Content-Disposition'] = 'filename="{}.xml"'.format(name... | Add explicit xml export options (indent, new line and encoding) | Add explicit xml export options (indent, new line and encoding)
| Python | apache-2.0 | rdmorganiser/rdmo,rdmorganiser/rdmo,rdmorganiser/rdmo | from xml.dom.minidom import parseString
from django.http import HttpResponse
class XMLResponse(HttpResponse):
def __init__(self, xml, name=None):
super().__init__(prettify_xml(xml), content_type='application/xml')
if name:
self['Content-Disposition'] = 'filename="{}.xml"'.format(name... | from xml.dom.minidom import parseString
from django.http import HttpResponse
class XMLResponse(HttpResponse):
def __init__(self, xml, name=None):
super().__init__(prettify_xml(xml), content_type='application/xml')
if name:
self['Content-Disposition'] = 'filename="{}.xml"'.format(name... | <commit_before>from xml.dom.minidom import parseString
from django.http import HttpResponse
class XMLResponse(HttpResponse):
def __init__(self, xml, name=None):
super().__init__(prettify_xml(xml), content_type='application/xml')
if name:
self['Content-Disposition'] = 'filename="{}.xm... | from xml.dom.minidom import parseString
from django.http import HttpResponse
class XMLResponse(HttpResponse):
def __init__(self, xml, name=None):
super().__init__(prettify_xml(xml), content_type='application/xml')
if name:
self['Content-Disposition'] = 'filename="{}.xml"'.format(name... | from xml.dom.minidom import parseString
from django.http import HttpResponse
class XMLResponse(HttpResponse):
def __init__(self, xml, name=None):
super().__init__(prettify_xml(xml), content_type='application/xml')
if name:
self['Content-Disposition'] = 'filename="{}.xml"'.format(name... | <commit_before>from xml.dom.minidom import parseString
from django.http import HttpResponse
class XMLResponse(HttpResponse):
def __init__(self, xml, name=None):
super().__init__(prettify_xml(xml), content_type='application/xml')
if name:
self['Content-Disposition'] = 'filename="{}.xm... |
aef60d17607a0819e24a2a61304bd5ca38289d50 | scripts/slave/dart/dart_util.py | scripts/slave/dart/dart_util.py | #!/usr/bin/python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utils for the dart project.
"""
import optparse
import os
import sys
from common import chromium_utils
def clobber():
print('Cl... | #!/usr/bin/python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utils for the dart project.
"""
import optparse
import subprocess
import sys
def clobber():
cmd = [sys.executable,
'./t... | Use the new tools/clean_output_directory.py script for clobbering builders. | Use the new tools/clean_output_directory.py script for clobbering builders.
This will unify our clobbering functionality across builders that use annotated steps and builders with test setup in the buildbot source.
TBR=foo
Review URL: https://chromiumcodereview.appspot.com/10834305
git-svn-id: 239fca9b83025a0b6f823a... | Python | bsd-3-clause | eunchong/build,eunchong/build,eunchong/build,eunchong/build | #!/usr/bin/python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utils for the dart project.
"""
import optparse
import os
import sys
from common import chromium_utils
def clobber():
print('Cl... | #!/usr/bin/python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utils for the dart project.
"""
import optparse
import subprocess
import sys
def clobber():
cmd = [sys.executable,
'./t... | <commit_before>#!/usr/bin/python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utils for the dart project.
"""
import optparse
import os
import sys
from common import chromium_utils
def clobber... | #!/usr/bin/python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utils for the dart project.
"""
import optparse
import subprocess
import sys
def clobber():
cmd = [sys.executable,
'./t... | #!/usr/bin/python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utils for the dart project.
"""
import optparse
import os
import sys
from common import chromium_utils
def clobber():
print('Cl... | <commit_before>#!/usr/bin/python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utils for the dart project.
"""
import optparse
import os
import sys
from common import chromium_utils
def clobber... |
a6ce85fa26235769b84003cf3cd73999b343bee6 | tests/environment.py | tests/environment.py | import os
import shutil
import tempfile
def before_all(context):
context.starting_dir = os.getcwd()
context.temp_dir = tempfile.mkdtemp()
os.chdir(context.temp_dir)
def after_all(context):
os.chdir(context.starting_dir)
shutil.rmtree(context.temp_dir)
| import os
import shutil
import tempfile
def before_scenario(context, *args, **kwargs):
context.starting_dir = os.getcwd()
context.temp_dir = tempfile.mkdtemp()
os.chdir(context.temp_dir)
def after_scenario(context, *args, **kwargs):
os.chdir(context.starting_dir)
shutil.rmtree(context.temp_dir)
| Make temp dirs for each scenario. | Make temp dirs for each scenario.
| Python | mit | coddingtonbear/jirafs,coddingtonbear/jirafs | import os
import shutil
import tempfile
def before_all(context):
context.starting_dir = os.getcwd()
context.temp_dir = tempfile.mkdtemp()
os.chdir(context.temp_dir)
def after_all(context):
os.chdir(context.starting_dir)
shutil.rmtree(context.temp_dir)
Make temp dirs for each scenario. | import os
import shutil
import tempfile
def before_scenario(context, *args, **kwargs):
context.starting_dir = os.getcwd()
context.temp_dir = tempfile.mkdtemp()
os.chdir(context.temp_dir)
def after_scenario(context, *args, **kwargs):
os.chdir(context.starting_dir)
shutil.rmtree(context.temp_dir)
| <commit_before>import os
import shutil
import tempfile
def before_all(context):
context.starting_dir = os.getcwd()
context.temp_dir = tempfile.mkdtemp()
os.chdir(context.temp_dir)
def after_all(context):
os.chdir(context.starting_dir)
shutil.rmtree(context.temp_dir)
<commit_msg>Make temp dirs fo... | import os
import shutil
import tempfile
def before_scenario(context, *args, **kwargs):
context.starting_dir = os.getcwd()
context.temp_dir = tempfile.mkdtemp()
os.chdir(context.temp_dir)
def after_scenario(context, *args, **kwargs):
os.chdir(context.starting_dir)
shutil.rmtree(context.temp_dir)
| import os
import shutil
import tempfile
def before_all(context):
context.starting_dir = os.getcwd()
context.temp_dir = tempfile.mkdtemp()
os.chdir(context.temp_dir)
def after_all(context):
os.chdir(context.starting_dir)
shutil.rmtree(context.temp_dir)
Make temp dirs for each scenario.import os
i... | <commit_before>import os
import shutil
import tempfile
def before_all(context):
context.starting_dir = os.getcwd()
context.temp_dir = tempfile.mkdtemp()
os.chdir(context.temp_dir)
def after_all(context):
os.chdir(context.starting_dir)
shutil.rmtree(context.temp_dir)
<commit_msg>Make temp dirs fo... |
d91b9fe330f61b2790d3c4a84190caa2b798d80e | bitmath/integrations/__init__.py | bitmath/integrations/__init__.py | # -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright © 2014-2016 Tim Bielawa <timbielawa@gmail.com>
# See GitHub Contributors Graph for more information
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to ... | # -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright © 2014-2016 Tim Bielawa <timbielawa@gmail.com>
# See GitHub Contributors Graph for more information
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to ... | Fix build errors with Python <3.6 | Fix build errors with Python <3.6
The `ModuleNotFoundError` was introduced in Python 3.6.
| Python | mit | tbielawa/bitmath,tbielawa/bitmath | # -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright © 2014-2016 Tim Bielawa <timbielawa@gmail.com>
# See GitHub Contributors Graph for more information
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to ... | # -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright © 2014-2016 Tim Bielawa <timbielawa@gmail.com>
# See GitHub Contributors Graph for more information
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to ... | <commit_before># -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright © 2014-2016 Tim Bielawa <timbielawa@gmail.com>
# See GitHub Contributors Graph for more information
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "... | # -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright © 2014-2016 Tim Bielawa <timbielawa@gmail.com>
# See GitHub Contributors Graph for more information
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to ... | # -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright © 2014-2016 Tim Bielawa <timbielawa@gmail.com>
# See GitHub Contributors Graph for more information
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to ... | <commit_before># -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright © 2014-2016 Tim Bielawa <timbielawa@gmail.com>
# See GitHub Contributors Graph for more information
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "... |
b65f44f1f4d5b5fea061c0d75391c4e771563d12 | plugins/configuration/preferences/preferences.py | plugins/configuration/preferences/preferences.py | #!/usr/bin/env python
#-*- coding: utf-8 -*-
#This software is distributed under the Creative Commons license (CC0) version 1.0. A copy of this license should have been distributed with this software.
#The license can also be read online: <https://creativecommons.org/publicdomain/zero/1.0/>. If this online license dif... | #!/usr/bin/env python
#-*- coding: utf-8 -*-
#This software is distributed under the Creative Commons license (CC0) version 1.0. A copy of this license should have been distributed with this software.
#The license can also be read online: <https://creativecommons.org/publicdomain/zero/1.0/>. If this online license dif... | Fix instantiating the preparation when plug-ins are done loading | Fix instantiating the preparation when plug-ins are done loading
The new position of the state variable.
| Python | cc0-1.0 | Ghostkeeper/Luna | #!/usr/bin/env python
#-*- coding: utf-8 -*-
#This software is distributed under the Creative Commons license (CC0) version 1.0. A copy of this license should have been distributed with this software.
#The license can also be read online: <https://creativecommons.org/publicdomain/zero/1.0/>. If this online license dif... | #!/usr/bin/env python
#-*- coding: utf-8 -*-
#This software is distributed under the Creative Commons license (CC0) version 1.0. A copy of this license should have been distributed with this software.
#The license can also be read online: <https://creativecommons.org/publicdomain/zero/1.0/>. If this online license dif... | <commit_before>#!/usr/bin/env python
#-*- coding: utf-8 -*-
#This software is distributed under the Creative Commons license (CC0) version 1.0. A copy of this license should have been distributed with this software.
#The license can also be read online: <https://creativecommons.org/publicdomain/zero/1.0/>. If this onl... | #!/usr/bin/env python
#-*- coding: utf-8 -*-
#This software is distributed under the Creative Commons license (CC0) version 1.0. A copy of this license should have been distributed with this software.
#The license can also be read online: <https://creativecommons.org/publicdomain/zero/1.0/>. If this online license dif... | #!/usr/bin/env python
#-*- coding: utf-8 -*-
#This software is distributed under the Creative Commons license (CC0) version 1.0. A copy of this license should have been distributed with this software.
#The license can also be read online: <https://creativecommons.org/publicdomain/zero/1.0/>. If this online license dif... | <commit_before>#!/usr/bin/env python
#-*- coding: utf-8 -*-
#This software is distributed under the Creative Commons license (CC0) version 1.0. A copy of this license should have been distributed with this software.
#The license can also be read online: <https://creativecommons.org/publicdomain/zero/1.0/>. If this onl... |
58f31424ccb2eda5ee94514bd1305f1b814ab1de | estmator_project/est_client/urls.py | estmator_project/est_client/urls.py | from django.conf.urls import url
import views
urlpatterns = [
# urls begin with /client/
url(r'^$', views.client_view, name='api_client'), # not sure what the api urls are doing currently
url(
r'^form$',
views.client_form_view,
name='client_form'
),
url(
r'^form/ed... | from django.conf.urls import url
import views
urlpatterns = [
# urls begin with /client/
url(r'^$', views.client_view, name='api_client'), # not sure what the api urls are doing currently
url(
r'^form$',
views.client_form_view,
name='client_form'
),
url(
r'^form/ed... | Add simple company form routes | Add simple company form routes
| Python | mit | Estmator/EstmatorApp,Estmator/EstmatorApp,Estmator/EstmatorApp | from django.conf.urls import url
import views
urlpatterns = [
# urls begin with /client/
url(r'^$', views.client_view, name='api_client'), # not sure what the api urls are doing currently
url(
r'^form$',
views.client_form_view,
name='client_form'
),
url(
r'^form/ed... | from django.conf.urls import url
import views
urlpatterns = [
# urls begin with /client/
url(r'^$', views.client_view, name='api_client'), # not sure what the api urls are doing currently
url(
r'^form$',
views.client_form_view,
name='client_form'
),
url(
r'^form/ed... | <commit_before>from django.conf.urls import url
import views
urlpatterns = [
# urls begin with /client/
url(r'^$', views.client_view, name='api_client'), # not sure what the api urls are doing currently
url(
r'^form$',
views.client_form_view,
name='client_form'
),
url(
... | from django.conf.urls import url
import views
urlpatterns = [
# urls begin with /client/
url(r'^$', views.client_view, name='api_client'), # not sure what the api urls are doing currently
url(
r'^form$',
views.client_form_view,
name='client_form'
),
url(
r'^form/ed... | from django.conf.urls import url
import views
urlpatterns = [
# urls begin with /client/
url(r'^$', views.client_view, name='api_client'), # not sure what the api urls are doing currently
url(
r'^form$',
views.client_form_view,
name='client_form'
),
url(
r'^form/ed... | <commit_before>from django.conf.urls import url
import views
urlpatterns = [
# urls begin with /client/
url(r'^$', views.client_view, name='api_client'), # not sure what the api urls are doing currently
url(
r'^form$',
views.client_form_view,
name='client_form'
),
url(
... |
de8b35e5c0a3c5f1427bbdcf3b60bd3e915cf0ad | xorcise/__init__.py | xorcise/__init__.py | import curses
from .character import Character
from .console import Console
from .line import Line
from .attribute import RenditionAttribute, ColorAttribute
from .misc import ESCAPE_CHARS, DELETE_CHARS, BACKSPACE_CHARS, \
is_printable_char, char_with_control_key
__console = None
def turn_on_cons... | import curses
from .character import Character
from .console import Console
from .line import Line
from .attribute import RenditionAttribute, ColorAttribute
from .misc import ESCAPE_CHARS, DELETE_CHARS, BACKSPACE_CHARS, \
is_printable_char, char_with_control_key
def turn_on_console(asciize=False, ... | Remove an extra global variable in xorcise package | Remove an extra global variable in xorcise package
| Python | unlicense | raviqqe/shakyo | import curses
from .character import Character
from .console import Console
from .line import Line
from .attribute import RenditionAttribute, ColorAttribute
from .misc import ESCAPE_CHARS, DELETE_CHARS, BACKSPACE_CHARS, \
is_printable_char, char_with_control_key
__console = None
def turn_on_cons... | import curses
from .character import Character
from .console import Console
from .line import Line
from .attribute import RenditionAttribute, ColorAttribute
from .misc import ESCAPE_CHARS, DELETE_CHARS, BACKSPACE_CHARS, \
is_printable_char, char_with_control_key
def turn_on_console(asciize=False, ... | <commit_before>import curses
from .character import Character
from .console import Console
from .line import Line
from .attribute import RenditionAttribute, ColorAttribute
from .misc import ESCAPE_CHARS, DELETE_CHARS, BACKSPACE_CHARS, \
is_printable_char, char_with_control_key
__console = None
d... | import curses
from .character import Character
from .console import Console
from .line import Line
from .attribute import RenditionAttribute, ColorAttribute
from .misc import ESCAPE_CHARS, DELETE_CHARS, BACKSPACE_CHARS, \
is_printable_char, char_with_control_key
def turn_on_console(asciize=False, ... | import curses
from .character import Character
from .console import Console
from .line import Line
from .attribute import RenditionAttribute, ColorAttribute
from .misc import ESCAPE_CHARS, DELETE_CHARS, BACKSPACE_CHARS, \
is_printable_char, char_with_control_key
__console = None
def turn_on_cons... | <commit_before>import curses
from .character import Character
from .console import Console
from .line import Line
from .attribute import RenditionAttribute, ColorAttribute
from .misc import ESCAPE_CHARS, DELETE_CHARS, BACKSPACE_CHARS, \
is_printable_char, char_with_control_key
__console = None
d... |
9e8fd0f092c35b81abaf83c0099c6c8eccbbea25 | src/dicomweb_client/__init__.py | src/dicomweb_client/__init__.py | __version__ = '0.14.0'
from dicomweb_client.api import DICOMwebClient
| __version__ = '0.20.0rc'
from dicomweb_client.api import DICOMwebClient
| Increase version for release candidate | Increase version for release candidate
| Python | mit | MGHComputationalPathology/dicomweb-client | __version__ = '0.14.0'
from dicomweb_client.api import DICOMwebClient
Increase version for release candidate | __version__ = '0.20.0rc'
from dicomweb_client.api import DICOMwebClient
| <commit_before>__version__ = '0.14.0'
from dicomweb_client.api import DICOMwebClient
<commit_msg>Increase version for release candidate<commit_after> | __version__ = '0.20.0rc'
from dicomweb_client.api import DICOMwebClient
| __version__ = '0.14.0'
from dicomweb_client.api import DICOMwebClient
Increase version for release candidate__version__ = '0.20.0rc'
from dicomweb_client.api import DICOMwebClient
| <commit_before>__version__ = '0.14.0'
from dicomweb_client.api import DICOMwebClient
<commit_msg>Increase version for release candidate<commit_after>__version__ = '0.20.0rc'
from dicomweb_client.api import DICOMwebClient
|
7a93f8c3b65409460322dd90ba9011637c4c1c4a | ycml/transformers/base.py | ycml/transformers/base.py | import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal parameters.
class ... | import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal parameters.
class ... | Fix np array issues again | Fix np array issues again
| Python | apache-2.0 | skylander86/ycml | import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal parameters.
class ... | import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal parameters.
class ... | <commit_before>import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal par... | import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal parameters.
class ... | import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal parameters.
class ... | <commit_before>import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal par... |
ec1cbf654d8c280e3094a5917a696c84f1e1264f | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
VERSION = "2.00"
setup(
name = "SocksipyChain",
version = VERSION,
description = "A Python SOCKS/HTTP Proxy module",
long_description = """\
This Python module allows you to create TCP connections through a chain
of SOCKS or HTTP proxies without a... | #!/usr/bin/env python
from distutils.core import setup
VERSION = "2.00"
setup(
name = "SocksipyChain",
version = VERSION,
description = "A Python SOCKS/HTTP Proxy module",
long_description = """\
This Python module allows you to create TCP connections through a chain
of SOCKS or HTTP proxies without a... | Install as a script as well | Install as a script as well
| Python | bsd-3-clause | locusf/PySocksipyChain,locusf/PySocksipyChain | #!/usr/bin/env python
from distutils.core import setup
VERSION = "2.00"
setup(
name = "SocksipyChain",
version = VERSION,
description = "A Python SOCKS/HTTP Proxy module",
long_description = """\
This Python module allows you to create TCP connections through a chain
of SOCKS or HTTP proxies without a... | #!/usr/bin/env python
from distutils.core import setup
VERSION = "2.00"
setup(
name = "SocksipyChain",
version = VERSION,
description = "A Python SOCKS/HTTP Proxy module",
long_description = """\
This Python module allows you to create TCP connections through a chain
of SOCKS or HTTP proxies without a... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
VERSION = "2.00"
setup(
name = "SocksipyChain",
version = VERSION,
description = "A Python SOCKS/HTTP Proxy module",
long_description = """\
This Python module allows you to create TCP connections through a chain
of SOCKS or HTTP pr... | #!/usr/bin/env python
from distutils.core import setup
VERSION = "2.00"
setup(
name = "SocksipyChain",
version = VERSION,
description = "A Python SOCKS/HTTP Proxy module",
long_description = """\
This Python module allows you to create TCP connections through a chain
of SOCKS or HTTP proxies without a... | #!/usr/bin/env python
from distutils.core import setup
VERSION = "2.00"
setup(
name = "SocksipyChain",
version = VERSION,
description = "A Python SOCKS/HTTP Proxy module",
long_description = """\
This Python module allows you to create TCP connections through a chain
of SOCKS or HTTP proxies without a... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
VERSION = "2.00"
setup(
name = "SocksipyChain",
version = VERSION,
description = "A Python SOCKS/HTTP Proxy module",
long_description = """\
This Python module allows you to create TCP connections through a chain
of SOCKS or HTTP pr... |
33922c93c66d236b238863bffd08a520456846b6 | tests/integration/modules/test_win_dns_client.py | tests/integration/modules/test_win_dns_client.py | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from tests.support.case import ModuleCase
from tests.support.unit import skipIf
from tests.support.helpers import destructiveTest
# Import Salt libs
import salt.utils.platform
@skipIf(not salt.utils.platf... | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from tests.support.case import ModuleCase
from tests.support.unit import skipIf
from tests.support.helpers import destructiveTest
# Import Salt libs
import salt.utils.platform
@skipIf(not salt.utils.platf... | Fix the failing dns test on Windows | Fix the failing dns test on Windows
Gets the name of the first interface on the system. Windows network
interfaces don't have the same name across Window systems. YOu can even
go as far as naming them whatever you want. The test was failing because
the interface name was hard-coded as 'Ethernet'.
| Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from tests.support.case import ModuleCase
from tests.support.unit import skipIf
from tests.support.helpers import destructiveTest
# Import Salt libs
import salt.utils.platform
@skipIf(not salt.utils.platf... | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from tests.support.case import ModuleCase
from tests.support.unit import skipIf
from tests.support.helpers import destructiveTest
# Import Salt libs
import salt.utils.platform
@skipIf(not salt.utils.platf... | <commit_before># -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from tests.support.case import ModuleCase
from tests.support.unit import skipIf
from tests.support.helpers import destructiveTest
# Import Salt libs
import salt.utils.platform
@skipIf(not s... | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from tests.support.case import ModuleCase
from tests.support.unit import skipIf
from tests.support.helpers import destructiveTest
# Import Salt libs
import salt.utils.platform
@skipIf(not salt.utils.platf... | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from tests.support.case import ModuleCase
from tests.support.unit import skipIf
from tests.support.helpers import destructiveTest
# Import Salt libs
import salt.utils.platform
@skipIf(not salt.utils.platf... | <commit_before># -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from tests.support.case import ModuleCase
from tests.support.unit import skipIf
from tests.support.helpers import destructiveTest
# Import Salt libs
import salt.utils.platform
@skipIf(not s... |
3da286b934dcb9da5f06a8e19342f74079e432ef | fabtastic/management/commands/ft_backup_db_to_s3.py | fabtastic/management/commands/ft_backup_db_to_s3.py | import os
from django.core.management.base import BaseCommand
from django.conf import settings
from fabtastic import db
from fabtastic.util.aws import get_s3_connection
class Command(BaseCommand):
help = 'Backs the DB up to S3. Make sure to run s3cmd --configure.'
def handle(self, *args, **options):
... | import os
import datetime
from django.core.management.base import BaseCommand
from django.conf import settings
from fabtastic import db
from fabtastic.util.aws import get_s3_connection
class Command(BaseCommand):
help = 'Backs the DB up to S3. Make sure to run s3cmd --configure.'
def handle(self, *args, **o... | Make backing up to S3 use a year/month/date structure for backups, for S3 clients that 'fake' directory structures. | Make backing up to S3 use a year/month/date structure for backups, for S3 clients that 'fake' directory structures.
| Python | bsd-3-clause | duointeractive/django-fabtastic | import os
from django.core.management.base import BaseCommand
from django.conf import settings
from fabtastic import db
from fabtastic.util.aws import get_s3_connection
class Command(BaseCommand):
help = 'Backs the DB up to S3. Make sure to run s3cmd --configure.'
def handle(self, *args, **options):
... | import os
import datetime
from django.core.management.base import BaseCommand
from django.conf import settings
from fabtastic import db
from fabtastic.util.aws import get_s3_connection
class Command(BaseCommand):
help = 'Backs the DB up to S3. Make sure to run s3cmd --configure.'
def handle(self, *args, **o... | <commit_before>import os
from django.core.management.base import BaseCommand
from django.conf import settings
from fabtastic import db
from fabtastic.util.aws import get_s3_connection
class Command(BaseCommand):
help = 'Backs the DB up to S3. Make sure to run s3cmd --configure.'
def handle(self, *args, **op... | import os
import datetime
from django.core.management.base import BaseCommand
from django.conf import settings
from fabtastic import db
from fabtastic.util.aws import get_s3_connection
class Command(BaseCommand):
help = 'Backs the DB up to S3. Make sure to run s3cmd --configure.'
def handle(self, *args, **o... | import os
from django.core.management.base import BaseCommand
from django.conf import settings
from fabtastic import db
from fabtastic.util.aws import get_s3_connection
class Command(BaseCommand):
help = 'Backs the DB up to S3. Make sure to run s3cmd --configure.'
def handle(self, *args, **options):
... | <commit_before>import os
from django.core.management.base import BaseCommand
from django.conf import settings
from fabtastic import db
from fabtastic.util.aws import get_s3_connection
class Command(BaseCommand):
help = 'Backs the DB up to S3. Make sure to run s3cmd --configure.'
def handle(self, *args, **op... |
d35bd019d99c8ef19012642339ddab1f4a631b8d | fixtureless/tests/test_django_project/test_django_project/test_app/tests/__init__.py | fixtureless/tests/test_django_project/test_django_project/test_app/tests/__init__.py | from test_app.tests.generator import *
from test_app.tests.factory import *
from test_app.tests.utils import *
| from test_app.tests.test_generator import *
from test_app.tests.test_factory import *
from test_app.tests.test_utils import *
| Fix broken imports after file namechange | Fix broken imports after file namechange
| Python | mit | ricomoss/django-fixtureless | from test_app.tests.generator import *
from test_app.tests.factory import *
from test_app.tests.utils import *
Fix broken imports after file namechange | from test_app.tests.test_generator import *
from test_app.tests.test_factory import *
from test_app.tests.test_utils import *
| <commit_before>from test_app.tests.generator import *
from test_app.tests.factory import *
from test_app.tests.utils import *
<commit_msg>Fix broken imports after file namechange<commit_after> | from test_app.tests.test_generator import *
from test_app.tests.test_factory import *
from test_app.tests.test_utils import *
| from test_app.tests.generator import *
from test_app.tests.factory import *
from test_app.tests.utils import *
Fix broken imports after file namechangefrom test_app.tests.test_generator import *
from test_app.tests.test_factory import *
from test_app.tests.test_utils import *
| <commit_before>from test_app.tests.generator import *
from test_app.tests.factory import *
from test_app.tests.utils import *
<commit_msg>Fix broken imports after file namechange<commit_after>from test_app.tests.test_generator import *
from test_app.tests.test_factory import *
from test_app.tests.test_utils import *
|
29339e5098be783746a17306be78467e37c6a54d | centerline/__init__.py | centerline/__init__.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from . import utils
from .main import Centerline
__all__ = ['utils', 'Centerline']
| # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from . import utils
from .main import Centerline
__all__ = ('utils', 'Centerline')
| Convert the list to a tuple | Convert the list to a tuple
| Python | mit | fitodic/centerline,fitodic/polygon-centerline,fitodic/centerline | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from . import utils
from .main import Centerline
__all__ = ['utils', 'Centerline']
Convert the list to a tuple | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from . import utils
from .main import Centerline
__all__ = ('utils', 'Centerline')
| <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from . import utils
from .main import Centerline
__all__ = ['utils', 'Centerline']
<commit_msg>Convert the list to a tuple<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from . import utils
from .main import Centerline
__all__ = ('utils', 'Centerline')
| # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from . import utils
from .main import Centerline
__all__ = ['utils', 'Centerline']
Convert the list to a tuple# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from . import utils
from .main import Centerline
__all__ = ('utils', 'Center... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from . import utils
from .main import Centerline
__all__ = ['utils', 'Centerline']
<commit_msg>Convert the list to a tuple<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from . import utils
from .main impor... |
2b0453595ab10a41a5068fc78e1c84f500973dc3 | mooch/app.py | mooch/app.py | import sqlite3
from flask import Flask, jsonify
app = Flask(__name__)
def get_db():
return sqlite3.connect(":memory:")
@app.route("/status")
def status():
return jsonify({"okay": True,
"GitHub": {"lastCommitTime": "2013-03-12T08:14:29-07:00"}})
@app.route("/hooks/github", methods=["POST"... | import sqlite3
from flask import Flask, jsonify, request
app = Flask(__name__)
def init_db(db):
db.execute("""
CREATE TABLE if not exists events (
id INTEGER PRIMARY KEY,
eventType TEXT,
eventTime datetime,
data BLOB,
insertTime datetime default... | Store last github commit in `events` table | Store last github commit in `events` table
| Python | mit | asivokon/mooch-sentinel,asivokon/mooch-sentinel,asivokon/mooch-sentinel,asivokon/mooch-sentinel | import sqlite3
from flask import Flask, jsonify
app = Flask(__name__)
def get_db():
return sqlite3.connect(":memory:")
@app.route("/status")
def status():
return jsonify({"okay": True,
"GitHub": {"lastCommitTime": "2013-03-12T08:14:29-07:00"}})
@app.route("/hooks/github", methods=["POST"... | import sqlite3
from flask import Flask, jsonify, request
app = Flask(__name__)
def init_db(db):
db.execute("""
CREATE TABLE if not exists events (
id INTEGER PRIMARY KEY,
eventType TEXT,
eventTime datetime,
data BLOB,
insertTime datetime default... | <commit_before>import sqlite3
from flask import Flask, jsonify
app = Flask(__name__)
def get_db():
return sqlite3.connect(":memory:")
@app.route("/status")
def status():
return jsonify({"okay": True,
"GitHub": {"lastCommitTime": "2013-03-12T08:14:29-07:00"}})
@app.route("/hooks/github", ... | import sqlite3
from flask import Flask, jsonify, request
app = Flask(__name__)
def init_db(db):
db.execute("""
CREATE TABLE if not exists events (
id INTEGER PRIMARY KEY,
eventType TEXT,
eventTime datetime,
data BLOB,
insertTime datetime default... | import sqlite3
from flask import Flask, jsonify
app = Flask(__name__)
def get_db():
return sqlite3.connect(":memory:")
@app.route("/status")
def status():
return jsonify({"okay": True,
"GitHub": {"lastCommitTime": "2013-03-12T08:14:29-07:00"}})
@app.route("/hooks/github", methods=["POST"... | <commit_before>import sqlite3
from flask import Flask, jsonify
app = Flask(__name__)
def get_db():
return sqlite3.connect(":memory:")
@app.route("/status")
def status():
return jsonify({"okay": True,
"GitHub": {"lastCommitTime": "2013-03-12T08:14:29-07:00"}})
@app.route("/hooks/github", ... |
63c1382f80250ca5df4c438e31a71ddae519a44a | clowder_server/admin.py | clowder_server/admin.py | from django.contrib import admin
from clowder_account.models import ClowderUser, ClowderUserAdmin
from clowder_server.models import Alert, Ping
admin.site.register(Alert)
admin.site.register(ClowderUser, ClowderUserAdmin)
admin.site.register(Ping)
| from django.contrib import admin
from clowder_account.models import ClowderUser, ClowderUserAdmin
from clowder_server.models import Alert, Ping
admin.site.register(Alert)
admin.site.register(ClowderUser, ClowderUserAdmin)
@admin.register(Ping)
class PingAdmin(admin.ModelAdmin):
list_filter = ('user',)
| Add list filter for searching | ADMIN: Add list filter for searching
| Python | agpl-3.0 | keithhackbarth/clowder_server,keithhackbarth/clowder_server,framewr/clowder_server,framewr/clowder_server,framewr/clowder_server,keithhackbarth/clowder_server,framewr/clowder_server,keithhackbarth/clowder_server | from django.contrib import admin
from clowder_account.models import ClowderUser, ClowderUserAdmin
from clowder_server.models import Alert, Ping
admin.site.register(Alert)
admin.site.register(ClowderUser, ClowderUserAdmin)
admin.site.register(Ping)
ADMIN: Add list filter for searching | from django.contrib import admin
from clowder_account.models import ClowderUser, ClowderUserAdmin
from clowder_server.models import Alert, Ping
admin.site.register(Alert)
admin.site.register(ClowderUser, ClowderUserAdmin)
@admin.register(Ping)
class PingAdmin(admin.ModelAdmin):
list_filter = ('user',)
| <commit_before>from django.contrib import admin
from clowder_account.models import ClowderUser, ClowderUserAdmin
from clowder_server.models import Alert, Ping
admin.site.register(Alert)
admin.site.register(ClowderUser, ClowderUserAdmin)
admin.site.register(Ping)
<commit_msg>ADMIN: Add list filter for searching<commit_... | from django.contrib import admin
from clowder_account.models import ClowderUser, ClowderUserAdmin
from clowder_server.models import Alert, Ping
admin.site.register(Alert)
admin.site.register(ClowderUser, ClowderUserAdmin)
@admin.register(Ping)
class PingAdmin(admin.ModelAdmin):
list_filter = ('user',)
| from django.contrib import admin
from clowder_account.models import ClowderUser, ClowderUserAdmin
from clowder_server.models import Alert, Ping
admin.site.register(Alert)
admin.site.register(ClowderUser, ClowderUserAdmin)
admin.site.register(Ping)
ADMIN: Add list filter for searchingfrom django.contrib import admin
fr... | <commit_before>from django.contrib import admin
from clowder_account.models import ClowderUser, ClowderUserAdmin
from clowder_server.models import Alert, Ping
admin.site.register(Alert)
admin.site.register(ClowderUser, ClowderUserAdmin)
admin.site.register(Ping)
<commit_msg>ADMIN: Add list filter for searching<commit_... |
effb5d796e55dbf28de2ec8d6711fcf2724bc62f | src/core/migrations/0059_auto_20211013_1657.py | src/core/migrations/0059_auto_20211013_1657.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-10-13 15:57
from __future__ import unicode_literals
from django.db import migrations
def set_about_plugin_to_hpe(apps, schema_editor):
Plugin = apps.get_model('utils', 'Plugin')
Plugin.objects.filter(
name='About',
).update(
h... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-10-13 15:57
from __future__ import unicode_literals
from django.db import migrations
def set_about_plugin_to_hpe(apps, schema_editor):
Plugin = apps.get_model('utils', 'Plugin')
Plugin.objects.filter(
name='About',
).update(
h... | Fix missing dependency on core.0059 migration | Fix missing dependency on core.0059 migration
| Python | agpl-3.0 | BirkbeckCTP/janeway,BirkbeckCTP/janeway,BirkbeckCTP/janeway,BirkbeckCTP/janeway | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-10-13 15:57
from __future__ import unicode_literals
from django.db import migrations
def set_about_plugin_to_hpe(apps, schema_editor):
Plugin = apps.get_model('utils', 'Plugin')
Plugin.objects.filter(
name='About',
).update(
h... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-10-13 15:57
from __future__ import unicode_literals
from django.db import migrations
def set_about_plugin_to_hpe(apps, schema_editor):
Plugin = apps.get_model('utils', 'Plugin')
Plugin.objects.filter(
name='About',
).update(
h... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-10-13 15:57
from __future__ import unicode_literals
from django.db import migrations
def set_about_plugin_to_hpe(apps, schema_editor):
Plugin = apps.get_model('utils', 'Plugin')
Plugin.objects.filter(
name='About',
).up... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-10-13 15:57
from __future__ import unicode_literals
from django.db import migrations
def set_about_plugin_to_hpe(apps, schema_editor):
Plugin = apps.get_model('utils', 'Plugin')
Plugin.objects.filter(
name='About',
).update(
h... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-10-13 15:57
from __future__ import unicode_literals
from django.db import migrations
def set_about_plugin_to_hpe(apps, schema_editor):
Plugin = apps.get_model('utils', 'Plugin')
Plugin.objects.filter(
name='About',
).update(
h... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2021-10-13 15:57
from __future__ import unicode_literals
from django.db import migrations
def set_about_plugin_to_hpe(apps, schema_editor):
Plugin = apps.get_model('utils', 'Plugin')
Plugin.objects.filter(
name='About',
).up... |
c72764fde63e14f378a9e31dd89ea4180655d379 | nightreads/emails/management/commands/send_email.py | nightreads/emails/management/commands/send_email.py | from django.core.management.base import BaseCommand
from nightreads.emails.models import Email
from nightreads.emails.email_service import send_email_obj
from nightreads.emails.views import get_subscriber_emails
class Command(BaseCommand):
help = 'Send the email to susbcribers'
def handle(self, *args, **opti... | from django.core.management.base import BaseCommand
from nightreads.emails.models import Email
from nightreads.emails.email_service import send_email_obj
from nightreads.emails.views import get_subscriber_emails
class Command(BaseCommand):
help = 'Send the email to susbcribers'
def handle(self, *args, **opti... | Add a note if no emails are available to send | Add a note if no emails are available to send
| Python | mit | avinassh/nightreads,avinassh/nightreads | from django.core.management.base import BaseCommand
from nightreads.emails.models import Email
from nightreads.emails.email_service import send_email_obj
from nightreads.emails.views import get_subscriber_emails
class Command(BaseCommand):
help = 'Send the email to susbcribers'
def handle(self, *args, **opti... | from django.core.management.base import BaseCommand
from nightreads.emails.models import Email
from nightreads.emails.email_service import send_email_obj
from nightreads.emails.views import get_subscriber_emails
class Command(BaseCommand):
help = 'Send the email to susbcribers'
def handle(self, *args, **opti... | <commit_before>from django.core.management.base import BaseCommand
from nightreads.emails.models import Email
from nightreads.emails.email_service import send_email_obj
from nightreads.emails.views import get_subscriber_emails
class Command(BaseCommand):
help = 'Send the email to susbcribers'
def handle(self... | from django.core.management.base import BaseCommand
from nightreads.emails.models import Email
from nightreads.emails.email_service import send_email_obj
from nightreads.emails.views import get_subscriber_emails
class Command(BaseCommand):
help = 'Send the email to susbcribers'
def handle(self, *args, **opti... | from django.core.management.base import BaseCommand
from nightreads.emails.models import Email
from nightreads.emails.email_service import send_email_obj
from nightreads.emails.views import get_subscriber_emails
class Command(BaseCommand):
help = 'Send the email to susbcribers'
def handle(self, *args, **opti... | <commit_before>from django.core.management.base import BaseCommand
from nightreads.emails.models import Email
from nightreads.emails.email_service import send_email_obj
from nightreads.emails.views import get_subscriber_emails
class Command(BaseCommand):
help = 'Send the email to susbcribers'
def handle(self... |
014e4fe380cddcdcc5ca12a32ab6af35e87ee56e | common/postgresqlfix.py | common/postgresqlfix.py | # This file is part of e-Giełda.
# Copyright (C) 2014 Mateusz Maćkowski and Tomasz Zieliński
#
# e-Giełda is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your ... | # This file is part of e-Giełda.
# Copyright (C) 2014 Mateusz Maćkowski and Tomasz Zieliński
#
# e-Giełda is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your ... | Fix buggy patched QuerySet methods | Fix buggy patched QuerySet methods
| Python | agpl-3.0 | m4tx/egielda,m4tx/egielda,m4tx/egielda | # This file is part of e-Giełda.
# Copyright (C) 2014 Mateusz Maćkowski and Tomasz Zieliński
#
# e-Giełda is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your ... | # This file is part of e-Giełda.
# Copyright (C) 2014 Mateusz Maćkowski and Tomasz Zieliński
#
# e-Giełda is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your ... | <commit_before># This file is part of e-Giełda.
# Copyright (C) 2014 Mateusz Maćkowski and Tomasz Zieliński
#
# e-Giełda is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# Licens... | # This file is part of e-Giełda.
# Copyright (C) 2014 Mateusz Maćkowski and Tomasz Zieliński
#
# e-Giełda is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your ... | # This file is part of e-Giełda.
# Copyright (C) 2014 Mateusz Maćkowski and Tomasz Zieliński
#
# e-Giełda is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your ... | <commit_before># This file is part of e-Giełda.
# Copyright (C) 2014 Mateusz Maćkowski and Tomasz Zieliński
#
# e-Giełda is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# Licens... |
ce6e69c26b6d820b4f835cd56e72244faf0a6636 | api/caching/listeners.py | api/caching/listeners.py | from api.caching.tasks import ban_url, logger
from framework.guid.model import Guid
from framework.tasks.handlers import enqueue_task
from modularodm import signals
@signals.save.connect
def log_object_saved(sender, instance, fields_changed, cached_data):
abs_url = None
if hasattr(instance, 'absolute_api_v2_ur... | from api.caching.tasks import ban_url, logger
from framework.guid.model import Guid
from framework.tasks.handlers import enqueue_task
from modularodm import signals
@signals.save.connect
def log_object_saved(sender, instance, fields_changed, cached_data):
abs_url = None
if hasattr(instance, 'absolute_api_v2_ur... | Remove logging. It will just break travis. | Remove logging. It will just break travis.
| Python | apache-2.0 | RomanZWang/osf.io,billyhunt/osf.io,billyhunt/osf.io,DanielSBrown/osf.io,monikagrabowska/osf.io,pattisdr/osf.io,pattisdr/osf.io,brandonPurvis/osf.io,amyshi188/osf.io,icereval/osf.io,KAsante95/osf.io,cslzchen/osf.io,cwisecarver/osf.io,saradbowman/osf.io,RomanZWang/osf.io,mluo613/osf.io,caneruguz/osf.io,GageGaskins/osf.io... | from api.caching.tasks import ban_url, logger
from framework.guid.model import Guid
from framework.tasks.handlers import enqueue_task
from modularodm import signals
@signals.save.connect
def log_object_saved(sender, instance, fields_changed, cached_data):
abs_url = None
if hasattr(instance, 'absolute_api_v2_ur... | from api.caching.tasks import ban_url, logger
from framework.guid.model import Guid
from framework.tasks.handlers import enqueue_task
from modularodm import signals
@signals.save.connect
def log_object_saved(sender, instance, fields_changed, cached_data):
abs_url = None
if hasattr(instance, 'absolute_api_v2_ur... | <commit_before>from api.caching.tasks import ban_url, logger
from framework.guid.model import Guid
from framework.tasks.handlers import enqueue_task
from modularodm import signals
@signals.save.connect
def log_object_saved(sender, instance, fields_changed, cached_data):
abs_url = None
if hasattr(instance, 'abs... | from api.caching.tasks import ban_url, logger
from framework.guid.model import Guid
from framework.tasks.handlers import enqueue_task
from modularodm import signals
@signals.save.connect
def log_object_saved(sender, instance, fields_changed, cached_data):
abs_url = None
if hasattr(instance, 'absolute_api_v2_ur... | from api.caching.tasks import ban_url, logger
from framework.guid.model import Guid
from framework.tasks.handlers import enqueue_task
from modularodm import signals
@signals.save.connect
def log_object_saved(sender, instance, fields_changed, cached_data):
abs_url = None
if hasattr(instance, 'absolute_api_v2_ur... | <commit_before>from api.caching.tasks import ban_url, logger
from framework.guid.model import Guid
from framework.tasks.handlers import enqueue_task
from modularodm import signals
@signals.save.connect
def log_object_saved(sender, instance, fields_changed, cached_data):
abs_url = None
if hasattr(instance, 'abs... |
3429a1b543208adf95e60c89477a4219a5a366a3 | makesty.py | makesty.py | import re
# Input file created from http://astronautweb.co/snippet/font-awesome/
INPUT_FILE = 'htmlfontawesome.txt'
OUTPUT_FILE = 'fontawesome.sty'
with open(INPUT_FILE) as r, open(OUTPUT_FILE, 'w') as w:
for line in r:
# Expects to find 'fa-NAME' ending with "
name = re.findall(r'fa-[^""]*', line)[0]
#... | import re
# Input file created from http://astronautweb.co/snippet/font-awesome/
INPUT_FILE = 'htmlfontawesome.txt'
OUTPUT_FILE = 'fontawesome.sty'
OUTPUT_HEADER = r'''
% Identify this package.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{fontawesome}[2014/04/24 v4.0.3 font awesome icons]
% Requirements to use.
\usepac... | Add header and footer sections to the .sty. | Add header and footer sections to the .sty.
| Python | mit | posquit0/latex-fontawesome | import re
# Input file created from http://astronautweb.co/snippet/font-awesome/
INPUT_FILE = 'htmlfontawesome.txt'
OUTPUT_FILE = 'fontawesome.sty'
with open(INPUT_FILE) as r, open(OUTPUT_FILE, 'w') as w:
for line in r:
# Expects to find 'fa-NAME' ending with "
name = re.findall(r'fa-[^""]*', line)[0]
#... | import re
# Input file created from http://astronautweb.co/snippet/font-awesome/
INPUT_FILE = 'htmlfontawesome.txt'
OUTPUT_FILE = 'fontawesome.sty'
OUTPUT_HEADER = r'''
% Identify this package.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{fontawesome}[2014/04/24 v4.0.3 font awesome icons]
% Requirements to use.
\usepac... | <commit_before>import re
# Input file created from http://astronautweb.co/snippet/font-awesome/
INPUT_FILE = 'htmlfontawesome.txt'
OUTPUT_FILE = 'fontawesome.sty'
with open(INPUT_FILE) as r, open(OUTPUT_FILE, 'w') as w:
for line in r:
# Expects to find 'fa-NAME' ending with "
name = re.findall(r'fa-[^""]*',... | import re
# Input file created from http://astronautweb.co/snippet/font-awesome/
INPUT_FILE = 'htmlfontawesome.txt'
OUTPUT_FILE = 'fontawesome.sty'
OUTPUT_HEADER = r'''
% Identify this package.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{fontawesome}[2014/04/24 v4.0.3 font awesome icons]
% Requirements to use.
\usepac... | import re
# Input file created from http://astronautweb.co/snippet/font-awesome/
INPUT_FILE = 'htmlfontawesome.txt'
OUTPUT_FILE = 'fontawesome.sty'
with open(INPUT_FILE) as r, open(OUTPUT_FILE, 'w') as w:
for line in r:
# Expects to find 'fa-NAME' ending with "
name = re.findall(r'fa-[^""]*', line)[0]
#... | <commit_before>import re
# Input file created from http://astronautweb.co/snippet/font-awesome/
INPUT_FILE = 'htmlfontawesome.txt'
OUTPUT_FILE = 'fontawesome.sty'
with open(INPUT_FILE) as r, open(OUTPUT_FILE, 'w') as w:
for line in r:
# Expects to find 'fa-NAME' ending with "
name = re.findall(r'fa-[^""]*',... |
f87f2ec4707bcf851e00ff58bbfe43f4d7523606 | scripts/dnz-fetch.py | scripts/dnz-fetch.py | import os
import math
import json
from pprint import pprint
from pydnz import Dnz
dnz = Dnz(os.environ.get('DNZ_KEY'))
results = []
def dnz_request(page=1):
filters = {
'category': ['Images'],
'year': ['2005+TO+2006']
}
fields = ['id', 'date']
return dnz.search('', _and=filters, per... | import os
# import math
import json
from pprint import pprint
from datetime import date
from pydnz import Dnz
dnz_api = Dnz(os.environ.get('DNZ_KEY'))
YEAR_INTERVAL = 10
def request_dnz_records(timespan, page):
parameters = {
'_and': {
'category': ['Images'],
'year': [timespan]
... | Refactor DNZ fetch script before overhaul | Refactor DNZ fetch script before overhaul
| Python | mit | judsonsam/tekautoday,judsonsam/tekautoday,judsonsam/tekautoday,judsonsam/tekautoday | import os
import math
import json
from pprint import pprint
from pydnz import Dnz
dnz = Dnz(os.environ.get('DNZ_KEY'))
results = []
def dnz_request(page=1):
filters = {
'category': ['Images'],
'year': ['2005+TO+2006']
}
fields = ['id', 'date']
return dnz.search('', _and=filters, per... | import os
# import math
import json
from pprint import pprint
from datetime import date
from pydnz import Dnz
dnz_api = Dnz(os.environ.get('DNZ_KEY'))
YEAR_INTERVAL = 10
def request_dnz_records(timespan, page):
parameters = {
'_and': {
'category': ['Images'],
'year': [timespan]
... | <commit_before>import os
import math
import json
from pprint import pprint
from pydnz import Dnz
dnz = Dnz(os.environ.get('DNZ_KEY'))
results = []
def dnz_request(page=1):
filters = {
'category': ['Images'],
'year': ['2005+TO+2006']
}
fields = ['id', 'date']
return dnz.search('', _a... | import os
# import math
import json
from pprint import pprint
from datetime import date
from pydnz import Dnz
dnz_api = Dnz(os.environ.get('DNZ_KEY'))
YEAR_INTERVAL = 10
def request_dnz_records(timespan, page):
parameters = {
'_and': {
'category': ['Images'],
'year': [timespan]
... | import os
import math
import json
from pprint import pprint
from pydnz import Dnz
dnz = Dnz(os.environ.get('DNZ_KEY'))
results = []
def dnz_request(page=1):
filters = {
'category': ['Images'],
'year': ['2005+TO+2006']
}
fields = ['id', 'date']
return dnz.search('', _and=filters, per... | <commit_before>import os
import math
import json
from pprint import pprint
from pydnz import Dnz
dnz = Dnz(os.environ.get('DNZ_KEY'))
results = []
def dnz_request(page=1):
filters = {
'category': ['Images'],
'year': ['2005+TO+2006']
}
fields = ['id', 'date']
return dnz.search('', _a... |
be5541bd16a84c37b973cf77cb0f4d5c5e83e39a | spacy/tests/regression/test_issue768.py | spacy/tests/regression/test_issue768.py | # coding: utf-8
from __future__ import unicode_literals
from ...language import Language
from ...attrs import LANG
from ...fr.language_data import get_tokenizer_exceptions, STOP_WORDS
from ...language_data.punctuation import TOKENIZER_INFIXES, ALPHA
import pytest
@pytest.fixture
def fr_tokenizer_w_infix():
SPLI... | # coding: utf-8
from __future__ import unicode_literals
from ...language import Language
from ...attrs import LANG
from ...fr.stop_words import STOP_WORDS
from ...fr.tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from ...language_data.punctuation import TOKENIZER_INFIXES, ALPHA
from ...util import update_exc
import... | Fix import and tokenizer exceptions | Fix import and tokenizer exceptions
| Python | mit | explosion/spaCy,honnibal/spaCy,recognai/spaCy,explosion/spaCy,explosion/spaCy,aikramer2/spaCy,aikramer2/spaCy,recognai/spaCy,explosion/spaCy,spacy-io/spaCy,aikramer2/spaCy,aikramer2/spaCy,recognai/spaCy,recognai/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spaCy,spacy-io/spaCy,aikramer2/spaCy,spacy-io/spaCy,explosion/s... | # coding: utf-8
from __future__ import unicode_literals
from ...language import Language
from ...attrs import LANG
from ...fr.language_data import get_tokenizer_exceptions, STOP_WORDS
from ...language_data.punctuation import TOKENIZER_INFIXES, ALPHA
import pytest
@pytest.fixture
def fr_tokenizer_w_infix():
SPLI... | # coding: utf-8
from __future__ import unicode_literals
from ...language import Language
from ...attrs import LANG
from ...fr.stop_words import STOP_WORDS
from ...fr.tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from ...language_data.punctuation import TOKENIZER_INFIXES, ALPHA
from ...util import update_exc
import... | <commit_before># coding: utf-8
from __future__ import unicode_literals
from ...language import Language
from ...attrs import LANG
from ...fr.language_data import get_tokenizer_exceptions, STOP_WORDS
from ...language_data.punctuation import TOKENIZER_INFIXES, ALPHA
import pytest
@pytest.fixture
def fr_tokenizer_w_in... | # coding: utf-8
from __future__ import unicode_literals
from ...language import Language
from ...attrs import LANG
from ...fr.stop_words import STOP_WORDS
from ...fr.tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from ...language_data.punctuation import TOKENIZER_INFIXES, ALPHA
from ...util import update_exc
import... | # coding: utf-8
from __future__ import unicode_literals
from ...language import Language
from ...attrs import LANG
from ...fr.language_data import get_tokenizer_exceptions, STOP_WORDS
from ...language_data.punctuation import TOKENIZER_INFIXES, ALPHA
import pytest
@pytest.fixture
def fr_tokenizer_w_infix():
SPLI... | <commit_before># coding: utf-8
from __future__ import unicode_literals
from ...language import Language
from ...attrs import LANG
from ...fr.language_data import get_tokenizer_exceptions, STOP_WORDS
from ...language_data.punctuation import TOKENIZER_INFIXES, ALPHA
import pytest
@pytest.fixture
def fr_tokenizer_w_in... |
99ef8377b5bf540542efe718a4eb4345a4b4d5a4 | drf_writable_nested/__init__.py | drf_writable_nested/__init__.py | __title__ = 'DRF writable nested'
__version__ = '0.4.3'
__author__ = 'beda.software'
__license__ = 'BSD 2-Clause'
__copyright__ = 'Copyright 2014-2018 beda.software'
# Version synonym
VERSION = __version__
from .mixins import NestedUpdateMixin, NestedCreateMixin
from .serializers import WritableNestedModelSerializer... | __title__ = 'DRF writable nested'
__version__ = '0.4.3'
__author__ = 'beda.software'
__license__ = 'BSD 2-Clause'
__copyright__ = 'Copyright 2014-2018 beda.software'
# Version synonym
VERSION = __version__
from .mixins import NestedUpdateMixin, NestedCreateMixin, UniqueFieldsMixin
from .serializers import WritableNe... | Add UniqueMixin import to init | Add UniqueMixin import to init
| Python | bsd-2-clause | Brogency/drf-writable-nested | __title__ = 'DRF writable nested'
__version__ = '0.4.3'
__author__ = 'beda.software'
__license__ = 'BSD 2-Clause'
__copyright__ = 'Copyright 2014-2018 beda.software'
# Version synonym
VERSION = __version__
from .mixins import NestedUpdateMixin, NestedCreateMixin
from .serializers import WritableNestedModelSerializer... | __title__ = 'DRF writable nested'
__version__ = '0.4.3'
__author__ = 'beda.software'
__license__ = 'BSD 2-Clause'
__copyright__ = 'Copyright 2014-2018 beda.software'
# Version synonym
VERSION = __version__
from .mixins import NestedUpdateMixin, NestedCreateMixin, UniqueFieldsMixin
from .serializers import WritableNe... | <commit_before>__title__ = 'DRF writable nested'
__version__ = '0.4.3'
__author__ = 'beda.software'
__license__ = 'BSD 2-Clause'
__copyright__ = 'Copyright 2014-2018 beda.software'
# Version synonym
VERSION = __version__
from .mixins import NestedUpdateMixin, NestedCreateMixin
from .serializers import WritableNested... | __title__ = 'DRF writable nested'
__version__ = '0.4.3'
__author__ = 'beda.software'
__license__ = 'BSD 2-Clause'
__copyright__ = 'Copyright 2014-2018 beda.software'
# Version synonym
VERSION = __version__
from .mixins import NestedUpdateMixin, NestedCreateMixin, UniqueFieldsMixin
from .serializers import WritableNe... | __title__ = 'DRF writable nested'
__version__ = '0.4.3'
__author__ = 'beda.software'
__license__ = 'BSD 2-Clause'
__copyright__ = 'Copyright 2014-2018 beda.software'
# Version synonym
VERSION = __version__
from .mixins import NestedUpdateMixin, NestedCreateMixin
from .serializers import WritableNestedModelSerializer... | <commit_before>__title__ = 'DRF writable nested'
__version__ = '0.4.3'
__author__ = 'beda.software'
__license__ = 'BSD 2-Clause'
__copyright__ = 'Copyright 2014-2018 beda.software'
# Version synonym
VERSION = __version__
from .mixins import NestedUpdateMixin, NestedCreateMixin
from .serializers import WritableNested... |
dedf620bba97541505790b6b3f66468113e9488f | server/tests/base.py | server/tests/base.py | import tempfile
import unittest
import os
from server import app
from server.models import db
class BaseTestCase(unittest.TestCase):
def setUp(self):
self.db_fd, self.test_db_path = tempfile.mkstemp('.db')
test_db_uri = 'sqlite:///{}'.format(self.test_db_path)
app.config['SQLALCHEMY_DATAB... | import tempfile
import unittest
import os
from server import app
from server.models import db
class BaseTestCase(unittest.TestCase):
def setUp(self):
self.db_fd, self.test_db_path = tempfile.mkstemp('.db')
# test_db_uri = 'sqlite:///{}'.format(self.test_db_path)
# app.config['SQLALCHEMY_D... | Add a hack for fixing failing tests | Add a hack for fixing failing tests
Though it might actually be a proper fix. Need to talk to Nikita.
| Python | mit | MACSIFS/IFS,MACSIFS/IFS,MACSIFS/IFS,MACSIFS/IFS | import tempfile
import unittest
import os
from server import app
from server.models import db
class BaseTestCase(unittest.TestCase):
def setUp(self):
self.db_fd, self.test_db_path = tempfile.mkstemp('.db')
test_db_uri = 'sqlite:///{}'.format(self.test_db_path)
app.config['SQLALCHEMY_DATAB... | import tempfile
import unittest
import os
from server import app
from server.models import db
class BaseTestCase(unittest.TestCase):
def setUp(self):
self.db_fd, self.test_db_path = tempfile.mkstemp('.db')
# test_db_uri = 'sqlite:///{}'.format(self.test_db_path)
# app.config['SQLALCHEMY_D... | <commit_before>import tempfile
import unittest
import os
from server import app
from server.models import db
class BaseTestCase(unittest.TestCase):
def setUp(self):
self.db_fd, self.test_db_path = tempfile.mkstemp('.db')
test_db_uri = 'sqlite:///{}'.format(self.test_db_path)
app.config['S... | import tempfile
import unittest
import os
from server import app
from server.models import db
class BaseTestCase(unittest.TestCase):
def setUp(self):
self.db_fd, self.test_db_path = tempfile.mkstemp('.db')
# test_db_uri = 'sqlite:///{}'.format(self.test_db_path)
# app.config['SQLALCHEMY_D... | import tempfile
import unittest
import os
from server import app
from server.models import db
class BaseTestCase(unittest.TestCase):
def setUp(self):
self.db_fd, self.test_db_path = tempfile.mkstemp('.db')
test_db_uri = 'sqlite:///{}'.format(self.test_db_path)
app.config['SQLALCHEMY_DATAB... | <commit_before>import tempfile
import unittest
import os
from server import app
from server.models import db
class BaseTestCase(unittest.TestCase):
def setUp(self):
self.db_fd, self.test_db_path = tempfile.mkstemp('.db')
test_db_uri = 'sqlite:///{}'.format(self.test_db_path)
app.config['S... |
a80b95f64a17c4bc5c506313fe94e66b4ad2e836 | cyclonejet/__init__.py | cyclonejet/__init__.py | # -*- encoding:utf-8 -*-
from flask import Flask
from cyclonejet.views.frontend import frontend
from flaskext.sqlalchemy import SQLAlchemy
import settings
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = settings.DB_URI
app.register_module(frontend)
db = SQLAlchemy(app)
| # -*- encoding:utf-8 -*-
from flask import Flask, render_template
from cyclonejet.views.frontend import frontend
from cyclonejet.views.errors import errors
from flaskext.sqlalchemy import SQLAlchemy
import settings
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = settings.DB_URI
#Blueprint registration... | Switch to Blueprints, custom 404 handler. | Switch to Blueprints, custom 404 handler.
| Python | agpl-3.0 | tsoporan/cyclonejet | # -*- encoding:utf-8 -*-
from flask import Flask
from cyclonejet.views.frontend import frontend
from flaskext.sqlalchemy import SQLAlchemy
import settings
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = settings.DB_URI
app.register_module(frontend)
db = SQLAlchemy(app)
Switch to Blueprints, custom 404 ... | # -*- encoding:utf-8 -*-
from flask import Flask, render_template
from cyclonejet.views.frontend import frontend
from cyclonejet.views.errors import errors
from flaskext.sqlalchemy import SQLAlchemy
import settings
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = settings.DB_URI
#Blueprint registration... | <commit_before># -*- encoding:utf-8 -*-
from flask import Flask
from cyclonejet.views.frontend import frontend
from flaskext.sqlalchemy import SQLAlchemy
import settings
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = settings.DB_URI
app.register_module(frontend)
db = SQLAlchemy(app)
<commit_msg>Switch... | # -*- encoding:utf-8 -*-
from flask import Flask, render_template
from cyclonejet.views.frontend import frontend
from cyclonejet.views.errors import errors
from flaskext.sqlalchemy import SQLAlchemy
import settings
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = settings.DB_URI
#Blueprint registration... | # -*- encoding:utf-8 -*-
from flask import Flask
from cyclonejet.views.frontend import frontend
from flaskext.sqlalchemy import SQLAlchemy
import settings
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = settings.DB_URI
app.register_module(frontend)
db = SQLAlchemy(app)
Switch to Blueprints, custom 404 ... | <commit_before># -*- encoding:utf-8 -*-
from flask import Flask
from cyclonejet.views.frontend import frontend
from flaskext.sqlalchemy import SQLAlchemy
import settings
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = settings.DB_URI
app.register_module(frontend)
db = SQLAlchemy(app)
<commit_msg>Switch... |
0fa9458e876f8361ac79f66b4cb0a845e3eb740d | src/fastpbkdf2/__init__.py | src/fastpbkdf2/__init__.py | from __future__ import absolute_import, division, print_function
from fastpbkdf2._fastpbkdf2 import ffi, lib
def pbkdf2_hmac(name, password, salt, rounds, dklen=None):
if name not in ["sha1", "sha256", "sha512"]:
raise ValueError(
"Algorithm {} not supported. "
"Please use sha1, s... | from __future__ import absolute_import, division, print_function
from fastpbkdf2._fastpbkdf2 import ffi, lib
def pbkdf2_hmac(name, password, salt, rounds, dklen=None):
if name not in ["sha1", "sha256", "sha512"]:
raise ValueError("unsupported hash type")
algorithm = {
"sha1": (lib.fastpbkdf2... | Change exception message to be same as stdlib. | Change exception message to be same as stdlib.
| Python | apache-2.0 | Ayrx/python-fastpbkdf2,Ayrx/python-fastpbkdf2 | from __future__ import absolute_import, division, print_function
from fastpbkdf2._fastpbkdf2 import ffi, lib
def pbkdf2_hmac(name, password, salt, rounds, dklen=None):
if name not in ["sha1", "sha256", "sha512"]:
raise ValueError(
"Algorithm {} not supported. "
"Please use sha1, s... | from __future__ import absolute_import, division, print_function
from fastpbkdf2._fastpbkdf2 import ffi, lib
def pbkdf2_hmac(name, password, salt, rounds, dklen=None):
if name not in ["sha1", "sha256", "sha512"]:
raise ValueError("unsupported hash type")
algorithm = {
"sha1": (lib.fastpbkdf2... | <commit_before>from __future__ import absolute_import, division, print_function
from fastpbkdf2._fastpbkdf2 import ffi, lib
def pbkdf2_hmac(name, password, salt, rounds, dklen=None):
if name not in ["sha1", "sha256", "sha512"]:
raise ValueError(
"Algorithm {} not supported. "
"Ple... | from __future__ import absolute_import, division, print_function
from fastpbkdf2._fastpbkdf2 import ffi, lib
def pbkdf2_hmac(name, password, salt, rounds, dklen=None):
if name not in ["sha1", "sha256", "sha512"]:
raise ValueError("unsupported hash type")
algorithm = {
"sha1": (lib.fastpbkdf2... | from __future__ import absolute_import, division, print_function
from fastpbkdf2._fastpbkdf2 import ffi, lib
def pbkdf2_hmac(name, password, salt, rounds, dklen=None):
if name not in ["sha1", "sha256", "sha512"]:
raise ValueError(
"Algorithm {} not supported. "
"Please use sha1, s... | <commit_before>from __future__ import absolute_import, division, print_function
from fastpbkdf2._fastpbkdf2 import ffi, lib
def pbkdf2_hmac(name, password, salt, rounds, dklen=None):
if name not in ["sha1", "sha256", "sha512"]:
raise ValueError(
"Algorithm {} not supported. "
"Ple... |
32b51cb7d63d9d122c0d678a46d56a735a9bea3e | dodo_commands/framework/decorator_scope.py | dodo_commands/framework/decorator_scope.py | from dodo_commands.framework.singleton import Dodo
# Resp: add the current command_name
# to the list of commands decorated by decorator_name.
class DecoratorScope:
def __init__(self, decorator_name):
self.decorators = Dodo.get_config('/ROOT').setdefault(
'decorators', {}).setdefault(decorator... | from dodo_commands.framework.singleton import Dodo
# Resp: add the current command_name
# to the list of commands decorated by decorator_name.
class DecoratorScope:
def __init__(self, decorator_name, remove=False):
self.decorators = Dodo.get_config('/ROOT').setdefault(
'decorators', {}).setdef... | Add ``remove`` flag to DecoratorScope | Add ``remove`` flag to DecoratorScope
| Python | mit | mnieber/dodo_commands | from dodo_commands.framework.singleton import Dodo
# Resp: add the current command_name
# to the list of commands decorated by decorator_name.
class DecoratorScope:
def __init__(self, decorator_name):
self.decorators = Dodo.get_config('/ROOT').setdefault(
'decorators', {}).setdefault(decorator... | from dodo_commands.framework.singleton import Dodo
# Resp: add the current command_name
# to the list of commands decorated by decorator_name.
class DecoratorScope:
def __init__(self, decorator_name, remove=False):
self.decorators = Dodo.get_config('/ROOT').setdefault(
'decorators', {}).setdef... | <commit_before>from dodo_commands.framework.singleton import Dodo
# Resp: add the current command_name
# to the list of commands decorated by decorator_name.
class DecoratorScope:
def __init__(self, decorator_name):
self.decorators = Dodo.get_config('/ROOT').setdefault(
'decorators', {}).setde... | from dodo_commands.framework.singleton import Dodo
# Resp: add the current command_name
# to the list of commands decorated by decorator_name.
class DecoratorScope:
def __init__(self, decorator_name, remove=False):
self.decorators = Dodo.get_config('/ROOT').setdefault(
'decorators', {}).setdef... | from dodo_commands.framework.singleton import Dodo
# Resp: add the current command_name
# to the list of commands decorated by decorator_name.
class DecoratorScope:
def __init__(self, decorator_name):
self.decorators = Dodo.get_config('/ROOT').setdefault(
'decorators', {}).setdefault(decorator... | <commit_before>from dodo_commands.framework.singleton import Dodo
# Resp: add the current command_name
# to the list of commands decorated by decorator_name.
class DecoratorScope:
def __init__(self, decorator_name):
self.decorators = Dodo.get_config('/ROOT').setdefault(
'decorators', {}).setde... |
a8874713c5b34c19fe42a96ad495270fe3298841 | python/hxActor/main.py | python/hxActor/main.py | #!/usr/bin/env python
import actorcore.ICC
class OurActor(actorcore.ICC.ICC):
def __init__(self, name,
productName=None, configFile=None,
modelNames=('charis', 'hx'),
debugLevel=30):
""" Setup an Actor instance. See help for actorcore.Actor for details. ... | #!/usr/bin/env python
import actorcore.ICC
class OurActor(actorcore.ICC.ICC):
def __init__(self, name,
productName=None, configFile=None,
modelNames=('charis', 'hx'),
debugLevel=30):
""" Setup an Actor instance. See help for actorcore.Actor for details. ... | Make sure we auto-connect to the IDL server | Make sure we auto-connect to the IDL server
| Python | mit | CraigLoomis/ics_hxActor,CraigLoomis/ics_hxActor | #!/usr/bin/env python
import actorcore.ICC
class OurActor(actorcore.ICC.ICC):
def __init__(self, name,
productName=None, configFile=None,
modelNames=('charis', 'hx'),
debugLevel=30):
""" Setup an Actor instance. See help for actorcore.Actor for details. ... | #!/usr/bin/env python
import actorcore.ICC
class OurActor(actorcore.ICC.ICC):
def __init__(self, name,
productName=None, configFile=None,
modelNames=('charis', 'hx'),
debugLevel=30):
""" Setup an Actor instance. See help for actorcore.Actor for details. ... | <commit_before>#!/usr/bin/env python
import actorcore.ICC
class OurActor(actorcore.ICC.ICC):
def __init__(self, name,
productName=None, configFile=None,
modelNames=('charis', 'hx'),
debugLevel=30):
""" Setup an Actor instance. See help for actorcore.Acto... | #!/usr/bin/env python
import actorcore.ICC
class OurActor(actorcore.ICC.ICC):
def __init__(self, name,
productName=None, configFile=None,
modelNames=('charis', 'hx'),
debugLevel=30):
""" Setup an Actor instance. See help for actorcore.Actor for details. ... | #!/usr/bin/env python
import actorcore.ICC
class OurActor(actorcore.ICC.ICC):
def __init__(self, name,
productName=None, configFile=None,
modelNames=('charis', 'hx'),
debugLevel=30):
""" Setup an Actor instance. See help for actorcore.Actor for details. ... | <commit_before>#!/usr/bin/env python
import actorcore.ICC
class OurActor(actorcore.ICC.ICC):
def __init__(self, name,
productName=None, configFile=None,
modelNames=('charis', 'hx'),
debugLevel=30):
""" Setup an Actor instance. See help for actorcore.Acto... |
866b55d9160d274772aa796946492549eea6ca17 | tests/asttools/test_compiler.py | tests/asttools/test_compiler.py | """Test suite for asttools.compiler."""
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import pytest
from pycc.asttools import parse
from pycc.asttools import compiler
source = """
x = True
for y in range(10):
... | """Test suite for asttools.compiler."""
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import pytest
from pycc import pycompat
from pycc.asttools import parse
from pycc.asttools import compiler
source = """
x = Tru... | Add a skiptest to support PY34 testing | Add a skiptest to support PY34 testing
The third party astkit library does not yet support the latest
PY34 changes to the ast module. Until this is resolved the PY34
tests will skip any use of that library.
Signed-off-by: Kevin Conway <3473c1f185ca03eadc40ad288d84425b54fd7d57@gmail.com>
| Python | apache-2.0 | kevinconway/pycc,kevinconway/pycc | """Test suite for asttools.compiler."""
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import pytest
from pycc.asttools import parse
from pycc.asttools import compiler
source = """
x = True
for y in range(10):
... | """Test suite for asttools.compiler."""
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import pytest
from pycc import pycompat
from pycc.asttools import parse
from pycc.asttools import compiler
source = """
x = Tru... | <commit_before>"""Test suite for asttools.compiler."""
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import pytest
from pycc.asttools import parse
from pycc.asttools import compiler
source = """
x = True
for y in ... | """Test suite for asttools.compiler."""
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import pytest
from pycc import pycompat
from pycc.asttools import parse
from pycc.asttools import compiler
source = """
x = Tru... | """Test suite for asttools.compiler."""
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import pytest
from pycc.asttools import parse
from pycc.asttools import compiler
source = """
x = True
for y in range(10):
... | <commit_before>"""Test suite for asttools.compiler."""
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import pytest
from pycc.asttools import parse
from pycc.asttools import compiler
source = """
x = True
for y in ... |
6ec7465b5ec96b44e82cae9db58d6529e60ff920 | tests/linters/test_lint_nwod.py | tests/linters/test_lint_nwod.py | import npc
import pytest
import os
from tests.util import fixture_dir
def test_has_virtue():
char_file = fixture_dir('linter', 'nwod', 'Has Virtue.nwod')
with open(char_file, 'r') as char_file:
problems = npc.linters.nwod.lint_vice_virtue(char_file.read())
assert 'Missing virtue' not in problem... | """Tests the helpers for linting generic nwod characters"""
import npc
import pytest
import os
from tests.util import fixture_dir
def test_has_virtue():
char_file = fixture_dir('linter', 'nwod', 'Has Virtue.nwod')
with open(char_file, 'r') as char_file:
problems = npc.linters.nwod.lint_vice_virtue(cha... | Add doc comment to nwod lint tests | Add doc comment to nwod lint tests
| Python | mit | aurule/npc,aurule/npc | import npc
import pytest
import os
from tests.util import fixture_dir
def test_has_virtue():
char_file = fixture_dir('linter', 'nwod', 'Has Virtue.nwod')
with open(char_file, 'r') as char_file:
problems = npc.linters.nwod.lint_vice_virtue(char_file.read())
assert 'Missing virtue' not in problem... | """Tests the helpers for linting generic nwod characters"""
import npc
import pytest
import os
from tests.util import fixture_dir
def test_has_virtue():
char_file = fixture_dir('linter', 'nwod', 'Has Virtue.nwod')
with open(char_file, 'r') as char_file:
problems = npc.linters.nwod.lint_vice_virtue(cha... | <commit_before>import npc
import pytest
import os
from tests.util import fixture_dir
def test_has_virtue():
char_file = fixture_dir('linter', 'nwod', 'Has Virtue.nwod')
with open(char_file, 'r') as char_file:
problems = npc.linters.nwod.lint_vice_virtue(char_file.read())
assert 'Missing virtue'... | """Tests the helpers for linting generic nwod characters"""
import npc
import pytest
import os
from tests.util import fixture_dir
def test_has_virtue():
char_file = fixture_dir('linter', 'nwod', 'Has Virtue.nwod')
with open(char_file, 'r') as char_file:
problems = npc.linters.nwod.lint_vice_virtue(cha... | import npc
import pytest
import os
from tests.util import fixture_dir
def test_has_virtue():
char_file = fixture_dir('linter', 'nwod', 'Has Virtue.nwod')
with open(char_file, 'r') as char_file:
problems = npc.linters.nwod.lint_vice_virtue(char_file.read())
assert 'Missing virtue' not in problem... | <commit_before>import npc
import pytest
import os
from tests.util import fixture_dir
def test_has_virtue():
char_file = fixture_dir('linter', 'nwod', 'Has Virtue.nwod')
with open(char_file, 'r') as char_file:
problems = npc.linters.nwod.lint_vice_virtue(char_file.read())
assert 'Missing virtue'... |
4bf7af66d6948d262d1115e460326fda720060de | datacleaner/_version.py | datacleaner/_version.py | # -*- coding: utf-8 -*-
"""
Copyright (c) 2016 Randal S. Olson
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, m... | # -*- coding: utf-8 -*-
"""
Copyright (c) 2016 Randal S. Olson
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, m... | Increment version for minor release | Increment version for minor release
| Python | mit | rhiever/datacleaner,rhiever/datacleaner | # -*- coding: utf-8 -*-
"""
Copyright (c) 2016 Randal S. Olson
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, m... | # -*- coding: utf-8 -*-
"""
Copyright (c) 2016 Randal S. Olson
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, m... | <commit_before># -*- coding: utf-8 -*-
"""
Copyright (c) 2016 Randal S. Olson
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, ... | # -*- coding: utf-8 -*-
"""
Copyright (c) 2016 Randal S. Olson
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, m... | # -*- coding: utf-8 -*-
"""
Copyright (c) 2016 Randal S. Olson
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, m... | <commit_before># -*- coding: utf-8 -*-
"""
Copyright (c) 2016 Randal S. Olson
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, ... |
65c347af4bb75154390744b53d6f2e0c75948f6b | src/proposals/admin.py | src/proposals/admin.py | from django.contrib import admin
from django.contrib.contenttypes.admin import GenericTabularInline
from import_export.admin import ExportMixin
from .models import AdditionalSpeaker, TalkProposal, TutorialProposal
from .resources import TalkProposalResource
class AdditionalSpeakerInline(GenericTabularInline):
m... | from django.contrib import admin
from django.contrib.contenttypes.admin import GenericTabularInline
from import_export.admin import ExportMixin
from .models import AdditionalSpeaker, TalkProposal, TutorialProposal
from .resources import TalkProposalResource
class AdditionalSpeakerInline(GenericTabularInline):
m... | Make ProposalAdmin work when creating | Make ProposalAdmin work when creating
| Python | mit | pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016 | from django.contrib import admin
from django.contrib.contenttypes.admin import GenericTabularInline
from import_export.admin import ExportMixin
from .models import AdditionalSpeaker, TalkProposal, TutorialProposal
from .resources import TalkProposalResource
class AdditionalSpeakerInline(GenericTabularInline):
m... | from django.contrib import admin
from django.contrib.contenttypes.admin import GenericTabularInline
from import_export.admin import ExportMixin
from .models import AdditionalSpeaker, TalkProposal, TutorialProposal
from .resources import TalkProposalResource
class AdditionalSpeakerInline(GenericTabularInline):
m... | <commit_before>from django.contrib import admin
from django.contrib.contenttypes.admin import GenericTabularInline
from import_export.admin import ExportMixin
from .models import AdditionalSpeaker, TalkProposal, TutorialProposal
from .resources import TalkProposalResource
class AdditionalSpeakerInline(GenericTabula... | from django.contrib import admin
from django.contrib.contenttypes.admin import GenericTabularInline
from import_export.admin import ExportMixin
from .models import AdditionalSpeaker, TalkProposal, TutorialProposal
from .resources import TalkProposalResource
class AdditionalSpeakerInline(GenericTabularInline):
m... | from django.contrib import admin
from django.contrib.contenttypes.admin import GenericTabularInline
from import_export.admin import ExportMixin
from .models import AdditionalSpeaker, TalkProposal, TutorialProposal
from .resources import TalkProposalResource
class AdditionalSpeakerInline(GenericTabularInline):
m... | <commit_before>from django.contrib import admin
from django.contrib.contenttypes.admin import GenericTabularInline
from import_export.admin import ExportMixin
from .models import AdditionalSpeaker, TalkProposal, TutorialProposal
from .resources import TalkProposalResource
class AdditionalSpeakerInline(GenericTabula... |
77179ef9375640eb300171e5bd38e68b999f9daf | monitor.py | monitor.py | import re
from subprocess import Popen, PIPE, STDOUT
from sys import stdout
p = Popen(('stdbuf', '-oL', 'udevadm', 'monitor', '-k'), stdout=PIPE,
stderr=STDOUT, bufsize=1)
c = re.compile(r'KERNEL\[[^]]*\]\s*add\s*(?P<dev_path>\S*)\s*\(block\)')
for line in iter(p.stdout.readline, b''):
m = c.match(lin... | from __future__ import unicode_literals
import re
from subprocess import Popen, PIPE, STDOUT
from sys import stdout
from time import sleep
bit_bucket = open('/dev/null', 'w')
monitor_p = Popen(('stdbuf', '-oL', 'udevadm', 'monitor', '-k'), stdout=PIPE,
stderr=PIPE, bufsize=1)
block_add_pattern = re.com... | Handle removal; keep track of devices and info | Handle removal; keep track of devices and info
| Python | mit | drkitty/arise | import re
from subprocess import Popen, PIPE, STDOUT
from sys import stdout
p = Popen(('stdbuf', '-oL', 'udevadm', 'monitor', '-k'), stdout=PIPE,
stderr=STDOUT, bufsize=1)
c = re.compile(r'KERNEL\[[^]]*\]\s*add\s*(?P<dev_path>\S*)\s*\(block\)')
for line in iter(p.stdout.readline, b''):
m = c.match(lin... | from __future__ import unicode_literals
import re
from subprocess import Popen, PIPE, STDOUT
from sys import stdout
from time import sleep
bit_bucket = open('/dev/null', 'w')
monitor_p = Popen(('stdbuf', '-oL', 'udevadm', 'monitor', '-k'), stdout=PIPE,
stderr=PIPE, bufsize=1)
block_add_pattern = re.com... | <commit_before>import re
from subprocess import Popen, PIPE, STDOUT
from sys import stdout
p = Popen(('stdbuf', '-oL', 'udevadm', 'monitor', '-k'), stdout=PIPE,
stderr=STDOUT, bufsize=1)
c = re.compile(r'KERNEL\[[^]]*\]\s*add\s*(?P<dev_path>\S*)\s*\(block\)')
for line in iter(p.stdout.readline, b''):
... | from __future__ import unicode_literals
import re
from subprocess import Popen, PIPE, STDOUT
from sys import stdout
from time import sleep
bit_bucket = open('/dev/null', 'w')
monitor_p = Popen(('stdbuf', '-oL', 'udevadm', 'monitor', '-k'), stdout=PIPE,
stderr=PIPE, bufsize=1)
block_add_pattern = re.com... | import re
from subprocess import Popen, PIPE, STDOUT
from sys import stdout
p = Popen(('stdbuf', '-oL', 'udevadm', 'monitor', '-k'), stdout=PIPE,
stderr=STDOUT, bufsize=1)
c = re.compile(r'KERNEL\[[^]]*\]\s*add\s*(?P<dev_path>\S*)\s*\(block\)')
for line in iter(p.stdout.readline, b''):
m = c.match(lin... | <commit_before>import re
from subprocess import Popen, PIPE, STDOUT
from sys import stdout
p = Popen(('stdbuf', '-oL', 'udevadm', 'monitor', '-k'), stdout=PIPE,
stderr=STDOUT, bufsize=1)
c = re.compile(r'KERNEL\[[^]]*\]\s*add\s*(?P<dev_path>\S*)\s*\(block\)')
for line in iter(p.stdout.readline, b''):
... |
aa092529bb643eabae45ae051ecd99d6bebb88ea | src/som/vmobjects/abstract_object.py | src/som/vmobjects/abstract_object.py | class AbstractObject(object):
def __init__(self):
pass
def send(self, frame, selector_string, arguments, universe):
# Turn the selector string into a selector
selector = universe.symbol_for(selector_string)
invokable = self.get_class(universe).lookup_invokable(selec... | class AbstractObject(object):
def __init__(self):
pass
def send(self, frame, selector_string, arguments, universe):
# Turn the selector string into a selector
selector = universe.symbol_for(selector_string)
invokable = self.get_class(universe).lookup_invokable(selec... | Send methods need to return the result | Send methods need to return the result
Signed-off-by: Stefan Marr <46f1a0bd5592a2f9244ca321b129902a06b53e03@stefan-marr.de>
| Python | mit | smarr/RTruffleSOM,SOM-st/PySOM,SOM-st/RPySOM,smarr/PySOM,SOM-st/RTruffleSOM,SOM-st/RPySOM,SOM-st/RTruffleSOM,SOM-st/PySOM,smarr/RTruffleSOM,smarr/PySOM | class AbstractObject(object):
def __init__(self):
pass
def send(self, frame, selector_string, arguments, universe):
# Turn the selector string into a selector
selector = universe.symbol_for(selector_string)
invokable = self.get_class(universe).lookup_invokable(selec... | class AbstractObject(object):
def __init__(self):
pass
def send(self, frame, selector_string, arguments, universe):
# Turn the selector string into a selector
selector = universe.symbol_for(selector_string)
invokable = self.get_class(universe).lookup_invokable(selec... | <commit_before>class AbstractObject(object):
def __init__(self):
pass
def send(self, frame, selector_string, arguments, universe):
# Turn the selector string into a selector
selector = universe.symbol_for(selector_string)
invokable = self.get_class(universe).lookup_... | class AbstractObject(object):
def __init__(self):
pass
def send(self, frame, selector_string, arguments, universe):
# Turn the selector string into a selector
selector = universe.symbol_for(selector_string)
invokable = self.get_class(universe).lookup_invokable(selec... | class AbstractObject(object):
def __init__(self):
pass
def send(self, frame, selector_string, arguments, universe):
# Turn the selector string into a selector
selector = universe.symbol_for(selector_string)
invokable = self.get_class(universe).lookup_invokable(selec... | <commit_before>class AbstractObject(object):
def __init__(self):
pass
def send(self, frame, selector_string, arguments, universe):
# Turn the selector string into a selector
selector = universe.symbol_for(selector_string)
invokable = self.get_class(universe).lookup_... |
539f0c6626f4ec18a0995f90727425748a5eaee9 | migrations/versions/2f3192e76e5_.py | migrations/versions/2f3192e76e5_.py | """empty message
Revision ID: 2f3192e76e5
Revises: 3dbc20af3c9
Create Date: 2015-11-24 15:28:41.695124
"""
# revision identifiers, used by Alembic.
revision = '2f3192e76e5'
down_revision = '3dbc20af3c9'
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
def upgrade():
### commands auto gen... | """empty message
Revision ID: 2f3192e76e5
Revises: 3dbc20af3c9
Create Date: 2015-11-24 15:28:41.695124
"""
# revision identifiers, used by Alembic.
revision = '2f3192e76e5'
down_revision = '3dbc20af3c9'
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
from sqlalchemy_searchable import sync_tri... | Add sync trigger to latest migration | Add sync trigger to latest migration
| Python | mit | Encrylize/MyDictionary,Encrylize/MyDictionary,Encrylize/MyDictionary | """empty message
Revision ID: 2f3192e76e5
Revises: 3dbc20af3c9
Create Date: 2015-11-24 15:28:41.695124
"""
# revision identifiers, used by Alembic.
revision = '2f3192e76e5'
down_revision = '3dbc20af3c9'
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
def upgrade():
### commands auto gen... | """empty message
Revision ID: 2f3192e76e5
Revises: 3dbc20af3c9
Create Date: 2015-11-24 15:28:41.695124
"""
# revision identifiers, used by Alembic.
revision = '2f3192e76e5'
down_revision = '3dbc20af3c9'
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
from sqlalchemy_searchable import sync_tri... | <commit_before>"""empty message
Revision ID: 2f3192e76e5
Revises: 3dbc20af3c9
Create Date: 2015-11-24 15:28:41.695124
"""
# revision identifiers, used by Alembic.
revision = '2f3192e76e5'
down_revision = '3dbc20af3c9'
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
def upgrade():
### co... | """empty message
Revision ID: 2f3192e76e5
Revises: 3dbc20af3c9
Create Date: 2015-11-24 15:28:41.695124
"""
# revision identifiers, used by Alembic.
revision = '2f3192e76e5'
down_revision = '3dbc20af3c9'
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
from sqlalchemy_searchable import sync_tri... | """empty message
Revision ID: 2f3192e76e5
Revises: 3dbc20af3c9
Create Date: 2015-11-24 15:28:41.695124
"""
# revision identifiers, used by Alembic.
revision = '2f3192e76e5'
down_revision = '3dbc20af3c9'
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
def upgrade():
### commands auto gen... | <commit_before>"""empty message
Revision ID: 2f3192e76e5
Revises: 3dbc20af3c9
Create Date: 2015-11-24 15:28:41.695124
"""
# revision identifiers, used by Alembic.
revision = '2f3192e76e5'
down_revision = '3dbc20af3c9'
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
def upgrade():
### co... |
0821e31867bac4704248a63d846c9e5fc0377ac3 | storage/test_driver.py | storage/test_driver.py | #!/usr/bin/env python
from storage import Storage
NEW_REPORT = {'foo': 'bar', 'boo': 'baz'}
def main():
db_store = Storage.get_storage()
for key, value in db_store.__dict__.iteritems():
print '%s: %s' % (key, value)
print '\n'
# report_id = db_store.store(NEW_REPORT)
report_id = 'AVM0dGO... | #!/usr/bin/env python
from storage import Storage
NEW_REPORT = {'foo': 'bar', 'boo': 'baz'}
REPORTS = [
{'report_id': 1, 'report': {"/tmp/example": {"MD5": "53f43f9591749b8cae536ff13e48d6de", "SHA256": "815d310bdbc8684c1163b62f583dbaffb2df74b9104e2aadabf8f8491bafab66", "libmagic": "ASCII text"}}},
{'report_id... | Add populate es function to test driver | Add populate es function to test driver
| Python | mpl-2.0 | MITRECND/multiscanner,awest1339/multiscanner,mitre/multiscanner,awest1339/multiscanner,awest1339/multiscanner,jmlong1027/multiscanner,jmlong1027/multiscanner,jmlong1027/multiscanner,mitre/multiscanner,awest1339/multiscanner,MITRECND/multiscanner,mitre/multiscanner,jmlong1027/multiscanner | #!/usr/bin/env python
from storage import Storage
NEW_REPORT = {'foo': 'bar', 'boo': 'baz'}
def main():
db_store = Storage.get_storage()
for key, value in db_store.__dict__.iteritems():
print '%s: %s' % (key, value)
print '\n'
# report_id = db_store.store(NEW_REPORT)
report_id = 'AVM0dGO... | #!/usr/bin/env python
from storage import Storage
NEW_REPORT = {'foo': 'bar', 'boo': 'baz'}
REPORTS = [
{'report_id': 1, 'report': {"/tmp/example": {"MD5": "53f43f9591749b8cae536ff13e48d6de", "SHA256": "815d310bdbc8684c1163b62f583dbaffb2df74b9104e2aadabf8f8491bafab66", "libmagic": "ASCII text"}}},
{'report_id... | <commit_before>#!/usr/bin/env python
from storage import Storage
NEW_REPORT = {'foo': 'bar', 'boo': 'baz'}
def main():
db_store = Storage.get_storage()
for key, value in db_store.__dict__.iteritems():
print '%s: %s' % (key, value)
print '\n'
# report_id = db_store.store(NEW_REPORT)
repor... | #!/usr/bin/env python
from storage import Storage
NEW_REPORT = {'foo': 'bar', 'boo': 'baz'}
REPORTS = [
{'report_id': 1, 'report': {"/tmp/example": {"MD5": "53f43f9591749b8cae536ff13e48d6de", "SHA256": "815d310bdbc8684c1163b62f583dbaffb2df74b9104e2aadabf8f8491bafab66", "libmagic": "ASCII text"}}},
{'report_id... | #!/usr/bin/env python
from storage import Storage
NEW_REPORT = {'foo': 'bar', 'boo': 'baz'}
def main():
db_store = Storage.get_storage()
for key, value in db_store.__dict__.iteritems():
print '%s: %s' % (key, value)
print '\n'
# report_id = db_store.store(NEW_REPORT)
report_id = 'AVM0dGO... | <commit_before>#!/usr/bin/env python
from storage import Storage
NEW_REPORT = {'foo': 'bar', 'boo': 'baz'}
def main():
db_store = Storage.get_storage()
for key, value in db_store.__dict__.iteritems():
print '%s: %s' % (key, value)
print '\n'
# report_id = db_store.store(NEW_REPORT)
repor... |
bdcb57264574fdfa5af33bdaae1654fd3f008ed5 | app/conf/celeryschedule.py | app/conf/celeryschedule.py | from datetime import timedelta
CELERYBEAT_SCHEDULE = {
"reddit-validations": {
"task": "reddit.tasks.process_validations",
"schedule": timedelta(minutes=10),
},
"eveapi-update": {
"task": "eve_api.tasks.account.queue_apikey_updates",
"schedule": timedelta(minutes=10),
},... | from datetime import timedelta
CELERYBEAT_SCHEDULE = {
"reddit-validations": {
"task": "reddit.tasks.process_validations",
"schedule": timedelta(minutes=10),
},
"eveapi-update": {
"task": "eve_api.tasks.account.queue_apikey_updates",
"schedule": timedelta(minutes=10),
},... | Add the blacklist checking to the bulk | Add the blacklist checking to the bulk
| Python | bsd-3-clause | nikdoof/test-auth | from datetime import timedelta
CELERYBEAT_SCHEDULE = {
"reddit-validations": {
"task": "reddit.tasks.process_validations",
"schedule": timedelta(minutes=10),
},
"eveapi-update": {
"task": "eve_api.tasks.account.queue_apikey_updates",
"schedule": timedelta(minutes=10),
},... | from datetime import timedelta
CELERYBEAT_SCHEDULE = {
"reddit-validations": {
"task": "reddit.tasks.process_validations",
"schedule": timedelta(minutes=10),
},
"eveapi-update": {
"task": "eve_api.tasks.account.queue_apikey_updates",
"schedule": timedelta(minutes=10),
},... | <commit_before>from datetime import timedelta
CELERYBEAT_SCHEDULE = {
"reddit-validations": {
"task": "reddit.tasks.process_validations",
"schedule": timedelta(minutes=10),
},
"eveapi-update": {
"task": "eve_api.tasks.account.queue_apikey_updates",
"schedule": timedelta(minu... | from datetime import timedelta
CELERYBEAT_SCHEDULE = {
"reddit-validations": {
"task": "reddit.tasks.process_validations",
"schedule": timedelta(minutes=10),
},
"eveapi-update": {
"task": "eve_api.tasks.account.queue_apikey_updates",
"schedule": timedelta(minutes=10),
},... | from datetime import timedelta
CELERYBEAT_SCHEDULE = {
"reddit-validations": {
"task": "reddit.tasks.process_validations",
"schedule": timedelta(minutes=10),
},
"eveapi-update": {
"task": "eve_api.tasks.account.queue_apikey_updates",
"schedule": timedelta(minutes=10),
},... | <commit_before>from datetime import timedelta
CELERYBEAT_SCHEDULE = {
"reddit-validations": {
"task": "reddit.tasks.process_validations",
"schedule": timedelta(minutes=10),
},
"eveapi-update": {
"task": "eve_api.tasks.account.queue_apikey_updates",
"schedule": timedelta(minu... |
475ff9a1b1eed0cd5f1b20f0a42926b735a4c163 | txircd/modules/extra/conn_umodes.py | txircd/modules/extra/conn_umodes.py | from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class AutoUserModes(ModuleData):
implements(IPlugin, IModuleData)
name = "AutoUserModes"
def actions(self):
return [ ("welcome", 50, self.autoSet... | from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class AutoUserModes(ModuleData):
implements(IPlugin, IModuleData)
name = "AutoUserModes"
def actions(self):
return [ ("welcome", 50, self.autoSet... | Simplify the AutoUserModes mode type check | Simplify the AutoUserModes mode type check
| Python | bsd-3-clause | ElementalAlchemist/txircd,Heufneutje/txircd | from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class AutoUserModes(ModuleData):
implements(IPlugin, IModuleData)
name = "AutoUserModes"
def actions(self):
return [ ("welcome", 50, self.autoSet... | from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class AutoUserModes(ModuleData):
implements(IPlugin, IModuleData)
name = "AutoUserModes"
def actions(self):
return [ ("welcome", 50, self.autoSet... | <commit_before>from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class AutoUserModes(ModuleData):
implements(IPlugin, IModuleData)
name = "AutoUserModes"
def actions(self):
return [ ("welcome", 5... | from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class AutoUserModes(ModuleData):
implements(IPlugin, IModuleData)
name = "AutoUserModes"
def actions(self):
return [ ("welcome", 50, self.autoSet... | from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class AutoUserModes(ModuleData):
implements(IPlugin, IModuleData)
name = "AutoUserModes"
def actions(self):
return [ ("welcome", 50, self.autoSet... | <commit_before>from twisted.plugin import IPlugin
from txircd.module_interface import IModuleData, ModuleData
from txircd.utils import ModeType
from zope.interface import implements
class AutoUserModes(ModuleData):
implements(IPlugin, IModuleData)
name = "AutoUserModes"
def actions(self):
return [ ("welcome", 5... |
c6cb543f35356769dcc0f7fedb099a160e267473 | run_tests.py | run_tests.py | #!/usr/bin/env python
import os, sys, re, shutil
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
# Use psycopg2cffi for PyPy
try:
import psycopg2 # noqa
except ImportError:
# Fall back to psycopg2cffi
from psycopg2cffi import compat
compat.register()
# Set up Django
import django
from djang... | #!/usr/bin/env python
import os, sys, re, shutil
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
# Use psycopg2cffi for PyPy
try:
import psycopg2 # noqa
except ImportError:
# Fall back to psycopg2cffi
try:
from psycopg2cffi import compat
compat.register()
except ImportError:
... | Stop requiring psycopg2 to run tests | Stop requiring psycopg2 to run tests
| Python | bsd-3-clause | LPgenerator/django-cacheops,Suor/django-cacheops | #!/usr/bin/env python
import os, sys, re, shutil
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
# Use psycopg2cffi for PyPy
try:
import psycopg2 # noqa
except ImportError:
# Fall back to psycopg2cffi
from psycopg2cffi import compat
compat.register()
# Set up Django
import django
from djang... | #!/usr/bin/env python
import os, sys, re, shutil
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
# Use psycopg2cffi for PyPy
try:
import psycopg2 # noqa
except ImportError:
# Fall back to psycopg2cffi
try:
from psycopg2cffi import compat
compat.register()
except ImportError:
... | <commit_before>#!/usr/bin/env python
import os, sys, re, shutil
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
# Use psycopg2cffi for PyPy
try:
import psycopg2 # noqa
except ImportError:
# Fall back to psycopg2cffi
from psycopg2cffi import compat
compat.register()
# Set up Django
import dj... | #!/usr/bin/env python
import os, sys, re, shutil
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
# Use psycopg2cffi for PyPy
try:
import psycopg2 # noqa
except ImportError:
# Fall back to psycopg2cffi
try:
from psycopg2cffi import compat
compat.register()
except ImportError:
... | #!/usr/bin/env python
import os, sys, re, shutil
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
# Use psycopg2cffi for PyPy
try:
import psycopg2 # noqa
except ImportError:
# Fall back to psycopg2cffi
from psycopg2cffi import compat
compat.register()
# Set up Django
import django
from djang... | <commit_before>#!/usr/bin/env python
import os, sys, re, shutil
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
# Use psycopg2cffi for PyPy
try:
import psycopg2 # noqa
except ImportError:
# Fall back to psycopg2cffi
from psycopg2cffi import compat
compat.register()
# Set up Django
import dj... |
320f26632ee3462aaeb1a88fcdcfe69dbbb2322b | runserver.py | runserver.py | if __name__ == "__main__":
from plenario import create_app
application = create_app()
application.run(host="0.0.0.0")
| from plenario import create_app
application = create_app()
if __name__ == "__main__":
application.run(host="0.0.0.0")
| Move 'application' outside of if '__main__' -.- | Move 'application' outside of if '__main__' -.-
| Python | mit | UrbanCCD-UChicago/plenario,UrbanCCD-UChicago/plenario,UrbanCCD-UChicago/plenario | if __name__ == "__main__":
from plenario import create_app
application = create_app()
application.run(host="0.0.0.0")
Move 'application' outside of if '__main__' -.- | from plenario import create_app
application = create_app()
if __name__ == "__main__":
application.run(host="0.0.0.0")
| <commit_before>if __name__ == "__main__":
from plenario import create_app
application = create_app()
application.run(host="0.0.0.0")
<commit_msg>Move 'application' outside of if '__main__' -.-<commit_after> | from plenario import create_app
application = create_app()
if __name__ == "__main__":
application.run(host="0.0.0.0")
| if __name__ == "__main__":
from plenario import create_app
application = create_app()
application.run(host="0.0.0.0")
Move 'application' outside of if '__main__' -.-from plenario import create_app
application = create_app()
if __name__ == "__main__":
application.run(host="0.0.0.0")
| <commit_before>if __name__ == "__main__":
from plenario import create_app
application = create_app()
application.run(host="0.0.0.0")
<commit_msg>Move 'application' outside of if '__main__' -.-<commit_after>from plenario import create_app
application = create_app()
if __name__ == "__main__":
application... |
c36301ec14e6d10762e613c0c52bf0e48baf9df9 | goatools/godag/consts.py | goatools/godag/consts.py | """GO-DAG constants."""
__copyright__ = "Copyright (C) 2010-2018, DV Klopfenstein, H Tang, All rights reserved."
__author__ = "DV Klopfenstein"
# pylint: disable=too-few-public-methods
class Consts(object):
"""Constants commonly used in GO-DAG operations."""
NAMESPACE2NS = {
'biological_process' : '... | """GO-DAG constants."""
__copyright__ = "Copyright (C) 2010-2018, DV Klopfenstein, H Tang, All rights reserved."
__author__ = "DV Klopfenstein"
# pylint: disable=too-few-public-methods
class Consts(object):
"""Constants commonly used in GO-DAG operations."""
NAMESPACE2NS = {
'biological_process' : '... | Add comment with link to more info | Add comment with link to more info
| Python | bsd-2-clause | tanghaibao/goatools,tanghaibao/goatools | """GO-DAG constants."""
__copyright__ = "Copyright (C) 2010-2018, DV Klopfenstein, H Tang, All rights reserved."
__author__ = "DV Klopfenstein"
# pylint: disable=too-few-public-methods
class Consts(object):
"""Constants commonly used in GO-DAG operations."""
NAMESPACE2NS = {
'biological_process' : '... | """GO-DAG constants."""
__copyright__ = "Copyright (C) 2010-2018, DV Klopfenstein, H Tang, All rights reserved."
__author__ = "DV Klopfenstein"
# pylint: disable=too-few-public-methods
class Consts(object):
"""Constants commonly used in GO-DAG operations."""
NAMESPACE2NS = {
'biological_process' : '... | <commit_before>"""GO-DAG constants."""
__copyright__ = "Copyright (C) 2010-2018, DV Klopfenstein, H Tang, All rights reserved."
__author__ = "DV Klopfenstein"
# pylint: disable=too-few-public-methods
class Consts(object):
"""Constants commonly used in GO-DAG operations."""
NAMESPACE2NS = {
'biologic... | """GO-DAG constants."""
__copyright__ = "Copyright (C) 2010-2018, DV Klopfenstein, H Tang, All rights reserved."
__author__ = "DV Klopfenstein"
# pylint: disable=too-few-public-methods
class Consts(object):
"""Constants commonly used in GO-DAG operations."""
NAMESPACE2NS = {
'biological_process' : '... | """GO-DAG constants."""
__copyright__ = "Copyright (C) 2010-2018, DV Klopfenstein, H Tang, All rights reserved."
__author__ = "DV Klopfenstein"
# pylint: disable=too-few-public-methods
class Consts(object):
"""Constants commonly used in GO-DAG operations."""
NAMESPACE2NS = {
'biological_process' : '... | <commit_before>"""GO-DAG constants."""
__copyright__ = "Copyright (C) 2010-2018, DV Klopfenstein, H Tang, All rights reserved."
__author__ = "DV Klopfenstein"
# pylint: disable=too-few-public-methods
class Consts(object):
"""Constants commonly used in GO-DAG operations."""
NAMESPACE2NS = {
'biologic... |
9ff4f1e64f8d8208bfe83ed497fa280febcf5ce7 | citrination_client/views/descriptors/real_descriptor.py | citrination_client/views/descriptors/real_descriptor.py | from citrination_client.views.descriptors.descriptor import MaterialDescriptor
class RealDescriptor(MaterialDescriptor):
def __init__(self, key, lower_bound="-Infinity", upper_bound="Infinity", units=""):
self.options = dict(lower_bound=lower_bound, upper_bound=upper_bound, units=units)
super(Real... | from citrination_client.views.descriptors.descriptor import MaterialDescriptor
class RealDescriptor(MaterialDescriptor):
def __init__(self, key, lower_bound, upper_bound, units=""):
self.options = dict(lower_bound=lower_bound, upper_bound=upper_bound, units=units)
super(RealDescriptor, self).__ini... | Remove infinity from valid bounds | Remove infinity from valid bounds
| Python | apache-2.0 | CitrineInformatics/python-citrination-client | from citrination_client.views.descriptors.descriptor import MaterialDescriptor
class RealDescriptor(MaterialDescriptor):
def __init__(self, key, lower_bound="-Infinity", upper_bound="Infinity", units=""):
self.options = dict(lower_bound=lower_bound, upper_bound=upper_bound, units=units)
super(Real... | from citrination_client.views.descriptors.descriptor import MaterialDescriptor
class RealDescriptor(MaterialDescriptor):
def __init__(self, key, lower_bound, upper_bound, units=""):
self.options = dict(lower_bound=lower_bound, upper_bound=upper_bound, units=units)
super(RealDescriptor, self).__ini... | <commit_before>from citrination_client.views.descriptors.descriptor import MaterialDescriptor
class RealDescriptor(MaterialDescriptor):
def __init__(self, key, lower_bound="-Infinity", upper_bound="Infinity", units=""):
self.options = dict(lower_bound=lower_bound, upper_bound=upper_bound, units=units)
... | from citrination_client.views.descriptors.descriptor import MaterialDescriptor
class RealDescriptor(MaterialDescriptor):
def __init__(self, key, lower_bound, upper_bound, units=""):
self.options = dict(lower_bound=lower_bound, upper_bound=upper_bound, units=units)
super(RealDescriptor, self).__ini... | from citrination_client.views.descriptors.descriptor import MaterialDescriptor
class RealDescriptor(MaterialDescriptor):
def __init__(self, key, lower_bound="-Infinity", upper_bound="Infinity", units=""):
self.options = dict(lower_bound=lower_bound, upper_bound=upper_bound, units=units)
super(Real... | <commit_before>from citrination_client.views.descriptors.descriptor import MaterialDescriptor
class RealDescriptor(MaterialDescriptor):
def __init__(self, key, lower_bound="-Infinity", upper_bound="Infinity", units=""):
self.options = dict(lower_bound=lower_bound, upper_bound=upper_bound, units=units)
... |
50202a70b4d68c628696904d28ffc58f5f4fb54b | sqla_nose.py | sqla_nose.py | #!/usr/bin/env python
"""
nose runner script.
Only use this script if setuptools is not available, i.e. such as
on Python 3K. Otherwise consult README.unittests for the
recommended methods of running tests.
"""
try:
import sqlalchemy
except ImportError:
from os import path
import sys
sys.path.append... | #!/usr/bin/env python
"""
nose runner script.
Only use this script if setuptools is not available, i.e. such as
on Python 3K. Otherwise consult README.unittests for the
recommended methods of running tests.
"""
import sys
try:
from sqlalchemy_nose.noseplugin import NoseSQLAlchemy
except ImportError:
from os... | Update for new nose plugin location. | Update for new nose plugin location.
| Python | mit | elelianghh/sqlalchemy,sandan/sqlalchemy,dstufft/sqlalchemy,wfxiang08/sqlalchemy,Cito/sqlalchemy,wujuguang/sqlalchemy,alex/sqlalchemy,olemis/sqlalchemy,276361270/sqlalchemy,brianv0/sqlalchemy,wfxiang08/sqlalchemy,Akrog/sqlalchemy,bdupharm/sqlalchemy,davidjb/sqlalchemy,monetate/sqlalchemy,brianv0/sqlalchemy,hsum/sqlalche... | #!/usr/bin/env python
"""
nose runner script.
Only use this script if setuptools is not available, i.e. such as
on Python 3K. Otherwise consult README.unittests for the
recommended methods of running tests.
"""
try:
import sqlalchemy
except ImportError:
from os import path
import sys
sys.path.append... | #!/usr/bin/env python
"""
nose runner script.
Only use this script if setuptools is not available, i.e. such as
on Python 3K. Otherwise consult README.unittests for the
recommended methods of running tests.
"""
import sys
try:
from sqlalchemy_nose.noseplugin import NoseSQLAlchemy
except ImportError:
from os... | <commit_before>#!/usr/bin/env python
"""
nose runner script.
Only use this script if setuptools is not available, i.e. such as
on Python 3K. Otherwise consult README.unittests for the
recommended methods of running tests.
"""
try:
import sqlalchemy
except ImportError:
from os import path
import sys
... | #!/usr/bin/env python
"""
nose runner script.
Only use this script if setuptools is not available, i.e. such as
on Python 3K. Otherwise consult README.unittests for the
recommended methods of running tests.
"""
import sys
try:
from sqlalchemy_nose.noseplugin import NoseSQLAlchemy
except ImportError:
from os... | #!/usr/bin/env python
"""
nose runner script.
Only use this script if setuptools is not available, i.e. such as
on Python 3K. Otherwise consult README.unittests for the
recommended methods of running tests.
"""
try:
import sqlalchemy
except ImportError:
from os import path
import sys
sys.path.append... | <commit_before>#!/usr/bin/env python
"""
nose runner script.
Only use this script if setuptools is not available, i.e. such as
on Python 3K. Otherwise consult README.unittests for the
recommended methods of running tests.
"""
try:
import sqlalchemy
except ImportError:
from os import path
import sys
... |
f861ca1f315a414f809993170ea95640505c0506 | c2corg_api/scripts/migration/sequences.py | c2corg_api/scripts/migration/sequences.py | from sqlalchemy.sql import text
from c2corg_api.scripts.migration.migrate_base import MigrateBase
class UpdateSequences(MigrateBase):
sequences = [
('guidebook', 'documents_archives', 'id', 'documents_archives_id_seq'),
('guidebook', 'documents', 'document_id', 'documents_document_id_seq'),
... | from sqlalchemy.sql import text
from c2corg_api.scripts.migration.migrate_base import MigrateBase
class UpdateSequences(MigrateBase):
sequences = [
('guidebook', 'documents_archives', 'id', 'documents_archives_id_seq'),
('guidebook', 'documents', 'document_id', 'documents_document_id_seq'),
... | Add missing user_id_seq in migration script | Add missing user_id_seq in migration script
| Python | agpl-3.0 | c2corg/v6_api,c2corg/v6_api,c2corg/v6_api | from sqlalchemy.sql import text
from c2corg_api.scripts.migration.migrate_base import MigrateBase
class UpdateSequences(MigrateBase):
sequences = [
('guidebook', 'documents_archives', 'id', 'documents_archives_id_seq'),
('guidebook', 'documents', 'document_id', 'documents_document_id_seq'),
... | from sqlalchemy.sql import text
from c2corg_api.scripts.migration.migrate_base import MigrateBase
class UpdateSequences(MigrateBase):
sequences = [
('guidebook', 'documents_archives', 'id', 'documents_archives_id_seq'),
('guidebook', 'documents', 'document_id', 'documents_document_id_seq'),
... | <commit_before>from sqlalchemy.sql import text
from c2corg_api.scripts.migration.migrate_base import MigrateBase
class UpdateSequences(MigrateBase):
sequences = [
('guidebook', 'documents_archives', 'id', 'documents_archives_id_seq'),
('guidebook', 'documents', 'document_id', 'documents_document_i... | from sqlalchemy.sql import text
from c2corg_api.scripts.migration.migrate_base import MigrateBase
class UpdateSequences(MigrateBase):
sequences = [
('guidebook', 'documents_archives', 'id', 'documents_archives_id_seq'),
('guidebook', 'documents', 'document_id', 'documents_document_id_seq'),
... | from sqlalchemy.sql import text
from c2corg_api.scripts.migration.migrate_base import MigrateBase
class UpdateSequences(MigrateBase):
sequences = [
('guidebook', 'documents_archives', 'id', 'documents_archives_id_seq'),
('guidebook', 'documents', 'document_id', 'documents_document_id_seq'),
... | <commit_before>from sqlalchemy.sql import text
from c2corg_api.scripts.migration.migrate_base import MigrateBase
class UpdateSequences(MigrateBase):
sequences = [
('guidebook', 'documents_archives', 'id', 'documents_archives_id_seq'),
('guidebook', 'documents', 'document_id', 'documents_document_i... |
0e0f61edd95bef03a470ae4717d5d4e390011ae3 | chatterbot/ext/django_chatterbot/views.py | chatterbot/ext/django_chatterbot/views.py | from django.views.generic import View
from django.http import JsonResponse
from chatterbot import ChatBot
from chatterbot.ext.django_chatterbot import settings
class ChatterBotView(View):
chatterbot = ChatBot(**settings.CHATTERBOT)
def post(self, request, *args, **kwargs):
input_statement = request.... | from django.views.generic import View
from django.http import JsonResponse
from chatterbot import ChatBot
from chatterbot.ext.django_chatterbot import settings
import json
class ChatterBotView(View):
chatterbot = ChatBot(**settings.CHATTERBOT)
def _serialize_recent_statements(self):
if self.chatterb... | Return recent statement data in GET response. | Return recent statement data in GET response.
| Python | bsd-3-clause | Reinaesaya/OUIRL-ChatBot,Gustavo6046/ChatterBot,davizucon/ChatterBot,vkosuri/ChatterBot,Reinaesaya/OUIRL-ChatBot,maclogan/VirtualPenPal,gunthercox/ChatterBot | from django.views.generic import View
from django.http import JsonResponse
from chatterbot import ChatBot
from chatterbot.ext.django_chatterbot import settings
class ChatterBotView(View):
chatterbot = ChatBot(**settings.CHATTERBOT)
def post(self, request, *args, **kwargs):
input_statement = request.... | from django.views.generic import View
from django.http import JsonResponse
from chatterbot import ChatBot
from chatterbot.ext.django_chatterbot import settings
import json
class ChatterBotView(View):
chatterbot = ChatBot(**settings.CHATTERBOT)
def _serialize_recent_statements(self):
if self.chatterb... | <commit_before>from django.views.generic import View
from django.http import JsonResponse
from chatterbot import ChatBot
from chatterbot.ext.django_chatterbot import settings
class ChatterBotView(View):
chatterbot = ChatBot(**settings.CHATTERBOT)
def post(self, request, *args, **kwargs):
input_state... | from django.views.generic import View
from django.http import JsonResponse
from chatterbot import ChatBot
from chatterbot.ext.django_chatterbot import settings
import json
class ChatterBotView(View):
chatterbot = ChatBot(**settings.CHATTERBOT)
def _serialize_recent_statements(self):
if self.chatterb... | from django.views.generic import View
from django.http import JsonResponse
from chatterbot import ChatBot
from chatterbot.ext.django_chatterbot import settings
class ChatterBotView(View):
chatterbot = ChatBot(**settings.CHATTERBOT)
def post(self, request, *args, **kwargs):
input_statement = request.... | <commit_before>from django.views.generic import View
from django.http import JsonResponse
from chatterbot import ChatBot
from chatterbot.ext.django_chatterbot import settings
class ChatterBotView(View):
chatterbot = ChatBot(**settings.CHATTERBOT)
def post(self, request, *args, **kwargs):
input_state... |
e739771d18177e482fb9b3e2aa084e28a11680b5 | run_tests.py | run_tests.py | import unittest
def main(): # pragma: no cover
test_suite = unittest.TestLoader().discover('tests/')
results = unittest.TextTestRunner(verbosity=1).run(test_suite)
if results.errors or results.failures:
exit(1)
else:
exit(0)
if __name__ == '__main__':
main()
| #!/usr/bin/env python3
import unittest
def main(): # pragma: no cover
test_suite = unittest.TestLoader().discover('tests/')
results = unittest.TextTestRunner(verbosity=1).run(test_suite)
if results.errors or results.failures:
exit(1)
else:
exit(0)
if __name__ == '__main__':
main(... | Allow run-test.py to be launched by './run-test.py' command. | Allow run-test.py to be launched by './run-test.py' command.
| Python | mit | ProjetPP/PPP-QuestionParsing-ML-Standalone,ProjetPP/PPP-QuestionParsing-ML-Standalone | import unittest
def main(): # pragma: no cover
test_suite = unittest.TestLoader().discover('tests/')
results = unittest.TextTestRunner(verbosity=1).run(test_suite)
if results.errors or results.failures:
exit(1)
else:
exit(0)
if __name__ == '__main__':
main()
Allow run-test.py to b... | #!/usr/bin/env python3
import unittest
def main(): # pragma: no cover
test_suite = unittest.TestLoader().discover('tests/')
results = unittest.TextTestRunner(verbosity=1).run(test_suite)
if results.errors or results.failures:
exit(1)
else:
exit(0)
if __name__ == '__main__':
main(... | <commit_before>import unittest
def main(): # pragma: no cover
test_suite = unittest.TestLoader().discover('tests/')
results = unittest.TextTestRunner(verbosity=1).run(test_suite)
if results.errors or results.failures:
exit(1)
else:
exit(0)
if __name__ == '__main__':
main()
<commit... | #!/usr/bin/env python3
import unittest
def main(): # pragma: no cover
test_suite = unittest.TestLoader().discover('tests/')
results = unittest.TextTestRunner(verbosity=1).run(test_suite)
if results.errors or results.failures:
exit(1)
else:
exit(0)
if __name__ == '__main__':
main(... | import unittest
def main(): # pragma: no cover
test_suite = unittest.TestLoader().discover('tests/')
results = unittest.TextTestRunner(verbosity=1).run(test_suite)
if results.errors or results.failures:
exit(1)
else:
exit(0)
if __name__ == '__main__':
main()
Allow run-test.py to b... | <commit_before>import unittest
def main(): # pragma: no cover
test_suite = unittest.TestLoader().discover('tests/')
results = unittest.TextTestRunner(verbosity=1).run(test_suite)
if results.errors or results.failures:
exit(1)
else:
exit(0)
if __name__ == '__main__':
main()
<commit... |
5f601f742f7a63a1a504e9af3fca61df9deb4707 | util.py | util.py |
def topological_sort(start_nodes, dependencies):
"""
Return a topologically sorted list of :param:`start_nodes` and
:param:`dependencies`.
Nodes are checked on identity, not equality.
Raises a ValueError if no topological sort is possible.
:param start_nodes: list of nodes of graph with no i... |
def topological_sort(start_nodes, dependencies):
"""
Return a topologically sorted list of :param:`start_nodes` and
:param:`dependencies`.
Nodes are checked on identity, not equality.
Raises a ValueError if no topological sort is possible.
:param start_nodes: sequence of nodes of graph with ... | Fix documentation of top sort. | Fix documentation of top sort.
Change wording from list to sequence and include note about how to
specify no dependencies.
Signed-off-by: Michael Markert <5eb998b7ac86da375651a4cd767b88c9dad25896@googlemail.com>
| Python | mit | fhirschmann/penchy,fhirschmann/penchy |
def topological_sort(start_nodes, dependencies):
"""
Return a topologically sorted list of :param:`start_nodes` and
:param:`dependencies`.
Nodes are checked on identity, not equality.
Raises a ValueError if no topological sort is possible.
:param start_nodes: list of nodes of graph with no i... |
def topological_sort(start_nodes, dependencies):
"""
Return a topologically sorted list of :param:`start_nodes` and
:param:`dependencies`.
Nodes are checked on identity, not equality.
Raises a ValueError if no topological sort is possible.
:param start_nodes: sequence of nodes of graph with ... | <commit_before>
def topological_sort(start_nodes, dependencies):
"""
Return a topologically sorted list of :param:`start_nodes` and
:param:`dependencies`.
Nodes are checked on identity, not equality.
Raises a ValueError if no topological sort is possible.
:param start_nodes: list of nodes of ... |
def topological_sort(start_nodes, dependencies):
"""
Return a topologically sorted list of :param:`start_nodes` and
:param:`dependencies`.
Nodes are checked on identity, not equality.
Raises a ValueError if no topological sort is possible.
:param start_nodes: sequence of nodes of graph with ... |
def topological_sort(start_nodes, dependencies):
"""
Return a topologically sorted list of :param:`start_nodes` and
:param:`dependencies`.
Nodes are checked on identity, not equality.
Raises a ValueError if no topological sort is possible.
:param start_nodes: list of nodes of graph with no i... | <commit_before>
def topological_sort(start_nodes, dependencies):
"""
Return a topologically sorted list of :param:`start_nodes` and
:param:`dependencies`.
Nodes are checked on identity, not equality.
Raises a ValueError if no topological sort is possible.
:param start_nodes: list of nodes of ... |
b444113a3bb71f30cfd61043e026674cc09f5a94 | app/__init__.py | app/__init__.py | from flask import Flask
from flask_login import LoginManager
from flask_misaka import Misaka
from flask_moment import Moment
from flask_security import Security, SQLAlchemyUserDatastore
from flask_sqlalchemy import SQLAlchemy
from flask_whooshalchemy import whoosh_index
from config import config
db = SQLAlchemy()
lm ... | from flask import Flask
from flask_login import LoginManager
from flask_misaka import Misaka
from flask_moment import Moment
from flask_security import Security, SQLAlchemyUserDatastore
from flask_sqlalchemy import SQLAlchemy
from flask_whooshalchemy import whoosh_index
from config import config
db = SQLAlchemy()
lm ... | Add AppSettings dict to app config and inject it | Add AppSettings dict to app config and inject it
| Python | mit | Encrylize/flask-blogger,Encrylize/flask-blogger,Encrylize/flask-blogger | from flask import Flask
from flask_login import LoginManager
from flask_misaka import Misaka
from flask_moment import Moment
from flask_security import Security, SQLAlchemyUserDatastore
from flask_sqlalchemy import SQLAlchemy
from flask_whooshalchemy import whoosh_index
from config import config
db = SQLAlchemy()
lm ... | from flask import Flask
from flask_login import LoginManager
from flask_misaka import Misaka
from flask_moment import Moment
from flask_security import Security, SQLAlchemyUserDatastore
from flask_sqlalchemy import SQLAlchemy
from flask_whooshalchemy import whoosh_index
from config import config
db = SQLAlchemy()
lm ... | <commit_before>from flask import Flask
from flask_login import LoginManager
from flask_misaka import Misaka
from flask_moment import Moment
from flask_security import Security, SQLAlchemyUserDatastore
from flask_sqlalchemy import SQLAlchemy
from flask_whooshalchemy import whoosh_index
from config import config
db = S... | from flask import Flask
from flask_login import LoginManager
from flask_misaka import Misaka
from flask_moment import Moment
from flask_security import Security, SQLAlchemyUserDatastore
from flask_sqlalchemy import SQLAlchemy
from flask_whooshalchemy import whoosh_index
from config import config
db = SQLAlchemy()
lm ... | from flask import Flask
from flask_login import LoginManager
from flask_misaka import Misaka
from flask_moment import Moment
from flask_security import Security, SQLAlchemyUserDatastore
from flask_sqlalchemy import SQLAlchemy
from flask_whooshalchemy import whoosh_index
from config import config
db = SQLAlchemy()
lm ... | <commit_before>from flask import Flask
from flask_login import LoginManager
from flask_misaka import Misaka
from flask_moment import Moment
from flask_security import Security, SQLAlchemyUserDatastore
from flask_sqlalchemy import SQLAlchemy
from flask_whooshalchemy import whoosh_index
from config import config
db = S... |
849a4e5daf2eb845213ea76179d7a8143148f39a | lib/mixins.py | lib/mixins.py | class Countable(object):
@classmethod
def count(cls, options={}):
return int(cls.get("count", **options))
class Metafields(object):
def metafields(self):
return Metafield.find(resource=self.__class__.plural, resource_id=self.id)
def add_metafield(self, metafield):
if self.is_n... | class Countable(object):
@classmethod
def count(cls, _options=None, **kwargs):
if _options is None:
_options = kwargs
return int(cls.get("count", **_options))
class Metafields(object):
def metafields(self):
return Metafield.find(resource=self.__class__.plural, resource_... | Allow count method to be used the same way as find. | Allow count method to be used the same way as find.
| Python | mit | varesa/shopify_python_api,metric-collective/shopify_python_api,gavinballard/shopify_python_api,asiviero/shopify_python_api,ifnull/shopify_python_api,Shopify/shopify_python_api,SmileyJames/shopify_python_api | class Countable(object):
@classmethod
def count(cls, options={}):
return int(cls.get("count", **options))
class Metafields(object):
def metafields(self):
return Metafield.find(resource=self.__class__.plural, resource_id=self.id)
def add_metafield(self, metafield):
if self.is_n... | class Countable(object):
@classmethod
def count(cls, _options=None, **kwargs):
if _options is None:
_options = kwargs
return int(cls.get("count", **_options))
class Metafields(object):
def metafields(self):
return Metafield.find(resource=self.__class__.plural, resource_... | <commit_before>class Countable(object):
@classmethod
def count(cls, options={}):
return int(cls.get("count", **options))
class Metafields(object):
def metafields(self):
return Metafield.find(resource=self.__class__.plural, resource_id=self.id)
def add_metafield(self, metafield):
... | class Countable(object):
@classmethod
def count(cls, _options=None, **kwargs):
if _options is None:
_options = kwargs
return int(cls.get("count", **_options))
class Metafields(object):
def metafields(self):
return Metafield.find(resource=self.__class__.plural, resource_... | class Countable(object):
@classmethod
def count(cls, options={}):
return int(cls.get("count", **options))
class Metafields(object):
def metafields(self):
return Metafield.find(resource=self.__class__.plural, resource_id=self.id)
def add_metafield(self, metafield):
if self.is_n... | <commit_before>class Countable(object):
@classmethod
def count(cls, options={}):
return int(cls.get("count", **options))
class Metafields(object):
def metafields(self):
return Metafield.find(resource=self.__class__.plural, resource_id=self.id)
def add_metafield(self, metafield):
... |
1efdb6034fbf04cd41c4575b09b2e9da1a08eddc | redash/cli/database.py | redash/cli/database.py | from flask.cli import AppGroup
from flask_migrate import stamp
manager = AppGroup(help="Manage the database (create/drop tables).")
@manager.command()
def create_tables():
"""Create the database tables."""
from redash.models import db
db.create_all()
# Need to mark current DB as up to date
stamp(... | import time
from flask.cli import AppGroup
from flask_migrate import stamp
from sqlalchemy.exc import DatabaseError
manager = AppGroup(help="Manage the database (create/drop tables).")
def _wait_for_db_connection(db):
retried = False
while not retried:
try:
db.engine.execute('SELECT 1;')... | Fix connection error when you run "create_tables" | Fix connection error when you run "create_tables"
| Python | bsd-2-clause | chriszs/redash,denisov-vlad/redash,denisov-vlad/redash,denisov-vlad/redash,moritz9/redash,44px/redash,alexanderlz/redash,getredash/redash,alexanderlz/redash,moritz9/redash,alexanderlz/redash,44px/redash,moritz9/redash,moritz9/redash,44px/redash,denisov-vlad/redash,chriszs/redash,getredash/redash,getredash/redash,44px/r... | from flask.cli import AppGroup
from flask_migrate import stamp
manager = AppGroup(help="Manage the database (create/drop tables).")
@manager.command()
def create_tables():
"""Create the database tables."""
from redash.models import db
db.create_all()
# Need to mark current DB as up to date
stamp(... | import time
from flask.cli import AppGroup
from flask_migrate import stamp
from sqlalchemy.exc import DatabaseError
manager = AppGroup(help="Manage the database (create/drop tables).")
def _wait_for_db_connection(db):
retried = False
while not retried:
try:
db.engine.execute('SELECT 1;')... | <commit_before>from flask.cli import AppGroup
from flask_migrate import stamp
manager = AppGroup(help="Manage the database (create/drop tables).")
@manager.command()
def create_tables():
"""Create the database tables."""
from redash.models import db
db.create_all()
# Need to mark current DB as up to ... | import time
from flask.cli import AppGroup
from flask_migrate import stamp
from sqlalchemy.exc import DatabaseError
manager = AppGroup(help="Manage the database (create/drop tables).")
def _wait_for_db_connection(db):
retried = False
while not retried:
try:
db.engine.execute('SELECT 1;')... | from flask.cli import AppGroup
from flask_migrate import stamp
manager = AppGroup(help="Manage the database (create/drop tables).")
@manager.command()
def create_tables():
"""Create the database tables."""
from redash.models import db
db.create_all()
# Need to mark current DB as up to date
stamp(... | <commit_before>from flask.cli import AppGroup
from flask_migrate import stamp
manager = AppGroup(help="Manage the database (create/drop tables).")
@manager.command()
def create_tables():
"""Create the database tables."""
from redash.models import db
db.create_all()
# Need to mark current DB as up to ... |
48ded0ea4def623884d5709768c87e19de279479 | modules/mod_nsfw.py | modules/mod_nsfw.py | from modules.module_base import ModuleBase
from tools.nsfw import Nsfw
class ModuleNSFW(ModuleBase):
def __init__(self, bot):
ModuleBase.__init__(self, bot)
self.name = "NSFW"
self.nsfw = Nsfw(self.logger)
def notify_command(self, message_id, from_attr, date, chat, commandName, comman... | from modules.module_base import ModuleBase
from tools.nsfw import Nsfw
class ModuleNSFW(ModuleBase):
def __init__(self, bot):
ModuleBase.__init__(self, bot)
self.name = "NSFW"
self.nsfw = Nsfw(self.logger)
def notify_command(self, message_id, from_attr, date, chat, commandName, comman... | Fix bot infinte image loop | Fix bot infinte image loop
| Python | mit | mamaddeveloper/teleadmin,mamaddeveloper/telegrambot,mamaddeveloper/teleadmin,mamaddeveloper/telegrambot | from modules.module_base import ModuleBase
from tools.nsfw import Nsfw
class ModuleNSFW(ModuleBase):
def __init__(self, bot):
ModuleBase.__init__(self, bot)
self.name = "NSFW"
self.nsfw = Nsfw(self.logger)
def notify_command(self, message_id, from_attr, date, chat, commandName, comman... | from modules.module_base import ModuleBase
from tools.nsfw import Nsfw
class ModuleNSFW(ModuleBase):
def __init__(self, bot):
ModuleBase.__init__(self, bot)
self.name = "NSFW"
self.nsfw = Nsfw(self.logger)
def notify_command(self, message_id, from_attr, date, chat, commandName, comman... | <commit_before>from modules.module_base import ModuleBase
from tools.nsfw import Nsfw
class ModuleNSFW(ModuleBase):
def __init__(self, bot):
ModuleBase.__init__(self, bot)
self.name = "NSFW"
self.nsfw = Nsfw(self.logger)
def notify_command(self, message_id, from_attr, date, chat, comm... | from modules.module_base import ModuleBase
from tools.nsfw import Nsfw
class ModuleNSFW(ModuleBase):
def __init__(self, bot):
ModuleBase.__init__(self, bot)
self.name = "NSFW"
self.nsfw = Nsfw(self.logger)
def notify_command(self, message_id, from_attr, date, chat, commandName, comman... | from modules.module_base import ModuleBase
from tools.nsfw import Nsfw
class ModuleNSFW(ModuleBase):
def __init__(self, bot):
ModuleBase.__init__(self, bot)
self.name = "NSFW"
self.nsfw = Nsfw(self.logger)
def notify_command(self, message_id, from_attr, date, chat, commandName, comman... | <commit_before>from modules.module_base import ModuleBase
from tools.nsfw import Nsfw
class ModuleNSFW(ModuleBase):
def __init__(self, bot):
ModuleBase.__init__(self, bot)
self.name = "NSFW"
self.nsfw = Nsfw(self.logger)
def notify_command(self, message_id, from_attr, date, chat, comm... |
2431ce65da38d50c83f2f23b55dab64a6b4c0b89 | boxsdk/object/__init__.py | boxsdk/object/__init__.py | # coding: utf-8
from __future__ import unicode_literals
import six
__all__ = [
'collaboration',
'events',
'file',
'folder',
'group',
'group_membership',
'search',
'user',
]
if six.PY2:
__all__ = [unicode.encode(x, 'utf-8') for x in __all__]
| # coding: utf-8
from __future__ import unicode_literals
from six.moves import map # pylint:disable=redefined-builtin
__all__ = list(map(str, ['collaboration', 'events', 'file', 'folder', 'group', 'group_membership', 'search', 'user']))
| Change format of sub-module names in the object module to str | Change format of sub-module names in the object module to str
| Python | apache-2.0 | box/box-python-sdk | # coding: utf-8
from __future__ import unicode_literals
import six
__all__ = [
'collaboration',
'events',
'file',
'folder',
'group',
'group_membership',
'search',
'user',
]
if six.PY2:
__all__ = [unicode.encode(x, 'utf-8') for x in __all__]
Change format of sub-module names in t... | # coding: utf-8
from __future__ import unicode_literals
from six.moves import map # pylint:disable=redefined-builtin
__all__ = list(map(str, ['collaboration', 'events', 'file', 'folder', 'group', 'group_membership', 'search', 'user']))
| <commit_before># coding: utf-8
from __future__ import unicode_literals
import six
__all__ = [
'collaboration',
'events',
'file',
'folder',
'group',
'group_membership',
'search',
'user',
]
if six.PY2:
__all__ = [unicode.encode(x, 'utf-8') for x in __all__]
<commit_msg>Change form... | # coding: utf-8
from __future__ import unicode_literals
from six.moves import map # pylint:disable=redefined-builtin
__all__ = list(map(str, ['collaboration', 'events', 'file', 'folder', 'group', 'group_membership', 'search', 'user']))
| # coding: utf-8
from __future__ import unicode_literals
import six
__all__ = [
'collaboration',
'events',
'file',
'folder',
'group',
'group_membership',
'search',
'user',
]
if six.PY2:
__all__ = [unicode.encode(x, 'utf-8') for x in __all__]
Change format of sub-module names in t... | <commit_before># coding: utf-8
from __future__ import unicode_literals
import six
__all__ = [
'collaboration',
'events',
'file',
'folder',
'group',
'group_membership',
'search',
'user',
]
if six.PY2:
__all__ = [unicode.encode(x, 'utf-8') for x in __all__]
<commit_msg>Change form... |
3b8c76aaee54e0d49656f640c3f18d2a6c6fbe13 | tests/test_api.py | tests/test_api.py | """Tests the isort API module"""
import pytest
from isort import api, exceptions
def test_sort_file_invalid_syntax(tmpdir) -> None:
"""Test to ensure file encoding is respected"""
tmp_file = tmpdir.join(f"test_bad_syntax.py")
tmp_file.write_text("""print('mismathing quotes")""", "utf8")
with pytest.w... | """Tests the isort API module"""
import pytest
from isort import api, exceptions
def test_sort_file_invalid_syntax(tmpdir) -> None:
"""Test to ensure file encoding is respected"""
tmp_file = tmpdir.join(f"test_bad_syntax.py")
tmp_file.write_text("""print('mismathing quotes")""", "utf8")
with pytest.w... | Add initial check file check | Add initial check file check
| Python | mit | PyCQA/isort,PyCQA/isort | """Tests the isort API module"""
import pytest
from isort import api, exceptions
def test_sort_file_invalid_syntax(tmpdir) -> None:
"""Test to ensure file encoding is respected"""
tmp_file = tmpdir.join(f"test_bad_syntax.py")
tmp_file.write_text("""print('mismathing quotes")""", "utf8")
with pytest.w... | """Tests the isort API module"""
import pytest
from isort import api, exceptions
def test_sort_file_invalid_syntax(tmpdir) -> None:
"""Test to ensure file encoding is respected"""
tmp_file = tmpdir.join(f"test_bad_syntax.py")
tmp_file.write_text("""print('mismathing quotes")""", "utf8")
with pytest.w... | <commit_before>"""Tests the isort API module"""
import pytest
from isort import api, exceptions
def test_sort_file_invalid_syntax(tmpdir) -> None:
"""Test to ensure file encoding is respected"""
tmp_file = tmpdir.join(f"test_bad_syntax.py")
tmp_file.write_text("""print('mismathing quotes")""", "utf8")
... | """Tests the isort API module"""
import pytest
from isort import api, exceptions
def test_sort_file_invalid_syntax(tmpdir) -> None:
"""Test to ensure file encoding is respected"""
tmp_file = tmpdir.join(f"test_bad_syntax.py")
tmp_file.write_text("""print('mismathing quotes")""", "utf8")
with pytest.w... | """Tests the isort API module"""
import pytest
from isort import api, exceptions
def test_sort_file_invalid_syntax(tmpdir) -> None:
"""Test to ensure file encoding is respected"""
tmp_file = tmpdir.join(f"test_bad_syntax.py")
tmp_file.write_text("""print('mismathing quotes")""", "utf8")
with pytest.w... | <commit_before>"""Tests the isort API module"""
import pytest
from isort import api, exceptions
def test_sort_file_invalid_syntax(tmpdir) -> None:
"""Test to ensure file encoding is respected"""
tmp_file = tmpdir.join(f"test_bad_syntax.py")
tmp_file.write_text("""print('mismathing quotes")""", "utf8")
... |
1e64e4f5c584ffaf88cc419765e408cc725f0c19 | models.py | models.py | #!/usr/bin/env python3
from enum import Enum
class LineChange:
class ChangeType(Enum):
added = 1
deleted = 2
modified = 3
def __init__(self, number=None, change_type=None, filename=None, commit=None):
self.number = number
self.change_type = change_type
... | #!/usr/bin/env python3
from enum import Enum
class LineChange:
class ChangeType(Enum):
added = 1
deleted = 2
modified = 3
def __init__(self, line_number=None, change_type=None, file_path=None, commit_sha=None):
self.line_number = line_number
self.change_type = change_... | Add equlaity comparisons to LineChange class. | Add equlaity comparisons to LineChange class.
| Python | mit | chrisma/marvin,chrisma/marvin | #!/usr/bin/env python3
from enum import Enum
class LineChange:
class ChangeType(Enum):
added = 1
deleted = 2
modified = 3
def __init__(self, number=None, change_type=None, filename=None, commit=None):
self.number = number
self.change_type = change_type
... | #!/usr/bin/env python3
from enum import Enum
class LineChange:
class ChangeType(Enum):
added = 1
deleted = 2
modified = 3
def __init__(self, line_number=None, change_type=None, file_path=None, commit_sha=None):
self.line_number = line_number
self.change_type = change_... | <commit_before>#!/usr/bin/env python3
from enum import Enum
class LineChange:
class ChangeType(Enum):
added = 1
deleted = 2
modified = 3
def __init__(self, number=None, change_type=None, filename=None, commit=None):
self.number = number
self.change_type = ... | #!/usr/bin/env python3
from enum import Enum
class LineChange:
class ChangeType(Enum):
added = 1
deleted = 2
modified = 3
def __init__(self, line_number=None, change_type=None, file_path=None, commit_sha=None):
self.line_number = line_number
self.change_type = change_... | #!/usr/bin/env python3
from enum import Enum
class LineChange:
class ChangeType(Enum):
added = 1
deleted = 2
modified = 3
def __init__(self, number=None, change_type=None, filename=None, commit=None):
self.number = number
self.change_type = change_type
... | <commit_before>#!/usr/bin/env python3
from enum import Enum
class LineChange:
class ChangeType(Enum):
added = 1
deleted = 2
modified = 3
def __init__(self, number=None, change_type=None, filename=None, commit=None):
self.number = number
self.change_type = ... |
a19e8785e0a13dc854ab626af00144585f946828 | models.py | models.py | class Color(object):
def __init__(self, r, g, b):
self.r = r
self.g = g
self.b = b
class Line(object):
def __init__(self, name, api_code, bg_color, fg_color):
self.name = name
self.api_code = api_code
self.bg_color = bg_color
self.fg_color = fg_color
... | class Color(object):
def __init__(self, r, g, b):
self.r = r
self.g = g
self.b = b
class Line(object):
def __init__(self, name, api_code, bg_color, fg_color):
self.name = name
self.api_code = api_code
self.bg_color = bg_color
self.fg_color = fg_color
... | Make Station.lines into a property | Make Station.lines into a property
| Python | mit | kirberich/tube_status | class Color(object):
def __init__(self, r, g, b):
self.r = r
self.g = g
self.b = b
class Line(object):
def __init__(self, name, api_code, bg_color, fg_color):
self.name = name
self.api_code = api_code
self.bg_color = bg_color
self.fg_color = fg_color
... | class Color(object):
def __init__(self, r, g, b):
self.r = r
self.g = g
self.b = b
class Line(object):
def __init__(self, name, api_code, bg_color, fg_color):
self.name = name
self.api_code = api_code
self.bg_color = bg_color
self.fg_color = fg_color
... | <commit_before>class Color(object):
def __init__(self, r, g, b):
self.r = r
self.g = g
self.b = b
class Line(object):
def __init__(self, name, api_code, bg_color, fg_color):
self.name = name
self.api_code = api_code
self.bg_color = bg_color
self.fg_color... | class Color(object):
def __init__(self, r, g, b):
self.r = r
self.g = g
self.b = b
class Line(object):
def __init__(self, name, api_code, bg_color, fg_color):
self.name = name
self.api_code = api_code
self.bg_color = bg_color
self.fg_color = fg_color
... | class Color(object):
def __init__(self, r, g, b):
self.r = r
self.g = g
self.b = b
class Line(object):
def __init__(self, name, api_code, bg_color, fg_color):
self.name = name
self.api_code = api_code
self.bg_color = bg_color
self.fg_color = fg_color
... | <commit_before>class Color(object):
def __init__(self, r, g, b):
self.r = r
self.g = g
self.b = b
class Line(object):
def __init__(self, name, api_code, bg_color, fg_color):
self.name = name
self.api_code = api_code
self.bg_color = bg_color
self.fg_color... |
d3925a1577476c6754e0d5e9fdb6927d2ee78396 | tests/test_ec2.py | tests/test_ec2.py | import unittest
import logging
import types
import time
from util import EC2
class TestEC2(unittest.TestCase):
def test_metadata(self):
# Skip this step on travis
if os.environ.get('TRAVIS', False): return
# Test gathering metadata from ec2
start = time.time()
d = EC2.get_... | import unittest
import os
import types
import time
from util import EC2
class TestEC2(unittest.TestCase):
def test_metadata(self):
# Skip this step on travis
if os.environ.get('TRAVIS', False): return
# Test gathering metadata from ec2
start = time.time()
d = EC2.get_metad... | Add missing import to test to fix travis | Add missing import to test to fix travis
| Python | bsd-3-clause | packetloop/dd-agent,oneandoneis2/dd-agent,brettlangdon/dd-agent,cberry777/dd-agent,polynomial/dd-agent,AniruddhaSAtre/dd-agent,Wattpad/dd-agent,oneandoneis2/dd-agent,truthbk/dd-agent,packetloop/dd-agent,zendesk/dd-agent,jamesandariese/dd-agent,joelvanvelden/dd-agent,jvassev/dd-agent,polynomial/dd-agent,huhongbo/dd-agen... | import unittest
import logging
import types
import time
from util import EC2
class TestEC2(unittest.TestCase):
def test_metadata(self):
# Skip this step on travis
if os.environ.get('TRAVIS', False): return
# Test gathering metadata from ec2
start = time.time()
d = EC2.get_... | import unittest
import os
import types
import time
from util import EC2
class TestEC2(unittest.TestCase):
def test_metadata(self):
# Skip this step on travis
if os.environ.get('TRAVIS', False): return
# Test gathering metadata from ec2
start = time.time()
d = EC2.get_metad... | <commit_before>import unittest
import logging
import types
import time
from util import EC2
class TestEC2(unittest.TestCase):
def test_metadata(self):
# Skip this step on travis
if os.environ.get('TRAVIS', False): return
# Test gathering metadata from ec2
start = time.time()
... | import unittest
import os
import types
import time
from util import EC2
class TestEC2(unittest.TestCase):
def test_metadata(self):
# Skip this step on travis
if os.environ.get('TRAVIS', False): return
# Test gathering metadata from ec2
start = time.time()
d = EC2.get_metad... | import unittest
import logging
import types
import time
from util import EC2
class TestEC2(unittest.TestCase):
def test_metadata(self):
# Skip this step on travis
if os.environ.get('TRAVIS', False): return
# Test gathering metadata from ec2
start = time.time()
d = EC2.get_... | <commit_before>import unittest
import logging
import types
import time
from util import EC2
class TestEC2(unittest.TestCase):
def test_metadata(self):
# Skip this step on travis
if os.environ.get('TRAVIS', False): return
# Test gathering metadata from ec2
start = time.time()
... |
50224b985a2215b8598f274efd33fc5c20054417 | tests/test_str.py | tests/test_str.py | import pytest
from hypothesis import given
from hypothesis.strategies import lists, text
from datatyping.datatyping import validate
@given(ss=lists(text()))
def test_simple(ss):
assert validate([str], ss) is None
@given(s=text())
def test_simple_error(s):
with pytest.raises(TypeError):
validate([str... | import pytest
from hypothesis import given
from hypothesis.strategies import integers, text
from datatyping.datatyping import validate
@given(string=text())
def test_simple(string):
assert validate(str, string) is None
@given(not_string=integers())
def test_simple_error(not_string):
with pytest.raises(Type... | Rewrite str tests with hypothesis Remove lists from testing | Rewrite str tests with hypothesis
Remove lists from testing
| Python | mit | Zaab1t/datatyping | import pytest
from hypothesis import given
from hypothesis.strategies import lists, text
from datatyping.datatyping import validate
@given(ss=lists(text()))
def test_simple(ss):
assert validate([str], ss) is None
@given(s=text())
def test_simple_error(s):
with pytest.raises(TypeError):
validate([str... | import pytest
from hypothesis import given
from hypothesis.strategies import integers, text
from datatyping.datatyping import validate
@given(string=text())
def test_simple(string):
assert validate(str, string) is None
@given(not_string=integers())
def test_simple_error(not_string):
with pytest.raises(Type... | <commit_before>import pytest
from hypothesis import given
from hypothesis.strategies import lists, text
from datatyping.datatyping import validate
@given(ss=lists(text()))
def test_simple(ss):
assert validate([str], ss) is None
@given(s=text())
def test_simple_error(s):
with pytest.raises(TypeError):
... | import pytest
from hypothesis import given
from hypothesis.strategies import integers, text
from datatyping.datatyping import validate
@given(string=text())
def test_simple(string):
assert validate(str, string) is None
@given(not_string=integers())
def test_simple_error(not_string):
with pytest.raises(Type... | import pytest
from hypothesis import given
from hypothesis.strategies import lists, text
from datatyping.datatyping import validate
@given(ss=lists(text()))
def test_simple(ss):
assert validate([str], ss) is None
@given(s=text())
def test_simple_error(s):
with pytest.raises(TypeError):
validate([str... | <commit_before>import pytest
from hypothesis import given
from hypothesis.strategies import lists, text
from datatyping.datatyping import validate
@given(ss=lists(text()))
def test_simple(ss):
assert validate([str], ss) is None
@given(s=text())
def test_simple_error(s):
with pytest.raises(TypeError):
... |
5f8befe38592c75464cf03f698123d5e9f6606b8 | src/tutorials/code/python/chat/1.py | src/tutorials/code/python/chat/1.py | # Address of the beam website.
# No trailing slash.
beam_addr = 'https://beam.pro'
# Username of the account.
username = 'username'
# Password of the account.
password = 'password'
# The id of the channel you want to connect to.
channel = 12345
| # Address of the beam website.
# No trailing slash.
BEAM_ADDR = 'https://beam.pro'
# Username of the account.
USERNAME = 'username'
# Password of the account.
PASSWORD = 'password'
# The id of the channel you want to connect to.
CHANNEL = 12345
| FIx broken Python code in chat bot tutorial | FIx broken Python code in chat bot tutorial
| Python | mit | WatchBeam/developers,WatchBeam/developers,WatchBeam/developers,WatchBeam/developers,WatchBeam/developers | # Address of the beam website.
# No trailing slash.
beam_addr = 'https://beam.pro'
# Username of the account.
username = 'username'
# Password of the account.
password = 'password'
# The id of the channel you want to connect to.
channel = 12345
FIx broken Python code in chat bot tutorial | # Address of the beam website.
# No trailing slash.
BEAM_ADDR = 'https://beam.pro'
# Username of the account.
USERNAME = 'username'
# Password of the account.
PASSWORD = 'password'
# The id of the channel you want to connect to.
CHANNEL = 12345
| <commit_before># Address of the beam website.
# No trailing slash.
beam_addr = 'https://beam.pro'
# Username of the account.
username = 'username'
# Password of the account.
password = 'password'
# The id of the channel you want to connect to.
channel = 12345
<commit_msg>FIx broken Python code in chat bot tutorial<c... | # Address of the beam website.
# No trailing slash.
BEAM_ADDR = 'https://beam.pro'
# Username of the account.
USERNAME = 'username'
# Password of the account.
PASSWORD = 'password'
# The id of the channel you want to connect to.
CHANNEL = 12345
| # Address of the beam website.
# No trailing slash.
beam_addr = 'https://beam.pro'
# Username of the account.
username = 'username'
# Password of the account.
password = 'password'
# The id of the channel you want to connect to.
channel = 12345
FIx broken Python code in chat bot tutorial# Address of the beam website... | <commit_before># Address of the beam website.
# No trailing slash.
beam_addr = 'https://beam.pro'
# Username of the account.
username = 'username'
# Password of the account.
password = 'password'
# The id of the channel you want to connect to.
channel = 12345
<commit_msg>FIx broken Python code in chat bot tutorial<c... |
f0118092290355b486ed1c524c7f41cdb7c5697e | server.py | server.py | from PodSixNet.Channel import Channel
from PodSixNet.Server import Server
from time import sleep
#Create the channel to deal with our incoming requests from the client
#A new channel is created every time a client connects
class ClientChannel(Channel):
#Create a function that will respond to every request from t... | from PodSixNet.Channel import Channel
from PodSixNet.Server import Server
from time import sleep
#Create the channel to deal with our incoming requests from the client
#A new channel is created every time a client connects
class ClientChannel(Channel):
#Create a function that will respond to every request from t... | Create a game class to store information about an instantiated game object | Create a game class to store information about an instantiated game object
| Python | mit | thebillington/pygame_multiplayer_server | from PodSixNet.Channel import Channel
from PodSixNet.Server import Server
from time import sleep
#Create the channel to deal with our incoming requests from the client
#A new channel is created every time a client connects
class ClientChannel(Channel):
#Create a function that will respond to every request from t... | from PodSixNet.Channel import Channel
from PodSixNet.Server import Server
from time import sleep
#Create the channel to deal with our incoming requests from the client
#A new channel is created every time a client connects
class ClientChannel(Channel):
#Create a function that will respond to every request from t... | <commit_before>from PodSixNet.Channel import Channel
from PodSixNet.Server import Server
from time import sleep
#Create the channel to deal with our incoming requests from the client
#A new channel is created every time a client connects
class ClientChannel(Channel):
#Create a function that will respond to every... | from PodSixNet.Channel import Channel
from PodSixNet.Server import Server
from time import sleep
#Create the channel to deal with our incoming requests from the client
#A new channel is created every time a client connects
class ClientChannel(Channel):
#Create a function that will respond to every request from t... | from PodSixNet.Channel import Channel
from PodSixNet.Server import Server
from time import sleep
#Create the channel to deal with our incoming requests from the client
#A new channel is created every time a client connects
class ClientChannel(Channel):
#Create a function that will respond to every request from t... | <commit_before>from PodSixNet.Channel import Channel
from PodSixNet.Server import Server
from time import sleep
#Create the channel to deal with our incoming requests from the client
#A new channel is created every time a client connects
class ClientChannel(Channel):
#Create a function that will respond to every... |
c6837af1af2939965976bfb45099bf7c2407a9da | twitter_api/middleware/ghetto_oauth.py | twitter_api/middleware/ghetto_oauth.py | from django.contrib.auth.models import User
import re
class GhettoOAuthMiddleware(object):
def process_view(self, request, view_func, view_args, view_kwargs):
user_id = None
if 'HTTP_AUTHORIZATION' in request.META and request.META['HTTP_AUTHORIZATION'].startswith('OAuth'):
m = re.search... | from django.contrib.auth.models import User
import re
class GhettoOAuthMiddleware(object):
def process_view(self, request, view_func, view_args, view_kwargs):
user_id = self._get_token_from_header(request, 'HTTP_AUTHORIZATION')
if not user_id:
user_id = self._get_token_from_header(reque... | Add more HTTP headers to GhettoOauth | Add more HTTP headers to GhettoOauth
The official iPhone Twitter client uses
HTTP_X_VERIFY_CREDENTIALS_AUTHORIZATION when it's
connecting to image upload services. | Python | bsd-2-clause | simonw/bugle_project,devfort/bugle,simonw/bugle_project,devfort/bugle,devfort/bugle | from django.contrib.auth.models import User
import re
class GhettoOAuthMiddleware(object):
def process_view(self, request, view_func, view_args, view_kwargs):
user_id = None
if 'HTTP_AUTHORIZATION' in request.META and request.META['HTTP_AUTHORIZATION'].startswith('OAuth'):
m = re.search... | from django.contrib.auth.models import User
import re
class GhettoOAuthMiddleware(object):
def process_view(self, request, view_func, view_args, view_kwargs):
user_id = self._get_token_from_header(request, 'HTTP_AUTHORIZATION')
if not user_id:
user_id = self._get_token_from_header(reque... | <commit_before>from django.contrib.auth.models import User
import re
class GhettoOAuthMiddleware(object):
def process_view(self, request, view_func, view_args, view_kwargs):
user_id = None
if 'HTTP_AUTHORIZATION' in request.META and request.META['HTTP_AUTHORIZATION'].startswith('OAuth'):
... | from django.contrib.auth.models import User
import re
class GhettoOAuthMiddleware(object):
def process_view(self, request, view_func, view_args, view_kwargs):
user_id = self._get_token_from_header(request, 'HTTP_AUTHORIZATION')
if not user_id:
user_id = self._get_token_from_header(reque... | from django.contrib.auth.models import User
import re
class GhettoOAuthMiddleware(object):
def process_view(self, request, view_func, view_args, view_kwargs):
user_id = None
if 'HTTP_AUTHORIZATION' in request.META and request.META['HTTP_AUTHORIZATION'].startswith('OAuth'):
m = re.search... | <commit_before>from django.contrib.auth.models import User
import re
class GhettoOAuthMiddleware(object):
def process_view(self, request, view_func, view_args, view_kwargs):
user_id = None
if 'HTTP_AUTHORIZATION' in request.META and request.META['HTTP_AUTHORIZATION'].startswith('OAuth'):
... |
a84bd0dd803243b20874137fdb2d72d52bcee984 | app/views/post_view.py | app/views/post_view.py | from flask import render_template, redirect, url_for
from flask_classy import FlaskView, route
from flask_user import login_required
from ..models import PostModel
from ..forms import PostForm
class Post(FlaskView):
""" Here will handle post creations, delete and update."""
def get(self, entity_id):
... | from flask import render_template, redirect, url_for
from flask_classy import FlaskView, route
from flask_user import login_required, current_user
from ..models import PostModel
from ..forms import PostForm
class Post(FlaskView):
""" Here will handle post creations, delete and update."""
def get(self, entity... | Update post view to save username references and save a post id in user entity | Update post view to save username references and save a post id in user entity
| Python | mit | oldani/nanodegree-blog,oldani/nanodegree-blog,oldani/nanodegree-blog | from flask import render_template, redirect, url_for
from flask_classy import FlaskView, route
from flask_user import login_required
from ..models import PostModel
from ..forms import PostForm
class Post(FlaskView):
""" Here will handle post creations, delete and update."""
def get(self, entity_id):
... | from flask import render_template, redirect, url_for
from flask_classy import FlaskView, route
from flask_user import login_required, current_user
from ..models import PostModel
from ..forms import PostForm
class Post(FlaskView):
""" Here will handle post creations, delete and update."""
def get(self, entity... | <commit_before>from flask import render_template, redirect, url_for
from flask_classy import FlaskView, route
from flask_user import login_required
from ..models import PostModel
from ..forms import PostForm
class Post(FlaskView):
""" Here will handle post creations, delete and update."""
def get(self, entit... | from flask import render_template, redirect, url_for
from flask_classy import FlaskView, route
from flask_user import login_required, current_user
from ..models import PostModel
from ..forms import PostForm
class Post(FlaskView):
""" Here will handle post creations, delete and update."""
def get(self, entity... | from flask import render_template, redirect, url_for
from flask_classy import FlaskView, route
from flask_user import login_required
from ..models import PostModel
from ..forms import PostForm
class Post(FlaskView):
""" Here will handle post creations, delete and update."""
def get(self, entity_id):
... | <commit_before>from flask import render_template, redirect, url_for
from flask_classy import FlaskView, route
from flask_user import login_required
from ..models import PostModel
from ..forms import PostForm
class Post(FlaskView):
""" Here will handle post creations, delete and update."""
def get(self, entit... |
4688d48ceeb365174353ab710d03c39dda10a115 | tssim/__init__.py | tssim/__init__.py | # -*- coding: utf-8 -*-
__author__ = """Franz Woellert"""
__email__ = 'franz.woellert@gmail.com'
__version__ = '0.1.0'
| # -*- coding: utf-8 -*-
__author__ = """Franz Woellert"""
__email__ = 'franz.woellert@gmail.com'
__version__ = '0.1.0'
from tssim.core.series import TimeSeries
from tssim.core.function import TimeFunction
from tssim.core.track import TimeTrack
from tssim.functions import random
| Adjust module and class references to accessible from package top level. | Adjust module and class references to accessible from package top level.
| Python | mit | mansenfranzen/tssim | # -*- coding: utf-8 -*-
__author__ = """Franz Woellert"""
__email__ = 'franz.woellert@gmail.com'
__version__ = '0.1.0'
Adjust module and class references to accessible from package top level. | # -*- coding: utf-8 -*-
__author__ = """Franz Woellert"""
__email__ = 'franz.woellert@gmail.com'
__version__ = '0.1.0'
from tssim.core.series import TimeSeries
from tssim.core.function import TimeFunction
from tssim.core.track import TimeTrack
from tssim.functions import random
| <commit_before># -*- coding: utf-8 -*-
__author__ = """Franz Woellert"""
__email__ = 'franz.woellert@gmail.com'
__version__ = '0.1.0'
<commit_msg>Adjust module and class references to accessible from package top level.<commit_after> | # -*- coding: utf-8 -*-
__author__ = """Franz Woellert"""
__email__ = 'franz.woellert@gmail.com'
__version__ = '0.1.0'
from tssim.core.series import TimeSeries
from tssim.core.function import TimeFunction
from tssim.core.track import TimeTrack
from tssim.functions import random
| # -*- coding: utf-8 -*-
__author__ = """Franz Woellert"""
__email__ = 'franz.woellert@gmail.com'
__version__ = '0.1.0'
Adjust module and class references to accessible from package top level.# -*- coding: utf-8 -*-
__author__ = """Franz Woellert"""
__email__ = 'franz.woellert@gmail.com'
__version__ = '0.1.0'
from t... | <commit_before># -*- coding: utf-8 -*-
__author__ = """Franz Woellert"""
__email__ = 'franz.woellert@gmail.com'
__version__ = '0.1.0'
<commit_msg>Adjust module and class references to accessible from package top level.<commit_after># -*- coding: utf-8 -*-
__author__ = """Franz Woellert"""
__email__ = 'franz.woellert@... |
88ca9a64468a15f7f5b1000a763a8b1c928ea7a1 | kbkdna/cli.py | kbkdna/cli.py | #!/usr/bin/env python2
"""\
Perform various simple manipulations on DNA sequences.
Usage:
dna len <seq>
dna rc <seq>
dna gc <seq> [--fraction]
Commands:
len: Print the length of the given DNA sequence.
rc: Print the reverse-complement of the given DNA sequence.
gc: Print the GC content o... | #!/usr/bin/env python2
"""\
Perform various simple manipulations on DNA sequences.
Usage:
dna len <seq>
dna rc <seq>
dna gc <seq> [--fraction]
Commands:
len: Print the length of the given DNA sequence.
rc: Print the reverse-complement of the given DNA sequence.
gc: Print the GC content o... | Fix a bug in the GC% formatting. | Fix a bug in the GC% formatting.
| Python | mit | kalekundert/kbkdna | #!/usr/bin/env python2
"""\
Perform various simple manipulations on DNA sequences.
Usage:
dna len <seq>
dna rc <seq>
dna gc <seq> [--fraction]
Commands:
len: Print the length of the given DNA sequence.
rc: Print the reverse-complement of the given DNA sequence.
gc: Print the GC content o... | #!/usr/bin/env python2
"""\
Perform various simple manipulations on DNA sequences.
Usage:
dna len <seq>
dna rc <seq>
dna gc <seq> [--fraction]
Commands:
len: Print the length of the given DNA sequence.
rc: Print the reverse-complement of the given DNA sequence.
gc: Print the GC content o... | <commit_before>#!/usr/bin/env python2
"""\
Perform various simple manipulations on DNA sequences.
Usage:
dna len <seq>
dna rc <seq>
dna gc <seq> [--fraction]
Commands:
len: Print the length of the given DNA sequence.
rc: Print the reverse-complement of the given DNA sequence.
gc: Print t... | #!/usr/bin/env python2
"""\
Perform various simple manipulations on DNA sequences.
Usage:
dna len <seq>
dna rc <seq>
dna gc <seq> [--fraction]
Commands:
len: Print the length of the given DNA sequence.
rc: Print the reverse-complement of the given DNA sequence.
gc: Print the GC content o... | #!/usr/bin/env python2
"""\
Perform various simple manipulations on DNA sequences.
Usage:
dna len <seq>
dna rc <seq>
dna gc <seq> [--fraction]
Commands:
len: Print the length of the given DNA sequence.
rc: Print the reverse-complement of the given DNA sequence.
gc: Print the GC content o... | <commit_before>#!/usr/bin/env python2
"""\
Perform various simple manipulations on DNA sequences.
Usage:
dna len <seq>
dna rc <seq>
dna gc <seq> [--fraction]
Commands:
len: Print the length of the given DNA sequence.
rc: Print the reverse-complement of the given DNA sequence.
gc: Print t... |
57a02c9e3bb0ed82ee84a08dbadba0dac4e7f2f4 | test_insertion_sort.py | test_insertion_sort.py | from random import shuffle
import pytest
from insertion_sort import in_sort
def test_insertion_sort():
expected = range(20)
unsorted = expected[:]
shuffle(unsorted)
in_sort(unsorted)
actual = unsorted
assert expected == actual
def test_insertion_sort_wrong_type():
with pytest.raises(Typ... | from random import shuffle
import pytest
from insertion_sort import in_sort
def test_insertion_sort():
expected = range(20)
unsorted = expected[:]
shuffle(unsorted)
in_sort(unsorted)
actual = unsorted
assert expected == actual
def test_insertion_sort_with_duplicates():
expected = [1, 3,... | Add insertion sort with duplicate values test | Add insertion sort with duplicate values test
| Python | mit | jonathanstallings/data-structures | from random import shuffle
import pytest
from insertion_sort import in_sort
def test_insertion_sort():
expected = range(20)
unsorted = expected[:]
shuffle(unsorted)
in_sort(unsorted)
actual = unsorted
assert expected == actual
def test_insertion_sort_wrong_type():
with pytest.raises(Typ... | from random import shuffle
import pytest
from insertion_sort import in_sort
def test_insertion_sort():
expected = range(20)
unsorted = expected[:]
shuffle(unsorted)
in_sort(unsorted)
actual = unsorted
assert expected == actual
def test_insertion_sort_with_duplicates():
expected = [1, 3,... | <commit_before>from random import shuffle
import pytest
from insertion_sort import in_sort
def test_insertion_sort():
expected = range(20)
unsorted = expected[:]
shuffle(unsorted)
in_sort(unsorted)
actual = unsorted
assert expected == actual
def test_insertion_sort_wrong_type():
with py... | from random import shuffle
import pytest
from insertion_sort import in_sort
def test_insertion_sort():
expected = range(20)
unsorted = expected[:]
shuffle(unsorted)
in_sort(unsorted)
actual = unsorted
assert expected == actual
def test_insertion_sort_with_duplicates():
expected = [1, 3,... | from random import shuffle
import pytest
from insertion_sort import in_sort
def test_insertion_sort():
expected = range(20)
unsorted = expected[:]
shuffle(unsorted)
in_sort(unsorted)
actual = unsorted
assert expected == actual
def test_insertion_sort_wrong_type():
with pytest.raises(Typ... | <commit_before>from random import shuffle
import pytest
from insertion_sort import in_sort
def test_insertion_sort():
expected = range(20)
unsorted = expected[:]
shuffle(unsorted)
in_sort(unsorted)
actual = unsorted
assert expected == actual
def test_insertion_sort_wrong_type():
with py... |
a6a8141bcc40ac124a0425a63594578538852a02 | linter.py | linter.py | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ilya Akhmadullin
# Copyright (c) 2013 Ilya Akhmadullin
#
# License: MIT
#
"""This module exports the jscs plugin class."""
from SublimeLinter.lint import Linter
class Jscs(Linter):
"""Provides an interface to... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ilya Akhmadullin
# Copyright (c) 2013 Ilya Akhmadullin
#
# License: MIT
#
"""This module exports the jscs plugin class."""
from SublimeLinter.lint import Linter
class Jscs(Linter):
"""Provides an interface to... | Use the full option name for clarity and also search in the user's home directory | Use the full option name for clarity and also search in the user's home directory
| Python | mit | roberthoog/SublimeLinter-jscs,SublimeLinter/SublimeLinter-jscs | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ilya Akhmadullin
# Copyright (c) 2013 Ilya Akhmadullin
#
# License: MIT
#
"""This module exports the jscs plugin class."""
from SublimeLinter.lint import Linter
class Jscs(Linter):
"""Provides an interface to... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ilya Akhmadullin
# Copyright (c) 2013 Ilya Akhmadullin
#
# License: MIT
#
"""This module exports the jscs plugin class."""
from SublimeLinter.lint import Linter
class Jscs(Linter):
"""Provides an interface to... | <commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ilya Akhmadullin
# Copyright (c) 2013 Ilya Akhmadullin
#
# License: MIT
#
"""This module exports the jscs plugin class."""
from SublimeLinter.lint import Linter
class Jscs(Linter):
"""Provides ... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ilya Akhmadullin
# Copyright (c) 2013 Ilya Akhmadullin
#
# License: MIT
#
"""This module exports the jscs plugin class."""
from SublimeLinter.lint import Linter
class Jscs(Linter):
"""Provides an interface to... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ilya Akhmadullin
# Copyright (c) 2013 Ilya Akhmadullin
#
# License: MIT
#
"""This module exports the jscs plugin class."""
from SublimeLinter.lint import Linter
class Jscs(Linter):
"""Provides an interface to... | <commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Ilya Akhmadullin
# Copyright (c) 2013 Ilya Akhmadullin
#
# License: MIT
#
"""This module exports the jscs plugin class."""
from SublimeLinter.lint import Linter
class Jscs(Linter):
"""Provides ... |
5bc0a40ccd05d3226181d29c0c5cecb0287cb56c | brightml/features.py | brightml/features.py | # todo: chargedness of battery
import time
from datetime import datetime
import numpy as np
try:
from whereami.predict import Predicter
p = Predicter()
except ImportError:
p = None
from brightml.battery import get_battery_feature
from brightml.xdisplay import Display
d = Display()
DATE_FORMAT = '%Y-%m-... | # todo: chargedness of battery
import time
from datetime import datetime
import numpy as np
try:
from whereami.predict import Predicter
p = Predicter()
except ImportError:
p = None
from brightml.battery import get_battery_feature
from brightml.xdisplay import Display
d = Display()
DATE_FORMAT = '%Y-%m-... | Use generic path for ALS on iio device0. | Use generic path for ALS on iio device0.
| Python | mit | kootenpv/brightml,kootenpv/brightml | # todo: chargedness of battery
import time
from datetime import datetime
import numpy as np
try:
from whereami.predict import Predicter
p = Predicter()
except ImportError:
p = None
from brightml.battery import get_battery_feature
from brightml.xdisplay import Display
d = Display()
DATE_FORMAT = '%Y-%m-... | # todo: chargedness of battery
import time
from datetime import datetime
import numpy as np
try:
from whereami.predict import Predicter
p = Predicter()
except ImportError:
p = None
from brightml.battery import get_battery_feature
from brightml.xdisplay import Display
d = Display()
DATE_FORMAT = '%Y-%m-... | <commit_before># todo: chargedness of battery
import time
from datetime import datetime
import numpy as np
try:
from whereami.predict import Predicter
p = Predicter()
except ImportError:
p = None
from brightml.battery import get_battery_feature
from brightml.xdisplay import Display
d = Display()
DATE_F... | # todo: chargedness of battery
import time
from datetime import datetime
import numpy as np
try:
from whereami.predict import Predicter
p = Predicter()
except ImportError:
p = None
from brightml.battery import get_battery_feature
from brightml.xdisplay import Display
d = Display()
DATE_FORMAT = '%Y-%m-... | # todo: chargedness of battery
import time
from datetime import datetime
import numpy as np
try:
from whereami.predict import Predicter
p = Predicter()
except ImportError:
p = None
from brightml.battery import get_battery_feature
from brightml.xdisplay import Display
d = Display()
DATE_FORMAT = '%Y-%m-... | <commit_before># todo: chargedness of battery
import time
from datetime import datetime
import numpy as np
try:
from whereami.predict import Predicter
p = Predicter()
except ImportError:
p = None
from brightml.battery import get_battery_feature
from brightml.xdisplay import Display
d = Display()
DATE_F... |
ce92ad058f24e884e196e793027c7a53e00739e8 | memory.py | memory.py | class Memory(object):
def __init__(self, size):
self.size = size
self.memory = bytearray([0] * size)
def read(self, addr, count):
if addr + count > len(self.memory):
raise Exception('read exceeds memory bounds')
return str(self.memory[addr:addr+count])
def write... | class Memory(object):
def __init__(self, size):
self.size = size
self.memory = bytearray([0] * size)
def read(self, addr, count):
if addr + count > self.size:
raise Exception('read exceeds memory bounds')
return str(self.memory[addr:addr+count])
def write(self, ... | Use Memory.size field for read/write checks | Use Memory.size field for read/write checks
| Python | mit | mossberg/spym,mossberg/spym | class Memory(object):
def __init__(self, size):
self.size = size
self.memory = bytearray([0] * size)
def read(self, addr, count):
if addr + count > len(self.memory):
raise Exception('read exceeds memory bounds')
return str(self.memory[addr:addr+count])
def write... | class Memory(object):
def __init__(self, size):
self.size = size
self.memory = bytearray([0] * size)
def read(self, addr, count):
if addr + count > self.size:
raise Exception('read exceeds memory bounds')
return str(self.memory[addr:addr+count])
def write(self, ... | <commit_before>class Memory(object):
def __init__(self, size):
self.size = size
self.memory = bytearray([0] * size)
def read(self, addr, count):
if addr + count > len(self.memory):
raise Exception('read exceeds memory bounds')
return str(self.memory[addr:addr+count])... | class Memory(object):
def __init__(self, size):
self.size = size
self.memory = bytearray([0] * size)
def read(self, addr, count):
if addr + count > self.size:
raise Exception('read exceeds memory bounds')
return str(self.memory[addr:addr+count])
def write(self, ... | class Memory(object):
def __init__(self, size):
self.size = size
self.memory = bytearray([0] * size)
def read(self, addr, count):
if addr + count > len(self.memory):
raise Exception('read exceeds memory bounds')
return str(self.memory[addr:addr+count])
def write... | <commit_before>class Memory(object):
def __init__(self, size):
self.size = size
self.memory = bytearray([0] * size)
def read(self, addr, count):
if addr + count > len(self.memory):
raise Exception('read exceeds memory bounds')
return str(self.memory[addr:addr+count])... |
9cd3bb79126fa2431ba4ae03811ac30fb77b9b46 | netcat.py | netcat.py | #!/usr/bin/python2
import argparse
import socket
import sys
parser = argparse.ArgumentParser(description='Simple netcat in pure python.')
parser.add_argument('-z', '--scan', action='store_true')
parser.add_argument('-w', '--timeout', metavar='SECONDS', type=int)
parser.add_argument('-v', '--verbose', action='store_tru... | #!/usr/bin/python
import argparse
import socket
import sys
parser = argparse.ArgumentParser(description='Simple netcat in pure python.')
parser.add_argument('-s', '--source', metavar='ADDRESS')
parser.add_argument('-v', '--verbose', action='store_true')
parser.add_argument('-w', '--wait', metavar='SECONDS', type=int)
... | Support python 2 and 3 | Support python 2 and 3
Add source argument.
Update arguments to use long names from GNU netcat.
| Python | unlicense | benformosa/Toolbox,benformosa/Toolbox | #!/usr/bin/python2
import argparse
import socket
import sys
parser = argparse.ArgumentParser(description='Simple netcat in pure python.')
parser.add_argument('-z', '--scan', action='store_true')
parser.add_argument('-w', '--timeout', metavar='SECONDS', type=int)
parser.add_argument('-v', '--verbose', action='store_tru... | #!/usr/bin/python
import argparse
import socket
import sys
parser = argparse.ArgumentParser(description='Simple netcat in pure python.')
parser.add_argument('-s', '--source', metavar='ADDRESS')
parser.add_argument('-v', '--verbose', action='store_true')
parser.add_argument('-w', '--wait', metavar='SECONDS', type=int)
... | <commit_before>#!/usr/bin/python2
import argparse
import socket
import sys
parser = argparse.ArgumentParser(description='Simple netcat in pure python.')
parser.add_argument('-z', '--scan', action='store_true')
parser.add_argument('-w', '--timeout', metavar='SECONDS', type=int)
parser.add_argument('-v', '--verbose', ac... | #!/usr/bin/python
import argparse
import socket
import sys
parser = argparse.ArgumentParser(description='Simple netcat in pure python.')
parser.add_argument('-s', '--source', metavar='ADDRESS')
parser.add_argument('-v', '--verbose', action='store_true')
parser.add_argument('-w', '--wait', metavar='SECONDS', type=int)
... | #!/usr/bin/python2
import argparse
import socket
import sys
parser = argparse.ArgumentParser(description='Simple netcat in pure python.')
parser.add_argument('-z', '--scan', action='store_true')
parser.add_argument('-w', '--timeout', metavar='SECONDS', type=int)
parser.add_argument('-v', '--verbose', action='store_tru... | <commit_before>#!/usr/bin/python2
import argparse
import socket
import sys
parser = argparse.ArgumentParser(description='Simple netcat in pure python.')
parser.add_argument('-z', '--scan', action='store_true')
parser.add_argument('-w', '--timeout', metavar='SECONDS', type=int)
parser.add_argument('-v', '--verbose', ac... |
f8dcceb9702c079e16bda30582e561ffeb2e857b | billjobs/urls.py | billjobs/urls.py | from django.conf.urls import url, include
from . import views
urlpatterns = [
url(r'^generate_pdf/(?P<bill_id>\d+)$', views.generate_pdf,
name='generate-pdf'),
url(r'^users/$', views.UserAdmin.as_view(), name='users'),
url(r'^users/(?P<pk>[0-9]+)/$', views.UserAdminDetail.as_view(), name='user-deta... | from django.conf.urls import url, include
from rest_framework.authtoken.views import obtain_auth_token
from . import views
urlpatterns = [
url(r'^generate_pdf/(?P<bill_id>\d+)$', views.generate_pdf,
name='generate-pdf'),
url(r'^users/$', views.UserAdmin.as_view(), name='users'),
url(r'^users/(?P<pk... | Add rest_framework view to obtain auth token | Add rest_framework view to obtain auth token
| Python | mit | ioO/billjobs | from django.conf.urls import url, include
from . import views
urlpatterns = [
url(r'^generate_pdf/(?P<bill_id>\d+)$', views.generate_pdf,
name='generate-pdf'),
url(r'^users/$', views.UserAdmin.as_view(), name='users'),
url(r'^users/(?P<pk>[0-9]+)/$', views.UserAdminDetail.as_view(), name='user-deta... | from django.conf.urls import url, include
from rest_framework.authtoken.views import obtain_auth_token
from . import views
urlpatterns = [
url(r'^generate_pdf/(?P<bill_id>\d+)$', views.generate_pdf,
name='generate-pdf'),
url(r'^users/$', views.UserAdmin.as_view(), name='users'),
url(r'^users/(?P<pk... | <commit_before>from django.conf.urls import url, include
from . import views
urlpatterns = [
url(r'^generate_pdf/(?P<bill_id>\d+)$', views.generate_pdf,
name='generate-pdf'),
url(r'^users/$', views.UserAdmin.as_view(), name='users'),
url(r'^users/(?P<pk>[0-9]+)/$', views.UserAdminDetail.as_view(), ... | from django.conf.urls import url, include
from rest_framework.authtoken.views import obtain_auth_token
from . import views
urlpatterns = [
url(r'^generate_pdf/(?P<bill_id>\d+)$', views.generate_pdf,
name='generate-pdf'),
url(r'^users/$', views.UserAdmin.as_view(), name='users'),
url(r'^users/(?P<pk... | from django.conf.urls import url, include
from . import views
urlpatterns = [
url(r'^generate_pdf/(?P<bill_id>\d+)$', views.generate_pdf,
name='generate-pdf'),
url(r'^users/$', views.UserAdmin.as_view(), name='users'),
url(r'^users/(?P<pk>[0-9]+)/$', views.UserAdminDetail.as_view(), name='user-deta... | <commit_before>from django.conf.urls import url, include
from . import views
urlpatterns = [
url(r'^generate_pdf/(?P<bill_id>\d+)$', views.generate_pdf,
name='generate-pdf'),
url(r'^users/$', views.UserAdmin.as_view(), name='users'),
url(r'^users/(?P<pk>[0-9]+)/$', views.UserAdminDetail.as_view(), ... |
68e83bafc9584f32ebcaa854211affbfeaf92f36 | downstream_node/models.py | downstream_node/models.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from downstream_node.startup import db
class Files(db.Model):
__tablename__ = 'files'
id = db.Column(db.Integer(), primary_key=True, autoincrement=True)
name = db.Column(db.String(512), unique=True)
class Challenges(db.Model):
__tablename__ = 'challenge... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from downstream_node.startup import db
class Files(db.Model):
__tablename__ = 'files'
id = db.Column(db.Integer(), primary_key=True, autoincrement=True)
name = db.Column(db.String(512), unique=True)
class Challenges(db.Model):
__tablename__ = 'challenge... | Change Challenges model block column to type Integer | Change Challenges model block column to type Integer
| Python | mit | Storj/downstream-node,Storj/downstream-node | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from downstream_node.startup import db
class Files(db.Model):
__tablename__ = 'files'
id = db.Column(db.Integer(), primary_key=True, autoincrement=True)
name = db.Column(db.String(512), unique=True)
class Challenges(db.Model):
__tablename__ = 'challenge... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from downstream_node.startup import db
class Files(db.Model):
__tablename__ = 'files'
id = db.Column(db.Integer(), primary_key=True, autoincrement=True)
name = db.Column(db.String(512), unique=True)
class Challenges(db.Model):
__tablename__ = 'challenge... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from downstream_node.startup import db
class Files(db.Model):
__tablename__ = 'files'
id = db.Column(db.Integer(), primary_key=True, autoincrement=True)
name = db.Column(db.String(512), unique=True)
class Challenges(db.Model):
__tablename... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from downstream_node.startup import db
class Files(db.Model):
__tablename__ = 'files'
id = db.Column(db.Integer(), primary_key=True, autoincrement=True)
name = db.Column(db.String(512), unique=True)
class Challenges(db.Model):
__tablename__ = 'challenge... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from downstream_node.startup import db
class Files(db.Model):
__tablename__ = 'files'
id = db.Column(db.Integer(), primary_key=True, autoincrement=True)
name = db.Column(db.String(512), unique=True)
class Challenges(db.Model):
__tablename__ = 'challenge... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from downstream_node.startup import db
class Files(db.Model):
__tablename__ = 'files'
id = db.Column(db.Integer(), primary_key=True, autoincrement=True)
name = db.Column(db.String(512), unique=True)
class Challenges(db.Model):
__tablename... |
423775b89ff4c6fd2f493aca273d0abc64d39bda | masters/master.chromium.webkit/master_gatekeeper_cfg.py | masters/master.chromium.webkit/master_gatekeeper_cfg.py | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master import gatekeeper
from master import master_utils
# This is the list of the builder categories and the corresponding critical
# steps. If on... | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master import gatekeeper
from master import master_utils
# This is the list of the builder categories and the corresponding critical
# steps. If on... | Send email to Blink gardeners when tree closes. | Send email to Blink gardeners when tree closes.
R=eseidel@chromium.org,iannucci@chromium.org
BUG=323059
Review URL: https://codereview.chromium.org/84973002
git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@237359 0039d316-1c4b-4281-b951-d872f2087c98
| Python | bsd-3-clause | eunchong/build,eunchong/build,eunchong/build,eunchong/build | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master import gatekeeper
from master import master_utils
# This is the list of the builder categories and the corresponding critical
# steps. If on... | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master import gatekeeper
from master import master_utils
# This is the list of the builder categories and the corresponding critical
# steps. If on... | <commit_before># Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master import gatekeeper
from master import master_utils
# This is the list of the builder categories and the corresponding critical... | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master import gatekeeper
from master import master_utils
# This is the list of the builder categories and the corresponding critical
# steps. If on... | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master import gatekeeper
from master import master_utils
# This is the list of the builder categories and the corresponding critical
# steps. If on... | <commit_before># Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master import gatekeeper
from master import master_utils
# This is the list of the builder categories and the corresponding critical... |
3342c9fbef948056f4a4ecc10739e8584e76dea0 | cmfieldguide/cmsdetector/signatures/hippo.py | cmfieldguide/cmsdetector/signatures/hippo.py | """
This signature contains tests to see if the site is running on Hippo CMS.
"""
__author__ = "Jeroen Reijn"
__copyright__ = "CM Fieldguide"
__credits__ = ["Jeroen Reijn",]
__license__ = "Unlicense"
__version__ = "0.1"
__maintainer__ = "Jeroen Reijn"
__email__ = "j.reijn@onehippo.com"
__status__ = "Experimental"
fro... | """
This signature contains tests to see if the site is running on Hippo CMS.
"""
__author__ = "Jeroen Reijn"
__copyright__ = "CM Fieldguide"
__credits__ = ["Jeroen Reijn",]
__license__ = "Unlicense"
__version__ = "0.1"
__maintainer__ = "Jeroen Reijn"
__email__ = "j.reijn@onehippo.com"
__status__ = "Experimental"
fro... | Fix signature because of test failure | Fix signature because of test failure
| Python | unlicense | sggottlieb/cmfieldguide | """
This signature contains tests to see if the site is running on Hippo CMS.
"""
__author__ = "Jeroen Reijn"
__copyright__ = "CM Fieldguide"
__credits__ = ["Jeroen Reijn",]
__license__ = "Unlicense"
__version__ = "0.1"
__maintainer__ = "Jeroen Reijn"
__email__ = "j.reijn@onehippo.com"
__status__ = "Experimental"
fro... | """
This signature contains tests to see if the site is running on Hippo CMS.
"""
__author__ = "Jeroen Reijn"
__copyright__ = "CM Fieldguide"
__credits__ = ["Jeroen Reijn",]
__license__ = "Unlicense"
__version__ = "0.1"
__maintainer__ = "Jeroen Reijn"
__email__ = "j.reijn@onehippo.com"
__status__ = "Experimental"
fro... | <commit_before>"""
This signature contains tests to see if the site is running on Hippo CMS.
"""
__author__ = "Jeroen Reijn"
__copyright__ = "CM Fieldguide"
__credits__ = ["Jeroen Reijn",]
__license__ = "Unlicense"
__version__ = "0.1"
__maintainer__ = "Jeroen Reijn"
__email__ = "j.reijn@onehippo.com"
__status__ = "Expe... | """
This signature contains tests to see if the site is running on Hippo CMS.
"""
__author__ = "Jeroen Reijn"
__copyright__ = "CM Fieldguide"
__credits__ = ["Jeroen Reijn",]
__license__ = "Unlicense"
__version__ = "0.1"
__maintainer__ = "Jeroen Reijn"
__email__ = "j.reijn@onehippo.com"
__status__ = "Experimental"
fro... | """
This signature contains tests to see if the site is running on Hippo CMS.
"""
__author__ = "Jeroen Reijn"
__copyright__ = "CM Fieldguide"
__credits__ = ["Jeroen Reijn",]
__license__ = "Unlicense"
__version__ = "0.1"
__maintainer__ = "Jeroen Reijn"
__email__ = "j.reijn@onehippo.com"
__status__ = "Experimental"
fro... | <commit_before>"""
This signature contains tests to see if the site is running on Hippo CMS.
"""
__author__ = "Jeroen Reijn"
__copyright__ = "CM Fieldguide"
__credits__ = ["Jeroen Reijn",]
__license__ = "Unlicense"
__version__ = "0.1"
__maintainer__ = "Jeroen Reijn"
__email__ = "j.reijn@onehippo.com"
__status__ = "Expe... |
0101bdc12b00ecb0a1a208f6a1f49e670a5362a6 | user_profile/models.py | user_profile/models.py | from django.db import models
from django.contrib.auth.models import User
class UserProfile(models.Model):
user = models.OneToOneField(User)
description = models.TextField(max_length=3000)
picture = models.ImageField(blank=True, upload_to='media/profiles/')
thumbnail = models.ImageField(
upload_to='media/p... | from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.contrib.auth.models import User
class UserProfile(models.Model):
user = models.OneToOneField(User)
description = models.TextField(max_length=300... | Create user_profile automatically after user creation | Create user_profile automatically after user creation
| Python | mit | DeWaster/Tviserrys,DeWaster/Tviserrys | from django.db import models
from django.contrib.auth.models import User
class UserProfile(models.Model):
user = models.OneToOneField(User)
description = models.TextField(max_length=3000)
picture = models.ImageField(blank=True, upload_to='media/profiles/')
thumbnail = models.ImageField(
upload_to='media/p... | from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.contrib.auth.models import User
class UserProfile(models.Model):
user = models.OneToOneField(User)
description = models.TextField(max_length=300... | <commit_before>from django.db import models
from django.contrib.auth.models import User
class UserProfile(models.Model):
user = models.OneToOneField(User)
description = models.TextField(max_length=3000)
picture = models.ImageField(blank=True, upload_to='media/profiles/')
thumbnail = models.ImageField(
upl... | from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.contrib.auth.models import User
class UserProfile(models.Model):
user = models.OneToOneField(User)
description = models.TextField(max_length=300... | from django.db import models
from django.contrib.auth.models import User
class UserProfile(models.Model):
user = models.OneToOneField(User)
description = models.TextField(max_length=3000)
picture = models.ImageField(blank=True, upload_to='media/profiles/')
thumbnail = models.ImageField(
upload_to='media/p... | <commit_before>from django.db import models
from django.contrib.auth.models import User
class UserProfile(models.Model):
user = models.OneToOneField(User)
description = models.TextField(max_length=3000)
picture = models.ImageField(blank=True, upload_to='media/profiles/')
thumbnail = models.ImageField(
upl... |
523e5780fd467222967bce3c03186d5af7f3623f | entrec/char_rnn_test.py | entrec/char_rnn_test.py | import tensorflow as tf
from .char_rnn import char_rnn
def test_char_rnn():
for i, (sentence_shape, labels_shape) in enumerate([
[[None, 64, 8], [None, 64]],
[[None, None, 8], [None, None]],
[[None, None, None], [None, None]]]):
for mode in [tf.contrib.learn.ModeKeys.T... | import tensorflow as tf
from .char_rnn import char_rnn
def test_char_rnn():
for i, (sentence_shape, labels_shape) in enumerate([
[[11, 64, 8], [11, 64]],
[[None, 64, 8], [None, 64]],
[[None, None, 8], [None, None]],
[[None, None, None], [None, None]]]):
for... | Test char rnn with static batch size | Test char rnn with static batch size
| Python | unlicense | raviqqe/tensorflow-entrec,raviqqe/tensorflow-entrec | import tensorflow as tf
from .char_rnn import char_rnn
def test_char_rnn():
for i, (sentence_shape, labels_shape) in enumerate([
[[None, 64, 8], [None, 64]],
[[None, None, 8], [None, None]],
[[None, None, None], [None, None]]]):
for mode in [tf.contrib.learn.ModeKeys.T... | import tensorflow as tf
from .char_rnn import char_rnn
def test_char_rnn():
for i, (sentence_shape, labels_shape) in enumerate([
[[11, 64, 8], [11, 64]],
[[None, 64, 8], [None, 64]],
[[None, None, 8], [None, None]],
[[None, None, None], [None, None]]]):
for... | <commit_before>import tensorflow as tf
from .char_rnn import char_rnn
def test_char_rnn():
for i, (sentence_shape, labels_shape) in enumerate([
[[None, 64, 8], [None, 64]],
[[None, None, 8], [None, None]],
[[None, None, None], [None, None]]]):
for mode in [tf.contrib.l... | import tensorflow as tf
from .char_rnn import char_rnn
def test_char_rnn():
for i, (sentence_shape, labels_shape) in enumerate([
[[11, 64, 8], [11, 64]],
[[None, 64, 8], [None, 64]],
[[None, None, 8], [None, None]],
[[None, None, None], [None, None]]]):
for... | import tensorflow as tf
from .char_rnn import char_rnn
def test_char_rnn():
for i, (sentence_shape, labels_shape) in enumerate([
[[None, 64, 8], [None, 64]],
[[None, None, 8], [None, None]],
[[None, None, None], [None, None]]]):
for mode in [tf.contrib.learn.ModeKeys.T... | <commit_before>import tensorflow as tf
from .char_rnn import char_rnn
def test_char_rnn():
for i, (sentence_shape, labels_shape) in enumerate([
[[None, 64, 8], [None, 64]],
[[None, None, 8], [None, None]],
[[None, None, None], [None, None]]]):
for mode in [tf.contrib.l... |
52cbbadd3cf56ebc6783313058dbe129a4852a1d | call_server/extensions.py | call_server/extensions.py | # define flask extensions in separate file, to resolve import dependencies
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
from flask_caching import Cache
cache = Cache()
from flask_assets import Environment
assets = Environment()
from flask_babel import Babel
babel = Babel()
from flask_mail import Mail
... | # define flask extensions in separate file, to resolve import dependencies
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
from flask_caching import Cache
cache = Cache()
from flask_assets import Environment
assets = Environment()
from flask_babel import Babel
babel = Babel()
from flask_mail import Mail
... | Update script-src to include newrelic | Update script-src to include newrelic
| Python | agpl-3.0 | OpenSourceActivismTech/call-power,18mr/call-congress,spacedogXYZ/call-power,18mr/call-congress,spacedogXYZ/call-power,18mr/call-congress,OpenSourceActivismTech/call-power,OpenSourceActivismTech/call-power,spacedogXYZ/call-power,spacedogXYZ/call-power,18mr/call-congress,OpenSourceActivismTech/call-power | # define flask extensions in separate file, to resolve import dependencies
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
from flask_caching import Cache
cache = Cache()
from flask_assets import Environment
assets = Environment()
from flask_babel import Babel
babel = Babel()
from flask_mail import Mail
... | # define flask extensions in separate file, to resolve import dependencies
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
from flask_caching import Cache
cache = Cache()
from flask_assets import Environment
assets = Environment()
from flask_babel import Babel
babel = Babel()
from flask_mail import Mail
... | <commit_before># define flask extensions in separate file, to resolve import dependencies
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
from flask_caching import Cache
cache = Cache()
from flask_assets import Environment
assets = Environment()
from flask_babel import Babel
babel = Babel()
from flask_ma... | # define flask extensions in separate file, to resolve import dependencies
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
from flask_caching import Cache
cache = Cache()
from flask_assets import Environment
assets = Environment()
from flask_babel import Babel
babel = Babel()
from flask_mail import Mail
... | # define flask extensions in separate file, to resolve import dependencies
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
from flask_caching import Cache
cache = Cache()
from flask_assets import Environment
assets = Environment()
from flask_babel import Babel
babel = Babel()
from flask_mail import Mail
... | <commit_before># define flask extensions in separate file, to resolve import dependencies
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
from flask_caching import Cache
cache = Cache()
from flask_assets import Environment
assets = Environment()
from flask_babel import Babel
babel = Babel()
from flask_ma... |
a8107b6877ffa19e51ba1bfbee5143ca82df6602 | joequery/blog/posts/code/screenx-tv-first-impressions/meta.py | joequery/blog/posts/code/screenx-tv-first-impressions/meta.py | title="ScreenX TV: First Impressions"
description="""
My initial thoughts of [ScreenX TV](http://screenx.tv), a way to broadcast
your terminal to the world.
"""
time="2012-12-07 Fri 09:53 PM"
# related=[("Some article", "its/url")]
| title="ScreenX TV: First Impressions"
description="""
My initial thoughts of [ScreenX TV](http://screenx.tv), a way to broadcast
your terminal to the world.
"""
time="2012-12-08 Sat 03:11 AM"
# related=[("Some article", "its/url")]
| Update timestamp on screenx post | Update timestamp on screenx post
| Python | mit | joequery/joequery.me,joequery/joequery.me,joequery/joequery.me,joequery/joequery.me | title="ScreenX TV: First Impressions"
description="""
My initial thoughts of [ScreenX TV](http://screenx.tv), a way to broadcast
your terminal to the world.
"""
time="2012-12-07 Fri 09:53 PM"
# related=[("Some article", "its/url")]
Update timestamp on screenx post | title="ScreenX TV: First Impressions"
description="""
My initial thoughts of [ScreenX TV](http://screenx.tv), a way to broadcast
your terminal to the world.
"""
time="2012-12-08 Sat 03:11 AM"
# related=[("Some article", "its/url")]
| <commit_before>title="ScreenX TV: First Impressions"
description="""
My initial thoughts of [ScreenX TV](http://screenx.tv), a way to broadcast
your terminal to the world.
"""
time="2012-12-07 Fri 09:53 PM"
# related=[("Some article", "its/url")]
<commit_msg>Update timestamp on screenx post<commit_after> | title="ScreenX TV: First Impressions"
description="""
My initial thoughts of [ScreenX TV](http://screenx.tv), a way to broadcast
your terminal to the world.
"""
time="2012-12-08 Sat 03:11 AM"
# related=[("Some article", "its/url")]
| title="ScreenX TV: First Impressions"
description="""
My initial thoughts of [ScreenX TV](http://screenx.tv), a way to broadcast
your terminal to the world.
"""
time="2012-12-07 Fri 09:53 PM"
# related=[("Some article", "its/url")]
Update timestamp on screenx posttitle="ScreenX TV: First Impressions"
description="""
My... | <commit_before>title="ScreenX TV: First Impressions"
description="""
My initial thoughts of [ScreenX TV](http://screenx.tv), a way to broadcast
your terminal to the world.
"""
time="2012-12-07 Fri 09:53 PM"
# related=[("Some article", "its/url")]
<commit_msg>Update timestamp on screenx post<commit_after>title="ScreenX ... |
0aee34bc19d43f2369a121da2f9cfff05225fdbc | comet/__init__.py | comet/__init__.py | __description__ = "VOEvent Broker"
__url__ = "http://comet.transientskp.org/"
__author__ = "John Swinbank"
__contact__ = "swinbank@princeton.edu"
__version__ = "2.1.0-pre"
| __description__ = "VOEvent Broker"
__url__ = "http://comet.transientskp.org/"
__author__ = "John Swinbank"
__contact__ = "swinbank@princeton.edu"
__version__ = "2.1.0-pre"
import sys
if sys.version_info.major <= 2:
BINARY_TYPE = str
else:
BINARY_TYPE = bytes
| Add alias to appropriate raw bytes for this Python. | Add alias to appropriate raw bytes for this Python.
| Python | bsd-2-clause | jdswinbank/Comet,jdswinbank/Comet | __description__ = "VOEvent Broker"
__url__ = "http://comet.transientskp.org/"
__author__ = "John Swinbank"
__contact__ = "swinbank@princeton.edu"
__version__ = "2.1.0-pre"
Add alias to appropriate raw bytes for this Python. | __description__ = "VOEvent Broker"
__url__ = "http://comet.transientskp.org/"
__author__ = "John Swinbank"
__contact__ = "swinbank@princeton.edu"
__version__ = "2.1.0-pre"
import sys
if sys.version_info.major <= 2:
BINARY_TYPE = str
else:
BINARY_TYPE = bytes
| <commit_before>__description__ = "VOEvent Broker"
__url__ = "http://comet.transientskp.org/"
__author__ = "John Swinbank"
__contact__ = "swinbank@princeton.edu"
__version__ = "2.1.0-pre"
<commit_msg>Add alias to appropriate raw bytes for this Python.<commit_after> | __description__ = "VOEvent Broker"
__url__ = "http://comet.transientskp.org/"
__author__ = "John Swinbank"
__contact__ = "swinbank@princeton.edu"
__version__ = "2.1.0-pre"
import sys
if sys.version_info.major <= 2:
BINARY_TYPE = str
else:
BINARY_TYPE = bytes
| __description__ = "VOEvent Broker"
__url__ = "http://comet.transientskp.org/"
__author__ = "John Swinbank"
__contact__ = "swinbank@princeton.edu"
__version__ = "2.1.0-pre"
Add alias to appropriate raw bytes for this Python.__description__ = "VOEvent Broker"
__url__ = "http://comet.transientskp.org/"
__author__ = "John ... | <commit_before>__description__ = "VOEvent Broker"
__url__ = "http://comet.transientskp.org/"
__author__ = "John Swinbank"
__contact__ = "swinbank@princeton.edu"
__version__ = "2.1.0-pre"
<commit_msg>Add alias to appropriate raw bytes for this Python.<commit_after>__description__ = "VOEvent Broker"
__url__ = "http://com... |
68ea11b5beb24aebc0276f9fc84e552cf4882ac9 | tensorflow_datasets/image/places365_small_test.py | tensorflow_datasets/image/places365_small_test.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from tensorflow_datasets.image import places365_small
import tensorflow_datasets.testing as tfds_test
class Places365SmallTest(tfds_test.DatasetBuilderTestCase):
DATASET_CLASS = pla... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from tensorflow_datasets.image import places365_small
import tensorflow_datasets.testing as tfds_test
class Places365SmallTest(tfds_test.DatasetBuilderTestCase):
DATASET_CLASS = pla... | Fix in test file key error | Fix in test file key error
| Python | apache-2.0 | tensorflow/datasets,tensorflow/datasets,tensorflow/datasets,tensorflow/datasets,tensorflow/datasets | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from tensorflow_datasets.image import places365_small
import tensorflow_datasets.testing as tfds_test
class Places365SmallTest(tfds_test.DatasetBuilderTestCase):
DATASET_CLASS = pla... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from tensorflow_datasets.image import places365_small
import tensorflow_datasets.testing as tfds_test
class Places365SmallTest(tfds_test.DatasetBuilderTestCase):
DATASET_CLASS = pla... | <commit_before>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from tensorflow_datasets.image import places365_small
import tensorflow_datasets.testing as tfds_test
class Places365SmallTest(tfds_test.DatasetBuilderTestCase):
DATA... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from tensorflow_datasets.image import places365_small
import tensorflow_datasets.testing as tfds_test
class Places365SmallTest(tfds_test.DatasetBuilderTestCase):
DATASET_CLASS = pla... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from tensorflow_datasets.image import places365_small
import tensorflow_datasets.testing as tfds_test
class Places365SmallTest(tfds_test.DatasetBuilderTestCase):
DATASET_CLASS = pla... | <commit_before>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from tensorflow_datasets.image import places365_small
import tensorflow_datasets.testing as tfds_test
class Places365SmallTest(tfds_test.DatasetBuilderTestCase):
DATA... |
eda3a836adf4ea1a08b7f75743aaf895e45df562 | sigh/utils.py | sigh/utils.py | import datetime
import misaka
from flask.ext.babel import gettext as _
def timeago(dt):
now = datetime.datetime.now()
delta = now - dt
print delta
if delta < datetime.timedelta(minutes=2):
return _('Just now')
if delta < datetime.timedelta(hours=1):
return _('{} minutes ago').forma... | import datetime
import misaka
from flask.ext.babel import gettext as _
def timeago(dt):
now = datetime.datetime.utcnow()
delta = now - dt
print delta
if delta < datetime.timedelta(minutes=2):
return _('Just now')
if delta < datetime.timedelta(hours=1):
return _('{} minutes ago').fo... | Fix time delta with utcnow | Fix time delta with utcnow
| Python | mit | kxxoling/Programmer-Sign,kxxoling/Programmer-Sign,kxxoling/Programmer-Sign | import datetime
import misaka
from flask.ext.babel import gettext as _
def timeago(dt):
now = datetime.datetime.now()
delta = now - dt
print delta
if delta < datetime.timedelta(minutes=2):
return _('Just now')
if delta < datetime.timedelta(hours=1):
return _('{} minutes ago').forma... | import datetime
import misaka
from flask.ext.babel import gettext as _
def timeago(dt):
now = datetime.datetime.utcnow()
delta = now - dt
print delta
if delta < datetime.timedelta(minutes=2):
return _('Just now')
if delta < datetime.timedelta(hours=1):
return _('{} minutes ago').fo... | <commit_before>import datetime
import misaka
from flask.ext.babel import gettext as _
def timeago(dt):
now = datetime.datetime.now()
delta = now - dt
print delta
if delta < datetime.timedelta(minutes=2):
return _('Just now')
if delta < datetime.timedelta(hours=1):
return _('{} minu... | import datetime
import misaka
from flask.ext.babel import gettext as _
def timeago(dt):
now = datetime.datetime.utcnow()
delta = now - dt
print delta
if delta < datetime.timedelta(minutes=2):
return _('Just now')
if delta < datetime.timedelta(hours=1):
return _('{} minutes ago').fo... | import datetime
import misaka
from flask.ext.babel import gettext as _
def timeago(dt):
now = datetime.datetime.now()
delta = now - dt
print delta
if delta < datetime.timedelta(minutes=2):
return _('Just now')
if delta < datetime.timedelta(hours=1):
return _('{} minutes ago').forma... | <commit_before>import datetime
import misaka
from flask.ext.babel import gettext as _
def timeago(dt):
now = datetime.datetime.now()
delta = now - dt
print delta
if delta < datetime.timedelta(minutes=2):
return _('Just now')
if delta < datetime.timedelta(hours=1):
return _('{} minu... |
664ce646983abc10fc6437b400b18bdca26b48c5 | linter.py | linter.py | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by skulanov,,,
# Copyright (c) 2015 skulanov,,,
#
# License: MIT
#
"""This module exports the Rpmlint plugin class."""
from SublimeLinter.lint import Linter, util
class Rpmlint(Linter):
"""Provides an interface ... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by skulanov,,,
# Copyright (c) 2015 skulanov,,,
#
# License: MIT
#
"""This module exports the Rpmlint plugin class."""
from SublimeLinter.lint import Linter, util
class Rpmlint(Linter):
"""Provides an interface ... | Fix regexp for rpmlint output | Fix regexp for rpmlint output
| Python | mit | SergK/SublimeLinter-contrib-rpmlint | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by skulanov,,,
# Copyright (c) 2015 skulanov,,,
#
# License: MIT
#
"""This module exports the Rpmlint plugin class."""
from SublimeLinter.lint import Linter, util
class Rpmlint(Linter):
"""Provides an interface ... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by skulanov,,,
# Copyright (c) 2015 skulanov,,,
#
# License: MIT
#
"""This module exports the Rpmlint plugin class."""
from SublimeLinter.lint import Linter, util
class Rpmlint(Linter):
"""Provides an interface ... | <commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by skulanov,,,
# Copyright (c) 2015 skulanov,,,
#
# License: MIT
#
"""This module exports the Rpmlint plugin class."""
from SublimeLinter.lint import Linter, util
class Rpmlint(Linter):
"""Provide... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by skulanov,,,
# Copyright (c) 2015 skulanov,,,
#
# License: MIT
#
"""This module exports the Rpmlint plugin class."""
from SublimeLinter.lint import Linter, util
class Rpmlint(Linter):
"""Provides an interface ... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by skulanov,,,
# Copyright (c) 2015 skulanov,,,
#
# License: MIT
#
"""This module exports the Rpmlint plugin class."""
from SublimeLinter.lint import Linter, util
class Rpmlint(Linter):
"""Provides an interface ... | <commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by skulanov,,,
# Copyright (c) 2015 skulanov,,,
#
# License: MIT
#
"""This module exports the Rpmlint plugin class."""
from SublimeLinter.lint import Linter, util
class Rpmlint(Linter):
"""Provide... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.