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
7db366558418f9fb997f8688f4816a500348e5c6
tools/pdb-files.py
tools/pdb-files.py
import os import os.path import sys import zipfile ''' Seeks for *.pdb files from current directory and all child directories. All found pdb files are copied to 'pdb-files.zip' file with their relative file paths. ''' fileList = [] rootdir = os.curdir zip_file_name = "pdb-files.zip" if os.path.isfile(zip_file_name):...
import os import os.path import sys import zipfile ''' Seeks for *.pdb files from current directory and all child directories. All found pdb files are copied to 'pdb-files.zip' file with their relative file paths. ''' fileList = [] rootdir = os.getcwd()[0:-6] # strip the /tools from the end zip_file_name = "Tundra-pd...
Fix py script to package all .pdb files now that its moved to tools.
Fix py script to package all .pdb files now that its moved to tools.
Python
apache-2.0
pharos3d/tundra,BogusCurry/tundra,realXtend/tundra,realXtend/tundra,AlphaStaxLLC/tundra,pharos3d/tundra,realXtend/tundra,jesterKing/naali,BogusCurry/tundra,realXtend/tundra,jesterKing/naali,realXtend/tundra,BogusCurry/tundra,AlphaStaxLLC/tundra,AlphaStaxLLC/tundra,pharos3d/tundra,jesterKing/naali,jesterKing/naali,Alpha...
import os import os.path import sys import zipfile ''' Seeks for *.pdb files from current directory and all child directories. All found pdb files are copied to 'pdb-files.zip' file with their relative file paths. ''' fileList = [] rootdir = os.curdir zip_file_name = "pdb-files.zip" if os.path.isfile(zip_file_name):...
import os import os.path import sys import zipfile ''' Seeks for *.pdb files from current directory and all child directories. All found pdb files are copied to 'pdb-files.zip' file with their relative file paths. ''' fileList = [] rootdir = os.getcwd()[0:-6] # strip the /tools from the end zip_file_name = "Tundra-pd...
<commit_before>import os import os.path import sys import zipfile ''' Seeks for *.pdb files from current directory and all child directories. All found pdb files are copied to 'pdb-files.zip' file with their relative file paths. ''' fileList = [] rootdir = os.curdir zip_file_name = "pdb-files.zip" if os.path.isfile(...
import os import os.path import sys import zipfile ''' Seeks for *.pdb files from current directory and all child directories. All found pdb files are copied to 'pdb-files.zip' file with their relative file paths. ''' fileList = [] rootdir = os.getcwd()[0:-6] # strip the /tools from the end zip_file_name = "Tundra-pd...
import os import os.path import sys import zipfile ''' Seeks for *.pdb files from current directory and all child directories. All found pdb files are copied to 'pdb-files.zip' file with their relative file paths. ''' fileList = [] rootdir = os.curdir zip_file_name = "pdb-files.zip" if os.path.isfile(zip_file_name):...
<commit_before>import os import os.path import sys import zipfile ''' Seeks for *.pdb files from current directory and all child directories. All found pdb files are copied to 'pdb-files.zip' file with their relative file paths. ''' fileList = [] rootdir = os.curdir zip_file_name = "pdb-files.zip" if os.path.isfile(...
42be4a39b9241ff3138efa52b316070713fc552a
people/serializers.py
people/serializers.py
from rest_framework import serializers from people.models import Customer from people.models import InternalUser class CustomerSerializer(serializers.ModelSerializer): phone_number = serializers.IntegerField(validators=[lambda x: len(str(x)) == 10]) class Meta: model = Customer fields = '__al...
from django.contrib.gis import serializers from rest_framework import serializers from people.models import Customer from people.models import InternalUser class CustomerSerializer(serializers.ModelSerializer): phone_number = serializers.IntegerField() def validate_phone_number(self, val): if len(str...
Put validators in phone numbers
Put validators in phone numbers
Python
apache-2.0
rameshgopalakrishnan/v_excel_inventory,rameshgopalakrishnan/v_excel_inventory,rameshgopalakrishnan/v_excel_inventory
from rest_framework import serializers from people.models import Customer from people.models import InternalUser class CustomerSerializer(serializers.ModelSerializer): phone_number = serializers.IntegerField(validators=[lambda x: len(str(x)) == 10]) class Meta: model = Customer fields = '__al...
from django.contrib.gis import serializers from rest_framework import serializers from people.models import Customer from people.models import InternalUser class CustomerSerializer(serializers.ModelSerializer): phone_number = serializers.IntegerField() def validate_phone_number(self, val): if len(str...
<commit_before>from rest_framework import serializers from people.models import Customer from people.models import InternalUser class CustomerSerializer(serializers.ModelSerializer): phone_number = serializers.IntegerField(validators=[lambda x: len(str(x)) == 10]) class Meta: model = Customer ...
from django.contrib.gis import serializers from rest_framework import serializers from people.models import Customer from people.models import InternalUser class CustomerSerializer(serializers.ModelSerializer): phone_number = serializers.IntegerField() def validate_phone_number(self, val): if len(str...
from rest_framework import serializers from people.models import Customer from people.models import InternalUser class CustomerSerializer(serializers.ModelSerializer): phone_number = serializers.IntegerField(validators=[lambda x: len(str(x)) == 10]) class Meta: model = Customer fields = '__al...
<commit_before>from rest_framework import serializers from people.models import Customer from people.models import InternalUser class CustomerSerializer(serializers.ModelSerializer): phone_number = serializers.IntegerField(validators=[lambda x: len(str(x)) == 10]) class Meta: model = Customer ...
326cf5d548e9dcb231cac8d10410c0f589c545a2
cabot/celeryconfig.py
cabot/celeryconfig.py
import os from datetime import timedelta BROKER_URL = os.environ['CELERY_BROKER_URL'] # Set environment variable if you want to run tests without a redis instance CELERY_ALWAYS_EAGER = os.environ.get('CELERY_ALWAYS_EAGER', False) CELERY_RESULT_BACKEND = os.environ.get('CELERY_RESULT_BACKEND', None) CELERY_IMPORTS = ('...
import os from datetime import timedelta from cabot.settings_utils import environ_get_list BROKER_URL = environ_get_list(['CELERY_BROKER_URL', 'CACHE_URL']) # Set environment variable if you want to run tests without a redis instance CELERY_ALWAYS_EAGER = os.environ.get('CELERY_ALWAYS_EAGER', False) CELERY_RESULT_BACK...
Support CACHE_URL for the Celery broker as well.
Support CACHE_URL for the Celery broker as well.
Python
mit
maks-us/cabot,arachnys/cabot,arachnys/cabot,maks-us/cabot,arachnys/cabot,maks-us/cabot,maks-us/cabot,arachnys/cabot
import os from datetime import timedelta BROKER_URL = os.environ['CELERY_BROKER_URL'] # Set environment variable if you want to run tests without a redis instance CELERY_ALWAYS_EAGER = os.environ.get('CELERY_ALWAYS_EAGER', False) CELERY_RESULT_BACKEND = os.environ.get('CELERY_RESULT_BACKEND', None) CELERY_IMPORTS = ('...
import os from datetime import timedelta from cabot.settings_utils import environ_get_list BROKER_URL = environ_get_list(['CELERY_BROKER_URL', 'CACHE_URL']) # Set environment variable if you want to run tests without a redis instance CELERY_ALWAYS_EAGER = os.environ.get('CELERY_ALWAYS_EAGER', False) CELERY_RESULT_BACK...
<commit_before>import os from datetime import timedelta BROKER_URL = os.environ['CELERY_BROKER_URL'] # Set environment variable if you want to run tests without a redis instance CELERY_ALWAYS_EAGER = os.environ.get('CELERY_ALWAYS_EAGER', False) CELERY_RESULT_BACKEND = os.environ.get('CELERY_RESULT_BACKEND', None) CELE...
import os from datetime import timedelta from cabot.settings_utils import environ_get_list BROKER_URL = environ_get_list(['CELERY_BROKER_URL', 'CACHE_URL']) # Set environment variable if you want to run tests without a redis instance CELERY_ALWAYS_EAGER = os.environ.get('CELERY_ALWAYS_EAGER', False) CELERY_RESULT_BACK...
import os from datetime import timedelta BROKER_URL = os.environ['CELERY_BROKER_URL'] # Set environment variable if you want to run tests without a redis instance CELERY_ALWAYS_EAGER = os.environ.get('CELERY_ALWAYS_EAGER', False) CELERY_RESULT_BACKEND = os.environ.get('CELERY_RESULT_BACKEND', None) CELERY_IMPORTS = ('...
<commit_before>import os from datetime import timedelta BROKER_URL = os.environ['CELERY_BROKER_URL'] # Set environment variable if you want to run tests without a redis instance CELERY_ALWAYS_EAGER = os.environ.get('CELERY_ALWAYS_EAGER', False) CELERY_RESULT_BACKEND = os.environ.get('CELERY_RESULT_BACKEND', None) CELE...
ac3819cc978c83db10d4bdd151cc2db4d3c28eaf
wagtail_embed_videos/migrations/0002_collections.py
wagtail_embed_videos/migrations/0002_collections.py
# Generated by Django 2.0.1 on 2018-01-28 01:16 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import wagtail.core.models class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0040_page_draft_title'), ('wagtail_embed_...
# Generated by Django 2.0.1 on 2018-01-28 01:16 from django.conf import settings from django.db import migrations, models import django.db.models.deletion from wagtail.wagtailcore.models import Collection class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0040_page_draft_title'), ...
Change importing in order to make Wagtail<2.0 comp
Change importing in order to make Wagtail<2.0 comp
Python
bsd-3-clause
SalahAdDin/wagtail-embedvideos,SalahAdDin/wagtail-embedvideos,SalahAdDin/wagtail-embedvideos
# Generated by Django 2.0.1 on 2018-01-28 01:16 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import wagtail.core.models class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0040_page_draft_title'), ('wagtail_embed_...
# Generated by Django 2.0.1 on 2018-01-28 01:16 from django.conf import settings from django.db import migrations, models import django.db.models.deletion from wagtail.wagtailcore.models import Collection class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0040_page_draft_title'), ...
<commit_before># Generated by Django 2.0.1 on 2018-01-28 01:16 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import wagtail.core.models class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0040_page_draft_title'), (...
# Generated by Django 2.0.1 on 2018-01-28 01:16 from django.conf import settings from django.db import migrations, models import django.db.models.deletion from wagtail.wagtailcore.models import Collection class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0040_page_draft_title'), ...
# Generated by Django 2.0.1 on 2018-01-28 01:16 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import wagtail.core.models class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0040_page_draft_title'), ('wagtail_embed_...
<commit_before># Generated by Django 2.0.1 on 2018-01-28 01:16 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import wagtail.core.models class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0040_page_draft_title'), (...
99aabf10b091df07a023dbf638cf605c01db1d74
src/pcapi/utils/admin.py
src/pcapi/utils/admin.py
import argparse import os import shutil from pcapi import get_resource def create_skeleton(path): if os.path.exists(path): print 'Directory already exist' return False config_file = get_resource('pcapi.ini.example') # create the folder structure os.makedirs(os.path.join(path, 'data'...
import argparse import os import shutil from pkg_resources import resource_filename def create_skeleton(path): if os.path.exists(path): print 'Directory already exist' return False config_file = resource_filename('pcapi', 'data/pcapi.ini.example') # create the folder structure os.ma...
Use the pkg api for reading the resources in the package
Use the pkg api for reading the resources in the package Issue cobweb-eu/pcapi#18
Python
bsd-3-clause
cobweb-eu/pcapi,xmichael/pcapi,edina/pcapi,xmichael/pcapi,cobweb-eu/pcapi,edina/pcapi
import argparse import os import shutil from pcapi import get_resource def create_skeleton(path): if os.path.exists(path): print 'Directory already exist' return False config_file = get_resource('pcapi.ini.example') # create the folder structure os.makedirs(os.path.join(path, 'data'...
import argparse import os import shutil from pkg_resources import resource_filename def create_skeleton(path): if os.path.exists(path): print 'Directory already exist' return False config_file = resource_filename('pcapi', 'data/pcapi.ini.example') # create the folder structure os.ma...
<commit_before>import argparse import os import shutil from pcapi import get_resource def create_skeleton(path): if os.path.exists(path): print 'Directory already exist' return False config_file = get_resource('pcapi.ini.example') # create the folder structure os.makedirs(os.path.jo...
import argparse import os import shutil from pkg_resources import resource_filename def create_skeleton(path): if os.path.exists(path): print 'Directory already exist' return False config_file = resource_filename('pcapi', 'data/pcapi.ini.example') # create the folder structure os.ma...
import argparse import os import shutil from pcapi import get_resource def create_skeleton(path): if os.path.exists(path): print 'Directory already exist' return False config_file = get_resource('pcapi.ini.example') # create the folder structure os.makedirs(os.path.join(path, 'data'...
<commit_before>import argparse import os import shutil from pcapi import get_resource def create_skeleton(path): if os.path.exists(path): print 'Directory already exist' return False config_file = get_resource('pcapi.ini.example') # create the folder structure os.makedirs(os.path.jo...
b5f980b700707ecc611746f93b1f62650c76c451
pgcrypto_fields/aggregates.py
pgcrypto_fields/aggregates.py
from django.db import models class Decrypt(models.Aggregate): """`Decrypt` creates an alias for `DecryptFunctionSQL`. `alias` is `{self.lookup}__decrypt` where 'decrypt' is `self.name.lower()`. `self.lookup` is defined in `models.Aggregate.__init__`. """ def add_to_query(self, query, alias, col...
from django.db import models from pgcrypto_fields.sql import aggregates class Decrypt(models.Aggregate): """`Decrypt` creates an alias for `DecryptFunctionSQL`. `alias` is `{self.lookup}__decrypt` where 'decrypt' is `self.name.lower()`. `self.lookup` is defined in `models.Aggregate.__init__`. """ ...
Move import to top of the file
Move import to top of the file
Python
bsd-2-clause
incuna/django-pgcrypto-fields,atdsaa/django-pgcrypto-fields
from django.db import models class Decrypt(models.Aggregate): """`Decrypt` creates an alias for `DecryptFunctionSQL`. `alias` is `{self.lookup}__decrypt` where 'decrypt' is `self.name.lower()`. `self.lookup` is defined in `models.Aggregate.__init__`. """ def add_to_query(self, query, alias, col...
from django.db import models from pgcrypto_fields.sql import aggregates class Decrypt(models.Aggregate): """`Decrypt` creates an alias for `DecryptFunctionSQL`. `alias` is `{self.lookup}__decrypt` where 'decrypt' is `self.name.lower()`. `self.lookup` is defined in `models.Aggregate.__init__`. """ ...
<commit_before>from django.db import models class Decrypt(models.Aggregate): """`Decrypt` creates an alias for `DecryptFunctionSQL`. `alias` is `{self.lookup}__decrypt` where 'decrypt' is `self.name.lower()`. `self.lookup` is defined in `models.Aggregate.__init__`. """ def add_to_query(self, qu...
from django.db import models from pgcrypto_fields.sql import aggregates class Decrypt(models.Aggregate): """`Decrypt` creates an alias for `DecryptFunctionSQL`. `alias` is `{self.lookup}__decrypt` where 'decrypt' is `self.name.lower()`. `self.lookup` is defined in `models.Aggregate.__init__`. """ ...
from django.db import models class Decrypt(models.Aggregate): """`Decrypt` creates an alias for `DecryptFunctionSQL`. `alias` is `{self.lookup}__decrypt` where 'decrypt' is `self.name.lower()`. `self.lookup` is defined in `models.Aggregate.__init__`. """ def add_to_query(self, query, alias, col...
<commit_before>from django.db import models class Decrypt(models.Aggregate): """`Decrypt` creates an alias for `DecryptFunctionSQL`. `alias` is `{self.lookup}__decrypt` where 'decrypt' is `self.name.lower()`. `self.lookup` is defined in `models.Aggregate.__init__`. """ def add_to_query(self, qu...
f4807197cb48da72a88a0b12c950902614f4b9f6
celery_bungiesearch/tasks/bulkdelete.py
celery_bungiesearch/tasks/bulkdelete.py
from .celerybungie import CeleryBungieTask from bungiesearch import Bungiesearch from bungiesearch.utils import update_index class BulkDeleteTask(CeleryBungieTask): def run(self, model, instances, **kwargs): settings = Bungiesearch.BUNGIE.get('SIGNALS', {}) buffer_size = settings.get('BUFFER_SIZE...
from .celerybungie import CeleryBungieTask from bungiesearch import Bungiesearch from bungiesearch.utils import update_index from elasticsearch import TransportError class BulkDeleteTask(CeleryBungieTask): def run(self, model, instances, **kwargs): settings = Bungiesearch.BUNGIE.get('SIGNALS', {}) ...
Add error handling code to bulk delete
Add error handling code to bulk delete
Python
mit
afrancis13/celery-bungiesearch
from .celerybungie import CeleryBungieTask from bungiesearch import Bungiesearch from bungiesearch.utils import update_index class BulkDeleteTask(CeleryBungieTask): def run(self, model, instances, **kwargs): settings = Bungiesearch.BUNGIE.get('SIGNALS', {}) buffer_size = settings.get('BUFFER_SIZE...
from .celerybungie import CeleryBungieTask from bungiesearch import Bungiesearch from bungiesearch.utils import update_index from elasticsearch import TransportError class BulkDeleteTask(CeleryBungieTask): def run(self, model, instances, **kwargs): settings = Bungiesearch.BUNGIE.get('SIGNALS', {}) ...
<commit_before>from .celerybungie import CeleryBungieTask from bungiesearch import Bungiesearch from bungiesearch.utils import update_index class BulkDeleteTask(CeleryBungieTask): def run(self, model, instances, **kwargs): settings = Bungiesearch.BUNGIE.get('SIGNALS', {}) buffer_size = settings.g...
from .celerybungie import CeleryBungieTask from bungiesearch import Bungiesearch from bungiesearch.utils import update_index from elasticsearch import TransportError class BulkDeleteTask(CeleryBungieTask): def run(self, model, instances, **kwargs): settings = Bungiesearch.BUNGIE.get('SIGNALS', {}) ...
from .celerybungie import CeleryBungieTask from bungiesearch import Bungiesearch from bungiesearch.utils import update_index class BulkDeleteTask(CeleryBungieTask): def run(self, model, instances, **kwargs): settings = Bungiesearch.BUNGIE.get('SIGNALS', {}) buffer_size = settings.get('BUFFER_SIZE...
<commit_before>from .celerybungie import CeleryBungieTask from bungiesearch import Bungiesearch from bungiesearch.utils import update_index class BulkDeleteTask(CeleryBungieTask): def run(self, model, instances, **kwargs): settings = Bungiesearch.BUNGIE.get('SIGNALS', {}) buffer_size = settings.g...
02bb859424301bf7697a444a50a23c8c834466ab
loldb/__main__.py
loldb/__main__.py
""" Usage: loldb --path=<path> [options] loldb -h | --help loldb --version Options: -p, --path=<path> Location of LoL installation. --lang=<language> Language to output [default: en_US]. -h, --help Display this message. --version Display version number. """ import os import docopt ...
""" Usage: loldb --path=<path> [options] loldb -h | --help loldb --version Options: -p, --path=<path> Location of LoL installation. -o, --out=<path> File path to save json representation. --lang=<language> Language to output [default: en_US]. -h, --help Display this message. --version ...
Save data to file from CLI.
Save data to file from CLI.
Python
mit
Met48/League-of-Legends-DB
""" Usage: loldb --path=<path> [options] loldb -h | --help loldb --version Options: -p, --path=<path> Location of LoL installation. --lang=<language> Language to output [default: en_US]. -h, --help Display this message. --version Display version number. """ import os import docopt ...
""" Usage: loldb --path=<path> [options] loldb -h | --help loldb --version Options: -p, --path=<path> Location of LoL installation. -o, --out=<path> File path to save json representation. --lang=<language> Language to output [default: en_US]. -h, --help Display this message. --version ...
<commit_before>""" Usage: loldb --path=<path> [options] loldb -h | --help loldb --version Options: -p, --path=<path> Location of LoL installation. --lang=<language> Language to output [default: en_US]. -h, --help Display this message. --version Display version number. """ import os ...
""" Usage: loldb --path=<path> [options] loldb -h | --help loldb --version Options: -p, --path=<path> Location of LoL installation. -o, --out=<path> File path to save json representation. --lang=<language> Language to output [default: en_US]. -h, --help Display this message. --version ...
""" Usage: loldb --path=<path> [options] loldb -h | --help loldb --version Options: -p, --path=<path> Location of LoL installation. --lang=<language> Language to output [default: en_US]. -h, --help Display this message. --version Display version number. """ import os import docopt ...
<commit_before>""" Usage: loldb --path=<path> [options] loldb -h | --help loldb --version Options: -p, --path=<path> Location of LoL installation. --lang=<language> Language to output [default: en_US]. -h, --help Display this message. --version Display version number. """ import os ...
78bbb6cbf145ee7d78c41f39b4f078d986265232
comics/comics/pennyarcade.py
comics/comics/pennyarcade.py
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Penny Arcade" language = "en" url = "http://penny-arcade.com/" start_date = "1998-11-18" rights = "Mike Krahulik & Jerry Holkins" class Crawler...
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Penny Arcade" language = "en" url = "http://penny-arcade.com/" start_date = "1998-11-18" rights = "Mike Krahulik & Jerry Holkins" class Crawler...
Check "Penny Arcade" for 404 page without 404 header
Check "Penny Arcade" for 404 page without 404 header
Python
agpl-3.0
jodal/comics,jodal/comics,datagutten/comics,jodal/comics,datagutten/comics,datagutten/comics,datagutten/comics,jodal/comics
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Penny Arcade" language = "en" url = "http://penny-arcade.com/" start_date = "1998-11-18" rights = "Mike Krahulik & Jerry Holkins" class Crawler...
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Penny Arcade" language = "en" url = "http://penny-arcade.com/" start_date = "1998-11-18" rights = "Mike Krahulik & Jerry Holkins" class Crawler...
<commit_before>from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Penny Arcade" language = "en" url = "http://penny-arcade.com/" start_date = "1998-11-18" rights = "Mike Krahulik & Jerry Holkins" ...
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Penny Arcade" language = "en" url = "http://penny-arcade.com/" start_date = "1998-11-18" rights = "Mike Krahulik & Jerry Holkins" class Crawler...
from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Penny Arcade" language = "en" url = "http://penny-arcade.com/" start_date = "1998-11-18" rights = "Mike Krahulik & Jerry Holkins" class Crawler...
<commit_before>from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Penny Arcade" language = "en" url = "http://penny-arcade.com/" start_date = "1998-11-18" rights = "Mike Krahulik & Jerry Holkins" ...
39ebab1a41975bd37549129e2b915c99d153ee0a
src/bindings/pygaia/scripts/classification/balanced_sampling.py
src/bindings/pygaia/scripts/classification/balanced_sampling.py
# This script creates a balanced ground truth given an unbalanced on by applying # random sampling. The size of the resulting classes equals to the minimum size # among original classes. import sys import yaml from random import shuffle try: input_gt = sys.argv[1] balanced_gt = sys.argv[2] except: print...
# This script creates a balanced ground truth given an unbalanced on by applying # random sampling. The size of the resulting classes equals to the minimum size # among original classes. import sys import yaml from random import shuffle try: input_gt = sys.argv[1] balanced_gt = sys.argv[2] except: print...
Fix previous commit (balancing scripts)
Fix previous commit (balancing scripts)
Python
agpl-3.0
kartikgupta0909/gaia,ChristianFrisson/gaia,MTG/gaia,kartikgupta0909/gaia,kartikgupta0909/gaia,ChristianFrisson/gaia,ChristianFrisson/gaia,MTG/gaia,MTG/gaia,ChristianFrisson/gaia,kartikgupta0909/gaia,MTG/gaia
# This script creates a balanced ground truth given an unbalanced on by applying # random sampling. The size of the resulting classes equals to the minimum size # among original classes. import sys import yaml from random import shuffle try: input_gt = sys.argv[1] balanced_gt = sys.argv[2] except: print...
# This script creates a balanced ground truth given an unbalanced on by applying # random sampling. The size of the resulting classes equals to the minimum size # among original classes. import sys import yaml from random import shuffle try: input_gt = sys.argv[1] balanced_gt = sys.argv[2] except: print...
<commit_before># This script creates a balanced ground truth given an unbalanced on by applying # random sampling. The size of the resulting classes equals to the minimum size # among original classes. import sys import yaml from random import shuffle try: input_gt = sys.argv[1] balanced_gt = sys.argv[2] ex...
# This script creates a balanced ground truth given an unbalanced on by applying # random sampling. The size of the resulting classes equals to the minimum size # among original classes. import sys import yaml from random import shuffle try: input_gt = sys.argv[1] balanced_gt = sys.argv[2] except: print...
# This script creates a balanced ground truth given an unbalanced on by applying # random sampling. The size of the resulting classes equals to the minimum size # among original classes. import sys import yaml from random import shuffle try: input_gt = sys.argv[1] balanced_gt = sys.argv[2] except: print...
<commit_before># This script creates a balanced ground truth given an unbalanced on by applying # random sampling. The size of the resulting classes equals to the minimum size # among original classes. import sys import yaml from random import shuffle try: input_gt = sys.argv[1] balanced_gt = sys.argv[2] ex...
5458a44ed193a7c4a37a3414e860a23dc5564c39
github3/repos/deployment.py
github3/repos/deployment.py
# -*- coding: utf-8 -*- from github3.models import GitHubCore from github3.users import User class Deployment(GitHubCore): CUSTOM_HEADERS = { 'Accept': 'application/vnd.github.cannonball-preview+json' } def __init__(self, deployment, session=None): super(Deployment, self).__init__(dep...
# -*- coding: utf-8 -*- from github3.models import GitHubCore from github3.users import User class Deployment(GitHubCore): CUSTOM_HEADERS = { 'Accept': 'application/vnd.github.cannonball-preview+json' } def __init__(self, deployment, session=None): super(Deployment, self).__init__(dep...
Add repr to Deployment class
Add repr to Deployment class
Python
bsd-3-clause
wbrefvem/github3.py,icio/github3.py,jim-minter/github3.py,itsmemattchung/github3.py,sigmavirus24/github3.py,ueg1990/github3.py,agamdua/github3.py,balloob/github3.py,krxsky/github3.py,degustaf/github3.py,christophelec/github3.py,h4ck3rm1k3/github3.py
# -*- coding: utf-8 -*- from github3.models import GitHubCore from github3.users import User class Deployment(GitHubCore): CUSTOM_HEADERS = { 'Accept': 'application/vnd.github.cannonball-preview+json' } def __init__(self, deployment, session=None): super(Deployment, self).__init__(dep...
# -*- coding: utf-8 -*- from github3.models import GitHubCore from github3.users import User class Deployment(GitHubCore): CUSTOM_HEADERS = { 'Accept': 'application/vnd.github.cannonball-preview+json' } def __init__(self, deployment, session=None): super(Deployment, self).__init__(dep...
<commit_before># -*- coding: utf-8 -*- from github3.models import GitHubCore from github3.users import User class Deployment(GitHubCore): CUSTOM_HEADERS = { 'Accept': 'application/vnd.github.cannonball-preview+json' } def __init__(self, deployment, session=None): super(Deployment, sel...
# -*- coding: utf-8 -*- from github3.models import GitHubCore from github3.users import User class Deployment(GitHubCore): CUSTOM_HEADERS = { 'Accept': 'application/vnd.github.cannonball-preview+json' } def __init__(self, deployment, session=None): super(Deployment, self).__init__(dep...
# -*- coding: utf-8 -*- from github3.models import GitHubCore from github3.users import User class Deployment(GitHubCore): CUSTOM_HEADERS = { 'Accept': 'application/vnd.github.cannonball-preview+json' } def __init__(self, deployment, session=None): super(Deployment, self).__init__(dep...
<commit_before># -*- coding: utf-8 -*- from github3.models import GitHubCore from github3.users import User class Deployment(GitHubCore): CUSTOM_HEADERS = { 'Accept': 'application/vnd.github.cannonball-preview+json' } def __init__(self, deployment, session=None): super(Deployment, sel...
8ee8c42cd4d4be09d47cb7ebf5941583183bb3f3
logger/utilities.py
logger/utilities.py
#!/usr/bin/env python3 """Small utility functions for use in various places.""" __all__ = ["pick", "is_dunder", "convert_to_od"] import collections def pick(arg, default): """Handler for default versus given argument.""" return default if arg is None else arg def is_dunder(name): """Return True if a __...
#!/usr/bin/env python3 """Small utility functions for use in various places.""" __all__ = ["pick", "is_dunder", "convert_to_od"] import collections import itertools def pick(arg, default): """Handler for default versus given argument.""" return default if arg is None else arg def is_dunder(name): """Re...
Add a 'counter_to_iterable' utility function
Add a 'counter_to_iterable' utility function
Python
bsd-2-clause
Vgr255/logging
#!/usr/bin/env python3 """Small utility functions for use in various places.""" __all__ = ["pick", "is_dunder", "convert_to_od"] import collections def pick(arg, default): """Handler for default versus given argument.""" return default if arg is None else arg def is_dunder(name): """Return True if a __...
#!/usr/bin/env python3 """Small utility functions for use in various places.""" __all__ = ["pick", "is_dunder", "convert_to_od"] import collections import itertools def pick(arg, default): """Handler for default versus given argument.""" return default if arg is None else arg def is_dunder(name): """Re...
<commit_before>#!/usr/bin/env python3 """Small utility functions for use in various places.""" __all__ = ["pick", "is_dunder", "convert_to_od"] import collections def pick(arg, default): """Handler for default versus given argument.""" return default if arg is None else arg def is_dunder(name): """Retu...
#!/usr/bin/env python3 """Small utility functions for use in various places.""" __all__ = ["pick", "is_dunder", "convert_to_od"] import collections import itertools def pick(arg, default): """Handler for default versus given argument.""" return default if arg is None else arg def is_dunder(name): """Re...
#!/usr/bin/env python3 """Small utility functions for use in various places.""" __all__ = ["pick", "is_dunder", "convert_to_od"] import collections def pick(arg, default): """Handler for default versus given argument.""" return default if arg is None else arg def is_dunder(name): """Return True if a __...
<commit_before>#!/usr/bin/env python3 """Small utility functions for use in various places.""" __all__ = ["pick", "is_dunder", "convert_to_od"] import collections def pick(arg, default): """Handler for default versus given argument.""" return default if arg is None else arg def is_dunder(name): """Retu...
4f48fa8636000a1b780c962288bb588b2760465f
pyheufybot/utils/fileutils.py
pyheufybot/utils/fileutils.py
import codecs, os def readFile(filePath): try: with open(filePath, "r") as f: return f.read() except Exception as e: print "*** ERROR: An exception occurred while reading file \"{}\" ({})".format(filePath, e) return None def writeFile(filePath, line, append=False): try:...
import codecs, os, time def readFile(filePath): try: with open(filePath, "r") as f: return f.read() except Exception as e: today = time.strftime("[%H:%M:%S]") print "{} *** ERROR: An exception occurred while reading file \"{}\" ({})".format(today, filePath, e) return...
Improve error logging in file IO
Improve error logging in file IO
Python
mit
Heufneutje/PyHeufyBot,Heufneutje/PyHeufyBot
import codecs, os def readFile(filePath): try: with open(filePath, "r") as f: return f.read() except Exception as e: print "*** ERROR: An exception occurred while reading file \"{}\" ({})".format(filePath, e) return None def writeFile(filePath, line, append=False): try:...
import codecs, os, time def readFile(filePath): try: with open(filePath, "r") as f: return f.read() except Exception as e: today = time.strftime("[%H:%M:%S]") print "{} *** ERROR: An exception occurred while reading file \"{}\" ({})".format(today, filePath, e) return...
<commit_before>import codecs, os def readFile(filePath): try: with open(filePath, "r") as f: return f.read() except Exception as e: print "*** ERROR: An exception occurred while reading file \"{}\" ({})".format(filePath, e) return None def writeFile(filePath, line, append=F...
import codecs, os, time def readFile(filePath): try: with open(filePath, "r") as f: return f.read() except Exception as e: today = time.strftime("[%H:%M:%S]") print "{} *** ERROR: An exception occurred while reading file \"{}\" ({})".format(today, filePath, e) return...
import codecs, os def readFile(filePath): try: with open(filePath, "r") as f: return f.read() except Exception as e: print "*** ERROR: An exception occurred while reading file \"{}\" ({})".format(filePath, e) return None def writeFile(filePath, line, append=False): try:...
<commit_before>import codecs, os def readFile(filePath): try: with open(filePath, "r") as f: return f.read() except Exception as e: print "*** ERROR: An exception occurred while reading file \"{}\" ({})".format(filePath, e) return None def writeFile(filePath, line, append=F...
c2128be32df870a601224be9f7e746dbd9cb72ee
makerscience_profile/api.py
makerscience_profile/api.py
from .models import MakerScienceProfile from tastypie.resources import ModelResource from tastypie.authorization import DjangoAuthorization from tastypie import fields from tastypie.constants import ALL_WITH_RELATIONS from dataserver.authentication import AnonymousApiKeyAuthentication from accounts.api import ProfileRe...
from .models import MakerScienceProfile from tastypie.resources import ModelResource from tastypie.authorization import DjangoAuthorization from tastypie import fields from tastypie.constants import ALL_WITH_RELATIONS from dataserver.authentication import AnonymousApiKeyAuthentication from accounts.api import ProfileRe...
Add teams field in MakerScienceProfileResource
Add teams field in MakerScienceProfileResource
Python
agpl-3.0
atiberghien/makerscience-server,atiberghien/makerscience-server
from .models import MakerScienceProfile from tastypie.resources import ModelResource from tastypie.authorization import DjangoAuthorization from tastypie import fields from tastypie.constants import ALL_WITH_RELATIONS from dataserver.authentication import AnonymousApiKeyAuthentication from accounts.api import ProfileRe...
from .models import MakerScienceProfile from tastypie.resources import ModelResource from tastypie.authorization import DjangoAuthorization from tastypie import fields from tastypie.constants import ALL_WITH_RELATIONS from dataserver.authentication import AnonymousApiKeyAuthentication from accounts.api import ProfileRe...
<commit_before>from .models import MakerScienceProfile from tastypie.resources import ModelResource from tastypie.authorization import DjangoAuthorization from tastypie import fields from tastypie.constants import ALL_WITH_RELATIONS from dataserver.authentication import AnonymousApiKeyAuthentication from accounts.api i...
from .models import MakerScienceProfile from tastypie.resources import ModelResource from tastypie.authorization import DjangoAuthorization from tastypie import fields from tastypie.constants import ALL_WITH_RELATIONS from dataserver.authentication import AnonymousApiKeyAuthentication from accounts.api import ProfileRe...
from .models import MakerScienceProfile from tastypie.resources import ModelResource from tastypie.authorization import DjangoAuthorization from tastypie import fields from tastypie.constants import ALL_WITH_RELATIONS from dataserver.authentication import AnonymousApiKeyAuthentication from accounts.api import ProfileRe...
<commit_before>from .models import MakerScienceProfile from tastypie.resources import ModelResource from tastypie.authorization import DjangoAuthorization from tastypie import fields from tastypie.constants import ALL_WITH_RELATIONS from dataserver.authentication import AnonymousApiKeyAuthentication from accounts.api i...
4189c6cc8d6e9ec83753ce2f7da39273a553196e
third_party/__init__.py
third_party/__init__.py
import os.path import sys # This bit of evil should inject third_party into the path for relative imports. sys.path.append(os.path.dirname(__file__))
import os.path import sys # This bit of evil should inject third_party into the path for relative imports. sys.path.insert(1, os.path.dirname(__file__))
Insert third_party into the second slot of sys.path rather than the last slot
Insert third_party into the second slot of sys.path rather than the last slot
Python
apache-2.0
catap/namebench,jimmsta/namebench-1
import os.path import sys # This bit of evil should inject third_party into the path for relative imports. sys.path.append(os.path.dirname(__file__)) Insert third_party into the second slot of sys.path rather than the last slot
import os.path import sys # This bit of evil should inject third_party into the path for relative imports. sys.path.insert(1, os.path.dirname(__file__))
<commit_before>import os.path import sys # This bit of evil should inject third_party into the path for relative imports. sys.path.append(os.path.dirname(__file__)) <commit_msg>Insert third_party into the second slot of sys.path rather than the last slot<commit_after>
import os.path import sys # This bit of evil should inject third_party into the path for relative imports. sys.path.insert(1, os.path.dirname(__file__))
import os.path import sys # This bit of evil should inject third_party into the path for relative imports. sys.path.append(os.path.dirname(__file__)) Insert third_party into the second slot of sys.path rather than the last slotimport os.path import sys # This bit of evil should inject third_party into the path for re...
<commit_before>import os.path import sys # This bit of evil should inject third_party into the path for relative imports. sys.path.append(os.path.dirname(__file__)) <commit_msg>Insert third_party into the second slot of sys.path rather than the last slot<commit_after>import os.path import sys # This bit of evil shoul...
0321591b9a9596c876e615ac9bacfe63e2c44b2c
midterm/problem8.py
midterm/problem8.py
# Problem 8 # 20.0 points possible (graded) # Implement a function that meets the specifications below. # For example, the following functions, f, g, and test code: # def f(i): # return i + 2 # def g(i): # return i > 5 # L = [0, -10, 5, 6, -4] # print(applyF_filterG(L, f, g)) # print(L) # Should print: # 6 ...
# Problem 8 # 20.0 points possible (graded) # Implement a function that meets the specifications below. # For example, the following functions, f, g, and test code: # def f(i): # return i + 2 # def g(i): # return i > 5 # L = [0, -10, 5, 6, -4] # print(applyF_filterG(L, f, g)) # print(L) # Should print: # 6 ...
Fix applyF_filterG function to pass test case
Fix applyF_filterG function to pass test case
Python
mit
Kunal57/MIT_6.00.1x
# Problem 8 # 20.0 points possible (graded) # Implement a function that meets the specifications below. # For example, the following functions, f, g, and test code: # def f(i): # return i + 2 # def g(i): # return i > 5 # L = [0, -10, 5, 6, -4] # print(applyF_filterG(L, f, g)) # print(L) # Should print: # 6 ...
# Problem 8 # 20.0 points possible (graded) # Implement a function that meets the specifications below. # For example, the following functions, f, g, and test code: # def f(i): # return i + 2 # def g(i): # return i > 5 # L = [0, -10, 5, 6, -4] # print(applyF_filterG(L, f, g)) # print(L) # Should print: # 6 ...
<commit_before># Problem 8 # 20.0 points possible (graded) # Implement a function that meets the specifications below. # For example, the following functions, f, g, and test code: # def f(i): # return i + 2 # def g(i): # return i > 5 # L = [0, -10, 5, 6, -4] # print(applyF_filterG(L, f, g)) # print(L) # Sho...
# Problem 8 # 20.0 points possible (graded) # Implement a function that meets the specifications below. # For example, the following functions, f, g, and test code: # def f(i): # return i + 2 # def g(i): # return i > 5 # L = [0, -10, 5, 6, -4] # print(applyF_filterG(L, f, g)) # print(L) # Should print: # 6 ...
# Problem 8 # 20.0 points possible (graded) # Implement a function that meets the specifications below. # For example, the following functions, f, g, and test code: # def f(i): # return i + 2 # def g(i): # return i > 5 # L = [0, -10, 5, 6, -4] # print(applyF_filterG(L, f, g)) # print(L) # Should print: # 6 ...
<commit_before># Problem 8 # 20.0 points possible (graded) # Implement a function that meets the specifications below. # For example, the following functions, f, g, and test code: # def f(i): # return i + 2 # def g(i): # return i > 5 # L = [0, -10, 5, 6, -4] # print(applyF_filterG(L, f, g)) # print(L) # Sho...
bb26d56cbce6d7f5d12bd9a2e5c428df6bf4b1d7
fabfile.py
fabfile.py
import sys import sh from fabric import api as fab sed = sh.sed.bake('-i bak -e') TRAVIS_YAML = '.travis.yml' REPLACE_LANGUAGE = 's/language: .*/language: {}/' def is_dirty(): return "" != sh.git.status(porcelain=True).strip() def release(language, message): if is_dirty(): sys.exit("Repo must be i...
import sys import sh from fabric import api as fab sed = sh.sed.bake('-i bak -e') TRAVIS_YAML = '.travis.yml' REPLACE_LANGUAGE = 's/language: .*/language: {}/' def is_dirty(): return "" != sh.git.status(porcelain=True).strip() def release(language, message): if is_dirty(): sys.exit("Repo must be i...
Allow empty so we can force new build
Allow empty so we can force new build
Python
bsd-3-clause
datamicroscopes/release,jzf2101/release,datamicroscopes/release,jzf2101/release
import sys import sh from fabric import api as fab sed = sh.sed.bake('-i bak -e') TRAVIS_YAML = '.travis.yml' REPLACE_LANGUAGE = 's/language: .*/language: {}/' def is_dirty(): return "" != sh.git.status(porcelain=True).strip() def release(language, message): if is_dirty(): sys.exit("Repo must be i...
import sys import sh from fabric import api as fab sed = sh.sed.bake('-i bak -e') TRAVIS_YAML = '.travis.yml' REPLACE_LANGUAGE = 's/language: .*/language: {}/' def is_dirty(): return "" != sh.git.status(porcelain=True).strip() def release(language, message): if is_dirty(): sys.exit("Repo must be i...
<commit_before>import sys import sh from fabric import api as fab sed = sh.sed.bake('-i bak -e') TRAVIS_YAML = '.travis.yml' REPLACE_LANGUAGE = 's/language: .*/language: {}/' def is_dirty(): return "" != sh.git.status(porcelain=True).strip() def release(language, message): if is_dirty(): sys.exit(...
import sys import sh from fabric import api as fab sed = sh.sed.bake('-i bak -e') TRAVIS_YAML = '.travis.yml' REPLACE_LANGUAGE = 's/language: .*/language: {}/' def is_dirty(): return "" != sh.git.status(porcelain=True).strip() def release(language, message): if is_dirty(): sys.exit("Repo must be i...
import sys import sh from fabric import api as fab sed = sh.sed.bake('-i bak -e') TRAVIS_YAML = '.travis.yml' REPLACE_LANGUAGE = 's/language: .*/language: {}/' def is_dirty(): return "" != sh.git.status(porcelain=True).strip() def release(language, message): if is_dirty(): sys.exit("Repo must be i...
<commit_before>import sys import sh from fabric import api as fab sed = sh.sed.bake('-i bak -e') TRAVIS_YAML = '.travis.yml' REPLACE_LANGUAGE = 's/language: .*/language: {}/' def is_dirty(): return "" != sh.git.status(porcelain=True).strip() def release(language, message): if is_dirty(): sys.exit(...
2201a23aa0407496402f0766d09f5df9951b9709
models/employees.py
models/employees.py
import datetime from openedoo.core.libs.tools import hashing_werkzeug from openedoo_project import db from .users import User class Employee(User): @staticmethod def is_exist(self, username): employee = self.query.get(username=username).first() return employee @classmethod def get_pu...
import datetime from openedoo.core.libs.tools import hashing_werkzeug from openedoo_project import db from .users import User class Employee(User): @classmethod def is_exist(self, username): employee = self.query.get(username=username).first() return employee @classmethod def get_pub...
Change bad function decorator implementation
Change bad function decorator implementation
Python
mit
openedoo/module_employee,openedoo/module_employee,openedoo/module_employee
import datetime from openedoo.core.libs.tools import hashing_werkzeug from openedoo_project import db from .users import User class Employee(User): @staticmethod def is_exist(self, username): employee = self.query.get(username=username).first() return employee @classmethod def get_pu...
import datetime from openedoo.core.libs.tools import hashing_werkzeug from openedoo_project import db from .users import User class Employee(User): @classmethod def is_exist(self, username): employee = self.query.get(username=username).first() return employee @classmethod def get_pub...
<commit_before>import datetime from openedoo.core.libs.tools import hashing_werkzeug from openedoo_project import db from .users import User class Employee(User): @staticmethod def is_exist(self, username): employee = self.query.get(username=username).first() return employee @classmethod...
import datetime from openedoo.core.libs.tools import hashing_werkzeug from openedoo_project import db from .users import User class Employee(User): @classmethod def is_exist(self, username): employee = self.query.get(username=username).first() return employee @classmethod def get_pub...
import datetime from openedoo.core.libs.tools import hashing_werkzeug from openedoo_project import db from .users import User class Employee(User): @staticmethod def is_exist(self, username): employee = self.query.get(username=username).first() return employee @classmethod def get_pu...
<commit_before>import datetime from openedoo.core.libs.tools import hashing_werkzeug from openedoo_project import db from .users import User class Employee(User): @staticmethod def is_exist(self, username): employee = self.query.get(username=username).first() return employee @classmethod...
5be4dec175c9e672ec5e7e011be604ad39459565
apps/polls/admin.py
apps/polls/admin.py
from django.contrib import admin from apps.polls.models import Poll, Choice class ChoiceInline(admin.TabularInline): model = Choice extra = 3 class PollAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['question']}), ('Date information', {'fields': ['pub_date'], 'classes': ['colla...
from django.contrib import admin from apps.polls.models import Poll, Choice class ChoiceInline(admin.TabularInline): model = Choice extra = 3 class PollAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['question']}), ('Date information', {'fields': ['pub_date'], 'classes': ['colla...
Add date_hierarchy = 'pub_date' to PollAdmin
Add date_hierarchy = 'pub_date' to PollAdmin
Python
bsd-3-clause
teracyhq/django-tutorial,datphan/teracy-tutorial
from django.contrib import admin from apps.polls.models import Poll, Choice class ChoiceInline(admin.TabularInline): model = Choice extra = 3 class PollAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['question']}), ('Date information', {'fields': ['pub_date'], 'classes': ['colla...
from django.contrib import admin from apps.polls.models import Poll, Choice class ChoiceInline(admin.TabularInline): model = Choice extra = 3 class PollAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['question']}), ('Date information', {'fields': ['pub_date'], 'classes': ['colla...
<commit_before>from django.contrib import admin from apps.polls.models import Poll, Choice class ChoiceInline(admin.TabularInline): model = Choice extra = 3 class PollAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['question']}), ('Date information', {'fields': ['pub_date'], 'cl...
from django.contrib import admin from apps.polls.models import Poll, Choice class ChoiceInline(admin.TabularInline): model = Choice extra = 3 class PollAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['question']}), ('Date information', {'fields': ['pub_date'], 'classes': ['colla...
from django.contrib import admin from apps.polls.models import Poll, Choice class ChoiceInline(admin.TabularInline): model = Choice extra = 3 class PollAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['question']}), ('Date information', {'fields': ['pub_date'], 'classes': ['colla...
<commit_before>from django.contrib import admin from apps.polls.models import Poll, Choice class ChoiceInline(admin.TabularInline): model = Choice extra = 3 class PollAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['question']}), ('Date information', {'fields': ['pub_date'], 'cl...
143c0188566ac07ac3fdb9e6dfca8863cc169bbb
ts3observer/observer.py
ts3observer/observer.py
''' Created on Nov 9, 2014 @author: fechnert ''' import yaml import logging import features class Configuration(dict): ''' Read and provide the yaml config ''' def __init__(self, path): ''' Initialize the file ''' with open(path, 'r') as f: self.update(yaml.load(f)) class Supe...
''' Created on Nov 9, 2014 @author: fechnert ''' import yaml import logging import features class Configuration(dict): ''' Read and provide the yaml config ''' def __init__(self, path): ''' Initialize the file ''' with open(path, 'r') as f: self.update(yaml.load(f)) class Supe...
Add client and channel models
Add client and channel models
Python
mit
HWDexperte/ts3observer
''' Created on Nov 9, 2014 @author: fechnert ''' import yaml import logging import features class Configuration(dict): ''' Read and provide the yaml config ''' def __init__(self, path): ''' Initialize the file ''' with open(path, 'r') as f: self.update(yaml.load(f)) class Supe...
''' Created on Nov 9, 2014 @author: fechnert ''' import yaml import logging import features class Configuration(dict): ''' Read and provide the yaml config ''' def __init__(self, path): ''' Initialize the file ''' with open(path, 'r') as f: self.update(yaml.load(f)) class Supe...
<commit_before>''' Created on Nov 9, 2014 @author: fechnert ''' import yaml import logging import features class Configuration(dict): ''' Read and provide the yaml config ''' def __init__(self, path): ''' Initialize the file ''' with open(path, 'r') as f: self.update(yaml.load(f...
''' Created on Nov 9, 2014 @author: fechnert ''' import yaml import logging import features class Configuration(dict): ''' Read and provide the yaml config ''' def __init__(self, path): ''' Initialize the file ''' with open(path, 'r') as f: self.update(yaml.load(f)) class Supe...
''' Created on Nov 9, 2014 @author: fechnert ''' import yaml import logging import features class Configuration(dict): ''' Read and provide the yaml config ''' def __init__(self, path): ''' Initialize the file ''' with open(path, 'r') as f: self.update(yaml.load(f)) class Supe...
<commit_before>''' Created on Nov 9, 2014 @author: fechnert ''' import yaml import logging import features class Configuration(dict): ''' Read and provide the yaml config ''' def __init__(self, path): ''' Initialize the file ''' with open(path, 'r') as f: self.update(yaml.load(f...
1cab84d3f3726df2a7cfe4e5ad8efee81051c73e
tests/test_patched_stream.py
tests/test_patched_stream.py
import nose import StringIO import cle def test_patched_stream(): stream = StringIO.StringIO('0123456789abcdef') stream1 = cle.PatchedStream(stream, [(2, 'AA')]) stream1.seek(0) nose.tools.assert_equal(stream1.read(), '01AA456789abcdef') stream2 = cle.PatchedStream(stream, [(2, 'AA')]) strea...
import nose import StringIO import os import cle tests_path = os.path.join(os.path.dirname(__file__), '..', '..', 'binaries', 'tests') def test_patched_stream(): stream = StringIO.StringIO('0123456789abcdef') stream1 = cle.PatchedStream(stream, [(2, 'AA')]) stream1.seek(0) nose.tools.assert_equal(st...
Add tests for loading binaries with malformed sections
Add tests for loading binaries with malformed sections
Python
bsd-2-clause
angr/cle
import nose import StringIO import cle def test_patched_stream(): stream = StringIO.StringIO('0123456789abcdef') stream1 = cle.PatchedStream(stream, [(2, 'AA')]) stream1.seek(0) nose.tools.assert_equal(stream1.read(), '01AA456789abcdef') stream2 = cle.PatchedStream(stream, [(2, 'AA')]) strea...
import nose import StringIO import os import cle tests_path = os.path.join(os.path.dirname(__file__), '..', '..', 'binaries', 'tests') def test_patched_stream(): stream = StringIO.StringIO('0123456789abcdef') stream1 = cle.PatchedStream(stream, [(2, 'AA')]) stream1.seek(0) nose.tools.assert_equal(st...
<commit_before>import nose import StringIO import cle def test_patched_stream(): stream = StringIO.StringIO('0123456789abcdef') stream1 = cle.PatchedStream(stream, [(2, 'AA')]) stream1.seek(0) nose.tools.assert_equal(stream1.read(), '01AA456789abcdef') stream2 = cle.PatchedStream(stream, [(2, 'A...
import nose import StringIO import os import cle tests_path = os.path.join(os.path.dirname(__file__), '..', '..', 'binaries', 'tests') def test_patched_stream(): stream = StringIO.StringIO('0123456789abcdef') stream1 = cle.PatchedStream(stream, [(2, 'AA')]) stream1.seek(0) nose.tools.assert_equal(st...
import nose import StringIO import cle def test_patched_stream(): stream = StringIO.StringIO('0123456789abcdef') stream1 = cle.PatchedStream(stream, [(2, 'AA')]) stream1.seek(0) nose.tools.assert_equal(stream1.read(), '01AA456789abcdef') stream2 = cle.PatchedStream(stream, [(2, 'AA')]) strea...
<commit_before>import nose import StringIO import cle def test_patched_stream(): stream = StringIO.StringIO('0123456789abcdef') stream1 = cle.PatchedStream(stream, [(2, 'AA')]) stream1.seek(0) nose.tools.assert_equal(stream1.read(), '01AA456789abcdef') stream2 = cle.PatchedStream(stream, [(2, 'A...
de2a2e296ba1cb60a333fc52fef39d260e5ad4e5
tests/basics/unary_op.py
tests/basics/unary_op.py
x = 1 print(+x) print(-x) print(~x) print(not None) print(not False) print(not True) print(not 0) print(not 1) print(not -1) print(not ()) print(not (1,)) print(not []) print(not [1,]) print(not {}) print(not {1:1})
x = 1 print(+x) print(-x) print(~x) print(not None) print(not False) print(not True) print(not 0) print(not 1) print(not -1) print(not ()) print(not (1,)) print(not []) print(not [1,]) print(not {}) print(not {1:1}) # check user instance class A: pass print(not A()) # check user instances derived from builtins class...
Add test for "not" of a user defined class.
tests: Add test for "not" of a user defined class.
Python
mit
lowRISC/micropython,Timmenem/micropython,lowRISC/micropython,drrk/micropython,PappaPeppar/micropython,ernesto-g/micropython,deshipu/micropython,pozetroninc/micropython,AriZuu/micropython,Peetz0r/micropython-esp32,AriZuu/micropython,jmarcelino/pycom-micropython,redbear/micropython,micropython/micropython-esp32,turbinenr...
x = 1 print(+x) print(-x) print(~x) print(not None) print(not False) print(not True) print(not 0) print(not 1) print(not -1) print(not ()) print(not (1,)) print(not []) print(not [1,]) print(not {}) print(not {1:1}) tests: Add test for "not" of a user defined class.
x = 1 print(+x) print(-x) print(~x) print(not None) print(not False) print(not True) print(not 0) print(not 1) print(not -1) print(not ()) print(not (1,)) print(not []) print(not [1,]) print(not {}) print(not {1:1}) # check user instance class A: pass print(not A()) # check user instances derived from builtins class...
<commit_before>x = 1 print(+x) print(-x) print(~x) print(not None) print(not False) print(not True) print(not 0) print(not 1) print(not -1) print(not ()) print(not (1,)) print(not []) print(not [1,]) print(not {}) print(not {1:1}) <commit_msg>tests: Add test for "not" of a user defined class.<commit_after>
x = 1 print(+x) print(-x) print(~x) print(not None) print(not False) print(not True) print(not 0) print(not 1) print(not -1) print(not ()) print(not (1,)) print(not []) print(not [1,]) print(not {}) print(not {1:1}) # check user instance class A: pass print(not A()) # check user instances derived from builtins class...
x = 1 print(+x) print(-x) print(~x) print(not None) print(not False) print(not True) print(not 0) print(not 1) print(not -1) print(not ()) print(not (1,)) print(not []) print(not [1,]) print(not {}) print(not {1:1}) tests: Add test for "not" of a user defined class.x = 1 print(+x) print(-x) print(~x) print(not None) ...
<commit_before>x = 1 print(+x) print(-x) print(~x) print(not None) print(not False) print(not True) print(not 0) print(not 1) print(not -1) print(not ()) print(not (1,)) print(not []) print(not [1,]) print(not {}) print(not {1:1}) <commit_msg>tests: Add test for "not" of a user defined class.<commit_after>x = 1 print(...
781a65e709829842241a4f7f328f3bd46b6a5a53
allmychanges/settings/development.py
allmychanges/settings/development.py
import os from .default import * # nopep8 DEBUG = True TEMPLATE_DEBUG = DEBUG if DEBUG: INSTALLED_APPS += ( 'debug_toolbar', ) # debug toolbar settings MIDDLEWARE_CLASSES += ( 'debug_toolbar.middleware.DebugToolbarMiddleware', ) DEBUG_TOOLBAR_PANELS = ( 'debug_toolbar...
import os from .default import * # nopep8 DEBUG = True TEMPLATE_DEBUG = DEBUG if DEBUG: INSTALLED_APPS += ( 'debug_toolbar', ) # debug toolbar settings MIDDLEWARE_CLASSES += ( 'debug_toolbar.middleware.DebugToolbarMiddleware', ) DEBUG_TOOLBAR_PANELS = ( 'debug_toolbar...
Remove warning from debug toolbar.
Remove warning from debug toolbar.
Python
bsd-2-clause
AllMyChanges/allmychanges.com,AllMyChanges/allmychanges.com,AllMyChanges/allmychanges.com,AllMyChanges/allmychanges.com
import os from .default import * # nopep8 DEBUG = True TEMPLATE_DEBUG = DEBUG if DEBUG: INSTALLED_APPS += ( 'debug_toolbar', ) # debug toolbar settings MIDDLEWARE_CLASSES += ( 'debug_toolbar.middleware.DebugToolbarMiddleware', ) DEBUG_TOOLBAR_PANELS = ( 'debug_toolbar...
import os from .default import * # nopep8 DEBUG = True TEMPLATE_DEBUG = DEBUG if DEBUG: INSTALLED_APPS += ( 'debug_toolbar', ) # debug toolbar settings MIDDLEWARE_CLASSES += ( 'debug_toolbar.middleware.DebugToolbarMiddleware', ) DEBUG_TOOLBAR_PANELS = ( 'debug_toolbar...
<commit_before>import os from .default import * # nopep8 DEBUG = True TEMPLATE_DEBUG = DEBUG if DEBUG: INSTALLED_APPS += ( 'debug_toolbar', ) # debug toolbar settings MIDDLEWARE_CLASSES += ( 'debug_toolbar.middleware.DebugToolbarMiddleware', ) DEBUG_TOOLBAR_PANELS = ( ...
import os from .default import * # nopep8 DEBUG = True TEMPLATE_DEBUG = DEBUG if DEBUG: INSTALLED_APPS += ( 'debug_toolbar', ) # debug toolbar settings MIDDLEWARE_CLASSES += ( 'debug_toolbar.middleware.DebugToolbarMiddleware', ) DEBUG_TOOLBAR_PANELS = ( 'debug_toolbar...
import os from .default import * # nopep8 DEBUG = True TEMPLATE_DEBUG = DEBUG if DEBUG: INSTALLED_APPS += ( 'debug_toolbar', ) # debug toolbar settings MIDDLEWARE_CLASSES += ( 'debug_toolbar.middleware.DebugToolbarMiddleware', ) DEBUG_TOOLBAR_PANELS = ( 'debug_toolbar...
<commit_before>import os from .default import * # nopep8 DEBUG = True TEMPLATE_DEBUG = DEBUG if DEBUG: INSTALLED_APPS += ( 'debug_toolbar', ) # debug toolbar settings MIDDLEWARE_CLASSES += ( 'debug_toolbar.middleware.DebugToolbarMiddleware', ) DEBUG_TOOLBAR_PANELS = ( ...
3bbfc62cb194c1c68ce24ffe9fa0732a0f00fd9c
test/664-raceway.py
test/664-raceway.py
# https://www.openstreetmap.org/way/28825404 assert_has_feature( 16, 10476, 25242, 'roads', { 'id': 28825404, 'kind': 'minor_road', 'highway': 'raceway' }) # https://www.openstreetmap.org/way/59440900 # Thunderoad Speedway Go-carts assert_has_feature( 16, 10516, 25247, 'roads', { 'id': 59440900, 'kind'...
# https://www.openstreetmap.org/way/28825404 assert_has_feature( 16, 10476, 25242, 'roads', { 'id': 28825404, 'kind': 'minor_road', 'highway': 'raceway', 'sort_key': 375 }) # https://www.openstreetmap.org/way/59440900 # Thunderoad Speedway Go-carts assert_has_feature( 16, 10516, 25247, 'roads', { 'id':...
Add sort_key assertion to raceway tests
Add sort_key assertion to raceway tests
Python
mit
mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource
# https://www.openstreetmap.org/way/28825404 assert_has_feature( 16, 10476, 25242, 'roads', { 'id': 28825404, 'kind': 'minor_road', 'highway': 'raceway' }) # https://www.openstreetmap.org/way/59440900 # Thunderoad Speedway Go-carts assert_has_feature( 16, 10516, 25247, 'roads', { 'id': 59440900, 'kind'...
# https://www.openstreetmap.org/way/28825404 assert_has_feature( 16, 10476, 25242, 'roads', { 'id': 28825404, 'kind': 'minor_road', 'highway': 'raceway', 'sort_key': 375 }) # https://www.openstreetmap.org/way/59440900 # Thunderoad Speedway Go-carts assert_has_feature( 16, 10516, 25247, 'roads', { 'id':...
<commit_before># https://www.openstreetmap.org/way/28825404 assert_has_feature( 16, 10476, 25242, 'roads', { 'id': 28825404, 'kind': 'minor_road', 'highway': 'raceway' }) # https://www.openstreetmap.org/way/59440900 # Thunderoad Speedway Go-carts assert_has_feature( 16, 10516, 25247, 'roads', { 'id': 5...
# https://www.openstreetmap.org/way/28825404 assert_has_feature( 16, 10476, 25242, 'roads', { 'id': 28825404, 'kind': 'minor_road', 'highway': 'raceway', 'sort_key': 375 }) # https://www.openstreetmap.org/way/59440900 # Thunderoad Speedway Go-carts assert_has_feature( 16, 10516, 25247, 'roads', { 'id':...
# https://www.openstreetmap.org/way/28825404 assert_has_feature( 16, 10476, 25242, 'roads', { 'id': 28825404, 'kind': 'minor_road', 'highway': 'raceway' }) # https://www.openstreetmap.org/way/59440900 # Thunderoad Speedway Go-carts assert_has_feature( 16, 10516, 25247, 'roads', { 'id': 59440900, 'kind'...
<commit_before># https://www.openstreetmap.org/way/28825404 assert_has_feature( 16, 10476, 25242, 'roads', { 'id': 28825404, 'kind': 'minor_road', 'highway': 'raceway' }) # https://www.openstreetmap.org/way/59440900 # Thunderoad Speedway Go-carts assert_has_feature( 16, 10516, 25247, 'roads', { 'id': 5...
1e6a424e2669441e6910d3a2803bc139df16dd51
new_validity.py
new_validity.py
import pandas as pd import numpy as np import operator from sys import argv import os def extract( file_name ): with open(file_name) as f: for i,line in enumerate(f,1): if "SCN" in line: return i def main(lta_name): os.system('ltahdr -i'+ lta_name + '> lta_file.txt') di...
import pandas as pd import numpy as np import operator from sys import argv import os def extract( file_name ): with open(file_name) as f: for i,line in enumerate(f,1): if "SCN" in line: return i def main(): lta_file = str(argv[1]) calibrator_list = ['3C48', '3C147', '...
Add scratch file for testing new validity
Add scratch file for testing new validity
Python
mit
NCRA-TIFR/gadpu,NCRA-TIFR/gadpu
import pandas as pd import numpy as np import operator from sys import argv import os def extract( file_name ): with open(file_name) as f: for i,line in enumerate(f,1): if "SCN" in line: return i def main(lta_name): os.system('ltahdr -i'+ lta_name + '> lta_file.txt') di...
import pandas as pd import numpy as np import operator from sys import argv import os def extract( file_name ): with open(file_name) as f: for i,line in enumerate(f,1): if "SCN" in line: return i def main(): lta_file = str(argv[1]) calibrator_list = ['3C48', '3C147', '...
<commit_before>import pandas as pd import numpy as np import operator from sys import argv import os def extract( file_name ): with open(file_name) as f: for i,line in enumerate(f,1): if "SCN" in line: return i def main(lta_name): os.system('ltahdr -i'+ lta_name + '> lta_fi...
import pandas as pd import numpy as np import operator from sys import argv import os def extract( file_name ): with open(file_name) as f: for i,line in enumerate(f,1): if "SCN" in line: return i def main(): lta_file = str(argv[1]) calibrator_list = ['3C48', '3C147', '...
import pandas as pd import numpy as np import operator from sys import argv import os def extract( file_name ): with open(file_name) as f: for i,line in enumerate(f,1): if "SCN" in line: return i def main(lta_name): os.system('ltahdr -i'+ lta_name + '> lta_file.txt') di...
<commit_before>import pandas as pd import numpy as np import operator from sys import argv import os def extract( file_name ): with open(file_name) as f: for i,line in enumerate(f,1): if "SCN" in line: return i def main(lta_name): os.system('ltahdr -i'+ lta_name + '> lta_fi...
3ceb8bbcc6b5b43deae31a1c64331e86555eb601
python/ql/test/library-tests/frameworks/cryptography/test_ec.py
python/ql/test/library-tests/frameworks/cryptography/test_ec.py
# see https://cryptography.io/en/latest/hazmat/primitives/asymmetric/rsa.html from cryptography.hazmat.primitives.asymmetric import ec from cryptography.hazmat.primitives import hashes from cryptography.exceptions import InvalidSignature private_key = ec.generate_private_key(curve=ec.SECP384R1()) # $ PublicKeyGenera...
# see https://cryptography.io/en/latest/hazmat/primitives/asymmetric/rsa.html from cryptography.hazmat.primitives.asymmetric import ec from cryptography.hazmat.primitives import hashes from cryptography.exceptions import InvalidSignature private_key = ec.generate_private_key(curve=ec.SECP384R1()) # $ PublicKeyGenera...
Add cryptography test for EC
Python: Add cryptography test for EC Apparently, passing in the class (without instantiating it) is allowed
Python
mit
github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql
# see https://cryptography.io/en/latest/hazmat/primitives/asymmetric/rsa.html from cryptography.hazmat.primitives.asymmetric import ec from cryptography.hazmat.primitives import hashes from cryptography.exceptions import InvalidSignature private_key = ec.generate_private_key(curve=ec.SECP384R1()) # $ PublicKeyGenera...
# see https://cryptography.io/en/latest/hazmat/primitives/asymmetric/rsa.html from cryptography.hazmat.primitives.asymmetric import ec from cryptography.hazmat.primitives import hashes from cryptography.exceptions import InvalidSignature private_key = ec.generate_private_key(curve=ec.SECP384R1()) # $ PublicKeyGenera...
<commit_before># see https://cryptography.io/en/latest/hazmat/primitives/asymmetric/rsa.html from cryptography.hazmat.primitives.asymmetric import ec from cryptography.hazmat.primitives import hashes from cryptography.exceptions import InvalidSignature private_key = ec.generate_private_key(curve=ec.SECP384R1()) # $ ...
# see https://cryptography.io/en/latest/hazmat/primitives/asymmetric/rsa.html from cryptography.hazmat.primitives.asymmetric import ec from cryptography.hazmat.primitives import hashes from cryptography.exceptions import InvalidSignature private_key = ec.generate_private_key(curve=ec.SECP384R1()) # $ PublicKeyGenera...
# see https://cryptography.io/en/latest/hazmat/primitives/asymmetric/rsa.html from cryptography.hazmat.primitives.asymmetric import ec from cryptography.hazmat.primitives import hashes from cryptography.exceptions import InvalidSignature private_key = ec.generate_private_key(curve=ec.SECP384R1()) # $ PublicKeyGenera...
<commit_before># see https://cryptography.io/en/latest/hazmat/primitives/asymmetric/rsa.html from cryptography.hazmat.primitives.asymmetric import ec from cryptography.hazmat.primitives import hashes from cryptography.exceptions import InvalidSignature private_key = ec.generate_private_key(curve=ec.SECP384R1()) # $ ...
8bccbe0fdb3d6770ecbbe28528628f10988145bd
kitchen/dashboard/graphs.py
kitchen/dashboard/graphs.py
import os import pydot from kitchen.settings import STATIC_ROOT def generate_node_map(nodes): """Generates a graphviz nodemap""" graph = pydot.Dot(graph_type='digraph') graph_nodes = {} for node in nodes: label = node['name'] + "\n" + "\n".join( [role for role in node['role'] if n...
import os import pydot from kitchen.settings import STATIC_ROOT, REPO def generate_node_map(nodes): """Generates a graphviz nodemap""" graph = pydot.Dot(graph_type='digraph') graph_nodes = {} for node in nodes: label = node['name'] + "\n" + "\n".join( [role for role in node['role'...
Use the env prefix setting
Use the env prefix setting
Python
apache-2.0
edelight/kitchen,edelight/kitchen,edelight/kitchen,edelight/kitchen
import os import pydot from kitchen.settings import STATIC_ROOT def generate_node_map(nodes): """Generates a graphviz nodemap""" graph = pydot.Dot(graph_type='digraph') graph_nodes = {} for node in nodes: label = node['name'] + "\n" + "\n".join( [role for role in node['role'] if n...
import os import pydot from kitchen.settings import STATIC_ROOT, REPO def generate_node_map(nodes): """Generates a graphviz nodemap""" graph = pydot.Dot(graph_type='digraph') graph_nodes = {} for node in nodes: label = node['name'] + "\n" + "\n".join( [role for role in node['role'...
<commit_before>import os import pydot from kitchen.settings import STATIC_ROOT def generate_node_map(nodes): """Generates a graphviz nodemap""" graph = pydot.Dot(graph_type='digraph') graph_nodes = {} for node in nodes: label = node['name'] + "\n" + "\n".join( [role for role in no...
import os import pydot from kitchen.settings import STATIC_ROOT, REPO def generate_node_map(nodes): """Generates a graphviz nodemap""" graph = pydot.Dot(graph_type='digraph') graph_nodes = {} for node in nodes: label = node['name'] + "\n" + "\n".join( [role for role in node['role'...
import os import pydot from kitchen.settings import STATIC_ROOT def generate_node_map(nodes): """Generates a graphviz nodemap""" graph = pydot.Dot(graph_type='digraph') graph_nodes = {} for node in nodes: label = node['name'] + "\n" + "\n".join( [role for role in node['role'] if n...
<commit_before>import os import pydot from kitchen.settings import STATIC_ROOT def generate_node_map(nodes): """Generates a graphviz nodemap""" graph = pydot.Dot(graph_type='digraph') graph_nodes = {} for node in nodes: label = node['name'] + "\n" + "\n".join( [role for role in no...
9401ce692e8b0362e387cb5fb042f530edd2c0b3
toolkit/models/models.py
toolkit/models/models.py
import arrow from django.conf import settings from django.db import models from .mixins import ModelPermissionsMixin class CCEModel(ModelPermissionsMixin, models.Model): """ Abstract base model with permissions mixin. """ class Meta: abstract = True class CCEAuditModel(CCEModel): """ ...
from django.db import models from django.utils.timezone import localtime from .mixins import ModelPermissionsMixin class CCEModel(ModelPermissionsMixin, models.Model): """ Abstract base model with permissions mixin. """ class Meta: abstract = True class CCEAuditModel(CCEModel): """ ...
Update Timezone aware values for CCEAuditModel
Update Timezone aware values for CCEAuditModel
Python
bsd-3-clause
cceit/cce-toolkit,cceit/cce-toolkit,cceit/cce-toolkit
import arrow from django.conf import settings from django.db import models from .mixins import ModelPermissionsMixin class CCEModel(ModelPermissionsMixin, models.Model): """ Abstract base model with permissions mixin. """ class Meta: abstract = True class CCEAuditModel(CCEModel): """ ...
from django.db import models from django.utils.timezone import localtime from .mixins import ModelPermissionsMixin class CCEModel(ModelPermissionsMixin, models.Model): """ Abstract base model with permissions mixin. """ class Meta: abstract = True class CCEAuditModel(CCEModel): """ ...
<commit_before>import arrow from django.conf import settings from django.db import models from .mixins import ModelPermissionsMixin class CCEModel(ModelPermissionsMixin, models.Model): """ Abstract base model with permissions mixin. """ class Meta: abstract = True class CCEAuditModel(CCEMode...
from django.db import models from django.utils.timezone import localtime from .mixins import ModelPermissionsMixin class CCEModel(ModelPermissionsMixin, models.Model): """ Abstract base model with permissions mixin. """ class Meta: abstract = True class CCEAuditModel(CCEModel): """ ...
import arrow from django.conf import settings from django.db import models from .mixins import ModelPermissionsMixin class CCEModel(ModelPermissionsMixin, models.Model): """ Abstract base model with permissions mixin. """ class Meta: abstract = True class CCEAuditModel(CCEModel): """ ...
<commit_before>import arrow from django.conf import settings from django.db import models from .mixins import ModelPermissionsMixin class CCEModel(ModelPermissionsMixin, models.Model): """ Abstract base model with permissions mixin. """ class Meta: abstract = True class CCEAuditModel(CCEMode...
0958ec9188bc2017be576de62911e76247cbe45f
scikits/gpu/tests/test_fbo.py
scikits/gpu/tests/test_fbo.py
from nose.tools import * from scikits.gpu.fbo import * from pyglet.gl import * class TestFramebuffer(object): def create(self, x, y, colours, dtype): fbo = Framebuffer(x, y, bands=colours, dtype=dtype) fbo.bind() fbo.unbind() fbo.delete() def test_creation(self): fbo =...
from nose.tools import * from scikits.gpu.fbo import * from pyglet.gl import * class TestFramebuffer(object): def create(self, x, y, colours, dtype): fbo = Framebuffer(x, y, bands=colours, dtype=dtype) fbo.bind() fbo.unbind() fbo.delete() def test_creation(self): fbo =...
Test that framebuffer can't be bound after deletion.
Test that framebuffer can't be bound after deletion.
Python
mit
certik/scikits.gpu,stefanv/scikits.gpu
from nose.tools import * from scikits.gpu.fbo import * from pyglet.gl import * class TestFramebuffer(object): def create(self, x, y, colours, dtype): fbo = Framebuffer(x, y, bands=colours, dtype=dtype) fbo.bind() fbo.unbind() fbo.delete() def test_creation(self): fbo =...
from nose.tools import * from scikits.gpu.fbo import * from pyglet.gl import * class TestFramebuffer(object): def create(self, x, y, colours, dtype): fbo = Framebuffer(x, y, bands=colours, dtype=dtype) fbo.bind() fbo.unbind() fbo.delete() def test_creation(self): fbo =...
<commit_before>from nose.tools import * from scikits.gpu.fbo import * from pyglet.gl import * class TestFramebuffer(object): def create(self, x, y, colours, dtype): fbo = Framebuffer(x, y, bands=colours, dtype=dtype) fbo.bind() fbo.unbind() fbo.delete() def test_creation(self)...
from nose.tools import * from scikits.gpu.fbo import * from pyglet.gl import * class TestFramebuffer(object): def create(self, x, y, colours, dtype): fbo = Framebuffer(x, y, bands=colours, dtype=dtype) fbo.bind() fbo.unbind() fbo.delete() def test_creation(self): fbo =...
from nose.tools import * from scikits.gpu.fbo import * from pyglet.gl import * class TestFramebuffer(object): def create(self, x, y, colours, dtype): fbo = Framebuffer(x, y, bands=colours, dtype=dtype) fbo.bind() fbo.unbind() fbo.delete() def test_creation(self): fbo =...
<commit_before>from nose.tools import * from scikits.gpu.fbo import * from pyglet.gl import * class TestFramebuffer(object): def create(self, x, y, colours, dtype): fbo = Framebuffer(x, y, bands=colours, dtype=dtype) fbo.bind() fbo.unbind() fbo.delete() def test_creation(self)...
4eada6970d72b3863104790229286edf8d17720c
accelerator/tests/contexts/user_role_context.py
accelerator/tests/contexts/user_role_context.py
from builtins import object from accelerator.tests.factories import ( ExpertFactory, ProgramFactory, ProgramRoleFactory, ProgramRoleGrantFactory, UserRoleFactory, ) class UserRoleContext(object): def __init__(self, user_role_name, program=None, user=None): if user and not program: ...
from builtins import object from accelerator.tests.factories import ( ExpertFactory, ProgramFactory, ProgramRoleFactory, ProgramRoleGrantFactory, UserRoleFactory, ) from accelerator.models import UserRole class UserRoleContext(object): def __init__(self, user_role_name, program=None, user=No...
Make UserRoleContext safe to use
[AC-7397] Make UserRoleContext safe to use
Python
mit
masschallenge/django-accelerator,masschallenge/django-accelerator
from builtins import object from accelerator.tests.factories import ( ExpertFactory, ProgramFactory, ProgramRoleFactory, ProgramRoleGrantFactory, UserRoleFactory, ) class UserRoleContext(object): def __init__(self, user_role_name, program=None, user=None): if user and not program: ...
from builtins import object from accelerator.tests.factories import ( ExpertFactory, ProgramFactory, ProgramRoleFactory, ProgramRoleGrantFactory, UserRoleFactory, ) from accelerator.models import UserRole class UserRoleContext(object): def __init__(self, user_role_name, program=None, user=No...
<commit_before>from builtins import object from accelerator.tests.factories import ( ExpertFactory, ProgramFactory, ProgramRoleFactory, ProgramRoleGrantFactory, UserRoleFactory, ) class UserRoleContext(object): def __init__(self, user_role_name, program=None, user=None): if user and ...
from builtins import object from accelerator.tests.factories import ( ExpertFactory, ProgramFactory, ProgramRoleFactory, ProgramRoleGrantFactory, UserRoleFactory, ) from accelerator.models import UserRole class UserRoleContext(object): def __init__(self, user_role_name, program=None, user=No...
from builtins import object from accelerator.tests.factories import ( ExpertFactory, ProgramFactory, ProgramRoleFactory, ProgramRoleGrantFactory, UserRoleFactory, ) class UserRoleContext(object): def __init__(self, user_role_name, program=None, user=None): if user and not program: ...
<commit_before>from builtins import object from accelerator.tests.factories import ( ExpertFactory, ProgramFactory, ProgramRoleFactory, ProgramRoleGrantFactory, UserRoleFactory, ) class UserRoleContext(object): def __init__(self, user_role_name, program=None, user=None): if user and ...
85245f55fe430bfcf4946d2501394dad813a6591
core/modules/html_has_same_domain.py
core/modules/html_has_same_domain.py
from bs4 import BeautifulSoup as bs from get_root_domain import get_root_domain def html_has_same_domain(url, resp): mod = 'html_has_same_domain' cnt = 0 root = get_root_domain(url) current_page = bs(resp.text, 'lxml') for tag in current_page.find_all('a'): if tag.get('href'): ...
from bs4 import BeautifulSoup as bs from get_root_domain import get_root_domain def html_has_same_domain(url, resp): mod = 'html_has_same_domain' cnt = 0 root = get_root_domain(url) current_page = bs(resp.text, 'lxml') for tag in current_page.find_all('a'): if tag.get('href'): ...
Add logic to check for cross-site anchor tags to naver
Add logic to check for cross-site anchor tags to naver
Python
bsd-2-clause
mjkim610/phishing-detection,jaeyung1001/phishing_site_detection
from bs4 import BeautifulSoup as bs from get_root_domain import get_root_domain def html_has_same_domain(url, resp): mod = 'html_has_same_domain' cnt = 0 root = get_root_domain(url) current_page = bs(resp.text, 'lxml') for tag in current_page.find_all('a'): if tag.get('href'): ...
from bs4 import BeautifulSoup as bs from get_root_domain import get_root_domain def html_has_same_domain(url, resp): mod = 'html_has_same_domain' cnt = 0 root = get_root_domain(url) current_page = bs(resp.text, 'lxml') for tag in current_page.find_all('a'): if tag.get('href'): ...
<commit_before>from bs4 import BeautifulSoup as bs from get_root_domain import get_root_domain def html_has_same_domain(url, resp): mod = 'html_has_same_domain' cnt = 0 root = get_root_domain(url) current_page = bs(resp.text, 'lxml') for tag in current_page.find_all('a'): if tag.get('href...
from bs4 import BeautifulSoup as bs from get_root_domain import get_root_domain def html_has_same_domain(url, resp): mod = 'html_has_same_domain' cnt = 0 root = get_root_domain(url) current_page = bs(resp.text, 'lxml') for tag in current_page.find_all('a'): if tag.get('href'): ...
from bs4 import BeautifulSoup as bs from get_root_domain import get_root_domain def html_has_same_domain(url, resp): mod = 'html_has_same_domain' cnt = 0 root = get_root_domain(url) current_page = bs(resp.text, 'lxml') for tag in current_page.find_all('a'): if tag.get('href'): ...
<commit_before>from bs4 import BeautifulSoup as bs from get_root_domain import get_root_domain def html_has_same_domain(url, resp): mod = 'html_has_same_domain' cnt = 0 root = get_root_domain(url) current_page = bs(resp.text, 'lxml') for tag in current_page.find_all('a'): if tag.get('href...
c0455de3061ba049ad9d501b85118f8ef4cd673c
peakachulib/tmm.py
peakachulib/tmm.py
import numpy as np import pandas as pd from rpy2.robjects import r, pandas2ri pandas2ri.activate() class TMM(object): def __init__(self, count_df): r("suppressMessages(library(edgeR))") self.count_df = count_df def calc_size_factors(self, method="TMM"): # Convert pandas dataf...
import numpy as np import pandas as pd from rpy2.robjects import r, pandas2ri pandas2ri.activate() class TMM(object): def __init__(self, count_df): r("suppressMessages(library(edgeR))") self.count_df = count_df def calc_size_factors(self): # Convert pandas dataframe to R dataframe ...
Fix TMM as normalization method from edgeR package
Fix TMM as normalization method from edgeR package
Python
isc
tbischler/PEAKachu
import numpy as np import pandas as pd from rpy2.robjects import r, pandas2ri pandas2ri.activate() class TMM(object): def __init__(self, count_df): r("suppressMessages(library(edgeR))") self.count_df = count_df def calc_size_factors(self, method="TMM"): # Convert pandas dataf...
import numpy as np import pandas as pd from rpy2.robjects import r, pandas2ri pandas2ri.activate() class TMM(object): def __init__(self, count_df): r("suppressMessages(library(edgeR))") self.count_df = count_df def calc_size_factors(self): # Convert pandas dataframe to R dataframe ...
<commit_before>import numpy as np import pandas as pd from rpy2.robjects import r, pandas2ri pandas2ri.activate() class TMM(object): def __init__(self, count_df): r("suppressMessages(library(edgeR))") self.count_df = count_df def calc_size_factors(self, method="TMM"): # Conve...
import numpy as np import pandas as pd from rpy2.robjects import r, pandas2ri pandas2ri.activate() class TMM(object): def __init__(self, count_df): r("suppressMessages(library(edgeR))") self.count_df = count_df def calc_size_factors(self): # Convert pandas dataframe to R dataframe ...
import numpy as np import pandas as pd from rpy2.robjects import r, pandas2ri pandas2ri.activate() class TMM(object): def __init__(self, count_df): r("suppressMessages(library(edgeR))") self.count_df = count_df def calc_size_factors(self, method="TMM"): # Convert pandas dataf...
<commit_before>import numpy as np import pandas as pd from rpy2.robjects import r, pandas2ri pandas2ri.activate() class TMM(object): def __init__(self, count_df): r("suppressMessages(library(edgeR))") self.count_df = count_df def calc_size_factors(self, method="TMM"): # Conve...
23f709e483bc7b0dfa15da8207ddc509715ebaa0
petlib/__init__.py
petlib/__init__.py
# The petlib version VERSION = '0.0.25'
# The petlib version VERSION = '0.0.26' def run_tests(): # These are only needed in case we test import pytest import os.path import glob # List all petlib files in the directory petlib_dir = dir = os.path.dirname(os.path.realpath(__file__)) pyfiles = glob.glob(os.path.join(petlib_dir, '*....
Make a petlib.run_tests() function that tests an install
Make a petlib.run_tests() function that tests an install
Python
bsd-2-clause
gdanezis/petlib
# The petlib version VERSION = '0.0.25'Make a petlib.run_tests() function that tests an install
# The petlib version VERSION = '0.0.26' def run_tests(): # These are only needed in case we test import pytest import os.path import glob # List all petlib files in the directory petlib_dir = dir = os.path.dirname(os.path.realpath(__file__)) pyfiles = glob.glob(os.path.join(petlib_dir, '*....
<commit_before># The petlib version VERSION = '0.0.25'<commit_msg>Make a petlib.run_tests() function that tests an install<commit_after>
# The petlib version VERSION = '0.0.26' def run_tests(): # These are only needed in case we test import pytest import os.path import glob # List all petlib files in the directory petlib_dir = dir = os.path.dirname(os.path.realpath(__file__)) pyfiles = glob.glob(os.path.join(petlib_dir, '*....
# The petlib version VERSION = '0.0.25'Make a petlib.run_tests() function that tests an install# The petlib version VERSION = '0.0.26' def run_tests(): # These are only needed in case we test import pytest import os.path import glob # List all petlib files in the directory petlib_dir = dir = o...
<commit_before># The petlib version VERSION = '0.0.25'<commit_msg>Make a petlib.run_tests() function that tests an install<commit_after># The petlib version VERSION = '0.0.26' def run_tests(): # These are only needed in case we test import pytest import os.path import glob # List all petlib files ...
4ca953b2210c469e5d09bb03c66cbe0839959e49
libvirt/libvirt_list_vms.py
libvirt/libvirt_list_vms.py
#!/usr/bin/python import libvirt import sys conn=libvirt.open("qemu:///system") if conn == None: print('Failed to open connection to qemu:///system', sys.stderr) exit(1) #vms = conn.listDefinedDomains() #print '\n'.join(vms) vms = conn.listAllDomains(0) if len(vms) != 0: for vm in vms: print(vm.n...
#!/usr/bin/python import libvirt import sys def getConnection(): try: conn=libvirt.open("qemu:///system") return conn except libvirt.libvirtError, e: print e.get_error_message() sys.exit(1) def delConnection(conn): try: conn.close() except: print get_error_message() sys.exit(1) d...
Update script list domain libvirt
Update script list domain libvirt
Python
apache-2.0
skylost/heap,skylost/heap,skylost/heap
#!/usr/bin/python import libvirt import sys conn=libvirt.open("qemu:///system") if conn == None: print('Failed to open connection to qemu:///system', sys.stderr) exit(1) #vms = conn.listDefinedDomains() #print '\n'.join(vms) vms = conn.listAllDomains(0) if len(vms) != 0: for vm in vms: print(vm.n...
#!/usr/bin/python import libvirt import sys def getConnection(): try: conn=libvirt.open("qemu:///system") return conn except libvirt.libvirtError, e: print e.get_error_message() sys.exit(1) def delConnection(conn): try: conn.close() except: print get_error_message() sys.exit(1) d...
<commit_before>#!/usr/bin/python import libvirt import sys conn=libvirt.open("qemu:///system") if conn == None: print('Failed to open connection to qemu:///system', sys.stderr) exit(1) #vms = conn.listDefinedDomains() #print '\n'.join(vms) vms = conn.listAllDomains(0) if len(vms) != 0: for vm in vms: ...
#!/usr/bin/python import libvirt import sys def getConnection(): try: conn=libvirt.open("qemu:///system") return conn except libvirt.libvirtError, e: print e.get_error_message() sys.exit(1) def delConnection(conn): try: conn.close() except: print get_error_message() sys.exit(1) d...
#!/usr/bin/python import libvirt import sys conn=libvirt.open("qemu:///system") if conn == None: print('Failed to open connection to qemu:///system', sys.stderr) exit(1) #vms = conn.listDefinedDomains() #print '\n'.join(vms) vms = conn.listAllDomains(0) if len(vms) != 0: for vm in vms: print(vm.n...
<commit_before>#!/usr/bin/python import libvirt import sys conn=libvirt.open("qemu:///system") if conn == None: print('Failed to open connection to qemu:///system', sys.stderr) exit(1) #vms = conn.listDefinedDomains() #print '\n'.join(vms) vms = conn.listAllDomains(0) if len(vms) != 0: for vm in vms: ...
ecbb73f69d6481a94c86f1e0110c39800ebc7d07
ledctl.py
ledctl.py
from flask import Flask app = Flask(__name__) @app.route("/") def home(): return "Hello World!"
from flask import Flask, request import pigpio app = Flask(__name__) #rgb 22, 27, 17 #base teal 40 97 15 GPIO_RED = 22 GPIO_GREEN = 27 GPIO_BLUE = 17 def to_PWM_dutycycle(string): try: i = int(string) if i < 0: i = 0 elif i > 255: i = 255 return i excep...
Add API to set leds color
Add API to set leds color
Python
mit
ayoy/ledctl
from flask import Flask app = Flask(__name__) @app.route("/") def home(): return "Hello World!" Add API to set leds color
from flask import Flask, request import pigpio app = Flask(__name__) #rgb 22, 27, 17 #base teal 40 97 15 GPIO_RED = 22 GPIO_GREEN = 27 GPIO_BLUE = 17 def to_PWM_dutycycle(string): try: i = int(string) if i < 0: i = 0 elif i > 255: i = 255 return i excep...
<commit_before>from flask import Flask app = Flask(__name__) @app.route("/") def home(): return "Hello World!" <commit_msg>Add API to set leds color<commit_after>
from flask import Flask, request import pigpio app = Flask(__name__) #rgb 22, 27, 17 #base teal 40 97 15 GPIO_RED = 22 GPIO_GREEN = 27 GPIO_BLUE = 17 def to_PWM_dutycycle(string): try: i = int(string) if i < 0: i = 0 elif i > 255: i = 255 return i excep...
from flask import Flask app = Flask(__name__) @app.route("/") def home(): return "Hello World!" Add API to set leds colorfrom flask import Flask, request import pigpio app = Flask(__name__) #rgb 22, 27, 17 #base teal 40 97 15 GPIO_RED = 22 GPIO_GREEN = 27 GPIO_BLUE = 17 def to_PWM_dutycycle(string): try: ...
<commit_before>from flask import Flask app = Flask(__name__) @app.route("/") def home(): return "Hello World!" <commit_msg>Add API to set leds color<commit_after>from flask import Flask, request import pigpio app = Flask(__name__) #rgb 22, 27, 17 #base teal 40 97 15 GPIO_RED = 22 GPIO_GREEN = 27 GPIO_BLUE = 17 ...
e7a771011e93660c811effb8357df035bae8f9a6
pentai/gui/settings_screen.py
pentai/gui/settings_screen.py
from kivy.uix.screenmanager import Screen #from kivy.properties import * from kivy.uix.settings import SettingSpacer from my_setting import * import audio as a_m class SettingsScreen(Screen): def __init__(self, *args, **kwargs): super(SettingsScreen, self).__init__(*args, **kwargs) def adjust_volumes...
from kivy.uix.screenmanager import Screen #from kivy.properties import * from kivy.uix.settings import SettingSpacer from my_setting import * import audio as a_m from kivy.uix.widget import Widget class HSpacer(Widget): pass class VSpacer(Widget): pass class SettingsScreen(Screen): def __init__(self, *...
Use our own spacer widgets
Use our own spacer widgets
Python
mit
cropleyb/pentai,cropleyb/pentai,cropleyb/pentai
from kivy.uix.screenmanager import Screen #from kivy.properties import * from kivy.uix.settings import SettingSpacer from my_setting import * import audio as a_m class SettingsScreen(Screen): def __init__(self, *args, **kwargs): super(SettingsScreen, self).__init__(*args, **kwargs) def adjust_volumes...
from kivy.uix.screenmanager import Screen #from kivy.properties import * from kivy.uix.settings import SettingSpacer from my_setting import * import audio as a_m from kivy.uix.widget import Widget class HSpacer(Widget): pass class VSpacer(Widget): pass class SettingsScreen(Screen): def __init__(self, *...
<commit_before>from kivy.uix.screenmanager import Screen #from kivy.properties import * from kivy.uix.settings import SettingSpacer from my_setting import * import audio as a_m class SettingsScreen(Screen): def __init__(self, *args, **kwargs): super(SettingsScreen, self).__init__(*args, **kwargs) def...
from kivy.uix.screenmanager import Screen #from kivy.properties import * from kivy.uix.settings import SettingSpacer from my_setting import * import audio as a_m from kivy.uix.widget import Widget class HSpacer(Widget): pass class VSpacer(Widget): pass class SettingsScreen(Screen): def __init__(self, *...
from kivy.uix.screenmanager import Screen #from kivy.properties import * from kivy.uix.settings import SettingSpacer from my_setting import * import audio as a_m class SettingsScreen(Screen): def __init__(self, *args, **kwargs): super(SettingsScreen, self).__init__(*args, **kwargs) def adjust_volumes...
<commit_before>from kivy.uix.screenmanager import Screen #from kivy.properties import * from kivy.uix.settings import SettingSpacer from my_setting import * import audio as a_m class SettingsScreen(Screen): def __init__(self, *args, **kwargs): super(SettingsScreen, self).__init__(*args, **kwargs) def...
e42d38f9ad3f8b5229c9618e4dd9d6b371de89c5
test/test_am_bmi.py
test/test_am_bmi.py
import unittest import utils import os import sys import shutil TOPDIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) sys.path.append(os.path.join(TOPDIR, 'lib')) sys.path.append(TOPDIR) import cryptosite.am_bmi class Tests(unittest.TestCase): def test_get_sas(self): """Test get_sas() fu...
import unittest import utils import os import sys import shutil import subprocess TOPDIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) utils.set_search_paths(TOPDIR) import cryptosite.am_bmi class Tests(unittest.TestCase): def test_get_sas(self): """Test get_sas() function""" wi...
Test simple complete run of am_bmi.
Test simple complete run of am_bmi.
Python
lgpl-2.1
salilab/cryptosite,salilab/cryptosite,salilab/cryptosite
import unittest import utils import os import sys import shutil TOPDIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) sys.path.append(os.path.join(TOPDIR, 'lib')) sys.path.append(TOPDIR) import cryptosite.am_bmi class Tests(unittest.TestCase): def test_get_sas(self): """Test get_sas() fu...
import unittest import utils import os import sys import shutil import subprocess TOPDIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) utils.set_search_paths(TOPDIR) import cryptosite.am_bmi class Tests(unittest.TestCase): def test_get_sas(self): """Test get_sas() function""" wi...
<commit_before>import unittest import utils import os import sys import shutil TOPDIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) sys.path.append(os.path.join(TOPDIR, 'lib')) sys.path.append(TOPDIR) import cryptosite.am_bmi class Tests(unittest.TestCase): def test_get_sas(self): """Te...
import unittest import utils import os import sys import shutil import subprocess TOPDIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) utils.set_search_paths(TOPDIR) import cryptosite.am_bmi class Tests(unittest.TestCase): def test_get_sas(self): """Test get_sas() function""" wi...
import unittest import utils import os import sys import shutil TOPDIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) sys.path.append(os.path.join(TOPDIR, 'lib')) sys.path.append(TOPDIR) import cryptosite.am_bmi class Tests(unittest.TestCase): def test_get_sas(self): """Test get_sas() fu...
<commit_before>import unittest import utils import os import sys import shutil TOPDIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) sys.path.append(os.path.join(TOPDIR, 'lib')) sys.path.append(TOPDIR) import cryptosite.am_bmi class Tests(unittest.TestCase): def test_get_sas(self): """Te...
291ae1ae359b7985f25c4d32ee31ff6ccbc6eb7d
curious/commands/__init__.py
curious/commands/__init__.py
# This file is part of curious. # # curious is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # curious is distributed in the ho...
# This file is part of curious. # # curious is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # curious is distributed in the ho...
Add ratelimit and help to autosummary.
Add ratelimit and help to autosummary. Signed-off-by: Laura F. D <[email protected]>
Python
mit
SunDwarf/curious
# This file is part of curious. # # curious is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # curious is distributed in the ho...
# This file is part of curious. # # curious is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # curious is distributed in the ho...
<commit_before># This file is part of curious. # # curious is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # curious is distri...
# This file is part of curious. # # curious is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # curious is distributed in the ho...
# This file is part of curious. # # curious is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # curious is distributed in the ho...
<commit_before># This file is part of curious. # # curious is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # curious is distri...
f8640410f4271b22a2836d9fe4f5d09b28c7b19c
angr/storage/memory_mixins/regioned_memory/abstract_merger_mixin.py
angr/storage/memory_mixins/regioned_memory/abstract_merger_mixin.py
import logging from typing import Iterable, Tuple, Any from .. import MemoryMixin l = logging.getLogger(name=__name__) class AbstractMergerMixin(MemoryMixin): def _merge_values(self, values: Iterable[Tuple[Any,Any]], merged_size: int): if self.category == 'reg' and self.state.arch.register_endness == ...
import logging from typing import Iterable, Tuple, Any from .. import MemoryMixin l = logging.getLogger(name=__name__) class AbstractMergerMixin(MemoryMixin): def _merge_values(self, values: Iterable[Tuple[Any,Any]], merged_size: int): # if self.category == 'reg' and self.state.arch.register_endness =...
Remove reversing heuristics from merge_values for abstract memory.
Remove reversing heuristics from merge_values for abstract memory. This is because SimMemoryObject handles endness now. Also re-introduce the logic for dealing with uninit memory values.
Python
bsd-2-clause
angr/angr,angr/angr,angr/angr
import logging from typing import Iterable, Tuple, Any from .. import MemoryMixin l = logging.getLogger(name=__name__) class AbstractMergerMixin(MemoryMixin): def _merge_values(self, values: Iterable[Tuple[Any,Any]], merged_size: int): if self.category == 'reg' and self.state.arch.register_endness == ...
import logging from typing import Iterable, Tuple, Any from .. import MemoryMixin l = logging.getLogger(name=__name__) class AbstractMergerMixin(MemoryMixin): def _merge_values(self, values: Iterable[Tuple[Any,Any]], merged_size: int): # if self.category == 'reg' and self.state.arch.register_endness =...
<commit_before>import logging from typing import Iterable, Tuple, Any from .. import MemoryMixin l = logging.getLogger(name=__name__) class AbstractMergerMixin(MemoryMixin): def _merge_values(self, values: Iterable[Tuple[Any,Any]], merged_size: int): if self.category == 'reg' and self.state.arch.regis...
import logging from typing import Iterable, Tuple, Any from .. import MemoryMixin l = logging.getLogger(name=__name__) class AbstractMergerMixin(MemoryMixin): def _merge_values(self, values: Iterable[Tuple[Any,Any]], merged_size: int): # if self.category == 'reg' and self.state.arch.register_endness =...
import logging from typing import Iterable, Tuple, Any from .. import MemoryMixin l = logging.getLogger(name=__name__) class AbstractMergerMixin(MemoryMixin): def _merge_values(self, values: Iterable[Tuple[Any,Any]], merged_size: int): if self.category == 'reg' and self.state.arch.register_endness == ...
<commit_before>import logging from typing import Iterable, Tuple, Any from .. import MemoryMixin l = logging.getLogger(name=__name__) class AbstractMergerMixin(MemoryMixin): def _merge_values(self, values: Iterable[Tuple[Any,Any]], merged_size: int): if self.category == 'reg' and self.state.arch.regis...
c1e9d369680e779d481aa7db17be9348d56ec29d
test_linked_list.py
test_linked_list.py
from __future__ import unicode_literals import linked_list # def func(x): # return x + 1 # def tdest_answer(): # assert func(3) == 5 # init a = linked_list.LinkedList() def test_size(): assert a.size is 0 def test_head(): assert a.head is None def test_init(): assert type(a) is linked_lis...
"""Pytest file for linked_list.py Run this with the command 'py.test test_linked_list.py' """ from __future__ import unicode_literals import linked_list import copy # init method a = linked_list.LinkedList() def test_init_size(): assert a.sizeOfList is 0 assert type(a.sizeOfList) is int def test_init_...
Add comments to test file
Add comments to test file Add comments after all tests passed
Python
mit
jesseklein406/data-structures
from __future__ import unicode_literals import linked_list # def func(x): # return x + 1 # def tdest_answer(): # assert func(3) == 5 # init a = linked_list.LinkedList() def test_size(): assert a.size is 0 def test_head(): assert a.head is None def test_init(): assert type(a) is linked_lis...
"""Pytest file for linked_list.py Run this with the command 'py.test test_linked_list.py' """ from __future__ import unicode_literals import linked_list import copy # init method a = linked_list.LinkedList() def test_init_size(): assert a.sizeOfList is 0 assert type(a.sizeOfList) is int def test_init_...
<commit_before>from __future__ import unicode_literals import linked_list # def func(x): # return x + 1 # def tdest_answer(): # assert func(3) == 5 # init a = linked_list.LinkedList() def test_size(): assert a.size is 0 def test_head(): assert a.head is None def test_init(): assert type(a...
"""Pytest file for linked_list.py Run this with the command 'py.test test_linked_list.py' """ from __future__ import unicode_literals import linked_list import copy # init method a = linked_list.LinkedList() def test_init_size(): assert a.sizeOfList is 0 assert type(a.sizeOfList) is int def test_init_...
from __future__ import unicode_literals import linked_list # def func(x): # return x + 1 # def tdest_answer(): # assert func(3) == 5 # init a = linked_list.LinkedList() def test_size(): assert a.size is 0 def test_head(): assert a.head is None def test_init(): assert type(a) is linked_lis...
<commit_before>from __future__ import unicode_literals import linked_list # def func(x): # return x + 1 # def tdest_answer(): # assert func(3) == 5 # init a = linked_list.LinkedList() def test_size(): assert a.size is 0 def test_head(): assert a.head is None def test_init(): assert type(a...
7c68a78a81721ecbbda0f999576b91b803a34a3e
.circleci/get-commit-range.py
.circleci/get-commit-range.py
#!/usr/bin/env python3 import os import argparse from github import Github def from_pr(project, repo, pr_number): gh = Github() pr = gh.get_repo(f'{project}/{repo}').get_pull(pr_number) base = pr.base.ref head = pr.head.ref return f'origin/{base}...{head}' def main(): argparser = argparse.Ar...
#!/usr/bin/env python3 import os import argparse from github import Github def from_pr(project, repo, pr_number): gh = Github() pr = gh.get_repo(f'{project}/{repo}').get_pull(pr_number) base = pr.base.sha head = pr.base.sha return f'{base}...{head}' def main(): argparser = argparse.ArgumentP...
Use SHAs for commit_range rather than refs
Use SHAs for commit_range rather than refs Refs are local and might not always be present in the checkout.
Python
bsd-3-clause
ryanlovett/datahub,berkeley-dsep-infra/datahub,ryanlovett/datahub,ryanlovett/datahub,berkeley-dsep-infra/datahub,berkeley-dsep-infra/datahub
#!/usr/bin/env python3 import os import argparse from github import Github def from_pr(project, repo, pr_number): gh = Github() pr = gh.get_repo(f'{project}/{repo}').get_pull(pr_number) base = pr.base.ref head = pr.head.ref return f'origin/{base}...{head}' def main(): argparser = argparse.Ar...
#!/usr/bin/env python3 import os import argparse from github import Github def from_pr(project, repo, pr_number): gh = Github() pr = gh.get_repo(f'{project}/{repo}').get_pull(pr_number) base = pr.base.sha head = pr.base.sha return f'{base}...{head}' def main(): argparser = argparse.ArgumentP...
<commit_before>#!/usr/bin/env python3 import os import argparse from github import Github def from_pr(project, repo, pr_number): gh = Github() pr = gh.get_repo(f'{project}/{repo}').get_pull(pr_number) base = pr.base.ref head = pr.head.ref return f'origin/{base}...{head}' def main(): argparse...
#!/usr/bin/env python3 import os import argparse from github import Github def from_pr(project, repo, pr_number): gh = Github() pr = gh.get_repo(f'{project}/{repo}').get_pull(pr_number) base = pr.base.sha head = pr.base.sha return f'{base}...{head}' def main(): argparser = argparse.ArgumentP...
#!/usr/bin/env python3 import os import argparse from github import Github def from_pr(project, repo, pr_number): gh = Github() pr = gh.get_repo(f'{project}/{repo}').get_pull(pr_number) base = pr.base.ref head = pr.head.ref return f'origin/{base}...{head}' def main(): argparser = argparse.Ar...
<commit_before>#!/usr/bin/env python3 import os import argparse from github import Github def from_pr(project, repo, pr_number): gh = Github() pr = gh.get_repo(f'{project}/{repo}').get_pull(pr_number) base = pr.base.ref head = pr.head.ref return f'origin/{base}...{head}' def main(): argparse...
4a1fcd1981ea1993227fb568a1b744cbf38178b4
app/DataLogger/sqlite_logger.py
app/DataLogger/sqlite_logger.py
import sqlite3 import time class SQLiteLogger: def __init__(self, filename="test.db"): self.filename = filename self.connection = None def __enter__(self): try: with open(self.filename): self.connection = sqlite3.connect(self.filename) except IOErr...
import sqlite3 import time class SQLiteLogger: def __init__(self, filename="g2x.db"): self.filename = filename self.connection = None def __enter__(self): try: with open(self.filename): self.connection = sqlite3.connect(self.filename) except IOError...
Change default db name to g2x.db
Change default db name to g2x.db
Python
mit
gizmo-cda/g2x,gizmo-cda/g2x,gizmo-cda/g2x,gizmo-cda/g2x,thelonious/g2x,thelonious/g2x
import sqlite3 import time class SQLiteLogger: def __init__(self, filename="test.db"): self.filename = filename self.connection = None def __enter__(self): try: with open(self.filename): self.connection = sqlite3.connect(self.filename) except IOErr...
import sqlite3 import time class SQLiteLogger: def __init__(self, filename="g2x.db"): self.filename = filename self.connection = None def __enter__(self): try: with open(self.filename): self.connection = sqlite3.connect(self.filename) except IOError...
<commit_before>import sqlite3 import time class SQLiteLogger: def __init__(self, filename="test.db"): self.filename = filename self.connection = None def __enter__(self): try: with open(self.filename): self.connection = sqlite3.connect(self.filename) ...
import sqlite3 import time class SQLiteLogger: def __init__(self, filename="g2x.db"): self.filename = filename self.connection = None def __enter__(self): try: with open(self.filename): self.connection = sqlite3.connect(self.filename) except IOError...
import sqlite3 import time class SQLiteLogger: def __init__(self, filename="test.db"): self.filename = filename self.connection = None def __enter__(self): try: with open(self.filename): self.connection = sqlite3.connect(self.filename) except IOErr...
<commit_before>import sqlite3 import time class SQLiteLogger: def __init__(self, filename="test.db"): self.filename = filename self.connection = None def __enter__(self): try: with open(self.filename): self.connection = sqlite3.connect(self.filename) ...
25a0d4b8f91f1d771c215079832170cd0402d2ee
gi/overrides/__init__.py
gi/overrides/__init__.py
from pkgutil import extend_path __path__ = extend_path(__path__, __name__) print __path__, __name__
from pkgutil import extend_path __path__ = extend_path(__path__, __name__) print(__path__, __name__)
Fix another syntax error with newer Python versions
Fix another syntax error with newer Python versions
Python
lgpl-2.1
lubosz/gst-python,GStreamer/gst-python,lubosz/gst-python,GStreamer/gst-python,pexip/gst-python,GStreamer/gst-python,pexip/gst-python,lubosz/gst-python,freedesktop-unofficial-mirror/gstreamer__gst-python,pexip/gst-python,freedesktop-unofficial-mirror/gstreamer__gst-python,freedesktop-unofficial-mirror/gstreamer__gst-pyt...
from pkgutil import extend_path __path__ = extend_path(__path__, __name__) print __path__, __name__ Fix another syntax error with newer Python versions
from pkgutil import extend_path __path__ = extend_path(__path__, __name__) print(__path__, __name__)
<commit_before>from pkgutil import extend_path __path__ = extend_path(__path__, __name__) print __path__, __name__ <commit_msg>Fix another syntax error with newer Python versions<commit_after>
from pkgutil import extend_path __path__ = extend_path(__path__, __name__) print(__path__, __name__)
from pkgutil import extend_path __path__ = extend_path(__path__, __name__) print __path__, __name__ Fix another syntax error with newer Python versionsfrom pkgutil import extend_path __path__ = extend_path(__path__, __name__) print(__path__, __name__)
<commit_before>from pkgutil import extend_path __path__ = extend_path(__path__, __name__) print __path__, __name__ <commit_msg>Fix another syntax error with newer Python versions<commit_after>from pkgutil import extend_path __path__ = extend_path(__path__, __name__) print(__path__, __name__)
93d9ae1275aa6f40f3ad4a63b6919eb3eaaf6cf8
nimble/sources/elementary.py
nimble/sources/elementary.py
# -*- coding: utf-8 -*- from __future__ import absolute_import from ..composition import SeekableSource import numpy as np class IntegerIdentitySource(SeekableSource): """Return the integer used as position argument.""" def __init__(self, size=np.iinfo(np.uint32).max, **kwargs): self.parallel_possi...
# -*- coding: utf-8 -*- from __future__ import absolute_import from ..composition import SeekableSource import numpy as np class IntegerIdentitySource(SeekableSource): """Return the integer used as position argument.""" def __init__(self, size=np.iinfo(np.uint32).max, **kwargs): self.parallel_possi...
Set identity integer source data type
Set identity integer source data type
Python
mit
risteon/nimble
# -*- coding: utf-8 -*- from __future__ import absolute_import from ..composition import SeekableSource import numpy as np class IntegerIdentitySource(SeekableSource): """Return the integer used as position argument.""" def __init__(self, size=np.iinfo(np.uint32).max, **kwargs): self.parallel_possi...
# -*- coding: utf-8 -*- from __future__ import absolute_import from ..composition import SeekableSource import numpy as np class IntegerIdentitySource(SeekableSource): """Return the integer used as position argument.""" def __init__(self, size=np.iinfo(np.uint32).max, **kwargs): self.parallel_possi...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import from ..composition import SeekableSource import numpy as np class IntegerIdentitySource(SeekableSource): """Return the integer used as position argument.""" def __init__(self, size=np.iinfo(np.uint32).max, **kwargs): self...
# -*- coding: utf-8 -*- from __future__ import absolute_import from ..composition import SeekableSource import numpy as np class IntegerIdentitySource(SeekableSource): """Return the integer used as position argument.""" def __init__(self, size=np.iinfo(np.uint32).max, **kwargs): self.parallel_possi...
# -*- coding: utf-8 -*- from __future__ import absolute_import from ..composition import SeekableSource import numpy as np class IntegerIdentitySource(SeekableSource): """Return the integer used as position argument.""" def __init__(self, size=np.iinfo(np.uint32).max, **kwargs): self.parallel_possi...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import from ..composition import SeekableSource import numpy as np class IntegerIdentitySource(SeekableSource): """Return the integer used as position argument.""" def __init__(self, size=np.iinfo(np.uint32).max, **kwargs): self...
6d507595b0e51ed4a366c3288eec808ac91e30bc
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='python3', site_packages=False, alw...
# 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='python3', site_packages=False, alw...
Fix no yield from in middle ages
Fix no yield from in middle ages
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='python3', site_packages=False, alw...
# 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='python3', site_packages=False, alw...
<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='python3', site_pack...
# 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='python3', site_packages=False, alw...
# 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='python3', site_packages=False, alw...
<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='python3', site_pack...
6d567ad3eb7749692b05a7685ffbd99f74d965cd
manage.py
manage.py
import os from flask.ext.script import Manager from flask.ext.migrate import Migrate from flask.ext.migrate import MigrateCommand from flask_security.utils import encrypt_password from service.models import * from service import app from service import db from service import user_datastore app.config.from_object(os...
import os from flask.ext.script import Manager from flask.ext.migrate import Migrate from flask.ext.migrate import MigrateCommand from flask_security.utils import encrypt_password from service.models import * from service import app from service import db from service import user_datastore app.config.from_object(os...
Fix create user command to work locally and on heroku
Fix create user command to work locally and on heroku
Python
mit
LandRegistry/service-frontend-alpha,LandRegistry/service-frontend-alpha,LandRegistry/service-frontend-alpha,LandRegistry/service-frontend-alpha,LandRegistry/service-frontend-alpha
import os from flask.ext.script import Manager from flask.ext.migrate import Migrate from flask.ext.migrate import MigrateCommand from flask_security.utils import encrypt_password from service.models import * from service import app from service import db from service import user_datastore app.config.from_object(os...
import os from flask.ext.script import Manager from flask.ext.migrate import Migrate from flask.ext.migrate import MigrateCommand from flask_security.utils import encrypt_password from service.models import * from service import app from service import db from service import user_datastore app.config.from_object(os...
<commit_before>import os from flask.ext.script import Manager from flask.ext.migrate import Migrate from flask.ext.migrate import MigrateCommand from flask_security.utils import encrypt_password from service.models import * from service import app from service import db from service import user_datastore app.config...
import os from flask.ext.script import Manager from flask.ext.migrate import Migrate from flask.ext.migrate import MigrateCommand from flask_security.utils import encrypt_password from service.models import * from service import app from service import db from service import user_datastore app.config.from_object(os...
import os from flask.ext.script import Manager from flask.ext.migrate import Migrate from flask.ext.migrate import MigrateCommand from flask_security.utils import encrypt_password from service.models import * from service import app from service import db from service import user_datastore app.config.from_object(os...
<commit_before>import os from flask.ext.script import Manager from flask.ext.migrate import Migrate from flask.ext.migrate import MigrateCommand from flask_security.utils import encrypt_password from service.models import * from service import app from service import db from service import user_datastore app.config...
d1e0949533ad30e2cd3e5afccbf59d835c1b0fe3
doc/examples/plot_entropy.py
doc/examples/plot_entropy.py
""" ======= Entropy ======= Image entropy is a quantity which is used to describe the amount of information coded in an image. """ import numpy as np import matplotlib.pyplot as plt from skimage import data from skimage.filter.rank import entropy from skimage.morphology import disk from skimage.util import img_as_ub...
""" ======= Entropy ======= Image entropy is a quantity which is used to describe the amount of information coded in an image. """ import numpy as np import matplotlib.pyplot as plt from skimage import data from skimage.filter.rank import entropy from skimage.morphology import disk from skimage.util import img_as_ub...
Update entropy example with improved matplotlib usage
Update entropy example with improved matplotlib usage
Python
bsd-3-clause
dpshelio/scikit-image,ofgulban/scikit-image,SamHames/scikit-image,GaZ3ll3/scikit-image,warmspringwinds/scikit-image,oew1v07/scikit-image,WarrenWeckesser/scikits-image,ClinicalGraphics/scikit-image,chriscrosscutler/scikit-image,bsipocz/scikit-image,jwiggins/scikit-image,michaelpacer/scikit-image,almarklein/scikit-image,...
""" ======= Entropy ======= Image entropy is a quantity which is used to describe the amount of information coded in an image. """ import numpy as np import matplotlib.pyplot as plt from skimage import data from skimage.filter.rank import entropy from skimage.morphology import disk from skimage.util import img_as_ub...
""" ======= Entropy ======= Image entropy is a quantity which is used to describe the amount of information coded in an image. """ import numpy as np import matplotlib.pyplot as plt from skimage import data from skimage.filter.rank import entropy from skimage.morphology import disk from skimage.util import img_as_ub...
<commit_before>""" ======= Entropy ======= Image entropy is a quantity which is used to describe the amount of information coded in an image. """ import numpy as np import matplotlib.pyplot as plt from skimage import data from skimage.filter.rank import entropy from skimage.morphology import disk from skimage.util i...
""" ======= Entropy ======= Image entropy is a quantity which is used to describe the amount of information coded in an image. """ import numpy as np import matplotlib.pyplot as plt from skimage import data from skimage.filter.rank import entropy from skimage.morphology import disk from skimage.util import img_as_ub...
""" ======= Entropy ======= Image entropy is a quantity which is used to describe the amount of information coded in an image. """ import numpy as np import matplotlib.pyplot as plt from skimage import data from skimage.filter.rank import entropy from skimage.morphology import disk from skimage.util import img_as_ub...
<commit_before>""" ======= Entropy ======= Image entropy is a quantity which is used to describe the amount of information coded in an image. """ import numpy as np import matplotlib.pyplot as plt from skimage import data from skimage.filter.rank import entropy from skimage.morphology import disk from skimage.util i...
411b594c7d363f68555a97fccff92a43392d0d04
webshop/core/util.py
webshop/core/util.py
# Copyright (C) 2010-2011 Mathijs de Bruin <[email protected]> # # This file is part of django-webshop. # # django-webshop 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 2, or (at...
# Copyright (C) 2010-2011 Mathijs de Bruin <[email protected]> # # This file is part of django-webshop. # # django-webshop 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 2, or (at...
Make sure we have actually looked up a model in get_model_from_string.
Make sure we have actually looked up a model in get_model_from_string.
Python
agpl-3.0
dokterbob/django-shopkit,dokterbob/django-shopkit
# Copyright (C) 2010-2011 Mathijs de Bruin <[email protected]> # # This file is part of django-webshop. # # django-webshop 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 2, or (at...
# Copyright (C) 2010-2011 Mathijs de Bruin <[email protected]> # # This file is part of django-webshop. # # django-webshop 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 2, or (at...
<commit_before># Copyright (C) 2010-2011 Mathijs de Bruin <[email protected]> # # This file is part of django-webshop. # # django-webshop 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 ve...
# Copyright (C) 2010-2011 Mathijs de Bruin <[email protected]> # # This file is part of django-webshop. # # django-webshop 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 2, or (at...
# Copyright (C) 2010-2011 Mathijs de Bruin <[email protected]> # # This file is part of django-webshop. # # django-webshop 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 2, or (at...
<commit_before># Copyright (C) 2010-2011 Mathijs de Bruin <[email protected]> # # This file is part of django-webshop. # # django-webshop 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 ve...
508d86ba316fd48522d73d4ae3049f96e8e73eae
dpaste/urls/dpaste.py
dpaste/urls/dpaste.py
from django.conf.urls.defaults import url, patterns urlpatterns = patterns('dpaste.views', url(r'^$', 'snippet_new', name='snippet_new'), url(r'^diff/$', 'snippet_diff', name='snippet_diff'), url(r'^history/$', 'snippet_history', name='snippet_history'), url(r'^delete/$', 'snippet_delete', name='snippe...
from django.conf.urls.defaults import url, patterns urlpatterns = patterns('dpaste.views', url(r'^$', 'snippet_new', name='snippet_new'), url(r'^diff/$', 'snippet_diff', name='snippet_diff'), url(r'^history/$', 'snippet_history', name='snippet_history'), url(r'^delete/$', 'snippet_delete', name='snippe...
Allow raw snippets without trailing slash
Allow raw snippets without trailing slash Fixes an asymmetry where both of curl https://dpaste.de/xXxx curl https://dpaste.de/xXxx/ work, but curl https://dpaste.de/xXxx/raw/ fails without a trailing slash (because curl doesn't follow redirects by default).
Python
mit
bartTC/dpaste,rbarrois/xelpaste,bartTC/dpaste,bartTC/dpaste,rbarrois/xelpaste,SanketDG/dpaste,SanketDG/dpaste,rbarrois/xelpaste,SanketDG/dpaste
from django.conf.urls.defaults import url, patterns urlpatterns = patterns('dpaste.views', url(r'^$', 'snippet_new', name='snippet_new'), url(r'^diff/$', 'snippet_diff', name='snippet_diff'), url(r'^history/$', 'snippet_history', name='snippet_history'), url(r'^delete/$', 'snippet_delete', name='snippe...
from django.conf.urls.defaults import url, patterns urlpatterns = patterns('dpaste.views', url(r'^$', 'snippet_new', name='snippet_new'), url(r'^diff/$', 'snippet_diff', name='snippet_diff'), url(r'^history/$', 'snippet_history', name='snippet_history'), url(r'^delete/$', 'snippet_delete', name='snippe...
<commit_before>from django.conf.urls.defaults import url, patterns urlpatterns = patterns('dpaste.views', url(r'^$', 'snippet_new', name='snippet_new'), url(r'^diff/$', 'snippet_diff', name='snippet_diff'), url(r'^history/$', 'snippet_history', name='snippet_history'), url(r'^delete/$', 'snippet_delete...
from django.conf.urls.defaults import url, patterns urlpatterns = patterns('dpaste.views', url(r'^$', 'snippet_new', name='snippet_new'), url(r'^diff/$', 'snippet_diff', name='snippet_diff'), url(r'^history/$', 'snippet_history', name='snippet_history'), url(r'^delete/$', 'snippet_delete', name='snippe...
from django.conf.urls.defaults import url, patterns urlpatterns = patterns('dpaste.views', url(r'^$', 'snippet_new', name='snippet_new'), url(r'^diff/$', 'snippet_diff', name='snippet_diff'), url(r'^history/$', 'snippet_history', name='snippet_history'), url(r'^delete/$', 'snippet_delete', name='snippe...
<commit_before>from django.conf.urls.defaults import url, patterns urlpatterns = patterns('dpaste.views', url(r'^$', 'snippet_new', name='snippet_new'), url(r'^diff/$', 'snippet_diff', name='snippet_diff'), url(r'^history/$', 'snippet_history', name='snippet_history'), url(r'^delete/$', 'snippet_delete...
aa94c28835a67ca000226eb30bdbb0ef852383c5
jshbot/configurations.py
jshbot/configurations.py
import json from jshbot.exceptions import ConfiguredBotException, ErrorTypes CBException = ConfiguredBotException('Configurations') def get(bot, plugin_name, key=None, extra=None, extension='json'): """Gets the configuration file for the given plugin. Keyword arguments: key -- Gets the specified key fr...
import json import yaml from jshbot.exceptions import ConfiguredBotException, ErrorTypes CBException = ConfiguredBotException('Configurations') def get(bot, plugin_name, key=None, extra=None, extension='yaml'): """Gets the configuration file for the given plugin. Keyword arguments: key -- Gets the spec...
Change default extension to yaml
Change default extension to yaml
Python
mit
jkchen2/JshBot,jkchen2/JshBot
import json from jshbot.exceptions import ConfiguredBotException, ErrorTypes CBException = ConfiguredBotException('Configurations') def get(bot, plugin_name, key=None, extra=None, extension='json'): """Gets the configuration file for the given plugin. Keyword arguments: key -- Gets the specified key fr...
import json import yaml from jshbot.exceptions import ConfiguredBotException, ErrorTypes CBException = ConfiguredBotException('Configurations') def get(bot, plugin_name, key=None, extra=None, extension='yaml'): """Gets the configuration file for the given plugin. Keyword arguments: key -- Gets the spec...
<commit_before>import json from jshbot.exceptions import ConfiguredBotException, ErrorTypes CBException = ConfiguredBotException('Configurations') def get(bot, plugin_name, key=None, extra=None, extension='json'): """Gets the configuration file for the given plugin. Keyword arguments: key -- Gets the s...
import json import yaml from jshbot.exceptions import ConfiguredBotException, ErrorTypes CBException = ConfiguredBotException('Configurations') def get(bot, plugin_name, key=None, extra=None, extension='yaml'): """Gets the configuration file for the given plugin. Keyword arguments: key -- Gets the spec...
import json from jshbot.exceptions import ConfiguredBotException, ErrorTypes CBException = ConfiguredBotException('Configurations') def get(bot, plugin_name, key=None, extra=None, extension='json'): """Gets the configuration file for the given plugin. Keyword arguments: key -- Gets the specified key fr...
<commit_before>import json from jshbot.exceptions import ConfiguredBotException, ErrorTypes CBException = ConfiguredBotException('Configurations') def get(bot, plugin_name, key=None, extra=None, extension='json'): """Gets the configuration file for the given plugin. Keyword arguments: key -- Gets the s...
67752442760221c2e53990bb5dd10f1e045d74a1
nltk_training/information_extraction.py
nltk_training/information_extraction.py
#!/usr/bin/python # -*- coding: UTF-8 -*- from __future__ import division import feedparser, os from BeautifulSoup import BeautifulSoup import nltk, re, pprint from nltk import word_tokenize # from urllib2 import Request as request import urllib2 def ie_preprocess(document): sentences = nltk.sent_tokenize(document) ...
#!/usr/bin/python # -*- coding: UTF-8 -*- from __future__ import division import feedparser, os from BeautifulSoup import BeautifulSoup import nltk, re, pprint from nltk import word_tokenize # from urllib2 import Request as request import urllib2 def ie_preprocess(document): sentences = nltk.sent_tokenize(document) ...
Add lastest updates to script
Add lastest updates to script
Python
apache-2.0
fullbright/gary-reporter,fullbright/gary-reporter
#!/usr/bin/python # -*- coding: UTF-8 -*- from __future__ import division import feedparser, os from BeautifulSoup import BeautifulSoup import nltk, re, pprint from nltk import word_tokenize # from urllib2 import Request as request import urllib2 def ie_preprocess(document): sentences = nltk.sent_tokenize(document) ...
#!/usr/bin/python # -*- coding: UTF-8 -*- from __future__ import division import feedparser, os from BeautifulSoup import BeautifulSoup import nltk, re, pprint from nltk import word_tokenize # from urllib2 import Request as request import urllib2 def ie_preprocess(document): sentences = nltk.sent_tokenize(document) ...
<commit_before>#!/usr/bin/python # -*- coding: UTF-8 -*- from __future__ import division import feedparser, os from BeautifulSoup import BeautifulSoup import nltk, re, pprint from nltk import word_tokenize # from urllib2 import Request as request import urllib2 def ie_preprocess(document): sentences = nltk.sent_toke...
#!/usr/bin/python # -*- coding: UTF-8 -*- from __future__ import division import feedparser, os from BeautifulSoup import BeautifulSoup import nltk, re, pprint from nltk import word_tokenize # from urllib2 import Request as request import urllib2 def ie_preprocess(document): sentences = nltk.sent_tokenize(document) ...
#!/usr/bin/python # -*- coding: UTF-8 -*- from __future__ import division import feedparser, os from BeautifulSoup import BeautifulSoup import nltk, re, pprint from nltk import word_tokenize # from urllib2 import Request as request import urllib2 def ie_preprocess(document): sentences = nltk.sent_tokenize(document) ...
<commit_before>#!/usr/bin/python # -*- coding: UTF-8 -*- from __future__ import division import feedparser, os from BeautifulSoup import BeautifulSoup import nltk, re, pprint from nltk import word_tokenize # from urllib2 import Request as request import urllib2 def ie_preprocess(document): sentences = nltk.sent_toke...
a36adf795f370877a472fa4730a3eb31271b8b23
subversion/bindings/swig/python/tests/run_all.py
subversion/bindings/swig/python/tests/run_all.py
import sys, os bindir = os.path.dirname(sys.argv[0]) sys.path[0:0] = [ os.getcwd(), "%s/.libs" % os.getcwd(), \ "%s/.." % bindir, "%s/../.libs" % bindir ] import unittest import pool import trac.versioncontrol.tests # Run all tests def suite(): """Run all tests""" suite = unittest.TestSuite() ...
import sys, os bindir = os.path.dirname(sys.argv[0]) sys.path[0:0] = [ os.getcwd(), "%s/.libs" % os.getcwd(), \ "%s/.." % bindir, "%s/../.libs" % bindir ] # OSes without RPATH support are going to have to do things here to make # the correct shared libraries be found. if sys.platform == 'cygwin': i...
Make the Python bindings testsuite be able to find the needed shared libraries on Cygwin. Needed to compensate for Windows' complete lack of library RPATHs.
Make the Python bindings testsuite be able to find the needed shared libraries on Cygwin. Needed to compensate for Windows' complete lack of library RPATHs. * subversion/bindings/swig/python/tests/run_all.py: On Cygwin, manipulate $PATH so that the relevant shared libraries are found.
Python
apache-2.0
jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion
import sys, os bindir = os.path.dirname(sys.argv[0]) sys.path[0:0] = [ os.getcwd(), "%s/.libs" % os.getcwd(), \ "%s/.." % bindir, "%s/../.libs" % bindir ] import unittest import pool import trac.versioncontrol.tests # Run all tests def suite(): """Run all tests""" suite = unittest.TestSuite() ...
import sys, os bindir = os.path.dirname(sys.argv[0]) sys.path[0:0] = [ os.getcwd(), "%s/.libs" % os.getcwd(), \ "%s/.." % bindir, "%s/../.libs" % bindir ] # OSes without RPATH support are going to have to do things here to make # the correct shared libraries be found. if sys.platform == 'cygwin': i...
<commit_before>import sys, os bindir = os.path.dirname(sys.argv[0]) sys.path[0:0] = [ os.getcwd(), "%s/.libs" % os.getcwd(), \ "%s/.." % bindir, "%s/../.libs" % bindir ] import unittest import pool import trac.versioncontrol.tests # Run all tests def suite(): """Run all tests""" suite = unittest...
import sys, os bindir = os.path.dirname(sys.argv[0]) sys.path[0:0] = [ os.getcwd(), "%s/.libs" % os.getcwd(), \ "%s/.." % bindir, "%s/../.libs" % bindir ] # OSes without RPATH support are going to have to do things here to make # the correct shared libraries be found. if sys.platform == 'cygwin': i...
import sys, os bindir = os.path.dirname(sys.argv[0]) sys.path[0:0] = [ os.getcwd(), "%s/.libs" % os.getcwd(), \ "%s/.." % bindir, "%s/../.libs" % bindir ] import unittest import pool import trac.versioncontrol.tests # Run all tests def suite(): """Run all tests""" suite = unittest.TestSuite() ...
<commit_before>import sys, os bindir = os.path.dirname(sys.argv[0]) sys.path[0:0] = [ os.getcwd(), "%s/.libs" % os.getcwd(), \ "%s/.." % bindir, "%s/../.libs" % bindir ] import unittest import pool import trac.versioncontrol.tests # Run all tests def suite(): """Run all tests""" suite = unittest...
ef6c29b6ebd8e3b536dcd63cfce683a6b69897d7
nyuki/workflow/tasks/python_script.py
nyuki/workflow/tasks/python_script.py
import logging from tukio.task import register from tukio.task.holder import TaskHolder log = logging.getLogger(__name__) @register('python_script', 'execute') class PythonScript(TaskHolder): """ Mainly a testing task """ SCHEMA = { 'type': 'object', 'properties': { 'sc...
import logging from tukio.task import register from tukio.task.holder import TaskHolder log = logging.getLogger(__name__) @register('python_script', 'execute') class PythonScript(TaskHolder): """ Mainly a testing task """ SCHEMA = { 'type': 'object', 'properties': { 'sc...
Improve script task to allow multiline
Improve script task to allow multiline
Python
apache-2.0
optiflows/nyuki,optiflows/nyuki,gdraynz/nyuki,gdraynz/nyuki
import logging from tukio.task import register from tukio.task.holder import TaskHolder log = logging.getLogger(__name__) @register('python_script', 'execute') class PythonScript(TaskHolder): """ Mainly a testing task """ SCHEMA = { 'type': 'object', 'properties': { 'sc...
import logging from tukio.task import register from tukio.task.holder import TaskHolder log = logging.getLogger(__name__) @register('python_script', 'execute') class PythonScript(TaskHolder): """ Mainly a testing task """ SCHEMA = { 'type': 'object', 'properties': { 'sc...
<commit_before>import logging from tukio.task import register from tukio.task.holder import TaskHolder log = logging.getLogger(__name__) @register('python_script', 'execute') class PythonScript(TaskHolder): """ Mainly a testing task """ SCHEMA = { 'type': 'object', 'properties': { ...
import logging from tukio.task import register from tukio.task.holder import TaskHolder log = logging.getLogger(__name__) @register('python_script', 'execute') class PythonScript(TaskHolder): """ Mainly a testing task """ SCHEMA = { 'type': 'object', 'properties': { 'sc...
import logging from tukio.task import register from tukio.task.holder import TaskHolder log = logging.getLogger(__name__) @register('python_script', 'execute') class PythonScript(TaskHolder): """ Mainly a testing task """ SCHEMA = { 'type': 'object', 'properties': { 'sc...
<commit_before>import logging from tukio.task import register from tukio.task.holder import TaskHolder log = logging.getLogger(__name__) @register('python_script', 'execute') class PythonScript(TaskHolder): """ Mainly a testing task """ SCHEMA = { 'type': 'object', 'properties': { ...
223b58cb0f9c63543a4d23f75db4450ce93ab86d
readthedocs/builds/forms.py
readthedocs/builds/forms.py
import logging from django import forms from readthedocs.builds.models import VersionAlias, Version from readthedocs.core.utils import trigger_build from readthedocs.projects.models import Project from readthedocs.projects.tasks import clear_artifacts log = logging.getLogger(__name__) class AliasForm(forms.ModelF...
import logging from django import forms from readthedocs.builds.models import VersionAlias, Version from readthedocs.core.utils import trigger_build from readthedocs.projects.models import Project from readthedocs.projects.tasks import clear_artifacts log = logging.getLogger(__name__) class AliasForm(forms.ModelF...
Handle built state tracking on versions
Handle built state tracking on versions
Python
mit
espdev/readthedocs.org,pombredanne/readthedocs.org,espdev/readthedocs.org,stevepiercy/readthedocs.org,rtfd/readthedocs.org,davidfischer/readthedocs.org,istresearch/readthedocs.org,davidfischer/readthedocs.org,rtfd/readthedocs.org,safwanrahman/readthedocs.org,davidfischer/readthedocs.org,rtfd/readthedocs.org,tddv/readth...
import logging from django import forms from readthedocs.builds.models import VersionAlias, Version from readthedocs.core.utils import trigger_build from readthedocs.projects.models import Project from readthedocs.projects.tasks import clear_artifacts log = logging.getLogger(__name__) class AliasForm(forms.ModelF...
import logging from django import forms from readthedocs.builds.models import VersionAlias, Version from readthedocs.core.utils import trigger_build from readthedocs.projects.models import Project from readthedocs.projects.tasks import clear_artifacts log = logging.getLogger(__name__) class AliasForm(forms.ModelF...
<commit_before>import logging from django import forms from readthedocs.builds.models import VersionAlias, Version from readthedocs.core.utils import trigger_build from readthedocs.projects.models import Project from readthedocs.projects.tasks import clear_artifacts log = logging.getLogger(__name__) class AliasFo...
import logging from django import forms from readthedocs.builds.models import VersionAlias, Version from readthedocs.core.utils import trigger_build from readthedocs.projects.models import Project from readthedocs.projects.tasks import clear_artifacts log = logging.getLogger(__name__) class AliasForm(forms.ModelF...
import logging from django import forms from readthedocs.builds.models import VersionAlias, Version from readthedocs.core.utils import trigger_build from readthedocs.projects.models import Project from readthedocs.projects.tasks import clear_artifacts log = logging.getLogger(__name__) class AliasForm(forms.ModelF...
<commit_before>import logging from django import forms from readthedocs.builds.models import VersionAlias, Version from readthedocs.core.utils import trigger_build from readthedocs.projects.models import Project from readthedocs.projects.tasks import clear_artifacts log = logging.getLogger(__name__) class AliasFo...
b593c9fa9939c7fc524a2d4a1c3a7e337fe8de07
wooey/migrations/0037_populate-jsonfield.py
wooey/migrations/0037_populate-jsonfield.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2018-03-04 23:14 from __future__ import unicode_literals from django.db import migrations def populate_default(apps, schema_editor): ScriptParameter = apps.get_model('wooey', 'ScriptParameter') for obj in ScriptParameter.objects.all(): obj.defau...
# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2018-03-04 23:14 from __future__ import unicode_literals import json from django.db import migrations def populate_default(apps, schema_editor): ScriptParameter = apps.get_model('wooey', 'ScriptParameter') for obj in ScriptParameter.objects.all(): ...
Convert iniital json field if possible in migration
Convert iniital json field if possible in migration
Python
bsd-3-clause
wooey/Wooey,wooey/Wooey,wooey/Wooey,wooey/Wooey
# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2018-03-04 23:14 from __future__ import unicode_literals from django.db import migrations def populate_default(apps, schema_editor): ScriptParameter = apps.get_model('wooey', 'ScriptParameter') for obj in ScriptParameter.objects.all(): obj.defau...
# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2018-03-04 23:14 from __future__ import unicode_literals import json from django.db import migrations def populate_default(apps, schema_editor): ScriptParameter = apps.get_model('wooey', 'ScriptParameter') for obj in ScriptParameter.objects.all(): ...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2018-03-04 23:14 from __future__ import unicode_literals from django.db import migrations def populate_default(apps, schema_editor): ScriptParameter = apps.get_model('wooey', 'ScriptParameter') for obj in ScriptParameter.objects.all(): ...
# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2018-03-04 23:14 from __future__ import unicode_literals import json from django.db import migrations def populate_default(apps, schema_editor): ScriptParameter = apps.get_model('wooey', 'ScriptParameter') for obj in ScriptParameter.objects.all(): ...
# -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2018-03-04 23:14 from __future__ import unicode_literals from django.db import migrations def populate_default(apps, schema_editor): ScriptParameter = apps.get_model('wooey', 'ScriptParameter') for obj in ScriptParameter.objects.all(): obj.defau...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.9.13 on 2018-03-04 23:14 from __future__ import unicode_literals from django.db import migrations def populate_default(apps, schema_editor): ScriptParameter = apps.get_model('wooey', 'ScriptParameter') for obj in ScriptParameter.objects.all(): ...
b6fff4186de098946cc1e4c0204f78936f73044f
tests/basics/tuple1.py
tests/basics/tuple1.py
# basic tuple functionality x = (1, 2, 3 * 4) print(x) try: x[0] = 4 except TypeError: print("TypeError") print(x) try: x.append(5) except AttributeError: print("AttributeError") print(x[1:]) print(x[:-1]) print(x[2:3]) print(x + (10, 100, 10000)) # construction of tuple from large iterator (tests im...
# basic tuple functionality x = (1, 2, 3 * 4) print(x) try: x[0] = 4 except TypeError: print("TypeError") print(x) try: x.append(5) except AttributeError: print("AttributeError") print(x[1:]) print(x[:-1]) print(x[2:3]) print(x + (10, 100, 10000)) # inplace add operator x += (10, 11, 12) print(x) # ...
Add test for tuple inplace add.
tests/basics: Add test for tuple inplace add.
Python
mit
infinnovation/micropython,dmazzella/micropython,henriknelson/micropython,chrisdearman/micropython,deshipu/micropython,AriZuu/micropython,infinnovation/micropython,AriZuu/micropython,puuu/micropython,alex-robbins/micropython,torwag/micropython,SHA2017-badge/micropython-esp32,tralamazza/micropython,chrisdearman/micropyth...
# basic tuple functionality x = (1, 2, 3 * 4) print(x) try: x[0] = 4 except TypeError: print("TypeError") print(x) try: x.append(5) except AttributeError: print("AttributeError") print(x[1:]) print(x[:-1]) print(x[2:3]) print(x + (10, 100, 10000)) # construction of tuple from large iterator (tests im...
# basic tuple functionality x = (1, 2, 3 * 4) print(x) try: x[0] = 4 except TypeError: print("TypeError") print(x) try: x.append(5) except AttributeError: print("AttributeError") print(x[1:]) print(x[:-1]) print(x[2:3]) print(x + (10, 100, 10000)) # inplace add operator x += (10, 11, 12) print(x) # ...
<commit_before># basic tuple functionality x = (1, 2, 3 * 4) print(x) try: x[0] = 4 except TypeError: print("TypeError") print(x) try: x.append(5) except AttributeError: print("AttributeError") print(x[1:]) print(x[:-1]) print(x[2:3]) print(x + (10, 100, 10000)) # construction of tuple from large ite...
# basic tuple functionality x = (1, 2, 3 * 4) print(x) try: x[0] = 4 except TypeError: print("TypeError") print(x) try: x.append(5) except AttributeError: print("AttributeError") print(x[1:]) print(x[:-1]) print(x[2:3]) print(x + (10, 100, 10000)) # inplace add operator x += (10, 11, 12) print(x) # ...
# basic tuple functionality x = (1, 2, 3 * 4) print(x) try: x[0] = 4 except TypeError: print("TypeError") print(x) try: x.append(5) except AttributeError: print("AttributeError") print(x[1:]) print(x[:-1]) print(x[2:3]) print(x + (10, 100, 10000)) # construction of tuple from large iterator (tests im...
<commit_before># basic tuple functionality x = (1, 2, 3 * 4) print(x) try: x[0] = 4 except TypeError: print("TypeError") print(x) try: x.append(5) except AttributeError: print("AttributeError") print(x[1:]) print(x[:-1]) print(x[2:3]) print(x + (10, 100, 10000)) # construction of tuple from large ite...
c306e731fde754dc11629ff32f7d0b6afb510e81
controllers/accounts_manager.py
controllers/accounts_manager.py
from flask_restful import Resource class AccountsManager(Resource): """docstring for AccountsManager.""" def get(self): return {"route": "login"} def post(self): return {"route": "register"}
from flask import jsonify, make_response from flask_restful import Resource, reqparse from app.models import User from app.db_instance import save from validator import validate class AccountsManager(Resource): """docstring for AccountsManager.""" def __init__(self): self.parser = reqparse.RequestPars...
Add Register resource to handle user registration and save user data to the database
Add Register resource to handle user registration and save user data to the database
Python
mit
brayoh/bucket-list-api
from flask_restful import Resource class AccountsManager(Resource): """docstring for AccountsManager.""" def get(self): return {"route": "login"} def post(self): return {"route": "register"} Add Register resource to handle user registration and save user data to the database
from flask import jsonify, make_response from flask_restful import Resource, reqparse from app.models import User from app.db_instance import save from validator import validate class AccountsManager(Resource): """docstring for AccountsManager.""" def __init__(self): self.parser = reqparse.RequestPars...
<commit_before>from flask_restful import Resource class AccountsManager(Resource): """docstring for AccountsManager.""" def get(self): return {"route": "login"} def post(self): return {"route": "register"} <commit_msg>Add Register resource to handle user registration and save user data to...
from flask import jsonify, make_response from flask_restful import Resource, reqparse from app.models import User from app.db_instance import save from validator import validate class AccountsManager(Resource): """docstring for AccountsManager.""" def __init__(self): self.parser = reqparse.RequestPars...
from flask_restful import Resource class AccountsManager(Resource): """docstring for AccountsManager.""" def get(self): return {"route": "login"} def post(self): return {"route": "register"} Add Register resource to handle user registration and save user data to the databasefrom flask imp...
<commit_before>from flask_restful import Resource class AccountsManager(Resource): """docstring for AccountsManager.""" def get(self): return {"route": "login"} def post(self): return {"route": "register"} <commit_msg>Add Register resource to handle user registration and save user data to...
ec648988b9ce5def40538004c7704739a3a9dd6e
disco_aws_automation/version.py
disco_aws_automation/version.py
"""Place of record for the package version""" __version__ = "1.1.17" __rpm_version__ = "WILL_BE_SET_BY_RPM_BUILD" __git_hash__ = "WILL_BE_SET_BY_EGG_BUILD"
"""Place of record for the package version""" __version__ = "1.1.19" __rpm_version__ = "WILL_BE_SET_BY_RPM_BUILD" __git_hash__ = "WILL_BE_SET_BY_EGG_BUILD"
Return exit code on disco_deploy test and update
Return exit code on disco_deploy test and update
Python
bsd-2-clause
amplifylitco/asiaq,amplifylitco/asiaq,amplifylitco/asiaq
"""Place of record for the package version""" __version__ = "1.1.17" __rpm_version__ = "WILL_BE_SET_BY_RPM_BUILD" __git_hash__ = "WILL_BE_SET_BY_EGG_BUILD" Return exit code on disco_deploy test and update
"""Place of record for the package version""" __version__ = "1.1.19" __rpm_version__ = "WILL_BE_SET_BY_RPM_BUILD" __git_hash__ = "WILL_BE_SET_BY_EGG_BUILD"
<commit_before>"""Place of record for the package version""" __version__ = "1.1.17" __rpm_version__ = "WILL_BE_SET_BY_RPM_BUILD" __git_hash__ = "WILL_BE_SET_BY_EGG_BUILD" <commit_msg>Return exit code on disco_deploy test and update<commit_after>
"""Place of record for the package version""" __version__ = "1.1.19" __rpm_version__ = "WILL_BE_SET_BY_RPM_BUILD" __git_hash__ = "WILL_BE_SET_BY_EGG_BUILD"
"""Place of record for the package version""" __version__ = "1.1.17" __rpm_version__ = "WILL_BE_SET_BY_RPM_BUILD" __git_hash__ = "WILL_BE_SET_BY_EGG_BUILD" Return exit code on disco_deploy test and update"""Place of record for the package version""" __version__ = "1.1.19" __rpm_version__ = "WILL_BE_SET_BY_RPM_BUILD" ...
<commit_before>"""Place of record for the package version""" __version__ = "1.1.17" __rpm_version__ = "WILL_BE_SET_BY_RPM_BUILD" __git_hash__ = "WILL_BE_SET_BY_EGG_BUILD" <commit_msg>Return exit code on disco_deploy test and update<commit_after>"""Place of record for the package version""" __version__ = "1.1.19" __rp...
63c640f2d16b033cc8dff426768cd1c6cbaa5626
Lib/distutils/__init__.py
Lib/distutils/__init__.py
"""distutils The main package for the Python Module Distribution Utilities. Normally used from a setup script as from distutils.core import setup setup (...) """ # This module should be kept compatible with Python 2.1. __revision__ = "$Id$" import sys __version__ = "%d.%d.%d" % sys.version_info[:3] del sys...
"""distutils The main package for the Python Module Distribution Utilities. Normally used from a setup script as from distutils.core import setup setup (...) """ # This module should be kept compatible with Python 2.1. __revision__ = "$Id$" # Distutils version # # Please coordinate with Marc-Andre Lemburg ...
Revert to having static version numbers again.
Revert to having static version numbers again.
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
"""distutils The main package for the Python Module Distribution Utilities. Normally used from a setup script as from distutils.core import setup setup (...) """ # This module should be kept compatible with Python 2.1. __revision__ = "$Id$" import sys __version__ = "%d.%d.%d" % sys.version_info[:3] del sys...
"""distutils The main package for the Python Module Distribution Utilities. Normally used from a setup script as from distutils.core import setup setup (...) """ # This module should be kept compatible with Python 2.1. __revision__ = "$Id$" # Distutils version # # Please coordinate with Marc-Andre Lemburg ...
<commit_before>"""distutils The main package for the Python Module Distribution Utilities. Normally used from a setup script as from distutils.core import setup setup (...) """ # This module should be kept compatible with Python 2.1. __revision__ = "$Id$" import sys __version__ = "%d.%d.%d" % sys.version_i...
"""distutils The main package for the Python Module Distribution Utilities. Normally used from a setup script as from distutils.core import setup setup (...) """ # This module should be kept compatible with Python 2.1. __revision__ = "$Id$" # Distutils version # # Please coordinate with Marc-Andre Lemburg ...
"""distutils The main package for the Python Module Distribution Utilities. Normally used from a setup script as from distutils.core import setup setup (...) """ # This module should be kept compatible with Python 2.1. __revision__ = "$Id$" import sys __version__ = "%d.%d.%d" % sys.version_info[:3] del sys...
<commit_before>"""distutils The main package for the Python Module Distribution Utilities. Normally used from a setup script as from distutils.core import setup setup (...) """ # This module should be kept compatible with Python 2.1. __revision__ = "$Id$" import sys __version__ = "%d.%d.%d" % sys.version_i...
61bfc6ac93db9bf11c88f549c9122ac5b498e3d6
Lib/test/test_contains.py
Lib/test/test_contains.py
from test_support import TestFailed class base_set: def __init__(self, el): self.el = el class set(base_set): def __contains__(self, el): return self.el == el class seq(base_set): def __getitem__(self, n): return [self.el][n] def check(ok, *args): if not ok: raise TestFailed, join(map(str, a...
from test_support import TestFailed class base_set: def __init__(self, el): self.el = el class set(base_set): def __contains__(self, el): return self.el == el class seq(base_set): def __getitem__(self, n): return [self.el][n] def check(ok, *args): if not ok: raise TestFailed, join(map(str, a...
Add tests for char in string -- including required exceptions for non-char in string.
Add tests for char in string -- including required exceptions for non-char in string.
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
from test_support import TestFailed class base_set: def __init__(self, el): self.el = el class set(base_set): def __contains__(self, el): return self.el == el class seq(base_set): def __getitem__(self, n): return [self.el][n] def check(ok, *args): if not ok: raise TestFailed, join(map(str, a...
from test_support import TestFailed class base_set: def __init__(self, el): self.el = el class set(base_set): def __contains__(self, el): return self.el == el class seq(base_set): def __getitem__(self, n): return [self.el][n] def check(ok, *args): if not ok: raise TestFailed, join(map(str, a...
<commit_before>from test_support import TestFailed class base_set: def __init__(self, el): self.el = el class set(base_set): def __contains__(self, el): return self.el == el class seq(base_set): def __getitem__(self, n): return [self.el][n] def check(ok, *args): if not ok: raise TestFailed, ...
from test_support import TestFailed class base_set: def __init__(self, el): self.el = el class set(base_set): def __contains__(self, el): return self.el == el class seq(base_set): def __getitem__(self, n): return [self.el][n] def check(ok, *args): if not ok: raise TestFailed, join(map(str, a...
from test_support import TestFailed class base_set: def __init__(self, el): self.el = el class set(base_set): def __contains__(self, el): return self.el == el class seq(base_set): def __getitem__(self, n): return [self.el][n] def check(ok, *args): if not ok: raise TestFailed, join(map(str, a...
<commit_before>from test_support import TestFailed class base_set: def __init__(self, el): self.el = el class set(base_set): def __contains__(self, el): return self.el == el class seq(base_set): def __getitem__(self, n): return [self.el][n] def check(ok, *args): if not ok: raise TestFailed, ...
850e328f024d79623256a8b38ee0f054d4210ce5
src/constants.py
src/constants.py
#!/usr/bin/env python TRAJECTORY = 'linear' if TRAJECTORY == 'linear': SIMULATION_TIME_IN_SECONDS = 80.0 elif TRAJECTORY == 'circular': SIMULATION_TIME_IN_SECONDS = 120.0 elif TRAJECTORY == 'squared': SIMULATION_TIME_IN_SECONDS = 160.0 DELTA_T = 0.1 # this is the sampling time STEPS = int(SIMULATION_TIME_...
#!/usr/bin/env python TRAJECTORY = 'linear' CONTROLLER = 'pid' if TRAJECTORY == 'linear': SIMULATION_TIME_IN_SECONDS = 80.0 elif TRAJECTORY == 'circular': SIMULATION_TIME_IN_SECONDS = 120.0 elif TRAJECTORY == 'squared': SIMULATION_TIME_IN_SECONDS = 160.0 DELTA_T = 0.1 # this is the sampling time STEPS = i...
Create constant to define a controller that will be used
Create constant to define a controller that will be used
Python
mit
bit0001/trajectory_tracking,bit0001/trajectory_tracking
#!/usr/bin/env python TRAJECTORY = 'linear' if TRAJECTORY == 'linear': SIMULATION_TIME_IN_SECONDS = 80.0 elif TRAJECTORY == 'circular': SIMULATION_TIME_IN_SECONDS = 120.0 elif TRAJECTORY == 'squared': SIMULATION_TIME_IN_SECONDS = 160.0 DELTA_T = 0.1 # this is the sampling time STEPS = int(SIMULATION_TIME_...
#!/usr/bin/env python TRAJECTORY = 'linear' CONTROLLER = 'pid' if TRAJECTORY == 'linear': SIMULATION_TIME_IN_SECONDS = 80.0 elif TRAJECTORY == 'circular': SIMULATION_TIME_IN_SECONDS = 120.0 elif TRAJECTORY == 'squared': SIMULATION_TIME_IN_SECONDS = 160.0 DELTA_T = 0.1 # this is the sampling time STEPS = i...
<commit_before>#!/usr/bin/env python TRAJECTORY = 'linear' if TRAJECTORY == 'linear': SIMULATION_TIME_IN_SECONDS = 80.0 elif TRAJECTORY == 'circular': SIMULATION_TIME_IN_SECONDS = 120.0 elif TRAJECTORY == 'squared': SIMULATION_TIME_IN_SECONDS = 160.0 DELTA_T = 0.1 # this is the sampling time STEPS = int(S...
#!/usr/bin/env python TRAJECTORY = 'linear' CONTROLLER = 'pid' if TRAJECTORY == 'linear': SIMULATION_TIME_IN_SECONDS = 80.0 elif TRAJECTORY == 'circular': SIMULATION_TIME_IN_SECONDS = 120.0 elif TRAJECTORY == 'squared': SIMULATION_TIME_IN_SECONDS = 160.0 DELTA_T = 0.1 # this is the sampling time STEPS = i...
#!/usr/bin/env python TRAJECTORY = 'linear' if TRAJECTORY == 'linear': SIMULATION_TIME_IN_SECONDS = 80.0 elif TRAJECTORY == 'circular': SIMULATION_TIME_IN_SECONDS = 120.0 elif TRAJECTORY == 'squared': SIMULATION_TIME_IN_SECONDS = 160.0 DELTA_T = 0.1 # this is the sampling time STEPS = int(SIMULATION_TIME_...
<commit_before>#!/usr/bin/env python TRAJECTORY = 'linear' if TRAJECTORY == 'linear': SIMULATION_TIME_IN_SECONDS = 80.0 elif TRAJECTORY == 'circular': SIMULATION_TIME_IN_SECONDS = 120.0 elif TRAJECTORY == 'squared': SIMULATION_TIME_IN_SECONDS = 160.0 DELTA_T = 0.1 # this is the sampling time STEPS = int(S...
279e56746984aac878d453c09437a6f6514e7342
xpserver_web/models.py
xpserver_web/models.py
from django.db import models from django.contrib.auth.models import User class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE, null=True, blank=True) activation_code = models.CharField(max_length=255, default="0000") fcm_registration_id = models.CharField(max_length=255,...
from django.db import models from django.contrib.auth.models import User class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE, null=True, blank=True) activation_code = models.CharField(max_length=255, default="0000") fcm_registration_id = models.CharField(max_length=255,...
Change str method of profile
Change str method of profile
Python
mit
xp2017-hackergarden/server,xp2017-hackergarden/server,xp2017-hackergarden/server,xp2017-hackergarden/server
from django.db import models from django.contrib.auth.models import User class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE, null=True, blank=True) activation_code = models.CharField(max_length=255, default="0000") fcm_registration_id = models.CharField(max_length=255,...
from django.db import models from django.contrib.auth.models import User class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE, null=True, blank=True) activation_code = models.CharField(max_length=255, default="0000") fcm_registration_id = models.CharField(max_length=255,...
<commit_before>from django.db import models from django.contrib.auth.models import User class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE, null=True, blank=True) activation_code = models.CharField(max_length=255, default="0000") fcm_registration_id = models.CharField(...
from django.db import models from django.contrib.auth.models import User class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE, null=True, blank=True) activation_code = models.CharField(max_length=255, default="0000") fcm_registration_id = models.CharField(max_length=255,...
from django.db import models from django.contrib.auth.models import User class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE, null=True, blank=True) activation_code = models.CharField(max_length=255, default="0000") fcm_registration_id = models.CharField(max_length=255,...
<commit_before>from django.db import models from django.contrib.auth.models import User class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE, null=True, blank=True) activation_code = models.CharField(max_length=255, default="0000") fcm_registration_id = models.CharField(...
bf7174e96efeaf11c2a2c5722e16f25204a3d3b7
scripts/cluster_importer.py
scripts/cluster_importer.py
#!/usr/bin/env python # x COLUMN NAMES # 0 State_Name # 1 State_code # 2 Lga_name # 3 Lga_code # 4 EA_NAME # 5 EA_code # 6 EAsize # 7 Unique ID # 8 Reserve Cluster (RC) # 9 PRIMARY # 10 LOCALITY NAME import csv import json with open('2015_06_29_...
#!/usr/bin/env python # x COLUMN NAMES # 0 State_Name # 1 State_code # 2 Lga_name # 3 Lga_code # 4 EA_NAME # 5 EA_code # 6 EAsize # 7 Unique ID # 8 Reserve Cluster (RC) # 9 PRIMARY # 10 LOCALITY NAME import csv import json with open('2015_06_29_...
Index clusters by unique ID
Index clusters by unique ID
Python
agpl-3.0
eHealthAfrica/nutsurv,johanneswilm/eha-nutsurv-django,eHealthAfrica/nutsurv,johanneswilm/eha-nutsurv-django,johanneswilm/eha-nutsurv-django,eHealthAfrica/nutsurv
#!/usr/bin/env python # x COLUMN NAMES # 0 State_Name # 1 State_code # 2 Lga_name # 3 Lga_code # 4 EA_NAME # 5 EA_code # 6 EAsize # 7 Unique ID # 8 Reserve Cluster (RC) # 9 PRIMARY # 10 LOCALITY NAME import csv import json with open('2015_06_29_...
#!/usr/bin/env python # x COLUMN NAMES # 0 State_Name # 1 State_code # 2 Lga_name # 3 Lga_code # 4 EA_NAME # 5 EA_code # 6 EAsize # 7 Unique ID # 8 Reserve Cluster (RC) # 9 PRIMARY # 10 LOCALITY NAME import csv import json with open('2015_06_29_...
<commit_before>#!/usr/bin/env python # x COLUMN NAMES # 0 State_Name # 1 State_code # 2 Lga_name # 3 Lga_code # 4 EA_NAME # 5 EA_code # 6 EAsize # 7 Unique ID # 8 Reserve Cluster (RC) # 9 PRIMARY # 10 LOCALITY NAME import csv import json with op...
#!/usr/bin/env python # x COLUMN NAMES # 0 State_Name # 1 State_code # 2 Lga_name # 3 Lga_code # 4 EA_NAME # 5 EA_code # 6 EAsize # 7 Unique ID # 8 Reserve Cluster (RC) # 9 PRIMARY # 10 LOCALITY NAME import csv import json with open('2015_06_29_...
#!/usr/bin/env python # x COLUMN NAMES # 0 State_Name # 1 State_code # 2 Lga_name # 3 Lga_code # 4 EA_NAME # 5 EA_code # 6 EAsize # 7 Unique ID # 8 Reserve Cluster (RC) # 9 PRIMARY # 10 LOCALITY NAME import csv import json with open('2015_06_29_...
<commit_before>#!/usr/bin/env python # x COLUMN NAMES # 0 State_Name # 1 State_code # 2 Lga_name # 3 Lga_code # 4 EA_NAME # 5 EA_code # 6 EAsize # 7 Unique ID # 8 Reserve Cluster (RC) # 9 PRIMARY # 10 LOCALITY NAME import csv import json with op...
ec4929175af38e56397ec8afd05b63dc12850226
alg_dijkstra_shortest_path.py
alg_dijkstra_shortest_path.py
from __future__ import absolute_import from __future__ import print_function from __future__ import division def dijkstra(weighted_graph_d, start_vertex): """Dijkstra algorithm for weighted graph. Finds shortest path in a weighted graph from a particular node to all vertices that are reachable from it. ...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def dijkstra(weighted_graph_d, start_vertex): """Dijkstra algorithm for "weighted" graph. Finds shortest path in a weighted graph from a particular node to all vertices that are reachable from it...
Revise doc string with highlighting "weighted" graph
Revise doc string with highlighting "weighted" graph
Python
bsd-2-clause
bowen0701/algorithms_data_structures
from __future__ import absolute_import from __future__ import print_function from __future__ import division def dijkstra(weighted_graph_d, start_vertex): """Dijkstra algorithm for weighted graph. Finds shortest path in a weighted graph from a particular node to all vertices that are reachable from it. ...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def dijkstra(weighted_graph_d, start_vertex): """Dijkstra algorithm for "weighted" graph. Finds shortest path in a weighted graph from a particular node to all vertices that are reachable from it...
<commit_before>from __future__ import absolute_import from __future__ import print_function from __future__ import division def dijkstra(weighted_graph_d, start_vertex): """Dijkstra algorithm for weighted graph. Finds shortest path in a weighted graph from a particular node to all vertices that are reac...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def dijkstra(weighted_graph_d, start_vertex): """Dijkstra algorithm for "weighted" graph. Finds shortest path in a weighted graph from a particular node to all vertices that are reachable from it...
from __future__ import absolute_import from __future__ import print_function from __future__ import division def dijkstra(weighted_graph_d, start_vertex): """Dijkstra algorithm for weighted graph. Finds shortest path in a weighted graph from a particular node to all vertices that are reachable from it. ...
<commit_before>from __future__ import absolute_import from __future__ import print_function from __future__ import division def dijkstra(weighted_graph_d, start_vertex): """Dijkstra algorithm for weighted graph. Finds shortest path in a weighted graph from a particular node to all vertices that are reac...
965e2dc74afef720055db315863e038e500fc44d
mangopaysdk/types/dto.py
mangopaysdk/types/dto.py
class Dto(object): """Abstract class for all DTOs (entities and their composites).""" def GetSubObjects(self): """Get array with mapping which property is object and what type of object. To be overridden in child class if has any sub objects. return array """ return ...
class Dto(object): """Abstract class for all DTOs (entities and their composites).""" def __str__(self): return str(self.__to_dict()) def __to_dict(self): data = {} for key in dir(self): if key.startswith("__"): continue # Skip private fields value = getatt...
Add a __str__() method to Dto to make debugging easier
Add a __str__() method to Dto to make debugging easier
Python
mit
chocopoche/mangopay2-python-sdk,Mangopay/mangopay2-python-sdk
class Dto(object): """Abstract class for all DTOs (entities and their composites).""" def GetSubObjects(self): """Get array with mapping which property is object and what type of object. To be overridden in child class if has any sub objects. return array """ return ...
class Dto(object): """Abstract class for all DTOs (entities and their composites).""" def __str__(self): return str(self.__to_dict()) def __to_dict(self): data = {} for key in dir(self): if key.startswith("__"): continue # Skip private fields value = getatt...
<commit_before>class Dto(object): """Abstract class for all DTOs (entities and their composites).""" def GetSubObjects(self): """Get array with mapping which property is object and what type of object. To be overridden in child class if has any sub objects. return array """ ...
class Dto(object): """Abstract class for all DTOs (entities and their composites).""" def __str__(self): return str(self.__to_dict()) def __to_dict(self): data = {} for key in dir(self): if key.startswith("__"): continue # Skip private fields value = getatt...
class Dto(object): """Abstract class for all DTOs (entities and their composites).""" def GetSubObjects(self): """Get array with mapping which property is object and what type of object. To be overridden in child class if has any sub objects. return array """ return ...
<commit_before>class Dto(object): """Abstract class for all DTOs (entities and their composites).""" def GetSubObjects(self): """Get array with mapping which property is object and what type of object. To be overridden in child class if has any sub objects. return array """ ...
23b08d24405badeb88461006d29426ab452a2ac4
hooks/post_gen_project.py
hooks/post_gen_project.py
import os import subprocess src = os.path.join(os.getcwd(), 'src', 'utils', 'prepare-commit-msg.py') dst = os.path.join('.git', 'hooks', 'prepare-commit-msg') process = subprocess.call(['git', 'init']) os.symlink(src, dst)
import os import subprocess src = os.path.join(os.getcwd(), 'src', 'utils', 'prepare-commit-msg.py') dst = os.path.join('.git', 'hooks', 'prepare-commit-msg') subprocess.call(['git', 'init']) os.symlink(src, dst) subprocess.call(['git', 'add', '-A']) subprocess.call(['git', 'commit', '-m', 'Initial commit'])
Add inital commit to post generate hook
Add inital commit to post generate hook
Python
mit
Empiria/matador-cookiecutter
import os import subprocess src = os.path.join(os.getcwd(), 'src', 'utils', 'prepare-commit-msg.py') dst = os.path.join('.git', 'hooks', 'prepare-commit-msg') process = subprocess.call(['git', 'init']) os.symlink(src, dst) Add inital commit to post generate hook
import os import subprocess src = os.path.join(os.getcwd(), 'src', 'utils', 'prepare-commit-msg.py') dst = os.path.join('.git', 'hooks', 'prepare-commit-msg') subprocess.call(['git', 'init']) os.symlink(src, dst) subprocess.call(['git', 'add', '-A']) subprocess.call(['git', 'commit', '-m', 'Initial commit'])
<commit_before>import os import subprocess src = os.path.join(os.getcwd(), 'src', 'utils', 'prepare-commit-msg.py') dst = os.path.join('.git', 'hooks', 'prepare-commit-msg') process = subprocess.call(['git', 'init']) os.symlink(src, dst) <commit_msg>Add inital commit to post generate hook<commit_after>
import os import subprocess src = os.path.join(os.getcwd(), 'src', 'utils', 'prepare-commit-msg.py') dst = os.path.join('.git', 'hooks', 'prepare-commit-msg') subprocess.call(['git', 'init']) os.symlink(src, dst) subprocess.call(['git', 'add', '-A']) subprocess.call(['git', 'commit', '-m', 'Initial commit'])
import os import subprocess src = os.path.join(os.getcwd(), 'src', 'utils', 'prepare-commit-msg.py') dst = os.path.join('.git', 'hooks', 'prepare-commit-msg') process = subprocess.call(['git', 'init']) os.symlink(src, dst) Add inital commit to post generate hookimport os import subprocess src = os.path.join(os.getcw...
<commit_before>import os import subprocess src = os.path.join(os.getcwd(), 'src', 'utils', 'prepare-commit-msg.py') dst = os.path.join('.git', 'hooks', 'prepare-commit-msg') process = subprocess.call(['git', 'init']) os.symlink(src, dst) <commit_msg>Add inital commit to post generate hook<commit_after>import os impor...
6a80b3c6d27ad494bbc3c9b9d67b6445b0bbfc40
example/sp-wsgi/service_conf.py
example/sp-wsgi/service_conf.py
from saml2.assertion import Policy HOST = '127.0.0.1' PORT = 8087 HTTPS = False # Which groups of entity categories to use POLICY = Policy( { "default": {"entity_categories": ["swamid", "edugain"]} } ) # HTTPS cert information SERVER_CERT = "pki/ssl.crt" SERVER_KEY = "pki/ssl.pem" CERT_CHAIN = ""
from saml2.assertion import Policy HOST = '127.0.0.1' PORT = 8087 HTTPS = False # Which groups of entity categories to use POLICY = Policy( { "default": {"entity_categories": ["swamid", "edugain"]} } ) # HTTPS cert information SERVER_CERT = "pki/mycert.pem" SERVER_KEY = "pki/mykey.pem" CERT_CHAIN = "...
Update example HTTPS cert & key filenames.
Update example HTTPS cert & key filenames. pki/my{cert,key}.pem are used for request payloads; set those as the defaults for HTTPS as well. Note that HTTPS isn't necessarily in a working state - this just gets us a bit closer.
Python
bsd-2-clause
tpazderka/pysaml2,tpazderka/pysaml2,Runscope/pysaml2,Runscope/pysaml2
from saml2.assertion import Policy HOST = '127.0.0.1' PORT = 8087 HTTPS = False # Which groups of entity categories to use POLICY = Policy( { "default": {"entity_categories": ["swamid", "edugain"]} } ) # HTTPS cert information SERVER_CERT = "pki/ssl.crt" SERVER_KEY = "pki/ssl.pem" CERT_CHAIN = "" Upd...
from saml2.assertion import Policy HOST = '127.0.0.1' PORT = 8087 HTTPS = False # Which groups of entity categories to use POLICY = Policy( { "default": {"entity_categories": ["swamid", "edugain"]} } ) # HTTPS cert information SERVER_CERT = "pki/mycert.pem" SERVER_KEY = "pki/mykey.pem" CERT_CHAIN = "...
<commit_before>from saml2.assertion import Policy HOST = '127.0.0.1' PORT = 8087 HTTPS = False # Which groups of entity categories to use POLICY = Policy( { "default": {"entity_categories": ["swamid", "edugain"]} } ) # HTTPS cert information SERVER_CERT = "pki/ssl.crt" SERVER_KEY = "pki/ssl.pem" CERT...
from saml2.assertion import Policy HOST = '127.0.0.1' PORT = 8087 HTTPS = False # Which groups of entity categories to use POLICY = Policy( { "default": {"entity_categories": ["swamid", "edugain"]} } ) # HTTPS cert information SERVER_CERT = "pki/mycert.pem" SERVER_KEY = "pki/mykey.pem" CERT_CHAIN = "...
from saml2.assertion import Policy HOST = '127.0.0.1' PORT = 8087 HTTPS = False # Which groups of entity categories to use POLICY = Policy( { "default": {"entity_categories": ["swamid", "edugain"]} } ) # HTTPS cert information SERVER_CERT = "pki/ssl.crt" SERVER_KEY = "pki/ssl.pem" CERT_CHAIN = "" Upd...
<commit_before>from saml2.assertion import Policy HOST = '127.0.0.1' PORT = 8087 HTTPS = False # Which groups of entity categories to use POLICY = Policy( { "default": {"entity_categories": ["swamid", "edugain"]} } ) # HTTPS cert information SERVER_CERT = "pki/ssl.crt" SERVER_KEY = "pki/ssl.pem" CERT...
7bc693102a5394bb73b3df2320fca5a35bebc91f
test/test_vocab.py
test/test_vocab.py
import numpy as np import unittest from torchtext import vocab from collections import Counter class TestVocab(unittest.TestCase): def test_vocab(self): c = Counter(['hello', 'world']) v = vocab.Vocab(c, vectors='glove.test_twitter.27B.200d') self.assertEqual(v.itos, ['<unk>', '<pad>', '...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from collections import Counter import unittest import numpy as np from torchtext import vocab class TestVocab(unittest.TestCase): def test_vocab(self): c = Counter({'hello': 4, 'world': 3, 'ᑌᑎIᑕOᗪᕮ_Tᕮ᙭T': 5, 'freq_too_low': 2}) v = ...
Test vocab min_freq and specials vocab args, as well as unicode input
Test vocab min_freq and specials vocab args, as well as unicode input
Python
bsd-3-clause
pytorch/text,pytorch/text,pytorch/text,pytorch/text
import numpy as np import unittest from torchtext import vocab from collections import Counter class TestVocab(unittest.TestCase): def test_vocab(self): c = Counter(['hello', 'world']) v = vocab.Vocab(c, vectors='glove.test_twitter.27B.200d') self.assertEqual(v.itos, ['<unk>', '<pad>', '...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from collections import Counter import unittest import numpy as np from torchtext import vocab class TestVocab(unittest.TestCase): def test_vocab(self): c = Counter({'hello': 4, 'world': 3, 'ᑌᑎIᑕOᗪᕮ_Tᕮ᙭T': 5, 'freq_too_low': 2}) v = ...
<commit_before>import numpy as np import unittest from torchtext import vocab from collections import Counter class TestVocab(unittest.TestCase): def test_vocab(self): c = Counter(['hello', 'world']) v = vocab.Vocab(c, vectors='glove.test_twitter.27B.200d') self.assertEqual(v.itos, ['<un...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from collections import Counter import unittest import numpy as np from torchtext import vocab class TestVocab(unittest.TestCase): def test_vocab(self): c = Counter({'hello': 4, 'world': 3, 'ᑌᑎIᑕOᗪᕮ_Tᕮ᙭T': 5, 'freq_too_low': 2}) v = ...
import numpy as np import unittest from torchtext import vocab from collections import Counter class TestVocab(unittest.TestCase): def test_vocab(self): c = Counter(['hello', 'world']) v = vocab.Vocab(c, vectors='glove.test_twitter.27B.200d') self.assertEqual(v.itos, ['<unk>', '<pad>', '...
<commit_before>import numpy as np import unittest from torchtext import vocab from collections import Counter class TestVocab(unittest.TestCase): def test_vocab(self): c = Counter(['hello', 'world']) v = vocab.Vocab(c, vectors='glove.test_twitter.27B.200d') self.assertEqual(v.itos, ['<un...
e1a2898f8f54eec874ebdc17ea6eb27440f62818
opps/articles/forms.py
opps/articles/forms.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from django import forms from .models import Post, Album, Link from opps.core.widgets import OppsEditor class PostAdminForm(forms.ModelForm): multiupload_link = '/fileupload/image/' class Meta: model = Post widgets = {'content': OppsEditor()} c...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django import forms from .models import Post, Album, Link from opps.core.widgets import OppsEditor class PostAdminForm(forms.ModelForm): multiupload_link = '/fileupload/image/' class Meta: model = Post widgets = {'content': OppsEditor()} ...
Fix pep8, articles form E301 expected 1 blank line, found 0
Fix pep8, articles form E301 expected 1 blank line, found 0
Python
mit
opps/opps,jeanmask/opps,opps/opps,YACOWS/opps,williamroot/opps,opps/opps,williamroot/opps,williamroot/opps,YACOWS/opps,jeanmask/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,opps/opps,jeanmask/opps
#!/usr/bin/env python # -*- coding: utf-8 -*- from django import forms from .models import Post, Album, Link from opps.core.widgets import OppsEditor class PostAdminForm(forms.ModelForm): multiupload_link = '/fileupload/image/' class Meta: model = Post widgets = {'content': OppsEditor()} c...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django import forms from .models import Post, Album, Link from opps.core.widgets import OppsEditor class PostAdminForm(forms.ModelForm): multiupload_link = '/fileupload/image/' class Meta: model = Post widgets = {'content': OppsEditor()} ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from django import forms from .models import Post, Album, Link from opps.core.widgets import OppsEditor class PostAdminForm(forms.ModelForm): multiupload_link = '/fileupload/image/' class Meta: model = Post widgets = {'content': Op...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django import forms from .models import Post, Album, Link from opps.core.widgets import OppsEditor class PostAdminForm(forms.ModelForm): multiupload_link = '/fileupload/image/' class Meta: model = Post widgets = {'content': OppsEditor()} ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django import forms from .models import Post, Album, Link from opps.core.widgets import OppsEditor class PostAdminForm(forms.ModelForm): multiupload_link = '/fileupload/image/' class Meta: model = Post widgets = {'content': OppsEditor()} c...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from django import forms from .models import Post, Album, Link from opps.core.widgets import OppsEditor class PostAdminForm(forms.ModelForm): multiupload_link = '/fileupload/image/' class Meta: model = Post widgets = {'content': Op...
b56712563e4205ccbf8b98deace4197e2f250361
movement.py
movement.py
if __name__ == "__main__": x, y = 0, 0 steps = 0 while True: dir = input('Your current position is %s, %s, where would you like to move to? ' % (str(x), str(y))) directions = { 'north': (0, 1), 'south' : (0, -1), 'east' : (1, 0), ...
if __name__ == "__main__": x, y = 0, 0 steps = 0 while True: dir = input('Your current position is %s, %s, where would you like to move to? ' % (str(x), str(y))) directions = { 'north': (0, 1), 'south' : (0, -1), 'east' : (1, 0), ...
Add abbreviations and space handling
Add abbreviations and space handling
Python
mit
mewturn/Python
if __name__ == "__main__": x, y = 0, 0 steps = 0 while True: dir = input('Your current position is %s, %s, where would you like to move to? ' % (str(x), str(y))) directions = { 'north': (0, 1), 'south' : (0, -1), 'east' : (1, 0), ...
if __name__ == "__main__": x, y = 0, 0 steps = 0 while True: dir = input('Your current position is %s, %s, where would you like to move to? ' % (str(x), str(y))) directions = { 'north': (0, 1), 'south' : (0, -1), 'east' : (1, 0), ...
<commit_before>if __name__ == "__main__": x, y = 0, 0 steps = 0 while True: dir = input('Your current position is %s, %s, where would you like to move to? ' % (str(x), str(y))) directions = { 'north': (0, 1), 'south' : (0, -1), 'eas...
if __name__ == "__main__": x, y = 0, 0 steps = 0 while True: dir = input('Your current position is %s, %s, where would you like to move to? ' % (str(x), str(y))) directions = { 'north': (0, 1), 'south' : (0, -1), 'east' : (1, 0), ...
if __name__ == "__main__": x, y = 0, 0 steps = 0 while True: dir = input('Your current position is %s, %s, where would you like to move to? ' % (str(x), str(y))) directions = { 'north': (0, 1), 'south' : (0, -1), 'east' : (1, 0), ...
<commit_before>if __name__ == "__main__": x, y = 0, 0 steps = 0 while True: dir = input('Your current position is %s, %s, where would you like to move to? ' % (str(x), str(y))) directions = { 'north': (0, 1), 'south' : (0, -1), 'eas...
c797481691f44f6741d2aa8491c7a112674ddaab
neb/node.py
neb/node.py
from neb.api import TrinityResource from neb.relationship import Relationship from neb.statistic import NodeStatistic class Node(TrinityResource): def create(self, node_id, **kwargs): params = dict(id=node_id, node=kwargs) return self.post(self._node_path(), payload=params) def connect(self, t...
from neb.api import TrinityResource from neb.relationship import Relationship from neb.statistic import NodeStatistic class Node(TrinityResource): def create(self, node_id, **kwargs): params = dict(id=node_id, node=kwargs) return self.post(self._node_path(), payload=params) def connect(self, t...
Allow Node to Node connection.
Allow Node to Node connection.
Python
mit
peplin/neb
from neb.api import TrinityResource from neb.relationship import Relationship from neb.statistic import NodeStatistic class Node(TrinityResource): def create(self, node_id, **kwargs): params = dict(id=node_id, node=kwargs) return self.post(self._node_path(), payload=params) def connect(self, t...
from neb.api import TrinityResource from neb.relationship import Relationship from neb.statistic import NodeStatistic class Node(TrinityResource): def create(self, node_id, **kwargs): params = dict(id=node_id, node=kwargs) return self.post(self._node_path(), payload=params) def connect(self, t...
<commit_before>from neb.api import TrinityResource from neb.relationship import Relationship from neb.statistic import NodeStatistic class Node(TrinityResource): def create(self, node_id, **kwargs): params = dict(id=node_id, node=kwargs) return self.post(self._node_path(), payload=params) def ...
from neb.api import TrinityResource from neb.relationship import Relationship from neb.statistic import NodeStatistic class Node(TrinityResource): def create(self, node_id, **kwargs): params = dict(id=node_id, node=kwargs) return self.post(self._node_path(), payload=params) def connect(self, t...
from neb.api import TrinityResource from neb.relationship import Relationship from neb.statistic import NodeStatistic class Node(TrinityResource): def create(self, node_id, **kwargs): params = dict(id=node_id, node=kwargs) return self.post(self._node_path(), payload=params) def connect(self, t...
<commit_before>from neb.api import TrinityResource from neb.relationship import Relationship from neb.statistic import NodeStatistic class Node(TrinityResource): def create(self, node_id, **kwargs): params = dict(id=node_id, node=kwargs) return self.post(self._node_path(), payload=params) def ...
f1d2d809dbf77133ef10b59fafc98f5658779bbe
malaffinity/exceptions.py
malaffinity/exceptions.py
"""malaffinity exceptions.""" class MALRateLimitExceededError(Exception): # noqa: D204, D205, D400 """ Raised when MAL's blocking your request, because you're going over their rate limit of one request every two seconds. Slow down and try again. """ pass class MALAffinityException(Exception): ...
"""malaffinity exceptions.""" class MALRateLimitExceededError(Exception): # noqa: D204, D205, D400 """ Raised when MAL's blocking your request, because you're going over their rate limit of one request every two seconds. Slow down and try again. """ pass class MALAffinityException(Exception): ...
Correct incorrect information in `NoAffinityError` docstring
Correct incorrect information in `NoAffinityError` docstring Incorrectly stated that the minimum number of shared, rated anime needed to calculate affinity was 10, when it's actually 11
Python
mit
erkghlerngm44/malaffinity
"""malaffinity exceptions.""" class MALRateLimitExceededError(Exception): # noqa: D204, D205, D400 """ Raised when MAL's blocking your request, because you're going over their rate limit of one request every two seconds. Slow down and try again. """ pass class MALAffinityException(Exception): ...
"""malaffinity exceptions.""" class MALRateLimitExceededError(Exception): # noqa: D204, D205, D400 """ Raised when MAL's blocking your request, because you're going over their rate limit of one request every two seconds. Slow down and try again. """ pass class MALAffinityException(Exception): ...
<commit_before>"""malaffinity exceptions.""" class MALRateLimitExceededError(Exception): # noqa: D204, D205, D400 """ Raised when MAL's blocking your request, because you're going over their rate limit of one request every two seconds. Slow down and try again. """ pass class MALAffinityExceptio...
"""malaffinity exceptions.""" class MALRateLimitExceededError(Exception): # noqa: D204, D205, D400 """ Raised when MAL's blocking your request, because you're going over their rate limit of one request every two seconds. Slow down and try again. """ pass class MALAffinityException(Exception): ...
"""malaffinity exceptions.""" class MALRateLimitExceededError(Exception): # noqa: D204, D205, D400 """ Raised when MAL's blocking your request, because you're going over their rate limit of one request every two seconds. Slow down and try again. """ pass class MALAffinityException(Exception): ...
<commit_before>"""malaffinity exceptions.""" class MALRateLimitExceededError(Exception): # noqa: D204, D205, D400 """ Raised when MAL's blocking your request, because you're going over their rate limit of one request every two seconds. Slow down and try again. """ pass class MALAffinityExceptio...
41cebb59f673453499fd92996fc9aa1a1311f1e2
odbc2csv.py
odbc2csv.py
import pypyodbc import csv conn = pypyodbc.connect("DSN=") cur = conn.cursor() tables = [] cur.execute("select * from sys.tables") for row in cur.fetchall(): tables.append(row[0]) for table in tables: cur.execute("select * from %s" % table) column_names = [] for d in cur.description: colu...
import pypyodbc import csv conn = pypyodbc.connect("DSN=") cur = conn.cursor() tables = [] cur.execute("select * from sys.tables") for row in cur.fetchall(): tables.append(row[0]) for table in tables: cur.execute("select * from %s" % table) column_names = [] for d in cur.description: colu...
Write binary for CSV file.
Write binary for CSV file.
Python
isc
wablair/misc_scripts,wablair/misc_scripts,wablair/misc_scripts,wablair/misc_scripts
import pypyodbc import csv conn = pypyodbc.connect("DSN=") cur = conn.cursor() tables = [] cur.execute("select * from sys.tables") for row in cur.fetchall(): tables.append(row[0]) for table in tables: cur.execute("select * from %s" % table) column_names = [] for d in cur.description: colu...
import pypyodbc import csv conn = pypyodbc.connect("DSN=") cur = conn.cursor() tables = [] cur.execute("select * from sys.tables") for row in cur.fetchall(): tables.append(row[0]) for table in tables: cur.execute("select * from %s" % table) column_names = [] for d in cur.description: colu...
<commit_before>import pypyodbc import csv conn = pypyodbc.connect("DSN=") cur = conn.cursor() tables = [] cur.execute("select * from sys.tables") for row in cur.fetchall(): tables.append(row[0]) for table in tables: cur.execute("select * from %s" % table) column_names = [] for d in cur.descriptio...
import pypyodbc import csv conn = pypyodbc.connect("DSN=") cur = conn.cursor() tables = [] cur.execute("select * from sys.tables") for row in cur.fetchall(): tables.append(row[0]) for table in tables: cur.execute("select * from %s" % table) column_names = [] for d in cur.description: colu...
import pypyodbc import csv conn = pypyodbc.connect("DSN=") cur = conn.cursor() tables = [] cur.execute("select * from sys.tables") for row in cur.fetchall(): tables.append(row[0]) for table in tables: cur.execute("select * from %s" % table) column_names = [] for d in cur.description: colu...
<commit_before>import pypyodbc import csv conn = pypyodbc.connect("DSN=") cur = conn.cursor() tables = [] cur.execute("select * from sys.tables") for row in cur.fetchall(): tables.append(row[0]) for table in tables: cur.execute("select * from %s" % table) column_names = [] for d in cur.descriptio...
9443ba9d5cccde590aa07b2d7c74a7a4ea90fe6d
opps/urls.py
opps/urls.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf.urls import patterns, url, include from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', #url(r'^admin/images/mass/', include('opps.images.urls', # namespace='images', app_name='images...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf.urls import patterns, url, include from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', url(r'^admin/', include(admin.site.urls)), url(r'^redactor/', include('redactor.urls')), url(r'^sitemap', include('opps...
Remove url images mass, not used
Remove url images mass, not used
Python
mit
YACOWS/opps,jeanmask/opps,jeanmask/opps,williamroot/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,opps/opps,opps/opps,williamroot/opps,williamroot/opps,opps/opps,YACOWS/opps,jeanmask/opps,opps/opps
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf.urls import patterns, url, include from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', #url(r'^admin/images/mass/', include('opps.images.urls', # namespace='images', app_name='images...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf.urls import patterns, url, include from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', url(r'^admin/', include(admin.site.urls)), url(r'^redactor/', include('redactor.urls')), url(r'^sitemap', include('opps...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf.urls import patterns, url, include from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', #url(r'^admin/images/mass/', include('opps.images.urls', # namespace='images', a...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf.urls import patterns, url, include from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', url(r'^admin/', include(admin.site.urls)), url(r'^redactor/', include('redactor.urls')), url(r'^sitemap', include('opps...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf.urls import patterns, url, include from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', #url(r'^admin/images/mass/', include('opps.images.urls', # namespace='images', app_name='images...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf.urls import patterns, url, include from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', #url(r'^admin/images/mass/', include('opps.images.urls', # namespace='images', a...
3112ff56e43d91d7e1bcff747dff5d434316897b
alerts/donations/currencymap.py
alerts/donations/currencymap.py
# -*- coding: utf-8 -*- # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
# -*- coding: utf-8 -*- # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
Use unicode for currency symbols.
Use unicode for currency symbols.
Python
apache-2.0
google/mirandum,google/mirandum,google/mirandum,google/mirandum
# -*- coding: utf-8 -*- # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
# -*- coding: utf-8 -*- # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
<commit_before># -*- coding: utf-8 -*- # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENS...
# -*- coding: utf-8 -*- # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
# -*- coding: utf-8 -*- # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
<commit_before># -*- coding: utf-8 -*- # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENS...
37c63e6ea5c14a0c7aae11581ae32f24eaaa9641
test/layers_test.py
test/layers_test.py
import theanets import numpy as np class TestLayer: def test_build(self): layer = theanets.layers.build('feedforward', nin=2, nout=4) assert isinstance(layer, theanets.layers.Layer) class TestFeedforward: def test_create(self): l = theanets.layers.Feedforward(nin=2, nout=4) a...
import theanets import numpy as np class TestLayer: def test_build(self): layer = theanets.layers.build('feedforward', nin=2, nout=4) assert isinstance(layer, theanets.layers.Layer) class TestFeedforward: def test_create(self): l = theanets.layers.Feedforward(nin=2, nout=4) a...
Update layers test for RNN change.
Update layers test for RNN change.
Python
mit
devdoer/theanets,chrinide/theanets,lmjohns3/theanets
import theanets import numpy as np class TestLayer: def test_build(self): layer = theanets.layers.build('feedforward', nin=2, nout=4) assert isinstance(layer, theanets.layers.Layer) class TestFeedforward: def test_create(self): l = theanets.layers.Feedforward(nin=2, nout=4) a...
import theanets import numpy as np class TestLayer: def test_build(self): layer = theanets.layers.build('feedforward', nin=2, nout=4) assert isinstance(layer, theanets.layers.Layer) class TestFeedforward: def test_create(self): l = theanets.layers.Feedforward(nin=2, nout=4) a...
<commit_before>import theanets import numpy as np class TestLayer: def test_build(self): layer = theanets.layers.build('feedforward', nin=2, nout=4) assert isinstance(layer, theanets.layers.Layer) class TestFeedforward: def test_create(self): l = theanets.layers.Feedforward(nin=2, no...
import theanets import numpy as np class TestLayer: def test_build(self): layer = theanets.layers.build('feedforward', nin=2, nout=4) assert isinstance(layer, theanets.layers.Layer) class TestFeedforward: def test_create(self): l = theanets.layers.Feedforward(nin=2, nout=4) a...
import theanets import numpy as np class TestLayer: def test_build(self): layer = theanets.layers.build('feedforward', nin=2, nout=4) assert isinstance(layer, theanets.layers.Layer) class TestFeedforward: def test_create(self): l = theanets.layers.Feedforward(nin=2, nout=4) a...
<commit_before>import theanets import numpy as np class TestLayer: def test_build(self): layer = theanets.layers.build('feedforward', nin=2, nout=4) assert isinstance(layer, theanets.layers.Layer) class TestFeedforward: def test_create(self): l = theanets.layers.Feedforward(nin=2, no...
9f952d2b060b19500f9c056ced4092d5ddc9902f
Code/Checking_threshold.py
Code/Checking_threshold.py
def checking_threshold(a, b, avg_heart_rate): """checking for Tachycardia or Bradycardia :param a: int variable, lower bound bpm :param b: int variable, upper bound bpm :param avg_heart_rate: array, bpm :return: The condition string """ # Checks if the the heart rate is lesser or greater t...
def checking_threshold(a, b, avg_heart_rate): """ checking for Tachycardia or Bradycardia :param a: int variable, lower bound bpm :param b: int variable, upper bound bpm :param avg_heart_rate: array, bpm :return: The condition string """ # Checks if the the heart rate is lesser or grea...
Update Checking Threshold with pep8 syntax
Update Checking Threshold with pep8 syntax
Python
mit
MounikaVanka/bme590hrm,MounikaVanka/bme590hrm
def checking_threshold(a, b, avg_heart_rate): """checking for Tachycardia or Bradycardia :param a: int variable, lower bound bpm :param b: int variable, upper bound bpm :param avg_heart_rate: array, bpm :return: The condition string """ # Checks if the the heart rate is lesser or greater t...
def checking_threshold(a, b, avg_heart_rate): """ checking for Tachycardia or Bradycardia :param a: int variable, lower bound bpm :param b: int variable, upper bound bpm :param avg_heart_rate: array, bpm :return: The condition string """ # Checks if the the heart rate is lesser or grea...
<commit_before> def checking_threshold(a, b, avg_heart_rate): """checking for Tachycardia or Bradycardia :param a: int variable, lower bound bpm :param b: int variable, upper bound bpm :param avg_heart_rate: array, bpm :return: The condition string """ # Checks if the the heart rate is less...
def checking_threshold(a, b, avg_heart_rate): """ checking for Tachycardia or Bradycardia :param a: int variable, lower bound bpm :param b: int variable, upper bound bpm :param avg_heart_rate: array, bpm :return: The condition string """ # Checks if the the heart rate is lesser or grea...
def checking_threshold(a, b, avg_heart_rate): """checking for Tachycardia or Bradycardia :param a: int variable, lower bound bpm :param b: int variable, upper bound bpm :param avg_heart_rate: array, bpm :return: The condition string """ # Checks if the the heart rate is lesser or greater t...
<commit_before> def checking_threshold(a, b, avg_heart_rate): """checking for Tachycardia or Bradycardia :param a: int variable, lower bound bpm :param b: int variable, upper bound bpm :param avg_heart_rate: array, bpm :return: The condition string """ # Checks if the the heart rate is less...
5568b4674c647c979e223837d905302fd59eb546
HARK/ConsumptionSaving/tests/test_SmallOpenEconomy.py
HARK/ConsumptionSaving/tests/test_SmallOpenEconomy.py
import copy from HARK import distributeParams from HARK.ConsumptionSaving.ConsAggShockModel import AggShockConsumerType, SmallOpenEconomy, init_cobb_douglas from HARK.distribution import Uniform import numpy as np import unittest class testSmallOpenEconomy(unittest.TestCase): def test_small_open(self): ag...
import copy from HARK import distributeParams from HARK.ConsumptionSaving.ConsAggShockModel import AggShockConsumerType, SmallOpenEconomy, init_cobb_douglas from HARK.distribution import Uniform import numpy as np import unittest class testSmallOpenEconomy(unittest.TestCase): def test_small_open(self): ag...
Change Rfree and wRte in SmallOpenEconomy test
Change Rfree and wRte in SmallOpenEconomy test Interest factor was set to 20%; changing it to a more reasonable 1.03 fixed the weird interaction with the new nan_bool functionality.
Python
apache-2.0
econ-ark/HARK,econ-ark/HARK
import copy from HARK import distributeParams from HARK.ConsumptionSaving.ConsAggShockModel import AggShockConsumerType, SmallOpenEconomy, init_cobb_douglas from HARK.distribution import Uniform import numpy as np import unittest class testSmallOpenEconomy(unittest.TestCase): def test_small_open(self): ag...
import copy from HARK import distributeParams from HARK.ConsumptionSaving.ConsAggShockModel import AggShockConsumerType, SmallOpenEconomy, init_cobb_douglas from HARK.distribution import Uniform import numpy as np import unittest class testSmallOpenEconomy(unittest.TestCase): def test_small_open(self): ag...
<commit_before>import copy from HARK import distributeParams from HARK.ConsumptionSaving.ConsAggShockModel import AggShockConsumerType, SmallOpenEconomy, init_cobb_douglas from HARK.distribution import Uniform import numpy as np import unittest class testSmallOpenEconomy(unittest.TestCase): def test_small_open(se...
import copy from HARK import distributeParams from HARK.ConsumptionSaving.ConsAggShockModel import AggShockConsumerType, SmallOpenEconomy, init_cobb_douglas from HARK.distribution import Uniform import numpy as np import unittest class testSmallOpenEconomy(unittest.TestCase): def test_small_open(self): ag...
import copy from HARK import distributeParams from HARK.ConsumptionSaving.ConsAggShockModel import AggShockConsumerType, SmallOpenEconomy, init_cobb_douglas from HARK.distribution import Uniform import numpy as np import unittest class testSmallOpenEconomy(unittest.TestCase): def test_small_open(self): ag...
<commit_before>import copy from HARK import distributeParams from HARK.ConsumptionSaving.ConsAggShockModel import AggShockConsumerType, SmallOpenEconomy, init_cobb_douglas from HARK.distribution import Uniform import numpy as np import unittest class testSmallOpenEconomy(unittest.TestCase): def test_small_open(se...
27ee536137a98a317f2cfbb2010fa5fe31037e99
txircd/modules/cmd_user.py
txircd/modules/cmd_user.py
from twisted.words.protocols import irc from txircd.modbase import Command class UserCommand(Command): def onUse(self, user, params): if user.registered == 0: self.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if params and len(params) < 4: user.sendMessage(ir...
from twisted.words.protocols import irc from txircd.modbase import Command class UserCommand(Command): def onUse(self, user, data): if not user.username: user.registered -= 1 user.username = data["ident"] user.realname = data["gecos"] if user.registered == 0: user.register() def processParams(self, u...
Update the USER command to take advantage of core capabilities as well
Update the USER command to take advantage of core capabilities as well
Python
bsd-3-clause
DesertBus/txircd,Heufneutje/txircd,ElementalAlchemist/txircd
from twisted.words.protocols import irc from txircd.modbase import Command class UserCommand(Command): def onUse(self, user, params): if user.registered == 0: self.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if params and len(params) < 4: user.sendMessage(ir...
from twisted.words.protocols import irc from txircd.modbase import Command class UserCommand(Command): def onUse(self, user, data): if not user.username: user.registered -= 1 user.username = data["ident"] user.realname = data["gecos"] if user.registered == 0: user.register() def processParams(self, u...
<commit_before>from twisted.words.protocols import irc from txircd.modbase import Command class UserCommand(Command): def onUse(self, user, params): if user.registered == 0: self.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if params and len(params) < 4: user...
from twisted.words.protocols import irc from txircd.modbase import Command class UserCommand(Command): def onUse(self, user, data): if not user.username: user.registered -= 1 user.username = data["ident"] user.realname = data["gecos"] if user.registered == 0: user.register() def processParams(self, u...
from twisted.words.protocols import irc from txircd.modbase import Command class UserCommand(Command): def onUse(self, user, params): if user.registered == 0: self.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if params and len(params) < 4: user.sendMessage(ir...
<commit_before>from twisted.words.protocols import irc from txircd.modbase import Command class UserCommand(Command): def onUse(self, user, params): if user.registered == 0: self.sendMessage(irc.ERR_ALREADYREGISTRED, ":Unauthorized command (already registered)") return if params and len(params) < 4: user...
939319ddece1925c8c3152f4437b4848749b85b3
config/fuzz_pox_mesh.py
config/fuzz_pox_mesh.py
from experiment_config_lib import ControllerConfig from sts.topology import MeshTopology from sts.control_flow import Fuzzer from sts.input_traces.input_logger import InputLogger from sts.invariant_checker import InvariantChecker from sts.simulation_state import SimulationConfig # Use POX as our controller command_lin...
from experiment_config_lib import ControllerConfig from sts.topology import MeshTopology from sts.control_flow import Fuzzer from sts.input_traces.input_logger import InputLogger from sts.invariant_checker import InvariantChecker from sts.simulation_state import SimulationConfig # Use POX as our controller command_lin...
Add a config that exercises the Multiplexed socketS
Add a config that exercises the Multiplexed socketS
Python
apache-2.0
ucb-sts/sts,ucb-sts/sts,jmiserez/sts,jmiserez/sts
from experiment_config_lib import ControllerConfig from sts.topology import MeshTopology from sts.control_flow import Fuzzer from sts.input_traces.input_logger import InputLogger from sts.invariant_checker import InvariantChecker from sts.simulation_state import SimulationConfig # Use POX as our controller command_lin...
from experiment_config_lib import ControllerConfig from sts.topology import MeshTopology from sts.control_flow import Fuzzer from sts.input_traces.input_logger import InputLogger from sts.invariant_checker import InvariantChecker from sts.simulation_state import SimulationConfig # Use POX as our controller command_lin...
<commit_before>from experiment_config_lib import ControllerConfig from sts.topology import MeshTopology from sts.control_flow import Fuzzer from sts.input_traces.input_logger import InputLogger from sts.invariant_checker import InvariantChecker from sts.simulation_state import SimulationConfig # Use POX as our control...
from experiment_config_lib import ControllerConfig from sts.topology import MeshTopology from sts.control_flow import Fuzzer from sts.input_traces.input_logger import InputLogger from sts.invariant_checker import InvariantChecker from sts.simulation_state import SimulationConfig # Use POX as our controller command_lin...
from experiment_config_lib import ControllerConfig from sts.topology import MeshTopology from sts.control_flow import Fuzzer from sts.input_traces.input_logger import InputLogger from sts.invariant_checker import InvariantChecker from sts.simulation_state import SimulationConfig # Use POX as our controller command_lin...
<commit_before>from experiment_config_lib import ControllerConfig from sts.topology import MeshTopology from sts.control_flow import Fuzzer from sts.input_traces.input_logger import InputLogger from sts.invariant_checker import InvariantChecker from sts.simulation_state import SimulationConfig # Use POX as our control...
7ed304238a3c30c9dfa9e2dc03c53ec068d78a80
pipenv/environments.py
pipenv/environments.py
import os # Prevent invalid shebangs with Homebrew-installed Python: # https://bugs.python.org/issue22490 os.environ.pop('__PYVENV_LAUNCHER__', None) # Shell compatibility mode, for mis-configured shells. PIPENV_SHELL_COMPAT = os.environ.get('PIPENV_SHELL_COMPAT') # Create the virtualenv in the project, isntead of...
import os # Prevent invalid shebangs with Homebrew-installed Python: # https://bugs.python.org/issue22490 os.environ.pop('__PYVENV_LAUNCHER__', None) # Shell compatibility mode, for mis-configured shells. PIPENV_SHELL_COMPAT = os.environ.get('PIPENV_SHELL_COMPAT') # Create the virtualenv in the project, isntead of...
Use string as a default value for PIPENV_MAX_DEPTH
Use string as a default value for PIPENV_MAX_DEPTH
Python
mit
adrianliaw/pipenv,nateprewitt/pipenv,kennethreitz/pipenv
import os # Prevent invalid shebangs with Homebrew-installed Python: # https://bugs.python.org/issue22490 os.environ.pop('__PYVENV_LAUNCHER__', None) # Shell compatibility mode, for mis-configured shells. PIPENV_SHELL_COMPAT = os.environ.get('PIPENV_SHELL_COMPAT') # Create the virtualenv in the project, isntead of...
import os # Prevent invalid shebangs with Homebrew-installed Python: # https://bugs.python.org/issue22490 os.environ.pop('__PYVENV_LAUNCHER__', None) # Shell compatibility mode, for mis-configured shells. PIPENV_SHELL_COMPAT = os.environ.get('PIPENV_SHELL_COMPAT') # Create the virtualenv in the project, isntead of...
<commit_before>import os # Prevent invalid shebangs with Homebrew-installed Python: # https://bugs.python.org/issue22490 os.environ.pop('__PYVENV_LAUNCHER__', None) # Shell compatibility mode, for mis-configured shells. PIPENV_SHELL_COMPAT = os.environ.get('PIPENV_SHELL_COMPAT') # Create the virtualenv in the proj...
import os # Prevent invalid shebangs with Homebrew-installed Python: # https://bugs.python.org/issue22490 os.environ.pop('__PYVENV_LAUNCHER__', None) # Shell compatibility mode, for mis-configured shells. PIPENV_SHELL_COMPAT = os.environ.get('PIPENV_SHELL_COMPAT') # Create the virtualenv in the project, isntead of...
import os # Prevent invalid shebangs with Homebrew-installed Python: # https://bugs.python.org/issue22490 os.environ.pop('__PYVENV_LAUNCHER__', None) # Shell compatibility mode, for mis-configured shells. PIPENV_SHELL_COMPAT = os.environ.get('PIPENV_SHELL_COMPAT') # Create the virtualenv in the project, isntead of...
<commit_before>import os # Prevent invalid shebangs with Homebrew-installed Python: # https://bugs.python.org/issue22490 os.environ.pop('__PYVENV_LAUNCHER__', None) # Shell compatibility mode, for mis-configured shells. PIPENV_SHELL_COMPAT = os.environ.get('PIPENV_SHELL_COMPAT') # Create the virtualenv in the proj...
dc05182f04dcebf61d368fe9f834b37d75b59bfd
Lib/fontmake/errors.py
Lib/fontmake/errors.py
class FontmakeError(Exception): """Base class for all fontmake exceptions.""" pass class TTFAError(FontmakeError): def __init__(self, exitcode): self.exitcode = exitcode def __str__(self): return "ttfautohint command failed: error " + str(self.exitcode)
import os class FontmakeError(Exception): """Base class for all fontmake exceptions. This exception is intended to be chained to the original exception. The main purpose is to provide a source file trail that points to where the explosion came from. """ def __init__(self, msg, source_file): ...
Add source trail logic to FontmakeError and partly TTFAError
Add source trail logic to FontmakeError and partly TTFAError
Python
apache-2.0
googlei18n/fontmake,googlei18n/fontmake,googlefonts/fontmake,googlefonts/fontmake
class FontmakeError(Exception): """Base class for all fontmake exceptions.""" pass class TTFAError(FontmakeError): def __init__(self, exitcode): self.exitcode = exitcode def __str__(self): return "ttfautohint command failed: error " + str(self.exitcode) Add source trail logic to Font...
import os class FontmakeError(Exception): """Base class for all fontmake exceptions. This exception is intended to be chained to the original exception. The main purpose is to provide a source file trail that points to where the explosion came from. """ def __init__(self, msg, source_file): ...
<commit_before>class FontmakeError(Exception): """Base class for all fontmake exceptions.""" pass class TTFAError(FontmakeError): def __init__(self, exitcode): self.exitcode = exitcode def __str__(self): return "ttfautohint command failed: error " + str(self.exitcode) <commit_msg>Add...
import os class FontmakeError(Exception): """Base class for all fontmake exceptions. This exception is intended to be chained to the original exception. The main purpose is to provide a source file trail that points to where the explosion came from. """ def __init__(self, msg, source_file): ...
class FontmakeError(Exception): """Base class for all fontmake exceptions.""" pass class TTFAError(FontmakeError): def __init__(self, exitcode): self.exitcode = exitcode def __str__(self): return "ttfautohint command failed: error " + str(self.exitcode) Add source trail logic to Font...
<commit_before>class FontmakeError(Exception): """Base class for all fontmake exceptions.""" pass class TTFAError(FontmakeError): def __init__(self, exitcode): self.exitcode = exitcode def __str__(self): return "ttfautohint command failed: error " + str(self.exitcode) <commit_msg>Add...
232db259f2c202e60692563ec05b456b5158449e
django_replicated/router.py
django_replicated/router.py
# -*- coding:utf-8 -*- import random from django.db.utils import DEFAULT_DB_ALIAS from django.conf import settings class ReplicationRouter(object): def __init__(self): self.state_stack = ['master'] self._state_change_enabled = True def set_state_change(self, enabled): self._state_cha...
# -*- coding:utf-8 -*- import random from django.db import connections from django.db.utils import DEFAULT_DB_ALIAS from django.conf import settings def is_alive(db): try: if db.connection is not None and hasattr(db.connection, 'ping'): db.connection.ping() else: db.cursor...
Check if slaves are alive and fallback to other slaves and eventually to master.
Check if slaves are alive and fallback to other slaves and eventually to master.
Python
bsd-3-clause
dmirain/django_replicated,Zunonia/django_replicated,lavr/django_replicated
# -*- coding:utf-8 -*- import random from django.db.utils import DEFAULT_DB_ALIAS from django.conf import settings class ReplicationRouter(object): def __init__(self): self.state_stack = ['master'] self._state_change_enabled = True def set_state_change(self, enabled): self._state_cha...
# -*- coding:utf-8 -*- import random from django.db import connections from django.db.utils import DEFAULT_DB_ALIAS from django.conf import settings def is_alive(db): try: if db.connection is not None and hasattr(db.connection, 'ping'): db.connection.ping() else: db.cursor...
<commit_before># -*- coding:utf-8 -*- import random from django.db.utils import DEFAULT_DB_ALIAS from django.conf import settings class ReplicationRouter(object): def __init__(self): self.state_stack = ['master'] self._state_change_enabled = True def set_state_change(self, enabled): ...
# -*- coding:utf-8 -*- import random from django.db import connections from django.db.utils import DEFAULT_DB_ALIAS from django.conf import settings def is_alive(db): try: if db.connection is not None and hasattr(db.connection, 'ping'): db.connection.ping() else: db.cursor...
# -*- coding:utf-8 -*- import random from django.db.utils import DEFAULT_DB_ALIAS from django.conf import settings class ReplicationRouter(object): def __init__(self): self.state_stack = ['master'] self._state_change_enabled = True def set_state_change(self, enabled): self._state_cha...
<commit_before># -*- coding:utf-8 -*- import random from django.db.utils import DEFAULT_DB_ALIAS from django.conf import settings class ReplicationRouter(object): def __init__(self): self.state_stack = ['master'] self._state_change_enabled = True def set_state_change(self, enabled): ...
ae9392137c66832e2e4fa0a51938aad2e6fdb8a4
django_q/__init__.py
django_q/__init__.py
import os import sys import django myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, myPath) VERSION = (0, 9, 2) default_app_config = 'django_q.apps.DjangoQConfig' # root imports will slowly be deprecated. # please import from the relevant sub modules if django.VERSION[:2] < (1, 9): from .t...
# import os # import sys import django # myPath = os.path.dirname(os.path.abspath(__file__)) # sys.path.insert(0, myPath) VERSION = (0, 9, 2) default_app_config = 'django_q.apps.DjangoQConfig' # root imports will slowly be deprecated. # please import from the relevant sub modules if django.VERSION[:2] < (1, 9): ...
Change path location of django q
Change path location of django q
Python
mit
Koed00/django-q
import os import sys import django myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, myPath) VERSION = (0, 9, 2) default_app_config = 'django_q.apps.DjangoQConfig' # root imports will slowly be deprecated. # please import from the relevant sub modules if django.VERSION[:2] < (1, 9): from .t...
# import os # import sys import django # myPath = os.path.dirname(os.path.abspath(__file__)) # sys.path.insert(0, myPath) VERSION = (0, 9, 2) default_app_config = 'django_q.apps.DjangoQConfig' # root imports will slowly be deprecated. # please import from the relevant sub modules if django.VERSION[:2] < (1, 9): ...
<commit_before>import os import sys import django myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, myPath) VERSION = (0, 9, 2) default_app_config = 'django_q.apps.DjangoQConfig' # root imports will slowly be deprecated. # please import from the relevant sub modules if django.VERSION[:2] < (1, ...
# import os # import sys import django # myPath = os.path.dirname(os.path.abspath(__file__)) # sys.path.insert(0, myPath) VERSION = (0, 9, 2) default_app_config = 'django_q.apps.DjangoQConfig' # root imports will slowly be deprecated. # please import from the relevant sub modules if django.VERSION[:2] < (1, 9): ...
import os import sys import django myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, myPath) VERSION = (0, 9, 2) default_app_config = 'django_q.apps.DjangoQConfig' # root imports will slowly be deprecated. # please import from the relevant sub modules if django.VERSION[:2] < (1, 9): from .t...
<commit_before>import os import sys import django myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, myPath) VERSION = (0, 9, 2) default_app_config = 'django_q.apps.DjangoQConfig' # root imports will slowly be deprecated. # please import from the relevant sub modules if django.VERSION[:2] < (1, ...
c13dbbc35faf567cb7a10ccacb1fcd070c8773c1
llvmlite/binding/common.py
llvmlite/binding/common.py
import atexit def _encode_string(s): encoded = s.encode('latin1') return encoded def _decode_string(b): return b.decode('latin1') _encode_string.__doc__ = """Encode a string for use by LLVM.""" _decode_string.__doc__ = """Decode a LLVM character (byte)string.""" _shutting_down = [False] def _at_sh...
import atexit def _encode_string(s): encoded = s.encode('utf-8') return encoded def _decode_string(b): return b.decode('utf-8') _encode_string.__doc__ = """Encode a string for use by LLVM.""" _decode_string.__doc__ = """Decode a LLVM character (byte)string.""" _shutting_down = [False] def _at_shut...
Switch encoding to UTF-8 from latin1
Switch encoding to UTF-8 from latin1 This change was originally made in PR #53, but may no longer be required (and may cause issues with comments in IR that use non-latin1 characters).
Python
bsd-2-clause
numba/llvmlite,numba/llvmlite,numba/llvmlite,numba/llvmlite
import atexit def _encode_string(s): encoded = s.encode('latin1') return encoded def _decode_string(b): return b.decode('latin1') _encode_string.__doc__ = """Encode a string for use by LLVM.""" _decode_string.__doc__ = """Decode a LLVM character (byte)string.""" _shutting_down = [False] def _at_sh...
import atexit def _encode_string(s): encoded = s.encode('utf-8') return encoded def _decode_string(b): return b.decode('utf-8') _encode_string.__doc__ = """Encode a string for use by LLVM.""" _decode_string.__doc__ = """Decode a LLVM character (byte)string.""" _shutting_down = [False] def _at_shut...
<commit_before>import atexit def _encode_string(s): encoded = s.encode('latin1') return encoded def _decode_string(b): return b.decode('latin1') _encode_string.__doc__ = """Encode a string for use by LLVM.""" _decode_string.__doc__ = """Decode a LLVM character (byte)string.""" _shutting_down = [Fals...
import atexit def _encode_string(s): encoded = s.encode('utf-8') return encoded def _decode_string(b): return b.decode('utf-8') _encode_string.__doc__ = """Encode a string for use by LLVM.""" _decode_string.__doc__ = """Decode a LLVM character (byte)string.""" _shutting_down = [False] def _at_shut...
import atexit def _encode_string(s): encoded = s.encode('latin1') return encoded def _decode_string(b): return b.decode('latin1') _encode_string.__doc__ = """Encode a string for use by LLVM.""" _decode_string.__doc__ = """Decode a LLVM character (byte)string.""" _shutting_down = [False] def _at_sh...
<commit_before>import atexit def _encode_string(s): encoded = s.encode('latin1') return encoded def _decode_string(b): return b.decode('latin1') _encode_string.__doc__ = """Encode a string for use by LLVM.""" _decode_string.__doc__ = """Decode a LLVM character (byte)string.""" _shutting_down = [Fals...
d6bc297b71c9cb2bce45bdcd20f99f9fe642cf01
plotting.py
plotting.py
#!/usr/bin/env python """ Set of helper function and variables for plotting. This module provides a set of functions and variables that will be useful for plotting. """ class ColorMarker: def __init__(self): # A list of colors self._colors = ['k', 'b', 'g', 'c', 'm', 'y'] # A list of mar...
#!/usr/bin/env python """ Set of helper function and variables for plotting. This module provides a set of functions and variables that will be useful for plotting. """ class ColorMarker: def __init__(self): # A list of colors self._colors = ['k', 'b', 'g', 'c', 'm', 'y'] # A list of mar...
Fix naming to folliwng naming conventions for mclab
Fix naming to folliwng naming conventions for mclab
Python
mit
secimTools/SECIMTools,secimTools/SECIMTools,secimTools/SECIMTools
#!/usr/bin/env python """ Set of helper function and variables for plotting. This module provides a set of functions and variables that will be useful for plotting. """ class ColorMarker: def __init__(self): # A list of colors self._colors = ['k', 'b', 'g', 'c', 'm', 'y'] # A list of mar...
#!/usr/bin/env python """ Set of helper function and variables for plotting. This module provides a set of functions and variables that will be useful for plotting. """ class ColorMarker: def __init__(self): # A list of colors self._colors = ['k', 'b', 'g', 'c', 'm', 'y'] # A list of mar...
<commit_before>#!/usr/bin/env python """ Set of helper function and variables for plotting. This module provides a set of functions and variables that will be useful for plotting. """ class ColorMarker: def __init__(self): # A list of colors self._colors = ['k', 'b', 'g', 'c', 'm', 'y'] ...
#!/usr/bin/env python """ Set of helper function and variables for plotting. This module provides a set of functions and variables that will be useful for plotting. """ class ColorMarker: def __init__(self): # A list of colors self._colors = ['k', 'b', 'g', 'c', 'm', 'y'] # A list of mar...
#!/usr/bin/env python """ Set of helper function and variables for plotting. This module provides a set of functions and variables that will be useful for plotting. """ class ColorMarker: def __init__(self): # A list of colors self._colors = ['k', 'b', 'g', 'c', 'm', 'y'] # A list of mar...
<commit_before>#!/usr/bin/env python """ Set of helper function and variables for plotting. This module provides a set of functions and variables that will be useful for plotting. """ class ColorMarker: def __init__(self): # A list of colors self._colors = ['k', 'b', 'g', 'c', 'm', 'y'] ...
a670b598f4416b0e99acd7442e5a51295a5daaa3
tests/test_utils.py
tests/test_utils.py
import os import time import unittest from helpers.utils import sigchld_handler, sigterm_handler, sleep def nop(*args, **kwargs): pass def os_waitpid(a, b): return (0, 0) def time_sleep(_): sigchld_handler(None, None) class TestUtils(unittest.TestCase): def __init__(self, method_name='runTest'...
import os import time import unittest from helpers.utils import reap_children, sigchld_handler, sigterm_handler, sleep def nop(*args, **kwargs): pass def os_waitpid(a, b): return (0, 0) def time_sleep(_): sigchld_handler(None, None) class TestUtils(unittest.TestCase): def __init__(self, method...
Implement unit test for reap_children function
Implement unit test for reap_children function
Python
mit
jinty/patroni,sean-/patroni,jinty/patroni,pgexperts/patroni,sean-/patroni,zalando/patroni,pgexperts/patroni,zalando/patroni
import os import time import unittest from helpers.utils import sigchld_handler, sigterm_handler, sleep def nop(*args, **kwargs): pass def os_waitpid(a, b): return (0, 0) def time_sleep(_): sigchld_handler(None, None) class TestUtils(unittest.TestCase): def __init__(self, method_name='runTest'...
import os import time import unittest from helpers.utils import reap_children, sigchld_handler, sigterm_handler, sleep def nop(*args, **kwargs): pass def os_waitpid(a, b): return (0, 0) def time_sleep(_): sigchld_handler(None, None) class TestUtils(unittest.TestCase): def __init__(self, method...
<commit_before>import os import time import unittest from helpers.utils import sigchld_handler, sigterm_handler, sleep def nop(*args, **kwargs): pass def os_waitpid(a, b): return (0, 0) def time_sleep(_): sigchld_handler(None, None) class TestUtils(unittest.TestCase): def __init__(self, method...
import os import time import unittest from helpers.utils import reap_children, sigchld_handler, sigterm_handler, sleep def nop(*args, **kwargs): pass def os_waitpid(a, b): return (0, 0) def time_sleep(_): sigchld_handler(None, None) class TestUtils(unittest.TestCase): def __init__(self, method...
import os import time import unittest from helpers.utils import sigchld_handler, sigterm_handler, sleep def nop(*args, **kwargs): pass def os_waitpid(a, b): return (0, 0) def time_sleep(_): sigchld_handler(None, None) class TestUtils(unittest.TestCase): def __init__(self, method_name='runTest'...
<commit_before>import os import time import unittest from helpers.utils import sigchld_handler, sigterm_handler, sleep def nop(*args, **kwargs): pass def os_waitpid(a, b): return (0, 0) def time_sleep(_): sigchld_handler(None, None) class TestUtils(unittest.TestCase): def __init__(self, method...
d0901a36de4d7ef71bf615131f48e6333d93c2b0
tests/project/settings.py
tests/project/settings.py
from os.path import dirname, join, abspath BASE_DIR = dirname(abspath(__file__)) INSTALLED_APPS = [ 'django.contrib.staticfiles', 'markitup', ] TEMPLATE_DIRS = [join(BASE_DIR, 'templates')] ROOT_URLCONF = 'tests.project.urls' MARKITUP_FILTER = ('markdown.markdown', {'safe_mode': True}) MARKITUP_SET = '...
from os.path import dirname, join, abspath BASE_DIR = dirname(abspath(__file__)) INSTALLED_APPS = [ 'django.contrib.staticfiles', 'markitup', ] TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [ join(BASE_DIR, 'templates'), ], ...
Use TEMPLATES setting in tests.
Use TEMPLATES setting in tests.
Python
bsd-3-clause
zsiciarz/django-markitup,carljm/django-markitup,zsiciarz/django-markitup,carljm/django-markitup,carljm/django-markitup,zsiciarz/django-markitup
from os.path import dirname, join, abspath BASE_DIR = dirname(abspath(__file__)) INSTALLED_APPS = [ 'django.contrib.staticfiles', 'markitup', ] TEMPLATE_DIRS = [join(BASE_DIR, 'templates')] ROOT_URLCONF = 'tests.project.urls' MARKITUP_FILTER = ('markdown.markdown', {'safe_mode': True}) MARKITUP_SET = '...
from os.path import dirname, join, abspath BASE_DIR = dirname(abspath(__file__)) INSTALLED_APPS = [ 'django.contrib.staticfiles', 'markitup', ] TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [ join(BASE_DIR, 'templates'), ], ...
<commit_before>from os.path import dirname, join, abspath BASE_DIR = dirname(abspath(__file__)) INSTALLED_APPS = [ 'django.contrib.staticfiles', 'markitup', ] TEMPLATE_DIRS = [join(BASE_DIR, 'templates')] ROOT_URLCONF = 'tests.project.urls' MARKITUP_FILTER = ('markdown.markdown', {'safe_mode': True}) M...
from os.path import dirname, join, abspath BASE_DIR = dirname(abspath(__file__)) INSTALLED_APPS = [ 'django.contrib.staticfiles', 'markitup', ] TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [ join(BASE_DIR, 'templates'), ], ...
from os.path import dirname, join, abspath BASE_DIR = dirname(abspath(__file__)) INSTALLED_APPS = [ 'django.contrib.staticfiles', 'markitup', ] TEMPLATE_DIRS = [join(BASE_DIR, 'templates')] ROOT_URLCONF = 'tests.project.urls' MARKITUP_FILTER = ('markdown.markdown', {'safe_mode': True}) MARKITUP_SET = '...
<commit_before>from os.path import dirname, join, abspath BASE_DIR = dirname(abspath(__file__)) INSTALLED_APPS = [ 'django.contrib.staticfiles', 'markitup', ] TEMPLATE_DIRS = [join(BASE_DIR, 'templates')] ROOT_URLCONF = 'tests.project.urls' MARKITUP_FILTER = ('markdown.markdown', {'safe_mode': True}) M...
778632bc28d39bc697cae445f8ed4c33689f8d82
rest/messages/generate-twiml-sms-voice/example-1.py
rest/messages/generate-twiml-sms-voice/example-1.py
from flask import Flask, request, redirect import twilio.twiml app = Flask(__name__) @app.route("/", methods=['GET', 'POST']) def hello_monkey(): """Respond to incoming calls with a simple text message.""" resp = twilio.twiml.Response() resp.say("Hello! You will get an SMS message soon.") resp.sms("T...
from flask import Flask, request from twilio import twiml app = Flask(__name__) @app.route("/voice", methods=['GET', 'POST']) def voice(): """Respond to incoming phone calls with a text message.""" # Start our TwiML response resp = twiml.Response() # Read a message aloud to the caller resp.say("...
Clean up Send SMS and MMS Python example
Clean up Send SMS and MMS Python example
Python
mit
TwilioDevEd/api-snippets,teoreteetik/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,teoreteetik/api-snippets,teoreteetik/api-snippets,teoreteetik/api-snippets,teoreteetik/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,TwilioDevEd/api-snippets,teoreteetik/api-snip...
from flask import Flask, request, redirect import twilio.twiml app = Flask(__name__) @app.route("/", methods=['GET', 'POST']) def hello_monkey(): """Respond to incoming calls with a simple text message.""" resp = twilio.twiml.Response() resp.say("Hello! You will get an SMS message soon.") resp.sms("T...
from flask import Flask, request from twilio import twiml app = Flask(__name__) @app.route("/voice", methods=['GET', 'POST']) def voice(): """Respond to incoming phone calls with a text message.""" # Start our TwiML response resp = twiml.Response() # Read a message aloud to the caller resp.say("...
<commit_before>from flask import Flask, request, redirect import twilio.twiml app = Flask(__name__) @app.route("/", methods=['GET', 'POST']) def hello_monkey(): """Respond to incoming calls with a simple text message.""" resp = twilio.twiml.Response() resp.say("Hello! You will get an SMS message soon.") ...
from flask import Flask, request from twilio import twiml app = Flask(__name__) @app.route("/voice", methods=['GET', 'POST']) def voice(): """Respond to incoming phone calls with a text message.""" # Start our TwiML response resp = twiml.Response() # Read a message aloud to the caller resp.say("...
from flask import Flask, request, redirect import twilio.twiml app = Flask(__name__) @app.route("/", methods=['GET', 'POST']) def hello_monkey(): """Respond to incoming calls with a simple text message.""" resp = twilio.twiml.Response() resp.say("Hello! You will get an SMS message soon.") resp.sms("T...
<commit_before>from flask import Flask, request, redirect import twilio.twiml app = Flask(__name__) @app.route("/", methods=['GET', 'POST']) def hello_monkey(): """Respond to incoming calls with a simple text message.""" resp = twilio.twiml.Response() resp.say("Hello! You will get an SMS message soon.") ...
1065f63e29c9b31f55ed1986c409fc85f1aa26e3
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Aparajita Fishman # Copyright (c) 2013 Aparajita Fishman # # Project: https://github.com/SublimeLinter/SublimeLinter-contrib-json # License: MIT # """This module exports the JSON plugin linter class.""" import json ...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Aparajita Fishman # Copyright (c) 2013 Aparajita Fishman # # Project: https://github.com/SublimeLinter/SublimeLinter-contrib-json # License: MIT # """This module exports the JSON plugin linter class.""" import json ...
Change 'language' to 'syntax', that is more precise terminology.
Change 'language' to 'syntax', that is more precise terminology.
Python
mit
SublimeLinter/SublimeLinter-json
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Aparajita Fishman # Copyright (c) 2013 Aparajita Fishman # # Project: https://github.com/SublimeLinter/SublimeLinter-contrib-json # License: MIT # """This module exports the JSON plugin linter class.""" import json ...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Aparajita Fishman # Copyright (c) 2013 Aparajita Fishman # # Project: https://github.com/SublimeLinter/SublimeLinter-contrib-json # License: MIT # """This module exports the JSON plugin linter class.""" import json ...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Aparajita Fishman # Copyright (c) 2013 Aparajita Fishman # # Project: https://github.com/SublimeLinter/SublimeLinter-contrib-json # License: MIT # """This module exports the JSON plugin linter class.""...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Aparajita Fishman # Copyright (c) 2013 Aparajita Fishman # # Project: https://github.com/SublimeLinter/SublimeLinter-contrib-json # License: MIT # """This module exports the JSON plugin linter class.""" import json ...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Aparajita Fishman # Copyright (c) 2013 Aparajita Fishman # # Project: https://github.com/SublimeLinter/SublimeLinter-contrib-json # License: MIT # """This module exports the JSON plugin linter class.""" import json ...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Aparajita Fishman # Copyright (c) 2013 Aparajita Fishman # # Project: https://github.com/SublimeLinter/SublimeLinter-contrib-json # License: MIT # """This module exports the JSON plugin linter class.""...
8c19b6dafa599dc284bb8ef740aa0426d9246dc6
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Bruno JJE # Copyright (c) 2015 Bruno JJE # # License: MIT # """This module exports the Ghdl plugin class.""" from SublimeLinter.lint import Linter class Ghdl(Linter): """Provides an interface to ghdl.""" ...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Bruno JJE # Copyright (c) 2015 Bruno JJE # # License: MIT # """This module exports the Ghdl plugin class.""" from SublimeLinter.lint import Linter class Ghdl(Linter): """Provides an interface to ghdl.""" ...
Change 'tempfile_suffix' and remove filename check.
Change 'tempfile_suffix' and remove filename check.
Python
mit
BrunoJJE/SublimeLinter-contrib-ghdl
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Bruno JJE # Copyright (c) 2015 Bruno JJE # # License: MIT # """This module exports the Ghdl plugin class.""" from SublimeLinter.lint import Linter class Ghdl(Linter): """Provides an interface to ghdl.""" ...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Bruno JJE # Copyright (c) 2015 Bruno JJE # # License: MIT # """This module exports the Ghdl plugin class.""" from SublimeLinter.lint import Linter class Ghdl(Linter): """Provides an interface to ghdl.""" ...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Bruno JJE # Copyright (c) 2015 Bruno JJE # # License: MIT # """This module exports the Ghdl plugin class.""" from SublimeLinter.lint import Linter class Ghdl(Linter): """Provides an interface t...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Bruno JJE # Copyright (c) 2015 Bruno JJE # # License: MIT # """This module exports the Ghdl plugin class.""" from SublimeLinter.lint import Linter class Ghdl(Linter): """Provides an interface to ghdl.""" ...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Bruno JJE # Copyright (c) 2015 Bruno JJE # # License: MIT # """This module exports the Ghdl plugin class.""" from SublimeLinter.lint import Linter class Ghdl(Linter): """Provides an interface to ghdl.""" ...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Bruno JJE # Copyright (c) 2015 Bruno JJE # # License: MIT # """This module exports the Ghdl plugin class.""" from SublimeLinter.lint import Linter class Ghdl(Linter): """Provides an interface t...
3738df68d89e8eb0743378ecb89659e44cbb999d
troposphere/qldb.py
troposphere/qldb.py
# Copyright (c) 2012-2019, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 6.1.0 from . import AWSObject from troposphere import Tags from .validators import boolean class Ledger(AWSObjec...
# Copyright (c) 2012-2019, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 16.1.0 from . import AWSObject from . import AWSProperty from troposphere import Tags from .validators import bool...
Add AWS::QLDB::Stream per 2020-07-08 update
Add AWS::QLDB::Stream per 2020-07-08 update
Python
bsd-2-clause
cloudtools/troposphere,cloudtools/troposphere
# Copyright (c) 2012-2019, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 6.1.0 from . import AWSObject from troposphere import Tags from .validators import boolean class Ledger(AWSObjec...
# Copyright (c) 2012-2019, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 16.1.0 from . import AWSObject from . import AWSProperty from troposphere import Tags from .validators import bool...
<commit_before># Copyright (c) 2012-2019, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 6.1.0 from . import AWSObject from troposphere import Tags from .validators import boolean class ...
# Copyright (c) 2012-2019, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 16.1.0 from . import AWSObject from . import AWSProperty from troposphere import Tags from .validators import bool...
# Copyright (c) 2012-2019, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 6.1.0 from . import AWSObject from troposphere import Tags from .validators import boolean class Ledger(AWSObjec...
<commit_before># Copyright (c) 2012-2019, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 6.1.0 from . import AWSObject from troposphere import Tags from .validators import boolean class ...
96439cb26a09158f112541025a6c2901b983eae9
tests/test_pay_onetime.py
tests/test_pay_onetime.py
# -*- coding: utf-8 -*- def test_pay_onetime(iamport): # Without 'card_number' payload_notEnough = { 'merchant_uid': 'qwer1234', 'amount': 5000, 'expiry': '2019-03', 'birth': '500203', 'pwd_2digit': '19' } try: iamport.pay_onetime(**payload_notEnough) ...
# -*- coding: utf-8 -*- import string, random def test_pay_onetime(iamport): merchant_uid = ''.join( random.choice(string.ascii_uppercase + string.digits) for _ in range(10) ) # Without 'card_number' payload_not_enough = { 'merchant_uid': merchant_uid, 'amount': 5000,...
Add random merchant_uid for continous testing
Add random merchant_uid for continous testing
Python
mit
iamport/iamport-rest-client-python
# -*- coding: utf-8 -*- def test_pay_onetime(iamport): # Without 'card_number' payload_notEnough = { 'merchant_uid': 'qwer1234', 'amount': 5000, 'expiry': '2019-03', 'birth': '500203', 'pwd_2digit': '19' } try: iamport.pay_onetime(**payload_notEnough) ...
# -*- coding: utf-8 -*- import string, random def test_pay_onetime(iamport): merchant_uid = ''.join( random.choice(string.ascii_uppercase + string.digits) for _ in range(10) ) # Without 'card_number' payload_not_enough = { 'merchant_uid': merchant_uid, 'amount': 5000,...
<commit_before># -*- coding: utf-8 -*- def test_pay_onetime(iamport): # Without 'card_number' payload_notEnough = { 'merchant_uid': 'qwer1234', 'amount': 5000, 'expiry': '2019-03', 'birth': '500203', 'pwd_2digit': '19' } try: iamport.pay_onetime(**paylo...
# -*- coding: utf-8 -*- import string, random def test_pay_onetime(iamport): merchant_uid = ''.join( random.choice(string.ascii_uppercase + string.digits) for _ in range(10) ) # Without 'card_number' payload_not_enough = { 'merchant_uid': merchant_uid, 'amount': 5000,...
# -*- coding: utf-8 -*- def test_pay_onetime(iamport): # Without 'card_number' payload_notEnough = { 'merchant_uid': 'qwer1234', 'amount': 5000, 'expiry': '2019-03', 'birth': '500203', 'pwd_2digit': '19' } try: iamport.pay_onetime(**payload_notEnough) ...
<commit_before># -*- coding: utf-8 -*- def test_pay_onetime(iamport): # Without 'card_number' payload_notEnough = { 'merchant_uid': 'qwer1234', 'amount': 5000, 'expiry': '2019-03', 'birth': '500203', 'pwd_2digit': '19' } try: iamport.pay_onetime(**paylo...
55ff308a538b80796b10d12d9acd1f1b84010d17
bluebottle/common/management/commands/makemessages.py
bluebottle/common/management/commands/makemessages.py
import json import tempfile from django.core.management.commands.makemessages import Command as BaseCommand from bluebottle.clients.utils import get_currencies class Command(BaseCommand): """ Extend the makemessages to include some of the fixtures """ fixtures = [ ('bb_projects', 'project_data.json...
import json import os from django.core.management.commands.makemessages import Command as BaseCommand from bluebottle.clients.utils import get_currencies class Command(BaseCommand): """ Extend the makemessages to include some of the fixtures """ fixtures = [ ('bb_projects', 'project_data.json'), ...
Make sure we always use the same filename for the fixtures translations. This way the translations do not contain accidental changes.
Make sure we always use the same filename for the fixtures translations. This way the translations do not contain accidental changes.
Python
bsd-3-clause
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
import json import tempfile from django.core.management.commands.makemessages import Command as BaseCommand from bluebottle.clients.utils import get_currencies class Command(BaseCommand): """ Extend the makemessages to include some of the fixtures """ fixtures = [ ('bb_projects', 'project_data.json...
import json import os from django.core.management.commands.makemessages import Command as BaseCommand from bluebottle.clients.utils import get_currencies class Command(BaseCommand): """ Extend the makemessages to include some of the fixtures """ fixtures = [ ('bb_projects', 'project_data.json'), ...
<commit_before>import json import tempfile from django.core.management.commands.makemessages import Command as BaseCommand from bluebottle.clients.utils import get_currencies class Command(BaseCommand): """ Extend the makemessages to include some of the fixtures """ fixtures = [ ('bb_projects', 'pr...
import json import os from django.core.management.commands.makemessages import Command as BaseCommand from bluebottle.clients.utils import get_currencies class Command(BaseCommand): """ Extend the makemessages to include some of the fixtures """ fixtures = [ ('bb_projects', 'project_data.json'), ...
import json import tempfile from django.core.management.commands.makemessages import Command as BaseCommand from bluebottle.clients.utils import get_currencies class Command(BaseCommand): """ Extend the makemessages to include some of the fixtures """ fixtures = [ ('bb_projects', 'project_data.json...
<commit_before>import json import tempfile from django.core.management.commands.makemessages import Command as BaseCommand from bluebottle.clients.utils import get_currencies class Command(BaseCommand): """ Extend the makemessages to include some of the fixtures """ fixtures = [ ('bb_projects', 'pr...
b4ef0f107ca8fefbe556babb00f31c7b88019d50
pydarkstar/__init__.py
pydarkstar/__init__.py
__version__ = 0.1 import pydarkstar.logutils import logging pydarkstar.logutils.setError() try: import sqlalchemy except ImportError as e: logging.exception(e.__class__.__name__) logging.error('pip install sqlalchemy') exit(-1) try: import pymysql except ImportError as e: logging.exception(e...
__version__ = 0.1 import pydarkstar.logutils import logging pydarkstar.logutils.setError() try: import sqlalchemy except ImportError as e: logging.exception(e.__class__.__name__) logging.error('pip install sqlalchemy') exit(-1) try: import pymysql except ImportError as e: logging.exception(e...
Revert "Change imports to relative."
Revert "Change imports to relative." This reverts commit 9d0990249b7e0e46e38a665cb8c32a1ee435c291.
Python
mit
LegionXI/pydarkstar,AdamGagorik/pydarkstar
__version__ = 0.1 import pydarkstar.logutils import logging pydarkstar.logutils.setError() try: import sqlalchemy except ImportError as e: logging.exception(e.__class__.__name__) logging.error('pip install sqlalchemy') exit(-1) try: import pymysql except ImportError as e: logging.exception(e...
__version__ = 0.1 import pydarkstar.logutils import logging pydarkstar.logutils.setError() try: import sqlalchemy except ImportError as e: logging.exception(e.__class__.__name__) logging.error('pip install sqlalchemy') exit(-1) try: import pymysql except ImportError as e: logging.exception(e...
<commit_before>__version__ = 0.1 import pydarkstar.logutils import logging pydarkstar.logutils.setError() try: import sqlalchemy except ImportError as e: logging.exception(e.__class__.__name__) logging.error('pip install sqlalchemy') exit(-1) try: import pymysql except ImportError as e: logg...
__version__ = 0.1 import pydarkstar.logutils import logging pydarkstar.logutils.setError() try: import sqlalchemy except ImportError as e: logging.exception(e.__class__.__name__) logging.error('pip install sqlalchemy') exit(-1) try: import pymysql except ImportError as e: logging.exception(e...
__version__ = 0.1 import pydarkstar.logutils import logging pydarkstar.logutils.setError() try: import sqlalchemy except ImportError as e: logging.exception(e.__class__.__name__) logging.error('pip install sqlalchemy') exit(-1) try: import pymysql except ImportError as e: logging.exception(e...
<commit_before>__version__ = 0.1 import pydarkstar.logutils import logging pydarkstar.logutils.setError() try: import sqlalchemy except ImportError as e: logging.exception(e.__class__.__name__) logging.error('pip install sqlalchemy') exit(-1) try: import pymysql except ImportError as e: logg...
a1a29908edfe67ad7ee046435f2485e0c6f95943
pyoracc/atf/atffile.py
pyoracc/atf/atffile.py
from .atflex import AtfLexer from .atfyacc import AtfParser from mako.template import Template class AtfFile(object): template = Template("${text.serialize()}") def __init__(self, content): self.content = content if content[-1] != '\n': content += "\n" lexer = AtfLexer()....
from .atflex import AtfLexer from .atfyacc import AtfParser from mako.template import Template class AtfFile(object): template = Template("${text.serialize()}") def __init__(self, content): self.content = content if content[-1] != '\n': content += "\n" lexer = AtfLexer()....
Add handy private debug and print method
Add handy private debug and print method
Python
mit
UCL/pyoracc
from .atflex import AtfLexer from .atfyacc import AtfParser from mako.template import Template class AtfFile(object): template = Template("${text.serialize()}") def __init__(self, content): self.content = content if content[-1] != '\n': content += "\n" lexer = AtfLexer()....
from .atflex import AtfLexer from .atfyacc import AtfParser from mako.template import Template class AtfFile(object): template = Template("${text.serialize()}") def __init__(self, content): self.content = content if content[-1] != '\n': content += "\n" lexer = AtfLexer()....
<commit_before>from .atflex import AtfLexer from .atfyacc import AtfParser from mako.template import Template class AtfFile(object): template = Template("${text.serialize()}") def __init__(self, content): self.content = content if content[-1] != '\n': content += "\n" lexe...
from .atflex import AtfLexer from .atfyacc import AtfParser from mako.template import Template class AtfFile(object): template = Template("${text.serialize()}") def __init__(self, content): self.content = content if content[-1] != '\n': content += "\n" lexer = AtfLexer()....
from .atflex import AtfLexer from .atfyacc import AtfParser from mako.template import Template class AtfFile(object): template = Template("${text.serialize()}") def __init__(self, content): self.content = content if content[-1] != '\n': content += "\n" lexer = AtfLexer()....
<commit_before>from .atflex import AtfLexer from .atfyacc import AtfParser from mako.template import Template class AtfFile(object): template = Template("${text.serialize()}") def __init__(self, content): self.content = content if content[-1] != '\n': content += "\n" lexe...
b220aea07d233a608505ecd73f977a6920e867e0
python/luck-balance.py
python/luck-balance.py
#!/bin/python3 import math import os import random import re import sys def max_luck_balance(contests, num_can_lose): """ Returns a single integer denoting the maximum amount of luck Lena can have after all the contests. """ balance = 0 unimportant_contests = [contest for contest in contests i...
#!/bin/python3 import math import os import random import re import sys def max_luck_balance(contests, num_can_lose): """ Returns a single integer denoting the maximum amount of luck Lena can have after all the contests. """ balance = 0 # We can lose all unimportant contests. unimportant_...
Add dev comments and fix variable naming
Add dev comments and fix variable naming
Python
mit
rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank
#!/bin/python3 import math import os import random import re import sys def max_luck_balance(contests, num_can_lose): """ Returns a single integer denoting the maximum amount of luck Lena can have after all the contests. """ balance = 0 unimportant_contests = [contest for contest in contests i...
#!/bin/python3 import math import os import random import re import sys def max_luck_balance(contests, num_can_lose): """ Returns a single integer denoting the maximum amount of luck Lena can have after all the contests. """ balance = 0 # We can lose all unimportant contests. unimportant_...
<commit_before>#!/bin/python3 import math import os import random import re import sys def max_luck_balance(contests, num_can_lose): """ Returns a single integer denoting the maximum amount of luck Lena can have after all the contests. """ balance = 0 unimportant_contests = [contest for contes...
#!/bin/python3 import math import os import random import re import sys def max_luck_balance(contests, num_can_lose): """ Returns a single integer denoting the maximum amount of luck Lena can have after all the contests. """ balance = 0 # We can lose all unimportant contests. unimportant_...
#!/bin/python3 import math import os import random import re import sys def max_luck_balance(contests, num_can_lose): """ Returns a single integer denoting the maximum amount of luck Lena can have after all the contests. """ balance = 0 unimportant_contests = [contest for contest in contests i...
<commit_before>#!/bin/python3 import math import os import random import re import sys def max_luck_balance(contests, num_can_lose): """ Returns a single integer denoting the maximum amount of luck Lena can have after all the contests. """ balance = 0 unimportant_contests = [contest for contes...
29aeca4df24c84cecd48f0893da94624dab0e1c7
manage.py
manage.py
import os from app import create_app from flask.ext.script import Manager app = create_app(os.getenv('FLASK_CONFIG') or 'default') manager = Manager(app) if __name__ == '__main__': manager.run()
import os from app import create_app, db from app.models import User from flask.ext.script import Manager app = create_app(os.getenv('FLASK_CONFIG') or 'default') manager = Manager(app) @manager.command def adduser(email, username, admin=False): """ Register a new user""" from getpass import getpass password ...
Add a custom script command to add a user to the database
Add a custom script command to add a user to the database
Python
mit
finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is
import os from app import create_app from flask.ext.script import Manager app = create_app(os.getenv('FLASK_CONFIG') or 'default') manager = Manager(app) if __name__ == '__main__': manager.run() Add a custom script command to add a user to the database
import os from app import create_app, db from app.models import User from flask.ext.script import Manager app = create_app(os.getenv('FLASK_CONFIG') or 'default') manager = Manager(app) @manager.command def adduser(email, username, admin=False): """ Register a new user""" from getpass import getpass password ...
<commit_before>import os from app import create_app from flask.ext.script import Manager app = create_app(os.getenv('FLASK_CONFIG') or 'default') manager = Manager(app) if __name__ == '__main__': manager.run() <commit_msg>Add a custom script command to add a user to the database<commit_after>
import os from app import create_app, db from app.models import User from flask.ext.script import Manager app = create_app(os.getenv('FLASK_CONFIG') or 'default') manager = Manager(app) @manager.command def adduser(email, username, admin=False): """ Register a new user""" from getpass import getpass password ...
import os from app import create_app from flask.ext.script import Manager app = create_app(os.getenv('FLASK_CONFIG') or 'default') manager = Manager(app) if __name__ == '__main__': manager.run() Add a custom script command to add a user to the databaseimport os from app import create_app, db from app.models impo...
<commit_before>import os from app import create_app from flask.ext.script import Manager app = create_app(os.getenv('FLASK_CONFIG') or 'default') manager = Manager(app) if __name__ == '__main__': manager.run() <commit_msg>Add a custom script command to add a user to the database<commit_after>import os from app i...
4ee589cd8fd7e60606524e26a3b69e202242b75c
meinberlin/apps/servicekonto/apps.py
meinberlin/apps/servicekonto/apps.py
from allauth.socialaccount import providers from django.apps import AppConfig from .provider import ServiceKontoProvider class Config(AppConfig): name = 'meinberlin.apps.servicekonto' label = 'meinberlin_servicekonto' def ready(self): providers.registry.register(ServiceKontoProvider)
from allauth.socialaccount import providers from django.apps import AppConfig class Config(AppConfig): name = 'meinberlin.apps.servicekonto' label = 'meinberlin_servicekonto' def ready(self): from .provider import ServiceKontoProvider providers.registry.register(ServiceKontoProvider)
Fix servicekonto import to be lazy on ready
Fix servicekonto import to be lazy on ready
Python
agpl-3.0
liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin
from allauth.socialaccount import providers from django.apps import AppConfig from .provider import ServiceKontoProvider class Config(AppConfig): name = 'meinberlin.apps.servicekonto' label = 'meinberlin_servicekonto' def ready(self): providers.registry.register(ServiceKontoProvider) Fix service...
from allauth.socialaccount import providers from django.apps import AppConfig class Config(AppConfig): name = 'meinberlin.apps.servicekonto' label = 'meinberlin_servicekonto' def ready(self): from .provider import ServiceKontoProvider providers.registry.register(ServiceKontoProvider)
<commit_before>from allauth.socialaccount import providers from django.apps import AppConfig from .provider import ServiceKontoProvider class Config(AppConfig): name = 'meinberlin.apps.servicekonto' label = 'meinberlin_servicekonto' def ready(self): providers.registry.register(ServiceKontoProvid...
from allauth.socialaccount import providers from django.apps import AppConfig class Config(AppConfig): name = 'meinberlin.apps.servicekonto' label = 'meinberlin_servicekonto' def ready(self): from .provider import ServiceKontoProvider providers.registry.register(ServiceKontoProvider)
from allauth.socialaccount import providers from django.apps import AppConfig from .provider import ServiceKontoProvider class Config(AppConfig): name = 'meinberlin.apps.servicekonto' label = 'meinberlin_servicekonto' def ready(self): providers.registry.register(ServiceKontoProvider) Fix service...
<commit_before>from allauth.socialaccount import providers from django.apps import AppConfig from .provider import ServiceKontoProvider class Config(AppConfig): name = 'meinberlin.apps.servicekonto' label = 'meinberlin_servicekonto' def ready(self): providers.registry.register(ServiceKontoProvid...
aa780dc20583882c03fe1e3cd37f57c3cf9c7f17
taiga/projects/migrations/0006_auto_20141029_1040.py
taiga/projects/migrations/0006_auto_20141029_1040.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def update_total_milestones(apps, schema_editor): Project = apps.get_model("projects", "Project") qs = Project.objects.filter(total_milestones__isnull=True) qs.update(total_milestones=0) class Migrat...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def update_total_milestones(apps, schema_editor): Project = apps.get_model("projects", "Project") qs = Project.objects.filter(total_milestones__isnull=True) qs.update(total_milestones=0) class Migrat...
Add missing parameters (seems bug on django 1.7.x)
Add missing parameters (seems bug on django 1.7.x)
Python
agpl-3.0
xdevelsistemas/taiga-back-community,astronaut1712/taiga-back,astagi/taiga-back,Tigerwhit4/taiga-back,gam-phon/taiga-back,CMLL/taiga-back,dayatz/taiga-back,dycodedev/taiga-back,joshisa/taiga-back,joshisa/taiga-back,rajiteh/taiga-back,19kestier/taiga-back,Zaneh-/bearded-tribble-back,CoolCloud/taiga-back,coopsource/taiga-...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def update_total_milestones(apps, schema_editor): Project = apps.get_model("projects", "Project") qs = Project.objects.filter(total_milestones__isnull=True) qs.update(total_milestones=0) class Migrat...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def update_total_milestones(apps, schema_editor): Project = apps.get_model("projects", "Project") qs = Project.objects.filter(total_milestones__isnull=True) qs.update(total_milestones=0) class Migrat...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def update_total_milestones(apps, schema_editor): Project = apps.get_model("projects", "Project") qs = Project.objects.filter(total_milestones__isnull=True) qs.update(total_milestones=0)...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def update_total_milestones(apps, schema_editor): Project = apps.get_model("projects", "Project") qs = Project.objects.filter(total_milestones__isnull=True) qs.update(total_milestones=0) class Migrat...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def update_total_milestones(apps, schema_editor): Project = apps.get_model("projects", "Project") qs = Project.objects.filter(total_milestones__isnull=True) qs.update(total_milestones=0) class Migrat...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def update_total_milestones(apps, schema_editor): Project = apps.get_model("projects", "Project") qs = Project.objects.filter(total_milestones__isnull=True) qs.update(total_milestones=0)...