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
dcad82d44e08b6f645a1ffc43c9ba22ec4ce8c30
src/redmill/api/json_.py
src/redmill/api/json_.py
# This file is part of Redmill. # # Redmill is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Redmill is distributed in the ho...
Add JSON converter for database objects
Add JSON converter for database objects
Python
agpl-3.0
lamyj/redmill,lamyj/redmill,lamyj/redmill
Add JSON converter for database objects
# This file is part of Redmill. # # Redmill is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Redmill is distributed in the ho...
<commit_before><commit_msg>Add JSON converter for database objects<commit_after>
# This file is part of Redmill. # # Redmill is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Redmill is distributed in the ho...
Add JSON converter for database objects# This file is part of Redmill. # # Redmill is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
<commit_before><commit_msg>Add JSON converter for database objects<commit_after># This file is part of Redmill. # # Redmill is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the Licens...
d13927daaa19c8baff06469fd894154bda436593
code/loader/dblploader/translateJSON2Cypher.py
code/loader/dblploader/translateJSON2Cypher.py
import os import sys import json cypher = "seeds.cql" for file in os.listdir(os.getcwd()): if file.find("docentes-") >= 0: with open(cypher, "a", encoding="utf-8") as fout: institution = file.split("-")[1].split(".")[0] fout.write("CREATE(n:Institution {name: '%s'});\n" % instituti...
Convert json with primary author to cypher script format
Convert json with primary author to cypher script format
Python
mit
arcosta/sci-synergy,arcosta/sci-synergy,arcosta/sci-synergy
Convert json with primary author to cypher script format
import os import sys import json cypher = "seeds.cql" for file in os.listdir(os.getcwd()): if file.find("docentes-") >= 0: with open(cypher, "a", encoding="utf-8") as fout: institution = file.split("-")[1].split(".")[0] fout.write("CREATE(n:Institution {name: '%s'});\n" % instituti...
<commit_before><commit_msg>Convert json with primary author to cypher script format<commit_after>
import os import sys import json cypher = "seeds.cql" for file in os.listdir(os.getcwd()): if file.find("docentes-") >= 0: with open(cypher, "a", encoding="utf-8") as fout: institution = file.split("-")[1].split(".")[0] fout.write("CREATE(n:Institution {name: '%s'});\n" % instituti...
Convert json with primary author to cypher script formatimport os import sys import json cypher = "seeds.cql" for file in os.listdir(os.getcwd()): if file.find("docentes-") >= 0: with open(cypher, "a", encoding="utf-8") as fout: institution = file.split("-")[1].split(".")[0] fout.w...
<commit_before><commit_msg>Convert json with primary author to cypher script format<commit_after>import os import sys import json cypher = "seeds.cql" for file in os.listdir(os.getcwd()): if file.find("docentes-") >= 0: with open(cypher, "a", encoding="utf-8") as fout: institution = file.split...
35e05afed6d65a2736069ed59a6732eb6b39aa2b
spc/expressions.py
spc/expressions.py
""" The expression language is fully parsed out before passing it to a backend. This prevents the backend from having to keep excess context in order to understand the expression. For example, take the following expression: (+ a (* b (func 1 2 3))) Compare the nested form: Add(a, Multiply(b, Call(func, [1, 2...
Add types for describing expression trees
Add types for describing expression trees
Python
mit
adamnew123456/spc,adamnew123456/spc
Add types for describing expression trees
""" The expression language is fully parsed out before passing it to a backend. This prevents the backend from having to keep excess context in order to understand the expression. For example, take the following expression: (+ a (* b (func 1 2 3))) Compare the nested form: Add(a, Multiply(b, Call(func, [1, 2...
<commit_before><commit_msg>Add types for describing expression trees<commit_after>
""" The expression language is fully parsed out before passing it to a backend. This prevents the backend from having to keep excess context in order to understand the expression. For example, take the following expression: (+ a (* b (func 1 2 3))) Compare the nested form: Add(a, Multiply(b, Call(func, [1, 2...
Add types for describing expression trees""" The expression language is fully parsed out before passing it to a backend. This prevents the backend from having to keep excess context in order to understand the expression. For example, take the following expression: (+ a (* b (func 1 2 3))) Compare the nested form:...
<commit_before><commit_msg>Add types for describing expression trees<commit_after>""" The expression language is fully parsed out before passing it to a backend. This prevents the backend from having to keep excess context in order to understand the expression. For example, take the following expression: (+ a (* b...
9ffed9ce7dad6640246510db579c744037d40f88
motion_tracker/model/eval_model.py
motion_tracker/model/eval_model.py
import os import pandas as pd import seaborn as sns from matplotlib import pyplot as plt from motion_tracker.model.model import make_model from motion_tracker.utils.image_generator import AlovGenerator if __name__ == "__main__": img_edge_size = 224 backend_id = 'th' error_analysis_dir = './work/error_analy...
Add analysis and plotting of prediction errors
Add analysis and plotting of prediction errors
Python
mit
dansbecker/motion-tracking
Add analysis and plotting of prediction errors
import os import pandas as pd import seaborn as sns from matplotlib import pyplot as plt from motion_tracker.model.model import make_model from motion_tracker.utils.image_generator import AlovGenerator if __name__ == "__main__": img_edge_size = 224 backend_id = 'th' error_analysis_dir = './work/error_analy...
<commit_before><commit_msg>Add analysis and plotting of prediction errors<commit_after>
import os import pandas as pd import seaborn as sns from matplotlib import pyplot as plt from motion_tracker.model.model import make_model from motion_tracker.utils.image_generator import AlovGenerator if __name__ == "__main__": img_edge_size = 224 backend_id = 'th' error_analysis_dir = './work/error_analy...
Add analysis and plotting of prediction errorsimport os import pandas as pd import seaborn as sns from matplotlib import pyplot as plt from motion_tracker.model.model import make_model from motion_tracker.utils.image_generator import AlovGenerator if __name__ == "__main__": img_edge_size = 224 backend_id = 'th...
<commit_before><commit_msg>Add analysis and plotting of prediction errors<commit_after>import os import pandas as pd import seaborn as sns from matplotlib import pyplot as plt from motion_tracker.model.model import make_model from motion_tracker.utils.image_generator import AlovGenerator if __name__ == "__main__": ...
82dece03d2bb5f691873572b2191733008370924
bluesky/broker_callbacks.py
bluesky/broker_callbacks.py
from dataportal import DataBroker as db from metadatastore.commands import find_event_descriptors, find_run_starts def post_run(callback): """ Trigger a callback to process all the Documents from a run at the end. This function does not receive the Document stream during collection. It retrieves the ...
Add function that run any callback using broker data instead of strema.
ENH: Add function that run any callback using broker data instead of strema.
Python
bsd-3-clause
klauer/bluesky,ericdill/bluesky,klauer/bluesky,sameera2004/bluesky,ericdill/bluesky,dchabot/bluesky,dchabot/bluesky,sameera2004/bluesky
ENH: Add function that run any callback using broker data instead of strema.
from dataportal import DataBroker as db from metadatastore.commands import find_event_descriptors, find_run_starts def post_run(callback): """ Trigger a callback to process all the Documents from a run at the end. This function does not receive the Document stream during collection. It retrieves the ...
<commit_before><commit_msg>ENH: Add function that run any callback using broker data instead of strema.<commit_after>
from dataportal import DataBroker as db from metadatastore.commands import find_event_descriptors, find_run_starts def post_run(callback): """ Trigger a callback to process all the Documents from a run at the end. This function does not receive the Document stream during collection. It retrieves the ...
ENH: Add function that run any callback using broker data instead of strema.from dataportal import DataBroker as db from metadatastore.commands import find_event_descriptors, find_run_starts def post_run(callback): """ Trigger a callback to process all the Documents from a run at the end. This function d...
<commit_before><commit_msg>ENH: Add function that run any callback using broker data instead of strema.<commit_after>from dataportal import DataBroker as db from metadatastore.commands import find_event_descriptors, find_run_starts def post_run(callback): """ Trigger a callback to process all the Documents fr...
57b1a3b2d7871f6f2f81f8300566778d6b28a85c
games/management/commands/checkbanners.py
games/management/commands/checkbanners.py
import os from django.core.management.base import BaseCommand from django.conf import settings from games.models import Game class Command(BaseCommand): def handle(self, *args, **kwargs): games = Game.objects.all() for game in games: icon_path = os.path.join(settings.MEDIA_ROOT, game.i...
Add script to check for deleted icon and banners
Add script to check for deleted icon and banners
Python
agpl-3.0
Turupawn/website,Turupawn/website,Turupawn/website,lutris/website,lutris/website,Turupawn/website,lutris/website,lutris/website
Add script to check for deleted icon and banners
import os from django.core.management.base import BaseCommand from django.conf import settings from games.models import Game class Command(BaseCommand): def handle(self, *args, **kwargs): games = Game.objects.all() for game in games: icon_path = os.path.join(settings.MEDIA_ROOT, game.i...
<commit_before><commit_msg>Add script to check for deleted icon and banners<commit_after>
import os from django.core.management.base import BaseCommand from django.conf import settings from games.models import Game class Command(BaseCommand): def handle(self, *args, **kwargs): games = Game.objects.all() for game in games: icon_path = os.path.join(settings.MEDIA_ROOT, game.i...
Add script to check for deleted icon and bannersimport os from django.core.management.base import BaseCommand from django.conf import settings from games.models import Game class Command(BaseCommand): def handle(self, *args, **kwargs): games = Game.objects.all() for game in games: icon...
<commit_before><commit_msg>Add script to check for deleted icon and banners<commit_after>import os from django.core.management.base import BaseCommand from django.conf import settings from games.models import Game class Command(BaseCommand): def handle(self, *args, **kwargs): games = Game.objects.all() ...
f267fd43d405187e526c5c35f2210bc94ea6a334
vpr/tests/get_material_ids.py
vpr/tests/get_material_ids.py
from django.db import connection from vpr_storage.views import requestMaterialPDF from vpr_content.models import Material def getAllMaterialIDs(): """ """ cursor = connection.cursor() cursor.execute('select material_id from vpr_content_material') all_ids = [item[0] for item in cursor.fetchall()] ...
Add script to request creating all material PDFs
Add script to request creating all material PDFs
Python
agpl-3.0
voer-platform/vp.repo,voer-platform/vp.repo,voer-platform/vp.repo,voer-platform/vp.repo
Add script to request creating all material PDFs
from django.db import connection from vpr_storage.views import requestMaterialPDF from vpr_content.models import Material def getAllMaterialIDs(): """ """ cursor = connection.cursor() cursor.execute('select material_id from vpr_content_material') all_ids = [item[0] for item in cursor.fetchall()] ...
<commit_before><commit_msg>Add script to request creating all material PDFs<commit_after>
from django.db import connection from vpr_storage.views import requestMaterialPDF from vpr_content.models import Material def getAllMaterialIDs(): """ """ cursor = connection.cursor() cursor.execute('select material_id from vpr_content_material') all_ids = [item[0] for item in cursor.fetchall()] ...
Add script to request creating all material PDFsfrom django.db import connection from vpr_storage.views import requestMaterialPDF from vpr_content.models import Material def getAllMaterialIDs(): """ """ cursor = connection.cursor() cursor.execute('select material_id from vpr_content_material') all_ids...
<commit_before><commit_msg>Add script to request creating all material PDFs<commit_after>from django.db import connection from vpr_storage.views import requestMaterialPDF from vpr_content.models import Material def getAllMaterialIDs(): """ """ cursor = connection.cursor() cursor.execute('select material_i...
ba1523b7f10000d2c15fca08ef8a0211329af407
fabfile.py
fabfile.py
#!/usr/bin/env python # encoding: utf-8 import os from fabric.api import * from fabric.contrib.console import confirm from fabric.contrib.files import exists, upload_template from fabric.colors import red, green, yellow, blue env.use_ssh_config = True env.hosts = ['xdocker'] www_user = 'sysadmin' www_group = 'sysa...
Add fabric file for deployment
Add fabric file for deployment
Python
apache-2.0
XDocker/Engine,XDocker/Engine
Add fabric file for deployment
#!/usr/bin/env python # encoding: utf-8 import os from fabric.api import * from fabric.contrib.console import confirm from fabric.contrib.files import exists, upload_template from fabric.colors import red, green, yellow, blue env.use_ssh_config = True env.hosts = ['xdocker'] www_user = 'sysadmin' www_group = 'sysa...
<commit_before><commit_msg>Add fabric file for deployment<commit_after>
#!/usr/bin/env python # encoding: utf-8 import os from fabric.api import * from fabric.contrib.console import confirm from fabric.contrib.files import exists, upload_template from fabric.colors import red, green, yellow, blue env.use_ssh_config = True env.hosts = ['xdocker'] www_user = 'sysadmin' www_group = 'sysa...
Add fabric file for deployment#!/usr/bin/env python # encoding: utf-8 import os from fabric.api import * from fabric.contrib.console import confirm from fabric.contrib.files import exists, upload_template from fabric.colors import red, green, yellow, blue env.use_ssh_config = True env.hosts = ['xdocker'] www_user ...
<commit_before><commit_msg>Add fabric file for deployment<commit_after>#!/usr/bin/env python # encoding: utf-8 import os from fabric.api import * from fabric.contrib.console import confirm from fabric.contrib.files import exists, upload_template from fabric.colors import red, green, yellow, blue env.use_ssh_config ...
7b629e134ddd8de512a685e8614af08194ce3d4f
CodeFights/isCoolTeam.py
CodeFights/isCoolTeam.py
#!/usr/local/bin/python # Code Fights Is Cool Team Problem class Team(object): def __init__(self, names): self.names = names # TO DO def isCoolTeam(team): return bool(Team(team)) def main(): tests = [ [["Mark", "Kelly", "Kurt", "Terk"], True], [["Lucy"], True], [["...
Set up Code Fights is cool team problem
Set up Code Fights is cool team problem
Python
mit
HKuz/Test_Code
Set up Code Fights is cool team problem
#!/usr/local/bin/python # Code Fights Is Cool Team Problem class Team(object): def __init__(self, names): self.names = names # TO DO def isCoolTeam(team): return bool(Team(team)) def main(): tests = [ [["Mark", "Kelly", "Kurt", "Terk"], True], [["Lucy"], True], [["...
<commit_before><commit_msg>Set up Code Fights is cool team problem<commit_after>
#!/usr/local/bin/python # Code Fights Is Cool Team Problem class Team(object): def __init__(self, names): self.names = names # TO DO def isCoolTeam(team): return bool(Team(team)) def main(): tests = [ [["Mark", "Kelly", "Kurt", "Terk"], True], [["Lucy"], True], [["...
Set up Code Fights is cool team problem#!/usr/local/bin/python # Code Fights Is Cool Team Problem class Team(object): def __init__(self, names): self.names = names # TO DO def isCoolTeam(team): return bool(Team(team)) def main(): tests = [ [["Mark", "Kelly", "Kurt", "Terk"], True]...
<commit_before><commit_msg>Set up Code Fights is cool team problem<commit_after>#!/usr/local/bin/python # Code Fights Is Cool Team Problem class Team(object): def __init__(self, names): self.names = names # TO DO def isCoolTeam(team): return bool(Team(team)) def main(): tests = [ ...
577f3000daae488603e21a2c3bb1dc2fd459920b
data/test-biochemists-nb.py
data/test-biochemists-nb.py
import numpy as np from autoencoder.io import read_text from autoencoder.network import mlp count = read_text('biochemists.tsv', header='infer') y = count[:, 0].astype(int) x = count[:, 1:] net = mlp(x.shape[1], output_size=1, hidden_size=(), masking=False, loss_type='nb') model = net['model'] model.summary() model....
Add a simple NB regression test to compare coefficients with R function glm.nb
Add a simple NB regression test to compare coefficients with R function glm.nb Former-commit-id: 0ab35ca5ae619fc4f9c2233598f4d7563afdf214
Python
apache-2.0
theislab/dca,theislab/dca,theislab/dca
Add a simple NB regression test to compare coefficients with R function glm.nb Former-commit-id: 0ab35ca5ae619fc4f9c2233598f4d7563afdf214
import numpy as np from autoencoder.io import read_text from autoencoder.network import mlp count = read_text('biochemists.tsv', header='infer') y = count[:, 0].astype(int) x = count[:, 1:] net = mlp(x.shape[1], output_size=1, hidden_size=(), masking=False, loss_type='nb') model = net['model'] model.summary() model....
<commit_before><commit_msg>Add a simple NB regression test to compare coefficients with R function glm.nb Former-commit-id: 0ab35ca5ae619fc4f9c2233598f4d7563afdf214<commit_after>
import numpy as np from autoencoder.io import read_text from autoencoder.network import mlp count = read_text('biochemists.tsv', header='infer') y = count[:, 0].astype(int) x = count[:, 1:] net = mlp(x.shape[1], output_size=1, hidden_size=(), masking=False, loss_type='nb') model = net['model'] model.summary() model....
Add a simple NB regression test to compare coefficients with R function glm.nb Former-commit-id: 0ab35ca5ae619fc4f9c2233598f4d7563afdf214import numpy as np from autoencoder.io import read_text from autoencoder.network import mlp count = read_text('biochemists.tsv', header='infer') y = count[:, 0].astype(int) x = cou...
<commit_before><commit_msg>Add a simple NB regression test to compare coefficients with R function glm.nb Former-commit-id: 0ab35ca5ae619fc4f9c2233598f4d7563afdf214<commit_after>import numpy as np from autoencoder.io import read_text from autoencoder.network import mlp count = read_text('biochemists.tsv', header='in...
93a406b5f2ae3fb0027279a4d46bbf310ec7c93b
projects/sdr_paper/pytorch_experiments/analyze_nonzero.py
projects/sdr_paper/pytorch_experiments/analyze_nonzero.py
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2018, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
Add code to show nonzero table
Add code to show nonzero table
Python
agpl-3.0
subutai/htmresearch,subutai/htmresearch,numenta/htmresearch,numenta/htmresearch,subutai/htmresearch,numenta/htmresearch,numenta/htmresearch,numenta/htmresearch,subutai/htmresearch,numenta/htmresearch,subutai/htmresearch,numenta/htmresearch,subutai/htmresearch,subutai/htmresearch,subutai/htmresearch,numenta/htmresearch
Add code to show nonzero table
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2018, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
<commit_before><commit_msg>Add code to show nonzero table<commit_after>
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2018, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
Add code to show nonzero table# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2018, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and con...
<commit_before><commit_msg>Add code to show nonzero table<commit_after># ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2018, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this sof...
9f2c9bdb1dfcca677b7efd9f22f697c929b4c223
readthedocs/core/migrations/0005_migrate-old-passwords.py
readthedocs/core/migrations/0005_migrate-old-passwords.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-10-11 17:28 from __future__ import unicode_literals from django.db import migrations def forwards_func(apps, schema_editor): User = apps.get_model('auth', 'User') old_password_patterns = ( 'sha1$', # RTD's production database does...
Migrate old passwords to be unusable
Migrate old passwords to be unusable
Python
mit
rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org,rtfd/readthedocs.org
Migrate old passwords to be unusable
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-10-11 17:28 from __future__ import unicode_literals from django.db import migrations def forwards_func(apps, schema_editor): User = apps.get_model('auth', 'User') old_password_patterns = ( 'sha1$', # RTD's production database does...
<commit_before><commit_msg>Migrate old passwords to be unusable<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-10-11 17:28 from __future__ import unicode_literals from django.db import migrations def forwards_func(apps, schema_editor): User = apps.get_model('auth', 'User') old_password_patterns = ( 'sha1$', # RTD's production database does...
Migrate old passwords to be unusable# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-10-11 17:28 from __future__ import unicode_literals from django.db import migrations def forwards_func(apps, schema_editor): User = apps.get_model('auth', 'User') old_password_patterns = ( 'sha1$', ...
<commit_before><commit_msg>Migrate old passwords to be unusable<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-10-11 17:28 from __future__ import unicode_literals from django.db import migrations def forwards_func(apps, schema_editor): User = apps.get_model('auth', 'User') old_pa...
dc0d2e7bed5f58ae11716e95c554af5345af4c43
devops/makedb.py
devops/makedb.py
import boto.dynamodb conn = boto.dynamodb.connect_to_region('us-east-1') table_schema = conn.create_schema(hash_key_name='MAC',hash_key_proto_value=str) conn.create_table(name='dev-ysniff',schema=table_schema,read_units=10,write_units=10)
Add script to make database
Add script to make database
Python
mit
jasonsbrooks/ysniff-software,jasonsbrooks/ysniff-software
Add script to make database
import boto.dynamodb conn = boto.dynamodb.connect_to_region('us-east-1') table_schema = conn.create_schema(hash_key_name='MAC',hash_key_proto_value=str) conn.create_table(name='dev-ysniff',schema=table_schema,read_units=10,write_units=10)
<commit_before><commit_msg>Add script to make database<commit_after>
import boto.dynamodb conn = boto.dynamodb.connect_to_region('us-east-1') table_schema = conn.create_schema(hash_key_name='MAC',hash_key_proto_value=str) conn.create_table(name='dev-ysniff',schema=table_schema,read_units=10,write_units=10)
Add script to make databaseimport boto.dynamodb conn = boto.dynamodb.connect_to_region('us-east-1') table_schema = conn.create_schema(hash_key_name='MAC',hash_key_proto_value=str) conn.create_table(name='dev-ysniff',schema=table_schema,read_units=10,write_units=10)
<commit_before><commit_msg>Add script to make database<commit_after>import boto.dynamodb conn = boto.dynamodb.connect_to_region('us-east-1') table_schema = conn.create_schema(hash_key_name='MAC',hash_key_proto_value=str) conn.create_table(name='dev-ysniff',schema=table_schema,read_units=10,write_units=10)
149195845d7062f7ee12f1d59f52c9d4a054c53f
airflow/contrib/operators/gcs_to_gcs.py
airflow/contrib/operators/gcs_to_gcs.py
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
Add gcs to gcs copy operator with renaming if required
[AIRFLOW-1842] Add gcs to gcs copy operator with renaming if required Copies an object from a Google Cloud Storage bucket to another Google Cloud Storage bucket, with renaming if required. Closes #2808 from litdeviant/gcs_to_gcs
Python
apache-2.0
MortalViews/incubator-airflow,yk5/incubator-airflow,adamhaney/airflow,apache/airflow,wooga/airflow,lyft/incubator-airflow,malmiron/incubator-airflow,yk5/incubator-airflow,adamhaney/airflow,nathanielvarona/airflow,OpringaoDoTurno/airflow,artwr/airflow,airbnb/airflow,zack3241/incubator-airflow,lyft/incubator-airflow,sid8...
[AIRFLOW-1842] Add gcs to gcs copy operator with renaming if required Copies an object from a Google Cloud Storage bucket to another Google Cloud Storage bucket, with renaming if required. Closes #2808 from litdeviant/gcs_to_gcs
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
<commit_before><commit_msg>[AIRFLOW-1842] Add gcs to gcs copy operator with renaming if required Copies an object from a Google Cloud Storage bucket to another Google Cloud Storage bucket, with renaming if required. Closes #2808 from litdeviant/gcs_to_gcs<commit_after>
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
[AIRFLOW-1842] Add gcs to gcs copy operator with renaming if required Copies an object from a Google Cloud Storage bucket to another Google Cloud Storage bucket, with renaming if required. Closes #2808 from litdeviant/gcs_to_gcs# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License")...
<commit_before><commit_msg>[AIRFLOW-1842] Add gcs to gcs copy operator with renaming if required Copies an object from a Google Cloud Storage bucket to another Google Cloud Storage bucket, with renaming if required. Closes #2808 from litdeviant/gcs_to_gcs<commit_after># -*- coding: utf-8 -*- # # Licensed under the Ap...
bcbcf37f4451fa87e89c527e8990181b24e3402c
google-calendar.py
google-calendar.py
import pprint import pytz from datetime import datetime, timedelta import httplib2 from apiclient.discovery import build from oauth2client.client import SignedJwtAssertionCredentials with open('privatekey.p12', 'rb') as f: key = f.read() service_account_name = '[email protected]' calendarId = '....
Add script for printing google calendar events
Add script for printing google calendar events
Python
mit
voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts
Add script for printing google calendar events
import pprint import pytz from datetime import datetime, timedelta import httplib2 from apiclient.discovery import build from oauth2client.client import SignedJwtAssertionCredentials with open('privatekey.p12', 'rb') as f: key = f.read() service_account_name = '[email protected]' calendarId = '....
<commit_before><commit_msg>Add script for printing google calendar events<commit_after>
import pprint import pytz from datetime import datetime, timedelta import httplib2 from apiclient.discovery import build from oauth2client.client import SignedJwtAssertionCredentials with open('privatekey.p12', 'rb') as f: key = f.read() service_account_name = '[email protected]' calendarId = '....
Add script for printing google calendar eventsimport pprint import pytz from datetime import datetime, timedelta import httplib2 from apiclient.discovery import build from oauth2client.client import SignedJwtAssertionCredentials with open('privatekey.p12', 'rb') as f: key = f.read() service_account_name = '...@...
<commit_before><commit_msg>Add script for printing google calendar events<commit_after>import pprint import pytz from datetime import datetime, timedelta import httplib2 from apiclient.discovery import build from oauth2client.client import SignedJwtAssertionCredentials with open('privatekey.p12', 'rb') as f: key...
f52ada02a4f0b6e1ca36d56bd3ad16a8c151ae10
MachineLearning/TensorFlow/LinearRegression.py
MachineLearning/TensorFlow/LinearRegression.py
''' ''' # Import libraries import numpy as np import matplotlib.pyplot as plt import tensorflow as tf def generate_points(): # Define number of points to draw points = 500 # Initalize lists x_points = [] y_points = [] # Define constanst a = 0.22 b = 0.78 for i in range(points)...
Add script to build a model by which to predict the values of a dependent variable from the values of one or more independent variables using machine learning techniques with the linear regression algorithm.
feat: Add script to build a model by which to predict the values of a dependent variable from the values of one or more independent variables using machine learning techniques with the linear regression algorithm.
Python
mit
aguijarro/DataSciencePython
feat: Add script to build a model by which to predict the values of a dependent variable from the values of one or more independent variables using machine learning techniques with the linear regression algorithm.
''' ''' # Import libraries import numpy as np import matplotlib.pyplot as plt import tensorflow as tf def generate_points(): # Define number of points to draw points = 500 # Initalize lists x_points = [] y_points = [] # Define constanst a = 0.22 b = 0.78 for i in range(points)...
<commit_before><commit_msg>feat: Add script to build a model by which to predict the values of a dependent variable from the values of one or more independent variables using machine learning techniques with the linear regression algorithm.<commit_after>
''' ''' # Import libraries import numpy as np import matplotlib.pyplot as plt import tensorflow as tf def generate_points(): # Define number of points to draw points = 500 # Initalize lists x_points = [] y_points = [] # Define constanst a = 0.22 b = 0.78 for i in range(points)...
feat: Add script to build a model by which to predict the values of a dependent variable from the values of one or more independent variables using machine learning techniques with the linear regression algorithm.''' ''' # Import libraries import numpy as np import matplotlib.pyplot as plt import tensorflow as tf d...
<commit_before><commit_msg>feat: Add script to build a model by which to predict the values of a dependent variable from the values of one or more independent variables using machine learning techniques with the linear regression algorithm.<commit_after>''' ''' # Import libraries import numpy as np import matplotlib....
6ad3b3372e8cd641ec41bdcf261a1a3018b073d9
localtv/management/commands/update_one_thumbnail.py
localtv/management/commands/update_one_thumbnail.py
# This file is part of Miro Community. # Copyright (C) 2010 Participatory Culture Foundation # # Miro Community is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or (at y...
Add celery-oriented management command to update a thumbnail
Add celery-oriented management command to update a thumbnail
Python
agpl-3.0
pculture/mirocommunity,pculture/mirocommunity,pculture/mirocommunity,pculture/mirocommunity
Add celery-oriented management command to update a thumbnail
# This file is part of Miro Community. # Copyright (C) 2010 Participatory Culture Foundation # # Miro Community is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or (at y...
<commit_before><commit_msg>Add celery-oriented management command to update a thumbnail<commit_after>
# This file is part of Miro Community. # Copyright (C) 2010 Participatory Culture Foundation # # Miro Community is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or (at y...
Add celery-oriented management command to update a thumbnail# This file is part of Miro Community. # Copyright (C) 2010 Participatory Culture Foundation # # Miro Community 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 So...
<commit_before><commit_msg>Add celery-oriented management command to update a thumbnail<commit_after># This file is part of Miro Community. # Copyright (C) 2010 Participatory Culture Foundation # # Miro Community is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Pub...
76d196cc428695c9312d0fc052e43326f356c680
tests/test_helpers.py
tests/test_helpers.py
import unittest from contextlib import redirect_stdout from conllu import print_tree from conllu.tree_helpers import TreeNode from io import StringIO class TestPrintTree(unittest.TestCase): def test_print_simple_treenode(self): node = TreeNode(data={"id": "X", "deprel": "Y"}, children={}) result ...
Add simple tests for print_tree.
Add simple tests for print_tree.
Python
mit
EmilStenstrom/conllu
Add simple tests for print_tree.
import unittest from contextlib import redirect_stdout from conllu import print_tree from conllu.tree_helpers import TreeNode from io import StringIO class TestPrintTree(unittest.TestCase): def test_print_simple_treenode(self): node = TreeNode(data={"id": "X", "deprel": "Y"}, children={}) result ...
<commit_before><commit_msg>Add simple tests for print_tree.<commit_after>
import unittest from contextlib import redirect_stdout from conllu import print_tree from conllu.tree_helpers import TreeNode from io import StringIO class TestPrintTree(unittest.TestCase): def test_print_simple_treenode(self): node = TreeNode(data={"id": "X", "deprel": "Y"}, children={}) result ...
Add simple tests for print_tree.import unittest from contextlib import redirect_stdout from conllu import print_tree from conllu.tree_helpers import TreeNode from io import StringIO class TestPrintTree(unittest.TestCase): def test_print_simple_treenode(self): node = TreeNode(data={"id": "X", "deprel": "Y...
<commit_before><commit_msg>Add simple tests for print_tree.<commit_after>import unittest from contextlib import redirect_stdout from conllu import print_tree from conllu.tree_helpers import TreeNode from io import StringIO class TestPrintTree(unittest.TestCase): def test_print_simple_treenode(self): node...
52bfa1015d51ac5835909eb178caf9279530d666
dipy/denoise/tests/test_denoise.py
dipy/denoise/tests/test_denoise.py
import numpy as np import numpy.testing as npt from dipy.denoise.noise_estimate import estimate_sigma from dipy.denoise.nlmeans import nlmeans import dipy.data as dpd import nibabel as nib def test_denoise(): """ """ fdata, fbval, fbvec = dpd.get_data() data = nib.load(fdata).get_data() sigma = es...
Verify that output of estimate_sigma is a proper input to nlmeans.
TST: Verify that output of estimate_sigma is a proper input to nlmeans.
Python
bsd-3-clause
StongeEtienne/dipy,nilgoyyou/dipy,matthieudumont/dipy,matthieudumont/dipy,nilgoyyou/dipy,JohnGriffiths/dipy,StongeEtienne/dipy,FrancoisRheaultUS/dipy,demianw/dipy,FrancoisRheaultUS/dipy,demianw/dipy,JohnGriffiths/dipy,villalonreina/dipy,villalonreina/dipy
TST: Verify that output of estimate_sigma is a proper input to nlmeans.
import numpy as np import numpy.testing as npt from dipy.denoise.noise_estimate import estimate_sigma from dipy.denoise.nlmeans import nlmeans import dipy.data as dpd import nibabel as nib def test_denoise(): """ """ fdata, fbval, fbvec = dpd.get_data() data = nib.load(fdata).get_data() sigma = es...
<commit_before><commit_msg>TST: Verify that output of estimate_sigma is a proper input to nlmeans.<commit_after>
import numpy as np import numpy.testing as npt from dipy.denoise.noise_estimate import estimate_sigma from dipy.denoise.nlmeans import nlmeans import dipy.data as dpd import nibabel as nib def test_denoise(): """ """ fdata, fbval, fbvec = dpd.get_data() data = nib.load(fdata).get_data() sigma = es...
TST: Verify that output of estimate_sigma is a proper input to nlmeans.import numpy as np import numpy.testing as npt from dipy.denoise.noise_estimate import estimate_sigma from dipy.denoise.nlmeans import nlmeans import dipy.data as dpd import nibabel as nib def test_denoise(): """ """ fdata, fbval, fbve...
<commit_before><commit_msg>TST: Verify that output of estimate_sigma is a proper input to nlmeans.<commit_after>import numpy as np import numpy.testing as npt from dipy.denoise.noise_estimate import estimate_sigma from dipy.denoise.nlmeans import nlmeans import dipy.data as dpd import nibabel as nib def test_denoise()...
ef4730de0a2cf2a5b5c1b5d8c01e3ac35923be49
dockci/migrations/0004.py
dockci/migrations/0004.py
""" Rename "job" models to "project" models """ import py.path jobs_path = py.path.local().join('data', 'jobs') projects_path = py.path.local().join('data', 'projects') jobs_path.move(projects_path)
Add migration for job -> project rename
Add migration for job -> project rename
Python
isc
sprucedev/DockCI,sprucedev/DockCI-Agent,sprucedev/DockCI,sprucedev/DockCI,sprucedev/DockCI-Agent,RickyCook/DockCI,RickyCook/DockCI,sprucedev/DockCI,RickyCook/DockCI,RickyCook/DockCI
Add migration for job -> project rename
""" Rename "job" models to "project" models """ import py.path jobs_path = py.path.local().join('data', 'jobs') projects_path = py.path.local().join('data', 'projects') jobs_path.move(projects_path)
<commit_before><commit_msg>Add migration for job -> project rename<commit_after>
""" Rename "job" models to "project" models """ import py.path jobs_path = py.path.local().join('data', 'jobs') projects_path = py.path.local().join('data', 'projects') jobs_path.move(projects_path)
Add migration for job -> project rename""" Rename "job" models to "project" models """ import py.path jobs_path = py.path.local().join('data', 'jobs') projects_path = py.path.local().join('data', 'projects') jobs_path.move(projects_path)
<commit_before><commit_msg>Add migration for job -> project rename<commit_after>""" Rename "job" models to "project" models """ import py.path jobs_path = py.path.local().join('data', 'jobs') projects_path = py.path.local().join('data', 'projects') jobs_path.move(projects_path)
20c95ee7f6e929c05c20fcba5e1a5806c44d69be
maxwellbloch/tests/test_spectral.py
maxwellbloch/tests/test_spectral.py
""" Unit tests for the spectral analysis module. Thomas Ogden <[email protected]> """ import sys import os import unittest from maxwellbloch import mb_solve, spectral # Absolute path of tests/json directory, so that tests can be called from # different directories. JSON_DIR = os.path.abspath(os.path.join(__file__, '../'...
Add test of spectral methods
Add test of spectral methods
Python
mit
tommyogden/maxwellbloch,tommyogden/maxwellbloch
Add test of spectral methods
""" Unit tests for the spectral analysis module. Thomas Ogden <[email protected]> """ import sys import os import unittest from maxwellbloch import mb_solve, spectral # Absolute path of tests/json directory, so that tests can be called from # different directories. JSON_DIR = os.path.abspath(os.path.join(__file__, '../'...
<commit_before><commit_msg>Add test of spectral methods<commit_after>
""" Unit tests for the spectral analysis module. Thomas Ogden <[email protected]> """ import sys import os import unittest from maxwellbloch import mb_solve, spectral # Absolute path of tests/json directory, so that tests can be called from # different directories. JSON_DIR = os.path.abspath(os.path.join(__file__, '../'...
Add test of spectral methods""" Unit tests for the spectral analysis module. Thomas Ogden <[email protected]> """ import sys import os import unittest from maxwellbloch import mb_solve, spectral # Absolute path of tests/json directory, so that tests can be called from # different directories. JSON_DIR = os.path.abspath(...
<commit_before><commit_msg>Add test of spectral methods<commit_after>""" Unit tests for the spectral analysis module. Thomas Ogden <[email protected]> """ import sys import os import unittest from maxwellbloch import mb_solve, spectral # Absolute path of tests/json directory, so that tests can be called from # different...
f7213a2f99ff9134c4b6a3a184c2c03f64e845ab
data_manipulator.py
data_manipulator.py
from keras.utils import np_utils import numpy as np def get_labels_number(batches): size = batches[0]['data'].shape[1] return size def get_empty_batch(size): merged_batch = {'data': np.array([]).reshape(0, size), 'filenames': [], 'labels': []} return merged_batch def append_batch(merged_batch, bat...
Add module for data manipulation
Add module for data manipulation
Python
mit
maciewar/AGH-Deep-Learning-CIFAR10
Add module for data manipulation
from keras.utils import np_utils import numpy as np def get_labels_number(batches): size = batches[0]['data'].shape[1] return size def get_empty_batch(size): merged_batch = {'data': np.array([]).reshape(0, size), 'filenames': [], 'labels': []} return merged_batch def append_batch(merged_batch, bat...
<commit_before><commit_msg>Add module for data manipulation<commit_after>
from keras.utils import np_utils import numpy as np def get_labels_number(batches): size = batches[0]['data'].shape[1] return size def get_empty_batch(size): merged_batch = {'data': np.array([]).reshape(0, size), 'filenames': [], 'labels': []} return merged_batch def append_batch(merged_batch, bat...
Add module for data manipulationfrom keras.utils import np_utils import numpy as np def get_labels_number(batches): size = batches[0]['data'].shape[1] return size def get_empty_batch(size): merged_batch = {'data': np.array([]).reshape(0, size), 'filenames': [], 'labels': []} return merged_batch de...
<commit_before><commit_msg>Add module for data manipulation<commit_after>from keras.utils import np_utils import numpy as np def get_labels_number(batches): size = batches[0]['data'].shape[1] return size def get_empty_batch(size): merged_batch = {'data': np.array([]).reshape(0, size), 'filenames': [], '...
2764f0dca9b65bad6ea445a51a914eb29122e71c
devil/devil/android/constants/chrome.py
devil/devil/android/constants/chrome.py
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import collections PackageInfo = collections.namedtuple( 'PackageInfo', ['package', 'activity', 'cmdline_file', 'devtools_socket', 'test_package']) ...
Add PACKAGE_INFO to devil in Catapult
Add PACKAGE_INFO to devil in Catapult This CL adds the PACKAGE_INFO in pylib to devil in Catapult. So adb_profile_chrome can use this in Catapult. BUG=catapult:#1937 Review URL: https://codereview.chromium.org/1685803002
Python
bsd-3-clause
catapult-project/catapult,SummerLW/Perf-Insight-Report,benschmaus/catapult,catapult-project/catapult,catapult-project/catapult,SummerLW/Perf-Insight-Report,benschmaus/catapult,benschmaus/catapult,benschmaus/catapult,sahiljain/catapult,benschmaus/catapult,catapult-project/catapult-csm,sahiljain/catapult,sahiljain/catapu...
Add PACKAGE_INFO to devil in Catapult This CL adds the PACKAGE_INFO in pylib to devil in Catapult. So adb_profile_chrome can use this in Catapult. BUG=catapult:#1937 Review URL: https://codereview.chromium.org/1685803002
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import collections PackageInfo = collections.namedtuple( 'PackageInfo', ['package', 'activity', 'cmdline_file', 'devtools_socket', 'test_package']) ...
<commit_before><commit_msg>Add PACKAGE_INFO to devil in Catapult This CL adds the PACKAGE_INFO in pylib to devil in Catapult. So adb_profile_chrome can use this in Catapult. BUG=catapult:#1937 Review URL: https://codereview.chromium.org/1685803002<commit_after>
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import collections PackageInfo = collections.namedtuple( 'PackageInfo', ['package', 'activity', 'cmdline_file', 'devtools_socket', 'test_package']) ...
Add PACKAGE_INFO to devil in Catapult This CL adds the PACKAGE_INFO in pylib to devil in Catapult. So adb_profile_chrome can use this in Catapult. BUG=catapult:#1937 Review URL: https://codereview.chromium.org/1685803002# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed...
<commit_before><commit_msg>Add PACKAGE_INFO to devil in Catapult This CL adds the PACKAGE_INFO in pylib to devil in Catapult. So adb_profile_chrome can use this in Catapult. BUG=catapult:#1937 Review URL: https://codereview.chromium.org/1685803002<commit_after># Copyright 2016 The Chromium Authors. All rights reserv...
fc9acded3072a7fc4ebd874b3d4c582a6ae1e2ec
pythonforandroid/recipes/zbarlight/__init__.py
pythonforandroid/recipes/zbarlight/__init__.py
from os.path import join from pythonforandroid.recipe import PythonRecipe class ZBarLightRecipe(PythonRecipe): version = '2.1' url = 'https://github.com/Polyconseil/zbarlight/archive/{version}.tar.gz' # noqa call_hostpython_via_targetpython = False depends = ['setuptools', 'libzbar'] def get...
Add zbarlight recipe (also compatible with python2 and python3)
Add zbarlight recipe (also compatible with python2 and python3)
Python
mit
germn/python-for-android,rnixx/python-for-android,germn/python-for-android,kronenpj/python-for-android,kivy/python-for-android,rnixx/python-for-android,kivy/python-for-android,rnixx/python-for-android,rnixx/python-for-android,germn/python-for-android,rnixx/python-for-android,kronenpj/python-for-android,PKRoma/python-fo...
Add zbarlight recipe (also compatible with python2 and python3)
from os.path import join from pythonforandroid.recipe import PythonRecipe class ZBarLightRecipe(PythonRecipe): version = '2.1' url = 'https://github.com/Polyconseil/zbarlight/archive/{version}.tar.gz' # noqa call_hostpython_via_targetpython = False depends = ['setuptools', 'libzbar'] def get...
<commit_before><commit_msg>Add zbarlight recipe (also compatible with python2 and python3)<commit_after>
from os.path import join from pythonforandroid.recipe import PythonRecipe class ZBarLightRecipe(PythonRecipe): version = '2.1' url = 'https://github.com/Polyconseil/zbarlight/archive/{version}.tar.gz' # noqa call_hostpython_via_targetpython = False depends = ['setuptools', 'libzbar'] def get...
Add zbarlight recipe (also compatible with python2 and python3)from os.path import join from pythonforandroid.recipe import PythonRecipe class ZBarLightRecipe(PythonRecipe): version = '2.1' url = 'https://github.com/Polyconseil/zbarlight/archive/{version}.tar.gz' # noqa call_hostpython_via_targetpytho...
<commit_before><commit_msg>Add zbarlight recipe (also compatible with python2 and python3)<commit_after>from os.path import join from pythonforandroid.recipe import PythonRecipe class ZBarLightRecipe(PythonRecipe): version = '2.1' url = 'https://github.com/Polyconseil/zbarlight/archive/{version}.tar.gz' # ...
ae056d2f4e6268c371365d23997c81462855f22b
py/elimination-game.py
py/elimination-game.py
class Solution(object): def lastRemaining(self, n): """ :type n: int :rtype: int """ return ((n | 0x55555555555555) & ((1 << (n.bit_length() - 1)) - 1)) + 1
Add py solution for 390. Elimination Game
Add py solution for 390. Elimination Game 390. Elimination Game: https://leetcode.com/problems/elimination-game/ Approach: Observe the first item remaining in each step. The value will be added 1 << step either the remaining count is odd or it's a left-to-right step. Hence the n | 0x55555.. is the key.
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 390. Elimination Game 390. Elimination Game: https://leetcode.com/problems/elimination-game/ Approach: Observe the first item remaining in each step. The value will be added 1 << step either the remaining count is odd or it's a left-to-right step. Hence the n | 0x55555.. is the key.
class Solution(object): def lastRemaining(self, n): """ :type n: int :rtype: int """ return ((n | 0x55555555555555) & ((1 << (n.bit_length() - 1)) - 1)) + 1
<commit_before><commit_msg>Add py solution for 390. Elimination Game 390. Elimination Game: https://leetcode.com/problems/elimination-game/ Approach: Observe the first item remaining in each step. The value will be added 1 << step either the remaining count is odd or it's a left-to-right step. Hence the n...
class Solution(object): def lastRemaining(self, n): """ :type n: int :rtype: int """ return ((n | 0x55555555555555) & ((1 << (n.bit_length() - 1)) - 1)) + 1
Add py solution for 390. Elimination Game 390. Elimination Game: https://leetcode.com/problems/elimination-game/ Approach: Observe the first item remaining in each step. The value will be added 1 << step either the remaining count is odd or it's a left-to-right step. Hence the n | 0x55555.. is the key.cla...
<commit_before><commit_msg>Add py solution for 390. Elimination Game 390. Elimination Game: https://leetcode.com/problems/elimination-game/ Approach: Observe the first item remaining in each step. The value will be added 1 << step either the remaining count is odd or it's a left-to-right step. Hence the n...
00f3394deca4bcdca4e2158895bf5a5c2a8a879c
senlin/tests/tempest/api/profiles/test_profile_show.py
senlin/tests/tempest/api/profiles/test_profile_show.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
Add API test for profile show
Add API test for profile show Add API test for profile show Change-Id: Ie782839c1f4703507f0bfa71817cd96fd7dfc2a4
Python
apache-2.0
openstack/senlin,openstack/senlin,stackforge/senlin,openstack/senlin,stackforge/senlin
Add API test for profile show Add API test for profile show Change-Id: Ie782839c1f4703507f0bfa71817cd96fd7dfc2a4
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
<commit_before><commit_msg>Add API test for profile show Add API test for profile show Change-Id: Ie782839c1f4703507f0bfa71817cd96fd7dfc2a4<commit_after>
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
Add API test for profile show Add API test for profile show Change-Id: Ie782839c1f4703507f0bfa71817cd96fd7dfc2a4# 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/...
<commit_before><commit_msg>Add API test for profile show Add API test for profile show Change-Id: Ie782839c1f4703507f0bfa71817cd96fd7dfc2a4<commit_after># 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 L...
8f6a51571a38d2cd35d12b40f046a93236e710ad
print-in-color/printer.py
print-in-color/printer.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ printer.py: Simple demo of how to print to console using colors. """ __author__ = "Breno RdV" __copyright__ = "Breno RdV @ raccoon.ninja" __contact__ = "http://raccoon.ninja" __license__ = "MIT" __version__ = "01.000" __maintainer__ = "Breno RdV" _...
Print to terminal using colors.
Demo: Print to terminal using colors.
Python
mit
brenordv/python-snippets
Demo: Print to terminal using colors.
#!/usr/bin/env python # -*- coding: utf-8 -*- """ printer.py: Simple demo of how to print to console using colors. """ __author__ = "Breno RdV" __copyright__ = "Breno RdV @ raccoon.ninja" __contact__ = "http://raccoon.ninja" __license__ = "MIT" __version__ = "01.000" __maintainer__ = "Breno RdV" _...
<commit_before><commit_msg>Demo: Print to terminal using colors.<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- """ printer.py: Simple demo of how to print to console using colors. """ __author__ = "Breno RdV" __copyright__ = "Breno RdV @ raccoon.ninja" __contact__ = "http://raccoon.ninja" __license__ = "MIT" __version__ = "01.000" __maintainer__ = "Breno RdV" _...
Demo: Print to terminal using colors.#!/usr/bin/env python # -*- coding: utf-8 -*- """ printer.py: Simple demo of how to print to console using colors. """ __author__ = "Breno RdV" __copyright__ = "Breno RdV @ raccoon.ninja" __contact__ = "http://raccoon.ninja" __license__ = "MIT" __version__ = "01...
<commit_before><commit_msg>Demo: Print to terminal using colors.<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- """ printer.py: Simple demo of how to print to console using colors. """ __author__ = "Breno RdV" __copyright__ = "Breno RdV @ raccoon.ninja" __contact__ = "http://raccoon.ninja" __li...
83458ec4a716aa8827c3ea6edb9d398073bbb93d
aiofcm/errors.py
aiofcm/errors.py
# See https://firebase.google.com/docs/cloud-messaging/xmpp-server-ref INVALID_JSON = 'INVALID_JSON' BAD_REGISTRATION = 'BAD_REGISTRATION' DEVICE_UNREGISTERED = 'DEVICE_UNREGISTERED' BAD_ACK = 'BAD_ACK' SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE' INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR' DEVICE_MESSAGE_RATE_EXCE...
Add module with error code constants
Add module with error code constants
Python
apache-2.0
Fatal1ty/aiofcm
Add module with error code constants
# See https://firebase.google.com/docs/cloud-messaging/xmpp-server-ref INVALID_JSON = 'INVALID_JSON' BAD_REGISTRATION = 'BAD_REGISTRATION' DEVICE_UNREGISTERED = 'DEVICE_UNREGISTERED' BAD_ACK = 'BAD_ACK' SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE' INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR' DEVICE_MESSAGE_RATE_EXCE...
<commit_before><commit_msg>Add module with error code constants<commit_after>
# See https://firebase.google.com/docs/cloud-messaging/xmpp-server-ref INVALID_JSON = 'INVALID_JSON' BAD_REGISTRATION = 'BAD_REGISTRATION' DEVICE_UNREGISTERED = 'DEVICE_UNREGISTERED' BAD_ACK = 'BAD_ACK' SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE' INTERNAL_SERVER_ERROR = 'INTERNAL_SERVER_ERROR' DEVICE_MESSAGE_RATE_EXCE...
Add module with error code constants# See https://firebase.google.com/docs/cloud-messaging/xmpp-server-ref INVALID_JSON = 'INVALID_JSON' BAD_REGISTRATION = 'BAD_REGISTRATION' DEVICE_UNREGISTERED = 'DEVICE_UNREGISTERED' BAD_ACK = 'BAD_ACK' SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILABLE' INTERNAL_SERVER_ERROR = 'INTERNAL_SE...
<commit_before><commit_msg>Add module with error code constants<commit_after># See https://firebase.google.com/docs/cloud-messaging/xmpp-server-ref INVALID_JSON = 'INVALID_JSON' BAD_REGISTRATION = 'BAD_REGISTRATION' DEVICE_UNREGISTERED = 'DEVICE_UNREGISTERED' BAD_ACK = 'BAD_ACK' SERVICE_UNAVAILABLE = 'SERVICE_UNAVAILA...
aa2f6d9bb400cb696d4d5942d813b9fccb3022b6
mezzanine/core/management.py
mezzanine/core/management.py
from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth import models as auth_app from django.db.models.signals import post_syncdb def create_demo_user(app, created_models, verbosity, db, **kwargs): if settings.DEBUG and User in created_models: if verbosity >...
Add a default user when syncdb is called.
Add a default user when syncdb is called.
Python
bsd-2-clause
promil23/mezzanine,joshcartme/mezzanine,dsanders11/mezzanine,dsanders11/mezzanine,mush42/mezzanine,PegasusWang/mezzanine,sjuxax/mezzanine,SoLoHiC/mezzanine,damnfine/mezzanine,frankchin/mezzanine,orlenko/plei,frankier/mezzanine,christianwgd/mezzanine,orlenko/sfpirg,Cicero-Zhao/mezzanine,vladir/mezzanine,emile2016/mezzan...
Add a default user when syncdb is called.
from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth import models as auth_app from django.db.models.signals import post_syncdb def create_demo_user(app, created_models, verbosity, db, **kwargs): if settings.DEBUG and User in created_models: if verbosity >...
<commit_before><commit_msg>Add a default user when syncdb is called.<commit_after>
from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth import models as auth_app from django.db.models.signals import post_syncdb def create_demo_user(app, created_models, verbosity, db, **kwargs): if settings.DEBUG and User in created_models: if verbosity >...
Add a default user when syncdb is called. from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth import models as auth_app from django.db.models.signals import post_syncdb def create_demo_user(app, created_models, verbosity, db, **kwargs): if settings.DEBUG and User ...
<commit_before><commit_msg>Add a default user when syncdb is called.<commit_after> from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth import models as auth_app from django.db.models.signals import post_syncdb def create_demo_user(app, created_models, verbosity, db, *...
755397b519321b6bc5e85535f2f9345ada972196
tot/utils.py
tot/utils.py
from opencivicdata.models.people_orgs import Person def get_current_people(position): if position == 'senator': return Person.objects.filter(memberships__organization__name='Florida Senate') if position == 'representative': return Person.objects.filter(memberships__organization__name='Flori...
Add start of util function that will return current people
Add start of util function that will return current people
Python
mit
jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot
Add start of util function that will return current people
from opencivicdata.models.people_orgs import Person def get_current_people(position): if position == 'senator': return Person.objects.filter(memberships__organization__name='Florida Senate') if position == 'representative': return Person.objects.filter(memberships__organization__name='Flori...
<commit_before><commit_msg>Add start of util function that will return current people<commit_after>
from opencivicdata.models.people_orgs import Person def get_current_people(position): if position == 'senator': return Person.objects.filter(memberships__organization__name='Florida Senate') if position == 'representative': return Person.objects.filter(memberships__organization__name='Flori...
Add start of util function that will return current people from opencivicdata.models.people_orgs import Person def get_current_people(position): if position == 'senator': return Person.objects.filter(memberships__organization__name='Florida Senate') if position == 'representative': return Pe...
<commit_before><commit_msg>Add start of util function that will return current people<commit_after> from opencivicdata.models.people_orgs import Person def get_current_people(position): if position == 'senator': return Person.objects.filter(memberships__organization__name='Florida Senate') if positi...
409350557b8b32a1bbe67ea418c3cb043097fd03
examples/grad/16-force_scan.py
examples/grad/16-force_scan.py
#!/usr/bin/env python ''' Scan molecule dissociation curve and the force on the curve. ''' import numpy as np import matplotlib.pyplot as plt from pyscf import gto, dft bond = np.arange(0.8, 5.0, .1) energy = [] force = [] mol = gto.Mole(atom=[['N', 0, 0, -0.4], ['N', 0, 0, 0.4]], ...
Add example for nuclear gradients
Add example for nuclear gradients
Python
apache-2.0
sunqm/pyscf,gkc1000/pyscf,sunqm/pyscf,sunqm/pyscf,gkc1000/pyscf,gkc1000/pyscf,gkc1000/pyscf,gkc1000/pyscf,sunqm/pyscf
Add example for nuclear gradients
#!/usr/bin/env python ''' Scan molecule dissociation curve and the force on the curve. ''' import numpy as np import matplotlib.pyplot as plt from pyscf import gto, dft bond = np.arange(0.8, 5.0, .1) energy = [] force = [] mol = gto.Mole(atom=[['N', 0, 0, -0.4], ['N', 0, 0, 0.4]], ...
<commit_before><commit_msg>Add example for nuclear gradients<commit_after>
#!/usr/bin/env python ''' Scan molecule dissociation curve and the force on the curve. ''' import numpy as np import matplotlib.pyplot as plt from pyscf import gto, dft bond = np.arange(0.8, 5.0, .1) energy = [] force = [] mol = gto.Mole(atom=[['N', 0, 0, -0.4], ['N', 0, 0, 0.4]], ...
Add example for nuclear gradients#!/usr/bin/env python ''' Scan molecule dissociation curve and the force on the curve. ''' import numpy as np import matplotlib.pyplot as plt from pyscf import gto, dft bond = np.arange(0.8, 5.0, .1) energy = [] force = [] mol = gto.Mole(atom=[['N', 0, 0, -0.4], ...
<commit_before><commit_msg>Add example for nuclear gradients<commit_after>#!/usr/bin/env python ''' Scan molecule dissociation curve and the force on the curve. ''' import numpy as np import matplotlib.pyplot as plt from pyscf import gto, dft bond = np.arange(0.8, 5.0, .1) energy = [] force = [] mol = gto.Mole(atom...
91535fcab34a4f85e5da4f057f9030ee2d6708db
Discord/cogs/tweepy.py
Discord/cogs/tweepy.py
from discord import app_commands from discord.ext import commands async def setup(bot): await bot.add_cog(Tweepy()) class Tweepy(commands.Cog, app_commands.Group): """Tweepy"""
Add Tweepy cog and application command group
[Discord] Add Tweepy cog and application command group
Python
mit
Harmon758/Harmonbot,Harmon758/Harmonbot
[Discord] Add Tweepy cog and application command group
from discord import app_commands from discord.ext import commands async def setup(bot): await bot.add_cog(Tweepy()) class Tweepy(commands.Cog, app_commands.Group): """Tweepy"""
<commit_before><commit_msg>[Discord] Add Tweepy cog and application command group<commit_after>
from discord import app_commands from discord.ext import commands async def setup(bot): await bot.add_cog(Tweepy()) class Tweepy(commands.Cog, app_commands.Group): """Tweepy"""
[Discord] Add Tweepy cog and application command group from discord import app_commands from discord.ext import commands async def setup(bot): await bot.add_cog(Tweepy()) class Tweepy(commands.Cog, app_commands.Group): """Tweepy"""
<commit_before><commit_msg>[Discord] Add Tweepy cog and application command group<commit_after> from discord import app_commands from discord.ext import commands async def setup(bot): await bot.add_cog(Tweepy()) class Tweepy(commands.Cog, app_commands.Group): """Tweepy"""
27dfdd2c646dbcaaad80af7aed72e3053c42efad
tensor2tensor/trax/models/research/__init__.py
tensor2tensor/trax/models/research/__init__.py
# coding=utf-8 # Copyright 2019 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
Add init Trax research models.
Add init Trax research models. PiperOrigin-RevId: 247220362
Python
apache-2.0
tensorflow/tensor2tensor,tensorflow/tensor2tensor,tensorflow/tensor2tensor,tensorflow/tensor2tensor,tensorflow/tensor2tensor
Add init Trax research models. PiperOrigin-RevId: 247220362
# coding=utf-8 # Copyright 2019 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
<commit_before><commit_msg>Add init Trax research models. PiperOrigin-RevId: 247220362<commit_after>
# coding=utf-8 # Copyright 2019 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
Add init Trax research models. PiperOrigin-RevId: 247220362# coding=utf-8 # Copyright 2019 The Tensor2Tensor Authors. # # 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.apach...
<commit_before><commit_msg>Add init Trax research models. PiperOrigin-RevId: 247220362<commit_after># coding=utf-8 # Copyright 2019 The Tensor2Tensor Authors. # # 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 o...
9d0edb3c9a937e6346d03482d8544ce7a411a0d2
tests/twisted/roster/request-never-answered-2.py
tests/twisted/roster/request-never-answered-2.py
""" Exhibit a bug where RequestChannel times out when requesting a group channel after the roster has been received. """ import dbus from gabbletest import exec_test, sync_stream from servicetest import sync_dbus, call_async HT_CONTACT_LIST = 3 HT_GROUP = 4 def test(q, bus, conn, stream): conn.Connect() # q...
Add a test for the reverse of request-never-answered.py
Add a test for the reverse of request-never-answered.py When the race in test-group-race.py had the wrong result, it triggered a bug in the requestotronned roster code.
Python
lgpl-2.1
community-ssu/telepathy-gabble,mlundblad/telepathy-gabble,Ziemin/telepathy-gabble,community-ssu/telepathy-gabble,jku/telepathy-gabble,jku/telepathy-gabble,mlundblad/telepathy-gabble,Ziemin/telepathy-gabble,Ziemin/telepathy-gabble,mlundblad/telepathy-gabble,Ziemin/telepathy-gabble,community-ssu/telepathy-gabble,communit...
Add a test for the reverse of request-never-answered.py When the race in test-group-race.py had the wrong result, it triggered a bug in the requestotronned roster code.
""" Exhibit a bug where RequestChannel times out when requesting a group channel after the roster has been received. """ import dbus from gabbletest import exec_test, sync_stream from servicetest import sync_dbus, call_async HT_CONTACT_LIST = 3 HT_GROUP = 4 def test(q, bus, conn, stream): conn.Connect() # q...
<commit_before><commit_msg>Add a test for the reverse of request-never-answered.py When the race in test-group-race.py had the wrong result, it triggered a bug in the requestotronned roster code.<commit_after>
""" Exhibit a bug where RequestChannel times out when requesting a group channel after the roster has been received. """ import dbus from gabbletest import exec_test, sync_stream from servicetest import sync_dbus, call_async HT_CONTACT_LIST = 3 HT_GROUP = 4 def test(q, bus, conn, stream): conn.Connect() # q...
Add a test for the reverse of request-never-answered.py When the race in test-group-race.py had the wrong result, it triggered a bug in the requestotronned roster code.""" Exhibit a bug where RequestChannel times out when requesting a group channel after the roster has been received. """ import dbus from gabbletest ...
<commit_before><commit_msg>Add a test for the reverse of request-never-answered.py When the race in test-group-race.py had the wrong result, it triggered a bug in the requestotronned roster code.<commit_after>""" Exhibit a bug where RequestChannel times out when requesting a group channel after the roster has been rec...
6a223a5b8b82db40121bdfe296af471463d31184
examples/image_fromarray.py
examples/image_fromarray.py
"""Create a nifti image from a numpy array and an affine transform.""" from os import path import numpy as np from neuroimaging.core.api import fromarray, save_image, load_image, \ Affine, CoordinateMap # Imports used just for development and testing. User's typically # would not uses these when creating an im...
Add example for creating an image from an array and an affine.
Add example for creating an image from an array and an affine.
Python
bsd-3-clause
yarikoptic/NiPy-OLD,yarikoptic/NiPy-OLD
Add example for creating an image from an array and an affine.
"""Create a nifti image from a numpy array and an affine transform.""" from os import path import numpy as np from neuroimaging.core.api import fromarray, save_image, load_image, \ Affine, CoordinateMap # Imports used just for development and testing. User's typically # would not uses these when creating an im...
<commit_before><commit_msg>Add example for creating an image from an array and an affine.<commit_after>
"""Create a nifti image from a numpy array and an affine transform.""" from os import path import numpy as np from neuroimaging.core.api import fromarray, save_image, load_image, \ Affine, CoordinateMap # Imports used just for development and testing. User's typically # would not uses these when creating an im...
Add example for creating an image from an array and an affine."""Create a nifti image from a numpy array and an affine transform.""" from os import path import numpy as np from neuroimaging.core.api import fromarray, save_image, load_image, \ Affine, CoordinateMap # Imports used just for development and testing...
<commit_before><commit_msg>Add example for creating an image from an array and an affine.<commit_after>"""Create a nifti image from a numpy array and an affine transform.""" from os import path import numpy as np from neuroimaging.core.api import fromarray, save_image, load_image, \ Affine, CoordinateMap # Impo...
d75c8c01c57c0223bfb75f9a7b2ddb9087476d38
agithub_test.py
agithub_test.py
#!/usr/bin/env python import agithub import unittest class TestGithubObjectCreation(unittest.TestCase): def test_user_pw(self): gh = agithub.Github('korfuri', '1234') self.assertTrue(gh is not None) gh = agithub.Github(username='korfuri', password='1234') self.assertTrue(gh is not ...
Add unittests for Github object creation scenarios.
Add unittests for Github object creation scenarios. Simply run with `./agithub_test.py`.
Python
mit
mozilla/agithub,jpaugh/agithub
Add unittests for Github object creation scenarios. Simply run with `./agithub_test.py`.
#!/usr/bin/env python import agithub import unittest class TestGithubObjectCreation(unittest.TestCase): def test_user_pw(self): gh = agithub.Github('korfuri', '1234') self.assertTrue(gh is not None) gh = agithub.Github(username='korfuri', password='1234') self.assertTrue(gh is not ...
<commit_before><commit_msg>Add unittests for Github object creation scenarios. Simply run with `./agithub_test.py`.<commit_after>
#!/usr/bin/env python import agithub import unittest class TestGithubObjectCreation(unittest.TestCase): def test_user_pw(self): gh = agithub.Github('korfuri', '1234') self.assertTrue(gh is not None) gh = agithub.Github(username='korfuri', password='1234') self.assertTrue(gh is not ...
Add unittests for Github object creation scenarios. Simply run with `./agithub_test.py`.#!/usr/bin/env python import agithub import unittest class TestGithubObjectCreation(unittest.TestCase): def test_user_pw(self): gh = agithub.Github('korfuri', '1234') self.assertTrue(gh is not None) gh...
<commit_before><commit_msg>Add unittests for Github object creation scenarios. Simply run with `./agithub_test.py`.<commit_after>#!/usr/bin/env python import agithub import unittest class TestGithubObjectCreation(unittest.TestCase): def test_user_pw(self): gh = agithub.Github('korfuri', '1234') se...
989ea42f13d0e7b6952aaf84ee422851628a98ec
plugins/dicom_viewer/server/event_helper.py
plugins/dicom_viewer/server/event_helper.py
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You may obtain a copy of ...
Add a helper class to wait for event handlers to complete
Add a helper class to wait for event handlers to complete
Python
apache-2.0
Kitware/girder,jbeezley/girder,RafaelPalomar/girder,Kitware/girder,data-exp-lab/girder,RafaelPalomar/girder,girder/girder,Xarthisius/girder,manthey/girder,RafaelPalomar/girder,data-exp-lab/girder,kotfic/girder,kotfic/girder,Xarthisius/girder,data-exp-lab/girder,girder/girder,Kitware/girder,Kitware/girder,manthey/girder...
Add a helper class to wait for event handlers to complete
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You may obtain a copy of ...
<commit_before><commit_msg>Add a helper class to wait for event handlers to complete<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You may obtain a copy of ...
Add a helper class to wait for event handlers to complete#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in ...
<commit_before><commit_msg>Add a helper class to wait for event handlers to complete<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" )...
7fc860c0480c5269d812950bc3e738564cb5577c
tests/test_bot_filter.py
tests/test_bot_filter.py
import pytest import responses from instabot.api.config import API_URL from .test_bot import TestBot from .test_variables import TEST_USERNAME_INFO_ITEM class TestBotFilter(TestBot): @pytest.mark.parametrize('filter_users,filter_business_accounts,filter_verified_accounts,expected', [ (False, False, Fals...
Add test on check user with filter users, business and verified
Add test on check user with filter users, business and verified
Python
apache-2.0
instagrambot/instabot,instagrambot/instabot,ohld/instabot
Add test on check user with filter users, business and verified
import pytest import responses from instabot.api.config import API_URL from .test_bot import TestBot from .test_variables import TEST_USERNAME_INFO_ITEM class TestBotFilter(TestBot): @pytest.mark.parametrize('filter_users,filter_business_accounts,filter_verified_accounts,expected', [ (False, False, Fals...
<commit_before><commit_msg>Add test on check user with filter users, business and verified<commit_after>
import pytest import responses from instabot.api.config import API_URL from .test_bot import TestBot from .test_variables import TEST_USERNAME_INFO_ITEM class TestBotFilter(TestBot): @pytest.mark.parametrize('filter_users,filter_business_accounts,filter_verified_accounts,expected', [ (False, False, Fals...
Add test on check user with filter users, business and verifiedimport pytest import responses from instabot.api.config import API_URL from .test_bot import TestBot from .test_variables import TEST_USERNAME_INFO_ITEM class TestBotFilter(TestBot): @pytest.mark.parametrize('filter_users,filter_business_accounts,fi...
<commit_before><commit_msg>Add test on check user with filter users, business and verified<commit_after>import pytest import responses from instabot.api.config import API_URL from .test_bot import TestBot from .test_variables import TEST_USERNAME_INFO_ITEM class TestBotFilter(TestBot): @pytest.mark.parametrize(...
a2c006a2ce5524a9d4afdd9086fa3c76704cae08
bashlint.py
bashlint.py
#!/usr/bin/env python import os from fnmatch import fnmatch def filename_match(filename, patterns, default=True): """Check if patterns contains a pattern that matches filename. If patterns is not specified, this always returns True. """ if not patterns: return default return any(fnmatc...
Implement shell files searching by pattern
Implement shell files searching by pattern Change-Id: I6bd6743a1b9f15fd704dfa38b1cce34b5948f0df
Python
mit
skudriashev/bashlint
Implement shell files searching by pattern Change-Id: I6bd6743a1b9f15fd704dfa38b1cce34b5948f0df
#!/usr/bin/env python import os from fnmatch import fnmatch def filename_match(filename, patterns, default=True): """Check if patterns contains a pattern that matches filename. If patterns is not specified, this always returns True. """ if not patterns: return default return any(fnmatc...
<commit_before><commit_msg>Implement shell files searching by pattern Change-Id: I6bd6743a1b9f15fd704dfa38b1cce34b5948f0df<commit_after>
#!/usr/bin/env python import os from fnmatch import fnmatch def filename_match(filename, patterns, default=True): """Check if patterns contains a pattern that matches filename. If patterns is not specified, this always returns True. """ if not patterns: return default return any(fnmatc...
Implement shell files searching by pattern Change-Id: I6bd6743a1b9f15fd704dfa38b1cce34b5948f0df#!/usr/bin/env python import os from fnmatch import fnmatch def filename_match(filename, patterns, default=True): """Check if patterns contains a pattern that matches filename. If patterns is not specified, this...
<commit_before><commit_msg>Implement shell files searching by pattern Change-Id: I6bd6743a1b9f15fd704dfa38b1cce34b5948f0df<commit_after>#!/usr/bin/env python import os from fnmatch import fnmatch def filename_match(filename, patterns, default=True): """Check if patterns contains a pattern that matches filename...
cbc08671019a62e9840d6f0decf9b883eb2eeec4
binary_search.py
binary_search.py
from __future__ import division def recursive_binary_search(sorted_sequence, key, start=0, end=None): '''Returns the index of `key` in the `sorted_sequence`, or None if `key` is not in `sorted_sequence`.''' end = end or len(sorted_sequence) if (end - start) < 0: return None middle = star...
Add Python binary search implementation (recursive and iterative)
Add Python binary search implementation (recursive and iterative)
Python
mit
gg/algorithms,gg/algorithms,gg/algorithms
Add Python binary search implementation (recursive and iterative)
from __future__ import division def recursive_binary_search(sorted_sequence, key, start=0, end=None): '''Returns the index of `key` in the `sorted_sequence`, or None if `key` is not in `sorted_sequence`.''' end = end or len(sorted_sequence) if (end - start) < 0: return None middle = star...
<commit_before><commit_msg>Add Python binary search implementation (recursive and iterative)<commit_after>
from __future__ import division def recursive_binary_search(sorted_sequence, key, start=0, end=None): '''Returns the index of `key` in the `sorted_sequence`, or None if `key` is not in `sorted_sequence`.''' end = end or len(sorted_sequence) if (end - start) < 0: return None middle = star...
Add Python binary search implementation (recursive and iterative)from __future__ import division def recursive_binary_search(sorted_sequence, key, start=0, end=None): '''Returns the index of `key` in the `sorted_sequence`, or None if `key` is not in `sorted_sequence`.''' end = end or len(sorted_sequence) ...
<commit_before><commit_msg>Add Python binary search implementation (recursive and iterative)<commit_after>from __future__ import division def recursive_binary_search(sorted_sequence, key, start=0, end=None): '''Returns the index of `key` in the `sorted_sequence`, or None if `key` is not in `sorted_sequence`.'...
93c8b63df4794765164f3a50f48230121cb334c0
python/np_types.py
python/np_types.py
#!/usr/in/env python # -*- coding: utf-8 -*- import numpy as np # TODO: generate following sizes with templates state_size = 4 input_size = 2 output_size = 2 second_order_size = 2 natural_t = np.int32 real_t = np.float64 state_t = (real_t, (state_size, 1)) input_t = (real_t, (input_size, 1)) output_t = (real_t, (ou...
Add Python data types for sample data
Add Python data types for sample data
Python
bsd-2-clause
oliverlee/bicycle,oliverlee/bicycle
Add Python data types for sample data
#!/usr/in/env python # -*- coding: utf-8 -*- import numpy as np # TODO: generate following sizes with templates state_size = 4 input_size = 2 output_size = 2 second_order_size = 2 natural_t = np.int32 real_t = np.float64 state_t = (real_t, (state_size, 1)) input_t = (real_t, (input_size, 1)) output_t = (real_t, (ou...
<commit_before><commit_msg>Add Python data types for sample data<commit_after>
#!/usr/in/env python # -*- coding: utf-8 -*- import numpy as np # TODO: generate following sizes with templates state_size = 4 input_size = 2 output_size = 2 second_order_size = 2 natural_t = np.int32 real_t = np.float64 state_t = (real_t, (state_size, 1)) input_t = (real_t, (input_size, 1)) output_t = (real_t, (ou...
Add Python data types for sample data#!/usr/in/env python # -*- coding: utf-8 -*- import numpy as np # TODO: generate following sizes with templates state_size = 4 input_size = 2 output_size = 2 second_order_size = 2 natural_t = np.int32 real_t = np.float64 state_t = (real_t, (state_size, 1)) input_t = (real_t, (in...
<commit_before><commit_msg>Add Python data types for sample data<commit_after>#!/usr/in/env python # -*- coding: utf-8 -*- import numpy as np # TODO: generate following sizes with templates state_size = 4 input_size = 2 output_size = 2 second_order_size = 2 natural_t = np.int32 real_t = np.float64 state_t = (real_t...
346aa9624092483de1fe28878c90ab7fdbaa543f
organize/migrations/0005_auto_20170120_1810.py
organize/migrations/0005_auto_20170120_1810.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-01-20 18:10 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('organize', '0004_auto_20170116_1808'), ] operations = [ migrations.AlterFie...
Add defaults to last name of organizers
Add defaults to last name of organizers
Python
bsd-3-clause
patjouk/djangogirls,DjangoGirls/djangogirls,DjangoGirls/djangogirls,DjangoGirls/djangogirls,patjouk/djangogirls,patjouk/djangogirls,patjouk/djangogirls
Add defaults to last name of organizers
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-01-20 18:10 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('organize', '0004_auto_20170116_1808'), ] operations = [ migrations.AlterFie...
<commit_before><commit_msg>Add defaults to last name of organizers<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-01-20 18:10 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('organize', '0004_auto_20170116_1808'), ] operations = [ migrations.AlterFie...
Add defaults to last name of organizers# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-01-20 18:10 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('organize', '0004_auto_20170116_1808'), ] ope...
<commit_before><commit_msg>Add defaults to last name of organizers<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-01-20 18:10 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('organize', '...
6b8554bca4be17bc2b9fdcf2bb2f349900d2b4cb
rdmo/core/management/commands/make_theme.py
rdmo/core/management/commands/make_theme.py
from django.apps import apps from django.core.management.base import BaseCommand import os.path import re from shutil import copyfile class Command(BaseCommand): def get_folders(self): rdmo_core = os.path.join(apps.get_app_config('rdmo').path, 'core') rdmo_app_theme = os.path.join(os.getcwd(), 't...
Add make theme manage script
Add make theme manage script
Python
apache-2.0
rdmorganiser/rdmo,DMPwerkzeug/DMPwerkzeug,DMPwerkzeug/DMPwerkzeug,DMPwerkzeug/DMPwerkzeug,rdmorganiser/rdmo,rdmorganiser/rdmo
Add make theme manage script
from django.apps import apps from django.core.management.base import BaseCommand import os.path import re from shutil import copyfile class Command(BaseCommand): def get_folders(self): rdmo_core = os.path.join(apps.get_app_config('rdmo').path, 'core') rdmo_app_theme = os.path.join(os.getcwd(), 't...
<commit_before><commit_msg>Add make theme manage script<commit_after>
from django.apps import apps from django.core.management.base import BaseCommand import os.path import re from shutil import copyfile class Command(BaseCommand): def get_folders(self): rdmo_core = os.path.join(apps.get_app_config('rdmo').path, 'core') rdmo_app_theme = os.path.join(os.getcwd(), 't...
Add make theme manage scriptfrom django.apps import apps from django.core.management.base import BaseCommand import os.path import re from shutil import copyfile class Command(BaseCommand): def get_folders(self): rdmo_core = os.path.join(apps.get_app_config('rdmo').path, 'core') rdmo_app_theme = ...
<commit_before><commit_msg>Add make theme manage script<commit_after>from django.apps import apps from django.core.management.base import BaseCommand import os.path import re from shutil import copyfile class Command(BaseCommand): def get_folders(self): rdmo_core = os.path.join(apps.get_app_config('rdmo'...
12ff38555ac735fca4a7585767b006dbf5e15ca9
groups/tests/test_apps_base.py
groups/tests/test_apps_base.py
from unittest import mock from django.test import TestCase import groups # Needed for instantiating AppConfig classes. from groups import _apps_base from groups.admin import GroupAdmin from groups.models import Group class TestAdminRegisteringAppConfig(TestCase): def setUp(self): """ Create an ...
Add a test for AdminRegisteringAppConfig.
Add a test for AdminRegisteringAppConfig.
Python
bsd-2-clause
incuna/incuna-groups,incuna/incuna-groups
Add a test for AdminRegisteringAppConfig.
from unittest import mock from django.test import TestCase import groups # Needed for instantiating AppConfig classes. from groups import _apps_base from groups.admin import GroupAdmin from groups.models import Group class TestAdminRegisteringAppConfig(TestCase): def setUp(self): """ Create an ...
<commit_before><commit_msg>Add a test for AdminRegisteringAppConfig.<commit_after>
from unittest import mock from django.test import TestCase import groups # Needed for instantiating AppConfig classes. from groups import _apps_base from groups.admin import GroupAdmin from groups.models import Group class TestAdminRegisteringAppConfig(TestCase): def setUp(self): """ Create an ...
Add a test for AdminRegisteringAppConfig.from unittest import mock from django.test import TestCase import groups # Needed for instantiating AppConfig classes. from groups import _apps_base from groups.admin import GroupAdmin from groups.models import Group class TestAdminRegisteringAppConfig(TestCase): def se...
<commit_before><commit_msg>Add a test for AdminRegisteringAppConfig.<commit_after>from unittest import mock from django.test import TestCase import groups # Needed for instantiating AppConfig classes. from groups import _apps_base from groups.admin import GroupAdmin from groups.models import Group class TestAdminR...
7d5eb61423c8538698a65efca8522aa0fbda17c6
curiosity/plugins/fuyu.py
curiosity/plugins/fuyu.py
import curio from curious.commands import command from curious.commands.context import Context from curious.commands.plugin import Plugin from curious.dataclasses import Member def has_admin(ctx: Context): return ctx.channel.permissions(ctx.author).administrator class Fuyu(Plugin): """ Commands for my ...
Add plugin for my server.
Add plugin for my server.
Python
mit
SunDwarf/curiosity
Add plugin for my server.
import curio from curious.commands import command from curious.commands.context import Context from curious.commands.plugin import Plugin from curious.dataclasses import Member def has_admin(ctx: Context): return ctx.channel.permissions(ctx.author).administrator class Fuyu(Plugin): """ Commands for my ...
<commit_before><commit_msg>Add plugin for my server.<commit_after>
import curio from curious.commands import command from curious.commands.context import Context from curious.commands.plugin import Plugin from curious.dataclasses import Member def has_admin(ctx: Context): return ctx.channel.permissions(ctx.author).administrator class Fuyu(Plugin): """ Commands for my ...
Add plugin for my server.import curio from curious.commands import command from curious.commands.context import Context from curious.commands.plugin import Plugin from curious.dataclasses import Member def has_admin(ctx: Context): return ctx.channel.permissions(ctx.author).administrator class Fuyu(Plugin): ...
<commit_before><commit_msg>Add plugin for my server.<commit_after>import curio from curious.commands import command from curious.commands.context import Context from curious.commands.plugin import Plugin from curious.dataclasses import Member def has_admin(ctx: Context): return ctx.channel.permissions(ctx.author...
77a6da686e4def9548ac59de9eace929a4332fca
Python/prims_mst.py
Python/prims_mst.py
# Prim's algorithm is a greedy algorithm that # finds a minimum spanning tree # for a weighted undirected graph. # # Time complexity: O(m * n) # Input Format: # First line has two integers, denoting the number of nodes in the graph and # denoting the number of edges in the graph. # The next lines each consist of thre...
Add Prim's algorithm for finding MST
Add Prim's algorithm for finding MST
Python
mit
saru95/DSA,saru95/DSA,saru95/DSA,saru95/DSA,saru95/DSA
Add Prim's algorithm for finding MST
# Prim's algorithm is a greedy algorithm that # finds a minimum spanning tree # for a weighted undirected graph. # # Time complexity: O(m * n) # Input Format: # First line has two integers, denoting the number of nodes in the graph and # denoting the number of edges in the graph. # The next lines each consist of thre...
<commit_before><commit_msg>Add Prim's algorithm for finding MST<commit_after>
# Prim's algorithm is a greedy algorithm that # finds a minimum spanning tree # for a weighted undirected graph. # # Time complexity: O(m * n) # Input Format: # First line has two integers, denoting the number of nodes in the graph and # denoting the number of edges in the graph. # The next lines each consist of thre...
Add Prim's algorithm for finding MST# Prim's algorithm is a greedy algorithm that # finds a minimum spanning tree # for a weighted undirected graph. # # Time complexity: O(m * n) # Input Format: # First line has two integers, denoting the number of nodes in the graph and # denoting the number of edges in the graph. # ...
<commit_before><commit_msg>Add Prim's algorithm for finding MST<commit_after># Prim's algorithm is a greedy algorithm that # finds a minimum spanning tree # for a weighted undirected graph. # # Time complexity: O(m * n) # Input Format: # First line has two integers, denoting the number of nodes in the graph and # deno...
69b546df0fe93377e420e62b29e0666b558cde19
demo/producer_consumer.py
demo/producer_consumer.py
from sparts.tasks.periodic import PeriodicTask from sparts.tasks.queue import QueueTask from sparts.vservice import VService import random import threading class Producer(PeriodicTask): INTERVAL = 1.0 def initTask(self): super(Producer, self).initTask() self.consumer = self.service.requireTas...
Add a "producer consumer" demo using QueueTask and PeriodicTask
Add a "producer consumer" demo using QueueTask and PeriodicTask
Python
bsd-3-clause
djipko/sparts,fmoo/sparts,pshuff/sparts,fmoo/sparts,bboozzoo/sparts,facebook/sparts,djipko/sparts,facebook/sparts,bboozzoo/sparts,pshuff/sparts
Add a "producer consumer" demo using QueueTask and PeriodicTask
from sparts.tasks.periodic import PeriodicTask from sparts.tasks.queue import QueueTask from sparts.vservice import VService import random import threading class Producer(PeriodicTask): INTERVAL = 1.0 def initTask(self): super(Producer, self).initTask() self.consumer = self.service.requireTas...
<commit_before><commit_msg>Add a "producer consumer" demo using QueueTask and PeriodicTask<commit_after>
from sparts.tasks.periodic import PeriodicTask from sparts.tasks.queue import QueueTask from sparts.vservice import VService import random import threading class Producer(PeriodicTask): INTERVAL = 1.0 def initTask(self): super(Producer, self).initTask() self.consumer = self.service.requireTas...
Add a "producer consumer" demo using QueueTask and PeriodicTaskfrom sparts.tasks.periodic import PeriodicTask from sparts.tasks.queue import QueueTask from sparts.vservice import VService import random import threading class Producer(PeriodicTask): INTERVAL = 1.0 def initTask(self): super(Producer, s...
<commit_before><commit_msg>Add a "producer consumer" demo using QueueTask and PeriodicTask<commit_after>from sparts.tasks.periodic import PeriodicTask from sparts.tasks.queue import QueueTask from sparts.vservice import VService import random import threading class Producer(PeriodicTask): INTERVAL = 1.0 def ...
fbb93749870b1ba9a228afa7c1bc1791ca449dca
gittaggers.py
gittaggers.py
from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_tag(self): ...
from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_tag(self): ...
Fix Python packaging to use correct git log for package time/version stamps (2nd try)
Fix Python packaging to use correct git log for package time/version stamps (2nd try)
Python
apache-2.0
chapmanb/cwltool,dleehr/cwltool,jeremiahsavage/cwltool,SciDAP/cwltool,chapmanb/cwltool,SciDAP/cwltool,dleehr/cwltool,dleehr/cwltool,dleehr/cwltool,common-workflow-language/cwltool,jeremiahsavage/cwltool,chapmanb/cwltool,jeremiahsavage/cwltool,SciDAP/cwltool,common-workflow-language/cwltool,jeremiahsavage/cwltool,chapma...
from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_tag(self): ...
from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_tag(self): ...
<commit_before>from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_t...
from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_tag(self): ...
from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_tag(self): ...
<commit_before>from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ def git_timestamp_t...
4fd470ad2aa5e6c075e2d34667908401f4284f70
openfda3/server_opnfda.py
openfda3/server_opnfda.py
import http.server import json import socketserver PORT = 8000 # HTTPRequestHandler class class testHTTPRequestHandler(http.server.BaseHTTPRequestHandler): # GET def do_GET(self): headers = {'User-Agent': 'http-client'} conn = http.client.HTTPSConnection("api.fda.gov") # Get a https...
Add first version of openfda3
Add first version of openfda3
Python
apache-2.0
acs-test/openfda,acs-test/openfda
Add first version of openfda3
import http.server import json import socketserver PORT = 8000 # HTTPRequestHandler class class testHTTPRequestHandler(http.server.BaseHTTPRequestHandler): # GET def do_GET(self): headers = {'User-Agent': 'http-client'} conn = http.client.HTTPSConnection("api.fda.gov") # Get a https...
<commit_before><commit_msg>Add first version of openfda3<commit_after>
import http.server import json import socketserver PORT = 8000 # HTTPRequestHandler class class testHTTPRequestHandler(http.server.BaseHTTPRequestHandler): # GET def do_GET(self): headers = {'User-Agent': 'http-client'} conn = http.client.HTTPSConnection("api.fda.gov") # Get a https...
Add first version of openfda3import http.server import json import socketserver PORT = 8000 # HTTPRequestHandler class class testHTTPRequestHandler(http.server.BaseHTTPRequestHandler): # GET def do_GET(self): headers = {'User-Agent': 'http-client'} conn = http.client.HTTPSConnection("api.fda....
<commit_before><commit_msg>Add first version of openfda3<commit_after>import http.server import json import socketserver PORT = 8000 # HTTPRequestHandler class class testHTTPRequestHandler(http.server.BaseHTTPRequestHandler): # GET def do_GET(self): headers = {'User-Agent': 'http-client'} con...
bc8a8686d601bb0d1890e3eacbf7430bbdb50b3c
CodeFights/digitDegree.py
CodeFights/digitDegree.py
#!/usr/local/bin/python # Code Fights Digits Degree Problem def digitsDegree(n): degree = 0 if n < 10: return 0 while n > 0: dig = n % 10 n = n // 10 if dig > 0: degree += 1 return degree def main(): tests = [ [5, 0], [100, 1], ...
Solve Code Fights digits degree problem
Solve Code Fights digits degree problem
Python
mit
HKuz/Test_Code
Solve Code Fights digits degree problem
#!/usr/local/bin/python # Code Fights Digits Degree Problem def digitsDegree(n): degree = 0 if n < 10: return 0 while n > 0: dig = n % 10 n = n // 10 if dig > 0: degree += 1 return degree def main(): tests = [ [5, 0], [100, 1], ...
<commit_before><commit_msg>Solve Code Fights digits degree problem<commit_after>
#!/usr/local/bin/python # Code Fights Digits Degree Problem def digitsDegree(n): degree = 0 if n < 10: return 0 while n > 0: dig = n % 10 n = n // 10 if dig > 0: degree += 1 return degree def main(): tests = [ [5, 0], [100, 1], ...
Solve Code Fights digits degree problem#!/usr/local/bin/python # Code Fights Digits Degree Problem def digitsDegree(n): degree = 0 if n < 10: return 0 while n > 0: dig = n % 10 n = n // 10 if dig > 0: degree += 1 return degree def main(): tests = [ ...
<commit_before><commit_msg>Solve Code Fights digits degree problem<commit_after>#!/usr/local/bin/python # Code Fights Digits Degree Problem def digitsDegree(n): degree = 0 if n < 10: return 0 while n > 0: dig = n % 10 n = n // 10 if dig > 0: degree += 1 retu...
c1412a5aac7c0917917e058ff5e7dab11ab48e8e
pyeda/gvmagic.py
pyeda/gvmagic.py
""" Graphviz IPython magic extensions Magic methods: %dot <dot graph> %%dot <dot ... ... graph> %dotstr "<dot graph>" %dotobj obj.to_dot() %dotobjs obj[0].to_dot(), obj[1].to_dot(), ... Usage: %load_ext gvmagic """ from subprocess import Popen, PIPE from IPython.core.display import disp...
Add Graphviz magic methods module
Add Graphviz magic methods module
Python
bsd-2-clause
pombredanne/pyeda,karissa/pyeda,cjdrake/pyeda,sschnug/pyeda,sschnug/pyeda,karissa/pyeda,cjdrake/pyeda,sschnug/pyeda,karissa/pyeda,pombredanne/pyeda,GtTmy/pyeda,cjdrake/pyeda,pombredanne/pyeda,GtTmy/pyeda,GtTmy/pyeda
Add Graphviz magic methods module
""" Graphviz IPython magic extensions Magic methods: %dot <dot graph> %%dot <dot ... ... graph> %dotstr "<dot graph>" %dotobj obj.to_dot() %dotobjs obj[0].to_dot(), obj[1].to_dot(), ... Usage: %load_ext gvmagic """ from subprocess import Popen, PIPE from IPython.core.display import disp...
<commit_before><commit_msg>Add Graphviz magic methods module<commit_after>
""" Graphviz IPython magic extensions Magic methods: %dot <dot graph> %%dot <dot ... ... graph> %dotstr "<dot graph>" %dotobj obj.to_dot() %dotobjs obj[0].to_dot(), obj[1].to_dot(), ... Usage: %load_ext gvmagic """ from subprocess import Popen, PIPE from IPython.core.display import disp...
Add Graphviz magic methods module""" Graphviz IPython magic extensions Magic methods: %dot <dot graph> %%dot <dot ... ... graph> %dotstr "<dot graph>" %dotobj obj.to_dot() %dotobjs obj[0].to_dot(), obj[1].to_dot(), ... Usage: %load_ext gvmagic """ from subprocess import Popen, PIPE from...
<commit_before><commit_msg>Add Graphviz magic methods module<commit_after>""" Graphviz IPython magic extensions Magic methods: %dot <dot graph> %%dot <dot ... ... graph> %dotstr "<dot graph>" %dotobj obj.to_dot() %dotobjs obj[0].to_dot(), obj[1].to_dot(), ... Usage: %load_ext gvmagic """ ...
37a42a6e344c0ff030353c13c6bf6a1717eefbaa
test/integration_tests/python/test_gears.py
test/integration_tests/python/test_gears.py
import json import logging log = logging.getLogger(__name__) sh = logging.StreamHandler() log.addHandler(sh) def test_gear_add(as_admin): r = as_admin.post('/gears/test-case-gear', json={ "category" : "converter", "gear" : { "inputs" : { "wat" : { "...
Add example test case in python
Add example test case in python
Python
mit
scitran/api,scitran/core,scitran/core,scitran/core,scitran/core,scitran/api
Add example test case in python
import json import logging log = logging.getLogger(__name__) sh = logging.StreamHandler() log.addHandler(sh) def test_gear_add(as_admin): r = as_admin.post('/gears/test-case-gear', json={ "category" : "converter", "gear" : { "inputs" : { "wat" : { "...
<commit_before><commit_msg>Add example test case in python<commit_after>
import json import logging log = logging.getLogger(__name__) sh = logging.StreamHandler() log.addHandler(sh) def test_gear_add(as_admin): r = as_admin.post('/gears/test-case-gear', json={ "category" : "converter", "gear" : { "inputs" : { "wat" : { "...
Add example test case in pythonimport json import logging log = logging.getLogger(__name__) sh = logging.StreamHandler() log.addHandler(sh) def test_gear_add(as_admin): r = as_admin.post('/gears/test-case-gear', json={ "category" : "converter", "gear" : { "inputs" : { ...
<commit_before><commit_msg>Add example test case in python<commit_after>import json import logging log = logging.getLogger(__name__) sh = logging.StreamHandler() log.addHandler(sh) def test_gear_add(as_admin): r = as_admin.post('/gears/test-case-gear', json={ "category" : "converter", "gear" : { ...
060ee041b6f7b0cf7748b11869665183f6656357
fluent_contents/plugins/markup/migrations/0002_fix_polymorphic_ctype.py
fluent_contents/plugins/markup/migrations/0002_fix_polymorphic_ctype.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import sys from django.db import models, migrations def _forwards(apps, schema_editor): """ Make sure that the MarkupItem model actually points to the correct proxy model, that implements the given language. """ # Need to work on the...
Make sure MarkupItem is stored under it's proxy class type ID
Make sure MarkupItem is stored under it's proxy class type ID This is needed for proper formset saving/retrieval, in combination with django-polymorphic 1.4-git
Python
apache-2.0
edoburu/django-fluent-contents,edoburu/django-fluent-contents,django-fluent/django-fluent-contents,edoburu/django-fluent-contents,django-fluent/django-fluent-contents,django-fluent/django-fluent-contents
Make sure MarkupItem is stored under it's proxy class type ID This is needed for proper formset saving/retrieval, in combination with django-polymorphic 1.4-git
# -*- coding: utf-8 -*- from __future__ import unicode_literals import sys from django.db import models, migrations def _forwards(apps, schema_editor): """ Make sure that the MarkupItem model actually points to the correct proxy model, that implements the given language. """ # Need to work on the...
<commit_before><commit_msg>Make sure MarkupItem is stored under it's proxy class type ID This is needed for proper formset saving/retrieval, in combination with django-polymorphic 1.4-git<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals import sys from django.db import models, migrations def _forwards(apps, schema_editor): """ Make sure that the MarkupItem model actually points to the correct proxy model, that implements the given language. """ # Need to work on the...
Make sure MarkupItem is stored under it's proxy class type ID This is needed for proper formset saving/retrieval, in combination with django-polymorphic 1.4-git# -*- coding: utf-8 -*- from __future__ import unicode_literals import sys from django.db import models, migrations def _forwards(apps, schema_editor): ...
<commit_before><commit_msg>Make sure MarkupItem is stored under it's proxy class type ID This is needed for proper formset saving/retrieval, in combination with django-polymorphic 1.4-git<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals import sys from django.db import models, migrations ...
1f4b525aa93421b890dde2181f02b4445683fd08
toolbox/stack_to_h5.py
toolbox/stack_to_h5.py
import vigra import argparse def convert_to_volume(options): data = vigra.impex.readVolume(options.input_file) print("Saving h5 volume of shape {}".format(data.shape)) vigra.writeHDF5(data, options.output_file, options.output_path) if __name__ == "__main__": parser = argparse.ArgumentParser(descriptio...
Add short script to create a raw hdf5 file from a tiff stack
Add short script to create a raw hdf5 file from a tiff stack
Python
mit
chaubold/hytra,chaubold/hytra,chaubold/hytra
Add short script to create a raw hdf5 file from a tiff stack
import vigra import argparse def convert_to_volume(options): data = vigra.impex.readVolume(options.input_file) print("Saving h5 volume of shape {}".format(data.shape)) vigra.writeHDF5(data, options.output_file, options.output_path) if __name__ == "__main__": parser = argparse.ArgumentParser(descriptio...
<commit_before><commit_msg>Add short script to create a raw hdf5 file from a tiff stack<commit_after>
import vigra import argparse def convert_to_volume(options): data = vigra.impex.readVolume(options.input_file) print("Saving h5 volume of shape {}".format(data.shape)) vigra.writeHDF5(data, options.output_file, options.output_path) if __name__ == "__main__": parser = argparse.ArgumentParser(descriptio...
Add short script to create a raw hdf5 file from a tiff stackimport vigra import argparse def convert_to_volume(options): data = vigra.impex.readVolume(options.input_file) print("Saving h5 volume of shape {}".format(data.shape)) vigra.writeHDF5(data, options.output_file, options.output_path) if __name__ ==...
<commit_before><commit_msg>Add short script to create a raw hdf5 file from a tiff stack<commit_after>import vigra import argparse def convert_to_volume(options): data = vigra.impex.readVolume(options.input_file) print("Saving h5 volume of shape {}".format(data.shape)) vigra.writeHDF5(data, options.output_f...
e30a19d1b72acec4587ddfe85096a6db43b8c7ff
tools/rebuild-index.py
tools/rebuild-index.py
# Rebuild asset indices # Usage: python3 rebuild-index.py in the project root import io import json import pathlib index = {} try: stream = open("assets/index.json") index = json.loads(stream.readall()) except Exception: pass # An index is a dictionary from filename to a structure: # "filename" : { "timestamp...
Add script to update index
Add script to update index
Python
agpl-3.0
nagakawa/x801,nagakawa/x801,nagakawa/x801,nagakawa/x801,nagakawa/x801
Add script to update index
# Rebuild asset indices # Usage: python3 rebuild-index.py in the project root import io import json import pathlib index = {} try: stream = open("assets/index.json") index = json.loads(stream.readall()) except Exception: pass # An index is a dictionary from filename to a structure: # "filename" : { "timestamp...
<commit_before><commit_msg>Add script to update index<commit_after>
# Rebuild asset indices # Usage: python3 rebuild-index.py in the project root import io import json import pathlib index = {} try: stream = open("assets/index.json") index = json.loads(stream.readall()) except Exception: pass # An index is a dictionary from filename to a structure: # "filename" : { "timestamp...
Add script to update index# Rebuild asset indices # Usage: python3 rebuild-index.py in the project root import io import json import pathlib index = {} try: stream = open("assets/index.json") index = json.loads(stream.readall()) except Exception: pass # An index is a dictionary from filename to a structure: #...
<commit_before><commit_msg>Add script to update index<commit_after># Rebuild asset indices # Usage: python3 rebuild-index.py in the project root import io import json import pathlib index = {} try: stream = open("assets/index.json") index = json.loads(stream.readall()) except Exception: pass # An index is a d...
72ee5d6949f25158b6cbd1deead45ee1e939be5b
sympy/series/__init__.py
sympy/series/__init__.py
"""A module that handles series: find a limit, order the series etc. """ from order import Order from limits import limit, Limit from gruntz import gruntz from series import series O = Order __all__ = [gruntz, limit, series, O, Order, Limit]
"""A module that handles series: find a limit, order the series etc. """ from order import Order from limits import limit, Limit from gruntz import gruntz from series import series O = Order __all__ = ['gruntz', 'limit', 'series', 'O', 'Order', 'Limit']
Fix __all__ usage for sympy/series
Fix __all__ usage for sympy/series
Python
bsd-3-clause
hargup/sympy,Arafatk/sympy,chaffra/sympy,kaushik94/sympy,atreyv/sympy,jbbskinny/sympy,aktech/sympy,AunShiLord/sympy,AkademieOlympia/sympy,beni55/sympy,jerli/sympy,vipulroxx/sympy,Titan-C/sympy,yukoba/sympy,minrk/sympy,Shaswat27/sympy,abloomston/sympy,yashsharan/sympy,shipci/sympy,drufat/sympy,jerli/sympy,toolforger/sym...
"""A module that handles series: find a limit, order the series etc. """ from order import Order from limits import limit, Limit from gruntz import gruntz from series import series O = Order __all__ = [gruntz, limit, series, O, Order, Limit] Fix __all__ usage for sympy/series
"""A module that handles series: find a limit, order the series etc. """ from order import Order from limits import limit, Limit from gruntz import gruntz from series import series O = Order __all__ = ['gruntz', 'limit', 'series', 'O', 'Order', 'Limit']
<commit_before>"""A module that handles series: find a limit, order the series etc. """ from order import Order from limits import limit, Limit from gruntz import gruntz from series import series O = Order __all__ = [gruntz, limit, series, O, Order, Limit] <commit_msg>Fix __all__ usage for sympy/series<commit_after>
"""A module that handles series: find a limit, order the series etc. """ from order import Order from limits import limit, Limit from gruntz import gruntz from series import series O = Order __all__ = ['gruntz', 'limit', 'series', 'O', 'Order', 'Limit']
"""A module that handles series: find a limit, order the series etc. """ from order import Order from limits import limit, Limit from gruntz import gruntz from series import series O = Order __all__ = [gruntz, limit, series, O, Order, Limit] Fix __all__ usage for sympy/series"""A module that handles series: find a li...
<commit_before>"""A module that handles series: find a limit, order the series etc. """ from order import Order from limits import limit, Limit from gruntz import gruntz from series import series O = Order __all__ = [gruntz, limit, series, O, Order, Limit] <commit_msg>Fix __all__ usage for sympy/series<commit_after>"...
3df9b3962dbade0175b2bdade04dd709fd69fef2
core/admin/migrations/versions/f1393877871d_.py
core/admin/migrations/versions/f1393877871d_.py
""" Add default columns to the configuration table Revision ID: f1393877871d Revises: 546b04c886f0 Create Date: 2018-12-09 16:15:42.317104 """ # revision identifiers, used by Alembic. revision = 'f1393877871d' down_revision = '546b04c886f0' from alembic import op import sqlalchemy as sa def upgrade(): with op...
Add default columns to the configuration table
Add default columns to the configuration table
Python
mit
kaiyou/freeposte.io,kaiyou/freeposte.io,kaiyou/freeposte.io,kaiyou/freeposte.io
Add default columns to the configuration table
""" Add default columns to the configuration table Revision ID: f1393877871d Revises: 546b04c886f0 Create Date: 2018-12-09 16:15:42.317104 """ # revision identifiers, used by Alembic. revision = 'f1393877871d' down_revision = '546b04c886f0' from alembic import op import sqlalchemy as sa def upgrade(): with op...
<commit_before><commit_msg>Add default columns to the configuration table<commit_after>
""" Add default columns to the configuration table Revision ID: f1393877871d Revises: 546b04c886f0 Create Date: 2018-12-09 16:15:42.317104 """ # revision identifiers, used by Alembic. revision = 'f1393877871d' down_revision = '546b04c886f0' from alembic import op import sqlalchemy as sa def upgrade(): with op...
Add default columns to the configuration table""" Add default columns to the configuration table Revision ID: f1393877871d Revises: 546b04c886f0 Create Date: 2018-12-09 16:15:42.317104 """ # revision identifiers, used by Alembic. revision = 'f1393877871d' down_revision = '546b04c886f0' from alembic import op import...
<commit_before><commit_msg>Add default columns to the configuration table<commit_after>""" Add default columns to the configuration table Revision ID: f1393877871d Revises: 546b04c886f0 Create Date: 2018-12-09 16:15:42.317104 """ # revision identifiers, used by Alembic. revision = 'f1393877871d' down_revision = '546...
5766e412c18d8b049a48b54e1244a735845055b1
scripts/migrate_addons.py
scripts/migrate_addons.py
import logging from nose.tools import * from tests.base import OsfTestCase from tests.factories import NodeFactory from website.app import init_app from website.project.model import Node logger = logging.getLogger(__name__) def main(): init_app() migrate_nodes() def migrate_addons(node): ret = False ...
Add migration for wiki and osffiles addons
Add migration for wiki and osffiles addons
Python
apache-2.0
himanshuo/osf.io,CenterForOpenScience/osf.io,caneruguz/osf.io,Ghalko/osf.io,laurenrevere/osf.io,monikagrabowska/osf.io,mattclark/osf.io,GageGaskins/osf.io,danielneis/osf.io,brianjgeiger/osf.io,kushG/osf.io,acshi/osf.io,himanshuo/osf.io,pattisdr/osf.io,njantrania/osf.io,baylee-d/osf.io,doublebits/osf.io,GageGaskins/osf....
Add migration for wiki and osffiles addons
import logging from nose.tools import * from tests.base import OsfTestCase from tests.factories import NodeFactory from website.app import init_app from website.project.model import Node logger = logging.getLogger(__name__) def main(): init_app() migrate_nodes() def migrate_addons(node): ret = False ...
<commit_before><commit_msg>Add migration for wiki and osffiles addons<commit_after>
import logging from nose.tools import * from tests.base import OsfTestCase from tests.factories import NodeFactory from website.app import init_app from website.project.model import Node logger = logging.getLogger(__name__) def main(): init_app() migrate_nodes() def migrate_addons(node): ret = False ...
Add migration for wiki and osffiles addonsimport logging from nose.tools import * from tests.base import OsfTestCase from tests.factories import NodeFactory from website.app import init_app from website.project.model import Node logger = logging.getLogger(__name__) def main(): init_app() migrate_nodes() ...
<commit_before><commit_msg>Add migration for wiki and osffiles addons<commit_after>import logging from nose.tools import * from tests.base import OsfTestCase from tests.factories import NodeFactory from website.app import init_app from website.project.model import Node logger = logging.getLogger(__name__) def mai...
8e285914db46c2acc67e455eb09100ed1d39b32e
rmq_utils/common.py
rmq_utils/common.py
from pyrabbit.api import Client from exceptions import InvalidUser def connect_to_management_api(host, user, password): client = Client(host, user, password) if not client.has_admin_rights: raise InvalidUser('User must have admin rights') return client
Connect to the management API
Connect to the management API
Python
mit
projectweekend/RMQ-Utils
Connect to the management API
from pyrabbit.api import Client from exceptions import InvalidUser def connect_to_management_api(host, user, password): client = Client(host, user, password) if not client.has_admin_rights: raise InvalidUser('User must have admin rights') return client
<commit_before><commit_msg>Connect to the management API<commit_after>
from pyrabbit.api import Client from exceptions import InvalidUser def connect_to_management_api(host, user, password): client = Client(host, user, password) if not client.has_admin_rights: raise InvalidUser('User must have admin rights') return client
Connect to the management APIfrom pyrabbit.api import Client from exceptions import InvalidUser def connect_to_management_api(host, user, password): client = Client(host, user, password) if not client.has_admin_rights: raise InvalidUser('User must have admin rights') return client
<commit_before><commit_msg>Connect to the management API<commit_after>from pyrabbit.api import Client from exceptions import InvalidUser def connect_to_management_api(host, user, password): client = Client(host, user, password) if not client.has_admin_rights: raise InvalidUser('User must have admin r...
bfa56bf9ee0e66d397652db0750a0c99c4437082
hevector.py
hevector.py
INNER_PRODUCT = '*' ADD = '+' def tupleToVec(t): if type(t) is int: return str(t) return '[%s]' % ' '.join(map(tupleToVec,t)) def vecToTuple(v): return tuple(map(int, v.strip('[]').split())) def send(ops): return '\n'.join(v if type(v) is str else tupleToVec(v) for v in ops) def recv(output): return tuple(vec...
Add initial python vector interface.
Add initial python vector interface.
Python
mit
jamespayor/vector-homomorphic-encryption,jamespayor/vector-homomorphic-encryption,jamespayor/vector-homomorphic-encryption
Add initial python vector interface.
INNER_PRODUCT = '*' ADD = '+' def tupleToVec(t): if type(t) is int: return str(t) return '[%s]' % ' '.join(map(tupleToVec,t)) def vecToTuple(v): return tuple(map(int, v.strip('[]').split())) def send(ops): return '\n'.join(v if type(v) is str else tupleToVec(v) for v in ops) def recv(output): return tuple(vec...
<commit_before><commit_msg>Add initial python vector interface.<commit_after>
INNER_PRODUCT = '*' ADD = '+' def tupleToVec(t): if type(t) is int: return str(t) return '[%s]' % ' '.join(map(tupleToVec,t)) def vecToTuple(v): return tuple(map(int, v.strip('[]').split())) def send(ops): return '\n'.join(v if type(v) is str else tupleToVec(v) for v in ops) def recv(output): return tuple(vec...
Add initial python vector interface. INNER_PRODUCT = '*' ADD = '+' def tupleToVec(t): if type(t) is int: return str(t) return '[%s]' % ' '.join(map(tupleToVec,t)) def vecToTuple(v): return tuple(map(int, v.strip('[]').split())) def send(ops): return '\n'.join(v if type(v) is str else tupleToVec(v) for v in ops) ...
<commit_before><commit_msg>Add initial python vector interface.<commit_after> INNER_PRODUCT = '*' ADD = '+' def tupleToVec(t): if type(t) is int: return str(t) return '[%s]' % ' '.join(map(tupleToVec,t)) def vecToTuple(v): return tuple(map(int, v.strip('[]').split())) def send(ops): return '\n'.join(v if type(v)...
138bb2b3e1188463d88edb176e26c1c2f633207d
entity_history/migrations/0003_update_triggers.py
entity_history/migrations/0003_update_triggers.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from entity_history.sql.triggers import EntityActivationTrigger, EntityRelationshipActivationTrigger def refresh_entity_activation_trigger(*args, **kwargs): EntityActivationTrigger().disable() EntityActiv...
Add a migration for updating the triggers
Add a migration for updating the triggers
Python
mit
ambitioninc/django-entity-history,jaredlewis/django-entity-history
Add a migration for updating the triggers
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from entity_history.sql.triggers import EntityActivationTrigger, EntityRelationshipActivationTrigger def refresh_entity_activation_trigger(*args, **kwargs): EntityActivationTrigger().disable() EntityActiv...
<commit_before><commit_msg>Add a migration for updating the triggers<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from entity_history.sql.triggers import EntityActivationTrigger, EntityRelationshipActivationTrigger def refresh_entity_activation_trigger(*args, **kwargs): EntityActivationTrigger().disable() EntityActiv...
Add a migration for updating the triggers# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from entity_history.sql.triggers import EntityActivationTrigger, EntityRelationshipActivationTrigger def refresh_entity_activation_trigger(*args, **kwargs): EntityActi...
<commit_before><commit_msg>Add a migration for updating the triggers<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from entity_history.sql.triggers import EntityActivationTrigger, EntityRelationshipActivationTrigger def refresh_entity_activation...
11ae4f118f00e053d882340eb2c031234fce60bd
lin_reg_gradient_desc.py
lin_reg_gradient_desc.py
# Implementing Gradient Descent using TensorFlow import numpy as np import tensorflow as tf from sklearn.datasets import fetch_california_housing from sklearn.preprocessing import StandardScaler # Get data housing = fetch_california_housing() m, n = housing.data.shape # Learning parameters n_epochs = 2500 learning_r...
Complete linear regression using TF
Complete linear regression using TF Linear regression using gradient descent
Python
mit
KT12/hands_on_machine_learning
Complete linear regression using TF Linear regression using gradient descent
# Implementing Gradient Descent using TensorFlow import numpy as np import tensorflow as tf from sklearn.datasets import fetch_california_housing from sklearn.preprocessing import StandardScaler # Get data housing = fetch_california_housing() m, n = housing.data.shape # Learning parameters n_epochs = 2500 learning_r...
<commit_before><commit_msg>Complete linear regression using TF Linear regression using gradient descent<commit_after>
# Implementing Gradient Descent using TensorFlow import numpy as np import tensorflow as tf from sklearn.datasets import fetch_california_housing from sklearn.preprocessing import StandardScaler # Get data housing = fetch_california_housing() m, n = housing.data.shape # Learning parameters n_epochs = 2500 learning_r...
Complete linear regression using TF Linear regression using gradient descent# Implementing Gradient Descent using TensorFlow import numpy as np import tensorflow as tf from sklearn.datasets import fetch_california_housing from sklearn.preprocessing import StandardScaler # Get data housing = fetch_california_housing(...
<commit_before><commit_msg>Complete linear regression using TF Linear regression using gradient descent<commit_after># Implementing Gradient Descent using TensorFlow import numpy as np import tensorflow as tf from sklearn.datasets import fetch_california_housing from sklearn.preprocessing import StandardScaler # Get...
9773aea7e75fd4eeed5ff9e539abe749f96bdfbf
migrations/versions/56fbf79e705_add_account_id_to_li.py
migrations/versions/56fbf79e705_add_account_id_to_li.py
"""Add account_id to list Revision ID: 56fbf79e705 Revises: 4d93f81e7c0 Create Date: 2013-09-07 16:54:04.163852 """ # revision identifiers, used by Alembic. revision = '56fbf79e705' down_revision = '4d93f81e7c0' from alembic import op import sqlalchemy as sa def upgrade(): # XXX(gmwils): Works if an account e...
Add lists to an account in data schema
Add lists to an account in data schema
Python
mit
gmwils/cihui
Add lists to an account in data schema
"""Add account_id to list Revision ID: 56fbf79e705 Revises: 4d93f81e7c0 Create Date: 2013-09-07 16:54:04.163852 """ # revision identifiers, used by Alembic. revision = '56fbf79e705' down_revision = '4d93f81e7c0' from alembic import op import sqlalchemy as sa def upgrade(): # XXX(gmwils): Works if an account e...
<commit_before><commit_msg>Add lists to an account in data schema<commit_after>
"""Add account_id to list Revision ID: 56fbf79e705 Revises: 4d93f81e7c0 Create Date: 2013-09-07 16:54:04.163852 """ # revision identifiers, used by Alembic. revision = '56fbf79e705' down_revision = '4d93f81e7c0' from alembic import op import sqlalchemy as sa def upgrade(): # XXX(gmwils): Works if an account e...
Add lists to an account in data schema"""Add account_id to list Revision ID: 56fbf79e705 Revises: 4d93f81e7c0 Create Date: 2013-09-07 16:54:04.163852 """ # revision identifiers, used by Alembic. revision = '56fbf79e705' down_revision = '4d93f81e7c0' from alembic import op import sqlalchemy as sa def upgrade(): ...
<commit_before><commit_msg>Add lists to an account in data schema<commit_after>"""Add account_id to list Revision ID: 56fbf79e705 Revises: 4d93f81e7c0 Create Date: 2013-09-07 16:54:04.163852 """ # revision identifiers, used by Alembic. revision = '56fbf79e705' down_revision = '4d93f81e7c0' from alembic import op im...
f24534ac03d77443e6dd3df37894c17f0999a03b
tests/simplehtmlparser.py
tests/simplehtmlparser.py
class SimpleHTMLParser(object): """ A simple HTML parser for testing. Not suitable for harsh cases, and the time efficiency is not considered. Examples: <tag key1="val1" key2>text</tag> <tag /> """ def __init__(self): pass def parse(self, content, parent=None): ...
Add a simple HTML parser for testing.
Add a simple HTML parser for testing. Signed-off-by: CyberZHG <[email protected]>
Python
agpl-3.0
fakepoet/markdown.py,fakepoet/markdown.py
Add a simple HTML parser for testing. Signed-off-by: CyberZHG <[email protected]>
class SimpleHTMLParser(object): """ A simple HTML parser for testing. Not suitable for harsh cases, and the time efficiency is not considered. Examples: <tag key1="val1" key2>text</tag> <tag /> """ def __init__(self): pass def parse(self, content, parent=None): ...
<commit_before><commit_msg>Add a simple HTML parser for testing. Signed-off-by: CyberZHG <[email protected]><commit_after>
class SimpleHTMLParser(object): """ A simple HTML parser for testing. Not suitable for harsh cases, and the time efficiency is not considered. Examples: <tag key1="val1" key2>text</tag> <tag /> """ def __init__(self): pass def parse(self, content, parent=None): ...
Add a simple HTML parser for testing. Signed-off-by: CyberZHG <[email protected]> class SimpleHTMLParser(object): """ A simple HTML parser for testing. Not suitable for harsh cases, and the time efficiency is not considered. Examples: <tag key1="val1" key2>te...
<commit_before><commit_msg>Add a simple HTML parser for testing. Signed-off-by: CyberZHG <[email protected]><commit_after> class SimpleHTMLParser(object): """ A simple HTML parser for testing. Not suitable for harsh cases, and the time efficiency is not considered. E...
bbe2f218fb738a32db9f12d308e729712146c18d
src/unittest/python/test_garbage_collection.py
src/unittest/python/test_garbage_collection.py
# coding=utf-8 # # fysom - pYthOn Finite State Machine - this is a port of Jake # Gordon's javascript-state-machine to python # https://github.com/jakesgordon/javascript-state-machine # # Copyright (C) 2011 Mansour Behabadi <[email protected]>, Jake Gordon # and o...
Add unit test for garbage collection
Add unit test for garbage collection
Python
mit
mriehl/fysom
Add unit test for garbage collection
# coding=utf-8 # # fysom - pYthOn Finite State Machine - this is a port of Jake # Gordon's javascript-state-machine to python # https://github.com/jakesgordon/javascript-state-machine # # Copyright (C) 2011 Mansour Behabadi <[email protected]>, Jake Gordon # and o...
<commit_before><commit_msg>Add unit test for garbage collection<commit_after>
# coding=utf-8 # # fysom - pYthOn Finite State Machine - this is a port of Jake # Gordon's javascript-state-machine to python # https://github.com/jakesgordon/javascript-state-machine # # Copyright (C) 2011 Mansour Behabadi <[email protected]>, Jake Gordon # and o...
Add unit test for garbage collection# coding=utf-8 # # fysom - pYthOn Finite State Machine - this is a port of Jake # Gordon's javascript-state-machine to python # https://github.com/jakesgordon/javascript-state-machine # # Copyright (C) 2011 Mansour Behabadi <[email protected]>, Jake Gordon # ...
<commit_before><commit_msg>Add unit test for garbage collection<commit_after># coding=utf-8 # # fysom - pYthOn Finite State Machine - this is a port of Jake # Gordon's javascript-state-machine to python # https://github.com/jakesgordon/javascript-state-machine # # Copyright (C) 2011 Mansour Behabadi <ma...
d407112debfadeba47742e157779c28d5dc82e0c
connect_to_postgres.py
connect_to_postgres.py
import os import psycopg2 import urlparse urlparse.uses_netloc.append("postgres") url = urlparse.urlparse(os.environ["DATABASE_URL"]) conn = psycopg2.connect( database=url.path[1:], user=url.username, password=url.password, host=url.hostname, port=url.port ) cur = conn.cursor() cur.execute("SE...
Write script to connect to postgres
Write script to connect to postgres
Python
mit
gsganden/pitcher-reports,gsganden/pitcher-reports
Write script to connect to postgres
import os import psycopg2 import urlparse urlparse.uses_netloc.append("postgres") url = urlparse.urlparse(os.environ["DATABASE_URL"]) conn = psycopg2.connect( database=url.path[1:], user=url.username, password=url.password, host=url.hostname, port=url.port ) cur = conn.cursor() cur.execute("SE...
<commit_before><commit_msg>Write script to connect to postgres<commit_after>
import os import psycopg2 import urlparse urlparse.uses_netloc.append("postgres") url = urlparse.urlparse(os.environ["DATABASE_URL"]) conn = psycopg2.connect( database=url.path[1:], user=url.username, password=url.password, host=url.hostname, port=url.port ) cur = conn.cursor() cur.execute("SE...
Write script to connect to postgresimport os import psycopg2 import urlparse urlparse.uses_netloc.append("postgres") url = urlparse.urlparse(os.environ["DATABASE_URL"]) conn = psycopg2.connect( database=url.path[1:], user=url.username, password=url.password, host=url.hostname, port=url.port ) c...
<commit_before><commit_msg>Write script to connect to postgres<commit_after>import os import psycopg2 import urlparse urlparse.uses_netloc.append("postgres") url = urlparse.urlparse(os.environ["DATABASE_URL"]) conn = psycopg2.connect( database=url.path[1:], user=url.username, password=url.password, ho...
59fa12f76b564d020196043431cd0551129fb834
localore/home/migrations/0014_auto_20160328_1654.py
localore/home/migrations/0014_auto_20160328_1654.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('home', '0013_auto_20160328_1515'), ] operations = [ migrations.AlterField( mode...
Add missed migration for ddf77b1
Add missed migration for ddf77b1
Python
mpl-2.0
ghostwords/localore,ghostwords/localore,ghostwords/localore
Add missed migration for ddf77b1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('home', '0013_auto_20160328_1515'), ] operations = [ migrations.AlterField( mode...
<commit_before><commit_msg>Add missed migration for ddf77b1<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('home', '0013_auto_20160328_1515'), ] operations = [ migrations.AlterField( mode...
Add missed migration for ddf77b1# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('home', '0013_auto_20160328_1515'), ] operations = [ migrati...
<commit_before><commit_msg>Add missed migration for ddf77b1<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('home', '0013_auto_20160328_1515'), ...
4c0c2289ee8deeb6ea7f8bb76db886329e7ae1b3
zinnia/migrations/0002_subtitle_and_caption.py
zinnia/migrations/0002_subtitle_and_caption.py
from django.db import models from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('zinnia', '0001_initial'), ] operations = [ migrations.AddField( model_name='entry', name='caption', field=models.TextField( ...
Add migration for adding subtitle and caption fields
Add migration for adding subtitle and caption fields
Python
bsd-3-clause
Maplecroft/django-blog-zinnia,extertioner/django-blog-zinnia,marctc/django-blog-zinnia,aorzh/django-blog-zinnia,Maplecroft/django-blog-zinnia,ZuluPro/django-blog-zinnia,ghachey/django-blog-zinnia,dapeng0802/django-blog-zinnia,bywbilly/django-blog-zinnia,aorzh/django-blog-zinnia,Zopieux/django-blog-zinnia,petecummings/d...
Add migration for adding subtitle and caption fields
from django.db import models from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('zinnia', '0001_initial'), ] operations = [ migrations.AddField( model_name='entry', name='caption', field=models.TextField( ...
<commit_before><commit_msg>Add migration for adding subtitle and caption fields<commit_after>
from django.db import models from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('zinnia', '0001_initial'), ] operations = [ migrations.AddField( model_name='entry', name='caption', field=models.TextField( ...
Add migration for adding subtitle and caption fieldsfrom django.db import models from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('zinnia', '0001_initial'), ] operations = [ migrations.AddField( model_name='entry', name='ca...
<commit_before><commit_msg>Add migration for adding subtitle and caption fields<commit_after>from django.db import models from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('zinnia', '0001_initial'), ] operations = [ migrations.AddField( ...
692bf6df15410ac1d5deac81081526d6c2aa27ae
aggregate_if.py
aggregate_if.py
# coding: utf-8 ''' Implements conditional aggregates. This code was based on the work of others found on the internet: 1. http://web.archive.org/web/20101115170804/http://www.voteruniverse.com/Members/jlantz/blog/conditional-aggregates-in-django 2. https://code.djangoproject.com/ticket/11305 3. https://groups.google...
Add aggregate-if source with support to Sum
Add aggregate-if source with support to Sum
Python
mit
henriquebastos/django-aggregate-if
Add aggregate-if source with support to Sum
# coding: utf-8 ''' Implements conditional aggregates. This code was based on the work of others found on the internet: 1. http://web.archive.org/web/20101115170804/http://www.voteruniverse.com/Members/jlantz/blog/conditional-aggregates-in-django 2. https://code.djangoproject.com/ticket/11305 3. https://groups.google...
<commit_before><commit_msg>Add aggregate-if source with support to Sum<commit_after>
# coding: utf-8 ''' Implements conditional aggregates. This code was based on the work of others found on the internet: 1. http://web.archive.org/web/20101115170804/http://www.voteruniverse.com/Members/jlantz/blog/conditional-aggregates-in-django 2. https://code.djangoproject.com/ticket/11305 3. https://groups.google...
Add aggregate-if source with support to Sum# coding: utf-8 ''' Implements conditional aggregates. This code was based on the work of others found on the internet: 1. http://web.archive.org/web/20101115170804/http://www.voteruniverse.com/Members/jlantz/blog/conditional-aggregates-in-django 2. https://code.djangoprojec...
<commit_before><commit_msg>Add aggregate-if source with support to Sum<commit_after># coding: utf-8 ''' Implements conditional aggregates. This code was based on the work of others found on the internet: 1. http://web.archive.org/web/20101115170804/http://www.voteruniverse.com/Members/jlantz/blog/conditional-aggregat...
73e5df0b277b25bdbe88acd31518106615e02cb4
indra/sources/eidos/make_eidos_ontology.py
indra/sources/eidos/make_eidos_ontology.py
import yaml import requests from os.path import join, dirname, abspath from rdflib import Graph, Namespace, Literal eidos_ont_url = 'https://raw.githubusercontent.com/clulab/eidos/master/' + \ 'src/main/resources/org/clulab/wm/eidos/toy_ontology.yml' eidos_ns = Namespace('http://github.com/clulab/eido...
Add script to make RDF Eidos ontology
Add script to make RDF Eidos ontology
Python
bsd-2-clause
bgyori/indra,johnbachman/indra,sorgerlab/indra,pvtodorov/indra,sorgerlab/belpy,johnbachman/indra,sorgerlab/indra,johnbachman/indra,pvtodorov/indra,johnbachman/belpy,sorgerlab/indra,sorgerlab/belpy,pvtodorov/indra,johnbachman/belpy,pvtodorov/indra,bgyori/indra,johnbachman/belpy,sorgerlab/belpy,bgyori/indra
Add script to make RDF Eidos ontology
import yaml import requests from os.path import join, dirname, abspath from rdflib import Graph, Namespace, Literal eidos_ont_url = 'https://raw.githubusercontent.com/clulab/eidos/master/' + \ 'src/main/resources/org/clulab/wm/eidos/toy_ontology.yml' eidos_ns = Namespace('http://github.com/clulab/eido...
<commit_before><commit_msg>Add script to make RDF Eidos ontology<commit_after>
import yaml import requests from os.path import join, dirname, abspath from rdflib import Graph, Namespace, Literal eidos_ont_url = 'https://raw.githubusercontent.com/clulab/eidos/master/' + \ 'src/main/resources/org/clulab/wm/eidos/toy_ontology.yml' eidos_ns = Namespace('http://github.com/clulab/eido...
Add script to make RDF Eidos ontologyimport yaml import requests from os.path import join, dirname, abspath from rdflib import Graph, Namespace, Literal eidos_ont_url = 'https://raw.githubusercontent.com/clulab/eidos/master/' + \ 'src/main/resources/org/clulab/wm/eidos/toy_ontology.yml' eidos_ns = Nam...
<commit_before><commit_msg>Add script to make RDF Eidos ontology<commit_after>import yaml import requests from os.path import join, dirname, abspath from rdflib import Graph, Namespace, Literal eidos_ont_url = 'https://raw.githubusercontent.com/clulab/eidos/master/' + \ 'src/main/resources/org/clulab/w...
793b1ad0dade4afcdb8ef4a3bc81c53fd1a47f6d
tests/test_pypi.py
tests/test_pypi.py
from tests.helper import ExternalVersionTestCase class PyPITest(ExternalVersionTestCase): def test_pypi(self): self.assertEqual(self.sync_get_version("example", {"pypi": None}), "0.1.0")
Add a testcase for PyPI
Add a testcase for PyPI
Python
mit
lilydjwg/nvchecker
Add a testcase for PyPI
from tests.helper import ExternalVersionTestCase class PyPITest(ExternalVersionTestCase): def test_pypi(self): self.assertEqual(self.sync_get_version("example", {"pypi": None}), "0.1.0")
<commit_before><commit_msg>Add a testcase for PyPI<commit_after>
from tests.helper import ExternalVersionTestCase class PyPITest(ExternalVersionTestCase): def test_pypi(self): self.assertEqual(self.sync_get_version("example", {"pypi": None}), "0.1.0")
Add a testcase for PyPIfrom tests.helper import ExternalVersionTestCase class PyPITest(ExternalVersionTestCase): def test_pypi(self): self.assertEqual(self.sync_get_version("example", {"pypi": None}), "0.1.0")
<commit_before><commit_msg>Add a testcase for PyPI<commit_after>from tests.helper import ExternalVersionTestCase class PyPITest(ExternalVersionTestCase): def test_pypi(self): self.assertEqual(self.sync_get_version("example", {"pypi": None}), "0.1.0")
60c9874bcd085f808ddc676bbe019bbed91900cd
tests/test_util.py
tests/test_util.py
"""Tests for util submodule.""" from pathlib import Path import requests import xdg from mccurse import util def test_cache_use_default(): """Use cache dir when no dir specified?""" INPUT = None EXPECT = Path(xdg.BaseDirectory.save_cache_path(util.RESOURCE_NAME)) assert util.default_cache_dir(IN...
Add tests for util submodule
Add tests for util submodule
Python
agpl-3.0
khardix/mccurse
Add tests for util submodule
"""Tests for util submodule.""" from pathlib import Path import requests import xdg from mccurse import util def test_cache_use_default(): """Use cache dir when no dir specified?""" INPUT = None EXPECT = Path(xdg.BaseDirectory.save_cache_path(util.RESOURCE_NAME)) assert util.default_cache_dir(IN...
<commit_before><commit_msg>Add tests for util submodule<commit_after>
"""Tests for util submodule.""" from pathlib import Path import requests import xdg from mccurse import util def test_cache_use_default(): """Use cache dir when no dir specified?""" INPUT = None EXPECT = Path(xdg.BaseDirectory.save_cache_path(util.RESOURCE_NAME)) assert util.default_cache_dir(IN...
Add tests for util submodule"""Tests for util submodule.""" from pathlib import Path import requests import xdg from mccurse import util def test_cache_use_default(): """Use cache dir when no dir specified?""" INPUT = None EXPECT = Path(xdg.BaseDirectory.save_cache_path(util.RESOURCE_NAME)) asse...
<commit_before><commit_msg>Add tests for util submodule<commit_after>"""Tests for util submodule.""" from pathlib import Path import requests import xdg from mccurse import util def test_cache_use_default(): """Use cache dir when no dir specified?""" INPUT = None EXPECT = Path(xdg.BaseDirectory.save_...
3d82021cca499ecaee8f66e563d366268d0422e2
lemur/migrations/versions/4fe230f7a26e_.py
lemur/migrations/versions/4fe230f7a26e_.py
"""Add 'ports' column to certificate_associations table Revision ID: 4fe230f7a26e Revises: c301c59688d2 Create Date: 2021-05-07 10:57:16.964743 """ # revision identifiers, used by Alembic. revision = '4fe230f7a26e' down_revision = 'c301c59688d2' import sqlalchemy as sa from alembic import op from sqlalchemy.dialect...
Add ports column to certificate_associations - alembic migration only
Add ports column to certificate_associations - alembic migration only
Python
apache-2.0
Netflix/lemur,Netflix/lemur,Netflix/lemur,Netflix/lemur
Add ports column to certificate_associations - alembic migration only
"""Add 'ports' column to certificate_associations table Revision ID: 4fe230f7a26e Revises: c301c59688d2 Create Date: 2021-05-07 10:57:16.964743 """ # revision identifiers, used by Alembic. revision = '4fe230f7a26e' down_revision = 'c301c59688d2' import sqlalchemy as sa from alembic import op from sqlalchemy.dialect...
<commit_before><commit_msg>Add ports column to certificate_associations - alembic migration only<commit_after>
"""Add 'ports' column to certificate_associations table Revision ID: 4fe230f7a26e Revises: c301c59688d2 Create Date: 2021-05-07 10:57:16.964743 """ # revision identifiers, used by Alembic. revision = '4fe230f7a26e' down_revision = 'c301c59688d2' import sqlalchemy as sa from alembic import op from sqlalchemy.dialect...
Add ports column to certificate_associations - alembic migration only"""Add 'ports' column to certificate_associations table Revision ID: 4fe230f7a26e Revises: c301c59688d2 Create Date: 2021-05-07 10:57:16.964743 """ # revision identifiers, used by Alembic. revision = '4fe230f7a26e' down_revision = 'c301c59688d2' i...
<commit_before><commit_msg>Add ports column to certificate_associations - alembic migration only<commit_after>"""Add 'ports' column to certificate_associations table Revision ID: 4fe230f7a26e Revises: c301c59688d2 Create Date: 2021-05-07 10:57:16.964743 """ # revision identifiers, used by Alembic. revision = '4fe230...
430726e060f1d033f233f59f2c956ec6dd09b49f
Scripts/mode2-parser.py
Scripts/mode2-parser.py
#!/usr/bin/env python # -*- encoding:utf8 -*- from __future__ import print_function import argparse class Parser(object): @classmethod def parse(cls, target_file): print("Target file : %r" % target_file) if target_file is None or len(target_file) == 0: return with open(...
Add mode2 raw code parser script.
Add mode2 raw code parser script.
Python
mit
supistar/PiAirRemote,supistar/PiAirRemote
Add mode2 raw code parser script.
#!/usr/bin/env python # -*- encoding:utf8 -*- from __future__ import print_function import argparse class Parser(object): @classmethod def parse(cls, target_file): print("Target file : %r" % target_file) if target_file is None or len(target_file) == 0: return with open(...
<commit_before><commit_msg>Add mode2 raw code parser script.<commit_after>
#!/usr/bin/env python # -*- encoding:utf8 -*- from __future__ import print_function import argparse class Parser(object): @classmethod def parse(cls, target_file): print("Target file : %r" % target_file) if target_file is None or len(target_file) == 0: return with open(...
Add mode2 raw code parser script.#!/usr/bin/env python # -*- encoding:utf8 -*- from __future__ import print_function import argparse class Parser(object): @classmethod def parse(cls, target_file): print("Target file : %r" % target_file) if target_file is None or len(target_file) == 0: ...
<commit_before><commit_msg>Add mode2 raw code parser script.<commit_after>#!/usr/bin/env python # -*- encoding:utf8 -*- from __future__ import print_function import argparse class Parser(object): @classmethod def parse(cls, target_file): print("Target file : %r" % target_file) if target_fil...
0f6ff08896604e662c0912b0e8548e4c7f37c4e8
depends.py
depends.py
#!/usr/bin/env python """depends.py - print package dependencies Usage: python depends.py [-h | --help] """ from __future__ import print_function import os import subprocess import sys def depends(home, pkgpath): os.chdir(os.path.join(home, 'usr', 'pkgsrc')) os.chdir(pkgpath) p = subprocess.Popen( ...
Add a script to determine package dependencies.
Add a script to determine package dependencies.
Python
isc
eliteraspberries/minipkg,eliteraspberries/minipkg
Add a script to determine package dependencies.
#!/usr/bin/env python """depends.py - print package dependencies Usage: python depends.py [-h | --help] """ from __future__ import print_function import os import subprocess import sys def depends(home, pkgpath): os.chdir(os.path.join(home, 'usr', 'pkgsrc')) os.chdir(pkgpath) p = subprocess.Popen( ...
<commit_before><commit_msg>Add a script to determine package dependencies.<commit_after>
#!/usr/bin/env python """depends.py - print package dependencies Usage: python depends.py [-h | --help] """ from __future__ import print_function import os import subprocess import sys def depends(home, pkgpath): os.chdir(os.path.join(home, 'usr', 'pkgsrc')) os.chdir(pkgpath) p = subprocess.Popen( ...
Add a script to determine package dependencies.#!/usr/bin/env python """depends.py - print package dependencies Usage: python depends.py [-h | --help] """ from __future__ import print_function import os import subprocess import sys def depends(home, pkgpath): os.chdir(os.path.join(home, 'usr', 'pkgsrc')) ...
<commit_before><commit_msg>Add a script to determine package dependencies.<commit_after>#!/usr/bin/env python """depends.py - print package dependencies Usage: python depends.py [-h | --help] """ from __future__ import print_function import os import subprocess import sys def depends(home, pkgpath): os.chdir...
2c0581c79bacf48f0408f55f1d44668d746d0ae6
analysis_bistability.py
analysis_bistability.py
""" Analyse the distribution of peak distances to make appear the bistability. To be used for two glomeruli simulations. """ import tables import matplotlib.pyplot as plt import analysis import h5manager as hm def histogram_peaks(simulation): dists = get_peak_dists(simulation) plt.figure() plt.hist(di...
Add script to plot histogram of peak distances
Add script to plot histogram of peak distances Useful to see if any bistability occurs.
Python
mit
neuro-lyon/multiglom-model,neuro-lyon/multiglom-model
Add script to plot histogram of peak distances Useful to see if any bistability occurs.
""" Analyse the distribution of peak distances to make appear the bistability. To be used for two glomeruli simulations. """ import tables import matplotlib.pyplot as plt import analysis import h5manager as hm def histogram_peaks(simulation): dists = get_peak_dists(simulation) plt.figure() plt.hist(di...
<commit_before><commit_msg>Add script to plot histogram of peak distances Useful to see if any bistability occurs.<commit_after>
""" Analyse the distribution of peak distances to make appear the bistability. To be used for two glomeruli simulations. """ import tables import matplotlib.pyplot as plt import analysis import h5manager as hm def histogram_peaks(simulation): dists = get_peak_dists(simulation) plt.figure() plt.hist(di...
Add script to plot histogram of peak distances Useful to see if any bistability occurs.""" Analyse the distribution of peak distances to make appear the bistability. To be used for two glomeruli simulations. """ import tables import matplotlib.pyplot as plt import analysis import h5manager as hm def histogram_pe...
<commit_before><commit_msg>Add script to plot histogram of peak distances Useful to see if any bistability occurs.<commit_after>""" Analyse the distribution of peak distances to make appear the bistability. To be used for two glomeruli simulations. """ import tables import matplotlib.pyplot as plt import analysis ...
066555c0e6c5bfc11925ce9f60de11141e9a0d0e
runner/fix_hdf5_file_format.py
runner/fix_hdf5_file_format.py
#!/usr/bin/env python # # Fix HDF5 files and add mandatory attributes for support PyTables file format # import h5py import sys # open HDF5 file hdf5_filename = sys.argv[1] hdf5_file = h5py.File(hdf5_filename, 'a') # add mandatory attributes for a file hdf5_file['/'].attrs['CLASS'] = 'GROUP' hdf5_file['/'].attrs['...
Add mandatory attributes to support PyTables HDF5 file format.
Add mandatory attributes to support PyTables HDF5 file format.
Python
mit
lo100/MyRaspiHome,lo100/MyRaspiHome
Add mandatory attributes to support PyTables HDF5 file format.
#!/usr/bin/env python # # Fix HDF5 files and add mandatory attributes for support PyTables file format # import h5py import sys # open HDF5 file hdf5_filename = sys.argv[1] hdf5_file = h5py.File(hdf5_filename, 'a') # add mandatory attributes for a file hdf5_file['/'].attrs['CLASS'] = 'GROUP' hdf5_file['/'].attrs['...
<commit_before><commit_msg>Add mandatory attributes to support PyTables HDF5 file format.<commit_after>
#!/usr/bin/env python # # Fix HDF5 files and add mandatory attributes for support PyTables file format # import h5py import sys # open HDF5 file hdf5_filename = sys.argv[1] hdf5_file = h5py.File(hdf5_filename, 'a') # add mandatory attributes for a file hdf5_file['/'].attrs['CLASS'] = 'GROUP' hdf5_file['/'].attrs['...
Add mandatory attributes to support PyTables HDF5 file format.#!/usr/bin/env python # # Fix HDF5 files and add mandatory attributes for support PyTables file format # import h5py import sys # open HDF5 file hdf5_filename = sys.argv[1] hdf5_file = h5py.File(hdf5_filename, 'a') # add mandatory attributes for a file ...
<commit_before><commit_msg>Add mandatory attributes to support PyTables HDF5 file format.<commit_after>#!/usr/bin/env python # # Fix HDF5 files and add mandatory attributes for support PyTables file format # import h5py import sys # open HDF5 file hdf5_filename = sys.argv[1] hdf5_file = h5py.File(hdf5_filename, 'a'...
63f47104feec03cd529b80c654a2aa80e3e7d524
tests/cpydiff/builtin_next_arg2.py
tests/cpydiff/builtin_next_arg2.py
""" categories: Modules,builtins description: Second argument to next() is not implemented cause: MicroPython is optimised for code space. workaround: Instead of `val = next(it, deflt)` use:: try: val = next(it) except StopIteration: val = deflt """ print(next(iter(range(0)), 42))
Add difference-test for second arg of builtin next().
tests/cpydiff: Add difference-test for second arg of builtin next().
Python
mit
MrSurly/micropython,blazewicz/micropython,torwag/micropython,dmazzella/micropython,MrSurly/micropython,torwag/micropython,pfalcon/micropython,swegener/micropython,ryannathans/micropython,MrSurly/micropython,blazewicz/micropython,infinnovation/micropython,trezor/micropython,pfalcon/micropython,adafruit/circuitpython,bve...
tests/cpydiff: Add difference-test for second arg of builtin next().
""" categories: Modules,builtins description: Second argument to next() is not implemented cause: MicroPython is optimised for code space. workaround: Instead of `val = next(it, deflt)` use:: try: val = next(it) except StopIteration: val = deflt """ print(next(iter(range(0)), 42))
<commit_before><commit_msg>tests/cpydiff: Add difference-test for second arg of builtin next().<commit_after>
""" categories: Modules,builtins description: Second argument to next() is not implemented cause: MicroPython is optimised for code space. workaround: Instead of `val = next(it, deflt)` use:: try: val = next(it) except StopIteration: val = deflt """ print(next(iter(range(0)), 42))
tests/cpydiff: Add difference-test for second arg of builtin next().""" categories: Modules,builtins description: Second argument to next() is not implemented cause: MicroPython is optimised for code space. workaround: Instead of `val = next(it, deflt)` use:: try: val = next(it) except StopIteration: ...
<commit_before><commit_msg>tests/cpydiff: Add difference-test for second arg of builtin next().<commit_after>""" categories: Modules,builtins description: Second argument to next() is not implemented cause: MicroPython is optimised for code space. workaround: Instead of `val = next(it, deflt)` use:: try: v...
f06d2da6784dbc742cbe304ed1b078702a61c961
tests/app/soc/modules/gci/views/test_age_check.py
tests/app/soc/modules/gci/views/test_age_check.py
#!/usr/bin/env python2.5 # # Copyright 2011 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
Add basic test case for the age check view.
Add basic test case for the age check view. Only check if the page can actually be rendered, need more info on how to deal with cookies and user authentication inside tests to expand this.
Python
apache-2.0
rhyolight/nupic.son,rhyolight/nupic.son,rhyolight/nupic.son
Add basic test case for the age check view. Only check if the page can actually be rendered, need more info on how to deal with cookies and user authentication inside tests to expand this.
#!/usr/bin/env python2.5 # # Copyright 2011 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
<commit_before><commit_msg>Add basic test case for the age check view. Only check if the page can actually be rendered, need more info on how to deal with cookies and user authentication inside tests to expand this.<commit_after>
#!/usr/bin/env python2.5 # # Copyright 2011 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
Add basic test case for the age check view. Only check if the page can actually be rendered, need more info on how to deal with cookies and user authentication inside tests to expand this.#!/usr/bin/env python2.5 # # Copyright 2011 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License")...
<commit_before><commit_msg>Add basic test case for the age check view. Only check if the page can actually be rendered, need more info on how to deal with cookies and user authentication inside tests to expand this.<commit_after>#!/usr/bin/env python2.5 # # Copyright 2011 the Melange authors. # # Licensed under the Ap...
5072478d2c89d5235aff20f8ccb365ab9ec2e297
experiments/python/gtk_drawing_area_pixels.py
experiments/python/gtk_drawing_area_pixels.py
__author__ = 'Joel Wright' import pygtk pygtk.require('2.0') import gtk import math import cairo import struct class DrawingAreaExample(gtk.Window): def __init__(self): super(DrawingAreaExample, self).__init__() self.set_title("Drawing Area Example") self.resize(300,400) self.set_...
Add experiment getting pixel values from gtk DrawingArea
Add experiment getting pixel values from gtk DrawingArea
Python
mit
joel-wright/DDRPi,fraz3alpha/DDRPi,fraz3alpha/led-disco-dancefloor
Add experiment getting pixel values from gtk DrawingArea
__author__ = 'Joel Wright' import pygtk pygtk.require('2.0') import gtk import math import cairo import struct class DrawingAreaExample(gtk.Window): def __init__(self): super(DrawingAreaExample, self).__init__() self.set_title("Drawing Area Example") self.resize(300,400) self.set_...
<commit_before><commit_msg>Add experiment getting pixel values from gtk DrawingArea<commit_after>
__author__ = 'Joel Wright' import pygtk pygtk.require('2.0') import gtk import math import cairo import struct class DrawingAreaExample(gtk.Window): def __init__(self): super(DrawingAreaExample, self).__init__() self.set_title("Drawing Area Example") self.resize(300,400) self.set_...
Add experiment getting pixel values from gtk DrawingArea__author__ = 'Joel Wright' import pygtk pygtk.require('2.0') import gtk import math import cairo import struct class DrawingAreaExample(gtk.Window): def __init__(self): super(DrawingAreaExample, self).__init__() self.set_title("Drawing Area ...
<commit_before><commit_msg>Add experiment getting pixel values from gtk DrawingArea<commit_after>__author__ = 'Joel Wright' import pygtk pygtk.require('2.0') import gtk import math import cairo import struct class DrawingAreaExample(gtk.Window): def __init__(self): super(DrawingAreaExample, self).__init__...
f76ccddca4864b2f2faf8dfadefa6ac15c930043
examples/tour_examples/driverjs_maps_tour.py
examples/tour_examples/driverjs_maps_tour.py
from seleniumbase import BaseCase class MyTestClass(BaseCase): def test_basic(self): self.open("https://www.google.com/maps/@42.3598616,-71.0912631,15z") self.wait_for_element("#searchboxinput") self.wait_for_element("#minimap") self.wait_for_element("#zoom") # Create a w...
Add an example tour for DriverJS
Add an example tour for DriverJS
Python
mit
seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase
Add an example tour for DriverJS
from seleniumbase import BaseCase class MyTestClass(BaseCase): def test_basic(self): self.open("https://www.google.com/maps/@42.3598616,-71.0912631,15z") self.wait_for_element("#searchboxinput") self.wait_for_element("#minimap") self.wait_for_element("#zoom") # Create a w...
<commit_before><commit_msg>Add an example tour for DriverJS<commit_after>
from seleniumbase import BaseCase class MyTestClass(BaseCase): def test_basic(self): self.open("https://www.google.com/maps/@42.3598616,-71.0912631,15z") self.wait_for_element("#searchboxinput") self.wait_for_element("#minimap") self.wait_for_element("#zoom") # Create a w...
Add an example tour for DriverJSfrom seleniumbase import BaseCase class MyTestClass(BaseCase): def test_basic(self): self.open("https://www.google.com/maps/@42.3598616,-71.0912631,15z") self.wait_for_element("#searchboxinput") self.wait_for_element("#minimap") self.wait_for_elemen...
<commit_before><commit_msg>Add an example tour for DriverJS<commit_after>from seleniumbase import BaseCase class MyTestClass(BaseCase): def test_basic(self): self.open("https://www.google.com/maps/@42.3598616,-71.0912631,15z") self.wait_for_element("#searchboxinput") self.wait_for_element...
b90af30b23015d2fbe93f401a87176c6441e5c0d
altair/examples/wheat_wages.py
altair/examples/wheat_wages.py
""" Wheat and Wages --------------- A recreation of William Playfair's classic chart visualizing the price of wheat, the wages of a mechanic, and the reigning British monarch. """ # category: case studies import altair as alt from vega_datasets import data base_wheat = alt.Chart(data.wheat.url).transform_calculate( ...
Add William Playfair Wheat and Wages example
ENH: Add William Playfair Wheat and Wages example
Python
bsd-3-clause
altair-viz/altair,jakevdp/altair
ENH: Add William Playfair Wheat and Wages example
""" Wheat and Wages --------------- A recreation of William Playfair's classic chart visualizing the price of wheat, the wages of a mechanic, and the reigning British monarch. """ # category: case studies import altair as alt from vega_datasets import data base_wheat = alt.Chart(data.wheat.url).transform_calculate( ...
<commit_before><commit_msg>ENH: Add William Playfair Wheat and Wages example<commit_after>
""" Wheat and Wages --------------- A recreation of William Playfair's classic chart visualizing the price of wheat, the wages of a mechanic, and the reigning British monarch. """ # category: case studies import altair as alt from vega_datasets import data base_wheat = alt.Chart(data.wheat.url).transform_calculate( ...
ENH: Add William Playfair Wheat and Wages example""" Wheat and Wages --------------- A recreation of William Playfair's classic chart visualizing the price of wheat, the wages of a mechanic, and the reigning British monarch. """ # category: case studies import altair as alt from vega_datasets import data base_wheat =...
<commit_before><commit_msg>ENH: Add William Playfair Wheat and Wages example<commit_after>""" Wheat and Wages --------------- A recreation of William Playfair's classic chart visualizing the price of wheat, the wages of a mechanic, and the reigning British monarch. """ # category: case studies import altair as alt from...
8e8c1b326c71ad1e2810bc806d443bf3e9e0a8ed
csunplugged/utils/errors/TextBoxDrawerErrors.py
csunplugged/utils/errors/TextBoxDrawerErrors.py
class TextBoxDrawerError(Exception): pass class MissingSVGFile(TextBoxDrawerError): pass class TextBoxNotFoundInSVG(TextBoxDrawerError): pass class MissingSVGViewBox(TextBoxDrawerError): pass
Add custom exceptions for TextBoxDrawer
Add custom exceptions for TextBoxDrawer This is a skeleton for now, with docstrings etc. to follow
Python
mit
uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged
Add custom exceptions for TextBoxDrawer This is a skeleton for now, with docstrings etc. to follow
class TextBoxDrawerError(Exception): pass class MissingSVGFile(TextBoxDrawerError): pass class TextBoxNotFoundInSVG(TextBoxDrawerError): pass class MissingSVGViewBox(TextBoxDrawerError): pass
<commit_before><commit_msg>Add custom exceptions for TextBoxDrawer This is a skeleton for now, with docstrings etc. to follow<commit_after>
class TextBoxDrawerError(Exception): pass class MissingSVGFile(TextBoxDrawerError): pass class TextBoxNotFoundInSVG(TextBoxDrawerError): pass class MissingSVGViewBox(TextBoxDrawerError): pass
Add custom exceptions for TextBoxDrawer This is a skeleton for now, with docstrings etc. to followclass TextBoxDrawerError(Exception): pass class MissingSVGFile(TextBoxDrawerError): pass class TextBoxNotFoundInSVG(TextBoxDrawerError): pass class MissingSVGViewBox(TextBoxDrawerError): pass
<commit_before><commit_msg>Add custom exceptions for TextBoxDrawer This is a skeleton for now, with docstrings etc. to follow<commit_after>class TextBoxDrawerError(Exception): pass class MissingSVGFile(TextBoxDrawerError): pass class TextBoxNotFoundInSVG(TextBoxDrawerError): pass class MissingSVGViewBox...
97fe29ff36438fb2e39b24d518bccada54371d6f
extra/vwtags.py
extra/vwtags.py
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import sys import re if len(sys.argv) < 3: exit() syntax = sys.argv[1] filename = sys.argv[2] rx_default_media = r"^\s*(={1,6})([^=].*[^=])\1\s*$" rx_markdown = r"^\s*(#{1,6})([^#].*)$" if syntax in ("default", "media"): ...
Add script to generate tags, taken from vimwiki/utils
Add script to generate tags, taken from vimwiki/utils
Python
mit
phha/taskwiki,Spirotot/taskwiki
Add script to generate tags, taken from vimwiki/utils
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import sys import re if len(sys.argv) < 3: exit() syntax = sys.argv[1] filename = sys.argv[2] rx_default_media = r"^\s*(={1,6})([^=].*[^=])\1\s*$" rx_markdown = r"^\s*(#{1,6})([^#].*)$" if syntax in ("default", "media"): ...
<commit_before><commit_msg>Add script to generate tags, taken from vimwiki/utils<commit_after>
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import sys import re if len(sys.argv) < 3: exit() syntax = sys.argv[1] filename = sys.argv[2] rx_default_media = r"^\s*(={1,6})([^=].*[^=])\1\s*$" rx_markdown = r"^\s*(#{1,6})([^#].*)$" if syntax in ("default", "media"): ...
Add script to generate tags, taken from vimwiki/utils#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import sys import re if len(sys.argv) < 3: exit() syntax = sys.argv[1] filename = sys.argv[2] rx_default_media = r"^\s*(={1,6})([^=].*[^=])\1\s*$" rx_markdown = r"^\s*(#{1,6...
<commit_before><commit_msg>Add script to generate tags, taken from vimwiki/utils<commit_after>#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import sys import re if len(sys.argv) < 3: exit() syntax = sys.argv[1] filename = sys.argv[2] rx_default_media = r"^\s*(={1,6})([^=]...
6b7ae3c74708a3ed666e76e6ba779be7423a022d
myhdl/test/conversion/numeric/test_numass.py
myhdl/test/conversion/numeric/test_numass.py
from __future__ import absolute_import, print_function from random import randrange from myhdl import Signal, uintba, sintba, instance, delay, conversion def NumassBench(): p = Signal(uintba(1, 8)) q = Signal(uintba(1, 40)) r = Signal(sintba(1, 9)) s = Signal(sintba(1, 41)) PBIGINT = randrange(2...
Revert "Revert "Added the number assignment test for numeric.""
Revert "Revert "Added the number assignment test for numeric."" This reverts commit acbd86165ea6c5cd566928292c095ae570aa00ce.
Python
lgpl-2.1
jmgc/myhdl-numeric,jmgc/myhdl-numeric,jmgc/myhdl-numeric
Revert "Revert "Added the number assignment test for numeric."" This reverts commit acbd86165ea6c5cd566928292c095ae570aa00ce.
from __future__ import absolute_import, print_function from random import randrange from myhdl import Signal, uintba, sintba, instance, delay, conversion def NumassBench(): p = Signal(uintba(1, 8)) q = Signal(uintba(1, 40)) r = Signal(sintba(1, 9)) s = Signal(sintba(1, 41)) PBIGINT = randrange(2...
<commit_before><commit_msg>Revert "Revert "Added the number assignment test for numeric."" This reverts commit acbd86165ea6c5cd566928292c095ae570aa00ce.<commit_after>
from __future__ import absolute_import, print_function from random import randrange from myhdl import Signal, uintba, sintba, instance, delay, conversion def NumassBench(): p = Signal(uintba(1, 8)) q = Signal(uintba(1, 40)) r = Signal(sintba(1, 9)) s = Signal(sintba(1, 41)) PBIGINT = randrange(2...
Revert "Revert "Added the number assignment test for numeric."" This reverts commit acbd86165ea6c5cd566928292c095ae570aa00ce.from __future__ import absolute_import, print_function from random import randrange from myhdl import Signal, uintba, sintba, instance, delay, conversion def NumassBench(): p = Signal(ui...
<commit_before><commit_msg>Revert "Revert "Added the number assignment test for numeric."" This reverts commit acbd86165ea6c5cd566928292c095ae570aa00ce.<commit_after>from __future__ import absolute_import, print_function from random import randrange from myhdl import Signal, uintba, sintba, instance, delay, conversi...
ee907d14ab905ca347807d8787c9146cd28f6d7d
dit/algorithms/tests/test_lattice.py
dit/algorithms/tests/test_lattice.py
from nose.tools import * from dit.algorithms.lattice import sigma_algebra_sort def test_sigalg_sort(): sigalg = frozenset([ frozenset([]), frozenset([1]), frozenset([2]), frozenset([1,2]) ]) sigalg_ = [(), (1,), (2,), (1,2)] assert_equal( sigalg_, sigma_algebra_sort(sigalg) )
Add a test for sorting sigma-algebras.
Add a test for sorting sigma-algebras.
Python
bsd-3-clause
Autoplectic/dit,dit/dit,Autoplectic/dit,Autoplectic/dit,dit/dit,dit/dit,chebee7i/dit,Autoplectic/dit,chebee7i/dit,chebee7i/dit,Autoplectic/dit,dit/dit,dit/dit,chebee7i/dit
Add a test for sorting sigma-algebras.
from nose.tools import * from dit.algorithms.lattice import sigma_algebra_sort def test_sigalg_sort(): sigalg = frozenset([ frozenset([]), frozenset([1]), frozenset([2]), frozenset([1,2]) ]) sigalg_ = [(), (1,), (2,), (1,2)] assert_equal( sigalg_, sigma_algebra_sort(sigalg) )
<commit_before><commit_msg>Add a test for sorting sigma-algebras.<commit_after>
from nose.tools import * from dit.algorithms.lattice import sigma_algebra_sort def test_sigalg_sort(): sigalg = frozenset([ frozenset([]), frozenset([1]), frozenset([2]), frozenset([1,2]) ]) sigalg_ = [(), (1,), (2,), (1,2)] assert_equal( sigalg_, sigma_algebra_sort(sigalg) )
Add a test for sorting sigma-algebras. from nose.tools import * from dit.algorithms.lattice import sigma_algebra_sort def test_sigalg_sort(): sigalg = frozenset([ frozenset([]), frozenset([1]), frozenset([2]), frozenset([1,2]) ]) sigalg_ = [(), (1,), (2,), (1,2)] assert_equal( sigalg_, sigma_algebra_sort(...
<commit_before><commit_msg>Add a test for sorting sigma-algebras.<commit_after> from nose.tools import * from dit.algorithms.lattice import sigma_algebra_sort def test_sigalg_sort(): sigalg = frozenset([ frozenset([]), frozenset([1]), frozenset([2]), frozenset([1,2]) ]) sigalg_ = [(), (1,), (2,), (1,2)] a...
ea7bbb23d8818fbc3c06467e500e6b9f9be85c84
dash/orgs/migrations/0026_fix_org_config_rapidpro.py
dash/orgs/migrations/0026_fix_org_config_rapidpro.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-27 12:04 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): def fix_org_config_rapidpro(apps, schema_editor): Org = apps.get_model("orgs", "Org") orgs = Org.objects.all()...
Add migrations to clean up org config
Add migrations to clean up org config
Python
bsd-3-clause
rapidpro/dash,rapidpro/dash
Add migrations to clean up org config
# -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-27 12:04 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): def fix_org_config_rapidpro(apps, schema_editor): Org = apps.get_model("orgs", "Org") orgs = Org.objects.all()...
<commit_before><commit_msg>Add migrations to clean up org config<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-27 12:04 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): def fix_org_config_rapidpro(apps, schema_editor): Org = apps.get_model("orgs", "Org") orgs = Org.objects.all()...
Add migrations to clean up org config# -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-27 12:04 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): def fix_org_config_rapidpro(apps, schema_editor): Org = apps.get_model("orgs", "O...
<commit_before><commit_msg>Add migrations to clean up org config<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11.12 on 2018-04-27 12:04 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): def fix_org_config_rapidpro(apps, schema_editor)...
f2fb791df5023a39c82561ceb79b92b0b584e5af
scripts/fetch_data.py
scripts/fetch_data.py
import json import requests import dataset def fetch_builds_data(jenkins_url): '''Get json data of all Jenkins builds JENKINS_URL/api/json? tree=jobs[name,builds[number,result,duration,builtOn,id,timestamp,fullDisplayName]] Return builds_data dictionary with following schema:: [ { ...
Add script to fetch builds from Jenkins
Add script to fetch builds from Jenkins - uses dataset library to store data in sqlite database, - supports fetching data from Jenkins via JSON API or from file.
Python
mit
bookwar/jenkins-report,bookwar/jenkins-report
Add script to fetch builds from Jenkins - uses dataset library to store data in sqlite database, - supports fetching data from Jenkins via JSON API or from file.
import json import requests import dataset def fetch_builds_data(jenkins_url): '''Get json data of all Jenkins builds JENKINS_URL/api/json? tree=jobs[name,builds[number,result,duration,builtOn,id,timestamp,fullDisplayName]] Return builds_data dictionary with following schema:: [ { ...
<commit_before><commit_msg>Add script to fetch builds from Jenkins - uses dataset library to store data in sqlite database, - supports fetching data from Jenkins via JSON API or from file.<commit_after>
import json import requests import dataset def fetch_builds_data(jenkins_url): '''Get json data of all Jenkins builds JENKINS_URL/api/json? tree=jobs[name,builds[number,result,duration,builtOn,id,timestamp,fullDisplayName]] Return builds_data dictionary with following schema:: [ { ...
Add script to fetch builds from Jenkins - uses dataset library to store data in sqlite database, - supports fetching data from Jenkins via JSON API or from file.import json import requests import dataset def fetch_builds_data(jenkins_url): '''Get json data of all Jenkins builds JENKINS_URL/api/json? t...
<commit_before><commit_msg>Add script to fetch builds from Jenkins - uses dataset library to store data in sqlite database, - supports fetching data from Jenkins via JSON API or from file.<commit_after>import json import requests import dataset def fetch_builds_data(jenkins_url): '''Get json data of all Jenkins ...
632f29f25e2e639ba3d41e0c12443a7e208cfd9c
web/ext/debug/__init__.py
web/ext/debug/__init__.py
# encoding: utf-8 """Interactive tracebacks for WebCore.""" class DebuggingExtension(object): provides = ['debug'] last = True def __init__(self): """Executed to configure the extension.""" super(DebuggingExtension, self).__init__() def __call__(self, context, app): """Executed to wrap the applicat...
Debug extension plan is once again an interactive debugger.
Debug extension plan is once again an interactive debugger.
Python
mit
marrow/WebCore,marrow/WebCore
Debug extension plan is once again an interactive debugger.
# encoding: utf-8 """Interactive tracebacks for WebCore.""" class DebuggingExtension(object): provides = ['debug'] last = True def __init__(self): """Executed to configure the extension.""" super(DebuggingExtension, self).__init__() def __call__(self, context, app): """Executed to wrap the applicat...
<commit_before><commit_msg>Debug extension plan is once again an interactive debugger.<commit_after>
# encoding: utf-8 """Interactive tracebacks for WebCore.""" class DebuggingExtension(object): provides = ['debug'] last = True def __init__(self): """Executed to configure the extension.""" super(DebuggingExtension, self).__init__() def __call__(self, context, app): """Executed to wrap the applicat...
Debug extension plan is once again an interactive debugger.# encoding: utf-8 """Interactive tracebacks for WebCore.""" class DebuggingExtension(object): provides = ['debug'] last = True def __init__(self): """Executed to configure the extension.""" super(DebuggingExtension, self).__init__() def __cal...
<commit_before><commit_msg>Debug extension plan is once again an interactive debugger.<commit_after># encoding: utf-8 """Interactive tracebacks for WebCore.""" class DebuggingExtension(object): provides = ['debug'] last = True def __init__(self): """Executed to configure the extension.""" super(Debuggin...
82574e953dcb2ff3bd47b7ae1a70d956a06633de
examples/demo/basic/scatter_alpha.py
examples/demo/basic/scatter_alpha.py
""" Scatter plot with panning and zooming Shows a scatter plot of a set of random points, with basic Chaco panning and zooming. Interacting with the plot: - Left-mouse-drag pans the plot. - Mouse wheel up and down zooms the plot in and out. - Pressing "z" brings up the Zoom Box, and you can click-drag a rectan...
Add example which demonstrates issue (works in this branch, fails otherwise).
Add example which demonstrates issue (works in this branch, fails otherwise).
Python
bsd-3-clause
tommy-u/chaco,tommy-u/chaco,tommy-u/chaco
Add example which demonstrates issue (works in this branch, fails otherwise).
""" Scatter plot with panning and zooming Shows a scatter plot of a set of random points, with basic Chaco panning and zooming. Interacting with the plot: - Left-mouse-drag pans the plot. - Mouse wheel up and down zooms the plot in and out. - Pressing "z" brings up the Zoom Box, and you can click-drag a rectan...
<commit_before><commit_msg>Add example which demonstrates issue (works in this branch, fails otherwise).<commit_after>
""" Scatter plot with panning and zooming Shows a scatter plot of a set of random points, with basic Chaco panning and zooming. Interacting with the plot: - Left-mouse-drag pans the plot. - Mouse wheel up and down zooms the plot in and out. - Pressing "z" brings up the Zoom Box, and you can click-drag a rectan...
Add example which demonstrates issue (works in this branch, fails otherwise).""" Scatter plot with panning and zooming Shows a scatter plot of a set of random points, with basic Chaco panning and zooming. Interacting with the plot: - Left-mouse-drag pans the plot. - Mouse wheel up and down zooms the plot in and ...
<commit_before><commit_msg>Add example which demonstrates issue (works in this branch, fails otherwise).<commit_after>""" Scatter plot with panning and zooming Shows a scatter plot of a set of random points, with basic Chaco panning and zooming. Interacting with the plot: - Left-mouse-drag pans the plot. - Mouse...
3ab8796bef7900a8f8799d85cecbd37c7db259db
ghnames.py
ghnames.py
# Run this script with `python ghnames.py` until it is correct then # run `python ghnames.py >> _config.yml` to add it its output to the # end of our _config.yml. All students will be added as site authors. # In Python """ starts a string that can span multiple lines # Add student github names here. names = """""" ...
Add student author names script
Add student author names script
Python
mit
silshack/summer2017,silshack/summer2017,silshack/summer2017,silshack/summer2017,silshack/summer2017
Add student author names script
# Run this script with `python ghnames.py` until it is correct then # run `python ghnames.py >> _config.yml` to add it its output to the # end of our _config.yml. All students will be added as site authors. # In Python """ starts a string that can span multiple lines # Add student github names here. names = """""" ...
<commit_before><commit_msg>Add student author names script<commit_after>
# Run this script with `python ghnames.py` until it is correct then # run `python ghnames.py >> _config.yml` to add it its output to the # end of our _config.yml. All students will be added as site authors. # In Python """ starts a string that can span multiple lines # Add student github names here. names = """""" ...
Add student author names script# Run this script with `python ghnames.py` until it is correct then # run `python ghnames.py >> _config.yml` to add it its output to the # end of our _config.yml. All students will be added as site authors. # In Python """ starts a string that can span multiple lines # Add student githu...
<commit_before><commit_msg>Add student author names script<commit_after># Run this script with `python ghnames.py` until it is correct then # run `python ghnames.py >> _config.yml` to add it its output to the # end of our _config.yml. All students will be added as site authors. # In Python """ starts a string that ca...
e90d0c585dde96a780dbd1f4109d03dba651b9c2
extension/test/server/right/system_tests_preferred_masters.py
extension/test/server/right/system_tests_preferred_masters.py
""" This file is part of Arakoon, a distributed key-value store. Copyright (C) 2010 Incubaid BVBA Licensees holding a valid Incubaid license may use this file in accordance with Incubaid's Arakoon commercial license agreement. For more information on how to enter into this agreement, please contact Incubaid (contact d...
Add first test for 'preferred_masters'
Tests: Add first test for 'preferred_masters' This commit adds a first test for 'preferred_masters', by copying the existing 'system_tests_preferred' test, and changing it slightly to use 'preferredMasters' instead of 'forceMaster' with 'preferred=True'. See: 98d74321f5d7c2f54d5faaba85f379b2a572c35c See: d8a6072cbaf5...
Python
apache-2.0
openvstorage/arakoon,openvstorage/arakoon,Incubaid/arakoon,Incubaid/arakoon,Incubaid/arakoon,openvstorage/arakoon
Tests: Add first test for 'preferred_masters' This commit adds a first test for 'preferred_masters', by copying the existing 'system_tests_preferred' test, and changing it slightly to use 'preferredMasters' instead of 'forceMaster' with 'preferred=True'. See: 98d74321f5d7c2f54d5faaba85f379b2a572c35c See: d8a6072cbaf5...
""" This file is part of Arakoon, a distributed key-value store. Copyright (C) 2010 Incubaid BVBA Licensees holding a valid Incubaid license may use this file in accordance with Incubaid's Arakoon commercial license agreement. For more information on how to enter into this agreement, please contact Incubaid (contact d...
<commit_before><commit_msg>Tests: Add first test for 'preferred_masters' This commit adds a first test for 'preferred_masters', by copying the existing 'system_tests_preferred' test, and changing it slightly to use 'preferredMasters' instead of 'forceMaster' with 'preferred=True'. See: 98d74321f5d7c2f54d5faaba85f379b...
""" This file is part of Arakoon, a distributed key-value store. Copyright (C) 2010 Incubaid BVBA Licensees holding a valid Incubaid license may use this file in accordance with Incubaid's Arakoon commercial license agreement. For more information on how to enter into this agreement, please contact Incubaid (contact d...
Tests: Add first test for 'preferred_masters' This commit adds a first test for 'preferred_masters', by copying the existing 'system_tests_preferred' test, and changing it slightly to use 'preferredMasters' instead of 'forceMaster' with 'preferred=True'. See: 98d74321f5d7c2f54d5faaba85f379b2a572c35c See: d8a6072cbaf5...
<commit_before><commit_msg>Tests: Add first test for 'preferred_masters' This commit adds a first test for 'preferred_masters', by copying the existing 'system_tests_preferred' test, and changing it slightly to use 'preferredMasters' instead of 'forceMaster' with 'preferred=True'. See: 98d74321f5d7c2f54d5faaba85f379b...
953278ec93184bad7586b69aa55ef1f087419edd
Orange/widgets/visualize/tests/test_owboxplot.py
Orange/widgets/visualize/tests/test_owboxplot.py
# Test methods with long descriptive names can omit docstrings # pylint: disable=missing-docstring from unittest import skip import numpy as np from Orange.data import Table, ContinuousVariable from Orange.widgets.visualize.owboxplot import OWBoxPlot from Orange.widgets.tests.base import WidgetTest class TestOWBoxPl...
Fix crash with missing values
OWBoxPlot: Fix crash with missing values
Python
bsd-2-clause
cheral/orange3,cheral/orange3,cheral/orange3,cheral/orange3,cheral/orange3,cheral/orange3
OWBoxPlot: Fix crash with missing values
# Test methods with long descriptive names can omit docstrings # pylint: disable=missing-docstring from unittest import skip import numpy as np from Orange.data import Table, ContinuousVariable from Orange.widgets.visualize.owboxplot import OWBoxPlot from Orange.widgets.tests.base import WidgetTest class TestOWBoxPl...
<commit_before><commit_msg>OWBoxPlot: Fix crash with missing values<commit_after>
# Test methods with long descriptive names can omit docstrings # pylint: disable=missing-docstring from unittest import skip import numpy as np from Orange.data import Table, ContinuousVariable from Orange.widgets.visualize.owboxplot import OWBoxPlot from Orange.widgets.tests.base import WidgetTest class TestOWBoxPl...
OWBoxPlot: Fix crash with missing values# Test methods with long descriptive names can omit docstrings # pylint: disable=missing-docstring from unittest import skip import numpy as np from Orange.data import Table, ContinuousVariable from Orange.widgets.visualize.owboxplot import OWBoxPlot from Orange.widgets.tests.ba...
<commit_before><commit_msg>OWBoxPlot: Fix crash with missing values<commit_after># Test methods with long descriptive names can omit docstrings # pylint: disable=missing-docstring from unittest import skip import numpy as np from Orange.data import Table, ContinuousVariable from Orange.widgets.visualize.owboxplot impo...
3ea6f9f96606d267c98b89f8ab3853eaa026bad8
haas_rest_test/plugins/tests/test_test_parameters.py
haas_rest_test/plugins/tests/test_test_parameters.py
# -*- coding: utf-8 -*- # Copyright (c) 2014 Simon Jagoe # All rights reserved. # # This software may be modified and distributed under the terms # of the 3-clause BSD license. See the LICENSE.txt file for details. from __future__ import absolute_import, unicode_literals from haas.testing import unittest from haas_r...
Add test for method plugin
Add test for method plugin
Python
bsd-3-clause
sjagoe/usagi
Add test for method plugin
# -*- coding: utf-8 -*- # Copyright (c) 2014 Simon Jagoe # All rights reserved. # # This software may be modified and distributed under the terms # of the 3-clause BSD license. See the LICENSE.txt file for details. from __future__ import absolute_import, unicode_literals from haas.testing import unittest from haas_r...
<commit_before><commit_msg>Add test for method plugin<commit_after>
# -*- coding: utf-8 -*- # Copyright (c) 2014 Simon Jagoe # All rights reserved. # # This software may be modified and distributed under the terms # of the 3-clause BSD license. See the LICENSE.txt file for details. from __future__ import absolute_import, unicode_literals from haas.testing import unittest from haas_r...
Add test for method plugin# -*- coding: utf-8 -*- # Copyright (c) 2014 Simon Jagoe # All rights reserved. # # This software may be modified and distributed under the terms # of the 3-clause BSD license. See the LICENSE.txt file for details. from __future__ import absolute_import, unicode_literals from haas.testing im...
<commit_before><commit_msg>Add test for method plugin<commit_after># -*- coding: utf-8 -*- # Copyright (c) 2014 Simon Jagoe # All rights reserved. # # This software may be modified and distributed under the terms # of the 3-clause BSD license. See the LICENSE.txt file for details. from __future__ import absolute_impor...
37d90e01e52fbb627f93d0dd2eb0ace3df6131b4
andalusian/migrations/0005_auto_20190709_1132.py
andalusian/migrations/0005_auto_20190709_1132.py
# Generated by Django 2.1.7 on 2019-07-09 09:32 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('andalusian', '0006_auto_20190709_1045'), ] operations = [ migrations.RemoveField( model_name='instr...
Add migrations file for adding andausian instruments
Add migrations file for adding andausian instruments
Python
agpl-3.0
MTG/dunya,MTG/dunya,MTG/dunya,MTG/dunya
Add migrations file for adding andausian instruments
# Generated by Django 2.1.7 on 2019-07-09 09:32 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('andalusian', '0006_auto_20190709_1045'), ] operations = [ migrations.RemoveField( model_name='instr...
<commit_before><commit_msg>Add migrations file for adding andausian instruments<commit_after>
# Generated by Django 2.1.7 on 2019-07-09 09:32 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('andalusian', '0006_auto_20190709_1045'), ] operations = [ migrations.RemoveField( model_name='instr...
Add migrations file for adding andausian instruments# Generated by Django 2.1.7 on 2019-07-09 09:32 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('andalusian', '0006_auto_20190709_1045'), ] operations = [ m...
<commit_before><commit_msg>Add migrations file for adding andausian instruments<commit_after># Generated by Django 2.1.7 on 2019-07-09 09:32 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('andalusian', '0006_auto_20190709_10...
51187fd8c39a1a05aade20c416084e5b69973176
tests/test_curtailment.py
tests/test_curtailment.py
""" This "test" runs curtailment for different curtailment requirements and methods `voltage-based` and `feedin-proportional`. It requires a ding0 grid called ding0_grid_example.pkl in the same directory. """ import pandas as pd import numpy as np from edisgo import EDisGo def get_generator_feedins(edisgo_grid): ...
Test script for running curtailment
Test script for running curtailment
Python
agpl-3.0
openego/eDisGo,openego/eDisGo
Test script for running curtailment
""" This "test" runs curtailment for different curtailment requirements and methods `voltage-based` and `feedin-proportional`. It requires a ding0 grid called ding0_grid_example.pkl in the same directory. """ import pandas as pd import numpy as np from edisgo import EDisGo def get_generator_feedins(edisgo_grid): ...
<commit_before><commit_msg>Test script for running curtailment<commit_after>
""" This "test" runs curtailment for different curtailment requirements and methods `voltage-based` and `feedin-proportional`. It requires a ding0 grid called ding0_grid_example.pkl in the same directory. """ import pandas as pd import numpy as np from edisgo import EDisGo def get_generator_feedins(edisgo_grid): ...
Test script for running curtailment""" This "test" runs curtailment for different curtailment requirements and methods `voltage-based` and `feedin-proportional`. It requires a ding0 grid called ding0_grid_example.pkl in the same directory. """ import pandas as pd import numpy as np from edisgo import EDisGo def get...
<commit_before><commit_msg>Test script for running curtailment<commit_after>""" This "test" runs curtailment for different curtailment requirements and methods `voltage-based` and `feedin-proportional`. It requires a ding0 grid called ding0_grid_example.pkl in the same directory. """ import pandas as pd import numpy a...
197fb886cba673b385189809a1a90032032f5c26
keras/legacy/models.py
keras/legacy/models.py
from .layers import Merge def needs_legacy_support(model): return isinstance(model.layers[0], Merge) def legacy_sequential_layers(model): layers = [] if model.layers: if isinstance(model.layers[0], Merge): merge = model.layers[0] for layer in merge.layers: ...
Add missing legacy support file.
Add missing legacy support file.
Python
apache-2.0
keras-team/keras,keras-team/keras
Add missing legacy support file.
from .layers import Merge def needs_legacy_support(model): return isinstance(model.layers[0], Merge) def legacy_sequential_layers(model): layers = [] if model.layers: if isinstance(model.layers[0], Merge): merge = model.layers[0] for layer in merge.layers: ...
<commit_before><commit_msg>Add missing legacy support file.<commit_after>
from .layers import Merge def needs_legacy_support(model): return isinstance(model.layers[0], Merge) def legacy_sequential_layers(model): layers = [] if model.layers: if isinstance(model.layers[0], Merge): merge = model.layers[0] for layer in merge.layers: ...
Add missing legacy support file.from .layers import Merge def needs_legacy_support(model): return isinstance(model.layers[0], Merge) def legacy_sequential_layers(model): layers = [] if model.layers: if isinstance(model.layers[0], Merge): merge = model.layers[0] for layer ...
<commit_before><commit_msg>Add missing legacy support file.<commit_after>from .layers import Merge def needs_legacy_support(model): return isinstance(model.layers[0], Merge) def legacy_sequential_layers(model): layers = [] if model.layers: if isinstance(model.layers[0], Merge): merge...
324f9ca2728614567d038a0ad3c7354655099b59
tests/test_connect_cells.py
tests/test_connect_cells.py
""" This unit test tests the cells connected in series or parallel """ import unittest import numpy as np from pypvcell.solarcell import ResistorCell, SeriesConnect, ParallelConnect class SPTestCase(unittest.TestCase): def setUp(self): self.r1 = 1.0 self.r2 = 2.0 self.r1cell = ResistorC...
Add unit test of SeriesConnect() and ParallelConnect()
Add unit test of SeriesConnect() and ParallelConnect()
Python
apache-2.0
kanhua/pypvcell
Add unit test of SeriesConnect() and ParallelConnect()
""" This unit test tests the cells connected in series or parallel """ import unittest import numpy as np from pypvcell.solarcell import ResistorCell, SeriesConnect, ParallelConnect class SPTestCase(unittest.TestCase): def setUp(self): self.r1 = 1.0 self.r2 = 2.0 self.r1cell = ResistorC...
<commit_before><commit_msg>Add unit test of SeriesConnect() and ParallelConnect()<commit_after>
""" This unit test tests the cells connected in series or parallel """ import unittest import numpy as np from pypvcell.solarcell import ResistorCell, SeriesConnect, ParallelConnect class SPTestCase(unittest.TestCase): def setUp(self): self.r1 = 1.0 self.r2 = 2.0 self.r1cell = ResistorC...
Add unit test of SeriesConnect() and ParallelConnect()""" This unit test tests the cells connected in series or parallel """ import unittest import numpy as np from pypvcell.solarcell import ResistorCell, SeriesConnect, ParallelConnect class SPTestCase(unittest.TestCase): def setUp(self): self.r1 = 1.0...
<commit_before><commit_msg>Add unit test of SeriesConnect() and ParallelConnect()<commit_after>""" This unit test tests the cells connected in series or parallel """ import unittest import numpy as np from pypvcell.solarcell import ResistorCell, SeriesConnect, ParallelConnect class SPTestCase(unittest.TestCase): ...
5b3835b3ed49833d3792e50ef54f23cd50c1b907
oedb_datamodels/versions/b4e662a73272_nullable_message.py
oedb_datamodels/versions/b4e662a73272_nullable_message.py
"""Make message nullable Revision ID: b4e662a73272 Revises: 1a73867b1e79 Create Date: 2019-04-30 09:04:34.330485 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'b4e662a73272' down_revision = '1a73867b1e79' branch_labels = None depends_on = None def upgrade()...
Add migration for nullable messages
Add migration for nullable messages
Python
agpl-3.0
openego/oeplatform,openego/oeplatform,openego/oeplatform,openego/oeplatform
Add migration for nullable messages
"""Make message nullable Revision ID: b4e662a73272 Revises: 1a73867b1e79 Create Date: 2019-04-30 09:04:34.330485 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'b4e662a73272' down_revision = '1a73867b1e79' branch_labels = None depends_on = None def upgrade()...
<commit_before><commit_msg>Add migration for nullable messages<commit_after>
"""Make message nullable Revision ID: b4e662a73272 Revises: 1a73867b1e79 Create Date: 2019-04-30 09:04:34.330485 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'b4e662a73272' down_revision = '1a73867b1e79' branch_labels = None depends_on = None def upgrade()...
Add migration for nullable messages"""Make message nullable Revision ID: b4e662a73272 Revises: 1a73867b1e79 Create Date: 2019-04-30 09:04:34.330485 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'b4e662a73272' down_revision = '1a73867b1e79' branch_labels = Non...
<commit_before><commit_msg>Add migration for nullable messages<commit_after>"""Make message nullable Revision ID: b4e662a73272 Revises: 1a73867b1e79 Create Date: 2019-04-30 09:04:34.330485 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'b4e662a73272' down_revi...
5a1f481a57d356d8995ccce9ad29cd6e83765b10
scripts/tag_manylinux.py
scripts/tag_manylinux.py
from auditwheel.wheeltools import InWheelCtx, add_platforms import click import os @click.command() @click.argument('wheel', type=click.Path(exists=True)) def main(wheel): dir = os.path.dirname(os.path.abspath(wheel)) with InWheelCtx(wheel) as ctx: try: new_wheel = add_platforms(ctx, ['manylinux1_x86_6...
Add script to fix up wheel tag to manylinux
Add script to fix up wheel tag to manylinux We use this instead of auditwheel directly because we have taken care of the RPATH and auditwheel get confused. Signed-off-by: Chris Harris <[email protected]>
Python
bsd-3-clause
ghutchis/avogadrolibs,OpenChemistry/avogadrolibs,OpenChemistry/avogadrolibs,ghutchis/avogadrolibs,ghutchis/avogadrolibs,ghutchis/avogadrolibs,OpenChemistry/avogadrolibs,ghutchis/avogadrolibs,OpenChemistry/avogadrolibs,OpenChemistry/avogadrolibs
Add script to fix up wheel tag to manylinux We use this instead of auditwheel directly because we have taken care of the RPATH and auditwheel get confused. Signed-off-by: Chris Harris <[email protected]>
from auditwheel.wheeltools import InWheelCtx, add_platforms import click import os @click.command() @click.argument('wheel', type=click.Path(exists=True)) def main(wheel): dir = os.path.dirname(os.path.abspath(wheel)) with InWheelCtx(wheel) as ctx: try: new_wheel = add_platforms(ctx, ['manylinux1_x86_6...
<commit_before><commit_msg>Add script to fix up wheel tag to manylinux We use this instead of auditwheel directly because we have taken care of the RPATH and auditwheel get confused. Signed-off-by: Chris Harris <[email protected]><commit_after>
from auditwheel.wheeltools import InWheelCtx, add_platforms import click import os @click.command() @click.argument('wheel', type=click.Path(exists=True)) def main(wheel): dir = os.path.dirname(os.path.abspath(wheel)) with InWheelCtx(wheel) as ctx: try: new_wheel = add_platforms(ctx, ['manylinux1_x86_6...
Add script to fix up wheel tag to manylinux We use this instead of auditwheel directly because we have taken care of the RPATH and auditwheel get confused. Signed-off-by: Chris Harris <[email protected]>from auditwheel.wheeltools import InWheelCtx, add_platforms import click import ...
<commit_before><commit_msg>Add script to fix up wheel tag to manylinux We use this instead of auditwheel directly because we have taken care of the RPATH and auditwheel get confused. Signed-off-by: Chris Harris <[email protected]><commit_after>from auditwheel.wheeltools import InWhe...