text stringlengths 0 1.05M | meta dict |
|---|---|
"""Add order info
Revision ID: 272c7585b868
Revises: 4e8daad637a6
Create Date: 2017-06-22 10:21:59.098063
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "272c7585b868"
down_revision = "4e8daad637a6"
branch_labels = None
depends_on = None
def upgrade(engine_name):
globals()["upgrade_%s" % engine_name]()
def downgrade(engine_name):
globals()["downgrade_%s" % engine_name]()
def upgrade_metrics():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
def downgrade_metrics():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
def upgrade_rdr():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column("biobank_order", sa.Column("collected_site_id", sa.Integer(), nullable=True))
op.add_column("biobank_order", sa.Column("collected_username", sa.String(length=255), nullable=True))
op.add_column("biobank_order", sa.Column("processed_site_id", sa.Integer(), nullable=True))
op.add_column("biobank_order", sa.Column("processed_username", sa.String(length=255), nullable=True))
op.add_column("biobank_order", sa.Column("source_username", sa.String(length=255), nullable=True))
op.create_foreign_key(None, "biobank_order", "site", ["processed_site_id"], ["site_id"])
op.create_foreign_key(None, "biobank_order", "site", ["collected_site_id"], ["site_id"])
# ### end Alembic commands ###
def downgrade_rdr():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(None, "biobank_order", type_="foreignkey")
op.drop_constraint(None, "biobank_order", type_="foreignkey")
op.drop_column("biobank_order", "source_username")
op.drop_column("biobank_order", "processed_username")
op.drop_column("biobank_order", "processed_site_id")
op.drop_column("biobank_order", "collected_username")
op.drop_column("biobank_order", "collected_site_id")
# ### end Alembic commands ###
| {
"repo_name": "all-of-us/raw-data-repository",
"path": "rdr_service/alembic/versions/272c7585b868_add_order_info.py",
"copies": "1",
"size": "2073",
"license": "bsd-3-clause",
"hash": -8429880459242701000,
"line_mean": 34.1355932203,
"line_max": 105,
"alpha_frac": 0.6767969127,
"autogenerated": false,
"ratio": 3.3062200956937797,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.448301700839378,
"avg_score": null,
"num_lines": null
} |
"""Add order navigation children alphabetically.
Revision ID: 0d279cc03c6e
Revises: da44c279ce0a
Create Date: 2018-05-08 10:02:51.009181
"""
import sqlalchemy as sa
from alembic import op
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, relationship
# revision identifiers, used by Alembic.
revision = '0d279cc03c6e'
down_revision = 'da44c279ce0a'
Base = declarative_base()
db = sa
db.Model = Base
db.relationship = relationship
def create_session():
connection = op.get_bind()
session_maker = sa.orm.sessionmaker()
session = session_maker(bind=connection)
db.session = session
def upgrade():
create_session()
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('nagivation_entry',
sa.Column('order_children_alphabetically', sa.Boolean(),
nullable=False, server_default='0'))
# ### end Alembic commands ###
def downgrade():
create_session()
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('nagivation_entry', 'order_children_alphabetically')
# ### end Alembic commands ###
# vim: ft=python
| {
"repo_name": "viaict/viaduct",
"path": "migrations/versions/2018_05_08_0d279cc03c6e_add_order_navigation_children_.py",
"copies": "1",
"size": "1198",
"license": "mit",
"hash": -4964307900123449000,
"line_mean": 24.4893617021,
"line_max": 74,
"alpha_frac": 0.6886477462,
"autogenerated": false,
"ratio": 3.619335347432024,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.4807983093632024,
"avg_score": null,
"num_lines": null
} |
"""Add orders plugin metadata table and relationships
Revision ID: 4070806f6972
Revises: 47b69e523451
Create Date: 2014-08-21 14:06:48.237701
"""
# revision identifiers, used by Alembic.
revision = '4070806f6972'
down_revision = '47b69e523451'
from alembic import op
import sqlalchemy as sa
def upgrade():
ctx = op.get_context()
con = op.get_bind()
table_exists = ctx.dialect.has_table(con.engine, 'order_plugin_metadata')
if not table_exists:
op.create_table(
'order_plugin_metadata',
sa.Column('id', sa.String(length=36), nullable=False),
sa.Column('created_at', sa.DateTime(), nullable=False),
sa.Column('updated_at', sa.DateTime(), nullable=False),
sa.Column('deleted_at', sa.DateTime(), nullable=True),
sa.Column('deleted', sa.Boolean(), nullable=False),
sa.Column('status', sa.String(length=20), nullable=False),
sa.Column('order_id', sa.String(length=36), nullable=False),
sa.Column('key', sa.String(length=255), nullable=False),
sa.Column('value', sa.String(length=255), nullable=False),
sa.ForeignKeyConstraint(['order_id'], ['orders.id'],),
sa.PrimaryKeyConstraint('id'),
)
def downgrade():
op.drop_table('order_plugin_metadata')
| {
"repo_name": "cneill/barbican",
"path": "barbican/model/migration/alembic_migrations/versions/4070806f6972_add_orders_plugin_metadata_table_and_.py",
"copies": "3",
"size": "1328",
"license": "apache-2.0",
"hash": 309786294439759400,
"line_mean": 33.0512820513,
"line_max": 77,
"alpha_frac": 0.6332831325,
"autogenerated": false,
"ratio": 3.5319148936170213,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.5665198026117021,
"avg_score": null,
"num_lines": null
} |
"""addOriginalFilenames
Revision ID: cdb714f6f374
Revises: 37bf5b71b83f
Create Date: 2016-03-22 16:07:16.229000
"""
# revision identifiers, used by Alembic.
revision = 'cdb714f6f374'
down_revision = '37bf5b71b83f'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade(engine_name):
globals()["upgrade_%s" % engine_name]()
def downgrade(engine_name):
globals()["downgrade_%s" % engine_name]()
def upgrade_error_data():
### commands auto generated by Alembic - please adjust! ###
op.alter_column('error_data', 'field_name',
existing_type=sa.TEXT(),
nullable=True)
op.alter_column('error_data', 'first_row',
existing_type=sa.INTEGER(),
nullable=True)
op.alter_column('error_data', 'job_id',
existing_type=sa.INTEGER(),
nullable=True)
op.alter_column('error_data', 'occurrences',
existing_type=sa.INTEGER(),
nullable=True)
op.alter_column('error_type', 'description',
existing_type=sa.TEXT(),
nullable=True)
op.alter_column('error_type', 'name',
existing_type=sa.TEXT(),
nullable=True)
op.alter_column('file_status', 'status_id',
existing_type=sa.INTEGER(),
nullable=True)
op.alter_column('status', 'description',
existing_type=sa.TEXT(),
nullable=True)
op.alter_column('status', 'name',
existing_type=sa.TEXT(),
nullable=True)
### end Alembic commands ###
def downgrade_error_data():
### commands auto generated by Alembic - please adjust! ###
op.alter_column('status', 'name',
existing_type=sa.TEXT(),
nullable=False)
op.alter_column('status', 'description',
existing_type=sa.TEXT(),
nullable=False)
op.alter_column('file_status', 'status_id',
existing_type=sa.INTEGER(),
nullable=False)
op.alter_column('error_type', 'name',
existing_type=sa.TEXT(),
nullable=False)
op.alter_column('error_type', 'description',
existing_type=sa.TEXT(),
nullable=False)
op.alter_column('error_data', 'occurrences',
existing_type=sa.INTEGER(),
nullable=False)
op.alter_column('error_data', 'job_id',
existing_type=sa.INTEGER(),
nullable=False)
op.alter_column('error_data', 'first_row',
existing_type=sa.INTEGER(),
nullable=False)
op.alter_column('error_data', 'field_name',
existing_type=sa.TEXT(),
nullable=False)
### end Alembic commands ###
def upgrade_job_tracker():
### commands auto generated by Alembic - please adjust! ###
op.alter_column('job_dependency', 'job_id',
existing_type=sa.INTEGER(),
nullable=True)
op.alter_column('job_dependency', 'prerequisite_id',
existing_type=sa.INTEGER(),
nullable=True)
op.add_column('job_status', sa.Column('original_filename', sa.Text(), nullable=True))
op.alter_column('job_status', 'status_id',
existing_type=sa.INTEGER(),
nullable=True)
op.alter_column('job_status', 'submission_id',
existing_type=sa.INTEGER(),
nullable=True)
op.alter_column('job_status', 'type_id',
existing_type=sa.INTEGER(),
nullable=True)
op.alter_column('status', 'description',
existing_type=sa.TEXT(),
nullable=True)
op.alter_column('status', 'name',
existing_type=sa.TEXT(),
nullable=True)
op.alter_column('type', 'description',
existing_type=sa.TEXT(),
nullable=True)
op.alter_column('type', 'name',
existing_type=sa.TEXT(),
nullable=True)
### end Alembic commands ###
def downgrade_job_tracker():
### commands auto generated by Alembic - please adjust! ###
op.alter_column('type', 'name',
existing_type=sa.TEXT(),
nullable=False)
op.alter_column('type', 'description',
existing_type=sa.TEXT(),
nullable=False)
op.alter_column('status', 'name',
existing_type=sa.TEXT(),
nullable=False)
op.alter_column('status', 'description',
existing_type=sa.TEXT(),
nullable=False)
op.alter_column('job_status', 'type_id',
existing_type=sa.INTEGER(),
nullable=False)
op.alter_column('job_status', 'submission_id',
existing_type=sa.INTEGER(),
nullable=False)
op.alter_column('job_status', 'status_id',
existing_type=sa.INTEGER(),
nullable=False)
op.drop_column('job_status', 'original_filename')
op.alter_column('job_dependency', 'prerequisite_id',
existing_type=sa.INTEGER(),
nullable=False)
op.alter_column('job_dependency', 'job_id',
existing_type=sa.INTEGER(),
nullable=False)
### end Alembic commands ###
def upgrade_user_manager():
### commands auto generated by Alembic - please adjust! ###
pass
### end Alembic commands ###
def downgrade_user_manager():
### commands auto generated by Alembic - please adjust! ###
pass
### end Alembic commands ###
| {
"repo_name": "fedspendingtransparency/data-act-core",
"path": "dataactcore/migrations/versions/cdb714f6f374_addoriginalfilenames.py",
"copies": "1",
"size": "5612",
"license": "cc0-1.0",
"hash": 3276386913787422700,
"line_mean": 32.0117647059,
"line_max": 89,
"alpha_frac": 0.5580898076,
"autogenerated": false,
"ratio": 4.008571428571429,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9964910189954366,
"avg_score": 0.0203502092434128,
"num_lines": 170
} |
"""add_origin_to_biobank_order
Revision ID: 1ebd26a7612c
Revises: c2fa79ef2fca
Create Date: 2020-02-26 12:00:50.340756
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1ebd26a7612c'
down_revision = 'c2fa79ef2fca'
branch_labels = None
depends_on = None
def upgrade(engine_name):
globals()["upgrade_%s" % engine_name]()
def downgrade(engine_name):
globals()["downgrade_%s" % engine_name]()
def upgrade_rdr():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('biobank_history', sa.Column('order_origin', sa.String(length=80), nullable=True))
op.add_column('biobank_order', sa.Column('order_origin', sa.String(length=80), nullable=True))
# ### end Alembic commands ###
def downgrade_rdr():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('biobank_order', 'order_origin')
op.drop_column('biobank_history', 'order_origin')
# ### end Alembic commands ###
def upgrade_metrics():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
def downgrade_metrics():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
| {
"repo_name": "all-of-us/raw-data-repository",
"path": "rdr_service/alembic/versions/1ebd26a7612c_add_origin_to_biobank_order.py",
"copies": "1",
"size": "1284",
"license": "bsd-3-clause",
"hash": -8481909600619556000,
"line_mean": 24.1764705882,
"line_max": 100,
"alpha_frac": 0.6682242991,
"autogenerated": false,
"ratio": 3.34375,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9406814144281629,
"avg_score": 0.021032030963674283,
"num_lines": 51
} |
"""Add 'other' to qb classifications enum (and remove obsolete 'followup')
Revision ID: da6506c5899a
Revises: 9c6788e6db2f
Create Date: 2019-10-01 15:31:47.918164
"""
from alembic import op
import sqlalchemy as sa
from portal.models.questionnaire_bank import classification_types
# revision identifiers, used by Alembic.
revision = 'da6506c5899a'
down_revision = '9c6788e6db2f'
new_enum = sa.Enum(*classification_types, name='classification_enum')
tmp_enum = sa.Enum(*classification_types, name='_classification_enum')
old_types = [t for t in classification_types if t != 'other']
old_enum = sa.Enum(*old_types, name='classification_enum')
def upgrade():
# Drop the default, as it's in the way
op.execute(
"ALTER TABLE questionnaire_banks ALTER classification DROP DEFAULT")
# Need temp container during reassignment
tmp_enum.create(op.get_bind(), checkfirst=False)
op.execute(
'ALTER TABLE questionnaire_banks ALTER COLUMN classification TYPE '
'_classification_enum USING '
'classification::text::_classification_enum')
old_enum.drop(op.get_bind(), checkfirst=False)
new_enum.create(op.get_bind(), checkfirst=False)
op.execute(
'ALTER TABLE questionnaire_banks ALTER COLUMN classification TYPE '
'classification_enum USING classification::text::classification_enum')
tmp_enum.drop(op.get_bind(), checkfirst=False)
# restore default
op.execute(
"ALTER TABLE questionnaire_banks ALTER classification SET DEFAULT "
"'baseline'::classification_enum")
def downgrade():
# Drop any created with 'other'
op.execute(
"DELETE FROM questionnaire_banks WHERE classification = 'other'")
# Drop the default, as it's in the way
op.execute(
"ALTER TABLE questionnaire_banks ALTER classification DROP DEFAULT")
# Need temp container during reassignment
tmp_enum.create(op.get_bind(), checkfirst=False)
op.execute(
'ALTER TABLE questionnaire_banks ALTER COLUMN classification TYPE '
'_classification_enum USING '
'classification::text::_classification_enum')
new_enum.drop(op.get_bind(), checkfirst=False)
old_enum.create(op.get_bind(), checkfirst=False)
op.execute(
'ALTER TABLE questionnaire_banks ALTER COLUMN classification TYPE '
'classification_enum USING classification::text::classification_enum')
tmp_enum.drop(op.get_bind(), checkfirst=False)
# restore default
op.execute(
"ALTER TABLE questionnaire_banks ALTER classification SET DEFAULT "
"'baseline'::classification_enum")
| {
"repo_name": "uwcirg/true_nth_usa_portal",
"path": "portal/migrations/versions/da6506c5899a_.py",
"copies": "1",
"size": "2620",
"license": "bsd-3-clause",
"hash": -6403418252722871000,
"line_mean": 33.4736842105,
"line_max": 78,
"alpha_frac": 0.708778626,
"autogenerated": false,
"ratio": 3.808139534883721,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 1,
"avg_score": 0,
"num_lines": 76
} |
# Add our library code directory to the import search path. This allows things like
# `import fourier` to work. It relies on the relative filesystem position of this
# file to the `library` directory.
import sys
sys.path.append('../library')
def pickle_curve_positions (Xs, Ts, period):
import numpy
samples = [numpy.array(X[0:3], dtype=float) for X in Xs]
sample_times = Ts
data = [sample_times, samples, period]
import pickle
pickle.dump(data, open('sample_times,samples,period.pickle', 'wb'))
def compute_Fourier_coefficients_of (Xs, Ts):
L = 60
import fourier
Ft = fourier.Transform(range(-L,L+1), Ts)
import linalg_util
# Extract just the (x,y) components of the curve sample points' position
# as complex values (call these values Ws, each element being a W) as the
# z component of the curve is a function of the (x,y) components.
Ws = linalg_util.ComplexVector([complex(X[0],X[1]) for X in Xs[0:-1]])
coefficients = Ft.coefficients_of(Ws)
# print 'coefficients = {0}'.format(coefficients)
reconstructed_Ws = Ft.sampled_sum_of(coefficients)
import itertools
# Really the norm should be taken via the norm defined by a Riemann sum that involves Ft.dts_for_average.
print("|reconstructed_Ws - Ws|^2 = {0}".format(linalg_util.ComplexVectorNormSquared((reconstructed_Ws - Ws)/len(Ft.sample_times))))
diffs = [linalg_util.ComplexNormSquared(reconstructed_W - W) for (reconstructed_W,W) in itertools.izip(reconstructed_Ws,Ws)]
max_diff = max(diffs)
print("max_diff = {0}".format(max_diff))
def main ():
import heisenberg_dynamics
(Xs,Ts,period) = heisenberg_dynamics.compute_coreys_flow_curve()
# Compute the Hamiltonian at each curve sample point to verify that energy is
# identically zero. Do this by computing the max of the norm of the energy.
Hs = [heisenberg_dynamics.hamiltonian(X) for X in Xs]
max_abs_H = max(abs(H) for H in Hs)
print('max_abs_H = {0}'.format(max_abs_H))
# Plot the curve to the file
import plotty
plotty.plotty_2d_points(Xs, save_to_file='dynamics_rk4_x.png')
pickle_curve_positions(Xs, Ts, period)
compute_Fourier_coefficients_of(Xs, Ts)
if __name__ == "__main__":
main()
| {
"repo_name": "vdods/heisenberg",
"path": "attic/initial-conditions-dynamics/main.py",
"copies": "1",
"size": "2261",
"license": "mit",
"hash": -2078107404035822600,
"line_mean": 38.6666666667,
"line_max": 135,
"alpha_frac": 0.6886333481,
"autogenerated": false,
"ratio": 3.1622377622377624,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.43508711103377623,
"avg_score": null,
"num_lines": null
} |
"""Add Outcome model
Revision ID: 1200
Revises: 1210
Create Date: 2018-05-10 17:22:50.773017
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1210'
down_revision = '1200'
def upgrade():
op.create_unique_constraint('uq_brief_responses_id_brief_id', 'brief_responses', ['id', 'brief_id'])
op.create_unique_constraint(
'uq_direct_award_search_result_entries_archived_service_id_searc',
'direct_award_search_result_entries',
['archived_service_id', 'search_id'],
)
op.create_unique_constraint('uq_direct_award_searches_id_project_id', 'direct_award_searches', ['id', 'project_id'])
op.create_table('outcomes',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('external_id', sa.BigInteger(), nullable=False),
sa.Column('completed_at', sa.DateTime(), nullable=True),
sa.Column('start_date', sa.Date(), nullable=True),
sa.Column('end_date', sa.Date(), nullable=True),
sa.Column('awarding_organisation_name', sa.String(), nullable=True),
sa.Column('award_value', sa.Numeric(precision=11, scale=2), nullable=True),
sa.Column('result', sa.String(), nullable=False),
sa.Column('direct_award_project_id', sa.Integer(), nullable=True),
sa.Column('direct_award_search_id', sa.Integer(), nullable=True),
sa.Column('direct_award_archived_service_id', sa.Integer(), nullable=True),
sa.Column('brief_id', sa.Integer(), nullable=True),
sa.Column('brief_response_id', sa.Integer(), nullable=True),
sa.CheckConstraint(
"CASE WHEN (result = 'awarded') THEN CAST(brief_response_id IS NULL AS BOOLEAN) = CAST(brief_id IS NULL AS BOOLEAN) ELSE CAST(brief_response_id IS NULL AS BOOLEAN) END",
name=op.f('ck_outcomes_brief_keys_nullable'),
),
sa.CheckConstraint(
"CASE WHEN (result = 'awarded') THEN CAST(direct_award_project_id IS NULL AS BOOLEAN) = " \
"CAST(direct_award_search_id IS NULL AS BOOLEAN) AND CAST(direct_award_project_id IS NULL AS BOOLEAN) = " \
"CAST(direct_award_archived_service_id IS NULL AS BOOLEAN) ELSE " \
"CAST(direct_award_search_id IS NULL AS BOOLEAN) " \
"AND CAST(direct_award_archived_service_id IS NULL AS BOOLEAN) END",
name=op.f('ck_outcomes_direct_award_keys_nullable'),
),
sa.CheckConstraint(
'CAST(direct_award_project_id IS NULL AS BOOLEAN) != CAST(brief_id IS NULL AS BOOLEAN)', name=op.f('ck_outcomes_either_brief_xor_direct_award'),
),
sa.ForeignKeyConstraint(['brief_id'], ['briefs.id'], name=op.f('outcomes_brief_id_fkey')),
sa.ForeignKeyConstraint(
['brief_response_id', 'brief_id'],
['brief_responses.id', 'brief_responses.brief_id'],
name='fk_outcomes_brief_response_id_brief_id',
initially='DEFERRED',
deferrable=True,
),
sa.ForeignKeyConstraint(
['brief_response_id'],
['brief_responses.id'],
name=op.f('outcomes_brief_response_id_fkey'),
),
sa.ForeignKeyConstraint(
['direct_award_archived_service_id', 'direct_award_search_id'],
['direct_award_search_result_entries.archived_service_id', 'direct_award_search_result_entries.search_id'],
name='fk_outcomes_da_service_id_da_search_id',
initially='DEFERRED',
deferrable=True,
),
sa.ForeignKeyConstraint(
['direct_award_archived_service_id'],
['archived_services.id'],
name=op.f('outcomes_direct_award_archived_service_id_fkey'),
),
sa.ForeignKeyConstraint(
['direct_award_project_id'],
['direct_award_projects.id'],
name=op.f('outcomes_direct_award_project_id_fkey'),
),
sa.ForeignKeyConstraint(
['direct_award_search_id', 'direct_award_project_id'],
['direct_award_searches.id', 'direct_award_searches.project_id'],
name='fk_outcomes_da_search_id_da_project_id',
initially='DEFERRED',
deferrable=True,
),
sa.ForeignKeyConstraint(
['direct_award_search_id'],
['direct_award_searches.id'],
name=op.f('outcomes_direct_award_search_id_fkey'),
),
sa.PrimaryKeyConstraint('id', name=op.f('outcomes_pkey')),
sa.UniqueConstraint('external_id', name=op.f('uq_outcomes_external_id')),
)
op.create_index(
'idx_outcomes_completed_brief_unique',
'outcomes',
['brief_id'],
unique=True,
postgresql_where=sa.text('completed_at IS NOT NULL'),
)
op.create_index(
'idx_outcomes_completed_direct_award_project_unique',
'outcomes',
['direct_award_project_id'],
unique=True,
postgresql_where=sa.text('completed_at IS NOT NULL'),
)
def downgrade():
op.drop_index('idx_outcomes_completed_direct_award_project_unique', table_name='outcomes')
op.drop_index('idx_outcomes_completed_brief_unique', table_name='outcomes')
op.drop_table('outcomes')
op.drop_constraint('uq_direct_award_searches_id_project_id', 'direct_award_searches', type_='unique')
op.drop_constraint(
'uq_direct_award_search_result_entries_archived_service_id_searc',
'direct_award_search_result_entries',
type_='unique',
)
op.drop_constraint('uq_brief_responses_id_brief_id', 'brief_responses', type_='unique')
| {
"repo_name": "alphagov/digitalmarketplace-api",
"path": "migrations/versions/1210_add_outcome_model.py",
"copies": "1",
"size": "5612",
"license": "mit",
"hash": -8936139951313304000,
"line_mean": 43.5396825397,
"line_max": 181,
"alpha_frac": 0.6174269423,
"autogenerated": false,
"ratio": 3.4074074074074074,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9515563681873098,
"avg_score": 0.0018541335668617585,
"num_lines": 126
} |
"""Add output_limit_exceeded to TCR.status enum.
Revision ID: 4f99b161d06c
Revises: 592873dff501
Create Date: 2013-02-12 17:00:33.069428
"""
# revision identifiers, used by Alembic.
revision = '4f99b161d06c'
down_revision = '592873dff501'
from alembic import op
import sqlalchemy as sa
old_options = ('nonexistent_executable', 'signal', 'success', 'timed_out')
new_options = sorted(old_options + ('output_limit_exceeded',))
old_type = sa.Enum(*old_options, name='status')
new_type = sa.Enum(*new_options, name='status')
tmp_type = sa.Enum(*new_options, name='_status')
tcr = sa.sql.table('testcaseresult',
sa.Column('status', new_type, nullable=False))
def upgrade():
# Create a tempoary "_status" type, convert and drop the "old" type
tmp_type.create(op.get_bind(), checkfirst=False)
op.execute('ALTER TABLE testcaseresult ALTER COLUMN status TYPE _status'
' USING status::text::_status');
old_type.drop(op.get_bind(), checkfirst=False)
# Create and convert to the "new" status type
new_type.create(op.get_bind(), checkfirst=False)
op.execute('ALTER TABLE testcaseresult ALTER COLUMN status TYPE status'
' USING status::text::status');
tmp_type.drop(op.get_bind(), checkfirst=False)
def downgrade():
# Convert 'output_limit_exceeded' status into 'timed_out'
op.execute(tcr.update().where(tcr.c.status==u'output_limit_exceeded')
.values(status='timed_out'))
# Create a tempoary "_status" type, convert and drop the "new" type
tmp_type.create(op.get_bind(), checkfirst=False)
op.execute('ALTER TABLE testcaseresult ALTER COLUMN status TYPE _status'
' USING status::text::_status');
new_type.drop(op.get_bind(), checkfirst=False)
# Create and convert to the "old" status type
old_type.create(op.get_bind(), checkfirst=False)
op.execute('ALTER TABLE testcaseresult ALTER COLUMN status TYPE status'
' USING status::text::status');
tmp_type.drop(op.get_bind(), checkfirst=False)
| {
"repo_name": "ucsb-cs/submit",
"path": "submit/migrations/versions/4f99b161d06c_add_output_limit_exc.py",
"copies": "1",
"size": "2051",
"license": "bsd-2-clause",
"hash": -2197395043640117000,
"line_mean": 37.6981132075,
"line_max": 76,
"alpha_frac": 0.6811311555,
"autogenerated": false,
"ratio": 3.3844884488448845,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.954836693460849,
"avg_score": 0.0034505339472787502,
"num_lines": 53
} |
#add parent dir to find package. Only needed for source code build, pip install doesn't need it.
import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0, parentdir)
from pybullet_envs.bullet.kukaCamGymEnv import KukaCamGymEnv
import time
def main():
environment = KukaCamGymEnv(renders=True, isDiscrete=False)
motorsIds = []
#motorsIds.append(environment._p.addUserDebugParameter("posX",0.4,0.75,0.537))
#motorsIds.append(environment._p.addUserDebugParameter("posY",-.22,.3,0.0))
#motorsIds.append(environment._p.addUserDebugParameter("posZ",0.1,1,0.2))
#motorsIds.append(environment._p.addUserDebugParameter("yaw",-3.14,3.14,0))
#motorsIds.append(environment._p.addUserDebugParameter("fingerAngle",0,0.3,.3))
dv = 1
motorsIds.append(environment._p.addUserDebugParameter("posX", -dv, dv, 0))
motorsIds.append(environment._p.addUserDebugParameter("posY", -dv, dv, 0))
motorsIds.append(environment._p.addUserDebugParameter("posZ", -dv, dv, 0))
motorsIds.append(environment._p.addUserDebugParameter("yaw", -dv, dv, 0))
motorsIds.append(environment._p.addUserDebugParameter("fingerAngle", 0, 0.3, .3))
done = False
while (not done):
action = []
for motorId in motorsIds:
action.append(environment._p.readUserDebugParameter(motorId))
state, reward, done, info = environment.step(action)
obs = environment.getExtendedObservation()
if __name__ == "__main__":
main()
| {
"repo_name": "MTASZTAKI/ApertusVR",
"path": "plugins/physics/bulletPhysics/3rdParty/bullet3/examples/pybullet/gym/pybullet_envs/examples/kukaCamGymEnvTest.py",
"copies": "4",
"size": "1552",
"license": "mit",
"hash": 9031457480948977000,
"line_mean": 36.8536585366,
"line_max": 96,
"alpha_frac": 0.7338917526,
"autogenerated": false,
"ratio": 2.9846153846153847,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.5718507137215385,
"avg_score": null,
"num_lines": null
} |
#add parent dir to find package. Only needed for source code build, pip install doesn't need it.
import os
import inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.dirname(currentdir))
os.sys.path.insert(0, parentdir)
import pybullet
import gym
import numpy as np
import pybullet_envs
import time
def relu(x):
return np.maximum(x, 0)
class SmallReactivePolicy:
"Simple multi-layer perceptron policy, no internal state"
def __init__(self, observation_space, action_space):
assert weights_dense1_w.shape == (observation_space.shape[0], 128)
assert weights_dense2_w.shape == (128, 64)
assert weights_final_w.shape == (64, action_space.shape[0])
def act(self, ob):
x = ob
x = relu(np.dot(x, weights_dense1_w) + weights_dense1_b)
x = relu(np.dot(x, weights_dense2_w) + weights_dense2_b)
x = np.dot(x, weights_final_w) + weights_final_b
return x
def main():
pybullet.connect(pybullet.DIRECT)
env = gym.make("AntBulletEnv-v0")
env.render(mode="human")
pi = SmallReactivePolicy(env.observation_space, env.action_space)
env.reset()
while 1:
frame = 0
score = 0
restart_delay = 0
obs = env.reset()
while 1:
time.sleep(1. / 60.)
a = pi.act(obs)
obs, r, done, _ = env.step(a)
#print("reward")
#print(r)
score += r
frame += 1
distance = 5
yaw = 0
still_open = env.render("human")
if still_open == False:
return
if not done: continue
if restart_delay == 0:
print("score=%0.2f in %i frames" % (score, frame))
restart_delay = 60 * 2 # 2 sec at 60 fps
else:
restart_delay -= 1
if restart_delay == 0: break
# yapf: disable
weights_dense1_w = np.array(
[[
+0.2856, -0.4091, +0.3380, -0.1083, +0.1049, -0.0806, -0.0827, +0.0402,
+0.2415, +0.0927, +0.1812, +0.5455, +0.3157, +0.1043, +0.0527, +0.3768,
-0.2083, +0.1218, -0.0633, +0.3236, +0.2198, +0.0513, +0.3505, -0.1165,
-0.1732, +0.2760, +0.0006, +0.0249, +0.5887, -0.2324, +0.1503, -0.0108,
+0.1220, +0.2527, +0.0984, +0.5360, -0.0579, -0.0847, +0.1649, +0.0589,
-0.2046, +0.5981, -0.1063, -0.1088, +0.3424, +0.3479, -0.1751, +0.2924,
-0.0610, +0.0807, +0.3291, +0.0059, +0.0339, -0.2823, +0.2533, +0.3156,
+0.1679, +0.2417, +0.1265, +0.0024, +0.0802, +0.2531, -0.2576, +0.3894,
+0.3206, +0.2015, +0.3482, +0.1042, -0.2418, -0.0002, +0.1277, +0.1811,
+0.1551, +0.5460, +0.1714, +0.1021, -0.1252, +0.0609, -0.0372, -0.0351,
+0.1216, +0.0023, -0.2448, +0.0077, +0.0584, +0.2389, -0.0848, +0.3542,
+0.3065, -0.2268, +0.2387, +0.3303, +0.4184, -0.1619, +0.2230, +0.2829,
+0.3884, +0.1262, +0.6383, -0.1629, +0.3087, +0.0554, +0.2294, +0.0280,
+0.4139, -0.1484, +0.1358, +0.3153, -0.2652, +0.2637, -0.1563, +0.0706,
+0.4192, +0.2381, -0.3540, +0.2789, +0.2647, +0.0931, +0.1439, +0.3415,
-0.2445, +0.1039, -0.3692, +0.5095, +0.0010, +0.0777, +0.3382, -0.1100
],
[
+0.0820, +0.6327, +1.0135, -0.1423, -0.0275, +0.0396, -0.5933,
+0.3027, -0.2220, +0.1476, -0.0591, -0.7910, -0.0776, +0.2565,
+0.0241, -1.1300, +0.1324, +0.9079, +0.2318, +0.5574, +1.0162,
+0.1408, +0.7525, +0.3612, +0.6088, -0.2541, +0.8134, +0.1348,
-0.1265, +0.7991, -0.2304, -0.4826, -0.4123, +0.2831, -0.5457,
-0.3518, -0.9733, -0.1654, +0.2409, +0.3971, +0.6624, +0.0728,
+0.2200, -0.2126, -0.5299, -0.1858, -0.3467, -0.2776, -0.2004,
-0.7567, +0.4417, -0.4378, -0.6799, +0.3789, +0.2937, -0.1247,
+0.5540, -1.0124, -0.5759, +0.0308, +0.2971, +1.1300, -0.1185,
+0.5303, +0.0527, +0.3392, +0.7436, -0.3578, -0.0559, +0.2165,
-0.5860, +0.9427, -0.2522, -0.0805, +0.9314, +1.4173, +0.6216,
+0.6923, +0.6592, -0.0457, +0.5152, -0.3523, -0.5135, +0.6466,
-0.4804, +0.0006, +0.3223, -0.1548, +1.5508, +0.6204, +0.2618,
-0.0392, -0.6208, +0.0237, +0.0577, -0.2913, -0.3893, -0.1459,
-0.1103, +0.7485, -0.0045, +0.0640, +0.0726, -0.0966, +0.0452,
+0.2741, -0.3389, +0.8830, +0.9819, +0.3915, -0.1127, -0.2653,
-0.6842, +0.2389, -0.4349, +1.4013, -0.4442, +1.1846, -0.7550,
+0.5812, -0.2940, +0.7046, +0.4730, -0.2155, +0.1432, +0.1518,
+0.5336, -0.0827
],
[
-0.2503, +0.2354, -0.0468, +0.1318, -0.0161, +0.1235, -0.1649,
-0.1380, -0.1816, -0.0953, -0.0303, -0.4337, +0.0159, -0.2893,
-0.1178, -0.1779, +0.0557, -0.0788, -0.1745, -0.1349, +0.1942,
+0.1707, -0.3289, +0.1177, -0.3084, +0.0423, +0.0006, -0.1240,
-0.2685, -0.0578, +0.3282, -0.3570, +0.0039, +0.3399, -0.3599,
-0.3346, -0.2273, -0.0044, -0.0425, -0.2483, -0.2284, -0.5528,
-0.2406, -0.0144, -0.0306, +0.1037, +0.0497, -0.3302, +0.0505,
+0.0054, -0.2037, -0.0112, +0.1068, -0.1273, +0.1019, -0.0463,
-0.0527, -0.0015, -0.1546, -0.2187, +0.0633, -0.1969, -0.0954,
-0.0111, -0.5329, +0.1480, -0.1007, +0.1115, -0.0692, -0.3348,
+0.1361, -0.1606, -0.1103, -0.3221, -0.2678, -0.1543, -0.4900,
-0.2455, -0.0798, -0.0545, +0.0848, +0.0149, -0.1908, +0.1721,
+0.0687, -0.2002, -0.1194, +0.1023, -0.3005, -0.2030, -0.0681,
-0.2440, -0.2892, -0.4305, -0.2357, +0.0932, -0.4055, -0.0629,
-0.1043, -0.5354, -0.1120, -0.1867, -0.1219, -0.2403, -0.5562,
-0.1247, -0.5158, -0.0720, -0.2935, -0.2138, +0.1382, +0.3068,
-0.1444, +0.0100, -0.3312, -0.6305, +0.0030, -0.2372, -0.0005,
-0.3775, +0.1123, +0.0166, -0.0000, -0.0605, -0.5071, +0.0482,
-0.1440, -0.0311
],
[
-0.2697, +0.0706, +0.3032, -0.1729, +0.3361, -0.0424, -0.1621,
-0.1890, +0.0724, -0.4940, +0.0174, +0.2439, -0.4449, +0.2452,
-0.2110, +0.2058, -0.3416, -0.0957, +0.0431, +0.2706, +0.0075,
-0.2335, -0.4697, -0.4996, -0.0722, -0.2389, -0.0721, -0.2428,
+0.4497, +0.1403, +0.0491, +0.3252, -0.3800, -0.2324, +0.2014,
+0.4212, +0.4495, -0.2843, +0.2277, +0.0246, -0.6231, -0.1313,
-0.5353, -0.3726, -0.1220, -0.6917, -0.2465, -0.1089, -0.2945,
+0.5820, -0.2255, +0.0518, +0.1999, +0.0492, +0.1157, -0.0289,
-0.7021, +0.2170, +0.2487, -0.1803, -0.0788, -0.7116, +0.2452,
+0.0250, +0.5466, -0.6420, -0.0797, -0.5767, -0.1020, +0.3390,
-0.1549, +0.4149, +0.1835, +0.8112, -0.3514, +0.3155, -0.6475,
-0.2191, +0.1377, +0.0273, -0.0859, +0.0621, -0.9109, -0.3396,
+0.3122, -0.2752, -0.3375, -0.2920, +0.1554, -0.6032, -0.3321,
+0.1136, -0.0712, -0.3951, +0.2268, -0.2402, +0.4850, +0.1052,
+0.5524, -0.4844, +0.5053, +0.0377, -0.1097, +0.2861, -0.1864,
-0.3226, -0.0154, -0.2144, -0.6764, -1.0064, -0.2201, -0.3494,
-0.1009, -0.0346, +0.0222, -0.4648, -0.6888, +0.0936, -0.7490,
+0.2389, -0.0461, -0.0490, -0.4350, -0.5020, -0.6949, +0.3147,
+0.3905, -0.4302
],
[
-0.5894, -0.0462, -0.0671, +0.1779, -0.2985, -0.0093, +0.1025,
-0.2851, -0.5022, +0.4617, -0.0050, -0.4186, -0.4120, +0.5342,
-0.4466, -0.5710, -0.0778, +0.5455, +0.4230, -0.1727, +0.0248,
+0.6199, -0.0249, -0.0536, -0.2538, -0.0548, -0.5637, +0.1861,
-0.3756, +0.6562, -0.0309, -0.7059, -0.5196, -0.6593, -0.0786,
-0.4255, -0.2951, -0.3396, +0.2999, +0.2590, +0.5004, +0.3659,
-0.1944, -0.5518, -0.0093, +0.3915, -0.0654, +0.7140, -0.0118,
-0.3306, +0.4059, -0.5650, -0.4346, +0.8268, -0.2418, -0.6769,
-0.1529, -0.1019, -0.0935, -0.4321, +0.3257, -0.2702, -0.0989,
+0.2711, -0.6210, +0.4389, +0.3887, -0.1652, -0.0982, +0.0433,
-0.1120, +0.2608, +0.1155, -0.3326, -0.5094, +0.0474, +0.1239,
-0.2204, -0.1056, -0.6978, +0.1862, -0.2300, -0.1165, +0.1509,
+0.7566, -0.5543, +0.3839, -0.5120, +0.3099, -0.2034, +0.7276,
+0.2385, -0.7288, -0.1266, -0.2343, -0.5672, -0.0057, -0.0186,
-0.3665, -1.2855, +0.6746, -0.1203, -0.3309, -0.8603, +0.4811,
-0.1538, +0.5446, +0.0038, +0.1556, +0.5776, -0.1994, -0.3110,
-0.4141, +0.0772, +0.1195, +0.4368, +0.3796, +0.3990, -0.3452,
+0.0268, -0.0037, -0.2803, +0.7420, -0.5205, +0.7103, +0.0814,
+0.0917, +0.5727
],
[
+0.9108, -1.2019, -0.8828, -0.0571, +0.4640, -0.4255, -0.3412,
-0.1130, +0.5679, -0.0657, +0.0851, -0.4367, -0.3447, -1.0903,
-0.1277, +0.0440, +0.1664, +0.3279, -0.1176, -0.2553, -0.5594,
-0.1823, +0.0093, -0.1161, +0.0341, -0.9688, -0.2799, +0.7136,
+0.4686, -0.7197, -0.0798, -0.4068, -0.2519, +0.3220, +0.6010,
+0.6546, -0.5138, +0.6600, -0.2747, -0.6502, +1.1478, +0.7705,
-0.8645, -0.7124, +0.4578, -0.1423, -0.6454, -0.6139, -0.2964,
-0.3525, +0.2287, -0.5368, -1.0776, -0.0507, -0.3517, -0.5014,
-0.1767, -0.5016, +0.8044, -0.3985, +0.2099, +0.2479, -1.3310,
+0.1198, +0.9254, -0.4103, +0.0248, -0.3546, +0.2374, +0.7145,
-0.2494, -0.2125, -0.3934, +0.2301, -0.7252, +0.0734, +0.2172,
+0.1852, -0.4918, -0.6549, +0.3549, +0.9117, -0.2437, +0.4721,
+0.7126, +0.5653, +0.4648, -0.0169, -0.1650, +1.1287, +0.2412,
+1.1366, +0.9122, +0.2840, -0.7930, +0.6158, -1.0912, +0.2805,
+1.1295, -0.4873, +1.0141, -0.5452, +0.2255, +0.9590, +0.4029,
-1.3217, +0.1508, +0.8827, -0.8346, +0.1531, -0.9785, -0.1839,
+1.2149, +1.0538, +0.3230, +0.0808, -0.1425, -1.4677, +0.1845,
+0.6411, -0.8535, +1.3519, -0.1753, +0.4364, -0.1985, -0.2911,
+0.2662, -0.9084
],
[
+0.0887, -0.7902, -0.1326, +0.2560, +0.5971, +0.1597, +0.6151,
-0.2445, -0.1579, +0.3995, +0.6582, +0.6882, +0.6858, -0.0499,
+0.7302, -0.0497, -0.6517, +0.3105, -0.5837, +0.0370, -0.2824,
+0.2725, +0.0053, -0.0114, +0.4586, +0.0917, -0.0565, -0.1905,
+0.8068, -0.0370, +0.1055, -0.5045, +0.0999, +0.4123, +0.0117,
-0.2204, -0.2399, -0.4052, -0.1977, -0.2043, -0.3355, -0.0034,
+0.5239, -0.0669, -0.4476, +0.5272, +0.1968, -0.0636, -0.0077,
+0.0786, +0.4349, +0.8252, -0.1576, -0.3040, +0.4199, +0.6836,
+0.0844, -0.2492, +0.2916, -0.5348, +0.6261, -0.2533, +0.4726,
+0.3358, -0.4089, +0.3682, -0.2293, +0.3252, +0.1088, -0.0533,
+0.3884, -0.1629, +0.2775, -0.3031, -0.0119, +0.5219, -0.3374,
-0.1560, +0.0500, +0.3756, +0.5114, -0.2009, +0.1710, -0.4174,
+0.2280, -0.2902, +0.4603, +0.2395, -0.0964, +0.2353, -0.0310,
-0.4563, -0.4219, -0.1862, -0.6264, -0.6686, +0.2240, +0.1773,
+0.2184, -0.3676, +0.7615, +0.0471, +0.3136, -0.1120, -0.1764,
-0.5694, +0.7293, -0.0837, +0.0061, -0.3985, -0.5278, -0.2859,
+0.0929, -0.1284, -0.0300, -0.0944, -0.0390, +0.2991, -0.1451,
+0.1105, -0.4419, -0.7432, -0.2460, -0.5057, +0.6673, +1.0114,
+0.1792, +0.3065
],
[
-0.6564, +0.6125, -0.3640, +0.1619, -0.2321, +0.5720, +0.6131,
-0.5911, +0.5526, +0.3226, -0.1944, -0.1839, +0.3572, +0.4781,
+0.3407, +0.1641, +0.3172, -0.0047, -0.5162, -0.1206, -0.3861,
+0.1791, -0.3154, +0.2562, -0.3293, +0.0456, +0.4672, -0.3446,
-0.1234, +0.3884, +0.1968, -0.0986, +1.2169, +0.3088, +0.1092,
-0.5128, -0.1868, +0.1527, -1.0628, +0.2786, +0.8325, +0.4390,
+0.7205, +1.3926, +0.7260, +0.1448, +1.1186, -0.5237, +0.7353,
+0.2267, -0.2913, +0.6712, -0.2731, +0.4048, +0.2022, +0.2905,
-0.1395, +0.1775, +0.3433, +1.9090, -0.5115, -0.0573, +0.3704,
-0.0411, -0.9364, -0.3512, -0.2041, +0.1542, +0.2627, -0.5482,
+0.0865, +0.1783, -0.2311, -1.5702, -0.0176, +0.8767, -0.4654,
-0.1130, -0.1795, +0.6021, +0.3102, -0.4057, +0.4632, -0.0942,
+0.4566, +0.0989, -0.5076, -0.3882, +0.3039, +0.5014, -0.5293,
-0.0868, -0.4451, -0.5433, -0.0461, -0.2973, +0.3207, -0.6808,
-1.2056, +0.7728, +0.4685, +0.2351, +0.2659, -0.2359, -0.9062,
+0.7528, -0.1476, +0.6847, +0.1755, -0.0489, +0.6044, +0.9700,
-0.9183, +0.1199, +0.1771, -0.5627, -0.3509, -0.0693, +0.4640,
-0.0557, +1.0644, -0.7226, +0.1818, -1.0610, -0.7919, +1.0787,
-0.1449, +0.6288
],
[
-0.2821, +0.1942, +0.0717, -0.1533, +0.2884, +0.0299, -0.4759,
+0.1094, +0.0928, -0.5330, -0.4834, +0.1220, +0.4441, +0.0950,
-0.2181, -0.3184, -0.1734, +0.2083, -0.0679, +0.0449, +0.1293,
-0.2203, -0.4006, +0.1973, +0.4127, -0.1489, +0.2313, +0.1979,
-0.3278, -0.0182, +0.1668, +0.5720, +0.0830, -0.4511, -0.0183,
+0.3112, -0.1480, +0.4522, -0.4363, -0.0033, +0.0456, -0.3984,
-0.1388, -0.1651, -0.5918, +0.5272, -0.3076, +0.3667, -0.1151,
+0.8332, +0.0800, -0.0647, -0.0477, -0.1672, -0.2390, +0.3837,
-0.0609, +0.1687, +0.2350, +0.0576, +0.1809, -0.9367, +0.5738,
+0.5234, +0.0063, +0.5833, -0.1264, -0.1810, +0.2093, +0.3804,
+0.4890, +0.1374, -0.3955, -0.2193, -0.3411, -0.2258, +0.3689,
-0.2886, +0.1800, +0.2246, -0.3125, +0.5031, -0.1732, +0.4497,
-0.2867, +0.1692, +0.2127, +0.2622, -0.1449, +0.4516, +0.3948,
-0.5770, -0.2663, +0.1198, -0.4118, -0.2319, +0.0458, +0.7989,
-0.2666, +0.5099, +0.1698, -0.2164, -0.1695, -0.3694, +0.4706,
+0.2198, +0.2426, +0.3539, +0.2527, -0.1951, -0.3628, +0.2259,
+0.2184, +0.3123, +0.1581, -0.4492, -0.1066, +0.1484, +0.3531,
+0.0580, +0.1617, +0.3627, -0.7292, -0.4043, -0.6717, +0.4356,
-0.2808, -0.2858
],
[
-0.3475, -0.0438, +0.3943, -0.9454, -0.0676, +0.5420, +0.0486,
-0.3051, -1.0394, -0.5628, +0.1000, +0.4686, +0.1047, +0.6092,
-0.0295, -0.0841, -0.6189, -0.2652, +0.6656, +0.4027, -0.3481,
+0.0851, +0.0883, +0.2802, -0.2617, -0.4973, +1.1301, -0.8747,
-0.0359, +0.0684, -0.3017, -0.3851, +0.0739, +0.0212, -0.1619,
-0.4641, -0.3448, -0.2891, -0.1347, -0.4114, +0.0257, -0.1971,
-0.7760, -0.0600, -0.7219, -0.2177, -0.7149, -1.4175, +0.4650,
+0.2970, +0.2164, +0.1605, +0.2960, -0.0941, -0.6133, -0.3279,
+0.2995, -0.7627, -0.4375, -0.2131, +0.5522, -0.1457, +0.3077,
+0.3471, +0.2723, -0.3329, +0.6586, -0.2858, -0.9763, -0.1005,
+0.4768, -0.2830, +0.3709, +0.2231, -0.2970, -0.0227, +0.4660,
+0.0485, -0.1268, +0.2986, -0.1887, -0.2624, +0.6477, -0.3838,
+0.2028, +0.1874, -0.1547, -0.7356, -0.2964, -0.5112, +0.5242,
-0.2078, -0.3975, -0.0907, +0.5330, +0.1397, -0.5146, +0.2458,
+0.5131, +0.2961, -0.1090, -0.0372, +0.2060, -0.2964, +0.8767,
+0.3651, +0.5461, +0.7021, -0.7075, -0.3400, -0.9134, -0.0393,
+0.3066, +0.0670, -0.2127, -0.0001, -0.0257, +0.0683, +0.1032,
-0.4013, +0.4372, +0.7734, -1.0677, -0.5434, +0.0179, +0.1156,
+0.5057, -0.7392
],
[
+0.6845, -0.4383, +0.4872, +0.0337, -0.5214, +0.3372, -0.2544,
+0.3252, +0.1244, -0.0537, +0.3436, +0.0441, -0.1664, -0.1286,
+0.9051, +0.6243, +0.1279, -0.3978, -0.4463, -0.6320, -0.4879,
-0.0646, -0.0833, -0.0981, -0.1637, -0.0102, -0.5135, -0.3484,
-0.3294, +0.1523, +0.7086, +0.1241, +0.1427, -0.1268, -0.2152,
-0.4389, -0.3871, -0.2253, +0.2274, +0.1638, +0.3830, +0.0758,
+0.2766, -0.4313, -0.3447, +0.5139, +0.0702, -0.7301, +0.2489,
-0.2315, +0.4823, -0.1761, +0.1126, -0.2033, +0.6136, +0.1210,
+0.4397, +0.2120, -0.3228, -0.0294, +0.0316, -0.0530, -0.5844,
+0.1468, +0.5722, +0.5126, -0.3906, +0.1985, +0.4183, -0.4121,
+0.5311, -0.0552, +0.1256, +0.5112, -0.1565, +0.4151, -0.0674,
-0.7475, -0.0087, +0.4671, -0.3835, -0.8014, -0.0984, -0.4115,
+0.4680, -0.4746, +0.0263, +0.2254, -0.4636, -0.0526, +0.0329,
-0.6224, +0.1628, +0.1484, +0.2757, +0.1010, -0.0662, +0.1431,
+0.3350, -0.0244, -0.0363, -0.2423, +0.2825, +0.4420, +1.0574,
-0.5121, -0.1705, +0.4002, +0.0021, -0.4088, -0.0184, +0.1179,
+0.4331, -0.3388, -0.2149, +0.5182, +0.7147, +0.2308, -0.2920,
+0.2585, -0.0006, +0.2654, -0.0136, +0.3788, -0.3258, +0.4393,
+0.1283, +0.1638
],
[
-0.3958, -0.1723, +0.0041, -0.1713, +0.1163, +0.9317, +0.1024,
+0.3821, -0.5272, -0.1965, -1.2950, -0.0896, -0.0509, +0.4697,
-0.9789, +0.9504, +0.9781, +0.1087, +0.3547, +0.1490, -0.6933,
+0.0642, -0.2842, -0.4972, -0.3845, +0.2326, -0.2337, -0.7827,
-0.0600, +0.5650, +0.8874, -0.3840, -0.6595, -0.6787, -0.4388,
-0.8687, -0.2893, -1.0843, +0.3562, +0.1733, +0.4882, -0.2395,
+0.3340, +0.3259, +0.0118, +0.3943, -0.1122, +0.0261, +0.2895,
-0.1793, -0.6270, +1.0038, -0.4197, +0.1312, +0.5332, +0.2492,
+0.1200, +0.6193, +0.0708, -0.0898, -0.4113, -0.2571, -0.3703,
+1.3534, +0.3064, -0.3420, +0.0751, -0.2390, +0.4730, -0.0710,
-0.6082, -0.0621, -0.7128, +0.0342, -0.2973, +1.0688, +0.5756,
-0.4482, -0.7317, +0.6677, -0.2893, -1.0595, +0.5063, +0.2384,
-0.0241, -0.0483, +0.5890, +0.4075, +0.2774, -0.3506, -0.3246,
-0.1290, -0.4692, -0.5019, -0.5848, -0.3720, +0.3620, -0.2611,
+0.8221, +0.1117, +0.1067, +0.5905, -0.3737, +0.1316, +0.4962,
-0.1595, +0.1623, +1.0253, +0.4063, -0.3844, +0.5407, +0.2100,
-0.2984, +0.8594, -0.7372, -0.1105, +0.5597, +0.1740, -0.9340,
-0.2020, -0.1063, +0.4312, +0.1656, -0.8614, +0.0234, +0.4053,
+0.2024, +0.0626
],
[
+0.3669, +0.3593, -0.0679, +0.3940, -0.9204, +0.1025, -0.1689,
+0.6320, +0.3582, -0.2730, -0.3401, +0.5420, +0.1045, -0.1997,
-0.4225, +0.5526, +0.3061, -0.3005, +0.1425, +0.2908, +0.0791,
+0.3145, -0.3164, -0.2949, -0.2283, -0.5429, +0.1733, +0.1975,
+0.1159, +0.3973, -0.5349, +0.1466, -0.2287, -0.4473, -0.4484,
-0.1103, +0.4081, -0.2773, +0.3694, -0.6277, -0.0604, -0.2044,
+0.2405, -0.8861, -1.1240, +0.0556, +0.0223, +0.0884, -0.6452,
+0.0812, +0.2555, -0.5136, -0.2579, -0.0254, +0.4603, -0.3547,
+0.2863, +0.0858, -0.2448, -0.1999, -0.3094, -0.7570, -0.1114,
-0.0045, +0.6206, -0.2205, -0.0834, -0.5264, +0.5787, +0.2510,
+0.3055, +0.6086, +0.1200, +0.0357, -0.1737, -0.1313, +0.4764,
-0.3230, -0.3782, +0.3621, -0.2281, -0.4303, +0.5640, +0.5459,
-0.0745, -0.2958, +0.1598, -0.2153, +0.2673, +0.4034, +0.0226,
+0.1286, -0.3545, -0.4070, -0.2406, -0.1634, -0.0783, +0.6329,
+0.3980, -0.2605, +0.2381, -0.2010, -0.1000, +0.3910, +0.0025,
-0.2878, +0.0189, +0.2230, +0.4205, +0.1812, +0.0964, -0.6297,
+0.2513, -0.2243, +0.0616, +0.2949, -0.8054, -0.0157, -0.1560,
-0.4856, +0.1065, -0.3170, -0.3207, -0.4832, -0.1724, -0.1985,
+0.1615, -0.5231
],
[
+0.1502, +0.1263, +0.3691, -0.2445, -0.2294, +0.1696, +0.4260,
-0.4073, -0.3526, -0.0995, +0.0118, -0.2520, -0.5770, +0.1645,
-0.5140, -0.1315, -0.4054, +0.4050, +0.4091, +0.4156, +0.1958,
-0.0018, +0.4402, +0.0407, -0.1550, +0.3260, -0.5984, -0.5423,
-0.0081, +0.3311, -0.2417, -0.2983, -0.0229, -0.5054, +0.0148,
+0.1414, -0.1635, +0.6437, +0.9040, -0.1526, +0.6908, +1.2097,
-0.1414, -0.5378, -0.4508, +0.0576, -0.5288, -0.6764, +0.9012,
+0.1000, -0.2793, -0.2411, -0.0810, +0.6758, +0.3308, -0.5293,
-0.2459, -0.0823, +0.0820, -0.7715, +0.5418, -0.5643, -0.3646,
+0.4732, -0.0883, -0.0692, +0.3908, -0.3652, -0.4002, -0.3069,
+0.2307, -0.3974, -0.2452, -0.6176, +0.1380, +0.2980, +0.6655,
-0.2056, +0.0333, -0.3240, -1.2843, -0.1259, +1.1622, +0.3627,
-0.1679, +0.6800, -0.2267, +0.2362, -0.0507, -0.1413, +0.2503,
-0.5978, -0.9194, +0.2369, +0.5321, -0.4427, +0.2876, +0.3368,
+0.5545, -0.4450, +0.2571, +0.4898, +0.6034, +0.2236, +0.0011,
-0.4392, +0.3809, -0.2146, -0.1374, +0.0637, -0.4852, -0.0325,
+0.5547, -0.5392, +0.3382, -0.0263, +0.1119, -0.5638, +0.8715,
-0.2044, -0.7598, +0.6241, +0.2881, -0.3804, +0.4588, +0.2541,
+0.3476, -0.0141
],
[
+0.2340, -0.3097, +0.1328, +0.1492, +0.2735, -0.7588, -0.2059,
+0.2854, -1.0919, +0.3341, -0.1496, -0.0754, -0.6094, +0.2697,
-0.2989, -0.3690, +0.1993, +0.2189, +0.1199, +0.0099, -0.1689,
+0.2214, -0.1943, +0.1307, -0.3045, +0.3797, +0.0547, +0.6835,
-0.9322, -0.0897, -0.3947, +0.2783, -0.2957, -0.8735, -0.0857,
-0.5275, +0.5872, +0.1125, +0.3264, +0.1085, -0.2542, -0.1712,
-0.1670, -0.0907, -0.4145, -0.1559, -0.1683, +0.1396, -0.0608,
-0.4183, +0.1501, -0.0744, +0.6009, -0.3488, +0.0600, -0.1671,
-0.9331, -0.2067, +0.2982, -0.4334, -0.9677, +0.1867, -0.0084,
-0.4228, -0.2115, +0.3280, +0.2394, +0.0311, -0.0103, +0.2755,
+0.4475, -0.1920, +0.1652, +0.1196, -0.1093, -0.4222, +1.0664,
+0.1558, +0.3881, -1.4208, -0.6818, -0.0486, -0.0218, +0.2288,
-0.5064, +0.1701, +0.3040, -0.0079, -0.0437, -0.1605, -0.6087,
-0.2500, +0.0799, +0.5584, +0.6784, +0.2731, -0.2145, +0.2343,
+0.2560, +0.1749, -0.3732, +0.0208, -0.7439, -0.0895, +0.2646,
-0.2037, -0.6270, -0.9166, +0.4650, +0.0876, +0.4140, -0.5085,
+0.6740, -0.9125, +0.2592, +0.8056, +0.2206, -0.2435, +0.0648,
+0.0790, +0.0676, +0.6078, +0.1500, +0.2579, +0.6270, -0.4166,
+0.2167, +0.2587
],
[
-0.6869, -1.2532, +0.5147, +1.2637, -0.2554, +0.8228, +0.2481,
-0.5951, -1.2476, +0.6364, +1.5374, -0.0955, +0.0997, -0.6819,
+0.2029, -0.6230, +0.1415, -0.0057, -0.6143, +0.8542, -0.9662,
-0.2502, -0.4263, +0.7339, -0.6119, +1.3317, -0.3264, -0.2859,
+0.8607, +0.4652, +0.7761, -0.1911, +0.9349, -1.2767, -0.3979,
-0.1446, +0.3565, +0.0987, +0.4651, +0.4175, -0.8598, -0.0698,
+0.2101, -1.0191, +0.3386, -0.8061, +0.1306, +0.2496, +0.1610,
-0.3182, -0.3485, -0.2170, -0.8648, -0.7257, -0.7880, -1.0330,
-0.2050, +1.1819, +0.0586, -1.4075, -0.5363, -0.6277, +0.4401,
+0.1976, -0.0799, +0.4374, +0.0549, -0.8748, +0.3757, +0.2235,
+0.1204, +0.4534, +1.1956, +0.6497, -0.8471, -0.0833, -0.2274,
+0.3909, +0.5884, -0.2598, -0.0392, +0.1970, +0.5909, -0.7688,
+0.3490, +0.6633, +2.0425, +0.4622, -0.8812, -0.4726, +0.9418,
-0.1776, -1.1585, -0.3635, +0.7697, +0.4182, +0.2191, -0.2996,
-0.8620, -0.4153, -0.2173, -0.8207, +0.5243, -0.5698, +0.0565,
+0.2763, -0.4199, +0.2476, +0.6535, -0.4769, -0.4259, +0.2979,
-0.1168, -0.3108, +0.1613, +0.3998, +0.5336, -0.4033, +0.0084,
+0.9511, -0.1251, -0.2039, -0.2658, -0.5147, +0.3438, -0.3128,
-0.2120, +0.4101
],
[
+0.2121, +0.0458, +0.0966, -0.1909, -0.1630, -0.2852, +0.0075,
-0.2155, -0.0629, +0.1217, +0.0489, +0.2674, -0.1357, +0.7580,
+0.0394, +0.1849, +0.2186, +0.0919, -0.0582, +0.0811, -0.2470,
+0.4404, +0.4534, -0.0258, +0.4894, +0.1105, +0.1572, +0.1051,
-0.2135, +0.1338, -0.2483, +0.2294, +0.4080, -0.2635, -0.6115,
-0.6237, -0.1793, +0.5117, -0.2792, +0.0733, +0.5426, -0.2688,
-0.4095, -0.1793, -0.0157, +0.0190, +0.4212, -0.0357, +0.6304,
-0.3873, +0.3924, -0.0861, +0.6672, -0.4723, -0.1297, -0.3288,
-0.6972, -0.1781, -0.4545, +0.5582, -0.1303, -0.0516, +0.7788,
+0.0142, -0.2343, +0.6808, -0.0081, -0.2134, -0.0809, -0.2294,
-0.1111, -0.6365, -0.1107, +0.3189, -0.5341, -0.0996, +0.0316,
-0.5004, +0.1849, +0.3280, +0.0008, -0.3973, +0.4816, +0.1103,
+0.1240, -0.4628, +0.1310, -0.6613, -0.3732, -0.1561, -0.3627,
-0.1388, +0.1114, +0.2950, +0.0092, -0.1535, -0.2932, +0.0699,
-0.0546, -0.1053, +0.4289, -0.2362, -0.2584, -0.1726, -0.0949,
-0.0362, +0.2322, +0.3950, +0.4641, +0.7640, +0.3092, +0.4914,
+0.2736, +0.3157, +0.5094, -0.2677, -0.0304, +0.5290, -0.1541,
+0.4361, +0.7528, +0.1171, -0.4145, -0.6882, +0.3426, +0.0556,
-0.4773, -0.3244
],
[
+0.1956, +0.1411, -0.1178, -0.4152, -0.4311, +0.8176, +0.0779,
-0.3809, -0.4114, +0.4712, -0.4344, -0.2139, -0.1640, -0.2804,
-0.1627, +0.4153, +0.1441, -0.0034, +1.2698, +0.6388, +0.6887,
+0.3232, +0.6699, -0.4265, -0.2310, -0.4578, -0.1124, -0.0999,
+0.6439, +0.2424, -0.8201, -0.9492, +0.3796, +0.0581, -0.4657,
-0.2927, +0.2837, +0.1804, -0.1202, +0.3552, +0.3751, +0.1974,
+0.2472, +0.4008, +0.0195, +0.3877, -0.0637, +0.2603, -0.3156,
-0.2780, -0.4614, -0.3423, +0.5843, -0.4884, -0.2875, +0.1293,
-0.0482, +0.3154, -0.1461, -0.2471, +0.6120, +0.0867, +0.4732,
-0.1967, -0.2645, +0.9138, -0.5977, -0.2765, -0.4727, -0.5815,
+0.0225, -0.0835, -0.2688, +0.4517, -0.5937, +0.0246, +0.6287,
-0.0022, -0.3399, -0.3237, -0.2632, -0.5175, +0.3992, +0.0535,
+0.0226, +0.2662, +0.1523, -0.6824, -0.3497, -0.1999, +0.1842,
+0.1421, -0.1967, -0.4185, -0.2236, +0.0956, -0.2740, -0.0225,
+0.0631, +0.6854, -0.0791, -0.0231, -0.4041, -0.1458, -0.1564,
+0.6051, +0.9266, +0.4423, -0.0485, +0.1817, +0.0502, -0.4416,
+0.3662, -0.0397, +0.1136, +0.4185, -0.9586, +0.5222, +0.4192,
+0.7460, -0.1631, -0.1646, -0.0479, -0.3892, -0.2540, +0.9087,
-0.0765, +1.2772
],
[
+0.4488, -0.3346, +0.8797, +0.4681, +0.1887, +0.1747, +0.6390,
+0.4812, -0.2087, +0.0780, +0.1529, +0.4104, -0.1816, +0.3295,
+0.0669, +0.2162, -0.0938, +0.2174, -0.1737, -0.1142, -0.4596,
-0.8221, +0.1460, -0.0529, +0.0091, +0.2910, -0.0069, +0.0269,
+0.3302, +0.2057, -0.2453, -0.1601, -0.3126, -0.1870, +0.4375,
+0.1843, -0.1943, -0.3884, -0.3279, +0.2304, -0.4774, -0.2126,
-0.0953, -0.2638, -0.2560, +0.3985, -0.4843, +0.0108, -0.3235,
+0.4747, +0.0984, +0.4887, -0.0731, -0.1361, -0.2360, +0.5858,
+0.6585, -0.1947, +0.3593, -0.1992, +0.1642, -0.1906, +0.5165,
+0.3017, +0.1850, +0.4195, -0.5015, +0.4992, +0.1888, +0.2433,
-0.0199, +0.2201, +0.2489, -0.0059, +0.3244, +0.0615, -0.0830,
+0.0901, +0.0987, -0.1308, -0.2390, +0.3367, +0.1630, -0.0879,
-0.5759, -0.3706, +0.1402, +0.1441, -0.6210, +0.4549, +0.3207,
-0.0909, -0.3474, +0.0062, -0.2868, +0.4860, +0.3282, -0.0616,
+0.0435, -0.1916, -0.1337, +0.1767, -0.0441, +0.1377, -0.0714,
-0.2422, +0.4145, -0.2775, +0.3438, -0.2590, +0.2416, +0.0796,
+0.2678, -0.5077, -0.0722, +0.0602, +0.2200, +0.3370, -0.1364,
+0.3795, +0.2717, -0.1259, +0.3194, +0.0890, +0.4020, -0.6233,
+0.4707, -0.2599
],
[
+0.4315, -0.5242, +0.2993, +0.2586, -0.4536, +0.7252, +1.0447,
+0.6436, +0.6565, -0.0306, -0.3917, +0.0166, -0.8798, -0.1608,
-0.4328, +0.0445, +0.3390, +1.2367, +0.9440, +0.9838, -0.4572,
-0.4492, +0.4107, -0.0530, -0.4856, +1.1638, -0.2589, +0.6477,
-0.5231, -0.0183, -0.4494, -0.6078, +0.3157, +0.0966, +0.4945,
+0.7510, +0.4720, -0.5626, -0.6421, +0.6448, -0.5423, +0.1364,
-0.0387, -0.2223, -0.0231, -0.6804, +0.2425, -0.1449, -0.0750,
+0.4714, -0.4510, +0.8352, +0.1629, +0.0985, -0.1184, +1.0701,
+0.6010, -0.6381, -0.3502, -0.5364, -0.7213, +0.3615, +0.7297,
-0.7086, +0.6527, +0.3366, -0.2960, -0.8704, +0.0380, -0.8244,
-0.6834, -0.2081, -0.4857, -0.8519, -0.2393, -0.3309, -0.3599,
+0.1116, -0.4067, +0.5794, -0.5252, +0.2352, +0.2287, -1.0552,
-0.2218, -0.3554, -0.1419, -0.6236, -0.2989, -1.2390, -0.2218,
+0.4722, -0.1092, +0.3008, -0.0389, -0.3754, +1.4747, -0.2283,
+0.4314, -1.1489, -0.7093, +0.6276, +0.1810, +0.5491, -0.5756,
+0.3173, +0.6483, +0.8906, -0.4209, -0.5796, +1.0200, -0.6163,
-0.1214, -0.1258, +0.5805, +0.2950, +0.2307, +0.4381, +0.4400,
-0.1583, +0.5816, -0.2036, -0.5437, -0.4232, +0.0940, -0.2808,
+0.3216, -0.2525
],
[
+0.0742, +0.4380, -0.1123, +0.1466, -0.2904, +0.2372, -0.0534,
+0.1450, +0.4487, +0.1276, +0.2094, +0.2912, -0.4848, -0.1227,
-0.0124, +0.1027, -0.2706, -0.4136, +0.2279, +0.3685, +0.5077,
+0.4813, -0.2295, -0.0581, -0.2173, +0.0079, -0.4921, +0.0092,
+0.3458, +0.6057, -0.5006, -0.2395, +0.5917, +0.1108, +0.2833,
+0.2301, +0.1825, +0.1964, -0.0255, -0.0449, -0.0345, -1.0167,
+0.0476, -0.2173, +0.0279, +0.0429, +0.2997, +0.1938, -0.3537,
-0.2747, +0.2032, -0.2481, -0.0964, -0.7288, -0.4086, -0.3281,
-0.5330, -0.0353, +0.0908, -0.0745, -0.3914, -0.0477, +0.3210,
-0.4763, +0.4682, +0.1382, -0.1023, -0.4761, -0.3149, +0.2353,
-0.5013, +0.3278, +0.7215, +0.5220, +0.2365, +0.0376, +0.0850,
+0.0728, -0.5511, -0.2774, +0.3453, +0.5757, -0.4881, +0.1291,
+0.3019, -0.5095, -0.3132, -0.0783, +0.3169, +0.1090, -0.2678,
+0.0573, +0.0323, +0.4465, +0.2120, +0.1226, -0.2121, -0.5436,
-0.3721, -0.2470, +0.2039, -0.2365, -0.2653, -0.6544, +0.2113,
+0.0409, -0.2423, -0.0809, -0.3150, +0.4188, +0.2396, +0.0892,
-0.3252, +0.0785, -0.0765, +0.0001, -0.1093, +0.0154, +0.2728,
-0.3279, -0.5862, -0.3453, +0.3352, +0.2447, +0.1718, -0.0457,
+0.1011, +0.0055
],
[
+0.0624, +0.4458, +0.4019, +0.8994, -0.6486, -0.1769, +0.4868,
+0.9355, -0.2429, +0.7262, +0.6965, -0.0365, -0.6536, +0.3626,
-0.2547, -0.1860, +0.2543, +0.4959, -0.6441, +0.2759, +0.4728,
-0.7154, +0.4143, -0.5522, +0.4175, -0.4754, -0.2388, +0.6940,
+0.1767, -0.0695, -0.5299, -0.7597, +0.2607, +0.0011, -0.2511,
+0.2057, -0.2618, +0.8556, -0.0538, +0.6507, -0.0294, +0.0506,
+0.5690, +0.9084, +0.3703, +0.3960, +0.6274, -0.2553, -0.3905,
-0.4587, +0.6875, -0.7533, +0.2636, +0.0411, +0.0147, -0.4051,
-0.2924, +0.0527, -0.6806, -0.0558, +0.3568, +0.0074, +0.7132,
+0.3295, -0.4066, +0.7340, +0.1515, -0.5188, -0.5649, -0.2111,
+0.0307, +0.4785, +0.1403, +0.3972, +0.3874, -0.6252, -0.7443,
+0.3098, -0.0559, -0.4157, +0.0956, -0.5464, +0.1054, -0.0222,
-0.2876, -0.7069, -0.7060, -0.5730, -0.3187, -0.3308, +1.0375,
-0.8244, -0.9502, -0.0767, +0.5329, +0.1996, -0.0616, -0.7486,
-0.3553, +0.6040, -0.8704, +0.2485, +0.7603, -0.7057, -0.1106,
-0.2849, -0.3432, -0.4080, -0.3912, -0.0188, -0.3057, +0.2499,
-0.1263, -0.1666, -0.1307, -0.1352, +0.0337, -0.4882, -0.0702,
+0.1477, -0.0856, -0.2110, +0.4851, +0.0950, -0.1593, -0.0592,
+0.3819, -0.2539
],
[
-0.3277, +0.1814, -0.3611, -0.3536, +0.9558, -0.1371, -0.9228,
+0.7332, -0.1135, -0.3220, +0.4618, +0.0046, -0.1908, -0.1740,
-0.2697, +0.1673, -0.0277, +0.2209, -0.2079, +0.5537, +0.3612,
+0.2695, +0.3291, -0.8728, +0.4467, -0.2909, -0.1597, -0.6550,
-0.0407, -0.5847, +0.3041, +0.4567, -0.0534, -0.3562, -0.6015,
+0.5992, +0.5897, +0.2154, -0.2170, +0.1209, +0.2172, -0.0841,
+0.0595, -0.2743, +0.2453, -0.0516, +0.6076, -0.1599, -0.1639,
+0.6758, -0.6129, -0.4856, -0.1665, +0.2961, +0.1685, -0.2497,
+0.7368, -0.1308, -0.0867, +0.2630, -0.8968, -0.5963, -0.3214,
+0.1025, +0.1405, +0.1901, +0.5998, -0.3181, -0.4843, +0.5493,
-0.0508, +0.0764, -0.4598, +0.1588, +0.5656, -0.4946, +0.2046,
-0.3919, +0.0494, -0.1187, -0.3681, +0.2047, +0.0572, -0.0279,
+0.3694, -0.2163, +0.1243, -0.1322, +0.1684, -0.2716, -0.2936,
-0.1226, +0.3318, +0.5098, +0.5054, +0.6682, -0.1864, -0.6823,
-0.1102, -0.2002, -0.3101, -0.4739, +0.7084, +0.2078, -0.0477,
+0.5757, +0.2804, -0.0118, -0.1011, -0.4933, +0.1299, +0.0906,
+0.1697, +0.1583, +0.2360, -0.0804, +0.8859, -0.2989, +0.0533,
+0.2189, -0.4457, +0.3204, -0.3140, +0.0131, -0.1737, +0.2181,
-0.4677, -0.1006
],
[
-0.8126, +0.1990, +0.5124, -0.6074, +0.1914, +0.0813, -0.4273,
-0.9015, -0.6596, -0.7723, +0.0850, +0.8301, +0.3937, -0.0051,
-0.4537, +0.0449, +1.8714, -0.9737, -0.6382, +0.9047, +0.4053,
+0.6448, -0.6425, -0.2780, -0.5496, -0.7814, +0.1890, -0.0449,
+0.3741, -0.3408, -0.0122, +0.0116, -0.5959, +0.1219, -0.5759,
-0.1331, -0.4107, -0.0134, -0.3225, +0.2390, -0.2296, +0.9920,
-0.1071, +0.3630, +0.8198, +0.0303, +0.3771, -0.8828, +0.6714,
-0.1488, +0.0408, -0.3381, +0.3740, +0.6765, +0.2284, +0.1534,
+0.0127, -1.0164, +0.2159, +0.3989, -0.0969, +0.4181, -0.6163,
+0.2185, +0.5617, -0.5112, +0.2564, -0.2430, +0.2221, +0.7438,
+0.2085, -0.2271, -0.7645, +0.2447, +0.0580, -0.2986, -0.3843,
+0.4457, +1.1948, +0.3098, +0.4203, +0.1285, +0.1100, +0.0654,
+0.1632, -0.1969, +0.4257, -0.2921, -0.4148, -0.6491, +0.0640,
+1.0732, +0.3787, -0.8488, +0.7749, -0.6143, -0.3522, -0.6646,
-0.0218, -0.4335, +0.1399, +0.6476, -1.1843, -0.2402, -0.4294,
+0.9316, -0.2125, -0.4109, +1.2925, +0.3828, +0.3296, -0.0682,
-0.3338, +0.6236, +0.5535, -0.7328, +0.2679, -1.2653, +0.4066,
+1.0549, +0.7709, +0.1907, -0.0912, -0.5897, +0.4094, -0.2027,
-0.7482, +0.0041
],
[
+0.0151, -0.3742, +0.0016, +0.2834, +0.1383, +0.0585, -0.7797,
+0.2568, -0.2497, +0.0606, +0.1941, +0.1929, +0.0807, -0.0506,
+0.0821, +0.2228, +0.0671, -0.3058, +0.1571, +0.0677, -0.2029,
+0.2194, -0.2530, +0.0500, -0.4600, -0.2309, -0.0687, -0.3576,
+0.0130, -0.0976, -0.0143, +0.1618, -0.3840, -0.0062, +0.1015,
+0.2622, +0.0436, -0.2084, -0.3667, -0.0176, +0.3798, -0.1638,
+0.3623, +0.0450, +0.1132, -0.2585, +0.3003, +0.0910, -0.3317,
-0.3344, -0.0952, -0.2291, +0.2999, -0.0652, +0.2557, -0.3650,
+0.0745, +0.0989, +0.1088, +0.2606, -0.3433, -0.2269, +0.1071,
-0.4127, +0.0438, -0.0027, -0.4558, -0.8596, -0.0528, -0.3395,
+0.2788, -0.0144, -0.5132, -0.1118, +0.1520, +0.1987, -0.6925,
-0.3463, -0.5606, +0.2373, -0.0452, -0.1289, +0.4662, -0.3166,
+0.0866, +0.2533, +0.4591, -0.0308, -0.3316, +0.1370, -0.1116,
-0.1013, -0.0797, +0.1959, -0.4299, -0.1954, +0.2309, +0.2581,
-0.0489, +0.1615, +0.6893, +0.1740, +0.1636, -0.1154, +0.3753,
+0.0447, +0.0770, +0.1540, -0.2353, +0.2607, -0.1375, +0.2752,
+0.0977, -0.1261, +0.6568, +0.0207, +0.1612, +0.2390, -0.7583,
-0.0295, -0.1044, -0.3573, -0.0536, +0.1232, -0.4262, +0.0862,
-0.0726, +0.3601
],
[
-0.5548, -0.1920, -0.1439, -0.2483, -0.2082, +0.2122, +0.2975,
-0.0369, +0.1039, +0.1244, -0.2222, -0.4510, -0.0367, -0.3843,
+0.0420, -0.0774, -0.4945, -0.1076, +0.0751, -0.3280, +0.1379,
-0.3938, -0.3873, +0.3270, +0.0236, +0.0715, +0.0896, +0.1184,
-0.2641, +0.0510, -0.3702, +0.0130, +0.3300, +0.0556, +0.2294,
+0.1442, -0.1642, +0.2728, -0.2139, +0.0856, +0.2201, -0.1087,
+0.3973, -0.1710, -0.3188, -0.2484, -0.2577, +0.4702, -0.4588,
-0.1338, -0.0958, -0.1490, -0.0467, +0.2776, -0.1214, +0.0956,
-0.2453, -0.1851, -0.6091, -0.2544, -0.0672, +0.0316, -0.2612,
-0.1510, +0.0608, -0.4044, -0.5566, -0.3592, -0.5053, -0.2740,
-0.5723, -0.2479, -0.3828, -0.0039, +0.2360, -0.3965, +0.2531,
-0.2019, -0.5607, +0.1221, -0.0773, -0.0489, -0.4456, -0.0804,
+0.0646, +0.2497, -0.4190, +0.0741, -0.6103, -0.4852, +0.0652,
+0.1799, +0.2872, -0.4064, +0.1900, +0.0633, +0.0661, +0.0996,
-0.2651, -0.0885, -0.2680, -0.5878, -0.1839, +0.2367, +0.3337,
+0.1498, -0.3725, +0.3615, -0.5109, -0.1843, -0.1727, -0.1397,
+0.1574, +0.0561, +0.3344, +0.0321, +0.0132, +0.0869, -0.2513,
+0.2337, -0.2482, -0.0790, +0.1544, -0.3034, -0.1849, +0.0757,
-0.2174, -0.5574
],
[
+0.5490, -0.4549, -0.1807, -0.1592, -0.3788, -0.5189, -0.3193,
-0.2197, +0.1731, +0.0376, -0.0203, +0.1929, +0.2335, -0.1647,
-0.1995, +0.0219, +0.0582, +0.4244, -0.5565, +0.0563, -0.1738,
+0.0395, +0.3419, -0.4511, +0.3530, -0.0868, +0.1509, -0.3145,
+0.1942, -0.5813, -0.5611, -0.2145, +0.3324, -0.1938, -0.1914,
-0.1679, +0.1673, +0.0441, -0.1303, -0.0111, -0.5023, -0.2911,
+0.2364, -0.0646, -0.0100, -0.0791, +0.2281, -0.1580, +0.5276,
-0.0730, +0.3710, -0.0632, -0.2827, -0.4295, -0.9110, -0.0882,
-0.0346, -0.1583, -0.7173, -0.1413, -0.6280, +0.1766, -0.2437,
-0.3187, -0.2748, -0.1086, -0.2328, +0.3354, -0.3041, -0.0570,
+0.1021, -0.3893, +0.0137, -0.1443, +0.2737, -0.0007, -0.3881,
+0.1483, +0.5163, -0.3890, -0.2129, -0.0672, +0.0883, +0.3756,
-0.5196, -0.0377, +0.3687, +0.0005, -0.0266, -0.5761, -0.1695,
-0.3244, +0.2822, +0.5312, -0.4635, +0.0570, +0.1477, -0.0760,
-0.0655, -0.0777, -0.3997, -0.6029, +0.0564, -0.4778, -0.3137,
-0.5685, -0.1534, -0.1205, -0.1739, +0.3745, +0.1266, -0.1687,
-0.7521, +0.1720, -0.6872, +0.2064, -0.1344, +0.1887, -0.1305,
+0.2296, -0.2478, +0.1684, -0.0571, -0.0419, -0.3555, +0.0154,
-0.3511, -0.0239
],
[
-0.3780, -0.0914, -0.1854, -0.0867, +0.0707, -0.0432, +0.1008,
-1.0046, +0.1248, +0.0778, -0.0427, +0.2416, +0.0008, -0.0101,
-0.4476, -0.5558, +0.0581, -0.6113, -0.2540, -0.6178, -0.4318,
-0.3423, +0.3608, -0.1651, -0.3607, +0.1386, -0.3745, +0.0981,
-0.4823, +0.0222, +0.2264, -0.2605, +0.3376, +0.3309, -0.2458,
-0.4256, -0.2320, -0.1249, +0.0601, +0.4954, +0.0609, -0.0214,
-0.5550, -0.5377, -0.1116, +0.3434, +0.2198, -0.2050, -0.1425,
-0.1160, -0.1088, +0.3296, -0.1532, -0.1229, -0.1750, -0.2386,
+0.2166, +0.1215, +0.1890, -0.4310, -0.2282, -0.0927, -0.1166,
+0.1719, -0.4427, +0.0348, -0.3925, -0.0549, -0.1108, +0.1640,
+0.1764, +0.2961, +0.4874, -0.5198, -0.1629, -0.1281, +0.0984,
+0.2756, -0.3100, +0.4790, -0.1045, -0.1158, -0.1894, -0.0491,
+0.2014, -0.1137, -0.3516, -0.3540, -0.2153, +0.1554, -0.2093,
-0.7217, -0.0483, -0.1205, -0.0052, +0.0623, -0.9125, -0.2332,
-0.4875, +0.5284, +0.3595, +0.2822, +0.0158, -0.4752, -0.1192,
+0.2230, -0.0346, -0.7476, +0.1063, +0.2522, -0.4063, -0.1613,
-0.0444, -0.1514, -0.1480, -0.0707, -0.0311, -0.6826, +0.0449,
-0.0401, -0.0937, -0.1488, -0.0981, -0.3116, +0.5926, -0.7581,
+0.4659, -0.1110
]])
weights_dense1_b = np.array([
-0.0148, -0.0390, -0.2168, -0.0866, -0.0677, -0.1575, +0.0077, -0.1385,
-0.0953, -0.2318, -0.1402, -0.0267, -0.0565, -0.1655, -0.0944, -0.1856,
+0.1183, -0.0606, -0.1517, -0.1972, -0.0256, -0.1761, -0.2543, -0.1125,
-0.1902, -0.1462, +0.0160, -0.2130, -0.1644, +0.0530, -0.0384, -0.1030,
-0.1822, -0.0219, -0.1597, -0.1946, -0.1177, -0.1970, -0.1569, -0.2162,
-0.0256, -0.2618, -0.2127, -0.0910, -0.1862, -0.0517, -0.0811, -0.2137,
+0.0810, -0.2098, -0.2763, -0.0980, -0.0986, -0.0983, -0.2186, -0.1723,
-0.0822, -0.1072, -0.1466, -0.3015, +0.2120, -0.0178, +0.0700, -0.1122,
-0.2641, -0.1767, -0.0722, +0.0859, -0.3453, -0.2988, -0.0838, -0.1928,
-0.0916, -0.1749, -0.0969, -0.2420, -0.0859, -0.1487, -0.0692, -0.0028,
-0.0989, -0.1322, -0.0582, -0.2906, -0.1255, -0.0026, +0.0352, -0.2485,
-0.0592, -0.0695, -0.1047, -0.1616, -0.2268, -0.1474, -0.2683, +0.1161,
-0.1794, -0.1011, -0.1924, +0.0348, -0.0169, -0.3281, -0.2085, -0.2750,
-0.3329, -0.1793, -0.2296, -0.2289, -0.1589, -0.3225, +0.0159, -0.2951,
-0.0156, -0.0544, -0.1193, -0.1563, -0.1691, -0.1292, +0.0228, -0.2741,
-0.0235, -0.0564, +0.1007, -0.0648, -0.1383, -0.0235, -0.0557, -0.0005
])
weights_dense2_w = np.array(
[[
+0.0547, +0.0221, +0.0159, -0.3500, +0.1057, -0.3978, -0.4751, -0.2686,
-0.2984, -0.3477, -0.7638, +0.3041, -0.9283, +0.3769, +0.3866, +0.1042,
-0.5446, -1.0826, -0.3685, +0.0957, -1.1452, +0.4594, -0.2719, -0.5546,
-0.4310, +0.4055, +0.3174, -0.6414, +0.4058, +0.0122, -0.6446, +0.0312,
-0.2846, +0.3681, -0.2635, +0.4684, -0.0438, -0.1535, +0.0279, -0.3398,
+0.0489, +0.2915, -0.2513, -1.0484, +0.1129, -0.7923, +0.1379, -0.2217,
+0.1685, -0.0273, +0.2727, -0.1051, -0.3335, +0.4067, +0.1543, -0.0099,
-0.2005, -0.5140, -0.1314, -0.0537, -0.6073, -0.2714, +0.4734, +0.0307
],
[
+0.1983, -0.4372, +0.2649, -0.6106, -0.5667, +0.2295, +0.2821,
-0.1570, +0.1007, +0.0072, +0.1053, +0.1223, +0.5393, +0.0445,
+0.4042, +0.1218, +0.1946, +0.3514, +0.6725, +0.3489, -0.2839,
-0.3705, +0.2665, +0.2710, +0.2836, +0.1292, -0.2779, -0.3549,
-0.6220, -0.0934, -0.6794, +0.2522, -0.0012, -0.7044, +0.0819,
-0.1884, -0.5545, +0.2331, +0.0573, +0.1692, +0.3610, -0.5304,
+0.0751, +0.4747, -0.1379, +0.1396, -0.1418, +0.2756, -0.3771,
-0.5534, -0.7892, -0.5082, -0.4949, -0.5125, +0.3863, -0.4106,
-0.3488, +0.3701, -0.0261, -0.2519, +0.3600, -0.0131, -0.5443, -0.2148
],
[
-0.4168, +0.0202, -0.3568, +0.3985, +0.0842, -0.1247, -0.1143,
+0.3105, +0.0295, +0.1222, -0.9825, +0.2732, +0.1502, -0.1901,
+0.2854, -0.0271, +0.2689, +0.2394, -0.0163, +0.3020, +0.1345,
+0.2447, -0.1126, -0.5997, -0.1411, +0.3111, +0.1018, -0.1057,
-0.2686, -0.0710, -0.2928, -0.0877, -0.5635, -0.0538, +0.0074,
+0.0630, -0.9421, -0.1443, -0.7025, -0.5890, -0.2607, -0.3678,
-0.9102, -0.0042, -0.0763, -0.2665, +0.2550, -0.1257, -0.0960,
-0.4207, -0.3315, +0.3159, -0.1579, +0.6020, +0.1635, -0.1936,
+0.1230, -0.0245, -0.1494, -0.1828, -0.1856, -1.0757, -0.9589, -0.2000
],
[
+0.3752, -0.3057, +0.3341, -0.2068, +0.3930, -0.3313, -0.3786,
+0.2107, +0.0767, +0.2396, +0.4759, +0.4447, -0.0988, -0.3320,
-0.3001, +0.1111, -0.3114, -0.0926, +0.5017, -0.0114, -0.2243,
-0.0705, -0.2502, +0.1573, -0.5134, -0.0888, +0.3586, +0.1723,
+0.1582, +0.3832, -0.4192, -0.3290, +0.1729, +0.0234, +0.3742,
+0.2108, +0.0021, +0.1886, +0.4553, -0.0405, -0.2013, +0.0391,
+0.0099, -0.3560, -0.2403, -0.5404, -0.0850, -1.1031, +0.2303,
+0.2130, -0.0970, -0.0781, -0.1787, +0.0094, +0.0652, +0.0435,
+0.1182, -0.3572, -0.1822, +0.3167, -0.4896, -0.3626, -0.1668, -0.2644
],
[
-0.3002, -0.1710, +0.0482, -0.2977, +0.6775, +0.2932, +0.3891,
-0.1426, -0.3008, +0.1301, -0.6758, -0.1576, +0.1714, +0.3555,
-0.6530, +0.2284, -0.5148, -0.2974, +0.1985, -0.0305, +0.5279,
-0.3357, -0.4142, -0.2472, -0.0224, -0.1873, +0.1376, -0.4045,
+0.1122, +0.2617, +0.4392, -0.1154, -0.2372, -0.0144, +0.0885,
-0.4898, +0.1629, +0.2722, -0.4575, -0.2204, +0.5557, -0.3414,
+0.1573, -0.0259, +0.0639, -0.1291, -0.6438, -0.6169, +0.2151,
-0.0527, +0.1338, +0.1200, +0.0151, -0.4535, +0.3047, -0.4136,
-0.0690, -0.8133, -0.3369, -0.2327, +0.3387, -0.6738, -0.2590, -0.2750
],
[
-0.5166, -0.2531, -0.5999, -0.0659, -0.0589, -0.1377, -0.0247,
-0.3631, -0.1956, +0.2281, +0.0912, +0.2150, -0.0213, -0.2618,
-0.3139, -0.6331, +0.2083, +0.0745, -0.0525, +0.4477, +0.2109,
-0.1076, +0.3572, +0.4534, -0.2742, -0.0868, -0.4000, +0.3491,
+0.0116, +0.1590, -0.0994, +0.0526, -0.3198, -0.2717, -0.1091,
+0.2476, -0.6484, -0.0838, +0.1230, -1.4295, -0.4766, -0.0778,
-0.5194, -1.0485, -0.4056, +0.5590, +0.1986, +0.0920, -0.2564,
-0.0405, +0.1153, +0.0622, +0.1561, +0.6891, -0.2484, +0.3777,
+0.4026, +0.4245, +0.5501, -0.2535, +0.1263, -0.5236, -0.3086, -0.4384
],
[
+0.0267, +0.4426, -0.1992, +0.0821, -0.9791, -0.3588, -0.4260,
-0.1455, -0.0490, -0.1547, -0.2543, -0.3684, +0.3642, -0.0006,
-0.3487, -0.0551, +0.0879, +0.1316, -0.5557, +0.5368, -0.0159,
+0.3170, -0.1802, -0.6798, +0.0029, -0.2864, -0.0650, +0.1866,
+0.0697, +0.5808, -0.1085, -0.2594, +0.3730, -0.0222, +0.0780,
-0.1649, -0.7503, +0.2781, +0.2997, -0.6883, -0.2393, -0.9101,
-0.3439, -0.0368, +0.2190, -0.1207, +0.1521, -0.6376, +0.5755,
-0.2450, +0.2238, -0.3727, +0.0233, +0.0576, -0.1159, +0.4381,
+0.1958, +0.0134, +0.3485, -0.4711, +0.2344, +0.0854, -1.0917, +0.3356
],
[
+0.3785, +0.3636, -0.3251, +0.3122, +0.2442, -0.5955, -0.0093,
-0.3778, -0.2082, -0.1958, -0.8252, +0.1736, +0.1166, +0.8199,
+0.3367, -0.1289, +0.4549, +0.2460, +0.1128, +0.3572, -0.2274,
-0.2742, -0.5444, -0.1523, +0.0356, +0.3113, +0.0246, -0.5069,
-0.3344, +0.1946, +0.0670, +0.1407, +0.7479, +0.3682, +0.8027,
+0.2609, -0.4183, -0.1806, +0.1140, +0.2086, +0.0652, +0.0760,
+0.2543, -0.7174, -0.5935, -0.2738, +0.1096, -0.4978, +0.4936,
-0.2776, +0.6209, +0.1223, -0.4159, -0.2111, +0.2914, -0.3457,
-0.2449, +0.0895, +0.0807, +0.5205, -0.2385, -0.1925, +0.1622, +0.0880
],
[
-0.2673, -0.3082, +0.5204, +0.3821, +0.2027, -0.0957, +0.3922,
-0.0725, +0.0775, -0.1621, +0.1395, -0.0934, -0.5586, +0.4102,
+0.4102, -0.0876, -0.8250, -0.3138, +0.0615, +0.0265, -0.8760,
+0.3662, +0.3313, -0.0017, +0.2562, +0.0531, +0.0796, +0.0291,
+0.1880, -0.2079, -1.4376, +0.0385, -0.4895, +0.4806, -0.4420,
-0.4066, +0.1672, +0.0695, -1.0768, +0.0349, -0.5809, +0.0600,
+0.0560, -0.1884, +0.1944, -0.4875, -0.2761, -0.1072, -0.5009,
+0.2840, +0.0430, -0.4216, -0.5786, +0.0545, +0.1343, +0.3776,
+0.3305, +0.4333, +0.0847, +0.4369, -0.0030, +0.0307, +0.3003, +0.2691
],
[
+0.0893, -0.4704, -0.2054, +0.3949, -0.2963, -0.2947, -0.3435,
+0.3517, -0.8073, +0.0914, +0.2846, +0.0485, -0.1339, +0.1669,
-0.2241, -0.7245, -0.5583, -0.0823, -0.3668, +0.0645, -0.1111,
-0.3214, -0.3099, +0.1846, +0.3734, +0.0287, -0.2115, +0.0354,
+0.3143, -0.1244, +0.0086, -0.0529, +0.2437, -0.3184, +0.4261,
+0.0090, -0.1972, -0.2668, -0.0503, -0.3085, +0.0711, +0.0746,
+0.0209, -0.2126, -0.0542, -0.0856, -0.0140, -0.5341, +0.3074,
+0.6249, -0.0955, +0.1454, -0.0128, +0.1829, -0.3874, -1.1490,
+0.3613, -0.0753, +0.2431, +0.0126, -0.4169, +0.4549, -0.2987, +0.1634
],
[
+0.2796, -0.8066, -0.1895, +0.0652, +0.0235, -0.0806, -0.6463,
+0.2801, -0.1388, +0.2654, +0.1312, +0.2453, -0.3954, -0.6161,
-0.0602, +0.0419, +0.1494, +0.2994, +0.2134, -0.1138, -0.1966,
-0.3912, -0.4885, -0.4361, +0.0082, +0.2686, +0.5057, +0.2438,
+0.2241, +0.2533, +0.0221, +0.2056, -0.3449, +0.1963, -0.1053,
+0.1093, +0.2248, -0.1142, +0.3292, -0.0353, -0.1378, -0.4590,
+0.1552, -0.6599, -0.4846, -0.2242, +0.7134, -1.2819, -0.2578,
+0.0916, +0.4744, -0.1979, -0.2302, +0.0517, +0.1801, -0.0128,
+0.2979, -0.6418, -0.4409, -0.1068, -0.3446, +0.0824, +0.1677, -0.2113
],
[
+0.0620, +0.0141, +0.8828, +0.1967, -0.2820, -0.3151, -0.4239,
-0.0684, +0.2535, -0.1108, -0.4921, +0.1686, -0.1226, +0.0875,
-0.4216, +0.2957, +0.2862, +0.0746, -0.1089, +0.0779, +0.0448,
-0.1151, +0.2984, -0.2249, -0.1200, -0.1098, +0.4338, -0.3360,
+0.0512, -0.1089, -0.1694, -0.0086, +0.2826, -0.0504, +0.0745,
+0.1197, -0.1845, -0.0413, +0.0941, +0.1136, -0.7052, -0.9186,
-0.2386, -0.1812, -0.0689, -0.7612, -0.4205, +0.2777, +0.5319,
-0.3707, -0.2872, +0.0674, +0.1655, +0.3701, -0.4204, -0.0941,
+0.0053, +0.1772, -0.8221, +0.3939, +0.0265, -0.0402, -0.4258, -0.4838
],
[
+0.0312, +0.4064, -0.0163, -0.3321, +0.2323, -0.2347, +0.1756,
-0.1976, +0.0030, -0.3264, +0.1410, -0.8448, -0.1253, -0.1722,
+0.0647, -0.6614, +0.0124, -0.5357, -0.2659, -0.5198, -0.1104,
+0.0036, +0.5971, +0.2923, +0.2818, -0.3823, +0.1973, -0.0398,
+0.5571, +0.1238, +0.2223, -0.1846, +0.0045, +0.2834, +0.2652,
-0.5670, +0.1025, +0.0954, -0.6847, +0.2716, -0.1995, +0.2227,
-0.0417, -0.5204, -0.4656, +0.0143, +0.1697, +0.2654, -0.0200,
+0.0227, -0.1669, +0.0093, +0.1622, -1.0894, +0.3023, -0.0433,
-0.8114, -0.3466, -0.0044, -0.4344, +0.5942, -0.2995, +0.2493, -0.2656
],
[
+0.0884, -0.1168, +0.2659, -0.2658, -0.0894, -0.3646, +0.0123,
-0.2345, -0.1249, -0.5543, -0.4367, +0.0704, +0.1846, -0.5260,
-0.0185, -0.1435, -0.0243, +0.2774, -0.1795, -0.2214, +0.0297,
+0.1819, +0.0135, +0.0257, +0.1465, +0.5108, -0.0764, -0.2536,
+0.1924, -0.3582, -0.1813, -0.2825, +0.1625, -0.4450, +0.1806,
+0.2287, +0.1214, -0.2687, +0.1684, -0.4179, -0.1748, -1.4161,
+0.0182, +0.3509, +0.2804, +0.1512, -0.4392, +0.1313, +0.0852,
-0.6827, +0.0465, -0.1457, +0.0937, +0.4504, -0.2384, -0.2387,
-0.5351, -0.4227, +0.2521, -0.1205, +0.3281, -0.4157, -0.0388, -0.0779
],
[
-0.4328, +0.1671, -0.2333, +0.3447, +0.2475, -0.0963, -0.0289,
-0.1134, -0.6314, -0.0779, -0.0052, -0.5183, +0.1591, -0.1890,
-0.1690, -1.2456, +0.1215, -0.7981, -0.7112, -0.1237, -0.4438,
+0.2475, +0.2704, -0.3184, +0.0800, -0.3449, +0.1936, -0.2232,
+0.0352, -0.0664, -0.0191, +0.1109, -0.1613, +0.1971, -0.2887,
-0.6279, +0.4588, +0.2611, +0.0068, -0.1602, +0.1105, +0.1328,
+0.2169, +0.0899, -0.4866, -0.2267, +0.0581, -0.2022, -0.7508,
+0.0740, -0.6069, +0.5649, +0.0207, +0.1216, -0.1130, -0.8590,
+0.0055, -0.0647, +0.3094, -0.3780, -0.2064, +0.4434, -0.4378, +0.2624
],
[
-0.1505, +0.4615, -0.9363, +0.1984, -0.2306, +0.1047, +0.2547,
-0.4131, -0.2132, -0.6349, +0.0660, -0.0981, +0.3538, +0.5521,
-0.1076, -0.4321, -0.2629, -0.2857, -0.1064, +0.1612, -0.5917,
+0.1856, +0.2716, -0.6279, +0.2015, +0.0297, +0.1344, -0.6113,
+0.1501, -0.0768, +0.3218, +0.5261, +0.0611, +0.1559, +0.5267,
+0.0392, -0.4469, -0.3359, +0.3373, +0.1011, +0.0721, -0.0051,
-0.3831, -1.0682, +0.3176, +0.0177, +0.1255, -0.0222, +0.2602,
-0.0707, +0.6271, +0.0442, -0.7024, +0.3064, -0.6523, -0.1607,
-0.1061, +0.6141, +0.2525, +0.4590, -0.1475, -0.2303, -0.1497, +0.1568
],
[
-0.6547, +0.1965, +0.5732, +0.0585, -0.7985, +0.2784, +0.1409,
+0.3753, +0.5077, -0.2973, +0.4522, -0.0481, -0.0250, -0.1732,
-0.0189, +0.1741, +0.1811, -0.5026, +0.3383, -0.2984, -0.1815,
-0.2687, +0.1435, -0.5299, -0.5446, +0.2488, +0.0848, +0.2456,
-0.6651, -0.4723, -0.2933, -0.2168, +0.1354, -0.1201, +0.7322,
+0.3879, -0.5529, +0.0442, +0.1429, +0.2459, -0.3643, -1.2003,
-0.0014, -0.0881, -0.2888, -0.1497, -0.4499, +0.2563, +0.1399,
+0.3984, -0.3034, -0.2152, -0.1062, -0.0971, +0.4006, -0.2250,
-0.3419, -0.2266, -0.3736, +0.5701, -0.6925, -0.0455, -0.0159, -0.5060
],
[
+0.2558, +0.0784, +0.5193, +0.1619, +0.2345, -0.3461, +0.1533,
+0.0035, -0.6782, -0.8183, -0.9718, +0.4590, +0.1314, +0.2691,
+0.0578, +0.3015, +0.1275, -0.2170, -0.1059, -0.3437, +0.2150,
-0.0420, -0.1466, -0.3230, -0.2263, -0.2463, +0.3428, -0.2851,
-0.1670, +0.8334, -0.3321, -0.5703, +0.4210, -0.3807, +0.5608,
+0.1184, +0.0216, +0.3875, -0.0818, -0.3773, +0.2697, +0.0836,
-0.5769, +0.1107, +0.2502, +0.1319, +0.1555, -0.5250, -0.0333,
-0.2451, -0.0840, -0.2520, -0.5473, +0.5264, -0.2354, -0.4220,
-0.0929, -1.0100, -0.2290, +0.3894, +0.1722, +0.2778, +0.2404, +0.5252
],
[
+0.3719, -0.1570, +0.0631, -0.1366, -0.0117, +0.1695, +0.2635,
-0.5559, -0.5966, +0.0401, +0.4796, -0.0389, +0.4392, -0.1852,
+0.4559, +0.0249, +0.1135, +0.1914, -0.0850, +0.8742, +0.3766,
-1.2051, +0.1491, +0.3556, -0.6834, -0.6127, -0.3816, -0.2803,
-0.9287, -0.6655, +0.4073, -0.1513, +0.3072, -0.1859, -0.6259,
-0.1803, +0.0372, +0.0066, +0.0768, +0.3041, +0.4044, +0.2719,
+0.0495, -0.4712, -0.0753, -0.1619, +0.4040, +0.3667, -1.2573,
-0.0153, +0.2433, -0.4797, -0.1008, +0.2793, -0.5162, +0.0750,
-0.1875, +0.6019, +0.2983, -0.2629, +0.3859, -0.1606, -0.0607, +0.2640
],
[
-0.7689, +0.1244, -0.0722, +0.1658, +0.0536, +0.0774, -0.0666,
-0.3190, +0.3863, +0.0221, +0.3311, -0.0757, +0.2848, -0.4570,
+0.1558, +0.1559, +0.1904, +0.2411, -0.0255, +0.2793, +0.2985,
-0.3438, +0.0476, -0.4403, -0.5639, +0.1262, -0.2366, -0.5360,
-0.0511, +0.1175, -0.2260, -0.4008, -0.3002, -0.7550, -0.7351,
-0.0725, -0.3370, +0.5923, -0.2017, +0.1863, +0.3965, -0.3253,
-0.0685, +0.0485, -0.0183, +0.1959, +0.2554, -0.1661, -0.9667,
+0.1877, -0.1062, -0.4295, -0.2307, +0.0769, +0.1511, -0.7353,
-0.4450, +0.2015, -0.3559, +0.6302, +0.1058, +0.3851, +0.0694, -0.5665
],
[
+0.2654, -0.7518, +0.1643, -0.0339, -0.0219, -0.0515, +0.4850,
+0.1158, -0.3727, +0.1568, -0.2977, +0.3162, +0.0700, -0.4247,
+0.2545, +0.2225, -0.0498, +0.4013, -0.1575, -0.3545, -0.2154,
-0.9544, -0.0608, +0.2827, +0.2211, +0.1790, -0.0234, -0.1396,
-1.2595, -0.1827, +0.2853, +0.0978, +0.1027, -0.2280, -0.5227,
-0.5996, +0.2517, +0.3419, +0.4186, +0.4399, +0.4078, -0.3085,
+0.1905, +0.3559, -0.1620, +0.3125, -0.0422, +0.1617, -0.0414,
+0.4358, -0.4426, -0.4533, -0.7251, -0.4293, +0.0632, +0.0825,
+0.1159, +0.6398, +0.2352, +0.3725, +0.3426, +0.1757, -0.2817, -0.5600
],
[
+0.0965, +0.1435, -0.0668, -0.0310, +0.0492, +0.3276, +0.0812,
+0.1402, +0.0513, -1.0857, -0.1374, -1.0262, -0.7472, +0.1752,
+0.1458, -0.3731, -0.2896, +0.1206, +0.2268, -0.4120, +0.2665,
-0.4842, -0.0096, -0.3069, -0.0961, -0.1954, +0.3195, -0.4060,
-0.2027, +0.1026, +0.3581, +0.0684, +0.2964, -0.3857, +0.3346,
+0.2853, -0.1779, +0.6816, -0.1396, -0.1068, +0.0874, +0.2093,
+0.0690, -0.1075, +0.3425, +0.0184, +0.5206, +0.3363, +0.2432,
+0.1155, -0.4405, -0.4702, +0.0007, -0.6360, -0.1712, +0.0258,
+0.1292, +0.1699, +0.0017, +0.1035, -0.0856, +0.3821, +0.0642, -0.1730
],
[
-0.2957, -1.8336, +0.0635, -0.1502, -0.3054, -0.0347, +0.4553,
-1.5017, -0.1386, +0.2204, -1.5949, -0.1060, +0.0207, -0.3453,
+0.1805, +0.1862, +0.1077, +0.0503, +0.4847, +0.0824, -0.1334,
+0.1013, -0.0132, -0.2091, -0.0147, +0.3173, -0.5393, -0.1905,
-0.6108, -0.4315, +0.1379, +0.3715, +0.4988, +0.0204, -1.0445,
-0.7534, +0.3054, +0.1166, -0.2072, +0.2696, -0.0510, -0.2593,
-0.1224, -0.7100, -0.0739, -0.4827, +0.2711, -0.1706, +0.3453,
+0.2951, +0.0905, -0.7676, +0.3072, +0.4110, -0.7400, -0.0282,
+0.3160, +0.0045, +0.3315, -0.1876, -0.5153, -0.0300, +0.0528, -0.0902
],
[
-0.0392, -0.2831, -0.8638, +0.0181, -0.1839, +0.1190, +0.1256,
+0.0349, +0.0335, +0.3621, +0.0015, -0.0992, -0.2544, -0.6373,
-0.5993, +0.3642, +0.0229, -1.3911, +0.0442, +0.3622, -0.0907,
+0.0980, -0.1975, +0.2308, -1.1896, -0.4979, +0.1135, -0.0943,
+0.0679, -0.0002, -0.0083, -0.8543, +0.2544, -0.0756, -0.9005,
-0.0970, -0.0499, +0.2011, -0.0504, -0.4152, -0.1189, +0.0047,
+0.1132, +0.1040, -0.0365, -0.1372, +0.0665, -0.3832, -0.3141,
+0.0644, -0.0858, -0.2961, +0.2374, +0.3307, +0.2823, -0.0944,
-0.1386, -0.1009, +0.1643, -0.8802, -0.2065, +0.2246, +0.1913, -0.0572
],
[
-0.1170, -0.4247, +0.2971, -0.0218, +0.2794, -0.3040, +0.1894,
-0.0772, -0.4478, +0.0155, -0.8504, -0.2509, -0.0805, +0.0955,
+0.2145, +0.3553, -0.4790, +0.0649, -0.0476, -0.0949, -0.0201,
+0.0573, +0.1713, +0.0237, -0.1585, +0.2141, -0.3027, -0.2567,
-0.1553, +0.1717, -0.2864, +0.1060, -0.0100, -0.7441, -0.0440,
-0.5248, +0.4325, +0.0117, -0.0124, +0.4722, +0.3972, +0.3061,
-0.0881, +0.0888, +0.1247, +0.0465, -0.3472, +0.0608, +0.1640,
+0.0900, +0.0040, -0.2854, -0.3570, -0.2206, +0.4373, -0.0944,
-0.0799, -1.0422, +0.0771, -0.6116, +0.5273, -0.0734, +0.0059, +0.0125
],
[
-0.1478, -0.0775, -0.4148, +0.2235, +0.0244, -0.4050, -0.1933,
-0.1451, +0.3546, +0.4780, -0.0377, +0.3747, -0.2634, +0.1820,
-0.2871, -0.0375, -0.1472, -1.0087, +0.3116, +0.0882, +0.1714,
-0.1267, +0.0243, +0.1244, -0.6763, +0.3206, +0.1243, +0.3372,
+0.0311, +0.2017, -0.1272, +0.1254, +0.2171, +0.1646, -0.3122,
-0.2863, -0.0401, +0.0408, +0.2649, -0.9490, +0.1101, +0.0612,
+0.0200, +0.0067, -0.1735, +0.4192, +0.5672, -0.4306, -0.2337,
+0.1219, -0.0581, -0.6563, +0.2676, +0.0907, +0.0774, +0.3393,
+0.3514, -0.5195, +0.2571, -1.0322, -0.3714, +0.1705, -0.2050, -0.1214
],
[
+0.2841, +0.2037, +0.0734, -0.3167, -0.2534, +0.3772, +0.3707,
-0.0807, +0.2971, +0.1787, +0.0742, -0.7424, +0.0534, -0.6033,
-0.2538, -0.1693, -0.0417, +0.1408, -0.0786, +0.0125, -0.2959,
+0.3026, +0.1068, +0.3710, -0.0259, -0.2119, +0.2311, +0.1579,
+0.4271, -0.1637, -0.1047, -1.4823, +0.1537, -0.6320, +0.0265,
-0.3799, +0.2478, -0.5812, -0.1404, -0.0219, -0.1906, -0.0507,
+0.1606, +0.3727, +0.2747, +0.0747, -0.1603, +0.3651, +0.0592,
-0.2988, +0.1446, -0.4449, +0.0282, +0.1628, +0.1572, -0.9307,
-0.5926, +0.0564, +0.4344, -0.2915, -0.0055, -0.0388, -0.2319, +0.0708
],
[
-0.1260, -1.1956, -0.3519, -0.1696, -0.5884, -0.3108, -0.2285,
+0.2627, +0.3962, +0.0449, +0.0626, +0.2328, +0.0144, +0.1303,
+0.3914, -0.8420, +0.4524, -0.4737, -0.5874, -0.2379, -0.0688,
-0.0159, +0.1504, -0.8424, -0.3590, -0.3149, -0.3955, -0.0819,
-0.2932, +0.1551, -0.0380, -0.3986, -0.0895, -1.1964, +0.2346,
+0.0107, -0.5550, +0.0978, -0.2178, -0.0702, +0.0130, -0.0487,
+0.1236, +0.2701, -0.0855, -0.6003, +0.0025, -0.4898, -0.4901,
+0.3732, -0.1348, -0.0001, +0.0022, +0.4124, -0.2319, -0.8846,
+0.1981, +0.3517, +0.3260, +0.2913, -0.6865, -0.1172, -0.1017, -0.2988
],
[
-0.1994, -0.0318, -0.6611, +0.0667, +0.0348, -0.2005, -0.0708,
-0.8554, -0.2964, +0.1114, +0.2106, -0.3456, +0.0631, -0.6458,
-0.4482, +0.4112, +0.4312, +0.0396, -0.8510, +0.3383, -0.3657,
-0.3998, -0.0279, -0.3247, +0.2809, +0.0671, -0.1980, -0.3156,
-0.1614, +0.1241, +0.1267, +0.0882, -0.8523, +0.3680, -0.1008,
+0.3258, +0.7330, -0.0226, +0.2324, +0.2983, -0.4784, -0.0821,
-0.3784, -0.5416, -0.0020, +0.0128, -0.1557, +0.1735, -0.0400,
+0.3065, +0.0703, -0.1273, +0.3064, -0.0101, -0.5155, +0.1910,
+0.0411, +0.2573, -0.3383, +0.1305, +0.0244, -0.0700, -0.5478, -0.2243
],
[
+0.6525, -0.1060, +0.0967, -0.2523, -0.0679, -0.2359, -0.1002,
-0.1302, -0.2785, -0.0323, -0.2069, -0.4863, +0.4068, -0.2921,
+0.0689, +0.0659, +0.3440, +0.0730, -0.2341, +0.1442, +0.0321,
-0.4033, +0.3169, +0.2174, -0.3649, -0.3458, -0.0410, +0.1900,
-0.3263, +0.0535, +0.2253, -0.0717, +0.2190, -0.3860, +0.4562,
-0.0471, -0.6580, +0.1243, +0.0968, -0.0801, +0.2969, -0.1420,
+0.0635, +0.3387, -0.0512, +0.0064, +0.3651, -0.0423, +0.0007,
-0.5414, -0.1172, -0.1081, -0.1545, -0.0802, -0.9081, +0.1538,
-0.0143, +0.0015, -0.2125, -0.1439, +0.3589, -0.6707, -0.6915, +0.2103
],
[
+0.1954, +0.0473, +0.0005, -0.2376, +0.2730, -0.2364, +0.1537,
-0.3518, -0.2333, -0.6985, +0.1143, -0.4291, -0.4548, -0.0803,
-0.5521, -0.4564, -0.5651, -1.0630, +0.1796, -0.0002, +0.0015,
-0.3317, -0.7872, -0.0555, -0.0872, -0.0989, -0.2793, +0.2904,
-0.2892, +0.2572, +0.2525, -0.3601, +0.1851, -0.3061, +0.4080,
-0.9798, -0.0559, -0.0152, -0.2210, -0.2351, -1.2633, -1.3520,
+0.1842, -0.8754, -0.3290, -0.2398, -0.1657, -0.3064, +0.4170,
-0.1810, +0.3617, -0.0774, +0.1052, -1.0043, -0.0412, +0.1861,
-0.0364, -0.0832, -0.3337, -0.0208, -0.4717, +0.2991, +0.5363, -0.7141
],
[
-0.2813, -0.3716, -0.0886, -0.5633, +0.1087, +0.1772, -0.0322,
-0.1692, +0.3300, -1.0514, -0.1952, -0.5817, +0.1098, +0.2299,
+0.1408, -0.8174, -1.5817, -0.0897, +0.4067, -0.8538, +0.2466,
-0.2321, -0.0760, +0.3167, +0.1953, -0.0280, +0.1107, -0.1015,
+0.1602, -0.1283, +0.0893, +0.2528, +0.3058, +0.4486, +0.0661,
-0.6155, +0.1135, -0.0380, -0.1616, -0.2837, +0.0692, +0.0797,
-0.0934, +0.1645, -0.6896, -0.1260, +0.0314, -0.0450, -0.2893,
-0.1417, -0.0603, -0.3250, +0.2633, -0.4442, -0.2169, +0.0100,
-1.6046, -0.8446, +0.0547, -0.2022, +0.1854, +0.2163, +0.1098, -0.4998
],
[
-0.2718, +0.0985, +0.1143, +0.5034, +0.1062, -0.2774, +0.0928,
+0.4507, -0.2889, +0.1647, +0.1606, -0.5096, +0.0797, +0.2081,
+0.1015, -0.0662, -0.5561, +0.0133, -0.1913, +0.4173, -0.2062,
-0.0683, -0.0707, -0.3881, -0.1940, -0.1059, +0.1708, -0.0068,
+0.4992, +0.1805, -0.0863, -0.1116, +0.2974, +0.6512, +0.2988,
-0.7671, -0.3240, -0.2382, -0.3154, -0.4172, -0.0090, +0.3568,
+0.0629, -0.4475, +0.0085, +0.3164, +0.8345, -0.9105, +0.4016,
+0.0489, +0.1487, -0.1455, -0.0914, +0.3481, -0.0170, -0.2977,
+0.0686, -0.3068, +0.4279, +0.1365, +0.0191, +0.3697, +0.2504, -0.2336
],
[
-0.4281, -0.1639, -0.6842, -0.0854, -0.3867, +0.1215, +0.2188,
-0.0905, -0.0237, +0.3002, -0.1625, -0.0496, +0.2249, +0.0999,
-0.0021, -0.0105, +0.0438, -0.2453, -0.7972, -0.0544, -0.6363,
+0.4864, +0.1242, +0.0230, +0.3307, -0.4536, -0.1405, +0.2291,
-0.3801, -0.1614, -0.0584, +0.2719, -0.2294, +0.1266, -0.7109,
-0.3877, +0.3089, -0.3075, -0.5052, +0.2617, -0.8302, -0.1543,
+0.4105, -0.1404, -0.2835, -0.1752, -0.3642, +0.1386, -0.1469,
+0.3241, +0.0407, +0.1294, +0.0788, -0.0815, -0.7150, +0.2538,
+0.5408, +0.5778, +0.2923, -0.3580, -0.0519, +0.2803, +0.0072, +0.1857
],
[
+0.1413, -0.4943, -0.6837, +0.2482, -0.1298, -0.2851, -0.0800,
-0.9522, -0.0827, -0.4602, +0.1367, +0.2338, +0.4496, +0.0029,
-0.6388, -0.3566, -0.1129, -0.2587, +0.1929, +0.2315, -0.1974,
+0.1578, +0.2540, +0.2304, +0.0193, -0.2805, -0.0064, -0.3831,
+0.2310, +0.2366, -0.0409, +0.0743, -0.6095, +0.3397, -0.5128,
-0.0056, +0.3138, +0.4122, +0.0952, -0.1192, -0.1181, -0.1224,
+0.3857, -0.1165, -0.0761, -0.5138, -0.4998, -0.1310, -1.3272,
-0.0823, +0.2054, +0.3836, +0.1094, -0.1651, +0.1319, +0.0349,
+0.0455, +0.3051, -0.2890, -0.3378, +0.4504, -0.4409, +0.0342, +0.2857
],
[
-0.6909, -0.2404, -0.5480, +0.1982, +0.7179, -0.1566, +0.5150,
-0.3021, -0.1896, +0.3692, -0.2610, +0.1676, +0.2646, -0.0779,
-0.6376, -0.4375, +0.0814, -0.0594, +0.1491, +0.6636, -0.0098,
-0.4666, -0.5695, -0.4680, +0.3753, -0.2631, -0.3479, -1.0949,
-0.1768, -0.0397, -0.2667, +0.2302, -0.3895, +0.2984, -0.1895,
-0.1393, -0.1342, +0.5137, +0.0543, -0.1336, -0.0678, -0.9658,
-0.4799, +0.4449, -0.0855, -0.0889, +0.0750, -0.0107, -0.8546,
-0.1215, -0.0314, +0.0430, +0.4070, -0.4824, +0.0688, +0.3415,
+0.0656, +0.0570, +0.0387, +0.4817, +0.1426, +0.0509, +0.0760, -0.4065
],
[
+0.4383, +0.1584, -0.0754, +0.1745, +0.0786, +0.2143, +0.1374,
+0.0865, +0.4707, -0.6604, +0.4382, +0.2705, -0.0253, +0.2995,
-0.4382, -0.0289, -0.4109, +0.0659, -0.0184, +0.3955, -0.0828,
-0.7735, -0.0186, -0.3625, -0.3181, -0.1457, +0.3396, -0.2431,
-0.1825, +0.1364, +0.1260, +0.0534, +0.2614, -0.0357, +0.2487,
+0.1936, +0.4056, +0.2736, +0.3650, +0.2727, +0.3510, +0.0828,
+0.1987, +0.0946, -0.3942, +0.2064, +0.1439, +0.1201, -0.4372,
+0.2936, +0.1877, +0.1580, -0.2083, -0.2638, +0.0890, -0.4047,
+0.0004, -0.0605, -0.2715, +0.0797, +0.1276, +0.4446, -0.2733, +0.2584
],
[
-0.5070, -0.6084, +0.1098, +0.2952, +0.3233, +0.1273, -0.1590,
+0.4029, -0.0075, -0.2986, -0.0453, -0.0251, +0.0636, -0.3285,
+0.3005, +0.4278, -1.2692, -0.3260, -0.3904, -0.4674, -0.1919,
+0.1708, -0.2957, -0.3654, +0.0608, +0.3880, -0.3380, -0.0002,
-0.1227, +0.0483, -0.3408, +0.2696, -0.2904, -0.8352, +0.2176,
-0.8516, +0.1110, -0.0138, -0.6308, -0.2065, +0.5916, -0.0596,
-0.0420, +0.4001, +0.1048, -0.1863, +0.2619, +0.0696, +0.2273,
-0.1749, -0.4023, +0.4499, -1.5990, -0.4454, -0.0222, -0.4018,
-0.3324, +0.1569, -0.0777, +0.0774, -0.2870, +0.2780, +0.1298, -0.5494
],
[
+0.4041, +0.2116, +0.1746, +0.3060, +0.3644, +0.2566, -0.2467,
+0.0528, -0.1645, -0.2514, +0.3191, -0.0146, -0.2756, -0.1343,
-0.1539, -0.4656, -0.0026, -0.0629, -0.3565, -0.7495, -0.6157,
-0.2922, +0.0272, +0.3853, -0.3030, +0.1152, +0.6219, +0.0596,
+0.2660, +0.3633, +0.3082, +0.4234, +0.1700, -0.7490, +0.6056,
+0.0380, -0.1250, +0.1593, -0.0863, -0.3877, -0.0154, -0.6906,
-0.1813, -0.1751, -0.0309, +0.0954, -0.0752, +0.1333, -0.3153,
+0.0735, +0.2958, -0.0313, -0.0686, -0.0086, -0.3676, +0.4638,
-0.0175, +0.0595, +0.4441, +0.0093, +0.2578, +0.1221, +0.0885, +0.2014
],
[
-0.5199, +0.6037, +0.1349, +0.0017, +0.1035, -0.1073, +0.4821,
-0.2727, -0.7271, +0.4909, -0.4462, +0.0574, +0.2442, -0.4101,
+0.2368, -0.0281, +0.1593, +0.2608, -0.1477, -0.0326, +0.1544,
-0.2897, -0.3711, -1.0289, -0.1497, +0.3172, -0.6857, +0.1492,
-0.0524, +0.1699, +0.0543, -0.1961, +0.0100, -0.5156, -0.5196,
+0.0112, -0.3831, -0.2663, -0.4071, -0.5762, -0.4060, -0.1983,
+0.4095, +0.0808, +0.1072, +0.2126, +0.1083, -0.3055, +0.4092,
+0.0916, -0.0140, +0.0065, -0.2017, -0.8640, +0.0456, -0.0038,
+0.2211, -0.3172, +0.0554, -0.1270, -0.1246, -0.0759, -0.3650, -0.3657
],
[
-0.3915, -0.5535, -0.1423, -0.3716, -0.7515, +0.3826, +0.1549,
-0.0311, +0.1627, -0.5930, +0.5855, -0.1633, -0.5803, -0.2441,
+0.4444, -0.0405, +0.5196, +0.3439, -0.7971, +0.3043, -0.1354,
-0.3644, +0.4925, +0.1056, +0.1867, +0.3991, -0.6626, +0.1049,
-0.0140, -0.8950, +0.1062, -0.0186, +0.0854, -0.2033, +0.1403,
-0.3018, -0.6041, -0.4544, +0.3293, -1.0832, +0.0505, +0.1097,
-0.4619, -0.3131, +0.5037, -1.0137, -0.3421, +0.1212, -1.0994,
+0.0358, +0.4906, -0.0352, -0.1116, -0.1726, -1.1999, -0.4828,
+0.3461, -0.2870, -0.1895, +0.0537, +0.0167, +0.0602, -0.2372, -0.1231
],
[
-0.2542, +0.8363, -0.2559, +0.0872, -0.1544, +0.1869, +0.4374,
-0.4973, +0.3678, -0.8425, -0.9891, +0.1042, +0.1624, -0.0964,
-0.1170, +0.2177, +0.1344, -0.3417, +0.5302, -0.3181, -0.8319,
-0.0489, -0.3692, +0.3340, -0.1902, -0.0889, -0.0784, -0.2664,
-1.1404, +0.2895, +0.0599, +0.0680, +0.4447, -0.1955, -0.2036,
+0.1605, -0.4091, +0.3005, +0.4971, +0.0056, -1.0584, -0.9754,
+0.4259, -0.4642, +0.3212, -1.0444, -0.4395, +0.1104, -0.2354,
-0.2754, -0.1138, -0.1852, +0.5298, -0.1715, -0.6177, -0.5564,
-0.5845, -0.9398, -0.5432, -0.4941, -0.5598, -0.2745, -0.7410, +0.0811
],
[
+0.3484, +0.2363, -0.2313, +0.2903, +0.0599, +0.1981, +0.0264,
+0.0365, -0.6788, +0.5058, +0.5024, -0.1606, -0.1466, +0.0896,
-0.1695, -1.3626, +0.2203, -0.0972, -0.0547, -0.2063, +0.3971,
-0.3022, -0.0741, +0.4433, +0.0614, +0.0450, -0.2246, -0.3360,
-0.5529, +0.0350, -0.2026, -0.1587, -0.1705, +0.0967, -0.3402,
+0.2256, +0.0723, +0.2559, +0.2409, +0.0809, +0.2522, +0.1735,
+0.2135, -1.4875, -0.6041, +0.3822, -0.0542, -0.7500, +0.2439,
+0.2342, -0.2002, +0.2322, -0.7495, +0.1338, +0.0136, -0.5508,
+0.0944, +0.1229, -0.3225, +0.2776, -0.0289, +0.0075, +0.1089, +0.4093
],
[
-0.4983, -0.0860, -0.6441, +0.0981, -0.1997, -0.1528, -0.3994,
-0.0600, -0.1746, -0.2651, -0.2522, +0.0370, -0.0651, -0.1543,
-0.0061, -0.1030, -0.8072, -0.5816, -0.1532, -0.4045, +0.0006,
+0.2646, +0.4261, +0.3321, +0.1915, -0.0374, -0.2416, +0.2430,
+0.2274, +0.1678, -0.1648, +0.5931, -0.3600, -0.0454, -0.2038,
+0.3763, +0.1858, -0.1298, -0.5252, +0.4314, +0.3626, -0.6726,
-0.1011, +0.0262, -0.1636, +0.1911, -0.8712, +0.5409, +0.0053,
+0.4764, -0.5827, +0.2690, +0.1905, -0.2930, -0.5309, +0.0933,
+0.6593, +0.0569, +0.1535, -0.0866, -0.2559, -0.1172, -0.7115, -0.0318
],
[
-0.3941, +0.2379, -0.7244, -0.5779, -0.1544, +0.0214, +0.1138,
-0.0033, +0.2314, -0.5746, +0.1439, -0.2131, -0.3561, -0.9263,
-0.4184, -0.0513, +0.5047, -0.0148, +0.2949, -0.4070, +0.2619,
+0.0486, -0.9044, -0.0877, +0.1956, -0.2011, -0.4901, +0.6367,
-0.1576, -0.2315, +0.0778, -0.3715, +0.2394, -0.0715, -0.0091,
+0.3945, +0.1454, +0.2826, +0.2854, +0.0383, -0.7265, -0.4513,
-0.0195, +0.1877, +0.1825, -0.1004, +0.0741, -0.5238, -0.7622,
+0.4092, +0.4336, +0.1936, +0.3382, +0.3516, +0.2307, -1.4502,
+0.5835, -0.5750, -0.7338, +0.2978, -0.5406, +0.0339, -0.3202, +0.2325
],
[
-0.0698, -0.8776, -0.9628, -0.2211, +0.0842, +0.2107, +0.0941,
-0.2500, -0.3662, +0.0578, -0.4750, -0.2181, -0.1686, -0.2689,
+0.1411, -0.8256, +0.3186, -0.3517, -0.4490, +0.0117, +0.2536,
-0.0792, +0.0725, +0.0385, +0.2386, +0.0666, -0.2312, +0.0256,
+0.1604, -0.0002, -0.0714, -0.6004, -0.1841, -1.4967, -0.5932,
+0.2548, -1.1410, -0.4043, -0.5033, -0.2187, -0.7987, +0.5275,
+0.0285, -0.8600, -0.2614, +0.0639, +0.3257, +0.4107, +0.2087,
-0.1072, -0.1157, +0.0467, -0.6435, -1.0427, -0.5286, +0.0459,
+0.1097, -0.2149, +0.0394, -0.3587, +0.1313, -0.6886, -0.1345, -0.5884
],
[
+0.5300, -0.3907, -0.0105, -0.7121, -0.3486, +0.0401, +0.2562,
+0.3037, +0.2092, -0.0210, +0.3676, -0.0227, -0.1761, -0.1304,
+0.0840, -0.1310, +0.2111, +0.0926, -0.2739, -0.3635, -0.5617,
-0.1553, +0.0314, -0.4018, +0.4185, +0.0401, -0.1099, +0.2949,
+0.2019, -0.1762, -0.3477, +0.3448, +0.3568, +0.0361, +0.3788,
-0.1996, +0.1723, -0.1428, +0.0066, +0.3473, -0.3308, +0.4851,
+0.1993, +0.2379, -0.1148, -0.1366, +0.1673, +0.0433, +0.4188,
+0.1589, +0.1478, -0.2602, -0.3324, +0.4604, -0.4275, -0.1584,
+0.1039, +0.1074, -0.4238, +0.7423, -0.3097, +0.4578, +0.0754, -0.2779
],
[
+0.1529, -0.1575, +0.0819, +0.0579, +0.4000, -0.2372, +0.2025,
+0.3456, +0.4460, +0.6892, -0.3688, +0.0596, +0.7114, +0.0582,
+0.2526, +0.0559, -0.3033, -0.2083, -0.2725, +0.2148, +0.6348,
-0.0939, -0.3589, +0.3578, -0.0897, -0.4104, -0.2510, -0.1750,
-0.0342, +0.2579, -0.2709, +0.1463, -0.2980, +0.6216, -0.3951,
+0.2358, +0.5241, -0.1989, +0.0439, +0.2978, +0.2848, +0.4379,
-0.1006, +0.4004, -1.3318, +0.0721, -0.7419, -0.4410, +0.1182,
-0.1377, -0.3649, +0.3684, -0.1349, -0.3452, +0.1427, -0.3848,
-0.1854, -0.2795, -0.0527, -0.1123, -0.0352, -0.5523, -0.0433, +0.5344
],
[
-0.5747, +0.6322, -0.8440, -0.1528, -0.1161, +0.0448, -0.2353,
+0.6576, +0.3179, +0.1904, -0.5284, +0.1620, -0.6215, -0.2991,
+0.1852, +0.0115, -0.2674, -0.6372, +0.3602, -0.1317, +0.0330,
+0.0931, -0.0091, -0.2444, -0.1673, +0.1395, -0.2460, +0.0833,
-0.0209, -0.5390, -0.1847, -0.3628, +0.1574, -0.2920, -0.2394,
+0.4293, -0.0784, +0.5356, +0.2715, -0.2624, -0.5728, -1.0559,
-0.2006, +0.4380, +0.2419, -0.1679, +0.5417, +0.1381, -0.2034,
-0.0121, +0.3109, +0.4409, +0.6114, -0.1056, -0.5598, -0.3813,
-0.1363, +0.0551, +0.4501, -0.1133, +0.0976, +0.4507, +0.5136, -0.4507
],
[
-0.9244, -0.6286, -0.3487, +0.3031, +0.5490, -0.0417, +0.1368,
+0.0454, +0.1623, -0.2627, +0.1115, +0.2481, +0.1029, -0.8995,
-0.2601, +0.0153, -0.1716, +0.2178, +0.1816, +0.4099, +0.3247,
-0.5553, -0.6924, -0.0171, +0.0062, -0.1994, -0.2239, -0.0970,
+0.4365, -0.2650, +0.0827, -0.5745, -0.1020, +0.0077, -0.2992,
-0.2860, -0.3540, +0.1319, -0.2205, -0.1654, -0.6664, +0.3699,
+0.5765, +0.4030, -0.1225, -0.0918, +0.0005, +0.2558, -0.2505,
+0.2503, -0.3338, -0.0020, +0.1167, -0.9499, -0.1115, +0.1646,
+0.2288, -0.6132, -0.0171, -0.6352, +0.3016, -0.8156, -0.0234, -0.1960
],
[
-0.1446, -0.0614, -0.5054, +0.0903, -0.6342, -0.3637, -0.4531,
+0.3534, -0.3720, +0.1497, -0.0799, -0.4266, -0.4212, -0.0637,
+0.2497, -0.2035, +0.0224, -0.2292, -0.4062, -0.1081, -0.8317,
+0.3876, -0.1462, +0.3375, -0.2768, +0.2942, -0.0415, -0.0010,
+0.1652, +0.3646, -0.4710, -0.3447, -0.3278, +0.2597, -0.1056,
-0.2106, +0.0542, -0.0294, +0.2012, +0.2639, -0.1646, -0.0958,
+0.7079, +0.1167, +0.3802, -0.3459, -0.1004, +0.3548, +0.3814,
+0.1147, -0.0515, +0.0656, +0.0187, +0.4013, -0.4644, +0.3470,
+0.0240, +0.0587, +0.3188, +0.3168, +0.0652, -0.1883, -0.1926, -0.2713
],
[
-0.5894, -0.5153, -1.0262, -0.2579, -0.1002, +0.0868, -0.2158,
-0.5245, +0.1173, -0.5855, +0.1135, +0.1471, -0.1395, +0.0561,
-0.7122, -0.1065, -0.0323, -0.7822, -0.1447, -0.0733, +0.2652,
+0.0712, +0.3987, +0.2479, -0.0321, +0.0163, -0.4509, +0.5805,
+0.4090, +0.0009, +0.0661, -0.2575, +0.4356, +0.1165, -0.4437,
-0.0218, -0.0202, -0.0969, -0.0273, -0.3226, -0.0146, -1.0215,
-0.2444, -0.3282, +0.1432, +0.1515, -0.0272, -0.5475, -0.0752,
-0.0464, +0.3280, +0.2803, +0.4469, -0.1728, +0.1299, -0.3028,
+0.1950, -0.1140, +0.1167, -0.7595, +0.0355, -0.3649, +0.0557, +0.3914
],
[
-0.0846, -0.1685, +0.2284, -0.2308, -0.2823, -0.1744, -0.4141,
+0.2608, -0.0387, -0.3320, -0.1776, +0.1127, +0.2196, +0.2047,
+0.1583, -0.4179, -1.1789, -0.2604, +0.2216, -0.2943, -0.1386,
+0.2381, +0.2102, -0.9876, +0.2734, +0.2302, +0.0747, -0.0731,
+0.3148, -0.7059, -0.0752, +0.2228, +0.2243, -0.0902, +0.1300,
+0.1532, -0.0828, -0.4113, -0.3630, +0.1029, +0.1319, +0.2420,
+0.0834, +0.2050, -0.1922, -0.2458, -0.1244, +0.1475, +0.0999,
+0.3175, +0.0888, +0.5254, +0.1428, +0.1467, -0.4229, -0.7336,
-0.1727, -0.0493, +0.3679, +0.1458, -0.1008, -0.0171, -0.2563, -0.1038
],
[
+0.1402, -0.1713, +0.0748, -0.1560, -0.2416, +0.4341, +0.6550,
-0.3423, +0.0628, +0.1346, +0.4624, +0.2883, -0.0514, -0.4130,
-0.5822, +0.5217, -0.1437, +0.3471, +0.2181, -0.2431, -0.5769,
-0.0424, +0.2626, +0.4983, +0.2075, -0.1028, +0.0161, +0.1407,
-0.0833, +0.2390, +0.0417, +0.2823, +0.5103, -0.6378, -0.0536,
-0.0393, -0.0651, +0.2310, +0.1614, +0.3542, -0.9074, -0.6099,
-0.6084, -0.2096, +0.3871, -0.4172, -0.3355, -0.0663, +0.0204,
-0.2276, +0.0557, -0.4072, -0.0672, -0.5691, -0.0667, +0.1840,
+0.0315, -0.5422, +0.2810, -0.6101, +0.0672, +0.2098, +0.2070, -0.0607
],
[
+0.1965, -0.2065, +0.3365, -0.2497, -0.0590, +0.0630, +0.3852,
-0.0385, -0.2316, +0.1742, +0.0175, +0.3616, +0.0664, +0.0959,
-0.4834, -0.0115, -0.3736, -0.6134, +0.4486, -0.6497, -0.4091,
-0.2319, +0.4347, -0.1304, -0.3359, -0.1652, +0.2525, +0.0212,
+0.0533, +0.2644, -0.4857, +0.0716, +0.1842, -1.0370, +0.2084,
+0.3405, -0.5086, +0.0427, -0.5776, -0.2903, -0.2391, -0.2570,
-0.3302, -0.4522, +0.1341, +0.1451, -0.6259, +0.3231, +0.1005,
-0.7788, +0.2834, +0.4262, -0.6278, -0.2713, -0.7403, +0.0574,
+0.0764, -0.7498, -0.2167, -0.2668, +0.2389, +0.3858, +0.4294, -0.1692
],
[
-0.6005, -0.3342, -0.0341, -0.0976, -0.1294, -0.0055, +0.1565,
+0.1378, -0.4799, -0.0769, +0.0385, +0.4254, +0.0979, +0.2879,
-0.3212, +0.7339, -0.2134, -0.3846, -0.1997, +0.0673, +0.5370,
-0.2301, +0.1499, +0.2798, +0.3384, +0.1293, -0.2867, -0.4863,
+0.3093, +0.1156, -0.3691, -0.0511, -0.6717, +0.2799, +0.1184,
+0.7869, +0.0988, +0.2327, -0.3219, -0.3663, -0.1863, -0.2751,
-0.6367, +0.1387, -1.2061, +0.5445, -0.2497, -0.6187, -0.3262,
+0.2336, +0.0923, +0.4471, +0.4191, +0.5987, +0.5211, -0.2479,
-0.0383, -0.0975, +0.0296, -0.6031, +0.2865, -0.6888, -0.4697, +0.3444
],
[
-0.8969, -0.3619, -0.2047, -0.1343, -0.3042, -0.1042, -0.0415,
-0.1624, -0.2147, -0.1016, -0.7889, +0.3418, +0.0868, -0.4342,
-0.2084, +0.3734, +0.4318, -0.1115, +0.2490, +0.4559, -0.2937,
-0.5159, -1.1121, -0.0804, +0.1388, -0.4097, +0.1953, -0.0861,
+0.0755, +0.0578, -0.0600, -0.0519, +0.2378, -0.7286, -0.8340,
-0.9214, -0.1790, -1.2709, -0.5294, +0.0270, -0.4837, +0.1236,
+0.3863, -0.3191, +0.1822, -0.1040, -0.3779, +0.1810, -0.0920,
-0.1269, +0.5072, -0.3267, +0.3822, -1.1616, +0.2350, +0.4796,
+0.1842, -0.1957, +0.0444, -0.6974, -0.4900, -0.4579, -0.1375, -0.5128
],
[
+0.4125, +0.1846, -0.2687, +0.4047, +0.2415, -0.3568, -0.5222,
+0.0550, -0.2090, -0.3538, +0.4196, -0.2383, -0.2984, +0.0796,
-0.2891, -0.0922, -0.4071, -0.5568, -0.2258, -0.0513, +0.3008,
-0.4999, -0.0981, +0.2177, +0.4061, +0.3386, +0.0729, +0.2200,
+0.0887, +0.2734, +0.1983, -0.3363, -0.0570, +0.0283, +0.4889,
+0.5389, -0.4052, -0.5635, +0.3627, -0.2224, -0.0141, -0.0919,
+0.2747, -0.1352, -0.0483, +0.2405, -0.1205, +0.1157, +0.1593,
-0.6906, +0.3747, +0.0316, -0.3510, -0.0224, -0.1504, +0.2385,
+0.2176, -0.6219, +0.0703, +0.6161, +0.1639, -0.3518, +0.0277, +0.5706
],
[
+0.2870, -0.7338, -0.1045, -0.0942, +0.0845, +0.3805, +0.0079,
-0.7205, +0.0955, -0.4537, +0.0731, +0.1386, +0.2017, +0.2059,
-0.3269, -0.5290, -0.8150, -0.6405, +0.1613, -0.1068, +0.1682,
+0.0145, +0.0655, -0.0025, -0.2245, +0.4070, +0.1686, -0.8228,
+0.2429, -0.0431, +0.0035, +0.0513, -0.0154, +0.1894, +0.2753,
+0.2020, -0.0720, -0.1562, -0.2747, -0.1583, -0.9408, -0.8700,
-0.2165, +0.0506, -1.3863, -0.0658, -0.3209, -0.3702, -0.6101,
-0.0353, +0.1048, +0.1970, +0.2671, -0.3384, +0.1256, -0.2245,
-0.4526, -0.0493, -0.3827, +0.0560, +0.0338, -0.1525, -0.2141, -0.0425
],
[
-0.1422, +0.1337, -0.9957, -0.5735, -0.2927, -0.4815, +0.4319,
+0.0342, +0.0668, +0.3405, -0.0740, -0.1619, +0.5172, -0.4340,
+0.1856, +0.2209, -0.4643, +0.6153, +0.4239, -0.9462, +0.2372,
+0.1935, +0.0449, +0.0913, +0.5925, +0.0728, -0.3116, +0.3045,
-0.1049, -0.3677, -0.2878, -0.2252, +0.1939, -1.5561, +0.0153,
-0.1803, -0.6259, -0.3834, -0.6172, -0.0133, -0.2826, -0.2731,
+0.3053, +0.0552, -0.0550, -0.5861, -0.2372, +0.1009, +0.2500,
-0.4699, +0.0561, -0.2214, +0.3366, +0.1667, -0.0716, -0.0938,
+0.0177, -0.9000, +0.1185, -0.3892, +0.1251, -0.1854, +0.1612, -0.2577
],
[
+0.4538, -0.9701, +0.1504, +0.4843, -0.9331, +0.1328, -0.3539,
-0.5484, +0.2910, -0.1758, +0.1974, -0.1809, -0.3994, -1.0207,
+0.1626, -0.3537, +0.3522, +0.3263, -1.0539, +0.1426, -0.8538,
-0.0698, +0.1850, +0.7717, +0.4812, -0.0657, +0.8718, -0.6112,
+0.0877, -0.4540, +0.5209, +0.2496, -0.1358, -0.2268, +0.1259,
-0.3139, -0.2353, -1.0745, +0.4902, +0.3386, -0.7974, -1.2774,
+0.0222, -0.0120, +0.3418, +0.0277, -0.1518, +0.1329, -0.2840,
-0.6863, -0.1258, +0.0503, +0.6224, -0.9175, -0.4380, +0.0616,
-0.2948, -0.1367, -0.7437, -0.5496, -0.0115, -0.2441, -1.3192, +0.0898
],
[
-0.8492, +0.2324, -1.0937, -0.0072, -0.5556, +0.1550, -0.0198,
+0.2518, -0.2527, -0.4283, +0.0591, -0.5192, +0.1214, -0.0950,
+0.0202, +0.4282, +0.2584, -0.7877, -0.8089, +0.0275, -0.5099,
+0.3571, +0.0930, +0.0660, -0.0577, -0.3545, +0.0622, +0.5885,
+0.3251, -0.6699, +0.4005, +0.1462, -0.1288, -0.8976, -0.5042,
+0.1200, +0.1997, -0.0740, +0.0969, +0.2668, -0.6573, -0.0003,
+0.3727, +0.0478, +0.1457, -0.9810, -0.1764, +0.1550, -0.2832,
+0.4197, -0.4164, -0.1324, +0.0982, +0.3429, +0.1463, +0.0178,
+0.2783, +0.1799, +0.4229, +0.0707, -1.0676, +0.0656, -0.2406, +0.1123
],
[
-0.2739, +0.4278, +0.5050, +0.4886, +0.0866, -0.6754, -0.2957,
-0.7517, -0.1715, -0.0754, -0.0733, +0.0049, +0.4403, -0.5811,
+0.1439, -0.1410, -0.4331, +0.0514, -0.1729, +0.4406, +0.0236,
+0.1144, +0.3210, -0.0241, -0.1087, -0.7359, +0.4433, -0.1967,
+0.4850, -0.3577, -0.2777, -0.1381, +0.0488, +0.4510, +0.0785,
-0.1526, -0.0759, +0.3004, -0.0124, -0.3421, -0.3625, -0.2688,
-0.6088, +0.1834, -0.1742, -0.3992, -0.0729, -0.0954, +0.1403,
+0.2244, -1.0269, +0.0389, +0.0357, +0.2483, -0.0966, -0.1649,
+0.0946, +0.0789, -0.8485, +0.8510, -0.2052, +0.0063, +0.3289, -0.2707
],
[
-0.0008, -0.1527, +0.1871, +0.0008, -0.5502, +0.1705, -0.0862,
-1.7449, -0.4099, -1.2881, -0.2889, -0.6813, -0.1696, -0.3554,
-0.0171, -0.1756, +0.0394, -0.0584, +0.0541, +0.2665, +0.2842,
+0.7106, -0.1510, +0.1608, -0.0213, +0.4420, -0.5489, -0.2275,
+0.2123, +0.2702, +0.1270, +0.1165, +0.0307, -0.9451, +0.5018,
-0.7310, +0.4341, -0.0568, -0.1530, +0.3782, -0.8706, -0.1489,
-0.3021, -0.3795, +0.0077, +0.3951, +0.0642, +0.0071, +0.0698,
-0.6238, -0.0427, +0.0675, +0.0150, -0.3453, -0.6300, +0.1152,
+0.0628, -0.1176, +0.1059, -0.3573, -0.0405, -0.4776, -0.3119, -0.1392
],
[
-0.1531, +0.2170, +0.1452, +0.3291, -0.1676, +0.4282, +0.6817,
-1.1171, -0.0246, -0.1068, -0.1326, +0.0996, +0.5856, +0.0621,
-0.4004, -1.4584, +0.1328, +0.2980, +0.6669, +0.2422, -0.5000,
-0.0695, +0.0159, -0.5761, -0.2003, +0.1373, -0.1083, -0.7715,
-0.4855, +0.1736, +0.1171, +0.1248, -0.9882, -0.0027, +0.1430,
+0.2150, +0.0139, +0.3390, +0.2071, +0.0626, -0.3002, -0.4146,
-0.2301, +0.1151, -0.3078, -0.7258, -0.1942, +0.0928, +0.4019,
-0.5398, -0.1712, +0.3604, -0.0307, +0.5086, +0.1574, +0.1295,
-0.1964, +0.2544, -0.4195, -0.1106, +0.1878, -0.7051, -0.3494, -0.2784
],
[
-0.1671, +0.2359, -0.3504, -0.0875, -0.0657, -0.0707, -0.2190,
+0.3783, +0.0052, +0.3745, -0.5688, +0.2605, -0.3190, +0.5080,
+0.4697, -0.0987, +0.2703, +0.1677, -0.6767, -0.3178, +0.4836,
+0.5635, -0.7103, -0.0746, +0.1034, +0.2430, -0.4251, -0.1090,
-0.5547, +0.2012, -0.3403, -0.3141, +0.1168, -0.2846, -0.3791,
-0.6774, -0.1252, -0.2180, -0.0656, +0.0353, -0.7226, +0.2728,
-0.1778, -0.3260, +0.3339, +0.0653, +0.3684, -0.1632, +0.2573,
-0.2883, +0.0009, +0.1928, -1.0397, -0.7210, -0.8038, -0.2165,
+0.1618, -0.0957, +0.2977, +0.2513, +0.0480, -0.4479, -0.0804, -0.1824
],
[
+0.3119, +0.0566, +0.0424, -0.4121, +0.2908, -0.0512, +0.0101,
-0.2033, -0.0291, -0.4058, +0.1809, -0.3684, -0.1681, +0.3278,
-0.1494, +0.3727, -0.5309, +0.2718, +0.3946, -0.6974, -0.1518,
-1.1048, +0.0306, +0.2203, +0.1070, +0.4206, +0.2177, -0.0350,
-0.2504, -0.1273, +0.2011, -0.3807, -0.0330, -0.0830, +0.0246,
+0.2361, +0.2504, -0.0618, -0.4662, +0.1870, -0.0266, -0.7132,
-0.1990, +0.2201, +0.2257, +0.2032, +0.5247, +0.0135, -0.5164,
-0.4449, -0.1256, -0.2228, -0.3297, -0.0180, -0.4429, -1.1518,
-0.6446, +0.0484, -0.0231, -0.1286, +0.2235, +0.4159, -0.4084, +0.1132
],
[
+0.2173, -0.4447, +0.0845, -0.0702, +0.1410, +0.0165, -0.2067,
-0.0764, +0.2809, +0.1371, -0.6168, +0.0406, -0.4437, -0.1373,
-0.0030, -0.3000, -0.3696, -0.3191, -0.1415, +0.2761, -0.0324,
+0.0190, -0.1383, +0.0778, -0.5184, +0.1510, -0.0283, -0.6965,
+0.3637, -0.2210, -0.0611, -0.0446, +0.1991, -0.0131, +0.3577,
-0.5313, +0.0258, -0.5449, -0.6727, -0.1732, +0.1289, -0.2922,
-0.2036, -0.2062, -0.5262, +0.2311, -0.5273, -0.3758, +0.0734,
+0.2520, +0.5800, +0.1337, -0.0203, +0.2392, +0.4818, +0.1183,
-0.2960, -1.3139, -0.3598, -0.4217, +0.5906, +0.3120, +0.0842, -0.0189
],
[
-0.2034, -0.2470, +0.0815, +0.3712, -0.2452, -0.2641, -0.4384,
-0.0659, -0.1397, -0.0294, +0.5793, +0.4600, -0.6904, +0.1172,
-0.3046, +0.3242, +0.0302, -1.3304, +0.3182, -0.1053, +0.3679,
-0.3855, -0.2545, -0.2798, -0.2702, +0.0962, -0.3428, +0.1185,
+0.0799, -0.1985, -0.7122, -0.1967, -0.1748, +0.0686, +0.5070,
+0.2390, -0.3882, -0.1285, +0.1746, +0.0770, -0.7113, -0.3933,
+0.0402, -0.5497, +0.1689, -0.0035, -0.1905, -0.4365, +0.1926,
-0.0179, +0.2188, +0.1091, +0.2962, -0.0157, -0.1560, -0.1427,
-0.3535, +0.3942, -0.8826, -0.0166, +0.1164, -0.8110, +0.5112, -0.4452
],
[
+0.1235, -0.1364, +0.0059, -0.1658, +0.1140, +0.2574, +0.0619,
-0.0737, +0.2568, -0.1101, -0.0517, +0.0775, +0.3710, -0.3755,
-0.5272, -0.1628, +0.0063, -0.2183, +0.3528, +0.3519, -0.0413,
-0.1653, -0.1039, +0.1532, -0.0121, +0.0628, +0.1186, -0.0342,
+0.6432, +0.2785, +0.1194, -0.1340, -0.0801, +0.5283, +0.0979,
+0.1328, -0.0234, +0.0730, -0.2662, +0.3805, +0.2164, -0.5923,
+0.2952, -0.1686, +0.0913, +0.4924, -0.6039, -0.2342, +0.0168,
-0.4053, -0.1432, +0.1093, -0.5354, -0.1532, -0.0843, -0.2759,
-0.5059, -0.5240, +0.2169, +0.1137, +0.1778, -0.8917, -0.0479, -0.4231
],
[
-0.0225, +0.2392, +0.2313, +0.2092, -0.2090, +0.5269, -0.2119,
-0.6104, +0.2067, +0.1138, -0.0775, +0.2780, -0.3904, +0.2525,
-0.5334, -0.0438, +0.3420, -0.1981, +0.3290, -0.3555, -0.2135,
-0.1317, +0.2700, -0.0619, -0.6285, +0.2862, +0.3542, -0.6501,
+0.2822, +0.1852, +0.2532, -0.0958, +0.2226, +0.0876, +0.0229,
+0.0259, -0.1851, -0.2623, +0.0520, +0.1087, -0.1129, +0.4673,
+0.0371, -0.5383, -0.2881, -0.3649, -0.2050, +0.0659, -0.1629,
-0.2505, +0.2957, +0.1168, +0.1865, +0.3650, -0.2477, +0.2141,
+0.1328, -0.3441, -0.4943, -0.1007, +0.2719, -0.2334, -0.0244, +0.2138
],
[
+0.0426, +0.2374, -0.6527, +0.2165, -0.0192, -0.2015, +0.1225,
+0.4667, -0.2282, -0.1058, +0.1764, +0.3174, +0.1419, -0.2757,
+0.1073, +0.0635, +0.0248, -0.3573, -0.4414, -0.0629, -0.3135,
-1.3118, +0.1522, -0.0582, +0.0370, +0.4431, +0.3450, -0.1012,
-0.5598, +0.1954, -0.0399, +0.1511, +0.3362, +0.0511, +0.0086,
+0.6763, -0.3848, +0.3133, -0.4143, +0.0054, -0.2434, -0.0314,
+0.4777, -0.2695, +0.1945, -0.4941, +0.2321, -0.2950, -0.2499,
-0.7564, +0.2191, +0.0811, -0.6030, +0.0595, +0.2227, +0.1896,
+0.1723, +0.0892, -0.2741, +0.4445, +0.3701, -0.4163, -0.3526, +0.0082
],
[
+0.2931, -0.0836, +0.1128, -0.2699, -0.1293, -0.9413, -0.3849,
-0.0243, -0.1199, -0.0149, -0.1323, +0.1631, -0.3434, -0.7035,
-0.4271, -0.0106, +0.5124, +0.3303, -0.4026, +0.1950, -0.1408,
-0.3412, +0.0869, -0.3608, -0.4225, +0.1374, +0.1295, +0.2215,
+0.6199, +0.5064, -0.0815, +0.1034, -0.2661, +0.2258, -0.0738,
+0.1143, +0.2495, +0.2205, +0.1754, -0.4842, -0.1246, -0.2890,
+0.3604, -0.9065, -0.3236, -0.1017, +0.2657, +0.2487, +0.1089,
-0.1155, +0.3416, +0.0721, -0.0109, -0.0288, -0.1186, +0.2537,
+0.2910, -0.2570, -0.4873, -0.0378, +0.4349, +0.1140, -0.8302, +0.1782
],
[
+0.1030, +0.1304, -0.0909, -0.2364, -0.2500, -0.3028, -0.0546,
-0.6416, -0.1898, -0.3917, -0.2705, -0.3312, +0.3570, -0.2017,
-0.0537, -0.6308, +0.0019, -0.1418, +0.2843, -0.0999, -0.5335,
+0.1763, -0.3687, +0.1857, +0.0332, +0.4558, +0.2883, -0.0218,
-0.2059, +0.4931, +0.4608, +0.0538, -0.5530, -0.1249, +0.1417,
-0.6702, -0.2335, -0.7719, +0.2778, +0.0543, -0.0728, +0.1623,
+0.4363, -0.3137, -1.1796, +0.3349, -0.1091, -0.1050, -1.2196,
+0.1470, -0.3972, +0.5019, +0.1066, +0.4256, -0.1710, -1.0880,
-0.0445, +0.2020, +0.0078, +0.2894, -0.1972, -0.4168, -0.5523, +0.0526
],
[
-0.1724, -0.1460, -0.4037, +0.0507, +0.3517, -0.1470, +0.2463,
-0.9503, -0.5646, +0.2897, -0.3478, +0.0671, -0.0199, -0.2202,
-0.1675, -0.9212, +0.4622, +0.1569, -0.0368, +0.1945, -0.0634,
-0.9858, +0.0529, -0.0555, +0.1661, -0.0465, -0.0869, -0.0138,
+0.0404, -0.7938, +0.0083, +0.3436, -1.1259, +0.1878, -0.5468,
+0.0276, -0.1077, +0.5194, -0.1782, +0.1574, +0.3799, +0.0166,
+0.1506, -0.2308, -0.5062, -0.6700, +0.0766, -0.2727, -0.5081,
+0.0889, +0.0337, -0.0512, +0.2099, -0.3992, +0.2682, -0.1567,
+0.1432, +0.1219, -0.1049, +0.2016, -0.2421, +0.3822, -0.3316, -0.0221
],
[
-0.0998, +0.3567, -0.9238, +0.2816, -0.0369, +0.3637, -0.1214,
-0.4277, -0.4980, -0.0801, +0.1680, -0.4083, -0.4140, -0.1989,
+0.1607, -0.4560, +0.1918, -0.2292, -0.0623, -0.3424, -0.1217,
-0.0239, +0.3148, +0.0673, +0.4032, +0.2976, -0.1841, +0.4275,
-0.3250, -0.3160, +0.0484, +0.3713, +0.3938, +0.0258, -0.2029,
-0.0053, -0.4931, +0.2625, -0.3302, -0.0181, -0.8182, -0.2774,
-0.1506, -1.1460, -0.4011, -0.2439, +0.0196, +0.2232, +0.8174,
-0.0484, +0.1209, -0.0140, -0.3340, +0.3268, +0.0327, -0.1059,
+0.1514, +0.3105, -0.0121, -0.3407, -0.1831, -0.1004, +0.3739, +0.1763
],
[
+0.4708, -0.0521, +0.0590, -0.1178, +0.0997, +0.5031, -0.3283,
-0.4129, -0.0462, -0.9110, -0.1623, -0.7761, -0.0343, -0.1479,
-0.2679, -1.0075, +0.4896, -0.2684, +0.1089, -0.5597, -0.1109,
-0.1651, +0.4689, +0.6028, -0.6288, -0.0128, -0.3020, +0.0826,
-0.0618, +0.5606, +0.6067, -0.0180, +0.4340, -0.4646, +0.2367,
-0.1164, -0.5773, -0.0936, -1.4304, -0.2006, +0.2534, +0.1214,
+0.4082, +0.4421, -0.0296, +0.7033, +0.4593, +0.0166, -0.3860,
-0.4448, +0.0253, +0.3424, +0.1747, +0.4142, -0.5072, +0.0198,
-0.2323, +0.2584, -0.5340, -0.2674, +0.3111, +0.0950, -1.2430, -0.3871
],
[
-0.3554, -0.4261, -0.3969, +0.1330, +0.3218, -0.1343, +0.3053,
-0.5123, -0.0876, -0.1438, +0.1724, +0.4915, +0.3161, -0.6318,
+0.0695, -0.0161, -0.0747, -0.1576, +0.2199, +0.0535, +0.3710,
-0.1703, +0.0093, -0.2971, -0.3412, +0.0165, +0.1949, -0.2908,
+0.1133, -0.0025, -0.0251, -0.3991, -0.5825, +0.1080, -0.5219,
+0.3805, -0.0868, -0.0036, -0.4767, +0.3711, -0.0467, -0.3188,
+0.3101, -0.4350, -0.5693, +0.0831, -0.0943, +0.0603, -0.3070,
+0.1510, -0.3361, -0.3525, -0.0654, -0.2628, +0.0655, -0.3440,
+0.0953, -0.0180, -0.3156, -0.1640, -0.2534, +0.2776, -0.5039, +0.4039
],
[
+0.1528, -0.4957, -0.3149, -0.6788, +0.5233, +0.3255, +0.7413,
+0.1437, +0.7073, -0.1607, -0.0156, +0.8259, -0.4460, -0.4434,
-0.0353, +0.1706, +0.0603, -0.2323, +0.3872, -0.2852, +0.1093,
+0.5235, -0.4943, -0.0429, +0.0298, +0.3845, -0.4493, -0.5962,
+0.2980, +0.1263, +0.4735, +0.3274, +0.2746, -0.2191, +0.0693,
-0.1408, +0.3724, -0.1717, -0.4673, +0.0807, -0.3967, -0.4441,
+0.1146, +0.3469, +0.0416, +0.4874, +0.2353, -0.2750, -0.2053,
+0.3934, +0.3132, +0.5396, +0.7412, -0.6986, +0.2424, -0.2640,
-0.4363, -1.1939, -0.1710, +0.2154, -0.1753, +0.0985, +0.2595, +0.2793
],
[
-0.0573, +0.0183, -0.8290, -0.3792, -0.4697, +0.1927, +0.2986,
+0.0933, +0.6088, -0.0466, +0.0604, +0.2636, -0.2967, +0.7121,
-0.3530, +0.4662, -0.1525, -1.1248, +0.1679, +0.1166, -0.1709,
-0.0463, +0.2697, -0.1441, +0.1371, -0.8555, -0.7195, -0.0514,
-0.1252, -0.2504, -0.1861, -0.2676, +0.3947, +0.2097, +0.1032,
-0.1152, -0.6395, +0.0102, -0.3397, +0.9433, -1.0032, +0.3374,
+0.3034, -0.5279, +0.2076, -0.2374, -0.2158, +0.6702, +0.3128,
-0.0549, +0.0874, -0.4102, +0.1829, -0.4387, -0.5966, +0.2051,
+0.4078, +0.1916, -0.1082, -0.0840, +0.0112, +0.2095, +0.4739, +0.0592
],
[
+0.0712, -0.1285, -0.3152, -0.2810, +0.1589, -0.5851, +0.2913,
+0.4122, +0.3443, +0.1250, +0.3089, -0.6933, -0.1485, -0.2361,
+0.0330, -0.0679, +0.5881, +0.0105, -0.6269, -0.3111, -0.0086,
+0.3774, +0.1192, +0.3908, +0.2166, +0.0512, +0.0148, +0.1214,
+0.0431, +0.3745, +0.1041, +0.1479, +0.0928, +0.2105, -0.2576,
+0.1054, +0.1603, -0.0741, -0.9277, +0.0946, -0.4804, -0.8540,
+0.2943, -0.2224, -0.3795, -0.2643, -0.3990, +0.1907, -0.0094,
+0.2209, -0.3091, -0.3027, -0.2061, -0.0633, +0.1596, -0.0254,
+0.0329, +0.1977, -0.0670, -0.0397, -0.2621, +0.1125, -0.3700, +0.0390
],
[
+0.3480, -0.7664, -0.4568, +0.1871, +0.5560, -0.1744, +0.3469,
-0.2509, +0.2379, -0.0506, +0.2119, +0.3410, +0.2622, -0.6715,
+0.1367, -0.4652, -1.4492, +0.2345, -0.0107, +0.3638, +0.1392,
+0.1721, +0.1263, -0.4381, -0.1557, -0.0970, +0.4355, -0.3398,
+0.3974, +0.1136, -0.1181, -0.0664, -0.0990, +0.2637, +0.0006,
+0.1281, +0.0642, +0.4717, -0.3359, +0.0537, -0.0195, -0.3825,
+0.1724, +0.3125, -0.4619, -0.2560, -0.1729, +0.0146, -0.9450,
-0.0293, -0.1295, -0.1973, +0.3303, -0.4519, +0.3595, +0.2745,
+0.0131, +0.0422, -0.5244, +0.0894, +0.1912, -0.3745, +0.1748, +0.0928
],
[
-0.1506, +0.2073, +0.2138, -0.2598, -1.1459, +0.2474, +0.2124,
+0.2297, +0.0995, +0.4783, +0.1605, -0.6660, -0.4947, -0.1636,
-1.4091, +0.2500, -0.1069, +0.0376, -0.2405, +0.1701, +0.1519,
-0.4186, +0.4935, -0.8247, +0.1552, +0.1344, -0.1138, -0.3214,
+0.1920, -0.6936, -0.3714, -0.1434, +0.1774, +0.1123, +0.1861,
+0.7214, -0.0433, -0.1770, +0.2506, -0.5951, -0.0325, -0.2234,
-0.4408, -0.5731, +0.4697, -0.0485, -0.2623, +0.3801, -0.2302,
-0.4792, -0.0723, -0.8690, +0.4120, +0.0801, -0.5035, +0.6318,
-0.4286, -1.7760, -0.1839, +0.1031, +0.0964, +0.2205, +0.1453, +0.1327
],
[
+0.0565, +0.1102, +0.0555, -0.3907, +0.3093, +0.6011, -0.1821,
-0.8135, -0.3734, -0.4417, +0.3651, -0.3520, -0.6925, +0.0480,
+0.4059, -0.0637, +0.1310, +0.1907, +0.1613, -0.2027, +0.1738,
-0.4830, +0.4008, -0.2709, +0.0293, +0.2790, -0.2094, -0.3615,
+0.1121, -0.3976, +0.2432, +0.1350, -0.3801, +0.0290, -0.3612,
-0.1686, -0.2163, -0.2304, -0.6177, +0.3902, -0.3066, +0.2993,
+0.0292, +0.3404, -0.0150, -0.1280, -0.2364, +0.1865, +0.0298,
-0.2680, -0.1932, -0.1310, -0.2946, -0.9964, -0.4285, -0.4160,
-0.1354, +0.2941, +0.0927, -0.1026, -0.1780, +0.1622, +0.0649, -0.8204
],
[
+0.1894, -0.0970, -0.2627, -0.2888, -0.1052, -0.0090, +0.1697,
+0.1585, +0.0807, +0.2906, -0.1213, -0.4320, -0.3194, +0.4379,
-0.3009, +0.2913, -0.0138, -0.2332, -0.2100, -0.0920, +0.0030,
-0.1944, -0.1362, -0.0683, +0.1916, +0.2277, +0.0020, +0.0376,
-0.2581, +0.0203, +0.0945, -0.0273, -0.1834, -0.1477, +0.3891,
-0.8760, -0.7327, -0.3924, -0.7739, -0.2062, -0.9386, +0.0510,
+0.1158, -0.5032, +0.0522, +0.0838, -0.2942, +0.0945, -0.2562,
-0.2678, +0.0716, +0.1929, -0.2012, -0.6123, -0.3913, +0.0878,
+0.4618, +0.3128, +0.2354, -0.1198, +0.2178, +0.4765, -0.2785, -0.1888
],
[
-0.2206, +0.3318, +0.2938, +0.4148, -0.0502, +0.6339, +0.1075,
+0.0466, -0.0205, -0.0399, +0.1343, -0.1876, +0.1697, -0.1137,
-0.3068, -1.2581, -0.4032, -0.2526, -0.0501, -0.4212, +0.2251,
-0.1790, -0.4869, +0.6200, -0.5371, -0.5877, +0.0569, -0.3732,
+0.1879, -0.5597, +0.3479, -0.6712, +0.2906, -0.3752, -0.3008,
-0.0225, -0.0610, -0.1636, +0.4039, +0.1432, +0.2402, -0.0871,
+0.1529, +0.0566, +0.1538, +0.1572, +0.1036, -0.0355, -0.7213,
+0.2796, +0.1821, +0.1483, +0.2256, -0.2517, +0.2175, -1.6318,
-0.3699, +0.0168, +0.1499, -0.2434, +0.4927, +0.3871, +0.4436, +0.3241
],
[
-0.3785, +0.3710, +0.5153, -0.2213, +0.1006, +0.0343, -0.3430,
-1.3048, +0.2934, -1.1390, +0.0764, -0.4633, -0.3503, -0.1963,
-0.6778, +0.1066, +0.3581, -0.4359, +0.2323, -0.0946, +0.3556,
+0.0036, +0.1852, -0.4234, -0.7639, +0.1503, +0.5572, -0.0908,
-0.0304, +0.3589, +0.4023, +0.2161, -0.3031, -0.5656, +0.4415,
-0.2330, -0.2778, -0.1847, -0.4498, -0.1618, +0.0821, -0.0945,
-0.2184, -0.4628, +0.4103, +0.3438, -0.2311, -0.2477, +0.3549,
+0.3910, +0.1714, +0.2460, -0.5765, -0.3045, -0.0702, -0.1728,
-0.4134, -0.1338, -1.0295, +0.2805, -0.6990, +0.7314, +0.2259, -0.0369
],
[
-0.7765, -0.8213, +0.0711, +0.2292, +0.2640, -0.1111, +0.0706,
-0.9447, -0.0118, +0.0427, +0.2097, -0.0662, -0.2773, -0.4894,
-0.7694, -0.3649, +0.1166, -0.3336, +0.3578, +0.0796, -0.1630,
-0.1352, -0.0720, +0.1224, -0.3877, +0.1955, -0.1440, -0.0612,
+0.1912, -0.1973, -0.0973, -0.0560, -0.7027, +0.2532, -0.3607,
-0.1223, +0.0162, -0.0028, +0.4377, -0.0581, -0.3754, -0.2387,
+0.0088, -0.0455, -0.1477, +0.4253, -0.0914, -0.7833, -0.1639,
-0.0433, +0.0863, +0.2265, -0.0409, +0.0313, +0.1362, +0.4949,
-0.0978, -0.5833, +0.0432, -0.4087, -0.1731, -0.0662, +0.4147, +0.1439
],
[
+0.0350, +0.1548, +0.0131, +0.0115, -0.3387, +0.2374, +0.3363,
-0.5082, +0.5767, -1.2487, +0.1592, +0.1192, -0.9356, +0.0592,
+0.4122, -0.4330, -0.3213, -1.4197, +0.3280, -0.2136, -0.4984,
+0.2073, -0.0745, -0.2410, -0.2374, -0.0251, +0.2538, +0.2056,
+0.0789, -0.5060, +0.3261, +0.2714, -0.3186, -0.1567, -0.0758,
+0.2377, +0.1467, +0.5026, -0.3973, +0.9726, -0.0972, -0.0295,
+0.0114, -0.3803, +0.2799, -0.3394, +0.1301, +0.0501, -0.1194,
+0.3699, +0.0053, -0.4543, +0.2368, -0.1180, -0.0139, -0.3556,
-0.1657, +0.2425, +0.1212, +0.0460, -0.3302, +0.0835, +0.1524, +0.2809
],
[
+0.5912, +0.3751, -0.7060, -0.6319, -0.0354, +0.0242, +0.0191,
+0.1079, -0.2649, +0.3621, +0.0965, -0.0276, -1.0230, -0.3146,
+0.2075, -0.6826, -0.3492, -0.0961, -0.5934, -0.6186, +0.0199,
+0.2130, -0.7184, +0.4223, +0.0614, +0.1626, +0.2471, +0.2255,
-0.2649, +0.1865, +0.2010, -0.0649, -0.7986, +0.3571, -0.7812,
+0.0793, -1.1885, -0.7985, -0.4967, -0.0632, +0.1954, -0.3144,
+0.1585, -0.2425, +0.0907, +0.0252, -0.9084, +0.3666, -0.5707,
-0.5022, +0.2995, +0.2105, +0.5991, +0.0387, +0.0628, +0.1833,
-0.1081, -0.6146, -1.9594, +0.3486, +0.4696, -0.0909, +0.2579, -0.8427
],
[
+0.0336, -0.4557, -0.6614, +0.4449, +0.0964, +0.1173, -0.4679,
+0.3083, -0.3942, +0.2012, +0.0582, -1.3162, +0.0455, -0.5111,
-0.6087, +0.2155, -0.0063, -0.1217, -0.0372, +0.0719, +0.3264,
+0.4321, -0.5644, +0.4457, +0.6958, +0.3130, +0.1354, -0.0940,
+0.1247, -0.1034, -0.3069, -0.5462, -0.3833, -0.2013, +0.0727,
-0.2046, -0.6196, -0.2577, +0.1981, +0.0947, +0.2343, +0.2706,
-0.0317, -0.4985, +0.2393, +0.2797, -0.0232, -0.4649, +0.6968,
+0.1224, -0.0383, -0.5945, -0.5035, +0.0959, -0.3727, +0.7081,
-0.1661, +0.1211, -0.1007, -0.2776, +0.2769, +0.3188, -0.8125, -0.2640
],
[
-0.2121, +0.1708, -0.0225, -0.0678, -0.0867, -0.0663, +0.2636,
+0.2387, +0.2040, -0.2074, -0.4069, -0.1904, -0.0885, -0.4112,
-0.5617, +0.3723, +0.4653, -0.2569, -0.3289, +0.4304, -0.0073,
+0.0809, -0.0856, -0.0631, -0.2508, -0.3386, -0.8901, +0.1858,
-0.1145, -0.0091, -0.0037, +0.3607, -0.0357, -0.7050, -0.2968,
+0.3616, +0.2470, +0.2633, -0.0279, +0.0722, -0.4222, -0.1375,
-0.4831, -0.2887, +0.0935, -0.0073, -0.4007, -0.1702, -0.2263,
+0.3825, +0.1574, +0.6085, -0.1626, -1.7196, +0.3131, +0.2672,
-0.1385, +0.3224, +0.3787, -0.0462, -0.3012, -0.5527, -0.4602, +0.1942
],
[
-0.6093, -0.9537, +0.1757, -0.3976, -0.0383, +0.7251, +0.3466,
+0.4402, -0.0774, -0.4007, +0.0816, -0.0457, -0.1168, +0.2660,
+0.1250, -0.5599, +0.2008, +0.8158, -0.4430, +0.4986, -0.5222,
+0.3090, +0.0151, -0.1805, +0.1431, -0.1892, -0.6358, -0.2858,
-0.2296, -0.1724, -0.4177, +0.0810, +0.0851, -0.0888, +0.2480,
-0.2108, +0.2010, +0.0679, +0.0160, +0.1122, -0.5618, +0.0329,
-0.1360, -0.5033, -0.3957, -0.2492, +0.5305, -0.7473, -0.2721,
-0.0429, -0.0304, +0.0405, +0.6790, -0.1740, +0.3304, -0.0981,
-0.4455, -0.0456, -0.1221, +0.2468, -0.6452, +0.0697, +0.3481, -0.0379
],
[
-0.1121, -0.5130, -0.5136, +0.3138, +0.2760, -0.3535, -0.3125,
+0.3587, -0.4589, -0.1302, -0.3529, +0.4531, +0.1770, +0.2400,
-0.0107, -0.2273, -0.0549, -0.1933, +0.0799, +0.0211, +0.0974,
-0.3228, -0.1341, -0.5369, +0.2466, -0.2529, -0.0108, -0.3154,
-0.0725, -0.1345, -0.2088, -0.0873, -0.3675, +0.0120, +0.0838,
-0.1347, +0.2473, +0.4509, +0.4634, +0.1623, +0.0152, +0.4995,
+0.4125, -0.0801, -0.9684, -1.0005, +0.1577, +0.3948, -0.1291,
+0.1197, -0.0382, +0.1272, -0.4528, -0.1108, -0.2218, -1.0994,
-0.0977, -0.3832, +0.1989, +0.3940, +0.2129, -0.1267, +0.2891, -0.4566
],
[
+0.2013, -0.4966, +0.3134, +0.2968, +0.4050, +0.3077, -0.0970,
+0.0265, -0.6194, -0.4650, +0.2879, -0.5189, +0.0415, -0.0279,
-0.2265, +0.2703, -0.0049, -0.1062, +0.0758, +0.5811, -0.4047,
-0.4008, -0.5073, -0.1825, +0.3934, +0.1870, +0.0549, +0.2662,
-0.1832, +0.0716, -0.5844, +0.0985, +0.1388, -0.4097, +0.3492,
+0.3050, -0.3009, -0.3748, -0.0855, -0.2690, +0.0865, +0.0847,
-0.2502, +0.4930, -0.4957, -0.0679, +0.2032, -0.5270, -0.0298,
-0.6239, -0.3869, +0.1205, +0.2789, -0.4187, -0.4100, -1.3293,
+0.0339, -1.2127, -0.4629, -0.4488, -0.3622, +0.3658, -0.1273, -0.9988
],
[
+0.0618, -0.6976, -0.2739, -0.4951, +0.3629, -0.0572, -0.0423,
-0.1126, -0.0084, +0.0039, -1.1347, +0.0766, +0.5972, -0.2661,
-0.1608, -0.1188, -0.5734, +0.2740, -0.1348, -0.0046, -0.2420,
+0.4932, -0.3493, +0.0077, -0.2928, +0.1936, -0.4306, +0.0672,
-0.2478, +0.2933, +0.4783, +0.1112, +0.0508, +0.5279, -0.0602,
-0.6082, +0.0254, -0.1455, +0.0860, -0.0137, +0.2181, +0.4595,
-0.1020, +0.2738, -0.3845, +0.1527, +0.0903, +0.2459, -0.1028,
-0.0204, +0.3592, -0.1899, +0.0156, -0.3667, +0.2428, -0.2370,
+0.4264, -0.1857, +0.1354, -0.1368, +0.1373, +0.3646, -0.1913, -0.2312
],
[
-0.1679, -0.2973, +0.3421, +0.2689, -0.0877, +0.2735, -0.1347,
-0.2523, -0.0631, +0.1108, +0.2597, +0.4530, +0.1214, -0.1416,
-0.5936, -0.1322, -0.2734, -0.7423, +0.1697, +0.0126, -0.2423,
-0.0829, +0.4345, +0.2280, +0.1167, +0.0169, -0.1051, +0.4623,
+0.1274, +0.1364, -0.7264, +0.2868, +0.2049, +0.0837, -0.6358,
+0.0789, +0.1073, +0.5686, +0.3086, -0.5808, +0.7224, -0.5558,
-0.5012, -0.0334, +0.1128, -0.4420, +0.0341, -0.0761, -0.6116,
-0.1187, -0.0079, +0.1517, +0.1157, -0.0825, +0.0421, -0.4036,
+0.2306, -0.1724, +0.0817, +0.0796, +0.2520, -0.0839, -0.1000, +0.2560
],
[
-0.1568, +0.1256, +0.2687, +0.5304, +0.0616, +0.2620, -0.1174,
-0.0828, +0.2457, -0.7009, -0.2341, +0.1980, -0.1387, +0.0767,
-0.1147, -0.3794, -0.0804, -0.9129, +0.4222, -0.0307, -0.4511,
+0.0235, +0.2063, -0.0281, -0.6208, -0.3369, -0.2876, -0.1240,
+0.0289, -0.1814, -0.0107, -0.6183, -0.0970, -0.1725, +0.0277,
-0.2143, +0.4770, -0.3520, +0.2918, -0.2149, +0.0670, +0.2961,
+0.0475, -0.2314, +0.4138, -0.6241, -0.5202, +0.6909, -0.1022,
-1.0779, +0.0202, +0.3129, -0.1340, +0.0622, -0.1117, -0.2848,
+0.1219, -0.2674, +0.2004, -0.4155, -0.0463, +0.1513, -0.0398, +0.3006
],
[
-0.6542, +0.7595, -1.3221, +0.0988, -0.3465, +0.4240, -0.0449,
-0.8170, +0.0414, +0.1441, -0.6610, +0.0711, +0.1398, +0.6336,
+0.0080, -0.0566, -0.0857, +0.1501, -0.0995, +0.1385, +0.2677,
+0.0367, +0.1083, -0.0359, -0.1822, +0.1932, -0.1764, -0.4851,
-0.0244, -0.3504, -0.0213, -0.1195, -0.2686, -0.5418, -0.4927,
+0.3825, -0.0737, +0.0830, -0.2684, +0.2176, +0.1968, -0.2227,
-0.3244, -0.6385, +0.1551, -0.2165, -0.0925, +0.1828, +0.4494,
-0.1357, -0.0456, -0.0027, +0.1056, +0.3863, -0.1894, +0.0876,
-0.1854, +0.1973, +0.3061, +0.0674, +0.6454, -0.2473, +0.2778, +0.3394
],
[
+0.1184, +0.0655, -0.4564, +0.1047, +0.0245, -0.3896, -0.4310,
+0.2791, -0.4074, -0.2665, -0.4304, +0.6561, -0.6748, +0.1907,
+0.5614, -1.5843, -0.0335, +0.1814, +0.3863, -0.3579, +0.0952,
-0.3241, +0.0511, +0.4439, +0.5712, -0.4604, +0.1338, +0.7400,
+0.2259, -0.5242, -0.5329, -0.4611, -0.1593, +0.0052, +0.1623,
-0.3202, -0.5784, +0.0174, -0.8842, -0.4272, +0.3299, -0.2110,
+0.0281, +0.4345, -0.0094, +0.4800, +0.0468, -0.1435, -0.1890,
+0.4818, +0.3842, +0.5413, +0.0015, -0.1571, -0.0965, -0.2082,
+0.3220, -0.4657, -0.2957, -0.4660, +0.1112, +0.0833, -1.0452, +0.2931
],
[
-0.1050, -0.3930, -0.8470, -0.1539, +0.0283, +0.0506, -0.2962,
+0.1335, +0.1858, +0.2597, +0.1192, +0.0226, -1.1154, +0.4943,
-0.2086, +0.3223, -0.2796, -0.7304, -0.3808, -0.2430, +0.1130,
-1.4927, -0.0413, +0.1508, +0.2756, -0.1085, +0.0958, -0.0511,
-0.1654, -0.5590, +0.4892, +0.3117, -0.4354, -0.5566, -0.2910,
+0.1871, -0.3210, +0.0707, -1.4751, -0.0064, -0.3395, +0.1091,
-0.3423, -0.1070, +0.6077, -0.6818, +0.0364, +0.1810, -0.2418,
-0.4348, +0.2138, -0.4457, +0.1850, +0.1663, -0.4589, -0.0590,
+0.0140, -1.0031, +0.1671, +0.3095, -0.1959, -0.2354, +0.1129, -0.0914
],
[
+0.1642, +0.1094, +0.3448, -0.0749, -0.0180, +0.2558, +0.4060,
+0.3335, +0.4197, -0.1441, -0.2556, +0.6254, -0.3226, -0.6062,
-0.2805, -0.1570, -0.3601, -0.3835, -0.2042, -0.0328, +0.1023,
+0.0759, +0.2519, -0.1706, -0.0075, -0.4085, -0.3140, -0.1070,
+0.0632, +0.0191, -0.4709, -0.2254, +0.0114, +0.3076, +0.2059,
+0.5133, -0.2243, +0.2795, +0.3773, +0.0803, -0.4325, -0.9119,
-0.1979, -0.6436, -0.2572, -0.3237, -0.4447, +0.5916, -0.3867,
+0.0101, +0.1406, -0.1133, +0.2802, -0.6540, -0.3323, +0.4628,
-0.0367, -0.2508, +0.2539, -0.3993, -0.5283, -0.2690, -0.3873, -0.3024
],
[
-0.1436, -0.5517, -0.4431, +0.5327, -0.2588, +0.0900, -0.4125,
-0.2162, -0.1184, +0.2474, -0.1347, +0.1252, -0.0133, +0.0987,
-0.4174, +0.3728, -0.1239, -0.2282, +0.0385, -0.1100, +0.6123,
-0.4759, -0.3614, -0.0685, +0.3599, -0.0198, +0.1704, -0.0608,
-0.0503, +0.4438, -0.7307, +0.3350, +0.1720, +0.4469, -0.0751,
+0.0401, +0.3470, -0.0172, +0.0262, -0.0346, +0.1317, -0.1553,
+0.2946, -0.2742, +0.2364, -0.0640, +0.2536, -1.0183, +0.0773,
-0.2492, +0.0397, -0.3045, -0.3429, -0.3352, -0.5485, +0.3430,
+0.1481, -0.4997, +0.0928, -0.2616, -0.1770, +0.5925, +0.1034, +0.1339
],
[
-0.2951, +0.0378, +0.0823, +0.0307, +0.0271, +0.3036, -0.0292,
-0.2978, +0.0779, +0.1428, -0.4928, +0.2944, +0.2024, +0.1920,
-1.0302, +0.3304, +0.0657, +0.0634, +0.3791, +0.0085, +0.0081,
+0.2927, -0.0241, -0.2411, -0.7849, -0.1806, -0.0433, +0.3816,
-0.0558, -0.1094, -0.0139, +0.1603, +0.4586, -0.7991, +0.1147,
-0.5045, +0.0183, -0.3893, -0.0443, -0.1665, +0.0342, -0.2120,
-0.1391, -0.4926, +0.1438, +0.1863, -0.7227, +0.3673, -0.1077,
-0.9778, +0.7210, +0.3733, +0.0778, -0.4336, -0.3407, -0.0074,
+0.0330, -0.4428, +0.1380, -0.8513, +0.0357, +0.4141, +0.1583, +0.2167
],
[
+0.2654, +0.0174, +0.2618, +0.1341, -0.1338, -0.1338, -0.2252,
-0.1168, -0.0680, -0.1107, -0.7590, +0.0632, -0.0997, +0.2548,
-0.8639, -0.7354, +0.2814, -0.4214, +0.2266, +0.0072, +0.1706,
+0.3742, +0.2437, -0.5361, -0.2646, -0.3248, +0.1836, -1.9472,
-0.0832, -0.0410, +0.4056, -0.4654, -0.3995, -0.4292, -0.4182,
-0.4856, -0.8076, -0.7141, -0.2657, +0.0958, +0.0713, -0.2720,
-0.2588, -0.5835, +0.4793, -0.4319, -0.1098, -0.3144, +0.4965,
-0.4547, +0.3820, +0.4288, +0.0844, +0.5179, -0.0320, -0.8708,
-0.0751, +0.1578, +0.0879, -0.4416, +0.1729, -0.1362, -0.5350, -0.3401
],
[
-0.2118, +0.3834, +0.3130, +0.3395, -0.3651, -0.0606, +0.4956,
+0.0693, -0.0051, -1.4244, +0.1108, +0.0637, +0.1052, -0.0301,
-0.0014, +0.0911, -0.8848, +0.1114, +0.0666, +0.3995, +0.4920,
-0.5034, -0.3851, +0.1373, -0.1200, +0.3886, +0.0684, -0.0183,
-0.4282, -0.0734, -0.1273, -0.4760, +0.1408, +0.5883, -0.0509,
-0.2998, -0.3337, +0.1388, -0.2568, -0.1320, +0.1283, -0.5020,
+0.1919, +0.1973, +0.3350, -0.0218, +0.7082, -0.2393, +0.0386,
-0.9842, -0.6694, -0.5423, +0.0867, -0.8208, -0.1974, +0.3153,
-0.2347, -0.7509, +0.1957, -0.2120, -0.1423, +0.0256, -0.5109, -0.5835
],
[
-1.1792, -0.6405, -0.2588, -0.0688, -0.5575, +0.2734, -0.2927,
-0.9779, +0.3497, -0.7755, -0.3234, -0.2550, +0.3339, -0.4122,
-0.0858, +0.3816, +0.4377, -0.9395, -0.0228, +0.2162, -0.0766,
-0.2358, -1.2153, -0.0550, -0.0737, +0.2427, -0.2674, +0.1653,
-0.3603, +0.2592, -0.3009, +0.0850, -0.1091, -0.6973, -0.4073,
-0.6798, -0.0625, -0.3739, -0.0816, +0.0060, +0.1769, +0.5716,
-0.2536, -0.3430, +0.1475, +0.0754, -0.1260, +0.2230, +0.0758,
-0.1088, -0.0445, +0.2242, +0.1145, +0.4178, -0.6738, -0.2665,
-0.0909, -0.7142, -0.1012, -0.4404, +0.0002, -0.0546, -0.3006, -0.0512
],
[
-0.9125, +0.3809, -0.2227, +0.1087, -0.3885, +0.2956, +0.2774,
-0.5007, -0.3132, +0.0619, -0.1097, +0.1279, -0.0931, +0.1050,
-0.3562, -1.4404, -0.4041, -0.1452, +0.2098, -0.3736, +0.4604,
+0.3447, +0.3285, -0.4358, -0.0095, -1.4794, +0.1615, -0.3714,
-0.1101, +0.2171, -0.2488, -0.5689, -0.0069, -0.3341, +0.4860,
+0.1670, -0.5619, -0.2339, -0.4304, -0.1604, -0.1719, -0.1354,
-0.1688, +0.5730, +0.0874, +0.9201, +0.4451, -0.1082, +0.5830,
-0.5734, +0.8476, +0.1526, -0.0611, +0.0482, +0.4043, +0.1631,
+0.0934, +0.5185, -0.4728, -0.7169, +0.2903, -0.1128, +0.1467, +0.0853
],
[
+0.2255, -0.1422, +0.6191, -0.5573, -0.4242, +0.6153, -0.0805,
-0.6878, +0.0707, +0.1314, -1.1376, -0.4014, +0.0828, -0.1102,
+0.4117, +0.1082, -0.1197, -0.0014, +0.2616, -0.4504, -0.1758,
-0.5121, +0.4080, -0.7097, -1.0162, -0.0971, -0.1583, -0.4393,
+0.2060, -0.2875, -0.0826, +0.0484, +0.1807, -1.0531, +0.1788,
-0.2329, -1.2088, -1.2534, -0.3840, -0.3139, +0.1190, -0.4243,
-0.3891, -0.1715, +0.2351, -0.0939, -0.1855, -0.4761, +0.4378,
+0.1383, -0.0800, +0.1091, -0.3985, +0.0516, -0.1441, +0.0286,
-1.0542, +0.4448, -0.8192, +0.4307, -0.2630, -0.6092, -0.0993, -0.1385
],
[
+0.1763, -0.3222, +0.2001, -0.5100, -0.0191, +0.3838, -0.2628,
+0.4131, -0.3282, +0.5341, +0.1770, -0.3993, -0.4334, +0.3543,
+0.4917, -0.3028, -0.5898, +0.2188, +0.4483, -0.4407, -0.1927,
+0.0154, +0.1614, -0.7020, +0.3948, +0.1950, +0.0146, +0.4208,
+0.3840, -0.2642, +0.7406, -0.1180, -0.0369, -0.8693, +0.2694,
-0.0968, +0.0402, -0.1230, -0.2885, +0.0380, -0.4557, +0.2529,
-0.1008, -0.1731, -0.8810, -0.2787, +0.4076, +0.1796, +0.4104,
+0.3133, -0.5395, +0.0393, -0.2067, +0.7584, -0.3746, +0.0869,
+0.6750, +0.3594, -0.3354, +0.2386, -0.1971, +0.0392, -0.0169, -0.1902
],
[
+0.2144, -0.3314, +0.2725, -0.0827, -0.0906, +0.0674, +0.1273,
-0.4302, +0.2808, -0.8198, -0.0832, +0.3300, +0.4027, +0.0423,
+0.2126, +0.1215, +0.1076, -0.3192, -0.0130, +0.2427, -0.1374,
+0.1292, +0.1993, -0.5142, -0.1865, +0.0820, +0.0993, +0.1877,
-0.3977, +0.0706, -0.7814, +0.2711, +0.4268, -0.1433, +0.4873,
+0.5543, +0.0717, +0.2401, -0.0935, -0.2784, +0.2711, +0.2732,
-0.8383, -0.2575, -0.0303, +0.0535, +0.1117, -0.3160, +0.2767,
+0.1754, +0.0219, -0.0515, +0.0079, -0.7837, +0.1359, +0.0749,
-0.2690, +0.1145, -0.1394, +0.2234, -0.8230, +0.2444, -0.5010, -0.0515
],
[
-0.7577, -0.1246, -0.6416, -0.1292, +0.1269, -0.1601, -0.7096,
+0.5698, +0.1452, +0.2287, -0.1673, +0.1212, -0.0779, -0.3946,
-0.6451, -1.1095, -0.7062, -0.0777, +0.1132, -0.2283, +0.0272,
-0.0535, -0.0579, +0.3027, +0.3611, -0.0492, +0.0490, +0.1978,
-0.1055, +0.1079, +0.2022, +0.1964, -0.3552, +0.0624, -0.2604,
-0.3808, +0.0454, +0.3496, +0.1034, -0.1317, +0.2831, -0.8189,
+0.2068, -0.0665, -0.2932, -0.3625, +0.1067, -0.3037, +0.3838,
+0.0383, +0.1815, +0.2562, -0.0403, -0.0175, -0.1908, -0.7806,
+0.1274, +0.1829, -0.1783, +0.2590, -0.4242, -0.0020, +0.2163, -0.7718
],
[
-0.1172, -0.2910, +0.1343, +0.1023, +0.2716, +0.2049, -0.6185,
+0.2182, -0.1194, -0.0311, -0.4619, +0.2636, +0.2120, -0.2086,
+0.0149, +0.0339, +0.2969, -0.3070, -0.2462, -0.1908, -0.2441,
+0.3313, +0.6891, +0.1639, -1.0531, -0.1253, -0.2737, +0.2814,
+0.1508, +0.1255, +0.4555, -0.0806, -0.0359, +0.0192, -0.0501,
+0.3172, +0.0013, -0.8248, -0.1446, -0.1389, +0.3792, +0.3625,
-0.2145, +0.0517, +0.2897, +0.0143, +0.0080, +0.1945, -0.4495,
-0.0941, +0.5322, +0.2886, -0.0868, -1.5349, +0.0948, -0.7860,
+0.5374, -0.5335, -0.0638, -0.1858, +0.0161, -0.2840, -0.3180, +0.3528
],
[
-0.3348, +0.2055, -0.9754, -0.4012, +0.4188, -0.2831, +0.1521,
+0.1827, +0.1194, +0.0318, -0.0500, -0.4176, -0.3061, +0.0976,
-0.0334, -0.0595, -1.2187, -0.2892, -0.0487, -0.3854, -0.0304,
+0.1867, -0.0166, +0.2530, +0.2887, -0.2363, -0.1904, +0.2580,
+0.0583, +0.3023, -0.0038, -0.3527, +0.3573, -0.0487, -0.0710,
-0.4197, +0.1109, +0.1214, -0.5087, +0.3008, -1.3029, -0.4291,
-0.0687, +0.1112, +0.1664, +0.4177, +0.0462, +0.0217, +0.3115,
+0.2880, +0.1207, -0.1077, +0.1978, +0.0262, +0.2084, -0.4996,
+0.0478, +0.3084, -0.0012, -0.2354, -0.5644, +0.1193, +0.0854, -0.5877
],
[
-0.3103, -0.3814, +0.1322, -0.1447, -0.2558, +0.0371, +0.0856,
+0.1248, +0.2103, -0.2475, -0.2205, +0.3099, +0.3163, -0.1651,
+0.2838, +0.2346, -0.3855, -0.2486, -0.3396, -0.0437, +0.3671,
-0.0069, +0.4828, -0.6932, -0.7277, +0.3441, -0.8020, +0.4863,
+0.1061, -0.2418, -0.2396, -0.0053, -0.1668, -0.2948, -0.0782,
-0.0149, +0.3159, +0.2116, +0.2267, -0.2058, +0.1034, -0.0827,
+0.0529, +0.0069, +0.1822, +0.0000, +0.0525, +0.2258, -0.2335,
-0.0016, -0.1231, +0.8993, -0.6615, -0.8643, -0.1698, -0.1447,
+0.0801, -1.4432, -0.2538, +0.1848, +0.1005, +0.3882, +0.0458, +0.0405
],
[
+0.3984, +0.1613, +0.5291, +0.1697, -0.2074, -0.4148, -0.3233,
-0.3691, -0.1697, -0.0608, -1.2200, +0.2840, -0.7305, -0.2600,
+0.2990, +0.0959, -0.0343, +0.2958, +0.1014, -0.2986, -0.6878,
+0.1185, -0.4202, -0.5000, -0.2732, +0.0477, +0.0419, -0.4453,
-0.3634, -0.2955, +0.1807, +0.2088, -0.1500, -0.1789, -0.2411,
-0.3513, -0.2156, +0.1619, -0.7682, -0.2928, +0.2605, +0.4007,
+0.1044, -0.7360, +0.1440, -0.4713, -0.2737, -0.5854, +0.0717,
+0.5728, +0.3894, +0.1652, -0.5978, +0.2093, +0.2174, -0.3677,
-0.2305, -0.1676, -1.2163, -0.3159, -0.5652, -0.1905, -0.1668, +0.2184
],
[
-0.0008, -1.0383, +1.1172, -0.3757, +0.1185, +0.2778, +0.1407,
-0.1279, -0.5174, -0.4343, +0.0887, -0.0483, -0.0541, -0.3713,
-0.3302, +0.4045, +0.4483, -0.6313, +0.0040, +0.1367, +0.2285,
-0.2697, -1.1601, +0.0076, +0.1744, +0.1132, -0.1431, -0.3811,
-0.6136, +0.2844, -0.1848, -0.5152, -1.0414, -0.4109, -0.7278,
-0.0349, +0.1370, -0.1978, +0.5068, +0.1623, -0.2598, -0.5556,
+0.2846, -0.1811, -1.5462, -0.2162, +0.5351, -0.2391, -0.1035,
-0.2865, -0.1122, +0.4251, -0.2923, -0.8803, +0.1712, +0.1824,
+0.2363, -0.6512, +0.2178, -0.4485, -0.3429, -0.1578, +0.1009, -0.1692
],
[
+0.0041, +0.4229, +0.0388, +0.5734, +0.1830, -0.5990, +0.0260,
-0.4107, -0.1851, -0.2277, -0.0275, -0.2505, +0.4437, +0.3490,
+0.2597, -0.1346, -0.5125, -0.1878, -0.4422, +0.0793, +0.0946,
+0.1463, +0.3695, +0.4150, +0.2463, -0.4557, +0.4123, +0.2879,
+0.6034, -0.5302, -0.7214, -0.2835, -0.0240, +0.2951, +0.3102,
-0.2566, -0.0515, -0.1121, -0.5604, -0.3810, +0.4285, +0.9055,
-0.2602, +0.2380, -0.3954, -0.0396, +0.6154, +0.0981, +0.4571,
+0.0322, +0.2965, +0.1396, -0.0881, -0.0175, +0.3386, -0.0699,
+0.1114, +0.3103, +0.0885, -0.2483, +0.3396, -0.5895, -0.4524, +0.4458
],
[
-0.7421, -0.1838, +0.0929, +0.1654, -0.1778, +0.1589, +0.1777,
+0.1539, +0.6931, -0.0002, +0.0366, -0.2482, +0.3404, -0.6776,
-0.0599, -0.9906, -0.1703, -0.2741, -0.2623, +0.2435, +0.1282,
-0.2218, -0.4463, -0.0515, -0.1126, +0.5793, -0.4053, +0.3077,
-0.2113, -0.1654, -0.4019, +0.3054, -0.2755, -0.0359, -1.3564,
+0.7528, +0.0788, +0.2060, +0.1633, -0.4355, +0.2035, -0.2194,
-0.0381, -0.1512, -0.7473, +0.2736, -0.0204, -0.4578, -0.4144,
+0.0076, -0.6070, +0.0851, +0.4764, -0.3511, -0.1171, -0.8141,
+0.1976, +0.2906, +0.0918, +0.2261, +0.2769, +0.1746, +0.5881, -0.8917
],
[
-0.3276, -0.1296, +0.3245, -0.0630, +0.1080, -0.0923, -0.0555,
-0.4351, -0.4805, +0.1625, -0.7317, +0.0232, -0.0290, -1.2621,
+0.0074, +0.6063, -0.0992, +0.2137, -0.0525, -0.1596, +0.2326,
+0.7151, -0.2879, -0.9427, +0.0728, +0.3451, -1.3029, -0.1453,
-0.0766, -0.1260, +0.2174, +0.2524, -0.0272, -0.9901, -0.2757,
-0.0532, +0.0768, -0.6334, +0.2368, +0.1227, -0.6449, -0.0662,
+0.3466, -0.1741, +0.1209, +0.4601, +0.1192, -0.0727, -0.3973,
-0.2250, +0.1601, +0.1562, -0.2805, -0.0830, -0.0274, -0.4325,
+0.0951, -0.1183, +0.1025, +0.0261, -0.6047, -0.0146, -0.1957, +0.0218
],
[
+0.1081, +0.3138, +0.3278, -0.7791, +0.1543, -0.1908, +0.3635,
+0.0070, +0.3577, -0.0404, -0.8582, -0.4834, +0.3016, -0.6306,
-0.4563, +0.1801, -0.2791, -0.6206, +0.0517, +0.5410, +0.1347,
+0.4778, +0.0558, -0.0759, -0.0772, +0.1917, -0.7159, -0.0643,
-0.1721, -0.5170, -0.3511, -0.3017, +0.1299, -0.7527, -0.1136,
-0.3605, -0.3682, -0.0709, +0.0723, -0.2196, -0.9063, -0.3520,
-0.3413, +0.2594, +0.1649, -0.5071, -0.1584, +0.1231, +0.0057,
-0.4875, +0.2410, -0.2405, +0.3705, -1.0071, +0.3241, +0.0207,
-0.4803, -0.4314, +0.1130, -0.0724, +0.2252, -0.2790, +0.0415, +0.0660
],
[
-1.0239, +0.0612, -0.1775, +0.0616, +0.3968, +0.1192, -0.0637,
-1.3325, +0.0141, -0.3692, -0.2163, +0.1634, +0.1818, +0.1767,
-0.3110, -0.5755, -0.2020, -0.1910, +0.4489, -0.0309, +0.2252,
+0.0045, +0.0525, -0.9357, +0.0912, -0.2257, +0.2897, +0.4927,
+0.0509, -0.3725, +0.2843, -0.8260, -0.1409, -1.0330, -0.1377,
+0.2625, +0.0637, -0.5822, -1.0901, +0.2305, -0.0809, -0.4811,
-0.2776, +0.1618, -0.6189, +0.1608, +0.2586, -0.4005, -0.0048,
-0.4438, -0.0799, +0.1356, +0.0141, -0.1191, +0.3150, -0.4819,
-0.2142, +0.1938, +0.2875, -0.5401, +0.0929, -0.3865, -0.0821, -0.5999
],
[
+0.4043, -0.0639, -0.3917, +0.0908, +0.0894, -0.4655, -0.2022,
+0.3332, -0.2707, +0.0466, +0.1355, +0.1318, -0.3180, -0.3957,
-0.0124, -0.7214, -0.2792, +0.3177, -0.5455, -0.5225, -0.2927,
-0.2688, +0.0192, +0.3940, +0.0514, +0.2258, -0.3504, -0.0024,
+0.0145, -0.2194, -0.0040, +0.2842, -0.0667, -0.4815, +0.2162,
+0.1778, -0.7473, +0.4520, +0.1720, -0.5224, -0.0490, -0.5519,
-0.3571, +0.4386, -0.1868, -0.2627, -0.3350, -0.7849, -0.1009,
+0.1432, -0.2389, +0.1923, -0.4800, +0.0100, -0.0507, +0.0151,
+0.3257, +0.0299, +0.0118, +0.2283, -0.2633, +0.2229, -0.7595, +0.1507
],
[
+0.2797, -0.2386, -0.0121, +0.2439, -0.0317, -0.0390, +0.0581,
-0.8813, -0.5392, -0.2527, -0.4720, +0.4787, +0.3710, +0.0434,
+0.0702, -1.0678, -0.0195, -0.6846, -0.7418, +0.0543, -0.3187,
-0.1510, -0.3590, -0.0902, +0.2195, +0.0943, -0.0384, -0.7203,
+0.0316, -0.0647, +0.1894, +0.2490, -1.3374, +0.3883, +0.1207,
+0.4036, +0.3255, +0.3757, +0.2444, +0.2612, -1.5274, +0.1092,
+0.5718, -0.1929, -0.1531, -0.2330, +0.0539, +0.2055, -0.8240,
+0.1292, -0.4835, +0.5281, +0.1944, -0.3389, -0.3689, +0.4941,
+0.0330, +0.0938, +0.4999, -0.2465, -0.2547, +0.3286, -0.2172, +0.4791
],
[
+0.4580, +0.6728, +0.1603, -0.5751, -0.8616, +0.0422, -0.3104,
-0.2042, +0.4133, +0.3150, -0.8036, -0.5332, +0.5432, +0.2999,
+0.1480, -0.2845, -0.9013, -0.0924, -0.6048, -0.1631, -0.1127,
-0.3833, -0.5830, -1.1764, -1.2800, -0.0174, -0.2561, +0.1081,
+0.3352, +0.1175, +0.3419, +0.7590, +0.4220, -0.8411, +0.0312,
+0.3287, +0.2295, -0.0867, -0.6239, +0.0633, +0.3005, -0.0838,
-0.4589, -0.2385, +0.2734, -0.2946, -0.2759, -0.4446, +0.0052,
-0.3499, -0.3503, +0.1211, -0.1839, -0.2803, +0.0158, +0.2441,
+0.4413, -0.4929, +0.3714, +0.5445, -0.0731, -0.3297, -0.5428, +0.4811
],
[
-0.3528, +0.2554, +0.1195, +0.2853, -0.0731, -0.0237, -0.0755,
+0.3719, -0.5900, +0.3071, +0.1961, -0.3822, -0.3113, +0.3011,
+0.1113, -0.1598, -0.0299, +0.6281, +0.1811, +0.1312, +0.1971,
-0.4736, +0.7463, -0.0154, +0.4255, -0.3671, +0.3200, -0.1815,
-0.4259, +0.1115, +0.4232, -0.3993, +0.0706, -0.1901, +0.1188,
-0.6964, -0.5131, -0.5996, -0.0103, +0.1504, +0.0713, -0.0430,
-0.8008, +0.1890, -0.2637, +0.1984, +0.0119, +0.1025, -0.9490,
-0.0255, +0.2795, +0.2354, -0.1830, +0.1894, -0.1928, -0.8840,
+0.3929, +0.1748, +0.1588, +0.4326, -0.0759, +0.1664, +0.2102, -0.3707
],
[
+0.0479, -0.0155, -0.3830, +0.0390, -0.0793, -0.1159, -0.0263,
-0.3720, -0.9581, +0.2546, -0.4353, +0.2756, -0.0628, +0.0360,
+0.1591, -0.7122, +0.1463, -0.1078, -0.5880, +0.1476, -0.0437,
-0.6911, -0.0355, +0.2766, -0.3426, +0.2286, -0.2323, -0.2819,
-0.0887, +0.5000, -0.0338, -0.1563, -0.0168, +0.0500, -0.1077,
+0.4968, -1.1365, +0.1814, -0.1388, -0.1080, +0.0761, -0.4107,
+0.3764, +0.3308, +0.0905, -0.2821, -0.2366, -0.2618, +0.2762,
-0.2521, +0.1400, -0.1133, +0.0411, -0.0475, -0.4804, +0.4348,
-0.1652, +0.0103, +0.2100, -0.3716, +0.1860, -0.3946, -0.1734, +0.2052
],
[
-0.0266, -0.2590, -0.1527, +0.2632, -0.1506, -0.0040, -0.3828,
-0.7623, -0.1620, -0.1641, +0.0927, +0.1030, -0.1890, +0.2110,
+0.1634, -1.4356, +0.1170, -0.7333, -0.3429, -0.3402, +0.5740,
+0.2288, +0.0264, -0.0770, +0.0611, +0.2538, +0.5611, -0.0635,
-0.0885, -0.0698, +0.2153, +0.0752, -0.2368, +0.2113, -0.8473,
-0.7176, -0.3615, -0.2906, +0.0310, +0.0041, -0.3076, +0.1850,
+0.0959, -0.1510, +0.1042, +0.0781, +0.1000, -0.0701, -0.0252,
+0.6513, +0.1680, +0.3624, -0.5958, -0.6897, +0.1336, -0.0600,
+0.0437, -0.2525, +0.1216, -0.2053, +0.0452, +0.8903, -0.0487, -0.0072
]])
weights_dense2_b = np.array([
+0.2226, +0.0124, +0.0027, +0.2335, +0.0952, +0.0250, +0.1087, +0.1225,
+0.0476, +0.1535, +0.0940, +0.0421, +0.0967, +0.0431, -0.2867, -0.1520,
-0.0796, +0.0041, +0.0599, +0.0139, -0.0608, -0.0695, +0.0222, +0.0420,
-0.0988, +0.0851, +0.2547, +0.0361, +0.0341, +0.0986, +0.1827, -0.1344,
+0.1575, +0.0374, +0.0497, -0.1436, +0.1622, +0.2187, +0.0257, +0.0680,
-0.0228, +0.0215, +0.1596, -0.0594, -0.0886, -0.0006, -0.0940, +0.1568,
+0.0610, +0.1915, +0.1162, +0.0765, -0.1731, -0.0258, +0.0896, -0.2285,
+0.0948, +0.0286, +0.1174, +0.0382, +0.2536, +0.3435, +0.0281, +0.2328
])
weights_final_w = np.array(
[[-0.0133, +0.0628, -0.6441, +0.2383, +0.4270, +0.1927, -0.3628, +0.3698],
[-0.0089, +0.0614, +0.0522, -0.3912, -0.1872, -0.7369, +0.0852, -0.1505],
[+0.2779, +0.7024, -0.3493, -0.2124, -0.0220, +0.0741, +0.0670, -0.1029],
[-0.0519, +0.2775, -0.3879, -0.0335, +0.1150, +0.0789, -0.1963, +0.1992],
[+0.0241, +0.2946, +0.2777, -0.2040, +0.4150, +0.0810, -0.0170, -0.0202],
[-0.2781, +0.0243, -0.0485, +0.1249, -0.0354, -0.0327, +0.2284, -0.3674],
[-0.1843, +0.1452, -0.0728, +0.2894, +0.1892, +0.0013, +0.1527, -0.3815],
[+0.4556, -0.1760, +0.0188, -0.2475, -0.3291, -0.3527, -0.6556, -0.5543],
[+0.0309, +0.3396, +0.0626, -0.0045, +0.2597, -0.2234, +0.3634, -0.1476],
[-0.3221, +0.4484, +0.0538, +0.2543, -0.3213, +0.4323, -0.2503, +0.0654],
[+0.5351, -0.2229, -0.1097, +0.1062, -0.5535, +0.4454, +0.1802, +0.1971],
[+0.1813, +0.0778, +0.1647, -0.1118, +0.4696, -0.3322, -0.2033, -0.0201],
[+0.1423, +0.2278, +0.0263, +0.1439, +0.0134, -0.5282, +0.1236, -0.0416],
[+0.1217, +0.1197, -0.5194, +0.4029, -0.1307, -0.4352, -0.0514, -0.2256],
[+0.1484, +0.0685, +0.4156, +0.1887, -0.7306, +0.1027, -0.4018, +0.0134],
[+0.2326, +0.0218, +0.0390, +0.0010, -0.5719, +0.0264, -0.4600, -0.3220],
[-0.0586, -0.3066, +0.2050, +0.1253, +0.4542, +0.1711, -0.6051, +0.0061],
[+0.0108, -0.5588, -0.3976, +0.3375, +0.3065, +0.2118, -0.4879, +0.1444],
[-0.1443, -0.2895, -0.3992, +0.0409, +0.3109, -0.0295, -0.2016, -0.3679],
[-0.2630, +0.2348, +0.2592, +0.1778, -0.1501, -0.2856, +0.3477, +0.1416],
[-0.3078, -0.3138, +0.2040, -0.3254, +0.2891, +0.0228, -0.3580, +0.2438],
[-0.0035, -0.1374, +0.9035, +0.1420, +0.1437, -0.1159, -0.1822, +0.2037],
[+0.2533, -0.0089, -0.1549, +0.1085, -0.5376, -0.0639, +0.3232, +0.0673],
[-0.1033, +0.2733, +0.1426, +0.4075, -0.1140, +0.1152, +0.2189, +0.7337],
[+0.0682, -0.1010, +0.2224, +0.4526, +0.0599, +0.1290, -0.5523, +0.0333],
[+0.1089, -0.1139, -0.0310, -0.2661, +0.0781, -0.1955, -0.2610, +0.1017],
[+0.0011, +0.4399, -0.2365, -0.1523, -0.1508, +0.2314, +0.1414, +0.1116],
[+0.0014, -0.0973, +0.6542, -0.0039, -0.2656, -0.1597, +0.0158, -0.0201],
[-0.1700, +0.0102, +0.1321, -0.1934, -0.2208, +0.0057, +0.1504, +0.3798],
[+0.1586, +0.0557, +0.1042, -0.4201, +0.0613, -0.0152, -0.3855, +0.1035],
[-0.0969, -0.0936, +0.1289, -0.4031, +0.1148, +0.3258, +0.2017, -0.2499],
[+0.5422, -0.3985, -0.0758, -0.0241, +0.1124, +0.0043, -0.0495, -0.1127],
[+0.1679, -0.1337, -0.2102, -0.0678, +0.0768, -0.5881, +0.0327, -0.1429],
[+0.2756, -0.1772, -0.3729, -0.0931, +0.6402, -0.0739, -0.1221, +0.5423],
[-0.2310, -0.6409, -0.0729, -0.2143, +0.0735, -0.3279, -0.1317, -0.2060],
[-0.0864, +0.0344, -0.5635, +0.3137, -0.0566, -0.3874, -0.0119, +0.0187],
[+0.4066, +0.1192, +0.2065, +0.0546, +0.2182, +0.6743, +0.2802, -0.0638],
[+0.2526, +0.6688, -0.0943, -0.2531, +0.1259, +0.1115, +0.0581, -0.0340],
[+0.1820, +0.2927, -0.2457, +0.0310, -0.3335, -0.5889, +0.0088, +0.3045],
[+0.0072, -0.0702, +0.1246, +0.0875, +0.0488, +0.2379, -0.1760, -0.5422],
[+0.1416, +0.1796, -0.7311, +0.0016, -0.4996, +0.0724, -0.4854, +0.2310],
[-0.5525, +0.1246, +0.8667, +0.3521, -0.7227, +0.4473, +0.0805, -0.1707],
[-0.3557, +0.0798, +0.5322, -0.0827, +0.1836, +0.2784, -0.1676, -0.1012],
[-0.6738, +0.5545, -0.3111, +0.2171, -0.3377, -0.2039, -0.1205, +0.1212],
[-0.2249, -0.1037, -0.4715, -0.3616, +0.2250, +0.0999, +0.4772, -0.0679],
[-0.4895, -0.2557, +0.0892, -0.0000, -0.4443, +0.2913, -0.0450, -0.3303],
[-0.2729, +0.0973, +0.2516, -0.4313, -0.1743, -0.2386, -0.1142, -0.0440],
[-0.6820, +0.2449, -0.1079, +0.3047, +0.0325, -0.0980, +0.1868, -0.1600],
[-0.2085, -0.2897, -0.4539, -0.0506, +0.1225, +0.1976, -0.2360, +0.6553],
[+0.5299, +0.2876, +0.2354, -0.0884, -0.1821, +0.3841, -0.0701, +0.0278],
[-0.1594, -0.4837, +0.1483, -0.1280, +0.0962, -0.1932, +0.1730, +0.0544],
[+0.2879, -0.1846, +0.1474, -0.3383, +0.1483, +0.1159, +0.3761, +0.2326],
[-0.0960, -0.0727, -0.3099, +0.0548, +0.2339, -0.2232, +0.6066, +0.3826],
[-0.0171, +0.1490, -0.3324, -0.0231, +0.0700, -0.6364, -0.1944, +0.3094],
[+0.0804, -0.0278, +0.0182, -0.3807, -0.3628, -0.3564, +0.2279, -0.0226],
[+0.4219, +0.0741, +0.1299, +0.4700, +0.1927, +0.0849, -0.1574, +0.5607],
[+0.0810, -0.0815, +0.1356, +0.2048, -0.1404, -0.0222, -0.2464, +0.4991],
[+0.3000, +0.0862, -0.3917, +0.4117, +0.0306, +0.0788, -0.0403, -0.6423],
[-0.2445, +0.4847, +0.0478, -0.2170, -0.3700, +0.0189, +0.0001, -0.0335],
[+0.3710, -0.0115, -0.4207, -0.4245, +0.2041, -0.0875, -0.2369, -0.6424],
[-0.3608, +0.0539, -0.3928, -0.0352, +0.2832, +0.1003, -0.0082, +0.3201],
[+0.2221, -0.0399, +0.2092, -0.1670, -0.5146, +0.2273, +0.3011, -0.2879],
[+0.1500, +0.3236, +0.1295, -0.0763, -0.2708, +0.6542, +0.1379, -0.0646],
[+0.1291, +0.0417, +0.1386, +0.0166, +0.1373, +0.1956, +0.4986, +0.5690]])
weights_final_b = np.array(
[-0.0680, +0.1401, -0.0628, -0.1317, +0.1489, +0.1844, -0.1147, +0.0137])
# yapf: enable
if __name__ == "__main__":
main()
| {
"repo_name": "MTASZTAKI/ApertusVR",
"path": "plugins/physics/bulletPhysics/3rdParty/bullet3/examples/pybullet/gym/pybullet_envs/examples/enjoy_TF_AntBulletEnv_v0_2017may.py",
"copies": "2",
"size": "132255",
"license": "mit",
"hash": 3718009380563957000,
"line_mean": 59.9751037344,
"line_max": 96,
"alpha_frac": 0.4818645798,
"autogenerated": false,
"ratio": 1.7109757044166731,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.3192840284216673,
"avg_score": null,
"num_lines": null
} |
"""Add parent duns and parent legal business name to DUNS table
Revision ID: 6973101b6853
Revises: c4d42e86c655
Create Date: 2018-03-28 10:31:51.687556
"""
# revision identifiers, used by Alembic.
revision = '6973101b6853'
down_revision = 'c4d42e86c655'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade(engine_name):
globals()["upgrade_%s" % engine_name]()
def downgrade(engine_name):
globals()["downgrade_%s" % engine_name]()
def upgrade_data_broker():
### commands auto generated by Alembic - please adjust! ###
op.add_column('duns', sa.Column('ultimate_parent_legal_enti', sa.Text(), nullable=True))
op.add_column('duns', sa.Column('ultimate_parent_unique_ide', sa.Text(), nullable=True))
### end Alembic commands ###
def downgrade_data_broker():
### commands auto generated by Alembic - please adjust! ###
op.drop_column('duns', 'ultimate_parent_unique_ide')
op.drop_column('duns', 'ultimate_parent_legal_enti')
### end Alembic commands ###
| {
"repo_name": "fedspendingtransparency/data-act-broker-backend",
"path": "dataactcore/migrations/versions/6973101b6853_add_parent_duns_and_name_to_duns_table.py",
"copies": "1",
"size": "1047",
"license": "cc0-1.0",
"hash": -6336872828829000000,
"line_mean": 25.8461538462,
"line_max": 92,
"alpha_frac": 0.694364852,
"autogenerated": false,
"ratio": 3.1536144578313254,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.4347979309831325,
"avg_score": null,
"num_lines": null
} |
# Add parent path,
# Allow starting the app without installing the module.
import sys
from os.path import dirname, join, realpath
import django
sys.path.insert(0, dirname(dirname(realpath(__file__))))
DEBUG = True
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": dirname(__file__) + "/demo.db",
}
}
TIME_ZONE = "Europe/Amsterdam"
LANGUAGE_CODE = "en-us"
SITE_ID = 1
USE_I18N = True
USE_L10N = True
MEDIA_ROOT = join(dirname(__file__), "media")
MEDIA_URL = "/media/"
STATIC_ROOT = join(dirname(__file__), "static")
STATIC_URL = "/static/"
STATICFILES_DIRS = ()
STATICFILES_FINDERS = (
"django.contrib.staticfiles.finders.FileSystemFinder",
"django.contrib.staticfiles.finders.AppDirectoriesFinder",
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
# Make this unique, and don't share it with anybody.
SECRET_KEY = "-#@bi6bue%#1j)6+4b&#i0g-*xro@%f@_#zwv=2-g_@n3n_kj5"
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": (join(dirname(__file__), "templates"),),
"OPTIONS": {
"loaders": (
"django.template.loaders.filesystem.Loader",
"django.template.loaders.app_directories.Loader",
),
"context_processors": (
"django.template.context_processors.debug",
"django.template.context_processors.i18n",
"django.template.context_processors.media",
"django.template.context_processors.request",
"django.template.context_processors.static",
"django.contrib.messages.context_processors.messages",
"django.contrib.auth.context_processors.auth",
),
},
}
]
MIDDLEWARE = (
"django.middleware.common.CommonMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
)
ROOT_URLCONF = "urls"
INSTALLED_APPS = (
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.sites",
"django.contrib.messages",
"django.contrib.staticfiles",
"django.contrib.admin",
"django.contrib.admindocs",
"fluent_contents",
"fluent_contents.plugins.code",
"fluent_contents.plugins.commentsarea",
#'fluent_contents.plugins.disquswidgets',
#'fluent_contents.plugins.formdesignerlink',
"fluent_contents.plugins.gist",
"fluent_contents.plugins.googledocsviewer",
"fluent_contents.plugins.iframe",
"fluent_contents.plugins.markup",
"fluent_contents.plugins.oembeditem",
"fluent_contents.plugins.picture",
"fluent_contents.plugins.rawhtml",
"fluent_contents.plugins.sharedcontent",
"fluent_contents.plugins.text",
#'fluent_contents.plugins.twitterfeed',
"parler",
# Example app
"article",
# Example CMS:
"mptt",
"simplecms",
"theme1",
# Other apps
"django_comments",
"django_wysiwyg",
#'disqus',
#'form_designer',
"tinymce",
)
TEST_RUNNER = "django.test.runner.DiscoverRunner"
SIMPLECMS_TEMPLATE_CHOICES = (
("theme1/pages/standard.html", "Standard"),
("theme1/pages/standard-twocols.html", "Two columns"),
)
SIMPLECMS_DEFAULT_TEMPLATE = SIMPLECMS_TEMPLATE_CHOICES[0][0]
DJANGO_WYSIWYG_FLAVOR = "tinymce_advanced"
LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"filters": {"require_debug_false": {"()": "django.utils.log.RequireDebugFalse"}},
"handlers": {
"mail_admins": {
"level": "ERROR",
"filters": ["require_debug_false"],
"class": "django.utils.log.AdminEmailHandler",
}
},
"loggers": {
"django.request": {
"handlers": ["mail_admins"],
"level": "ERROR",
"propagate": True,
}
},
}
# DISQUS_API_KEY = ''
# DISQUS_WEBSITE_SHORTNAME = ''
| {
"repo_name": "edoburu/django-fluent-contents",
"path": "example/settings.py",
"copies": "2",
"size": "4164",
"license": "apache-2.0",
"hash": 5547531644685149000,
"line_mean": 26.9463087248,
"line_max": 85,
"alpha_frac": 0.631364073,
"autogenerated": false,
"ratio": 3.4786967418546366,
"config_test": false,
"has_no_keywords": true,
"few_assignments": false,
"quality_score": 0.5110060814854637,
"avg_score": null,
"num_lines": null
} |
#add parents and children counts to the node attributes in the database
#haven't confirmed that I'm counting the right thing
#if want all relationships, not just unique, just delete calls to unique() and rename par and chil
from py2neo import neo4j, cypher
graph_db = neo4j.GraphDatabaseService("http://localhost:7474/db/data/")
#get rid of all duplicate relationships
def unique(lst, type):
if type == 'parents':
parents = []
for rel in lst:
enode = rel.end_node
if enode not in parents:
parents.append(enode)
return parents
else:
children = []
for rel in lst:
snode = rel.start_node
if snode not in children:
children.append(snode)
return children
for id in range(0, 3000):
try:
#get list of relationships
my_node = graph_db.node(int(id))
par = graph_db.match(start_node=my_node, rel_type="STREECHILDOF")
chil = graph_db.match(end_node=my_node, rel_type="STREECHILDOF")
#get lst of unique relationships only
parents = unique(par, 'parents')
children = unique(chil, 'children')
#update properties of node on Neo4j
dic = {}
dic['stree_children'] = len(children)
dic['stree_parents'] = len(parents)
my_node.update_properties(dic)
except:
continue
| {
"repo_name": "gharp/phyet",
"path": "add_prop_counts.py",
"copies": "1",
"size": "1453",
"license": "apache-2.0",
"hash": -8529767435190600000,
"line_mean": 32.5952380952,
"line_max": 98,
"alpha_frac": 0.5932553338,
"autogenerated": false,
"ratio": 3.854111405835544,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.4947366739635544,
"avg_score": null,
"num_lines": null
} |
"""add participant origin
Revision ID: 2a9c885158ac
Revises: bce6d443874f
Create Date: 2019-11-13 10:20:37.557338
"""
from alembic import op
import sqlalchemy as sa
import model.utils
from rdr_service.participant_enums import PhysicalMeasurementsStatus, QuestionnaireStatus, OrderStatus
from rdr_service.participant_enums import WithdrawalStatus, WithdrawalReason, SuspensionStatus, QuestionnaireDefinitionStatus
from rdr_service.participant_enums import EnrollmentStatus, Race, SampleStatus, OrganizationType, BiobankOrderStatus
from rdr_service.participant_enums import OrderShipmentTrackingStatus, OrderShipmentStatus
from rdr_service.participant_enums import MetricSetType, MetricsKey, GenderIdentity
from rdr_service.model.base import add_table_history_table, drop_table_history_table
from rdr_service.model.code import CodeType
from rdr_service.model.site_enums import SiteStatus, EnrollingStatus, DigitalSchedulingStatus, ObsoleteStatus
# revision identifiers, used by Alembic.
revision = '2a9c885158ac'
down_revision = 'bce6d443874f'
branch_labels = None
depends_on = None
def upgrade(engine_name):
globals()["upgrade_%s" % engine_name]()
def downgrade(engine_name):
globals()["downgrade_%s" % engine_name]()
PARTICIPANT_ORIGIN = """update {0}
set participant_origin =
case when client_id like 'care%'
then 'careevolution'
else
'vibrent'
end
where participant_id != 0;
"""
SUMMARY = """update participant_summary ps
inner join participant p on ps.participant_id = p.participant_id
set ps.participant_origin =
case when p.client_id like 'care%'
then 'careevolution'
else
'vibrent'
end
where ps.participant_id != 0;
"""
def upgrade_rdr():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('participant', sa.Column('participant_origin', sa.String(length=80), nullable=False))
op.add_column('participant_history', sa.Column('participant_origin', sa.String(length=80), nullable=False))
op.add_column('participant_summary', sa.Column('participant_origin', sa.String(length=80), nullable=False))
op.execute(PARTICIPANT_ORIGIN.format("participant"))
op.execute(PARTICIPANT_ORIGIN.format("participant_history"))
op.execute(SUMMARY)
# ### end Alembic commands ###
def downgrade_rdr():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('participant_summary', 'participant_origin')
op.drop_column('participant_history', 'participant_origin')
op.drop_column('participant', 'participant_origin')
# ### end Alembic commands ###
def upgrade_metrics():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
def downgrade_metrics():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
| {
"repo_name": "all-of-us/raw-data-repository",
"path": "rdr_service/alembic/versions/2a9c885158ac_add_participant_origin.py",
"copies": "1",
"size": "3129",
"license": "bsd-3-clause",
"hash": 6911441839676834000,
"line_mean": 34.9655172414,
"line_max": 125,
"alpha_frac": 0.6740172579,
"autogenerated": false,
"ratio": 3.9259723964868254,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.5099989654386825,
"avg_score": null,
"num_lines": null
} |
"""add participant summary last modified
Revision ID: adb4ea532f1a
Revises: e4518d7d1af1
Create Date: 2018-03-08 13:23:40.782964
"""
import model.utils
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "adb4ea532f1a"
down_revision = "e4518d7d1af1"
branch_labels = None
depends_on = None
def upgrade(engine_name):
globals()["upgrade_%s" % engine_name]()
def downgrade(engine_name):
globals()["downgrade_%s" % engine_name]()
def upgrade_rdr():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column("participant_summary", sa.Column("last_modified", model.utils.UTCDateTime(), nullable=True))
# ### end Alembic commands ###
def downgrade_rdr():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column("participant_summary", "last_modified")
# ### end Alembic commands ###
def upgrade_metrics():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
def downgrade_metrics():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
| {
"repo_name": "all-of-us/raw-data-repository",
"path": "rdr_service/alembic/versions/adb4ea532f1a_add_participant_summary_last_modified.py",
"copies": "1",
"size": "1175",
"license": "bsd-3-clause",
"hash": 5707010583975885000,
"line_mean": 23.4791666667,
"line_max": 110,
"alpha_frac": 0.6757446809,
"autogenerated": false,
"ratio": 3.5285285285285286,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.47042732094285283,
"avg_score": null,
"num_lines": null
} |
"""Add parties references to the 'users' and 'fraternities'
Revision ID: 6451c45cc96d
Revises: e2200226cabc
Create Date: 2016-04-15 19:15:32.280974
"""
# revision identifiers, used by Alembic.
revision = '6451c45cc96d'
down_revision = 'e2200226cabc'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.add_column('parties', sa.Column('creator_id', sa.Integer(), nullable=False))
op.add_column('parties', sa.Column('fraternity_id', sa.Integer(), nullable=False))
op.create_foreign_key(None, 'parties', 'users', ['creator_id'], ['id'])
op.create_foreign_key(None, 'parties', 'fraternities', ['fraternity_id'], ['id'])
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(None, 'parties', type_='foreignkey')
op.drop_constraint(None, 'parties', type_='foreignkey')
op.drop_column('parties', 'fraternity_id')
op.drop_column('parties', 'creator_id')
### end Alembic commands ###
| {
"repo_name": "Rdbaker/WPI-IFC",
"path": "migrations/versions/6451c45cc96d_.py",
"copies": "1",
"size": "1075",
"license": "bsd-3-clause",
"hash": 2426179893888569000,
"line_mean": 32.59375,
"line_max": 86,
"alpha_frac": 0.68,
"autogenerated": false,
"ratio": 3.1432748538011697,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.43232748538011695,
"avg_score": null,
"num_lines": null
} |
"""Add paste sha col
Revision ID: e78f9d818988
Revises: d3dad4db468d
Create Date: 2017-03-22 19:20:28.949724
"""
import hashlib
from alembic import op
import sqlalchemy as sa
from sqlalchemy import sql
# revision identifiers, used by Alembic.
revision = 'e78f9d818988'
down_revision = 'd3dad4db468d'
branch_labels = None
depends_on = None
meta = sa.MetaData()
def upgrade():
conn = op.get_bind()
op.add_column('pastes',
sa.Column('sha', sa.String(64), nullable=True, unique=True),
)
op.drop_constraint("pastes_contents_key", "pastes")
pastes = sa.Table(
'pastes', meta,
sa.Column('id', sa.Integer, primary_key=True),
sa.Column('contents', sa.Text(), nullable=False),
sa.Column('created_on', sa.DateTime),
sa.Column('sha', sa.String(32), nullable=False, unique=True)
)
for paste in conn.execute(pastes.select()):
sha = hashlib.sha256(paste.contents.encode('utf-8')).hexdigest()
conn.execute(pastes.update().where(pastes.c.id == paste.id).values(sha=sha))
op.alter_column('pastes', 'sha', nullable=False)
def downgrade():
op.drop_column('pastes', 'sha')
op.create_unique_constraint("pastes_contents_key", "pastes", ["contents"])
| {
"repo_name": "d0ugal/discode-server",
"path": "alembic/versions/e78f9d818988_add_paste_sha_col.py",
"copies": "1",
"size": "1245",
"license": "bsd-2-clause",
"hash": -9118585614909667000,
"line_mean": 24.4081632653,
"line_max": 84,
"alpha_frac": 0.6610441767,
"autogenerated": false,
"ratio": 3.136020151133501,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.42970643278335013,
"avg_score": null,
"num_lines": null
} |
"""Add path cache.
Revision ID: b050aa239139
Revises: 6c0e33ba7f1d
Create Date: 2016-08-22 17:37:09.343948
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
revision = 'b050aa239139'
down_revision = '6c0e33ba7f1d'
def upgrade():
op.create_table('path',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('entity_id', sa.Unicode(length=255), nullable=True),
sa.Column('data', postgresql.JSONB(), nullable=True),
sa.Column('length', sa.Integer(), nullable=True),
sa.Column('labels', postgresql.ARRAY(sa.Unicode()), nullable=True),
sa.Column('types', postgresql.ARRAY(sa.Unicode()), nullable=True),
sa.Column('end_collection_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['end_collection_id'], ['collection.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_path_end_collection_id'), 'path', ['end_collection_id'], unique=False)
op.create_index(op.f('ix_path_entity_id'), 'path', ['entity_id'], unique=False)
def downgrade():
op.drop_index(op.f('ix_path_entity_id'), table_name='path')
op.drop_index(op.f('ix_path_end_collection_id'), table_name='path')
op.drop_table('path')
| {
"repo_name": "OpenGazettes/aleph",
"path": "aleph/migrate/versions/b050aa239139_add_path_cache.py",
"copies": "4",
"size": "1258",
"license": "mit",
"hash": -8852663323998172000,
"line_mean": 34.9428571429,
"line_max": 99,
"alpha_frac": 0.6637519873,
"autogenerated": false,
"ratio": 3.168765743073048,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.5832517730373048,
"avg_score": null,
"num_lines": null
} |
# Add path to API
#import sys
#sys.path.insert(0, '../api')
#import utils
import argparse
import subprocess
import json
from pprint import pprint
parser = argparse.ArgumentParser(
description="Create an atlas of SVG maps",
epilog="Example usage: python makeatlas.py -C IN")
parser.add_argument("-C", "--hasc", dest="hasc",
type=str, default='W',
help="""HASC or ISO-A2 code of territory.""")
parser.add_argument("-B", "--bbox", dest="bbox",
type=str, default=None,
help="""Bounding box of map canvas in decimal degrees. Formatted as 'left,bottom,right,top' or 'minLon,minLat,maxLon,maxLat'""")
parser.add_argument("-b", "--buffer", dest="buffer",
type=int, default='2',
help="""Percentage of buffer area around the territory included in the map""")
args = parser.parse_args()
class Bbox:
"Bounding box coordinates"
def __init__(self, bbox):
self.wsen = bbox
self.w = float(bbox.split(',')[0])
self.s = float(bbox.split(',')[1])
self.e = float(bbox.split(',')[2])
self.n = float(bbox.split(',')[3])
self.buffer_bbox(args.buffer)
def buffer_bbox(self, buffer_percentage):
"Extend the bounds by a small percentage to include surrounding areas"
buffer_percentage *= 0.01
self.w = self.w - abs(self.w) * buffer_percentage
self.s = self.s - abs(self.s) * buffer_percentage
self.e = self.e + abs(self.e) * buffer_percentage
self.n = self.n + abs(self.n) * buffer_percentage
def load_index():
# Read country list
with open('index.json', 'r') as f:
try:
index = json.load(f)
for region in index:
# Generate atlas if territory code found in index file, or generate all if argument is W
if args.hasc == 'W' or args.hasc == region["hasc"] :
make_wikiatlas(region["hasc"],region["name"],Bbox(region["bbox"]))
finally:
f.close()
return 0
def make_wikiatlas(hasc,name,bbox):
"Run master.makefile for an item"
print "Making maps for {} with extents {}".format(name, bbox.wsen)
command = "make -f master.makefile ITEM={} WEST={} NORTH={} EAST={} SOUTH={}".format(hasc,bbox.w,bbox.n,bbox.e,bbox.s)
subprocess.call(command, shell=True)
if __name__ == '__main__':
# If country code and bbox parameters are set
if(args.hasc != 'W' and args.bbox is not None):
make_wikiatlas(args.hasc,'',args.bbox)
else:
#Generate atlas using parameters from index file
load_index() | {
"repo_name": "WikimapsAtlas/WikimapsAtlas-generator",
"path": "script/makeatlas.py",
"copies": "2",
"size": "2602",
"license": "mit",
"hash": -1467066772004977000,
"line_mean": 32.3717948718,
"line_max": 132,
"alpha_frac": 0.6087624904,
"autogenerated": false,
"ratio": 3.4832663989290493,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9996314048417252,
"avg_score": 0.019142968182359412,
"num_lines": 78
} |
## Add path to library (just for examples; you do not need this)
import sys, os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..'))
from pyqtgraph.Qt import QtGui, QtCore
import pyqtgraph as pg
import user
app = QtGui.QApplication([])
view = pg.GraphicsView()
l = pg.GraphicsLayout(border=pg.mkPen(0, 0, 255))
view.setCentralItem(l)
view.show()
## Add 3 plots into the first row (automatic position)
p1 = l.addPlot()
p2 = l.addPlot()
p3 = l.addPlot()
## Add a viewbox into the second row (automatic position)
l.nextRow()
vb = l.addViewBox(colspan=3)
## Add 2 more plots into the third row (manual position)
p4 = l.addPlot(row=2, col=0)
p5 = l.addPlot(row=2, col=1, colspan=2)
## show some content
p1.plot([1,3,2,4,3,5])
p2.plot([1,3,2,4,3,5])
p3.plot([1,3,2,4,3,5])
p4.plot([1,3,2,4,3,5])
p5.plot([1,3,2,4,3,5])
b = QtGui.QGraphicsRectItem(0, 0, 1, 1)
b.setPen(pg.mkPen(255,255,0))
vb.addItem(b)
vb.setRange(QtCore.QRectF(-1, -1, 3, 3))
## Start Qt event loop unless running in interactive mode.
if sys.flags.interactive != 1:
app.exec_()
| {
"repo_name": "robertsj/poropy",
"path": "pyqtgraph/examples/GraphicsLayout.py",
"copies": "1",
"size": "1075",
"license": "mit",
"hash": 8226626389694727000,
"line_mean": 22.3695652174,
"line_max": 71,
"alpha_frac": 0.6734883721,
"autogenerated": false,
"ratio": 2.471264367816092,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.3644752739916092,
"avg_score": null,
"num_lines": null
} |
"""Add payments table
Revision ID: 4b7ccf8ac448
Create Date: 2015-12-14 20:13:00.029117
"""
# revision identifiers, used by Alembic.
revision = '4b7ccf8ac448'
down_revision = None
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
def upgrade():
op.create_table(
'payments',
sa.Column('id', postgresql.UUID(), autoincrement=False, nullable=False),
sa.Column('currency', postgresql.ENUM(u'BTC', u'LTC', u'DOGE', name='currency_types'), autoincrement=False, nullable=False),
sa.Column('amount', sa.NUMERIC(precision=16, scale=8), autoincrement=False, nullable=False),
sa.Column('payment_address', sa.VARCHAR(length=128), autoincrement=False, nullable=False),
sa.Column('merchant_address', sa.VARCHAR(length=128), autoincrement=False, nullable=False),
sa.Column('confirmations_required', sa.INTEGER(), autoincrement=False, nullable=False),
sa.Column('status', postgresql.ENUM(u'UNPAID', u'PAID', u'CONFIRMED', u'UNDERPAID', u'REFUNDED', u'CANCELLED', u'EXPIRED', name='status_types'), autoincrement=False, nullable=False),
sa.Column('created_at', postgresql.TIMESTAMP(), server_default=sa.text(u'now()'), autoincrement=False, nullable=True),
sa.Column('updated_at', postgresql.TIMESTAMP(), server_default=sa.text(u'now()'), autoincrement=False, nullable=True),
sa.Column('expires_at', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
sa.PrimaryKeyConstraint('id', name=u'payments_pkey'),
postgresql_ignore_search_path=False
)
def downgrade():
op.drop_table('payments')
| {
"repo_name": "smilledge/transient",
"path": "transient/migrations/versions/4b7ccf8ac448_add_payments_table.py",
"copies": "1",
"size": "1681",
"license": "mit",
"hash": 3336188112918411000,
"line_mean": 42.1025641026,
"line_max": 190,
"alpha_frac": 0.7031528852,
"autogenerated": false,
"ratio": 3.591880341880342,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.4795033227080342,
"avg_score": null,
"num_lines": null
} |
"""add pending actions
Revision ID: 46b175bfa277
Revises: 3d429503a29a
Create Date: 2014-08-31 09:20:11.789330
"""
# revision identifiers, used by Alembic.
revision = '46b175bfa277'
down_revision = '3d429503a29a'
import warnings
from alembic import op
import sqlalchemy as sa
from gertty.dbsupport import sqlite_alter_columns
def upgrade():
op.create_table('branch',
sa.Column('key', sa.Integer(), nullable=False),
sa.Column('project_key', sa.Integer(), sa.ForeignKey('project.key'), index=True, nullable=False),
sa.Column('name', sa.String(length=255), nullable=False),
sa.PrimaryKeyConstraint('key')
)
op.create_table('pending_cherry_pick',
sa.Column('key', sa.Integer(), nullable=False),
sa.Column('revision_key', sa.Integer(), sa.ForeignKey('revision.key'), index=True, nullable=False),
sa.Column('branch', sa.String(length=255), nullable=False),
sa.Column('message', sa.Text(), nullable=False),
sa.PrimaryKeyConstraint('key')
)
with warnings.catch_warnings():
warnings.simplefilter("ignore")
op.add_column('change', sa.Column('pending_rebase', sa.Boolean()))
op.add_column('change', sa.Column('pending_topic', sa.Boolean()))
op.add_column('change', sa.Column('pending_status', sa.Boolean()))
op.add_column('change', sa.Column('pending_status_message', sa.Text()))
op.add_column('revision', sa.Column('pending_message', sa.Boolean()))
connection = op.get_bind()
change = sa.sql.table('change',
sa.sql.column('pending_rebase', sa.Boolean()),
sa.sql.column('pending_topic', sa.Boolean()),
sa.sql.column('pending_status', sa.Boolean()))
connection.execute(change.update().values({'pending_rebase':False,
'pending_topic':False,
'pending_status':False}))
revision = sa.sql.table('revision',
sa.sql.column('pending_message', sa.Boolean()))
connection.execute(revision.update().values({'pending_message':False}))
sqlite_alter_columns('change', [
sa.Column('pending_rebase', sa.Boolean(), index=True, nullable=False),
sa.Column('pending_topic', sa.Boolean(), index=True, nullable=False),
sa.Column('pending_status', sa.Boolean(), index=True, nullable=False),
])
sqlite_alter_columns('revision', [
sa.Column('pending_message', sa.Boolean(), index=True, nullable=False),
])
def downgrade():
pass
| {
"repo_name": "aspiers/gertty",
"path": "gertty/alembic/versions/46b175bfa277_add_pending_actions.py",
"copies": "1",
"size": "2586",
"license": "apache-2.0",
"hash": -4226229469413500400,
"line_mean": 38.1818181818,
"line_max": 103,
"alpha_frac": 0.6218097448,
"autogenerated": false,
"ratio": 3.7696793002915454,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9856128426310592,
"avg_score": 0.007072123756190591,
"num_lines": 66
} |
"""add_pending_artifact
Revision ID: 0f81e9efc84a
Revises: 61a1763b9c8d
Create Date: 2019-10-24 15:13:36.705288
"""
import zeus.db.types
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "0f81e9efc84a"
down_revision = "61a1763b9c8d"
branch_labels = ()
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table(
"pending_artifact",
sa.Column("provider", sa.String(), nullable=False),
sa.Column("external_job_id", sa.String(length=64), nullable=False),
sa.Column("external_build_id", sa.String(length=64), nullable=False),
sa.Column("hook_id", zeus.db.types.guid.GUID(), nullable=False),
sa.Column("name", sa.String(length=256), nullable=False),
sa.Column("type", sa.String(length=64), nullable=True),
sa.Column("file", zeus.db.types.file.File(), nullable=False),
sa.Column("repository_id", zeus.db.types.guid.GUID(), nullable=False),
sa.Column("id", zeus.db.types.guid.GUID(), nullable=False),
sa.Column(
"date_created",
sa.TIMESTAMP(timezone=True),
server_default=sa.text("now()"),
nullable=False,
),
sa.ForeignKeyConstraint(["hook_id"], ["hook.id"], ondelete="CASCADE"),
sa.ForeignKeyConstraint(
["repository_id"], ["repository.id"], ondelete="CASCADE"
),
sa.PrimaryKeyConstraint("id"),
)
op.create_index(
"idx_pending_artifact",
"pending_artifact",
["repository_id", "provider", "external_job_id", "external_build_id"],
unique=False,
)
op.create_index(
op.f("ix_pending_artifact_hook_id"),
"pending_artifact",
["hook_id"],
unique=False,
)
op.create_index(
op.f("ix_pending_artifact_repository_id"),
"pending_artifact",
["repository_id"],
unique=False,
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(
op.f("ix_pending_artifact_repository_id"), table_name="pending_artifact"
)
op.drop_index(op.f("ix_pending_artifact_hook_id"), table_name="pending_artifact")
op.drop_index("idx_pending_artifact", table_name="pending_artifact")
op.drop_table("pending_artifact")
# ### end Alembic commands ###
| {
"repo_name": "getsentry/zeus",
"path": "zeus/migrations/0f81e9efc84a_add_pending_artifact.py",
"copies": "1",
"size": "2442",
"license": "apache-2.0",
"hash": -2913646036425878500,
"line_mean": 32,
"line_max": 85,
"alpha_frac": 0.6134316134,
"autogenerated": false,
"ratio": 3.4786324786324787,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.45920640920324785,
"avg_score": null,
"num_lines": null
} |
"""Add Pending Certificates models and relations
Revision ID: 556ceb3e3c3e
Revises: 47baffaae1a7
Create Date: 2018-01-05 01:18:45.571595
"""
# revision identifiers, used by Alembic.
revision = '556ceb3e3c3e'
down_revision = '449c3d5c7299'
from alembic import op
import sqlalchemy as sa
from lemur.utils import Vault
from sqlalchemy.dialects import postgresql
from sqlalchemy_utils import ArrowType
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('pending_certs',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('external_id', sa.String(length=128), nullable=True),
sa.Column('owner', sa.String(length=128), nullable=False),
sa.Column('name', sa.String(length=256), nullable=True),
sa.Column('description', sa.String(length=1024), nullable=True),
sa.Column('notify', sa.Boolean(), nullable=True),
sa.Column('number_attempts', sa.Integer(), nullable=True),
sa.Column('rename', sa.Boolean(), nullable=True),
sa.Column('cn', sa.String(length=128), nullable=True),
sa.Column('csr', sa.Text(), nullable=False),
sa.Column('chain', sa.Text(), nullable=True),
sa.Column('private_key', Vault(), nullable=True),
sa.Column('date_created', ArrowType(), server_default=sa.text('now()'), nullable=False),
sa.Column('status', sa.String(length=128), nullable=True),
sa.Column('rotation', sa.Boolean(), nullable=True),
sa.Column('user_id', sa.Integer(), nullable=True),
sa.Column('authority_id', sa.Integer(), nullable=True),
sa.Column('root_authority_id', sa.Integer(), nullable=True),
sa.Column('rotation_policy_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['authority_id'], ['authorities.id'], ondelete='CASCADE'),
sa.ForeignKeyConstraint(['root_authority_id'], ['authorities.id'], ondelete='CASCADE'),
sa.ForeignKeyConstraint(['rotation_policy_id'], ['rotation_policies.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('name')
)
op.create_table('pending_cert_destination_associations',
sa.Column('destination_id', sa.Integer(), nullable=True),
sa.Column('pending_cert_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['destination_id'], ['destinations.id'], ondelete='cascade'),
sa.ForeignKeyConstraint(['pending_cert_id'], ['pending_certs.id'], ondelete='cascade')
)
op.create_index('pending_cert_destination_associations_ix', 'pending_cert_destination_associations', ['destination_id', 'pending_cert_id'], unique=False)
op.create_table('pending_cert_notification_associations',
sa.Column('notification_id', sa.Integer(), nullable=True),
sa.Column('pending_cert_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['notification_id'], ['notifications.id'], ondelete='cascade'),
sa.ForeignKeyConstraint(['pending_cert_id'], ['pending_certs.id'], ondelete='cascade')
)
op.create_index('pending_cert_notification_associations_ix', 'pending_cert_notification_associations', ['notification_id', 'pending_cert_id'], unique=False)
op.create_table('pending_cert_replacement_associations',
sa.Column('replaced_certificate_id', sa.Integer(), nullable=True),
sa.Column('pending_cert_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['pending_cert_id'], ['pending_certs.id'], ondelete='cascade'),
sa.ForeignKeyConstraint(['replaced_certificate_id'], ['certificates.id'], ondelete='cascade')
)
op.create_index('pending_cert_replacement_associations_ix', 'pending_cert_replacement_associations', ['replaced_certificate_id', 'pending_cert_id'], unique=False)
op.create_table('pending_cert_role_associations',
sa.Column('pending_cert_id', sa.Integer(), nullable=True),
sa.Column('role_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['pending_cert_id'], ['pending_certs.id'], ),
sa.ForeignKeyConstraint(['role_id'], ['roles.id'], )
)
op.create_index('pending_cert_role_associations_ix', 'pending_cert_role_associations', ['pending_cert_id', 'role_id'], unique=False)
op.create_table('pending_cert_source_associations',
sa.Column('source_id', sa.Integer(), nullable=True),
sa.Column('pending_cert_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['pending_cert_id'], ['pending_certs.id'], ondelete='cascade'),
sa.ForeignKeyConstraint(['source_id'], ['sources.id'], ondelete='cascade')
)
op.create_index('pending_cert_source_associations_ix', 'pending_cert_source_associations', ['source_id', 'pending_cert_id'], unique=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index('pending_cert_source_associations_ix', table_name='pending_cert_source_associations')
op.drop_table('pending_cert_source_associations')
op.drop_index('pending_cert_role_associations_ix', table_name='pending_cert_role_associations')
op.drop_table('pending_cert_role_associations')
op.drop_index('pending_cert_replacement_associations_ix', table_name='pending_cert_replacement_associations')
op.drop_table('pending_cert_replacement_associations')
op.drop_index('pending_cert_notification_associations_ix', table_name='pending_cert_notification_associations')
op.drop_table('pending_cert_notification_associations')
op.drop_index('pending_cert_destination_associations_ix', table_name='pending_cert_destination_associations')
op.drop_table('pending_cert_destination_associations')
op.drop_table('pending_certs')
# ### end Alembic commands ###
| {
"repo_name": "kevgliss/lemur",
"path": "lemur/migrations/versions/556ceb3e3c3e_.py",
"copies": "1",
"size": "5656",
"license": "apache-2.0",
"hash": 3599226470030670300,
"line_mean": 56.1313131313,
"line_max": 166,
"alpha_frac": 0.7066831683,
"autogenerated": false,
"ratio": 3.6443298969072164,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9793119135528547,
"avg_score": 0.01157878593573377,
"num_lines": 99
} |
"""Add Pending Certificates models and relations
Revision ID: 556ceb3e3c3e
Revises: 47baffaae1a7
Create Date: 2018-01-05 01:18:45.571595
"""
# revision identifiers, used by Alembic.
revision = "556ceb3e3c3e"
down_revision = "449c3d5c7299"
from alembic import op
import sqlalchemy as sa
from lemur.utils import Vault
from sqlalchemy.dialects import postgresql
from sqlalchemy_utils import ArrowType
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table(
"pending_certs",
sa.Column("id", sa.Integer(), nullable=False),
sa.Column("external_id", sa.String(length=128), nullable=True),
sa.Column("owner", sa.String(length=128), nullable=False),
sa.Column("name", sa.String(length=256), nullable=True),
sa.Column("description", sa.String(length=1024), nullable=True),
sa.Column("notify", sa.Boolean(), nullable=True),
sa.Column("number_attempts", sa.Integer(), nullable=True),
sa.Column("rename", sa.Boolean(), nullable=True),
sa.Column("cn", sa.String(length=128), nullable=True),
sa.Column("csr", sa.Text(), nullable=False),
sa.Column("chain", sa.Text(), nullable=True),
sa.Column("private_key", Vault(), nullable=True),
sa.Column(
"date_created", ArrowType(), server_default=sa.text("now()"), nullable=False
),
sa.Column("status", sa.String(length=128), nullable=True),
sa.Column("rotation", sa.Boolean(), nullable=True),
sa.Column("user_id", sa.Integer(), nullable=True),
sa.Column("authority_id", sa.Integer(), nullable=True),
sa.Column("root_authority_id", sa.Integer(), nullable=True),
sa.Column("rotation_policy_id", sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(
["authority_id"], ["authorities.id"], ondelete="CASCADE"
),
sa.ForeignKeyConstraint(
["root_authority_id"], ["authorities.id"], ondelete="CASCADE"
),
sa.ForeignKeyConstraint(["rotation_policy_id"], ["rotation_policies.id"]),
sa.ForeignKeyConstraint(["user_id"], ["users.id"]),
sa.PrimaryKeyConstraint("id"),
sa.UniqueConstraint("name"),
)
op.create_table(
"pending_cert_destination_associations",
sa.Column("destination_id", sa.Integer(), nullable=True),
sa.Column("pending_cert_id", sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(
["destination_id"], ["destinations.id"], ondelete="cascade"
),
sa.ForeignKeyConstraint(
["pending_cert_id"], ["pending_certs.id"], ondelete="cascade"
),
)
op.create_index(
"pending_cert_destination_associations_ix",
"pending_cert_destination_associations",
["destination_id", "pending_cert_id"],
unique=False,
)
op.create_table(
"pending_cert_notification_associations",
sa.Column("notification_id", sa.Integer(), nullable=True),
sa.Column("pending_cert_id", sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(
["notification_id"], ["notifications.id"], ondelete="cascade"
),
sa.ForeignKeyConstraint(
["pending_cert_id"], ["pending_certs.id"], ondelete="cascade"
),
)
op.create_index(
"pending_cert_notification_associations_ix",
"pending_cert_notification_associations",
["notification_id", "pending_cert_id"],
unique=False,
)
op.create_table(
"pending_cert_replacement_associations",
sa.Column("replaced_certificate_id", sa.Integer(), nullable=True),
sa.Column("pending_cert_id", sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(
["pending_cert_id"], ["pending_certs.id"], ondelete="cascade"
),
sa.ForeignKeyConstraint(
["replaced_certificate_id"], ["certificates.id"], ondelete="cascade"
),
)
op.create_index(
"pending_cert_replacement_associations_ix",
"pending_cert_replacement_associations",
["replaced_certificate_id", "pending_cert_id"],
unique=False,
)
op.create_table(
"pending_cert_role_associations",
sa.Column("pending_cert_id", sa.Integer(), nullable=True),
sa.Column("role_id", sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(["pending_cert_id"], ["pending_certs.id"]),
sa.ForeignKeyConstraint(["role_id"], ["roles.id"]),
)
op.create_index(
"pending_cert_role_associations_ix",
"pending_cert_role_associations",
["pending_cert_id", "role_id"],
unique=False,
)
op.create_table(
"pending_cert_source_associations",
sa.Column("source_id", sa.Integer(), nullable=True),
sa.Column("pending_cert_id", sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(
["pending_cert_id"], ["pending_certs.id"], ondelete="cascade"
),
sa.ForeignKeyConstraint(["source_id"], ["sources.id"], ondelete="cascade"),
)
op.create_index(
"pending_cert_source_associations_ix",
"pending_cert_source_associations",
["source_id", "pending_cert_id"],
unique=False,
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(
"pending_cert_source_associations_ix",
table_name="pending_cert_source_associations",
)
op.drop_table("pending_cert_source_associations")
op.drop_index(
"pending_cert_role_associations_ix", table_name="pending_cert_role_associations"
)
op.drop_table("pending_cert_role_associations")
op.drop_index(
"pending_cert_replacement_associations_ix",
table_name="pending_cert_replacement_associations",
)
op.drop_table("pending_cert_replacement_associations")
op.drop_index(
"pending_cert_notification_associations_ix",
table_name="pending_cert_notification_associations",
)
op.drop_table("pending_cert_notification_associations")
op.drop_index(
"pending_cert_destination_associations_ix",
table_name="pending_cert_destination_associations",
)
op.drop_table("pending_cert_destination_associations")
op.drop_table("pending_certs")
# ### end Alembic commands ###
| {
"repo_name": "Netflix/lemur",
"path": "lemur/migrations/versions/556ceb3e3c3e_.py",
"copies": "1",
"size": "6410",
"license": "apache-2.0",
"hash": -986524030391539000,
"line_mean": 37.8484848485,
"line_max": 88,
"alpha_frac": 0.6235569423,
"autogenerated": false,
"ratio": 3.8661037394451148,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9982807783434066,
"avg_score": 0.0013705796622098829,
"num_lines": 165
} |
"""Add people table
Revision ID: 27e81ea4d86
Revises: None
Create Date: 2014-02-27 00:50:04.698519
"""
from alembic import context
from alembic.op import (create_index, create_table,
drop_index, drop_table, execute)
from sqlalchemy.schema import Column, PrimaryKeyConstraint
from sqlalchemy.types import Date, DateTime, Integer, String
# revision identifiers, used by Alembic.
revision = '27e81ea4d86'
down_revision = None
driver_name = context.get_bind().dialect.name
def upgrade():
create_table(
'people',
Column('id', Integer, nullable=False),
Column('name', String, nullable=False),
Column('dob', Date, nullable=True),
Column('created_at', DateTime(timezone=True), nullable=False),
PrimaryKeyConstraint('id')
)
create_index('ix_people_created_at', 'people', ['created_at'])
create_index('ix_people_name', 'people', ['name'])
def downgrade():
drop_index('ix_people_name', table_name='people')
drop_index('ix_people_created_at', table_name='people')
drop_table('people')
if driver_name == 'postgresql':
execute('DROP SEQUENCE people_id_seq')
| {
"repo_name": "clicheio/cliche",
"path": "cliche/migrations/versions/27e81ea4d86_add_people_table.py",
"copies": "2",
"size": "1165",
"license": "mit",
"hash": -3389692139543552000,
"line_mean": 28.125,
"line_max": 70,
"alpha_frac": 0.6703862661,
"autogenerated": false,
"ratio": 3.5846153846153848,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.5255001650715385,
"avg_score": null,
"num_lines": null
} |
"""add permissions and roles
Revision ID: 556574b57514
Revises: bbdff842b0cb
Create Date: 2018-09-06 00:00:17.419441
"""
# revision identifiers, used by Alembic.
revision = '556574b57514'
down_revision = 'bbdff842b0cb'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table('roles',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(length=64), nullable=True),
sa.Column('default', sa.Boolean(), nullable=True),
sa.Column('permissions', sa.Integer(), nullable=True),
sa.PrimaryKeyConstraint('id', name=op.f('pk_roles')),
sa.UniqueConstraint('name', name=op.f('uq_roles_name'))
)
with op.batch_alter_table('roles', schema=None) as batch_op:
batch_op.create_index(batch_op.f('ix_roles_default'), ['default'], unique=False)
with op.batch_alter_table('users', schema=None) as batch_op:
batch_op.add_column(sa.Column('role_id', sa.Integer(), nullable=True))
batch_op.create_foreign_key(batch_op.f('fk_users_role_id_roles'), 'roles', ['role_id'], ['id'])
# ### end Alembic commands ###
def downgrade():
with op.batch_alter_table('users', schema=None) as batch_op:
batch_op.drop_constraint(batch_op.f('fk_users_role_id_roles'), type_='foreignkey')
batch_op.drop_column('role_id')
with op.batch_alter_table('roles', schema=None) as batch_op:
batch_op.drop_index(batch_op.f('ix_roles_default'))
op.drop_table('roles')
# ### end Alembic commands ###
| {
"repo_name": "rivalrockets/benchmarks.rivalrockets.com",
"path": "migrations/versions/556574b57514_add_permissions_and_roles.py",
"copies": "2",
"size": "1508",
"license": "mit",
"hash": -2298493925427330800,
"line_mean": 32.5111111111,
"line_max": 103,
"alpha_frac": 0.6624668435,
"autogenerated": false,
"ratio": 3.128630705394191,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.4791097548894191,
"avg_score": null,
"num_lines": null
} |
"""Add personal access tokens
Revision ID: 1f6738730753
Revises: 356b8985ae7c
Create Date: 2021-06-29 12:05:07.347139
"""
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql
from indico.core.db.sqlalchemy import UTCDateTime
# revision identifiers, used by Alembic.
revision = '1f6738730753'
down_revision = '356b8985ae7c'
branch_labels = None
depends_on = None
def upgrade():
op.create_table(
'tokens',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('user_id', sa.Integer(), nullable=False, index=True),
sa.Column('name', sa.String(), nullable=False),
sa.Column('access_token_hash', sa.String(), nullable=False, unique=True, index=True),
sa.Column('scopes', postgresql.ARRAY(sa.String()), nullable=False),
sa.Column('created_dt', UTCDateTime, nullable=False),
sa.Column('last_used_dt', UTCDateTime, nullable=True),
sa.Column('revoked_dt', UTCDateTime, nullable=True),
sa.Index('ix_uq_user_id_name_lower', 'user_id', sa.text('lower(name)'), unique=True,
postgresql_where=sa.text('revoked_dt IS NULL')),
sa.ForeignKeyConstraint(['user_id'], ['users.users.id'], ondelete='CASCADE'),
sa.PrimaryKeyConstraint('id'),
schema='users'
)
def downgrade():
op.drop_table('tokens', schema='users')
| {
"repo_name": "indico/indico",
"path": "indico/migrations/versions/20210630_1205_1f6738730753_add_personal_access_tokens.py",
"copies": "1",
"size": "1375",
"license": "mit",
"hash": 237061705680459740,
"line_mean": 31.7380952381,
"line_max": 93,
"alpha_frac": 0.6661818182,
"autogenerated": false,
"ratio": 3.428927680798005,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9591178678400252,
"avg_score": 0.0007861641195506577,
"num_lines": 42
} |
"""Add pg_trgm indexes on certain attributes used for CN / Name filtering in ILIKE queries.
Revision ID: ee827d1e1974
Revises: 7ead443ba911
Create Date: 2018-11-05 09:49:40.226368
"""
# revision identifiers, used by Alembic.
revision = "ee827d1e1974"
down_revision = "7ead443ba911"
from alembic import op
from sqlalchemy.exc import ProgrammingError
def upgrade():
connection = op.get_bind()
connection.execute("CREATE EXTENSION IF NOT EXISTS pg_trgm")
op.create_index(
"ix_certificates_cn",
"certificates",
["cn"],
unique=False,
postgresql_ops={"cn": "gin_trgm_ops"},
postgresql_using="gin",
)
op.create_index(
"ix_certificates_name",
"certificates",
["name"],
unique=False,
postgresql_ops={"name": "gin_trgm_ops"},
postgresql_using="gin",
)
op.create_index(
"ix_domains_name_gin",
"domains",
["name"],
unique=False,
postgresql_ops={"name": "gin_trgm_ops"},
postgresql_using="gin",
)
def downgrade():
op.drop_index("ix_domains_name_gin", table_name="domains")
op.drop_index("ix_certificates_name", table_name="certificates")
op.drop_index("ix_certificates_cn", table_name="certificates")
| {
"repo_name": "Netflix/lemur",
"path": "lemur/migrations/versions/ee827d1e1974_.py",
"copies": "1",
"size": "1285",
"license": "apache-2.0",
"hash": -578502383957617400,
"line_mean": 24.7,
"line_max": 91,
"alpha_frac": 0.6249027237,
"autogenerated": false,
"ratio": 3.435828877005348,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.4560731600705348,
"avg_score": null,
"num_lines": null
} |
"""Add physical measurement cols
Revision ID: b14e7aca2366
Revises: 0ffdadea0b92
Create Date: 2017-09-01 15:59:56.936727
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "b14e7aca2366"
down_revision = "0ffdadea0b92"
branch_labels = None
depends_on = None
def upgrade(engine_name):
globals()["upgrade_%s" % engine_name]()
def downgrade(engine_name):
globals()["downgrade_%s" % engine_name]()
def upgrade_metrics():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
def downgrade_metrics():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
def upgrade_rdr():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column("physical_measurements", sa.Column("created_site_id", sa.Integer(), nullable=True))
op.add_column("physical_measurements", sa.Column("created_username", sa.String(length=255), nullable=True))
op.add_column("physical_measurements", sa.Column("finalized_site_id", sa.Integer(), nullable=True))
op.add_column("physical_measurements", sa.Column("finalized_username", sa.String(length=255), nullable=True))
op.create_foreign_key(None, "physical_measurements", "site", ["finalized_site_id"], ["site_id"])
op.create_foreign_key(None, "physical_measurements", "site", ["created_site_id"], ["site_id"])
# ### end Alembic commands ###
def downgrade_rdr():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(None, "physical_measurements", type_="foreignkey")
op.drop_constraint(None, "physical_measurements", type_="foreignkey")
op.drop_column("physical_measurements", "finalized_username")
op.drop_column("physical_measurements", "finalized_site_id")
op.drop_column("physical_measurements", "created_username")
op.drop_column("physical_measurements", "created_site_id")
# ### end Alembic commands ###
| {
"repo_name": "all-of-us/raw-data-repository",
"path": "rdr_service/alembic/versions/b14e7aca2366_add_physical_measurement_cols.py",
"copies": "1",
"size": "2016",
"license": "bsd-3-clause",
"hash": -5547538237532095000,
"line_mean": 34.3684210526,
"line_max": 113,
"alpha_frac": 0.6899801587,
"autogenerated": false,
"ratio": 3.574468085106383,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.975943755892593,
"avg_score": 0.0010021369760906122,
"num_lines": 57
} |
"""add_pin adss a Pin to a port, add_pins adds Pins to all ports:
- pins
- outline
Some functions modify a component without changing its name.
Make sure these functions are inside a new Component.
They modify the geometry of a component (add pins, labels, grating couplers ...) without modifying the cell name
"""
import json
from typing import Callable, Dict, Iterable, Optional, Tuple
import numpy as np
from numpy import ndarray
import pp
from pp.add_padding import get_padding_points
from pp.cell import cell
from pp.component import Component, ComponentReference
from pp.layers import LAYER, PORT_TYPE_TO_LAYER
from pp.port import Port, read_port_markers
from pp.types import Layer
def _rotate(v: ndarray, m: ndarray) -> ndarray:
return np.dot(m, v)
def add_pin_triangle(
component: Component,
port: Port,
layer: Tuple[int, int] = LAYER.PORT,
label_layer: Optional[Tuple[int, int]] = LAYER.TEXT,
) -> None:
"""Add triangle pin with a right angle, pointing out of the port
Args:
component:
port: Port
layer: for the pin marker
label_layer: for the label
"""
p = port
a = p.orientation
ca = np.cos(a * np.pi / 180)
sa = np.sin(a * np.pi / 180)
rot_mat = np.array([[ca, -sa], [sa, ca]])
d = p.width / 2
dbot = np.array([0, -d])
dtop = np.array([0, d])
dtip = np.array([d, 0])
p0 = p.position + _rotate(dbot, rot_mat)
p1 = p.position + _rotate(dtop, rot_mat)
ptip = p.position + _rotate(dtip, rot_mat)
polygon = [p0, p1, ptip]
component.add_polygon(polygon, layer=layer)
if label_layer:
component.add_label(
text=p.name,
position=p.midpoint,
layer=label_layer,
)
def add_pin_square_inside(
component: Component,
port: Port,
pin_length: float = 0.1,
layer: Tuple[int, int] = LAYER.PORT,
label_layer: Optional[Tuple[int, int]] = LAYER.TEXT,
) -> None:
"""Add square pin towards the inside of the port
Args:
component:
port: Port
pin_length: length of the pin marker for the port
layer: for the pin marker
label_layer: for the label
.. code::
_______________
| |
| |
| |
|| |
|| |
| |
| __ |
|_______________|
"""
p = port
a = p.orientation
ca = np.cos(a * np.pi / 180)
sa = np.sin(a * np.pi / 180)
rot_mat = np.array([[ca, -sa], [sa, ca]])
d = p.width / 2
dbot = np.array([0, -d])
dtop = np.array([0, d])
dbotin = np.array([-pin_length, -d])
dtopin = np.array([-pin_length, +d])
p0 = p.position + _rotate(dbot, rot_mat)
p1 = p.position + _rotate(dtop, rot_mat)
ptopin = p.position + _rotate(dtopin, rot_mat)
pbotin = p.position + _rotate(dbotin, rot_mat)
polygon = [p0, p1, ptopin, pbotin]
component.add_polygon(polygon, layer=layer)
if label_layer:
component.add_label(
text=str(p.name),
position=p.midpoint,
layer=label_layer,
)
def add_pin_square_double(
component: Component,
port: Port,
pin_length: float = 0.1,
layer: Tuple[int, int] = LAYER.PORT,
label_layer: Optional[Tuple[int, int]] = LAYER.TEXT,
) -> None:
"""Add two square pins: one inside with label, one outside
Args:
component:
port: Port
pin_length: length of the pin marker for the port
layer: for the pin marker
label_layer: for the label
.. code::
_______________
| |
| |
| |
||| |
||| |
| |
| __ |
|_______________|
__
"""
p = port
a = p.orientation
ca = np.cos(a * np.pi / 180)
sa = np.sin(a * np.pi / 180)
rot_mat = np.array([[ca, -sa], [sa, ca]])
# outer square
d = p.width / 2
dbot = np.array([0, -d])
dtop = np.array([0, d])
dbotin = np.array([pin_length / 2, -d])
dtopin = np.array([pin_length / 2, +d])
p0 = p.position + _rotate(dbot, rot_mat)
p1 = p.position + _rotate(dtop, rot_mat)
ptopin = p.position + _rotate(dtopin, rot_mat)
pbotin = p.position + _rotate(dbotin, rot_mat)
polygon = [p0, p1, ptopin, pbotin]
component.add_polygon(polygon, layer=layer)
# inner square
d = p.width / 2
dbot = np.array([0, -d])
dtop = np.array([0, d])
dbotin = np.array([-pin_length / 2, -d])
dtopin = np.array([-pin_length / 2, +d])
p0 = p.position + _rotate(dbot, rot_mat)
p1 = p.position + _rotate(dtop, rot_mat)
ptopin = p.position + _rotate(dtopin, rot_mat)
pbotin = p.position + _rotate(dbotin, rot_mat)
polygon = [p0, p1, ptopin, pbotin]
component.add_polygon(polygon, layer=layer)
x = (p0[0] + ptopin[0]) / 2
y = (ptopin[1] + pbotin[1]) / 2
if label_layer:
component.add_label(
text=str(p.name),
position=(x, y),
layer=label_layer,
)
def add_pin_square(
component: Component,
port: Port,
pin_length: float = 0.1,
layer: Tuple[int, int] = LAYER.PORT,
label_layer: Optional[Tuple[int, int]] = LAYER.PORT,
port_margin: float = 0.0,
) -> None:
"""Add half out pin to a component.
Args:
component:
port: Port
pin_length: length of the pin marker for the port
layer: for the pin marker
label_layer: for the label
port_margin: margin to port edge
.. code::
_______________
| |
| |
| |
||| |
||| |
| |
| __ |
|_______________|
__
"""
p = port
a = p.orientation
ca = np.cos(a * np.pi / 180)
sa = np.sin(a * np.pi / 180)
rot_mat = np.array([[ca, -sa], [sa, ca]])
d = p.width / 2 + port_margin
dbot = np.array([pin_length / 2, -d])
dtop = np.array([pin_length / 2, d])
dbotin = np.array([-pin_length / 2, -d])
dtopin = np.array([-pin_length / 2, +d])
p0 = p.position + _rotate(dbot, rot_mat)
p1 = p.position + _rotate(dtop, rot_mat)
ptopin = p.position + _rotate(dtopin, rot_mat)
pbotin = p.position + _rotate(dbotin, rot_mat)
polygon = [p0, p1, ptopin, pbotin]
component.add_polygon(polygon, layer=layer)
if label_layer:
component.add_label(
text=str(p.name),
position=p.midpoint,
layer=label_layer,
)
def add_outline(
component: Component,
reference: Optional[ComponentReference] = None,
layer: Tuple[int, int] = LAYER.DEVREC,
**kwargs,
) -> None:
"""Adds devices outline bounding box in layer.
Args:
component: where to add the markers
reference: to read outline from
layer: to add padding
default: default padding
top: North padding
bottom
right
left
"""
c = reference or component
if hasattr(component, "parent"):
component = component.parent
points = get_padding_points(component=c, default=0, **kwargs)
component.add_polygon(points, layer=layer)
def add_pins(
component: Component,
reference: Optional[ComponentReference] = None,
function: Callable = add_pin_square_inside,
port_type_to_layer: Dict[str, Tuple[int, int]] = PORT_TYPE_TO_LAYER,
**kwargs,
) -> None:
"""Add Pin port markers.
Args:
component: to add ports
function:
port_type_to_layer: dict mapping port types to marker layers for ports
kwargs: add pins function settings
"""
reference = reference or component
for p in reference.ports.values():
layer = port_type_to_layer[p.port_type]
function(component=component, port=p, layer=layer, label_layer=layer, **kwargs)
def add_pins_triangle(**kwargs) -> None:
return add_pins(function=add_pin_triangle, **kwargs)
def add_settings_label(
component: Component,
reference: ComponentReference,
label_layer: Tuple[int, int] = LAYER.LABEL_SETTINGS,
ignore: Optional[Iterable[str]] = None,
) -> None:
"""Add settings in label, ignores component.ignore keys.
Args:
componnent
reference
label_layer:
ignore: fields to ignoreg
"""
settings = reference.get_settings(ignore=ignore)
settings_string = f"settings={json.dumps(settings, indent=2)}"
if len(settings_string) > 1024:
raise ValueError(f"label > 1024 characters: {settings_string}")
component.add_label(
position=reference.center, text=settings_string, layer=label_layer
)
def add_instance_label(
component: Component,
reference: ComponentReference,
instance_name: Optional[str] = None,
layer: Tuple[int, int] = LAYER.LABEL_INSTANCE,
) -> None:
"""Adds label to a reference in a component."""
instance_name = (
instance_name
or f"{reference.parent.name},{int(reference.x)},{int(reference.y)}"
)
x = pp.snap.snap_to_grid(reference.x)
y = pp.snap.snap_to_grid(reference.y)
component.add_label(
text=instance_name,
position=(x, y),
layer=layer,
)
def add_pins_and_outline(
component: Component,
reference: ComponentReference,
add_outline_function: Optional[Callable] = add_outline,
add_pins_function: Optional[Callable] = add_pins,
add_settings_function: Optional[Callable] = add_settings_label,
add_instance_label_function: Optional[Callable] = add_settings_label,
) -> None:
"""Add markers:
- outline
- pins for the ports
- label for the name
- label for the settings
Args:
component: where to add the markers
reference
add_outline_function
add_pins_function: to add pins to ports
add_settings_function: to add outline around the component
add_instance_label_function: labels each instance
"""
if add_outline_function:
add_outline_function(component=component, reference=reference)
if add_pins_function:
add_pins_function(component=component, reference=reference)
if add_settings_function:
add_settings_function(component=component, reference=reference)
if add_instance_label_function:
add_instance_label_function(component=component, reference=reference)
def add_pins_to_references(
component: Component,
function: Callable = add_pins,
) -> None:
"""Add pins to Component references.
Args:
component: component
function: function to add pins
"""
references = component.references
if references:
for reference in references:
add_pins_to_references(component=reference.parent, function=function)
else:
function(component=component)
@cell
def add_pins_container(
component: Component,
function: Callable = add_pin_square_double,
port_type: str = "optical",
layer: Layer = LAYER.PORT,
) -> Component:
"""Add pins to a Component and returns a new Component
Args:
component:
function: function to add pin
port_type: optical, dc
layer: layer for port marker
Returns:
New component
"""
component_new = pp.Component(f"{component.name}_pins")
component_new.add_ref(component)
for p in component.ports.values():
if p.port_type == port_type:
function(component=component_new, port=p, layer=layer, label_layer=layer)
component_new.ports = component.ports.copy()
return component_new
def test_add_pins() -> None:
c1 = pp.components.straight_with_heater()
c2 = add_pins_container(
component=c1, function=add_pin_square, port_type="optical", layer=LAYER.PORT
)
c2 = add_pins_container(
component=c2, function=add_pin_square, port_type="dc", layer=LAYER.PORTE
)
c2.show(show_ports=False)
n_optical_expected = 2
n_dc_expected = 2
# polygons = 194
port_layer_optical = PORT_TYPE_TO_LAYER["optical"]
port_markers_optical = read_port_markers(c2, [port_layer_optical])
n_optical = len(port_markers_optical.polygons)
port_layer_dc = PORT_TYPE_TO_LAYER["dc"]
port_markers_dc = read_port_markers(c2, [port_layer_dc])
n_dc = len(port_markers_dc.polygons)
# print(len(c1.get_polygons()))
# print(len(c2.get_polygons()))
print(n_optical)
print(n_dc)
# assert len(c1.get_polygons()) == polygons
# assert len(c2.get_polygons()) == polygons + 41
assert (
n_optical == n_optical_expected
), f"{n_optical} optical pins different from {n_optical_expected}"
assert (
n_dc_expected == n_dc_expected
), f"{n_dc_expected} electrical pins different from {n_dc_expected}"
if __name__ == "__main__":
# test_add_pins()
# c = pp.components.straight()
# add_pins(c, function=add_pin_square)
# add_pins(c, function=add_pin_square_inside)
# add_pins(c, function=add_pin_square_double)
# c.show(show_ports=False)
# cpl = [10, 20, 30]
# cpg = [0.2, 0.3, 0.5]
# dl0 = [10, 20]
# c = pp.components.mzi_lattice(coupler_lengths=cpl, coupler_gaps=cpg, delta_lengths=dl0)
# c = pp.components.mzi()
# add_pins_to_references(c)
# c = add_pins(c, recursive=True)
# c = add_pins(c, recursive=False)
# c.show()
# c = pp.components.mzi2x2(with_elec_connections=True)
# cc = add_pins(c)
# cc.show()
# c = mmi1x2(width_mmi=5)
# cc = add_grating_couplers(c, layer_label=pp.LAYER.LABEL)
# c = pp.components.straight()
# c = pp.components.crossing()
# add_pins(c)
# c = pp.components.bend_circular()
# print(cc.name)
# cc.show()
c = pp.components.ring_single()
add_pins_to_references(c)
c.show()
| {
"repo_name": "gdsfactory/gdsfactory",
"path": "pp/add_pins.py",
"copies": "1",
"size": "14139",
"license": "mit",
"hash": 1172399217442574800,
"line_mean": 26.5077821012,
"line_max": 112,
"alpha_frac": 0.5801683287,
"autogenerated": false,
"ratio": 3.3728530534351147,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.4453021382135115,
"avg_score": null,
"num_lines": null
} |
"""add plate table
Revision ID: 88fa93c68dab
Revises: 3311cbf4b2bd
Create Date: 2016-12-05 15:08:07.137235
"""
# revision identifiers, used by Alembic.
revision = "88fa93c68dab"
down_revision = "3311cbf4b2bd"
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.create_table(
"plate",
sa.Column("id", sa.Integer(), nullable=False),
sa.Column("created_at", sa.DateTime(), nullable=True),
sa.Column("plate_id", sa.String(length=16), nullable=False),
sa.Column("signed_by", sa.Integer(), nullable=True),
sa.Column("signed_at", sa.DateTime(), nullable=True),
sa.Column("method_document", sa.Integer(), nullable=True),
sa.Column("method_version", sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(
["signed_by"],
["user.id"],
),
sa.PrimaryKeyConstraint("id"),
sa.UniqueConstraint("plate_id"),
)
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_table("plate")
### end Alembic commands ###
| {
"repo_name": "Clinical-Genomics/taboo",
"path": "alembic/versions/88fa93c68dab_add_plate_table.py",
"copies": "1",
"size": "1219",
"license": "mit",
"hash": -3427932506001298400,
"line_mean": 27.3488372093,
"line_max": 68,
"alpha_frac": 0.6267432322,
"autogenerated": false,
"ratio": 3.533333333333333,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.4660076565533333,
"avg_score": null,
"num_lines": null
} |
"""Add points to TestableResult.
Revision ID: 305b60854a99
Revises: 4d7019b218d4
Create Date: 2013-10-27 22:07:10.819122
"""
# revision identifiers, used by Alembic.
revision = '305b60854a99'
down_revision = '1cf84ddb034c'
from alembic import op
from collections import defaultdict
from sqlalchemy.sql import table, column
import sqlalchemy as sa
make_status = sa.Enum(u'make_failed', u'nonexistent_executable', u'success',
name=u'make_status')
testableresult = table('testableresult',
column('id', sa.Integer),
column('points', sa.Integer),
column('status', make_status),
column('submission_id', sa.Integer),
column('testable_id', sa.Integer))
testcase = table('testcase',
column('id', sa.Integer),
column('points', sa.Integer),
column('testable_id', sa.Integer))
testcaseresult = table('testcaseresult',
column('diff_id', sa.Integer),
column('status',
sa.Enum('nonexistent_executable',
'output_limit_exceeded',
'signal', 'success', 'timed_out',
name='status')),
column('submission_id', sa.Integer),
column('test_case_id', sa.Integer))
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_column('submission', u'points_possible')
op.drop_column('submission', u'points')
op.add_column('testableresult', sa.Column('points', sa.Integer(),
nullable=True))
conn = op.get_bind()
# Fetch the points for each test case
tc_points = {}
tc_to_t = {}
for (tc_id, points, t_id) in conn.execute(testcase.select()):
tc_points[tc_id] = points
tc_to_t[tc_id] = t_id
# Fetch all the testableresults
tr_scores = defaultdict(int)
s_to_tr = defaultdict(dict)
for (tr_id, _, status, s_id, t_id) in \
conn.execute(testableresult.select()):
if status != 'success':
tr_scores[tr_id] = 0
else:
s_to_tr[s_id][t_id] = tr_id
# update points for the testableresult associated with each testcaseresult
for (diff, status, s_id, tc_id) in conn.execute(testcaseresult.select()):
points = 0
# Assumes diff is None when it matches
if status == 'success' and not diff:
points = tc_points[tc_id]
tr_scores[s_to_tr[s_id][tc_to_t[tc_id]]] += points
scores = [{'tr_id': x, 'points': y} for (x, y) in tr_scores.items()]
conn.execute(testableresult.update()
.where(testableresult.c.id == sa.bindparam('tr_id'))
.values(points=sa.bindparam('points')), scores)
op.alter_column('testableresult', u'points', existing_type=sa.Integer,
nullable=False)
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_column('testableresult', 'points')
op.add_column('submission', sa.Column(u'points', sa.INTEGER(),
server_default='0', nullable=False))
op.add_column('submission', sa.Column(u'points_possible', sa.INTEGER(),
server_default='0', nullable=False))
### end Alembic commands ###
| {
"repo_name": "ucsb-cs/submit",
"path": "submit/migrations/versions/305b60854a99_add_points_to_testab.py",
"copies": "1",
"size": "3550",
"license": "bsd-2-clause",
"hash": -1619103159729879300,
"line_mean": 38.4444444444,
"line_max": 78,
"alpha_frac": 0.5512676056,
"autogenerated": false,
"ratio": 3.9356984478935697,
"config_test": true,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.49869660534935695,
"avg_score": null,
"num_lines": null
} |
"""add pol stock table
Revision ID: f4bd4ce67f
Revises: 4defa86894e6
Create Date: 2015-11-17 23:29:30.839431
"""
# revision identifiers, used by Alembic.
revision = 'f4bd4ce67f'
down_revision = '4defa86894e6'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table(
'pol_shop',
sa.Column('id', sa.Integer, primary_key=True),
sa.Column('name', sa.Unicode(100)),
sa.Column('street_address', sa.Unicode(100)),
sa.Column('street_zipcode', sa.Integer),
sa.Column('street_place', sa.Unicode(100)),
sa.Column('post_address', sa.Unicode(100)),
sa.Column('post_zipcode', sa.Integer),
sa.Column('post_place', sa.Unicode(100)),
sa.Column('phone', sa.Unicode(30)),
sa.Column('category', sa.Integer),
sa.Column('lon', sa.Float),
sa.Column('lat', sa.Float),
)
op.create_table(
'pol_stock',
sa.Column('id', sa.Integer, primary_key=True),
sa.Column('stock', sa.Integer),
sa.Column('updated', sa.DateTime),
sa.Column('shop_id', sa.Integer, sa.ForeignKey('pol_shop.id'), nullable=False),
sa.Column('pol_beer_id', sa.Integer, sa.ForeignKey('pol_beer.id'), nullable=False)
)
def downgrade():
op.drop_table('pol_shop')
op.drop_table('pol_stock')
| {
"repo_name": "atlefren/beerdatabase",
"path": "alembic/versions/f4bd4ce67f_add_pol_stock_table.py",
"copies": "1",
"size": "1371",
"license": "mit",
"hash": -327841609993801900,
"line_mean": 27.5625,
"line_max": 90,
"alpha_frac": 0.6185266229,
"autogenerated": false,
"ratio": 3.1517241379310343,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.925905309678011,
"avg_score": 0.002239532810184984,
"num_lines": 48
} |
"""Add po metadata.
Revision ID: 85e1d78ef077
Revises: deb5c1dad94a
Create Date: 2017-05-15 08:10:55.332994
"""
# revision identifiers, used by Alembic.
revision = '85e1d78ef077'
down_revision = 'deb5c1dad94a'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('po_metadata',
sa.Column('id', postgresql.UUID(as_uuid=True), server_default=sa.text('uuid_generate_v4()'), nullable=False),
sa.Column('resource_pk', postgresql.UUID(as_uuid=True), nullable=False),
sa.Column('language_pk', sa.Integer(), nullable=False),
sa.Column('key', sa.Text(), nullable=False),
sa.Column('value', sa.Text(), nullable=False),
sa.ForeignKeyConstraint(['language_pk'], ['language.id'], ),
sa.ForeignKeyConstraint(['resource_pk'], ['resource.id'], ),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('resource_pk', 'language_pk', 'key', name='resource_language_key_uc')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('po_metadata')
# ### end Alembic commands ###
| {
"repo_name": "socialwifi/dila",
"path": "dila/data/alembic/versions/85e1d78ef077_add_po_metadata.py",
"copies": "1",
"size": "1264",
"license": "bsd-3-clause",
"hash": -5192184664559114000,
"line_mean": 32.2631578947,
"line_max": 113,
"alpha_frac": 0.6827531646,
"autogenerated": false,
"ratio": 3.407008086253369,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9544643065465594,
"avg_score": 0.009023637077555014,
"num_lines": 38
} |
"""add portfolio table
Revision ID: 1c9398290e4
Revises: 3c4f298b063
Create Date: 2014-05-31 21:43:26.498832
"""
# revision identifiers, used by Alembic.
revision = '1c9398290e4'
down_revision = '3c4f298b063'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table(
'portfolios',
sa.Column('id', sa.Integer, primary_key=True, autoincrement=True),
sa.Column('user_id', sa.Integer, sa.ForeignKey('users.id', onupdate='cascade', ondelete='cascade')),
sa.Column('name', sa.String(200)),
sa.Column('created', sa.DateTime),
sa.Column('default_currency', sa.String(10))
)
op.create_table(
'transactions',
sa.Column('id', sa.Integer, primary_key=True, autoincrement=True),
sa.Column('portfolio_id', sa.Integer, sa.ForeignKey('portfolios.id', onupdate='cascade', ondelete='cascade')),
sa.Column('symbol', sa.String(20)),
sa.Column('exchange', sa.String(40)),
sa.Column('paid_price', sa.Float(precision=6)),
sa.Column('trade_date', sa.Date),
sa.Column('shares', sa.Integer),
)
def downgrade():
raise NotImplemented()
| {
"repo_name": "thomaserlang/stocksum",
"path": "src/stocksum/web/alembic/versions/1c9398290e4_add_portfolio_table.py",
"copies": "1",
"size": "1210",
"license": "mit",
"hash": 6778855040876310000,
"line_mean": 28.25,
"line_max": 118,
"alpha_frac": 0.6223140496,
"autogenerated": false,
"ratio": 3.361111111111111,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.44834251607111114,
"avg_score": null,
"num_lines": null
} |
"""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.dialects import postgresql
def upgrade():
# Add the "ports" column
op.add_column('certificate_associations', sa.Column('ports', postgresql.ARRAY(sa.Integer()), nullable=True))
# Make the existing foreign key columns non-nullable
op.alter_column('certificate_associations', 'domain_id',
existing_type=sa.INTEGER(),
nullable=False)
op.alter_column('certificate_associations', 'certificate_id',
existing_type=sa.INTEGER(),
nullable=False)
def downgrade():
# Make the existing foreign key columns nullable
op.alter_column('certificate_associations', 'certificate_id',
existing_type=sa.INTEGER(),
nullable=True)
op.alter_column('certificate_associations', 'domain_id',
existing_type=sa.INTEGER(),
nullable=True)
# Drop the "ports" column
op.drop_column('certificate_associations', 'ports')
| {
"repo_name": "Netflix/lemur",
"path": "lemur/migrations/versions/4fe230f7a26e_.py",
"copies": "1",
"size": "1302",
"license": "apache-2.0",
"hash": 990876660132240800,
"line_mean": 32.3846153846,
"line_max": 112,
"alpha_frac": 0.653609831,
"autogenerated": false,
"ratio": 4.006153846153846,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.5159763677153846,
"avg_score": null,
"num_lines": null
} |
"""Add position and category in each message, so as to order the XML
Revision ID: 435d360d3398
Revises: 2a68ba66c32b
Create Date: 2015-05-03 19:00:38.124617
"""
# revision identifiers, used by Alembic.
revision = '435d360d3398'
down_revision = '2a68ba66c32b'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.add_column('ActiveTranslationMessages', sa.Column('category', sa.Unicode(length=255), nullable=True))
op.add_column('ActiveTranslationMessages', sa.Column('position', sa.Integer(), nullable=True))
op.create_index(u'ix_ActiveTranslationMessages_category', 'ActiveTranslationMessages', ['category'], unique=False)
op.create_index(u'ix_ActiveTranslationMessages_position', 'ActiveTranslationMessages', ['position'], unique=False)
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_index(u'ix_ActiveTranslationMessages_position', table_name='ActiveTranslationMessages')
op.drop_index(u'ix_ActiveTranslationMessages_category', table_name='ActiveTranslationMessages')
op.drop_column('ActiveTranslationMessages', 'position')
op.drop_column('ActiveTranslationMessages', 'category')
### end Alembic commands ###
| {
"repo_name": "porduna/appcomposer",
"path": "alembic/versions/435d360d3398_add_position_and_category_in_each_.py",
"copies": "3",
"size": "1306",
"license": "bsd-2-clause",
"hash": -3769629058901679600,
"line_mean": 39.8125,
"line_max": 118,
"alpha_frac": 0.7450229709,
"autogenerated": false,
"ratio": 3.7207977207977208,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 1,
"avg_score": 0.007283844776843242,
"num_lines": 32
} |
"""Add position to newsletter link tables.
Revision ID: 40f652bd98a8
Revises: 7525fd3b67d5
Create Date: 2018-02-10 13:12:04.962735
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '40f652bd98a8'
down_revision = '7525fd3b67d5'
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.execute('SET FOREIGN_KEY_CHECKS = 0')
op.add_column('newsletter_activities', sa.Column('position', sa.Integer(), nullable=False))
op.alter_column('newsletter_activities', 'activity_id',
existing_type=mysql.INTEGER(display_width=11),
nullable=False)
op.alter_column('newsletter_activities', 'newsletter_id',
existing_type=mysql.INTEGER(display_width=11),
nullable=False)
op.add_column('newsletter_news', sa.Column('position', sa.Integer(), nullable=False))
op.alter_column('newsletter_news', 'news_id',
existing_type=mysql.INTEGER(display_width=11),
nullable=False)
op.alter_column('newsletter_news', 'newsletter_id',
existing_type=mysql.INTEGER(display_width=11),
nullable=False)
op.drop_constraint('fk_newsletter_activities_newsletter_id_newsletter', 'newsletter_activities', type_='foreignkey')
op.create_foreign_key(op.f('fk_newsletter_activities_newsletter_id_newsletter'), 'newsletter_activities', 'newsletter', ['newsletter_id'], ['id'], ondelete='cascade')
op.drop_constraint('fk_newsletter_news_newsletter_id_newsletter', 'newsletter_news', type_='foreignkey')
op.create_foreign_key(op.f('fk_newsletter_news_newsletter_id_newsletter'), 'newsletter_news', 'newsletter', ['newsletter_id'], ['id'], ondelete='cascade')
op.alter_column('password_ticket', 'user_id',
existing_type=mysql.INTEGER(display_width=11),
nullable=False)
op.execute('SET FOREIGN_KEY_CHECKS = 1')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.execute('SET FOREIGN_KEY_CHECKS = 0')
op.alter_column('newsletter_news', 'newsletter_id',
existing_type=mysql.INTEGER(display_width=11),
nullable=True)
op.alter_column('newsletter_news', 'news_id',
existing_type=mysql.INTEGER(display_width=11),
nullable=True)
op.drop_column('newsletter_news', 'position')
op.alter_column('newsletter_activities', 'newsletter_id',
existing_type=mysql.INTEGER(display_width=11),
nullable=True)
op.alter_column('newsletter_activities', 'activity_id',
existing_type=mysql.INTEGER(display_width=11),
nullable=True)
op.drop_column('newsletter_activities', 'position')
op.drop_constraint(op.f('fk_newsletter_news_newsletter_id_newsletter'), 'newsletter_news', type_='foreignkey')
op.create_foreign_key('fk_newsletter_news_newsletter_id_newsletter', 'newsletter_news', 'newsletter', ['newsletter_id'], ['id'])
op.drop_constraint(op.f('fk_newsletter_activities_newsletter_id_newsletter'), 'newsletter_activities', type_='foreignkey')
op.create_foreign_key('fk_newsletter_activities_newsletter_id_newsletter', 'newsletter_activities', 'newsletter', ['newsletter_id'], ['id'])
op.execute('SET FOREIGN_KEY_CHECKS = 1')
# ### end Alembic commands ###
| {
"repo_name": "viaict/viaduct",
"path": "migrations/versions/2018_02_10_40f652bd98a8_add_position_to_newsletter_link_tables.py",
"copies": "1",
"size": "3450",
"license": "mit",
"hash": 4295671342576529400,
"line_mean": 50.4925373134,
"line_max": 170,
"alpha_frac": 0.671884058,
"autogenerated": false,
"ratio": 3.53121801432958,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.470310207232958,
"avg_score": null,
"num_lines": null
} |
"""Add Post and Tag models
Revision ID: 24bf1036f54
Revises: a53d3cd492
Create Date: 2014-07-09 03:40:28.445072
"""
# revision identifiers, used by Alembic.
revision = '24bf1036f54'
down_revision = 'a53d3cd492'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.create_table('tag',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(length=16), nullable=True),
sa.PrimaryKeyConstraint('id')
)
op.create_table('post',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('user_id', sa.Integer(), nullable=True),
sa.Column('title', sa.String(length=255), nullable=True),
sa.Column('slug', sa.String(length=255), nullable=True),
sa.Column('body', sa.Text(), nullable=True),
sa.Column('publish_datetime', sa.DateTime(timezone=True), nullable=True),
sa.Column('is_published', sa.Boolean(), nullable=True),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('tags',
sa.Column('tag_id', sa.Integer(), nullable=True),
sa.Column('post_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['post_id'], ['post.id'], ),
sa.ForeignKeyConstraint(['tag_id'], ['tag.id'], )
)
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_table('tags')
op.drop_table('post')
op.drop_table('tag')
### end Alembic commands ###
| {
"repo_name": "logston/plog-work",
"path": "alembic/versions/24bf1036f54_add_post_and_tag_models.py",
"copies": "1",
"size": "1542",
"license": "bsd-3-clause",
"hash": -199391626221408100,
"line_mean": 30.4693877551,
"line_max": 77,
"alpha_frac": 0.649156939,
"autogenerated": false,
"ratio": 3.3376623376623376,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9437573043924822,
"avg_score": 0.009849246547503136,
"num_lines": 49
} |
"""Add post class for blog posts
Revision ID: 4dfdaa23de0
Revises: 48eb772b7a93
Create Date: 2017-08-17 14:02:27.133734
"""
# revision identifiers, used by Alembic.
revision = '4dfdaa23de0'
down_revision = '48eb772b7a93'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.create_table('post',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('title', sa.String(), nullable=False),
sa.Column('slug', sa.String(), nullable=False),
sa.Column('body', sa.Text(), nullable=True),
sa.Column('featured_image_id', sa.Integer(), nullable=False),
sa.Column('created_at', sa.DateTime(timezone=True), server_default=sa.text(u'now()'), nullable=False),
sa.Column('updated_at', sa.DateTime(timezone=True), server_default=sa.text(u'now()'), nullable=True),
sa.ForeignKeyConstraint(['featured_image_id'], ['file.id'], name=op.f('fk_post_featured_image_id_file'), ondelete='CASCADE'),
sa.PrimaryKeyConstraint('id', name=op.f('pk_post'))
)
op.create_index(op.f('ix_post_created_at'), 'post', ['created_at'], unique=False)
op.create_index(op.f('ix_post_featured_image_id'), 'post', ['featured_image_id'], unique=False)
op.create_index(op.f('ix_post_slug'), 'post', ['slug'], unique=True)
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_post_slug'), table_name='post')
op.drop_index(op.f('ix_post_featured_image_id'), table_name='post')
op.drop_index(op.f('ix_post_created_at'), table_name='post')
op.drop_table('post')
### end Alembic commands ###
| {
"repo_name": "Code4SA/pmg-cms-2",
"path": "migrations/versions/4dfdaa23de0_add_post_class_for_blog_posts.py",
"copies": "1",
"size": "1687",
"license": "apache-2.0",
"hash": 3640085407836329000,
"line_mean": 39.1666666667,
"line_max": 129,
"alpha_frac": 0.6668642561,
"autogenerated": false,
"ratio": 3.1240740740740742,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.92477601894613,
"avg_score": 0.008635628142554544,
"num_lines": 42
} |
"""Add Poster model
Revision ID: b26756ac7225
Revises:
Create Date: 2017-08-08 15:06:59.785568
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = 'b26756ac7225'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
# 1. load uuid module
op.get_bind().execute(sa.text('CREATE EXTENSION IF NOT EXISTS "uuid-ossp";'))
# 2. create posters table
op.create_table('posters',
sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False),
sa.Column('title', sa.String(length=400), nullable=True),
sa.Column('authors', sa.Text(), nullable=True),
sa.Column('abstract', sa.Text(), nullable=True),
sa.Column('source_url', sa.String(length=400), nullable=False),
sa.Column('download_url', sa.String(length=400), nullable=False),
sa.Column('presented_at', sa.String(length=200), nullable=True),
sa.Column('create_date', sa.DateTime(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('posters')
# ### end Alembic commands ###
| {
"repo_name": "TailorDev/pauling",
"path": "api/migrations/versions/b26756ac7225_.py",
"copies": "1",
"size": "1297",
"license": "mit",
"hash": -1548809211486354000,
"line_mean": 30.6341463415,
"line_max": 81,
"alpha_frac": 0.6792598304,
"autogenerated": false,
"ratio": 3.431216931216931,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.4610476761616931,
"avg_score": null,
"num_lines": null
} |
"""Add post form."""
from django import forms
from posts.models import Post, Comment
class AddPostForm(forms.ModelForm):
"""Form to add new post."""
def __init__(self, *args, **kwargs):
"""Initialize the form."""
super(AddPostForm, self).__init__(*args, **kwargs)
self.fields['category'].empty_label = None
self.fields['category'].initial = 'Note'
for field_name in self.fields:
field = self.fields.get(field_name)
if field and isinstance(field, forms.TypedChoiceField):
field.choices = field.choices[1:]
class Meta:
"""Define model and stuff."""
model = Post
exclude = [
'date_uploaded',
'date_modified',
'author',
]
class EditPostForm(forms.ModelForm):
"""Form to edit existing post."""
class Meta:
"""Define model and stuff."""
model = Post
exclude = [
'date_uploaded',
'date_modified',
'author',
]
class CommentForm(forms.ModelForm):
"""Form to post a comment."""
class Meta:
"""Define model and stuff."""
model = Comment
exclude = [
'by_user',
'on_post',
'datetime',
]
| {
"repo_name": "CodeFN/thecodefellowsnetwork",
"path": "cfn/posts/forms.py",
"copies": "1",
"size": "1302",
"license": "apache-2.0",
"hash": 8543438935928442000,
"line_mean": 21.4482758621,
"line_max": 67,
"alpha_frac": 0.5230414747,
"autogenerated": false,
"ratio": 4.4135593220338984,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.5436600796733898,
"avg_score": null,
"num_lines": null
} |
"""add post
Revision ID: 10adf78bec0
Revises: 423fc08700e
Create Date: 2015-08-11 18:19:22.981569
"""
# revision identifiers, used by Alembic.
revision = '10adf78bec0'
down_revision = '423fc08700e'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.create_table('posts',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('body', sa.Text(), nullable=True),
sa.Column('timestramp', sa.DateTime(), nullable=True),
sa.Column('author_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['author_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_posts_timestramp'), 'posts', ['timestramp'], unique=False)
op.add_column('users', sa.Column('avatar_hash', sa.String(length=32), nullable=True))
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_column('users', 'avatar_hash')
op.drop_index(op.f('ix_posts_timestramp'), table_name='posts')
op.drop_table('posts')
### end Alembic commands ###
| {
"repo_name": "hanks-zyh/Flask-blog",
"path": "migrations/versions/10adf78bec0_add_post.py",
"copies": "2",
"size": "1139",
"license": "apache-2.0",
"hash": -7289263656546297000,
"line_mean": 29.7837837838,
"line_max": 89,
"alpha_frac": 0.6654960492,
"autogenerated": false,
"ratio": 3.2729885057471266,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9895232773111499,
"avg_score": 0.008650356367125559,
"num_lines": 37
} |
"""add post
Revision ID: f661af5e4d2a
Revises: 49c5959628c4
Create Date: 2017-07-01 11:14:18.714676
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'f661af5e4d2a'
down_revision = '49c5959628c4'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('posts',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('body', sa.Text(), nullable=True),
sa.Column('timestamp', sa.DateTime(), nullable=True),
sa.Column('author_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['author_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_posts_timestamp'), 'posts', ['timestamp'], unique=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_posts_timestamp'), table_name='posts')
op.drop_table('posts')
# ### end Alembic commands ###
| {
"repo_name": "keer2345/flasky",
"path": "migrations/versions/f661af5e4d2a_add_post.py",
"copies": "1",
"size": "1053",
"license": "mit",
"hash": -5030697196212103000,
"line_mean": 27.4594594595,
"line_max": 85,
"alpha_frac": 0.6628679962,
"autogenerated": false,
"ratio": 3.270186335403727,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9415147901372467,
"avg_score": 0.0035812860462519427,
"num_lines": 37
} |
"""add posts
Revision ID: 660ebcd1bcea
Revises: 0b255cff863a
Create Date: 2017-08-06 10:30:01.525541
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '660ebcd1bcea'
down_revision = '0b255cff863a'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('posts',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('title', sa.String(length=64), nullable=True),
sa.Column('body', sa.Text(), nullable=True),
sa.Column('timestamp', sa.DateTime(), nullable=True),
sa.Column('author_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['author_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_posts_timestamp'), 'posts', ['timestamp'], unique=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_posts_timestamp'), table_name='posts')
op.drop_table('posts')
# ### end Alembic commands ###
| {
"repo_name": "weqopy/blog_instance",
"path": "migrations/versions/660ebcd1bcea_add_posts.py",
"copies": "1",
"size": "1115",
"license": "mit",
"hash": -2899121239160574000,
"line_mean": 28.3421052632,
"line_max": 85,
"alpha_frac": 0.66367713,
"autogenerated": false,
"ratio": 3.338323353293413,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.4502000483293413,
"avg_score": null,
"num_lines": null
} |
"""add Posts table and user.posts
Revision ID: 56a3d184ac27
Revises: 4c1db97c5ebf
Create Date: 2017-09-27 23:15:03.380657
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '56a3d184ac27'
down_revision = '4c1db97c5ebf'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('posts',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('body', sa.Text(), nullable=True),
sa.Column('timestamp', sa.DateTime(), nullable=True),
sa.Column('author_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['author_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_posts_timestamp'), 'posts', ['timestamp'], unique=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_posts_timestamp'), table_name='posts')
op.drop_table('posts')
# ### end Alembic commands ###
| {
"repo_name": "mikkylok/mikky.lu",
"path": "migrations/versions/56a3d184ac27_add_posts_table_and_user_posts.py",
"copies": "1",
"size": "1075",
"license": "mit",
"hash": -2946210626049359000,
"line_mean": 28.0540540541,
"line_max": 85,
"alpha_frac": 0.6660465116,
"autogenerated": false,
"ratio": 3.2674772036474162,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9415617285016156,
"avg_score": 0.0035812860462519427,
"num_lines": 37
} |
"""Add preference table and seed setting for default preference.
Revision ID: 251c5e751233
Revises: 389881771619
Create Date: 2015-06-25 17:00:40.502776
"""
# revision identifiers, used by Alembic.
revision = '251c5e751233'
down_revision = '389881771619'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_column('sales_order_line', 'actual_amount')
op.drop_column('sales_order_line', 'adjust_amount')
op.drop_column('sales_order_line', 'original_amount')
preference_table = op.create_table('preference',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('def_so_incoming_type_id', sa.Integer(), nullable=False),
sa.Column('def_so_incoming_status_id', sa.Integer(), nullable=False),
sa.Column('def_so_exp_type_id', sa.Integer(), nullable=False),
sa.Column('def_so_exp_status_id', sa.Integer(), nullable=False),
sa.Column('def_po_logistic_exp_status_id', sa.Integer(), nullable=False),
sa.Column('def_po_logistic_exp_type_id', sa.Integer(), nullable=False),
sa.Column('def_po_goods_exp_status_id', sa.Integer(), nullable=False),
sa.Column('def_po_goods_exp_type_id', sa.Integer(), nullable=False),
sa.Column('remark', sa.Text(), nullable=True),
sa.ForeignKeyConstraint(['def_so_incoming_type_id'], ['enum_values.id'], ),
sa.ForeignKeyConstraint(['def_so_incoming_status_id'], ['enum_values.id'], ),
sa.ForeignKeyConstraint(['def_so_exp_type_id'], ['enum_values.id'], ),
sa.ForeignKeyConstraint(['def_so_exp_status_id'], ['enum_values.id'], ),
sa.ForeignKeyConstraint(['def_po_logistic_exp_status_id'], ['enum_values.id'], ),
sa.ForeignKeyConstraint(['def_po_logistic_exp_type_id'], ['enum_values.id'], ),
sa.ForeignKeyConstraint(['def_po_goods_exp_status_id'], ['enum_values.id'], ),
sa.ForeignKeyConstraint(['def_po_goods_exp_type_id'], ['enum_values.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.bulk_insert(preference_table, [
{'id':1, 'def_so_incoming_type_id':12, 'def_so_incoming_status_id':10,
'def_so_exp_type_id':9, 'def_so_exp_status_id':6,
'def_po_logistic_exp_status_id': 6, 'def_po_logistic_exp_type_id': 7,
'def_po_goods_exp_status_id': 6, 'def_po_goods_exp_type_id': 8},
],multiinsert=False)
from sqlalchemy.sql import text
op.get_bind().execute(text("ALTER SEQUENCE preference_id_seq RESTART WITH 2;"))
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.add_column('sales_order_line', sa.Column('original_amount', sa.NUMERIC(precision=8, scale=2), autoincrement=False, nullable=True))
op.add_column('sales_order_line', sa.Column('adjust_amount', sa.NUMERIC(precision=8, scale=2), autoincrement=False, nullable=True))
op.add_column('sales_order_line', sa.Column('actual_amount', sa.NUMERIC(precision=8, scale=2), autoincrement=False, nullable=True))
op.drop_table('preference')
### end Alembic commands ###
| {
"repo_name": "betterlife/flask-psi",
"path": "psi/migrations/versions/02_251c5e751233_.py",
"copies": "2",
"size": "3050",
"license": "mit",
"hash": 9076862342051554000,
"line_mean": 49.8333333333,
"line_max": 137,
"alpha_frac": 0.6780327869,
"autogenerated": false,
"ratio": 3.1704781704781704,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.48485109573781704,
"avg_score": null,
"num_lines": null
} |
"""Add primary key constraints
Revision ID: 728b24c64cea
Revises: 785ab1c2c255
Create Date: 2016-01-25 22:54:18.023243
"""
# revision identifiers, used by Alembic.
revision = '728b24c64cea'
down_revision = '785ab1c2c255'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade():
with op.batch_alter_table('audio_reports') as batch_op:
batch_op.drop_constraint('audio_snapshots_pkey')
batch_op.create_primary_key('audio_reports_pkey', columns=['id'])
with op.batch_alter_table('location_reports') as batch_op:
batch_op.drop_constraint('location_snapshots_pkey')
batch_op.create_primary_key('location_reports_pkey', columns=['id'])
with op.batch_alter_table('placemark_reports') as batch_op:
batch_op.drop_constraint('placemark_snapshots_pkey')
batch_op.create_primary_key('placemark_reports_pkey', columns=['id'])
with op.batch_alter_table('weather_reports') as batch_op:
batch_op.drop_constraint('weather_snapshots_pkey')
batch_op.create_primary_key('weather_reports_pkey', columns=['id'])
def downgrade():
with op.batch_alter_table('audio_reports') as batch_op:
batch_op.drop_constraint('audio_reports_pkey')
batch_op.create_primary_key('audio_snapshots_pkey', columns=['id'])
with op.batch_alter_table('location_reports') as batch_op:
batch_op.drop_constraint('location_reports_pkey')
batch_op.create_primary_key('location_snapshots_pkey', columns=['id'])
with op.batch_alter_table('placemark_reports') as batch_op:
batch_op.drop_constraint('placemark_reports_pkey')
batch_op.create_primary_key('placemark_snapshots_pkey', columns=['id'])
with op.batch_alter_table('weather_reports') as batch_op:
batch_op.drop_constraint('weather_reports_pkey')
batch_op.create_primary_key('weather_snapshots_pkey', columns=['id'])
| {
"repo_name": "thejunglejane/datums",
"path": "datums/migrations/versions/728b24c64cea_add_primary_key_constraints.py",
"copies": "1",
"size": "1936",
"license": "mit",
"hash": -6152621809591751000,
"line_mean": 35.5283018868,
"line_max": 79,
"alpha_frac": 0.6957644628,
"autogenerated": false,
"ratio": 3.408450704225352,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9501843004050236,
"avg_score": 0.020474432595023243,
"num_lines": 53
} |
"""Add primary keys to users, user_requests, and agency_users
Revision ID: b12d4ba1cfd4
Revises: 838a6ad16cf4
Create Date: 2019-03-18 16:44:35.911810
"""
# revision identifiers, used by Alembic.
revision = "b12d4ba1cfd4"
down_revision = "aeb1852855b4"
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
request_user_type_enum = postgresql.ENUM(
"requester", "agency", name="request_user_type", create_type=False
)
def upgrade():
# Add primary key to the Users
op.create_table(
"users_new",
sa.Column("guid", sa.String(length=64), nullable=False, unique=True),
sa.Column("is_super", sa.Boolean(), nullable=True, default=False),
sa.Column("first_name", sa.String(length=32), nullable=False),
sa.Column("middle_initial", sa.String(length=1), nullable=True),
sa.Column("last_name", sa.String(length=64), nullable=False),
sa.Column("email", sa.String(length=254), nullable=True),
sa.Column("email_validated", sa.Boolean(), nullable=False, default=True),
sa.Column("terms_of_use_accepted", sa.Boolean(), nullable=True, default=True),
sa.Column("title", sa.String(length=64), nullable=True),
sa.Column("organization", sa.String(length=128), nullable=True),
sa.Column("phone_number", sa.String(length=25), nullable=True),
sa.Column("fax_number", sa.String(length=25), nullable=True),
sa.Column(
"mailing_address", postgresql.JSONB(astext_type=sa.Text()), nullable=True
),
sa.Column("notification_email", sa.String(length=254), nullable=True),
sa.Column("session_id", sa.String(length=254), nullable=True),
sa.Column("signature", sa.String(), nullable=True),
sa.Column("active", sa.Boolean(), nullable=True),
sa.Column("has_nyc_account", sa.Boolean(), nullable=True),
sa.Column("is_anonymous_requester", sa.Boolean(), nullable=True),
sa.Column("is_nyc_employee", sa.Boolean(), nullable=True),
sa.PrimaryKeyConstraint("guid"),
)
op.execute(
"create index if not exists users_lower_idx on users_new (lower(email::text));"
)
op.execute(
"""INSERT INTO users_new (guid, is_super, first_name, middle_initial, last_name, email, email_validated,
terms_of_use_accepted, title, organization, phone_number, fax_number, mailing_address,
notification_email, session_id, signature, active, has_nyc_account, is_anonymous_requester,
is_nyc_employee)
SELECT guid,
is_super,
first_name,
middle_initial,
last_name,
email,
email_validated,
terms_of_use_accepted,
title,
organization,
phone_number,
fax_number,
mailing_address,
notification_email,
session_id,
signature,
active,
has_nyc_account,
is_anonymous_requester,
is_nyc_employee
FROM users;"""
)
op.drop_constraint(
"agency_users_user_guid_fkey", "agency_users", type_="foreignkey"
)
op.execute(
"""ALTER TABLE agency_users DROP CONSTRAINT IF EXISTS agency_users_user_guid_fkey1;"""
)
op.drop_constraint("events_user_guid_fkey", "events", type_="foreignkey")
op.drop_constraint(
"user_requests_user_guid_fkey", "user_requests", type_="foreignkey"
)
op.drop_table("users")
op.create_table(
"users",
sa.Column("guid", sa.String(length=64), nullable=False, unique=True),
sa.Column("is_super", sa.Boolean(), nullable=False, default=False),
sa.Column("first_name", sa.String(length=32), nullable=False),
sa.Column("middle_initial", sa.String(length=1), nullable=True),
sa.Column("last_name", sa.String(length=64), nullable=False),
sa.Column("email", sa.String(length=254), nullable=True),
sa.Column("email_validated", sa.Boolean(), nullable=False, default=True),
sa.Column("terms_of_use_accepted", sa.Boolean(), nullable=True, default=True),
sa.Column("title", sa.String(length=64), nullable=True),
sa.Column("organization", sa.String(length=128), nullable=True),
sa.Column("phone_number", sa.String(length=25), nullable=True),
sa.Column("fax_number", sa.String(length=25), nullable=True),
sa.Column(
"mailing_address", postgresql.JSONB(astext_type=sa.Text()), nullable=True
),
sa.Column("notification_email", sa.String(length=254), nullable=True),
sa.Column("session_id", sa.String(length=254), nullable=True),
sa.Column("signature", sa.String(), nullable=True),
sa.Column("active", sa.Boolean(), nullable=True),
sa.Column("has_nyc_account", sa.Boolean(), nullable=True),
sa.Column("is_anonymous_requester", sa.Boolean(), nullable=True),
sa.Column("is_nyc_employee", sa.Boolean(), nullable=True),
sa.PrimaryKeyConstraint("guid"),
)
op.execute(
"create index if not exists users_lower_idx on users (lower(email::text));"
)
op.execute(
"""INSERT INTO users (guid, is_super, first_name, middle_initial, last_name, email, email_validated,
terms_of_use_accepted, title, organization, phone_number, fax_number, mailing_address,
notification_email, session_id, signature, active, has_nyc_account, is_anonymous_requester,
is_nyc_employee)
SELECT guid,
is_super,
first_name,
middle_initial,
last_name,
email,
email_validated,
terms_of_use_accepted,
title,
organization,
phone_number,
fax_number,
mailing_address,
notification_email,
session_id,
signature,
active,
has_nyc_account,
is_anonymous_requester,
is_nyc_employee
FROM users_new;"""
)
op.drop_table("users_new")
op.create_foreign_key(
None, "agency_users", "users", ["user_guid"], ["guid"], onupdate="CASCADE"
)
op.create_foreign_key(
None, "events", "users", ["user_guid"], ["guid"], onupdate="CASCADE"
)
op.create_foreign_key(
None, "user_requests", "users", ["user_guid"], ["guid"], onupdate="CASCADE"
)
# Add primary key to the Users
op.create_table(
"user_requests_new",
sa.Column("user_guid", sa.String(length=64), nullable=False),
sa.Column("request_id", sa.String(length=19), nullable=False),
sa.Column("request_user_type", request_user_type_enum, nullable=True),
sa.Column("permissions", sa.BigInteger(), nullable=True),
sa.Column("point_of_contact", sa.Boolean(), nullable=True, default=False),
sa.ForeignKeyConstraint(["request_id"], ["requests.id"]),
sa.ForeignKeyConstraint(["user_guid"], ["users.guid"], onupdate="CASCADE"),
sa.PrimaryKeyConstraint("user_guid", "request_id"),
)
op.execute(
"""INSERT INTO user_requests_new (user_guid, request_id, permissions,
request_user_type, point_of_contact)
SELECT user_guid, request_id, permissions, request_user_type, point_of_contact FROM user_requests;"""
)
op.drop_table("user_requests")
op.create_table(
"user_requests",
sa.Column("user_guid", sa.String(length=64), nullable=False),
sa.Column("request_id", sa.String(length=19), nullable=False),
sa.Column("request_user_type", request_user_type_enum, nullable=True),
sa.Column("permissions", sa.BigInteger(), nullable=True),
sa.Column("point_of_contact", sa.Boolean(), nullable=True, default=False),
sa.ForeignKeyConstraint(["request_id"], ["requests.id"]),
sa.ForeignKeyConstraint(["user_guid"], ["users.guid"], onupdate="CASCADE"),
sa.PrimaryKeyConstraint("user_guid", "request_id"),
)
op.execute(
"""INSERT INTO user_requests (user_guid, request_id, permissions,
request_user_type, point_of_contact)
SELECT user_guid, request_id, permissions, request_user_type, point_of_contact
FROM user_requests_new;"""
)
op.drop_table("user_requests_new")
# Add primary key to AgencyUsers
op.create_table(
"agency_users_new",
sa.Column("user_guid", sa.String(length=64), nullable=False),
sa.Column("agency_ein", sa.String(length=4), nullable=False),
sa.Column("is_agency_active", sa.Boolean(), nullable=False),
sa.Column("is_agency_admin", sa.Boolean(), nullable=False),
sa.Column("is_primary_agency", sa.Boolean(), nullable=False),
sa.ForeignKeyConstraint(["agency_ein"], ["agencies.ein"]),
sa.ForeignKeyConstraint(["user_guid"], ["users.guid"], onupdate="CASCADE"),
sa.PrimaryKeyConstraint("user_guid", "agency_ein"),
)
op.execute(
"""INSERT INTO agency_users_new (user_guid, agency_ein, is_agency_active,
is_agency_admin, is_primary_agency)
SELECT
user_guid,
agency_ein,
is_agency_active,
is_agency_admin,
is_primary_agency
FROM agency_users;"""
)
op.drop_table("agency_users")
op.create_table(
"agency_users",
sa.Column("user_guid", sa.String(length=64), nullable=False),
sa.Column("agency_ein", sa.String(length=4), nullable=False),
sa.Column("is_agency_active", sa.Boolean(), nullable=False),
sa.Column("is_agency_admin", sa.Boolean(), nullable=False),
sa.Column("is_primary_agency", sa.Boolean(), nullable=False),
sa.ForeignKeyConstraint(["agency_ein"], ["agencies.ein"]),
sa.ForeignKeyConstraint(["user_guid"], ["users.guid"], onupdate="CASCADE"),
sa.PrimaryKeyConstraint("user_guid", "agency_ein"),
)
op.execute(
"""INSERT INTO agency_users (user_guid, agency_ein, is_agency_active,
is_agency_admin, is_primary_agency)
SELECT
user_guid,
agency_ein,
is_agency_active,
is_agency_admin,
is_primary_agency
FROM agency_users_new;"""
)
op.drop_table("agency_users_new")
def downgrade():
op.create_table(
"users_new",
sa.Column("guid", sa.String(length=64), nullable=False, unique=True),
sa.Column("is_super", sa.Boolean(), nullable=True, default=False),
sa.Column("first_name", sa.String(length=32), nullable=False),
sa.Column("middle_initial", sa.String(length=1), nullable=True),
sa.Column("last_name", sa.String(length=64), nullable=False),
sa.Column("email", sa.String(length=254), nullable=True),
sa.Column("email_validated", sa.Boolean(), nullable=False, default=True),
sa.Column("terms_of_use_accepted", sa.Boolean(), nullable=True, default=True),
sa.Column("title", sa.String(length=64), nullable=True),
sa.Column("organization", sa.String(length=128), nullable=True),
sa.Column("phone_number", sa.String(length=25), nullable=True),
sa.Column("fax_number", sa.String(length=25), nullable=True),
sa.Column(
"mailing_address", postgresql.JSONB(astext_type=sa.Text()), nullable=True
),
sa.Column("notification_email", sa.String(length=254), nullable=True),
sa.Column("session_id", sa.String(length=254), nullable=True),
sa.Column("signature", sa.String(), nullable=True),
sa.Column("active", sa.Boolean(), nullable=True),
sa.Column("has_nyc_account", sa.Boolean(), nullable=True),
sa.Column("is_anonymous_requester", sa.Boolean(), nullable=True),
sa.Column("is_nyc_employee", sa.Boolean(), nullable=True),
)
op.execute(
"create index if not exists users_lower_idx on users_new (lower(email::text));"
)
op.execute(
"""INSERT INTO users_new (guid, is_super, first_name, middle_initial, last_name, email, email_validated,
terms_of_use_accepted, title, organization, phone_number, fax_number, mailing_address,
notification_email, session_id, signature, active, has_nyc_account, is_anonymous_requester,
is_nyc_employee)
SELECT guid,
is_super,
first_name,
middle_initial,
last_name,
email,
email_validated,
terms_of_use_accepted,
title,
organization,
phone_number,
fax_number,
mailing_address,
notification_email,
session_id,
signature,
active,
has_nyc_account,
is_anonymous_requester,
is_nyc_employee
FROM users;"""
)
op.drop_constraint(
"agency_users_user_guid_fkey", "agency_users", type_="foreignkey"
)
op.drop_constraint("events_user_guid_fkey", "events", type_="foreignkey")
op.drop_constraint(
"user_requests_user_guid_fkey", "user_requests", type_="foreignkey"
)
op.drop_table("users")
op.create_table(
"users",
sa.Column("guid", sa.String(length=64), nullable=False, unique=True),
sa.Column("is_super", sa.Boolean(), nullable=False, default=False),
sa.Column("first_name", sa.String(length=32), nullable=False),
sa.Column("middle_initial", sa.String(length=1), nullable=True),
sa.Column("last_name", sa.String(length=64), nullable=False),
sa.Column("email", sa.String(length=254), nullable=True),
sa.Column("email_validated", sa.Boolean(), nullable=False, default=True),
sa.Column("terms_of_use_accepted", sa.Boolean(), nullable=True, default=True),
sa.Column("title", sa.String(length=64), nullable=True),
sa.Column("organization", sa.String(length=128), nullable=True),
sa.Column("phone_number", sa.String(length=25), nullable=True),
sa.Column("fax_number", sa.String(length=25), nullable=True),
sa.Column(
"mailing_address", postgresql.JSONB(astext_type=sa.Text()), nullable=True
),
sa.Column("notification_email", sa.String(length=254), nullable=True),
sa.Column("session_id", sa.String(length=254), nullable=True),
sa.Column("signature", sa.String(), nullable=True),
sa.Column("active", sa.Boolean(), nullable=True),
sa.Column("has_nyc_account", sa.Boolean(), nullable=True),
sa.Column("is_anonymous_requester", sa.Boolean(), nullable=True),
sa.Column("is_nyc_employee", sa.Boolean(), nullable=True),
)
op.execute(
"create index if not exists users_lower_idx on users (lower(email::text));"
)
op.execute(
"""INSERT INTO users (guid, is_super, first_name, middle_initial, last_name, email, email_validated,
terms_of_use_accepted, title, organization, phone_number, fax_number, mailing_address,
notification_email, session_id, signature, active, has_nyc_account, is_anonymous_requester,
is_nyc_employee)
SELECT guid,
is_super,
first_name,
middle_initial,
last_name,
email,
email_validated,
terms_of_use_accepted,
title,
organization,
phone_number,
fax_number,
mailing_address,
notification_email,
session_id,
signature,
active,
has_nyc_account,
is_anonymous_requester,
is_nyc_employee
FROM users_new;"""
)
op.drop_table("users_new")
op.create_foreign_key(
None, "agency_users", "users", ["user_guid"], ["guid"], onupdate="CASCADE"
)
op.create_foreign_key(
None, "events", "users", ["user_guid"], ["guid"], onupdate="CASCADE"
)
op.create_foreign_key(
None, "user_requests", "users", ["user_guid"], ["guid"], onupdate="CASCADE"
)
op.create_table(
"user_requests_new",
sa.Column("user_guid", sa.String(length=64), nullable=False),
sa.Column("request_id", sa.String(length=19), nullable=False),
sa.Column("request_user_type", request_user_type_enum, nullable=True),
sa.Column("permissions", sa.BigInteger(), nullable=True),
sa.Column("point_of_contact", sa.Boolean(), nullable=True, default=False),
sa.ForeignKeyConstraint(["request_id"], ["requests.id"]),
sa.ForeignKeyConstraint(["user_guid"], ["users.guid"], onupdate="CASCADE"),
)
op.execute(
"""INSERT INTO user_requests_new (user_guid, request_id, permissions,
request_user_type, point_of_contact)
SELECT user_guid, request_id, permissions, request_user_type, point_of_contact FROM user_requests;"""
)
op.drop_table("user_requests")
op.create_table(
"user_requests",
sa.Column("user_guid", sa.String(length=64), nullable=False),
sa.Column("request_id", sa.String(length=19), nullable=False),
sa.Column("request_user_type", request_user_type_enum, nullable=True),
sa.Column("permissions", sa.BigInteger(), nullable=True),
sa.Column("point_of_contact", sa.Boolean(), nullable=True, default=False),
sa.ForeignKeyConstraint(["request_id"], ["requests.id"]),
sa.ForeignKeyConstraint(["user_guid"], ["users.guid"], onupdate="CASCADE"),
)
op.execute(
"""INSERT INTO user_requests (user_guid, request_id, permissions,
request_user_type, point_of_contact)
SELECT user_guid, request_id, permissions, request_user_type, point_of_contact
FROM user_requests_new;"""
)
op.drop_table("user_requests_new")
op.create_table(
"agency_users_new",
sa.Column("user_guid", sa.String(length=64), nullable=False),
sa.Column("agency_ein", sa.String(length=4), nullable=False),
sa.Column("is_agency_active", sa.Boolean(), nullable=False),
sa.Column("is_agency_admin", sa.Boolean(), nullable=False),
sa.Column("is_primary_agency", sa.Boolean(), nullable=False),
sa.ForeignKeyConstraint(["agency_ein"], ["agencies.ein"]),
sa.ForeignKeyConstraint(["user_guid"], ["users.guid"], onupdate="CASCADE"),
)
op.execute(
"""INSERT INTO agency_users_new (user_guid, agency_ein, is_agency_active,
is_agency_admin, is_primary_agency)
SELECT
user_guid,
agency_ein,
is_agency_active,
is_agency_admin,
is_primary_agency
FROM agency_users;"""
)
op.drop_table("agency_users")
op.create_table(
"agency_users",
sa.Column("user_guid", sa.String(length=64), nullable=False),
sa.Column("agency_ein", sa.String(length=4), nullable=False),
sa.Column("is_agency_active", sa.Boolean(), nullable=False),
sa.Column("is_agency_admin", sa.Boolean(), nullable=False),
sa.Column("is_primary_agency", sa.Boolean(), nullable=False),
sa.ForeignKeyConstraint(["agency_ein"], ["agencies.ein"]),
sa.ForeignKeyConstraint(["user_guid"], ["users.guid"], onupdate="CASCADE"),
)
op.execute(
"""INSERT INTO agency_users (user_guid, agency_ein, is_agency_active,
is_agency_admin, is_primary_agency)
SELECT
user_guid,
agency_ein,
is_agency_active,
is_agency_admin,
is_primary_agency
FROM agency_users_new;"""
)
op.drop_table("agency_users_new")
| {
"repo_name": "CityOfNewYork/NYCOpenRecords",
"path": "migrations/versions/b12d4ba1cfd4_add_primary_keys_to_users_user_requests_.py",
"copies": "1",
"size": "21873",
"license": "apache-2.0",
"hash": 8628072912599670000,
"line_mean": 47.0725274725,
"line_max": 123,
"alpha_frac": 0.547021442,
"autogenerated": false,
"ratio": 4.04381586245147,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.509083730445147,
"avg_score": null,
"num_lines": null
} |
"""Add primary key to RepositoryApp2languages
Revision ID: 331f2c45f5a
Revises: b100c13976f
Create Date: 2017-07-25 16:48:31.860599
"""
# revision identifiers, used by Alembic.
revision = '331f2c45f5a'
down_revision = 'b100c13976f'
from alembic import op
from sqlalchemy import Integer, and_
from sqlalchemy.sql import column, table, select
import sqlalchemy as sa
RepositoryApp2languages = table('RepositoryApp2languages',
column('id', Integer),
column('repository_app_id', Integer),
column('language_id', Integer),
)
def upgrade():
elements = [
# {
# 'repository_app_id': number,
# 'language_id': number,
# }
]
connection = op.get_bind()
for repository_app_id, language_id in connection.execute(select([RepositoryApp2languages.c.repository_app_id, RepositoryApp2languages.c.language_id])):
elements.append({
'repository_app_id': repository_app_id,
'language_id' : language_id,
})
for pos, element in enumerate(elements):
stmt = RepositoryApp2languages.update().where(
and_(
RepositoryApp2languages.c.repository_app_id==element['repository_app_id'],
RepositoryApp2languages.c.language_id == element['language_id']
)).values({ 'id': pos + 1 })
op.execute(stmt)
op.create_primary_key( "pk_my_table", "RepositoryApp2languages", ["id"])
def downgrade():
pass
| {
"repo_name": "go-lab/appcomposer",
"path": "alembic/versions/331f2c45f5a_add_primary_key_to_.py",
"copies": "3",
"size": "1515",
"license": "bsd-2-clause",
"hash": 7797797033233198000,
"line_mean": 29.3,
"line_max": 155,
"alpha_frac": 0.6264026403,
"autogenerated": false,
"ratio": 3.7223587223587224,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 1,
"avg_score": 0.013711670434208387,
"num_lines": 50
} |
"""add primary language column to participant summary
Revision ID: 9b2ec162bfde
Revises: 378ee128c23f
Create Date: 2018-10-18 14:44:48.566768
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "9b2ec162bfde"
down_revision = "378ee128c23f"
branch_labels = None
depends_on = None
def upgrade(engine_name):
globals()["upgrade_%s" % engine_name]()
def downgrade(engine_name):
globals()["downgrade_%s" % engine_name]()
def upgrade_rdr():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column("participant_summary", sa.Column("primary_language", sa.String(length=80), nullable=True))
# ### end Alembic commands ###
def downgrade_rdr():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column("participant_summary", "primary_language")
# ### end Alembic commands ###
def upgrade_metrics():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
def downgrade_metrics():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
| {
"repo_name": "all-of-us/raw-data-repository",
"path": "rdr_service/alembic/versions/9b2ec162bfde_add_primary_language_column_to_.py",
"copies": "1",
"size": "1170",
"license": "bsd-3-clause",
"hash": 4779199750218844000,
"line_mean": 23.8936170213,
"line_max": 108,
"alpha_frac": 0.6752136752,
"autogenerated": false,
"ratio": 3.6,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9774237684569509,
"avg_score": 0.00019519812609798947,
"num_lines": 47
} |
"""Add principal group system
Revision ID: 1d84b7d16aa9
Revises: 179651effcbd
Create Date: 2015-08-07 00:05:42.996683
"""
# revision identifiers, used by Alembic.
revision = '1d84b7d16aa9'
down_revision = '179651effcbd'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
def upgrade():
op.create_table('authz_group',
sa.Column('id', sa.Integer(), unique=True, nullable=False),
sa.Column('name', sa.Text(), nullable=False),
sa.Column('principals', postgresql.ARRAY(sa.Text()), nullable=False),
sa.PrimaryKeyConstraint('id', 'name'),
sa.UniqueConstraint('id')
)
op.execute("ALTER TABLE authn_user ADD CONSTRAINT id_unique UNIQUE (id);")
op.create_table('authz_group_user',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('group_id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['group_id'], ['authz_group.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['authn_user.id'], ),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('authz_group_user')
op.execute("ALTER TABLE authn_user DROP CONSTRAINT id_unique;")
op.drop_table('authz_group')
| {
"repo_name": "404d/Temporals-Web",
"path": "temporals_web/migration/versions/201508070005_1d84b7d16aa9_add_principal_group_system.py",
"copies": "1",
"size": "1285",
"license": "mit",
"hash": -7546771122862709000,
"line_mean": 31.9487179487,
"line_max": 78,
"alpha_frac": 0.6645914397,
"autogenerated": false,
"ratio": 3.3550913838120104,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.45196828235120107,
"avg_score": null,
"num_lines": null
} |
"""Add Product version table.
Also product_ref_id is removed from the product table.
Revision ID: 35bf54e2c13c
Revises: 709452f38a5c
Create Date: 2016-07-30 17:59:57.912306
"""
# revision identifiers, used by Alembic.
revision = '35bf54e2c13c'
down_revision = '709452f38a5c'
MYSQL_CHARSET = 'utf8'
from alembic import op
import sqlalchemy as sa
def upgrade():
"""Upgrade DB."""
op.create_table(
'product_version',
sa.Column('updated_at', sa.DateTime()),
sa.Column('deleted_at', sa.DateTime()),
sa.Column('deleted', sa.Integer, default=0),
sa.Column('created_at', sa.DateTime(), nullable=False),
sa.Column('created_by_user', sa.String(128), nullable=False),
sa.Column('id', sa.String(36), nullable=False),
sa.Column('product_id', sa.String(36), nullable=False),
sa.Column('version', sa.String(length=36), nullable=True),
sa.Column('cpid', sa.String(length=36)),
sa.PrimaryKeyConstraint('id'),
sa.ForeignKeyConstraint(['product_id'], ['product.id'], ),
sa.ForeignKeyConstraint(['created_by_user'], ['user.openid'], ),
sa.UniqueConstraint('product_id', 'version', name='prod_ver_uc'),
mysql_charset=MYSQL_CHARSET
)
op.drop_column('product', 'product_ref_id')
def downgrade():
"""Downgrade DB."""
op.drop_table('product_version')
op.add_column('product',
sa.Column('product_ref_id', sa.String(36), nullable=True))
| {
"repo_name": "openstack/refstack",
"path": "refstack/db/migrations/alembic/versions/35bf54e2c13c_add_product_version.py",
"copies": "2",
"size": "1485",
"license": "apache-2.0",
"hash": 67221813143468710,
"line_mean": 31.2826086957,
"line_max": 76,
"alpha_frac": 0.6383838384,
"autogenerated": false,
"ratio": 3.3521444695259595,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9981273424498108,
"avg_score": 0.0018509766855702582,
"num_lines": 46
} |
"""add profile
Revision ID: 9007329423de
Revises: ef2afb4882cd
Create Date: 2017-08-01 07:41:14.913197
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '9007329423de'
down_revision = 'ef2afb4882cd'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('users', sa.Column('about_me', sa.Text(), nullable=True))
op.add_column('users', sa.Column('last_seen', sa.DateTime(), nullable=True))
op.add_column('users', sa.Column('location', sa.String(length=64), nullable=True))
op.add_column('users', sa.Column('member_since', sa.DateTime(), nullable=True))
op.add_column('users', sa.Column('name', sa.String(length=64), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('users', 'name')
op.drop_column('users', 'member_since')
op.drop_column('users', 'location')
op.drop_column('users', 'last_seen')
op.drop_column('users', 'about_me')
# ### end Alembic commands ###
| {
"repo_name": "weqopy/blog_instance",
"path": "migrations/versions/9007329423de_add_profile.py",
"copies": "1",
"size": "1145",
"license": "mit",
"hash": -4278269357071764000,
"line_mean": 30.8055555556,
"line_max": 86,
"alpha_frac": 0.6689956332,
"autogenerated": false,
"ratio": 3.216292134831461,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.4385287768031461,
"avg_score": null,
"num_lines": null
} |
"""add profiles
Revision ID: b153adef93d6
Revises: 504b785dbd6c
Create Date: 2017-05-27 01:22:10.267494
"""
# revision identifiers, used by Alembic.
revision = 'b153adef93d6'
down_revision = '504b785dbd6c'
from alembic import op
import sqlalchemy as sa
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('users', sa.Column('about_me', sa.Text(), nullable=True))
op.add_column('users', sa.Column('last_seen', sa.DateTime(), nullable=True))
op.add_column('users', sa.Column('location', sa.String(length=64), nullable=True))
op.add_column('users', sa.Column('member_since', sa.DateTime(), nullable=True))
op.add_column('users', sa.Column('name', sa.String(length=64), nullable=True))
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('users', 'name')
op.drop_column('users', 'member_since')
op.drop_column('users', 'location')
op.drop_column('users', 'last_seen')
op.drop_column('users', 'about_me')
# ### end Alembic commands ###
| {
"repo_name": "delitamakanda/socialite",
"path": "migrations/versions/b153adef93d6_add_profiles.py",
"copies": "1",
"size": "1107",
"license": "mit",
"hash": 2669189706268359700,
"line_mean": 31.5588235294,
"line_max": 86,
"alpha_frac": 0.6666666667,
"autogenerated": false,
"ratio": 3.1810344827586206,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.43477011494586204,
"avg_score": null,
"num_lines": null
} |
"""Add project labels
Revision ID: 4a5bf96b558d
Revises: 5581aa8a3cd
Create Date: 2016-06-02 23:42:17.332659
"""
# revision identifiers, used by Alembic.
revision = '4a5bf96b558d'
down_revision = '5581aa8a3cd'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table(
'label',
sa.Column('id', sa.Integer, primary_key=True),
sa.Column('name', sa.Unicode),
sa.Column('color', sa.Unicode),
)
project_labels_table = op.create_table(
'project_labels',
sa.Column('project', sa.Integer),
sa.Column('label', sa.Integer),
sa.ForeignKeyConstraint(['project'], ['project.id']),
sa.ForeignKeyConstraint(['label'], ['label.id'])
)
label_translation_table = op.create_table(
'label_translation',
sa.Column('id', sa.Integer, nullable=False),
sa.Column('locale', sa.String(10), nullable=False),
sa.Column('description', sa.String),
sa.UniqueConstraint('id', 'locale'),
sa.ForeignKeyConstraint(['id'], ['label.id'], ondelete="CASCADE")
)
def downgrade():
op.drop_table('project_labels')
op.drop_table('label_translation')
op.drop_table('label')
| {
"repo_name": "ethan-nelson/osm-tasking-manager2",
"path": "alembic/versions/4a5bf96b558d_add_project_labels.py",
"copies": "2",
"size": "1216",
"license": "bsd-2-clause",
"hash": 5498982448065892000,
"line_mean": 24.8723404255,
"line_max": 73,
"alpha_frac": 0.6274671053,
"autogenerated": false,
"ratio": 3.425352112676056,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 1,
"avg_score": 0.0022951531970958425,
"num_lines": 47
} |
"""add Project Model
Revision ID: 3c1cf09049e6
Revises: 271a6a190066
Create Date: 2014-07-27 11:26:40.603738
"""
# revision identifiers, used by Alembic.
revision = '3c1cf09049e6'
down_revision = '271a6a190066'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.create_table('project',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('type', sa.String(length=50), nullable=True),
sa.Column('bugget', sa.String(length=50), nullable=True),
sa.Column('period', sa.String(length=50), nullable=True),
sa.Column('desc', sa.Text(), nullable=True),
sa.Column('name', sa.String(length=100), nullable=True),
sa.Column('email', sa.String(length=100), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_table('project')
### end Alembic commands ###
| {
"repo_name": "tuistudio/tuistudio.com",
"path": "migrations/versions/3c1cf09049e6_add_project_model.py",
"copies": "1",
"size": "1058",
"license": "apache-2.0",
"hash": 7974460300408724000,
"line_mean": 28.3888888889,
"line_max": 63,
"alpha_frac": 0.6739130435,
"autogenerated": false,
"ratio": 3.29595015576324,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9421970821783112,
"avg_score": 0.00957847549602555,
"num_lines": 36
} |
"""Add provision table.
Revision ID: 3a550b296ce
Revises: 57a85bc4692
Create Date: 2015-02-06 21:57:35.790120
"""
# revision identifiers, used by Alembic.
revision = '3a550b296ce'
down_revision = '57a85bc4692'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
from sqlalchemy_utils.types.uuid import UUIDType
def upgrade():
op.create_table(
'provision',
sa.Column(
'id',
UUIDType(binary=False),
server_default=sa.text('uuid_generate_v4()'),
nullable=False
),
sa.Column('quantity', sa.Integer, nullable=False),
sa.Column(
'price_per_magazine',
sa.Numeric(precision=3, scale=2),
nullable=False
),
sa.PrimaryKeyConstraint('id')
)
op.create_unique_constraint(
'uq_provision_quantity',
'provision',
['quantity'],
deferrable='True',
initially='DEFERRED'
)
def downgrade():
op.drop_constraint('uq_provision_quantity', 'provision', type_='unique')
op.drop_table('provision')
| {
"repo_name": "wappulehti-apy/diilikone-api",
"path": "diilikone/migrations/versions/3a550b296ce_add_provision_table.py",
"copies": "1",
"size": "1115",
"license": "mit",
"hash": -3259084841637556700,
"line_mean": 22.2291666667,
"line_max": 76,
"alpha_frac": 0.6080717489,
"autogenerated": false,
"ratio": 3.596774193548387,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9693850828823227,
"avg_score": 0.0021990227250320415,
"num_lines": 48
} |
"""Add proxy_image_stored
Revision ID: 7fb89edaa44d
Revises: 2639af76b6d1
Create Date: 2018-02-19 23:27:24.310094
"""
# revision identifiers, used by Alembic.
revision = '7fb89edaa44d'
down_revision = '2639af76b6d1'
from alembic import op
import sqlalchemy as sa
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('RepositoryAppCheckUrls', sa.Column('proxy_image_stored', sa.Boolean(), nullable=True))
op.create_index(op.f('ix_RepositoryAppCheckUrls_proxy_image_stored'), 'RepositoryAppCheckUrls', ['proxy_image_stored'], unique=False)
op.add_column('RepositoryApps', sa.Column('proxy_image_stored', sa.Boolean(), nullable=True))
op.create_index(op.f('ix_RepositoryApps_proxy_image_stored'), 'RepositoryApps', ['proxy_image_stored'], unique=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_RepositoryApps_proxy_image_stored'), table_name='RepositoryApps')
op.drop_column('RepositoryApps', 'proxy_image_stored')
op.drop_index(op.f('ix_RepositoryAppCheckUrls_proxy_image_stored'), table_name='RepositoryAppCheckUrls')
op.drop_column('RepositoryAppCheckUrls', 'proxy_image_stored')
# ### end Alembic commands ###
| {
"repo_name": "go-lab/appcomposer",
"path": "alembic/versions/7fb89edaa44d_add_proxy_image_stored.py",
"copies": "3",
"size": "1297",
"license": "bsd-2-clause",
"hash": 4510198446424874000,
"line_mean": 39.53125,
"line_max": 137,
"alpha_frac": 0.7208943716,
"autogenerated": false,
"ratio": 3.2103960396039604,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.5431290411203961,
"avg_score": null,
"num_lines": null
} |
"""Add .pth and site-packages support to IronPython
Since this code is a modified version of the standard CPython distribution,
it is licensed with the same license:
http://www.python.org/download/releases/2.4.3/license/
"""
import sys
import os
def makepath(*paths):
dir = os.path.abspath(os.path.join(*paths))
return dir, os.path.normcase(dir)
def removeduppaths():
""" Remove duplicate entries from sys.path along with making them
absolute"""
# This ensures that the initial path provided by the interpreter contains
# only absolute pathnames, even if we're running from the build directory.
L = []
known_paths = set()
for dir in sys.path:
# Filter out duplicate paths (on case-insensitive file systems also
# if they only differ in case); turn relative paths into absolute
# paths.
dir, dircase = makepath(dir)
if not dircase in known_paths:
L.append(dir)
known_paths.add(dircase)
sys.path[:] = L
return known_paths
def _init_pathinfo():
"""Return a set containing all existing directory entries from sys.path"""
d = set()
for dir in sys.path:
try:
if os.path.isdir(dir):
dir, dircase = makepath(dir)
d.add(dircase)
except TypeError:
continue
return d
def addpackage(sitedir, name, known_paths):
"""Add a new path to known_paths by combining sitedir and 'name' or execute
sitedir if it starts with 'import'"""
if known_paths is None:
_init_pathinfo()
reset = 1
else:
reset = 0
fullname = os.path.join(sitedir, name)
try:
f = open(fullname, "rU")
except IOError:
return
try:
for line in f:
if line.startswith("#"):
continue
if line.startswith("import"):
exec line
continue
line = line.rstrip()
dir, dircase = makepath(sitedir, line)
if not dircase in known_paths and os.path.exists(dir):
sys.path.append(dir)
known_paths.add(dircase)
finally:
f.close()
if reset:
known_paths = None
return known_paths
def addsitedir(sitedir, known_paths=None):
"""Add 'sitedir' argument to sys.path if missing and handle .pth files in
'sitedir'"""
if known_paths is None:
known_paths = _init_pathinfo()
reset = 1
else:
reset = 0
sitedir, sitedircase = makepath(sitedir)
if not sitedircase in known_paths:
sys.path.append(sitedir) # Add path component
try:
names = os.listdir(sitedir)
except os.error:
return
names.sort()
for name in names:
if name.endswith(os.extsep + "pth"):
addpackage(sitedir, name, known_paths)
if reset:
known_paths = None
return known_paths
def addsitepackages(known_paths):
"""Add site-packages (and possibly site-python) to sys.path"""
prefixes = [os.path.join(sys.prefix, "local"), sys.prefix]
if sys.exec_prefix != sys.prefix:
prefixes.append(os.path.join(sys.exec_prefix, "local"))
for prefix in prefixes:
if prefix:
sitedirs = [os.path.join(prefix, "Lib", "site-packages")]
for sitedir in sitedirs:
if os.path.isdir(sitedir):
addsitedir(sitedir, known_paths)
return None
def execsitecustomize():
"""Run custom site specific code, if available."""
try:
import sitecustomize
except ImportError:
pass
def main():
paths_in_sys = removeduppaths()
paths_in_sys = addsitepackages(paths_in_sys)
execsitecustomize()
main()
| {
"repo_name": "longde123/MultiversePlatform",
"path": "lib/IPCE/Lib/_pth_support.py",
"copies": "1",
"size": "3753",
"license": "mit",
"hash": -8512186404761254000,
"line_mean": 29.024,
"line_max": 79,
"alpha_frac": 0.6040500933,
"autogenerated": false,
"ratio": 3.889119170984456,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.4993169264284456,
"avg_score": null,
"num_lines": null
} |
"""add_publish_status
Revision ID: 1f5613e38200
Revises: c2b6d88e6d44
Create Date: 2016-08-04 13:49:32.364079
"""
# revision identifiers, used by Alembic.
revision = '1f5613e38200'
down_revision = 'c2b6d88e6d44'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade(engine_name):
globals()["upgrade_%s" % engine_name]()
def downgrade(engine_name):
globals()["downgrade_%s" % engine_name]()
def upgrade_data_broker():
### commands auto generated by Alembic - please adjust! ###
op.create_table('publish_status',
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('publish_status_id', sa.Integer(), nullable=False),
sa.Column('name', sa.Text(), nullable=True),
sa.Column('description', sa.Text(), nullable=True),
sa.PrimaryKeyConstraint('publish_status_id')
)
op.add_column('submission', sa.Column('number_of_errors', sa.Integer(), nullable=True))
op.add_column('submission', sa.Column('number_of_warnings', sa.Integer(), nullable=True))
op.add_column('submission', sa.Column('publish_status_id', sa.Integer(), nullable=True))
op.add_column('submission', sa.Column('publishable', sa.Boolean(), server_default='False', nullable=False))
op.create_foreign_key('fk_publish_status_id', 'submission', 'publish_status', ['publish_status_id'], ['publish_status_id'], ondelete='CASCADE')
### end Alembic commands ###
def downgrade_data_broker():
### commands auto generated by Alembic - please adjust! ###
op.drop_constraint('fk_publish_status_id', 'submission', type_='foreignkey')
op.drop_column('submission', 'publishable')
op.drop_column('submission', 'publish_status_id')
op.drop_column('submission', 'number_of_warnings')
op.drop_column('submission', 'number_of_errors')
op.drop_table('publish_status')
### end Alembic commands ###
| {
"repo_name": "chambers-brian/SIG_Digital-Strategy_SI_ODP_Backend",
"path": "dataactcore/migrations/versions/1f5613e38200_add_publish_status.py",
"copies": "2",
"size": "1956",
"license": "cc0-1.0",
"hash": 6997973228560116000,
"line_mean": 33.3157894737,
"line_max": 147,
"alpha_frac": 0.686605317,
"autogenerated": false,
"ratio": 3.4017391304347826,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.5088344447434783,
"avg_score": null,
"num_lines": null
} |
"""add pubsub
Revision ID: ff8e10fe44d7
Revises: e1d41654e85b
Create Date: 2018-03-12 19:24:31.822104
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = 'ff8e10fe44d7'
down_revision = 'e1d41654e85b'
def upgrade():
op.create_table('notification',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('event', sa.String(length=255), nullable=False),
sa.Column('channels', postgresql.ARRAY(sa.String(length=255)), nullable=True),
sa.Column('params', postgresql.JSONB(astext_type=sa.Text()), nullable=True),
sa.Column('actor_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['actor_id'], ['role.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_notification_channels'), 'notification', ['channels'], unique=False)
op.create_table('subscription',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('deleted_at', sa.DateTime(), nullable=True),
sa.Column('channel', sa.String(length=255), nullable=True),
sa.Column('role_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['role_id'], ['role.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_subscription_channel'), 'subscription', ['channel'], unique=False)
op.create_index(op.f('ix_subscription_role_id'), 'subscription', ['role_id'], unique=False)
def downgrade():
op.drop_index(op.f('ix_subscription_role_id'), table_name='subscription')
op.drop_index(op.f('ix_subscription_channel'), table_name='subscription')
op.drop_table('subscription')
op.drop_index(op.f('ix_notification_channels'), table_name='notification')
op.drop_table('notification')
| {
"repo_name": "pudo/aleph",
"path": "aleph/migrate/versions/ff8e10fe44d7_add_pubsub.py",
"copies": "1",
"size": "1992",
"license": "mit",
"hash": 3701770846252288000,
"line_mean": 39.6530612245,
"line_max": 97,
"alpha_frac": 0.688253012,
"autogenerated": false,
"ratio": 3.331103678929766,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9482118695745845,
"avg_score": 0.007447599036784284,
"num_lines": 49
} |
from Instruction import Instruction
import unittest
from Stack import StackStateException
from Instructions.Instruction import register
from Variable import Variable
class add(Instruction):
def __init__(self, arguments):
self.name = 'add'
self.opcode = 0x58
def execute(self, vm):
stack = vm.stack
if stack.get_frame_count() < 2:
raise StackStateException('Not enough values on the stack')
rhs = stack.pop().value
lhs = stack.pop().value
stack.push(Variable(lhs + rhs))
register('add', add)
class addTest(unittest.TestCase):
def test_execute_notEnoughStackValues(self):
from VM import VM
vm = VM()
vm.stack.push(Variable(1))
x = add('')
self.assertRaises(StackStateException, x.execute, vm)
def test_execute_ints(self):
from VM import VM
vm = VM()
vm.stack.push(Variable(5))
vm.stack.push(Variable(999))
x = add('')
x.execute(vm)
self.assertEqual(vm.stack.count(), 1)
self.assertEqual(vm.stack.pop().value, 999+5)
def test_execute_floats(self):
from VM import VM
vm = VM()
vm.stack.push(Variable(123.4))
vm.stack.push(Variable(0.01))
x = add('')
x.execute(vm)
self.assertEqual(vm.stack.count(), 1)
self.assertEqual(vm.stack.pop().value, 123.4 + 0.01)
| {
"repo_name": "martydill/PyCIL",
"path": "src/Instructions/add.py",
"copies": "1",
"size": "1511",
"license": "bsd-2-clause",
"hash": -8000691601365797000,
"line_mean": 24.1833333333,
"line_max": 71,
"alpha_frac": 0.6101919259,
"autogenerated": false,
"ratio": 3.730864197530864,
"config_test": true,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.4841056123430864,
"avg_score": null,
"num_lines": null
} |
# Add Python code
from common.methods import set_progress
"""
Sample for appending any-any edge firewall rule with HTTP and HTTPS
"""
def run(job, resources=None, **kwargs):
"""
`resources` is a queryset of length 1 containing the resource being operated on.
"""
resource = resources.first()
# Get the resource handler from the network environment
network = resource.servicenetwork_set.first()
environment = network.environment
vcenter = environment.resource_handler.cast()
# Get firewall config for service edge device
firewall_url = "api/4.0/edges/{}/firewall/config".format(network.appliance_identifier)
nsx_api_wrapper = vcenter.nsx_endpoint_api_wrapper()
# Generate firewall rules
rules_xml = "<firewallRules>"
rules_xml += """
<firewallRule>
<name>Web</name>
<ruleType>user</ruleType>
<enabled>true</enabled>
<description>Web any-any rule</description>
<action>accept</action>
<source>
<exclude>false</exclude>
<vnicGroupId>external</vnicGroupId>
</source>
<destination>
<exclude>false</exclude>
<vnicGroupId>vse</vnicGroupId>
</destination>
<application>
<applicationId>application-77</applicationId>
<applicationId>application-239</applicationId>
</application>
</firewallRule>
"""
rules_xml += "</firewallRules>"
# Push firewall rules
nsx_api_wrapper.request("POST", firewall_url + '/rules', rules_xml, "text/xml")
xml = nsx_api_wrapper.get(firewall_url)
set_progress(xml)
return 'SUCCESS', '', ''
| {
"repo_name": "CloudBoltSoftware/cloudbolt-forge",
"path": "actions/service/nsx_edge_firewall_rule_append/edge_fw_rule_append.py",
"copies": "1",
"size": "1747",
"license": "apache-2.0",
"hash": 9222777814642951000,
"line_mean": 31.5961538462,
"line_max": 90,
"alpha_frac": 0.6101888952,
"autogenerated": false,
"ratio": 4.219806763285024,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.5329995658485024,
"avg_score": null,
"num_lines": null
} |
"""Add Python to the search path on Windows
This is a simple script to add Python to the Windows search path. It
modifies the current user (HKCU) tree of the registry.
Copyright (c) 2008 by Christian Heimes <christian@cheimes.de>
Licensed to PSF under a Contributor Agreement.
"""
import sys
import site
import os
import winreg
HKCU = winreg.HKEY_CURRENT_USER
ENV = "Environment"
PATH = "PATH"
DEFAULT = "%PATH%"
def modify():
pythonpath = os.path.dirname(os.path.normpath(sys.executable))
scripts = os.path.join(pythonpath, "Scripts")
appdata = os.environ["APPDATA"]
if hasattr(site, "USER_SITE"):
usersite = site.USER_SITE.replace(appdata, "%APPDATA%")
userpath = os.path.dirname(usersite)
userscripts = os.path.join(userpath, "Scripts")
else:
userscripts = None
with winreg.CreateKey(HKCU, ENV) as key:
try:
envpath = winreg.QueryValueEx(key, PATH)[0]
except OSError:
envpath = DEFAULT
paths = [envpath]
for path in (pythonpath, scripts, userscripts):
if path and path not in envpath and os.path.isdir(path):
paths.append(path)
envpath = os.pathsep.join(paths)
winreg.SetValueEx(key, PATH, 0, winreg.REG_EXPAND_SZ, envpath)
return paths, envpath
def main():
paths, envpath = modify()
if len(paths) > 1:
print("Path(s) added:")
print('\n'.join(paths[1:]))
else:
print("No path was added")
print("\nPATH is now:\n%s\n" % envpath)
print("Expanded:")
print(winreg.ExpandEnvironmentStrings(envpath))
if __name__ == '__main__':
main()
| {
"repo_name": "wanliming11/MurlocAlgorithms",
"path": "Last/OpenSource/Python-3.6.1/Tools/scripts/win_add2path.py",
"copies": "27",
"size": "1658",
"license": "mit",
"hash": -5758703966863306000,
"line_mean": 27.5862068966,
"line_max": 70,
"alpha_frac": 0.6351025332,
"autogenerated": false,
"ratio": 3.527659574468085,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 1,
"avg_score": null,
"num_lines": null
} |
"""Add Python to the search path on Windows
This is a simple script to add Python to the Windows search path. It
modifies the current user (HKCU) tree of the registry.
Copyright (c) 2008 by Christian Heimes <christian@cheimes.de>
Licensed to PSF under a Contributor Agreement.
"""
import sys
import site
import os
import _winreg
HKCU = _winreg.HKEY_CURRENT_USER
ENV = "Environment"
PATH = "PATH"
DEFAULT = u"%PATH%"
def modify():
pythonpath = os.path.dirname(os.path.normpath(sys.executable))
scripts = os.path.join(pythonpath, "Scripts")
appdata = os.environ["APPDATA"]
if hasattr(site, "USER_SITE"):
userpath = site.USER_SITE.replace(appdata, "%APPDATA%")
userscripts = os.path.join(userpath, "Scripts")
else:
userscripts = None
with _winreg.CreateKey(HKCU, ENV) as key:
try:
envpath = _winreg.QueryValueEx(key, PATH)[0]
except WindowsError:
envpath = DEFAULT
paths = [envpath]
for path in (pythonpath, scripts, userscripts):
if path and path not in envpath and os.path.isdir(path):
paths.append(path)
envpath = os.pathsep.join(paths)
_winreg.SetValueEx(key, PATH, 0, _winreg.REG_EXPAND_SZ, envpath)
return paths, envpath
def main():
paths, envpath = modify()
if len(paths) > 1:
print "Path(s) added:"
print '\n'.join(paths[1:])
else:
print "No path was added"
print "\nPATH is now:\n%s\n" % envpath
print "Expanded:"
print _winreg.ExpandEnvironmentStrings(envpath)
if __name__ == '__main__':
main()
| {
"repo_name": "MattDevo/edk2",
"path": "AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/win_add2path.py",
"copies": "12",
"size": "1677",
"license": "bsd-2-clause",
"hash": 3918935948949015600,
"line_mean": 27.4210526316,
"line_max": 72,
"alpha_frac": 0.6141920095,
"autogenerated": false,
"ratio": 3.5454545454545454,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 1,
"avg_score": 0.003145684724632093,
"num_lines": 57
} |
"""Add QB Time Line Table
Revision ID: 9026af5fe040
Revises: 883fd1095361
Create Date: 2018-11-28 06:39:34.215999
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '9026af5fe040'
down_revision = 'e5aec2aebe7e'
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table(
'qb_timeline',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('at', sa.DateTime(), nullable=False),
sa.Column('qb_id', sa.Integer(), nullable=True),
sa.Column('qb_recur_id', sa.Integer(), nullable=True),
sa.Column('qb_iteration', sa.Integer(), nullable=True),
sa.Column('status', sa.Enum(
'completed', 'due', 'expired', 'overdue',
'partially_completed', 'in_progress', 'withdrawn',
name='overallstatus'), nullable=False),
sa.ForeignKeyConstraint(
['qb_id'], ['questionnaire_banks.id'], ondelete='cascade'),
sa.ForeignKeyConstraint(
['qb_recur_id'], ['recurs.id'], ondelete='cascade'),
sa.ForeignKeyConstraint(
['user_id'], ['users.id'], ondelete='cascade'),
sa.PrimaryKeyConstraint('id'))
op.create_index(
op.f('ix_qb_timeline_at'), 'qb_timeline', ['at'], unique=False)
op.create_index(
op.f('ix_qb_timeline_status'), 'qb_timeline', ['status'],
unique=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_qb_timeline_status'), table_name='qb_timeline')
op.drop_index(op.f('ix_qb_timeline_at'), table_name='qb_timeline')
op.drop_table('qb_timeline')
op.execute("DROP TYPE overallstatus")
# ### end Alembic commands ###
| {
"repo_name": "uwcirg/true_nth_usa_portal",
"path": "portal/migrations/versions/9026af5fe040_.py",
"copies": "1",
"size": "1867",
"license": "bsd-3-clause",
"hash": 1289511942001310200,
"line_mean": 35.6078431373,
"line_max": 74,
"alpha_frac": 0.6138189609,
"autogenerated": false,
"ratio": 3.470260223048327,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.4584079183948327,
"avg_score": null,
"num_lines": null
} |
"""Add qc_status to genomic_set_member for AW4.
Revision ID: 994dfe6e53ee
Revises: 2e1d3f329efd
Create Date: 2020-09-28 14:31:44.732565
"""
from alembic import op
import sqlalchemy as sa
import rdr_service.model.utils
# revision identifiers, used by Alembic.
from rdr_service.genomic_enums import GenomicQcStatus
revision = '994dfe6e53ee'
down_revision = '2e1d3f329efd'
branch_labels = None
depends_on = None
def upgrade(engine_name):
globals()["upgrade_%s" % engine_name]()
def downgrade(engine_name):
globals()["downgrade_%s" % engine_name]()
def upgrade_rdr():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('genomic_set_member',
sa.Column('qc_status', rdr_service.model.utils.Enum(GenomicQcStatus), nullable=True))
op.add_column('genomic_set_member_history',
sa.Column('qc_status', rdr_service.model.utils.Enum(GenomicQcStatus), nullable=True))
# ### end Alembic commands ###
def downgrade_rdr():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('genomic_set_member', 'qc_status')
op.drop_column('genomic_set_member_history', 'qc_status')
# ### end Alembic commands ###
def upgrade_metrics():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
def downgrade_metrics():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
| {
"repo_name": "all-of-us/raw-data-repository",
"path": "rdr_service/alembic/versions/994dfe6e53ee_add_qc_status_to_genomic_set_member_for_.py",
"copies": "1",
"size": "1492",
"license": "bsd-3-clause",
"hash": 7368381596196990000,
"line_mean": 26.1272727273,
"line_max": 103,
"alpha_frac": 0.6722520107,
"autogenerated": false,
"ratio": 3.243478260869565,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.4415730271569565,
"avg_score": null,
"num_lines": null
} |
addr = 0
registers = {'a': 0, 'b': 0, 'c': 0, 'd': 0}
instructions = [line.split() for line in open('input.txt', 'r')]
def cpy(x, y):
if y not in registers:
return
registers[y] = registers[x] if x in registers else int(x)
def inc(x):
registers[x] += 1
def dec(x):
registers[x] -= 1
def jnz(x, y):
global addr
if x != '0' and (x not in registers or registers[x] != 0):
addr += registers[y] if y in registers else int(y)
else:
addr += 1
def out(x):
if x in registers:
return registers[x]
else:
return int(x)
initA = 0
output = None
counter = 0
while addr < len(instructions):
line = instructions[addr]
if line[0] == 'cpy':
cpy(line[1], line[2])
addr += 1
elif line[0] == 'inc':
inc(line[1])
addr += 1
elif line[0] == 'dec':
dec(line[1])
addr += 1
elif line[0] == 'jnz':
jnz(line[1], line[2])
elif line[0] == 'out':
nextOut = out(line[1])
if (output == None and nextOut not in (0, 1)) or (output == 0 and nextOut != 1) or (output == 1 and nextOut != 0):
initA += 1
output = None
addr = counter = 0
registers = {'a': initA, 'b': 0, 'c': 0, 'd': 0}
else:
counter += 1
if counter > 200:
break
output = nextOut
addr += 1
print(initA)
input()
| {
"repo_name": "ultramega/adventofcode2016",
"path": "day25/part1.py",
"copies": "1",
"size": "1435",
"license": "unlicense",
"hash": -1172018382836329000,
"line_mean": 22.5245901639,
"line_max": 122,
"alpha_frac": 0.4885017422,
"autogenerated": false,
"ratio": 3.188888888888889,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.41773906310888886,
"avg_score": null,
"num_lines": null
} |
addr = 0
registers = {'a': 12, 'b': 0, 'c': 0, 'd': 0}
instructions = [line.split() for line in open('input2.txt', 'r')]
toggleMap = {'inc': 'dec', 'dec': 'inc', 'tgl': 'inc', 'cpy': 'jnz', 'jnz': 'cpy', 'mul': 'mul', 'nop': 'nop'}
def cpy(x, y):
if y not in registers:
return
registers[y] = registers[x] if x in registers else int(x)
def inc(x):
registers[x] += 1
def dec(x):
registers[x] -= 1
def jnz(x, y):
global addr
if x != '0' and (x not in registers or registers[x] != 0):
addr += registers[y] if y in registers else int(y)
else:
addr += 1
def tgl(x):
global addr
target = addr + (registers[x] if x in registers else int(x))
if 0 <= target < len(instructions):
instructions[target][0] = toggleMap[instructions[target][0]]
def mul(x, y, z):
a = registers[x] if x in registers else int(x)
b = registers[y] if y in registers else int(y)
registers[z] = a * b
while addr < len(instructions):
line = instructions[addr]
if line[0] == 'cpy':
cpy(line[1], line[2])
addr += 1
elif line[0] == 'inc':
inc(line[1])
addr += 1
elif line[0] == 'dec':
dec(line[1])
addr += 1
elif line[0] == 'jnz':
jnz(line[1], line[2])
elif line[0] == 'tgl':
tgl(line[1])
addr += 1
elif line[0] == 'mul':
mul(*line[1:])
addr += 1
else:
addr += 1
print(registers['a'])
input()
| {
"repo_name": "ultramega/adventofcode2016",
"path": "day23/part2.py",
"copies": "1",
"size": "1473",
"license": "unlicense",
"hash": -4334157170070256600,
"line_mean": 23.9661016949,
"line_max": 110,
"alpha_frac": 0.5213849287,
"autogenerated": false,
"ratio": 2.9519038076152304,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.8928222678955462,
"avg_score": 0.009013211471953667,
"num_lines": 59
} |
addr = 0
registers = {'a': 7, 'b': 0, 'c': 0, 'd': 0}
instructions = [line.split() for line in open('input.txt', 'r')]
toggleMap = {'inc': 'dec', 'dec': 'inc', 'tgl': 'inc', 'cpy': 'jnz', 'jnz': 'cpy'}
def cpy(x, y):
if y not in registers:
return
registers[y] = registers[x] if x in registers else int(x)
def inc(x):
registers[x] += 1
def dec(x):
registers[x] -= 1
def jnz(x, y):
global addr
if x != '0' and (x not in registers or registers[x] != 0):
addr += registers[y] if y in registers else int(y)
else:
addr += 1
def tgl(x):
global addr
target = addr + (registers[x] if x in registers else int(x))
if 0 <= target < len(instructions):
instructions[target][0] = toggleMap[instructions[target][0]]
while addr < len(instructions):
line = instructions[addr]
if line[0] == 'cpy':
cpy(line[1], line[2])
addr += 1
elif line[0] == 'inc':
inc(line[1])
addr += 1
elif line[0] == 'dec':
dec(line[1])
addr += 1
elif line[0] == 'jnz':
jnz(line[1], line[2])
elif line[0] == 'tgl':
tgl(line[1])
addr += 1
print(registers['a'])
input()
| {
"repo_name": "ultramega/adventofcode2016",
"path": "day23/part1.py",
"copies": "1",
"size": "1201",
"license": "unlicense",
"hash": 5470859333623032000,
"line_mean": 23.5102040816,
"line_max": 82,
"alpha_frac": 0.5270607827,
"autogenerated": false,
"ratio": 2.958128078817734,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.3985188861517734,
"avg_score": null,
"num_lines": null
} |
"""add random_id for users, productions and performances
Revision ID: 11680e8c4bf
Revises: 48567f3faf
Create Date: 2015-03-11 20:29:18.326587
"""
# revision identifiers, used by Alembic.
revision = '11680e8c4bf'
down_revision = '48567f3faf'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.execute('CREATE SEQUENCE random_id_seq')
op.execute('''
-- Return an id which is a hybrid of sequential and
-- random values.
CREATE OR REPLACE FUNCTION random_id() RETURNS bigint AS $$
DECLARE
epoch bigint := 13149;
rnd_portion bigint;
seq_portion bigint;
BEGIN
seq_portion := epoch + nextval('random_id_seq');
rnd_portion := trunc((random() * 9999) + 1);
return (seq_portion * 10000) + rnd_portion;
END
$$ LANGUAGE plpgsql;
''')
op.alter_column('users', 'id', server_default=sa.text('random_id()'))
op.alter_column('productions', 'id', server_default=sa.text('random_id()'))
op.alter_column('performances', 'id', server_default=sa.text('random_id()'))
def downgrade():
op.alter_column('users', 'id', server_default=None)
op.alter_column('productions', 'id', server_default=None)
op.alter_column('performances', 'id', server_default=None)
op.execute('DROP FUNCTION random_id()')
op.execute('DROP SEQUENCE random_id_seq')
| {
"repo_name": "rjw57/cubbie",
"path": "migrations/versions/11680e8c4bf_add_random_id_for_users.py",
"copies": "1",
"size": "1299",
"license": "mit",
"hash": -132758004405863950,
"line_mean": 29.2093023256,
"line_max": 80,
"alpha_frac": 0.688221709,
"autogenerated": false,
"ratio": 3.092857142857143,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.4281078851857143,
"avg_score": null,
"num_lines": null
} |
"""Add ranking data to participants table
Revision ID: 451d4bb125cb
Revises: 49be2190c22d
Create Date: 2017-11-10 13:57:37.807238+00:00
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '451d4bb125cb'
down_revision = '49be2190c22d'
branch_labels = None
depends_on = None
def upgrade():
op.add_column(
"game_participant",
sa.Column('mu', mysql.FLOAT(),
nullable=True),
)
op.add_column(
"game_participant",
sa.Column('sigma',
mysql.FLOAT(unsigned=True),
nullable=True),
)
op.add_column(
"game_participant",
sa.Column('leaderboard_rank',
mysql.SMALLINT(display_width=5),
autoincrement=False,
nullable=True),
)
def downgrade():
op.drop_column("game_participant", "mu")
op.drop_column("game_participant", "sigma")
op.drop_column("game_participant", "leaderboard_rank")
| {
"repo_name": "HaliteChallenge/Halite-II",
"path": "apiserver/alembic/versions/201711101357_451d4bb125cb_add_ranking_data_to_participants_table.py",
"copies": "1",
"size": "1055",
"license": "mit",
"hash": 1322590390178205700,
"line_mean": 22.9772727273,
"line_max": 58,
"alpha_frac": 0.6123222749,
"autogenerated": false,
"ratio": 3.5762711864406778,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.46885934613406777,
"avg_score": null,
"num_lines": null
} |
from __future__ import print_function, absolute_import, division
import sys
import os
import argparse
###############################################################################
# FUNCTION DEFINITIONS
###############################################################################
def check_file(file_path, directory_path=None):
"""
Check if file exists.
"""
if directory_path:
file_path = os.path.join(directory_path, file_path)
return os.path.isfile(file_path)
###############################################################################
# ARGUMENT PARSING
###############################################################################
desc = "Add RAST annotation information to sequence headers, output to stdout"
parser = argparse.ArgumentParser(description=desc)
parser.add_argument("fasta", help="FASTA file")
parser.add_argument("rast", help="RAST protein annotation file")
parser.add_argument("--no_header", action="store_true",
help="Flag if RAST file has not header")
parser.add_argument("--skip_seqs", action="store_true",
help="Flag to not print out sequences not found in RAST")
args = parser.parse_args()
# Check if files exists
if not check_file(args.fasta):
sys.exit("FASTA file (" + args.fasta + ") does not exist")
if not check_file(args.rast):
sys.exit("RAST file (" + args.rast + ") does not exist")
# Read in annotation file and make PEG -> annotation dictionary
rastData = {}
with open(args.rast, "r") as f:
if not args.no_header:
# Skip header
header = f.readline()
for l in f:
data = l.rstrip("\n").split("\t")
pegID = data[0]
function = data[8]
if pegID in rastData:
print("Warning:", pegID, "already seen. Skipping.",
file=sys.stderr)
continue
rastData[pegID] = function
# Iterate through FASTA file
# Keep track of number of sequences and number of sequences not found
numNotFound = 0
numSequences = 0
skip = False # Flag to skip sequences if the ID was not found in the RAST data
with open(args.fasta, "r") as f:
for l in f:
l = l.rstrip("\n")
if l.startswith(">"):
skip = False
numSequences += 1
# Extract the sequence ID
seqID = l[1:]
# Check if sequence ID exists in RAST file
if seqID in rastData:
print(">{}_{}".format(seqID, rastData[seqID]))
# Print out warning message if not found
else:
print("Warning: sequence", seqID, "not found in RAST file",
file=sys.stderr)
numNotFound += 1
# Check if we want to print out the sequence or not
if args.skip_seqs:
skip = True
else:
print(l)
elif not skip:
print(l.upper())
if numNotFound > 0:
print("There were", numNotFound, "out of", numSequences,
"sequences not found in RAST file", file=sys.stderr)
print("Script complete", file=sys.stderr)
| {
"repo_name": "dacuevas/bioinformatics",
"path": "rast/add_rast_anno.py",
"copies": "1",
"size": "3326",
"license": "mit",
"hash": 3050428830669168600,
"line_mean": 32.26,
"line_max": 79,
"alpha_frac": 0.5478051714,
"autogenerated": false,
"ratio": 4.141967621419676,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.5189772792819676,
"avg_score": null,
"num_lines": null
} |
"""add reason to measurement
Revision ID: e6605d4b0dba
Revises: 2b328e8e5eb8
Create Date: 2018-09-28 11:23:58.812115
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "e6605d4b0dba"
down_revision = "2b328e8e5eb8"
branch_labels = None
depends_on = None
def upgrade(engine_name):
globals()["upgrade_%s" % engine_name]()
def downgrade(engine_name):
globals()["downgrade_%s" % engine_name]()
def upgrade_rdr():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column("physical_measurements", sa.Column("reason", sa.UnicodeText(), nullable=True))
# ### end Alembic commands ###
def downgrade_rdr():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column("physical_measurements", "reason")
# ### end Alembic commands ###
def upgrade_metrics():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
def downgrade_metrics():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
| {
"repo_name": "all-of-us/raw-data-repository",
"path": "rdr_service/alembic/versions/e6605d4b0dba_add_reason_to_measurement.py",
"copies": "1",
"size": "1125",
"license": "bsd-3-clause",
"hash": -4326717021576476700,
"line_mean": 22.9361702128,
"line_max": 96,
"alpha_frac": 0.6675555556,
"autogenerated": false,
"ratio": 3.5046728971962615,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9671131721056845,
"avg_score": 0.00021934634788330773,
"num_lines": 47
} |
"""Add receiving, shipping and inventory_transaction related tables
Revision ID: 1b3411739b82
Revises: 7b2d863b105
Create Date: 2015-07-03 21:45:51.072263
"""
# revision identifiers, used by Alembic.
revision = '1b3411739b82'
down_revision = '7b2d863b105'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.create_table('inventory_transaction',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('date', sa.DateTime(), nullable=False),
sa.Column('type_id', sa.Integer(), nullable=False),
sa.Column('remark', sa.Text(), nullable=True),
sa.ForeignKeyConstraint(['type_id'], ['enum_values.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('inventory_transaction_line',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('in_transit_quantity', sa.Numeric(precision=8, scale=2, decimal_return_scale=2), nullable=True),
sa.Column('quantity', sa.Numeric(precision=8, scale=2, decimal_return_scale=2), nullable=True),
sa.Column('product_id', sa.Integer(), nullable=False),
sa.Column('price', sa.Numeric(precision=8, scale=2, decimal_return_scale=2), nullable=False),
sa.Column('remark', sa.Text(), nullable=True),
sa.Column('inventory_transaction_id', sa.Integer(), nullable=False),
sa.ForeignKeyConstraint(['inventory_transaction_id'], ['inventory_transaction.id'], ),
sa.ForeignKeyConstraint(['product_id'], ['product.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('receiving',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('date', sa.DateTime(), nullable=False),
sa.Column('remark', sa.Text(), nullable=True),
sa.Column('status_id', sa.Integer(), nullable=False),
sa.Column('purchase_order_id', sa.Integer(), nullable=False),
sa.Column('inventory_transaction_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['purchase_order_id'], ['purchase_order.id'], ),
sa.ForeignKeyConstraint(['inventory_transaction_id'], ['inventory_transaction.id'], ),
sa.ForeignKeyConstraint(['status_id'], ['enum_values.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('receiving_line',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('quantity', sa.Numeric(precision=8, scale=2, decimal_return_scale=2), nullable=False),
sa.Column('price', sa.Numeric(precision=8, scale=2, decimal_return_scale=2), nullable=False),
sa.Column('product_id', sa.Integer(), nullable=False),
sa.Column('receiving_id', sa.Integer(), nullable=False),
sa.Column('purchase_order_line_id', sa.Integer(), nullable=False),
sa.Column('inventory_transaction_line_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['product_id'], ['product.id'], ),
sa.ForeignKeyConstraint(['purchase_order_line_id'], ['purchase_order_line.id'], ),
sa.ForeignKeyConstraint(['inventory_transaction_line_id'], ['inventory_transaction_line.id'], ),
sa.ForeignKeyConstraint(['receiving_id'], ['receiving.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('shipping',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('date', sa.DateTime(), nullable=False),
sa.Column('remark', sa.Text(), nullable=True),
sa.Column('status_id', sa.Integer(), nullable=False),
sa.Column('sales_order_id', sa.Integer(), nullable=False),
sa.Column('inventory_transaction_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['inventory_transaction_id'], ['inventory_transaction.id'], ),
sa.ForeignKeyConstraint(['sales_order_id'], ['sales_order.id'], ),
sa.ForeignKeyConstraint(['status_id'], ['enum_values.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_table('shipping_line',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('quantity', sa.Numeric(precision=8, scale=2, decimal_return_scale=2), nullable=False),
sa.Column('price', sa.Numeric(precision=8, scale=2, decimal_return_scale=2), nullable=False),
sa.Column('product_id', sa.Integer(), nullable=False),
sa.Column('shipping_id', sa.Integer(), nullable=False),
sa.Column('sales_order_line_id', sa.Integer(), nullable=False),
sa.Column('inventory_transaction_line_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['inventory_transaction_line_id'], ['inventory_transaction_line.id'], ),
sa.ForeignKeyConstraint(['sales_order_line_id'], ['sales_order_line.id'], ),
sa.ForeignKeyConstraint(['product_id'], ['product.id'], ),
sa.ForeignKeyConstraint(['shipping_id'], ['shipping.id'], ),
sa.PrimaryKeyConstraint('id')
)
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_table('shipping_line')
op.drop_table('shipping')
op.drop_table('receiving_line')
op.drop_table('receiving')
op.drop_table('inventory_transaction_line')
op.drop_table('inventory_transaction')
### end Alembic commands ###
| {
"repo_name": "betterlife/psi",
"path": "psi/migrations/versions/06_1b3411739b82_.py",
"copies": "2",
"size": "5031",
"license": "mit",
"hash": -5854749377444286000,
"line_mean": 48.3235294118,
"line_max": 110,
"alpha_frac": 0.6797853309,
"autogenerated": false,
"ratio": 3.55045871559633,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.5230244046496331,
"avg_score": null,
"num_lines": null
} |
"""Add recipient_id to email_messages table and populate
Revision ID: 677b8b841cb3
Revises: da6506c5899a
Create Date: 2019-10-23 11:36:41.947859
"""
from alembic import op
import logging
import re
import sqlalchemy as sa
from sqlalchemy.orm import sessionmaker
from sqlalchemy.sql import text
from portal.models.audit import Audit
from portal.models.message import EmailMessage
from portal.models.user import User
# revision identifiers, used by Alembic.
revision = '677b8b841cb3'
down_revision = 'da6506c5899a'
logger = logging.getLogger("alembic")
Session = sessionmaker()
def upgrade():
op.add_column(
'email_messages',
sa.Column('recipient_id', sa.Integer(), nullable=True))
op.create_foreign_key(
'email_messages_recipient_id_fkey',
'email_messages',
'users',
['recipient_id'],
['id'],
ondelete='CASCADE')
session = Session(bind=op.get_bind())
# Email messages generate an audit row, holding the subject_id.
# Build a dictionary for lookup below when the current email doesn't match
old_address_dict = dict()
for adt in session.query(Audit).filter(Audit.comment.like('EmailMessage %')):
finds = re.match(
r"EmailMessage\ .*?sent\ to\ (.*?)\ from .*", adt.comment)
if finds.groups():
old_address_dict[finds.groups()[0].lower()] = adt.subject_id
# nested query kills runtime - cache current user-email list
emails_to_user_id = dict()
for u in session.query(User).filter(
User.deleted_id.is_(None)).with_entities(User.id, User.email):
emails_to_user_id[u.email.lower()] = u.id
# Populate the recipient_id as best we can.
# SQLA doesn't like changes inside a query - store intent in dict
change_em = dict()
for em in session.query(EmailMessage).filter(
EmailMessage.recipients != 'help.truenthusa@movember.com'):
if ',' in em.recipients:
raise ValueError("can't handle multiple recipients")
# always use lowercase addresses for comparison
recipients = em.recipients.lower()
# First, eliminate all that have a matching current email
if recipients in emails_to_user_id:
change_em[em.id] = emails_to_user_id[recipients]
continue
# Next, see if address can be found in the old_address_dict
if recipients in old_address_dict:
change_em[em.id] = old_address_dict[recipients]
continue
logging.warning("no match for {} to {}".format(
em.subject, em.recipients))
logging.info("found {} gaining recipient_id".format(len(change_em)))
conn = op.get_bind()
for email_message_id, recipient_id in change_em.items():
stmt = (
"UPDATE email_messages SET recipient_id=:recipient_id "
"WHERE id=:email_message_id")
conn.execute(
text(stmt),
email_message_id=email_message_id,
recipient_id=recipient_id)
def downgrade():
op.drop_constraint(
'email_messages_recipient_id_fkey',
'email_messages', type_='foreignkey')
op.drop_column('email_messages', 'recipient_id')
| {
"repo_name": "uwcirg/true_nth_usa_portal",
"path": "portal/migrations/versions/677b8b841cb3_.py",
"copies": "1",
"size": "3202",
"license": "bsd-3-clause",
"hash": -5163088252173919000,
"line_mean": 32.7052631579,
"line_max": 81,
"alpha_frac": 0.6467832605,
"autogenerated": false,
"ratio": 3.753810082063306,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9899951494039557,
"avg_score": 0.00012836970474967908,
"num_lines": 95
} |
"""add_records - Add information to results about when a new record was reached
Usage:
foo | addrecords client_count | search record=*
"""
import sys,splunk.Intersplunk
import re
try:
keywords, options = splunk.Intersplunk.getKeywordsAndOptions()
field = "_raw"
if keywords:
field = keywords[0]
results,dummyresults,settings = splunk.Intersplunk.getOrganizedResults()
results.sort(key=lambda x: x['_time'])
max = 0
last_record_time = None
since_record = 0
consecutive_records = 0
for r in results:
if field not in r:
continue
try :
value = float(r[field])
except ValueError:
continue
if value > max:
r['record'] = True
r['since_record'] = since_record
r['increase'] = value - max
r['last_record'] = last_record_time
r['consecutive_records'] = consecutive_records
max = value
last_record_time = r['_time']
since_record = 1
consecutive_records += 1
else :
since_record += 1
consecutive_records = 0
results.sort(key=lambda x: x['_time'], reverse=True)
except:
import traceback
stack = traceback.format_exc()
results = splunk.Intersplunk.generateErrorResults("Error : Traceback: " + str(stack))
splunk.Intersplunk.outputResults( results )
| {
"repo_name": "Frende/splunk-scripts",
"path": "addrecords.py",
"copies": "3",
"size": "1418",
"license": "mit",
"hash": 6088254507442567000,
"line_mean": 26.8039215686,
"line_max": 89,
"alpha_frac": 0.5952045134,
"autogenerated": false,
"ratio": 4.01699716713881,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 1,
"avg_score": 0.008629007158418923,
"num_lines": 51
} |
"""Add reference for a grating coupler array."""
from typing import List
import pp
from pp.component import ComponentReference
from pp.port import Port
from pp.routing.manhattan import round_corners
from pp.types import ComponentFactory
def gen_loopback(
start_port: Port,
end_port: Port,
gc: ComponentFactory,
grating_separation: float = 127.0,
gc_rotation: int = -90,
gc_port_name: str = "W0",
bend_radius_align_ports: float = 10.0,
bend_factory: ComponentFactory = pp.components.bend_euler,
straight_factory: ComponentFactory = pp.components.straight,
y_bot_align_route: None = None,
) -> List[ComponentReference]:
"""
Add a loopback (grating coupler align reference) to a start port and and end port
Input grating generated on the left of start_port
Output grating generated on the right of end_port
.. code::
__________________________________________
| separation | | |
| | | |
GC start_port end_port GC
"""
gc = gc() if callable(gc) else gc
if hasattr(start_port, "y"):
y0 = start_port.y
else:
y0 = start_port[1]
if hasattr(start_port, "x"):
x0 = start_port.x - grating_separation
else:
x0 = start_port[0] - grating_separation
if hasattr(end_port, "x"):
x1 = end_port.x + grating_separation
else:
x1 = end_port[0] + grating_separation
gca1, gca2 = [
gc.ref(position=(x, y0), rotation=gc_rotation, port_id=gc_port_name)
for x in [x0, x1]
]
gsi = gc.size_info
p0 = gca1.ports[gc_port_name].position
p1 = gca2.ports[gc_port_name].position
bend90 = bend_factory(radius=bend_radius_align_ports)
if hasattr(bend90, "dx"):
a = abs(bend90.dy)
else:
a = bend_radius_align_ports + 0.5
b = max(2 * a, grating_separation / 2)
y_bot_align_route = (
y_bot_align_route if y_bot_align_route is not None else -gsi.width - 5.0
)
points = [
p0,
p0 + (0, a),
p0 + (b, a),
p0 + (b, y_bot_align_route),
p1 + (-b, y_bot_align_route),
p1 + (-b, a),
p1 + (0, a),
p1,
]
route = round_corners(
points=points, bend_factory=bend90, straight_factory=straight_factory
)
elements = [gca1, gca2]
elements.extend(route.references)
return elements
@pp.cell
def straight_with_loopback() -> pp.Component:
c = pp.Component("straight_with_loopback")
wg = c << pp.components.straight()
c.add(
gen_loopback(
wg.ports["W0"], wg.ports["E0"], gc=pp.components.grating_coupler_te
)
)
return c
if __name__ == "__main__":
component = straight_with_loopback()
component.show()
| {
"repo_name": "gdsfactory/gdsfactory",
"path": "pp/add_loopback.py",
"copies": "1",
"size": "2845",
"license": "mit",
"hash": -5945152039640318000,
"line_mean": 26.0952380952,
"line_max": 85,
"alpha_frac": 0.5711775044,
"autogenerated": false,
"ratio": 3.236632536973834,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.4307810041373834,
"avg_score": null,
"num_lines": null
} |
"""Add refnos to threads
Revision ID: ffcec420c0bd
Revises: ac1680bc48
Create Date: 2016-07-17 18:40:09.411372
"""
# revision identifiers, used by Alembic.
from sqlalchemy.orm import Session
from uchan.lib.ormmodel import BoardOrmModel
from uchan.lib.ormmodel import ThreadOrmModel
revision = 'ffcec420c0bd'
down_revision = 'ac1680bc48'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('board', sa.Column('refno_counter', sa.Integer(), nullable=False, server_default='1'))
op.add_column('thread', sa.Column('refno', sa.Integer(), nullable=False, server_default='1'))
op.create_index(op.f('ix_thread_refno'), 'thread', ['refno'], unique=False)
# Adds refnos to each thread, and sets the refno_counter of the board to the last one set
print('Changing to thread refnos!')
db = Session(bind=op.get_bind())
boards = db.query(BoardOrmModel).all()
for board in boards:
print('Changing board {}'.format(board.name))
threads = db.query(ThreadOrmModel).filter(ThreadOrmModel.board_id == board.id).order_by(ThreadOrmModel.id.asc())
refno = 1
for thread in threads:
thread.refno = refno
refno += 1
board.refno_counter = refno
db.commit()
print('Removing defaults...')
# Remove the default again, it has to be manually set on new models
op.alter_column('board', 'refno_counter', server_default=None)
op.alter_column('thread', 'refno', server_default=None)
print('Done')
def downgrade():
op.drop_index(op.f('ix_thread_refno'), table_name='thread')
op.drop_column('thread', 'refno')
op.drop_column('board', 'refno_counter')
| {
"repo_name": "Floens/uchan",
"path": "migrations/versions/ffcec420c0bd_add_refnos_to_threads.py",
"copies": "1",
"size": "1726",
"license": "mit",
"hash": -7974569169701197000,
"line_mean": 29.8214285714,
"line_max": 120,
"alpha_frac": 0.6796060255,
"autogenerated": false,
"ratio": 3.244360902255639,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.4423966927755639,
"avg_score": null,
"num_lines": null
} |
"""add_refs
Revision ID: 8536b0fcf0a2
Revises: 1782e8a9f689
Create Date: 2019-11-22 11:50:53.872660
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = "8536b0fcf0a2"
down_revision = "1782e8a9f689"
branch_labels = ()
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column("build", sa.Column("ref", sa.String(), nullable=True))
op.add_column(
"build", sa.Column("revision_sha", sa.String(length=40), nullable=True)
)
op.alter_column(
"build", "source_id", existing_type=postgresql.UUID(), nullable=True
)
op.create_index(
"idx_build_repo_sha", "build", ["repository_id", "revision_sha"], unique=False
)
op.create_foreign_key(
None,
"build",
"revision",
["repository_id", "revision_sha"],
["repository_id", "sha"],
)
op.add_column("change_request", sa.Column("head_ref", sa.String(), nullable=True))
op.add_column("change_request", sa.Column("parent_ref", sa.String(), nullable=True))
op.alter_column(
"change_request",
"parent_revision_sha",
existing_type=sa.VARCHAR(length=40),
nullable=True,
)
op.add_column("patch", sa.Column("parent_ref", sa.String(), nullable=True))
op.alter_column(
"patch",
"parent_revision_sha",
existing_type=sa.VARCHAR(length=40),
nullable=True,
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column(
"patch",
"parent_revision_sha",
existing_type=sa.VARCHAR(length=40),
nullable=False,
)
op.drop_column("patch", "parent_ref")
op.alter_column(
"change_request",
"parent_revision_sha",
existing_type=sa.VARCHAR(length=40),
nullable=False,
)
op.drop_column("change_request", "parent_ref")
op.drop_column("change_request", "head_ref")
op.drop_constraint(None, "build", type_="foreignkey")
op.drop_index("idx_build_repo_sha", table_name="build")
op.alter_column(
"build", "source_id", existing_type=postgresql.UUID(), nullable=False
)
op.drop_column("build", "revision_sha")
op.drop_column("build", "ref")
# ### end Alembic commands ###
| {
"repo_name": "getsentry/zeus",
"path": "zeus/migrations/8536b0fcf0a2_add_refs.py",
"copies": "1",
"size": "2419",
"license": "apache-2.0",
"hash": -1646295567096471000,
"line_mean": 29.2375,
"line_max": 88,
"alpha_frac": 0.616370401,
"autogenerated": false,
"ratio": 3.36908077994429,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.448545118094429,
"avg_score": null,
"num_lines": null
} |
"""add registered_date to user
Revision ID: 54d08f9adc8c
Revises: 2d472fe79b95
Create Date: 2012-03-10 11:12:39.353857
"""
from __future__ import unicode_literals
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects.postgresql.base import PGDialect
# revision identifiers, used by Alembic.
revision = "54d08f9adc8c"
down_revision = "2d472fe79b95"
def upgrade():
from alembic.context import get_context
c = get_context()
if isinstance(c.connection.engine.dialect, PGDialect):
op.add_column(
"users",
sa.Column(
"registered_date",
sa.TIMESTAMP(timezone=False),
default=sa.sql.func.now(),
server_default=sa.func.now(),
),
)
else:
op.add_column(
"users",
sa.Column(
"registered_date",
sa.TIMESTAMP(timezone=False),
default=sa.sql.func.now(),
),
)
def downgrade():
pass
| {
"repo_name": "ergo/ziggurat_foundations",
"path": "ziggurat_foundations/migrations/versions/54d08f9adc8c_add_registered_date_.py",
"copies": "1",
"size": "1029",
"license": "bsd-3-clause",
"hash": 618539069930424200,
"line_mean": 21.8666666667,
"line_max": 58,
"alpha_frac": 0.5782312925,
"autogenerated": false,
"ratio": 3.7282608695652173,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9806492162065217,
"avg_score": 0,
"num_lines": 45
} |
"""Add relationship column to dependents
Revision ID: 2f1aa232102
Revises: 51acb6b52ed
Create Date: 2020-12-14 20:17:33.378756
"""
# revision identifiers, used by Alembic.
revision = '2f1aa232102'
down_revision = '51acb6b52ed'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import table
def upgrade():
op.create_table(
'relationships',
sa.Column('id', sa.Integer, primary_key=True),
sa.Column('name', sa.Unicode(75), nullable=False)
)
relationships = table(
'relationships',
sa.Column('id', sa.Integer, primary_key=True),
sa.Column('name', sa.Unicode(75), nullable=False)
)
op.bulk_insert(
relationships,
[
{'id': 1, 'name': 'spouse/significant other'},
{'id': 2, 'name': 'child'},
{'id': 3, 'name': 'grandparent'},
{'id': 4, 'name': 'grandchild'},
{'id': 5, 'name': 'other'}
])
op.add_column('dependents',
sa.Column('relationship', sa.Integer,\
sa.ForeignKey('relationships.id'), nullable=True))
def downgrade():
op.drop_column('dependents', 'relationship')
op.drop_table('relationships')
| {
"repo_name": "jlutz777/FreeStore",
"path": "alembic/versions/2f1aa232102_add_relationship_column_to_dependents.py",
"copies": "1",
"size": "1229",
"license": "mit",
"hash": 6912577493493027000,
"line_mean": 24.6041666667,
"line_max": 68,
"alpha_frac": 0.5858421481,
"autogenerated": false,
"ratio": 3.5935672514619883,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9622379756737865,
"avg_score": 0.011405928564824447,
"num_lines": 48
} |
"""Add reminder table.
Revision ID: 9f50538504b1
Revises: c877a04b8181
Create Date: 2017-02-05 18:00:11.916186
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '9f50538504b1'
down_revision = 'c877a04b8181'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('reminder',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('user_id', sa.BigInteger(), nullable=False),
sa.Column('channel_id', sa.BigInteger(), nullable=False),
sa.Column('enabled', sa.Boolean(), nullable=True),
sa.Column('text', sa.String(), nullable=True),
sa.Column('reminding_at', sa.DateTime(), nullable=True),
sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_unique_constraint(None, 'tag', ['id'])
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(None, 'tag', type_='unique')
op.drop_table('reminder')
# ### end Alembic commands ###
| {
"repo_name": "MJB47/Jokusoramame",
"path": "migrations/versions/9f50538504b1_add_reminder_table.py",
"copies": "1",
"size": "1144",
"license": "mit",
"hash": -2137709166337210000,
"line_mean": 28.3333333333,
"line_max": 65,
"alpha_frac": 0.6634615385,
"autogenerated": false,
"ratio": 3.2968299711815563,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9440570387087361,
"avg_score": 0.00394422451883901,
"num_lines": 39
} |
"""Add Re-Opening to Reasons enum
Revision ID: ebeb3491636e
Revises: dc926c74551d
Create Date: 2018-06-12 20:01:56.529081
"""
# revision identifiers, used by Alembic.
revision = "ebeb3491636e"
down_revision = "b722969f38a6"
from alembic import op
import sqlalchemy as sa
old_options = ("closing", "denial")
new_options = old_options + ("re-opening",)
old_type = sa.Enum(*old_options, name="reason_type")
new_type = sa.Enum(*new_options, name="reason_type")
tmp_type = sa.Enum(*new_options, name="_reason_type")
def upgrade():
# Create a tempoary "_type" type, convert and drop the "old" type
tmp_type.create(op.get_bind(), checkfirst=False)
op.execute(
"ALTER TABLE reasons ALTER COLUMN type TYPE _reason_type"
" USING type::TEXT::_reason_type"
)
old_type.drop(op.get_bind(), checkfirst=False)
# Create and convert to the "new" type type
new_type.create(op.get_bind(), checkfirst=False)
op.execute(
"ALTER TABLE reasons ALTER COLUMN type TYPE reason_type"
" USING type::TEXT::reason_type"
)
tmp_type.drop(op.get_bind(), checkfirst=False)
def downgrade():
# Remove re-opening reasons
op.execute("DELETE FROM reasons WHERE type = 're-opening'")
# Create a tempoary "_type" type, convert and drop the "new" type
tmp_type.create(op.get_bind(), checkfirst=False)
op.execute(
"ALTER TABLE reasons ALTER COLUMN type TYPE _reason_type"
" USING type::TEXT::_reason_type"
)
new_type.drop(op.get_bind(), checkfirst=False)
# Create and convert to the "old" type type
old_type.create(op.get_bind(), checkfirst=False)
op.execute(
"ALTER TABLE reasons ALTER COLUMN type TYPE reason_type"
" USING type::TEXT::reason_type"
)
tmp_type.drop(op.get_bind(), checkfirst=False)
| {
"repo_name": "CityOfNewYork/NYCOpenRecords",
"path": "migrations/versions/ebeb3491636e_add_re-opening_to_reasons_enum.py",
"copies": "1",
"size": "1817",
"license": "apache-2.0",
"hash": 5434249733208378000,
"line_mean": 30.8771929825,
"line_max": 69,
"alpha_frac": 0.6714364337,
"autogenerated": false,
"ratio": 3.2388591800356505,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.441029561373565,
"avg_score": null,
"num_lines": null
} |
"""Add rep exercises taxonomy table
Revision ID: a0620f5c7597
Revises: 053b42be855e
Create Date: 2016-12-28 11:03:42.904961
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'a0620f5c7597'
down_revision = '053b42be855e'
branch_labels = None
depends_on = None
def upgrade():
op.create_table(
'rep_exercises_taxonomy',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(), nullable=True),
sa.Column('is_back', sa.Boolean(), nullable=True),
sa.Column('is_chest', sa.Boolean(), nullable=True),
sa.Column('is_shoulders', sa.Boolean(), nullable=True),
sa.Column('is_biceps', sa.Boolean(), nullable=True),
sa.Column('is_triceps', sa.Boolean(), nullable=True),
sa.Column('is_legs', sa.Boolean(), nullable=True),
sa.Column('is_core', sa.Boolean(), nullable=True),
sa.Column('is_balance', sa.Boolean(), nullable=True),
sa.Column('is_cardio', sa.Boolean(), nullable=True),
sa.Column('is_weight_per_hand', sa.Boolean(), nullable=True),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('rep_exercises_taxonomy')
| {
"repo_name": "pbraunstein/trackercise",
"path": "migrations/versions/a0620f5c7597_.py",
"copies": "1",
"size": "1221",
"license": "mit",
"hash": -2741658390896943000,
"line_mean": 31.1315789474,
"line_max": 69,
"alpha_frac": 0.6486486486,
"autogenerated": false,
"ratio": 3.204724409448819,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.43533730580488195,
"avg_score": null,
"num_lines": null
} |
"""add reports table
Revision ID: 8240039fd3
Revises: 1c9398290e4
Create Date: 2014-06-06 19:38:39.487416
"""
# revision identifiers, used by Alembic.
revision = '8240039fd3'
down_revision = '1c9398290e4'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import table, column
def upgrade():
op.create_table(
'report_types',
sa.Column('id', sa.Integer, primary_key=True, autoincrement=True),
sa.Column('name', sa.String(60)),
sa.Column('description', sa.Text),
sa.Column('symbol', sa.String(40), unique=True),
)
report_types = table('report_types',
column('id', sa.Integer),
column('name', sa.String(60)),
column('description', sa.Text),
column('symbol', sa.String(40))
)
op.bulk_insert(report_types, [
{
'id': 1,
'name': 'Daily',
'description': 'Generates a report containing your gains/losses for the day.',
'symbol': 'daily',
}
])
op.create_table(
'report_crontab',
sa.Column('id', sa.Integer, primary_key=True, autoincrement=True),
sa.Column('portfolio_id', sa.Integer, sa.ForeignKey('portfolios.id', onupdate='cascade', ondelete='cascade')),
sa.Column('report_type_id', sa.Integer, sa.ForeignKey('report_types.id', onupdate='cascade', ondelete='cascade')),
sa.Column('cron', sa.String(300)),
sa.Column('next_run', sa.DateTime),
sa.Column('latest_run', sa.DateTime),
sa.Column('latest_error', sa.Text),
sa.Column('send_email', sa.Boolean),
)
op.create_table(
'reports',
sa.Column('id', sa.Integer, primary_key=True, autoincrement=True),
sa.Column('portfolio_id', sa.Integer, sa.ForeignKey('portfolios.id', onupdate='cascade', ondelete='cascade')),
sa.Column('report_type_id', sa.Integer, sa.ForeignKey('report_types.id', onupdate='cascade', ondelete='cascade')),
sa.Column('report_crontab_id', sa.Integer, sa.ForeignKey('report_crontab.id', onupdate='cascade', ondelete='set null')),
sa.Column('hash', sa.String(100)),
sa.Column('generated', sa.DateTime),
)
op.create_table(
'report_latest',
sa.Column('portfolio_id', sa.Integer, sa.ForeignKey('portfolios.id', onupdate='cascade', ondelete='cascade'), primary_key=True),
sa.Column('report_type_id', sa.Integer, sa.ForeignKey('report_types.id', onupdate='cascade', ondelete='cascade'), primary_key=True),
sa.Column('report_id', sa.Integer, sa.ForeignKey('reports.id', onupdate='cascade', ondelete='set null')),
)
def downgrade():
raise NotImplemented()
| {
"repo_name": "thomaserlang/stocksum",
"path": "src/stocksum/web/alembic/versions/8240039fd3_add_reports_table.py",
"copies": "1",
"size": "2751",
"license": "mit",
"hash": -5159194273122570000,
"line_mean": 36.7464788732,
"line_max": 140,
"alpha_frac": 0.6103235187,
"autogenerated": false,
"ratio": 3.577373211963589,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.4687696730663589,
"avg_score": null,
"num_lines": null
} |
"""Add RepositoryApplications to models
Revision ID: 3f1d7cfafe36
Revises: 2d3d6675101a
Create Date: 2014-12-04 12:48:03.328935
"""
# revision identifiers, used by Alembic.
revision = '3f1d7cfafe36'
down_revision = '2d3d6675101a'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.create_table('repository_app',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('repository', sa.Unicode(length=400), nullable=False),
sa.Column('url', sa.Unicode(length=500), nullable=False),
sa.Column('name', sa.Unicode(length=200), nullable=False),
sa.Column('adaptable', sa.Boolean(), nullable=True),
sa.Column('translatable', sa.Boolean(), nullable=True),
sa.Column('original_translations', sa.Unicode(length=500), nullable=True),
sa.Column('last_check', sa.DateTime(), nullable=True),
sa.Column('last_change', sa.DateTime(), nullable=True),
sa.Column('failing', sa.Boolean(), nullable=True),
sa.Column('failing_since', sa.DateTime(), nullable=True),
sa.Column('http_last_modified', sa.Unicode(length=64), nullable=True),
sa.Column('http_etag', sa.Unicode(length=64), nullable=True),
sa.PrimaryKeyConstraint('id')
)
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_table('repository_app')
### end Alembic commands ###
| {
"repo_name": "porduna/appcomposer",
"path": "alembic/versions/3f1d7cfafe36_add_repositoryapplic.py",
"copies": "3",
"size": "1443",
"license": "bsd-2-clause",
"hash": -5006095769189821000,
"line_mean": 34.1951219512,
"line_max": 78,
"alpha_frac": 0.6881496881,
"autogenerated": false,
"ratio": 3.395294117647059,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 1,
"avg_score": 0.010141357805789267,
"num_lines": 41
} |
"""Add RepositoryOption
Revision ID: 152c9c780e
Revises: 4d302aa44bc8
Create Date: 2013-11-26 17:48:21.180630
"""
# revision identifiers, used by Alembic.
revision = '152c9c780e'
down_revision = '4d302aa44bc8'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.create_table('repositoryoption',
sa.Column('id', sa.GUID(), nullable=False),
sa.Column('repository_id', sa.GUID(), nullable=False),
sa.Column('name', sa.String(length=64), nullable=False),
sa.Column('value', sa.Text(), nullable=False),
sa.Column('date_created', sa.DateTime(), nullable=False),
sa.ForeignKeyConstraint(['repository_id'], ['repository.id'], ),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('repository_id','name', name='unq_repositoryoption_name')
)
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_table('repositoryoption')
### end Alembic commands ###
| {
"repo_name": "dropbox/changes",
"path": "migrations/versions/152c9c780e_add_repositoryoption.py",
"copies": "4",
"size": "1042",
"license": "apache-2.0",
"hash": -4633846371034302000,
"line_mean": 28.7714285714,
"line_max": 81,
"alpha_frac": 0.6842610365,
"autogenerated": false,
"ratio": 3.4849498327759196,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.6169210869275921,
"avg_score": null,
"num_lines": null
} |
"""Add reprieve and ban
Revision ID: f0ae9448295b
Revises: bc1f34a0615a
Create Date: 2016-07-04 11:19:22.508966
"""
# revision identifiers, used by Alembic.
revision = 'f0ae9448295b'
down_revision = 'bc1f34a0615a'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
def upgrade():
op.add_column('customer', sa.Column('ban_begin', sa.DateTime(), nullable=True))
op.add_column('customer', sa.Column('ban_end', sa.DateTime(), nullable=True))
op.add_column('customer', sa.Column('phone_number', sa.String(), nullable=True))
op.add_column('customer', sa.Column('reprieve_begin', sa.DateTime(), nullable=True))
op.add_column('customer', sa.Column('reprieve_end', sa.DateTime(), nullable=True))
op.drop_column('customer', 'nb_sanctions')
def downgrade():
op.add_column('customer', sa.Column('nb_sanctions', sa.INTEGER(), autoincrement=False, nullable=True))
op.drop_column('customer', 'reprieve_end')
op.drop_column('customer', 'reprieve_begin')
op.drop_column('customer', 'phone_number')
op.drop_column('customer', 'ban_end')
op.drop_column('customer', 'ban_begin')
| {
"repo_name": "openmaraude/APITaxi_models",
"path": "APITaxi_models2/migrations/versions/20160704_11:19:22_f0ae9448295b_add_reprieve_and_ban.py.py",
"copies": "3",
"size": "1153",
"license": "mit",
"hash": 8942789000471687000,
"line_mean": 35.03125,
"line_max": 106,
"alpha_frac": 0.7042497832,
"autogenerated": false,
"ratio": 3.150273224043716,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.5354523007243717,
"avg_score": null,
"num_lines": null
} |
"""Add request ``method`` to ``ntorque_tasks``.
Revision ID: 32ee88d6d6d
Revises: 4ae58a31c179
Created: 2014-12-22 10:36:23.871146
"""
# Revision identifiers, used by Alembic.
revision = '32ee88d6d6d'
down_revision = '4ae58a31c179'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import table, column
from ntorque.model.orm import Task
def upgrade():
bind = op.get_bind()
typ = Task.__table__.c.method.type
impl = typ.dialect_impl(bind.dialect)
impl.create(bind, checkfirst=True)
# Add with ``nullable=True``.
op.add_column(
'ntorque_tasks',
sa.Column(
'method',
sa.Enum(
u'DELETE', u'PATCH', u'POST', u'PUT',
name='ntorque_request_methods'
),
nullable=True
)
)
# Set the default value.
tasks = table('ntorque_tasks', column('method'))
op.execute(tasks.update().values(method=u'POST'))
# Now we can set ``nullable=False``.
op.alter_column('ntorque_tasks', 'method', nullable=False)
def downgrade():
op.drop_column('ntorque_tasks', 'method')
| {
"repo_name": "thruflo/ntorque",
"path": "alembic/versions/32ee88d6d6d_.py",
"copies": "1",
"size": "1131",
"license": "unlicense",
"hash": -2302488408458421000,
"line_mean": 25.3023255814,
"line_max": 62,
"alpha_frac": 0.6162687887,
"autogenerated": false,
"ratio": 3.25,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.9326090114813996,
"avg_score": 0.008035734777200803,
"num_lines": 43
} |
"""Add request
Revision ID: 50d3cad50bb8
Revises: 53c3b75c86ed
Create Date: 2013-09-12 00:52:18.549450
"""
# revision identifiers, used by Alembic.
revision = '50d3cad50bb8'
down_revision = '53c3b75c86ed'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table('requests',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('assignee_id', sa.Integer(), nullable=False),
sa.Column('request_type', sa.Enum(u'documentation', u'interview', u'population sample'), nullable=False),
sa.Column('status', sa.Enum(u'Draft', u'Requested', u'Responded', u'Amended Request', u'Updated Response', u'Accepted'), nullable=False),
sa.Column('requested_on', sa.Date(), nullable=False),
sa.Column('due_on', sa.Date(), nullable=False),
sa.Column('audit_id', sa.Integer(), nullable=False),
sa.Column('objective_id', sa.Integer(), nullable=False),
sa.Column('gdrive_upload_path', sa.String(length=250), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('modified_by_id', sa.Integer(), nullable=True),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('context_id', sa.Integer(), nullable=True),
sa.ForeignKeyConstraint(['assignee_id'], ['people.id'], ),
sa.ForeignKeyConstraint(['audit_id'], ['audits.id'], ),
sa.ForeignKeyConstraint(['context_id'], ['contexts.id'], ),
sa.ForeignKeyConstraint(['objective_id'], ['objectives.id'], ),
sa.PrimaryKeyConstraint('id')
)
def downgrade():
op.drop_table('requests')
| {
"repo_name": "uskudnik/ggrc-core",
"path": "src/ggrc/migrations/versions/20130912005218_50d3cad50bb8_add_request.py",
"copies": "2",
"size": "1551",
"license": "apache-2.0",
"hash": 5520163553018287000,
"line_mean": 38.7692307692,
"line_max": 141,
"alpha_frac": 0.6789168279,
"autogenerated": false,
"ratio": 3.23125,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.49101668279,
"avg_score": null,
"num_lines": null
} |
"""add research_id to participant table
Revision ID: 400f222cdab0
Revises: 415b87cb2eee
Create Date: 2020-09-03 16:37:55.342453
"""
from alembic import op
import sqlalchemy as sa
import rdr_service.model.utils
from rdr_service.participant_enums import PhysicalMeasurementsStatus, QuestionnaireStatus, OrderStatus
from rdr_service.participant_enums import WithdrawalStatus, WithdrawalReason, SuspensionStatus, QuestionnaireDefinitionStatus
from rdr_service.participant_enums import EnrollmentStatus, Race, SampleStatus, OrganizationType, BiobankOrderStatus
from rdr_service.participant_enums import OrderShipmentTrackingStatus, OrderShipmentStatus
from rdr_service.participant_enums import MetricSetType, MetricsKey, GenderIdentity
from rdr_service.model.base import add_table_history_table, drop_table_history_table
from rdr_service.model.code import CodeType
from rdr_service.model.site_enums import SiteStatus, EnrollingStatus, DigitalSchedulingStatus, ObsoleteStatus
# revision identifiers, used by Alembic.
revision = '400f222cdab0'
down_revision = '415b87cb2eee'
branch_labels = None
depends_on = None
def upgrade(engine_name):
globals()["upgrade_%s" % engine_name]()
def downgrade(engine_name):
globals()["downgrade_%s" % engine_name]()
def upgrade_rdr():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('participant', sa.Column('research_id', sa.Integer(), nullable=True))
op.create_unique_constraint(None, 'participant', ['research_id'])
op.add_column('participant_history', sa.Column('research_id', sa.Integer(), nullable=True))
# ### end Alembic commands ###
def downgrade_rdr():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('participant_history', 'research_id')
op.drop_constraint(None, 'participant', type_='unique')
op.drop_column('participant', 'research_id')
# ### end Alembic commands ###
def upgrade_metrics():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
def downgrade_metrics():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
| {
"repo_name": "all-of-us/raw-data-repository",
"path": "rdr_service/alembic/versions/400f222cdab0_add_research_id_to_participant_table.py",
"copies": "1",
"size": "2200",
"license": "bsd-3-clause",
"hash": -3260257317109075000,
"line_mean": 33.375,
"line_max": 125,
"alpha_frac": 0.7431818182,
"autogenerated": false,
"ratio": 3.660565723793677,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.4903747541993677,
"avg_score": null,
"num_lines": null
} |
"""Add reservation link table
Revision ID: 416f9c877300
Revises: cbe630695800
Create Date: 2019-01-18 15:14:29.749357
"""
import sqlalchemy as sa
from alembic import op
from indico.core.db.sqlalchemy import PyIntEnum
from indico.core.db.sqlalchemy.links import LinkType
# revision identifiers, used by Alembic.
revision = '416f9c877300'
down_revision = 'ff49d8d05ce7'
branch_labels = None
depends_on = None
def upgrade():
op.create_table(
'reservation_links',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('event_id', sa.Integer(), nullable=True, index=True),
sa.Column('linked_event_id', sa.Integer(), nullable=True, index=True),
sa.Column('contribution_id', sa.Integer(), nullable=True, index=True),
sa.Column('session_block_id', sa.Integer(), nullable=True, index=True),
sa.Column('link_type',
PyIntEnum(LinkType, exclude_values={LinkType.category, LinkType.subcontribution, LinkType.session}),
nullable=False),
sa.CheckConstraint('(event_id IS NULL) = (link_type = 1)', name='valid_event_id'),
sa.CheckConstraint('link_type != 2 OR (contribution_id IS NULL AND session_block_id IS NULL AND '
'linked_event_id IS NOT NULL)', name='valid_event_link'),
sa.CheckConstraint('link_type != 3 OR (linked_event_id IS NULL AND session_block_id IS NULL AND '
'contribution_id IS NOT NULL)', name='valid_contribution_link'),
sa.CheckConstraint('link_type != 6 OR (contribution_id IS NULL AND linked_event_id IS NULL AND '
'session_block_id IS NOT NULL)', name='valid_session_block_link'),
sa.ForeignKeyConstraint(['contribution_id'], ['events.contributions.id']),
sa.ForeignKeyConstraint(['event_id'], ['events.events.id']),
sa.ForeignKeyConstraint(['linked_event_id'], ['events.events.id']),
sa.ForeignKeyConstraint(['session_block_id'], ['events.session_blocks.id']),
sa.PrimaryKeyConstraint('id'),
schema='roombooking'
)
op.add_column('reservations', sa.Column('link_id', sa.Integer(), nullable=True, index=True), schema='roombooking')
op.create_foreign_key(None, 'reservations', 'reservation_links', ['link_id'], ['id'], source_schema='roombooking',
referent_schema='roombooking')
# Migrate reservations.event_id to new reservation_links and set
# reservations.link_id based on the id of the newly created row.
op.execute('''
WITH reserv_data AS (
SELECT nextval(pg_get_serial_sequence('roombooking.reservation_links', 'id')) AS new_link_id,
id AS reserv_id, event_id
FROM roombooking.reservations
WHERE event_id IS NOT NULL
), link_ids_data AS (
INSERT INTO roombooking.reservation_links (id, event_id, linked_event_id, link_type)
SELECT new_link_id, event_id, event_id, {}
FROM reserv_data
RETURNING id AS link_id
)
UPDATE roombooking.reservations
SET link_id = link_ids_data.link_id
FROM link_ids_data, reserv_data
WHERE id = reserv_data.reserv_id and link_ids_data.link_id = reserv_data.new_link_id;
'''.format(LinkType.event.value))
op.drop_column('reservations', 'event_id', schema='roombooking')
def downgrade():
op.add_column('reservations', sa.Column('event_id', sa.Integer(), nullable=True), schema='roombooking')
op.create_foreign_key(None, 'reservations', 'events', ['event_id'], ['id'], source_schema='roombooking',
referent_schema='events')
op.create_index(None, 'reservations', ['event_id'], unique=False, schema='roombooking')
# Move reservation_links.event_id back to reservation.event_id
op.execute('''
UPDATE roombooking.reservations
SET event_id = reserv_link.event_id
FROM (
SELECT id, event_id
FROM roombooking.reservation_links
WHERE event_id IS NOT NULL
) reserv_link
WHERE link_id = reserv_link.id;
''')
op.drop_column('reservations', 'link_id', schema='roombooking')
op.drop_table('reservation_links', schema='roombooking')
| {
"repo_name": "indico/indico",
"path": "indico/migrations/versions/20190118_1514_416f9c877300_add_reservationlink_table.py",
"copies": "7",
"size": "4272",
"license": "mit",
"hash": 5525058497097158000,
"line_mean": 44.4468085106,
"line_max": 118,
"alpha_frac": 0.6404494382,
"autogenerated": false,
"ratio": 3.6419437340153453,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 1,
"avg_score": 0.0019293720381970286,
"num_lines": 94
} |
"""add reserve type
Revision ID: 436fca55d46a
Revises: dff614136e01
Create Date: 2017-10-18 04:49:32.331235
"""
import sys
from pathlib import Path
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import expression
monocle_dir = str(Path(__file__).resolve().parents[2])
if monocle_dir not in sys.path:
sys.path.append(monocle_dir)
from monocle.accounts import Account, RESERVE_TYPE_SLAVE, RESERVE_TYPE_CAPTAIN
# revision identifiers, used by Alembic.
revision = '436fca55d46a'
down_revision = 'dff614136e01'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('accounts', sa.Column('reserve_type', sa.SmallInteger(), nullable=True, default=0))
op.create_index('ix_accounts_acquisition', 'accounts', ['reserve_type', 'instance', 'hibernated', 'created'], unique=False)
query = Account.__table__.update().\
values({'reserve_type':expression.case([
(Account.level < 30,RESERVE_TYPE_SLAVE),
],
else_=RESERVE_TYPE_CAPTAIN)})
op.execute(query)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index('ix_accounts_acquisition', table_name='accounts')
op.drop_column('accounts', 'reserve_type')
# ### end Alembic commands ###
| {
"repo_name": "DavisPoGo/Monocle",
"path": "migrations/versions/436fca55d46a_add_reserve_type.py",
"copies": "1",
"size": "1394",
"license": "mit",
"hash": -6993977357752784000,
"line_mean": 31.4186046512,
"line_max": 127,
"alpha_frac": 0.6771879484,
"autogenerated": false,
"ratio": 3.4,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.45771879483999994,
"avg_score": null,
"num_lines": null
} |
"""add resource_id to hpo/organization table
Revision ID: 93f2bab71572
Revises: 806f7c2031a5
Create Date: 2019-10-24 10:26:53.309794
"""
from alembic import op
import sqlalchemy as sa
import rdr_service.model.utils
from rdr_service.participant_enums import PhysicalMeasurementsStatus, QuestionnaireStatus, OrderStatus
from rdr_service.participant_enums import WithdrawalStatus, WithdrawalReason, SuspensionStatus, QuestionnaireDefinitionStatus
from rdr_service.participant_enums import EnrollmentStatus, Race, SampleStatus, OrganizationType, BiobankOrderStatus
from rdr_service.participant_enums import OrderShipmentTrackingStatus, OrderShipmentStatus
from rdr_service.participant_enums import MetricSetType, MetricsKey, GenderIdentity
from rdr_service.model.base import add_table_history_table, drop_table_history_table
from rdr_service.model.code import CodeType
from rdr_service.model.site_enums import SiteStatus, EnrollingStatus, DigitalSchedulingStatus, ObsoleteStatus
# revision identifiers, used by Alembic.
revision = '93f2bab71572'
down_revision = '806f7c2031a5'
branch_labels = None
depends_on = None
def upgrade(engine_name):
globals()["upgrade_%s" % engine_name]()
def downgrade(engine_name):
globals()["downgrade_%s" % engine_name]()
def upgrade_rdr():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('hpo', sa.Column('resource_id', sa.String(length=255), nullable=True))
op.add_column('organization', sa.Column('resource_id', sa.String(length=255), nullable=True))
op.add_column('site', sa.Column('resource_id', sa.String(length=255), nullable=True))
# ### end Alembic commands ###
def downgrade_rdr():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('site', 'resource_id')
op.drop_column('organization', 'resource_id')
op.drop_column('hpo', 'resource_id')
# ### end Alembic commands ###
def upgrade_metrics():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
def downgrade_metrics():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ### | {
"repo_name": "all-of-us/raw-data-repository",
"path": "rdr_service/alembic/versions/93f2bab71572_add_resource_id_to_hpo_organization_.py",
"copies": "1",
"size": "2191",
"license": "bsd-3-clause",
"hash": -6170051574351134000,
"line_mean": 34.9344262295,
"line_max": 125,
"alpha_frac": 0.7416704701,
"autogenerated": false,
"ratio": 3.5568181818181817,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.47984886519181813,
"avg_score": null,
"num_lines": null
} |
"""add resource locks table
Revision ID: 3cb15662f688
Revises: 370964c4a364
Create Date: 2020-02-22 13:52:52.211013
"""
# revision identifiers, used by Alembic.
revision = '3cb15662f688'
down_revision = '370964c4a364'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade(engine_name):
globals()["upgrade_%s" % engine_name]()
def downgrade(engine_name):
globals()["downgrade_%s" % engine_name]()
def upgrade_development():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('resource_locks',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('resource', sa.String(length=256), nullable=False),
sa.Column('experiment_id', sa.Integer(), nullable=False),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('resource', 'experiment_id')
)
op.create_index(op.f('ix_resource_locks_created_at'), 'resource_locks', ['created_at'], unique=False)
op.create_index(op.f('ix_resource_locks_experiment_id'), 'resource_locks', ['experiment_id'], unique=False)
op.create_index(op.f('ix_resource_locks_resource'), 'resource_locks', ['resource'], unique=False)
# ### end Alembic commands ###
def downgrade_development():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_resource_locks_resource'), table_name='resource_locks')
op.drop_index(op.f('ix_resource_locks_experiment_id'), table_name='resource_locks')
op.drop_index(op.f('ix_resource_locks_created_at'), table_name='resource_locks')
op.drop_table('resource_locks')
# ### end Alembic commands ###
def upgrade_test():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('resource_locks',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('resource', sa.String(length=256), nullable=False),
sa.Column('experiment_id', sa.Integer(), nullable=False),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('resource', 'experiment_id')
)
op.create_index(op.f('ix_resource_locks_created_at'), 'resource_locks', ['created_at'], unique=False)
op.create_index(op.f('ix_resource_locks_experiment_id'), 'resource_locks', ['experiment_id'], unique=False)
op.create_index(op.f('ix_resource_locks_resource'), 'resource_locks', ['resource'], unique=False)
# ### end Alembic commands ###
def downgrade_test():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_resource_locks_resource'), table_name='resource_locks')
op.drop_index(op.f('ix_resource_locks_experiment_id'), table_name='resource_locks')
op.drop_index(op.f('ix_resource_locks_created_at'), table_name='resource_locks')
op.drop_table('resource_locks')
# ### end Alembic commands ###
def upgrade_production():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('resource_locks',
sa.Column('id', sa.Integer(), nullable=False),
sa.Column('created_at', sa.DateTime(), nullable=True),
sa.Column('resource', sa.String(length=256), nullable=False),
sa.Column('experiment_id', sa.Integer(), nullable=False),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('resource', 'experiment_id')
)
op.create_index(op.f('ix_resource_locks_created_at'), 'resource_locks', ['created_at'], unique=False)
op.create_index(op.f('ix_resource_locks_experiment_id'), 'resource_locks', ['experiment_id'], unique=False)
op.create_index(op.f('ix_resource_locks_resource'), 'resource_locks', ['resource'], unique=False)
# ### end Alembic commands ###
def downgrade_production():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_resource_locks_resource'), table_name='resource_locks')
op.drop_index(op.f('ix_resource_locks_experiment_id'), table_name='resource_locks')
op.drop_index(op.f('ix_resource_locks_created_at'), table_name='resource_locks')
op.drop_table('resource_locks')
# ### end Alembic commands ###
| {
"repo_name": "c4fcm/CivilServant",
"path": "alembic/versions/3cb15662f688_add_resource_locks_table.py",
"copies": "1",
"size": "4176",
"license": "mit",
"hash": -3354227779877209600,
"line_mean": 39.5436893204,
"line_max": 111,
"alpha_frac": 0.6786398467,
"autogenerated": false,
"ratio": 3.4145543744889615,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.45931942211889615,
"avg_score": null,
"num_lines": null
} |
"""Add resource record."""
# :license: MIT, see LICENSE for more details.
import click
import SoftLayer
from SoftLayer.CLI import environment
from SoftLayer.CLI import exceptions
from SoftLayer.CLI import helpers
# pylint: disable=redefined-builtin
@click.command()
@click.argument('record')
@click.argument('record_type')
@click.argument('data')
@click.option('--zone',
help="Zone name or identifier that the resource record will be associated with.\n"
"Required for all record types except PTR")
@click.option('--ttl',
default=900,
show_default=True,
help='TTL value in seconds, such as 86400')
@click.option('--priority',
default=10,
show_default=True,
help='The priority of the target host. (MX or SRV type only)')
@click.option('--protocol',
type=click.Choice(['tcp', 'udp', 'tls']),
default='tcp',
show_default=True,
help='The protocol of the service, usually either TCP or UDP. (SRV type only)')
@click.option('--port',
type=click.INT,
help='The TCP/UDP/TLS port on which the service is to be found. (SRV type only)')
@click.option('--service',
help='The symbolic name of the desired service. (SRV type only)')
@click.option('--weight',
default=5,
show_default=True,
help='Relative weight for records with same priority. (SRV type only)')
@environment.pass_env
def cli(env, record, record_type, data, zone, ttl, priority, protocol, port, service, weight):
"""Add resource record.
Each resource record contains a RECORD and DATA property, defining a resource's name and it's target data.
Domains contain multiple types of resource records so it can take one of the following values: A, AAAA, CNAME,
MX, SPF, SRV, and PTR.
About reverse records (PTR), the RECORD value must to be the public Ip Address of device you would like to manage
reverse DNS.
slcli dns record-add 10.10.8.21 PTR myhost.com --ttl=900
Examples:
slcli dns record-add myhost.com A 192.168.1.10 --zone=foobar.com --ttl=900
slcli dns record-add myhost.com AAAA 2001:DB8::1 --zone=foobar.com
slcli dns record-add 192.168.1.2 MX 192.168.1.10 --zone=foobar.com --priority=11 --ttl=1800
slcli dns record-add myhost.com TXT "txt-verification=rXOxyZounZs87oacJSKvbUSIQ" --zone=2223334
slcli dns record-add myhost.com SPF "v=spf1 include:_spf.google.com ~all" --zone=2223334
slcli dns record-add myhost.com SRV 192.168.1.10 --zone=2223334 --service=foobar --port=80 --protocol=TCP
"""
manager = SoftLayer.DNSManager(env.client)
record_type = record_type.upper()
if zone and record_type != 'PTR':
zone_id = helpers.resolve_id(manager.resolve_ids, zone, name='zone')
if record_type == 'MX':
manager.create_record_mx(zone_id, record, data, ttl=ttl, priority=priority)
elif record_type == 'SRV':
manager.create_record_srv(zone_id, record, data, protocol, port, service,
ttl=ttl, priority=priority, weight=weight)
else:
manager.create_record(zone_id, record, record_type, data, ttl=ttl)
elif record_type == 'PTR':
manager.create_record_ptr(record, data, ttl=ttl)
else:
raise exceptions.CLIAbort("%s isn't a valid record type or zone is missing" % record_type)
click.secho("%s record added successfully" % record_type, fg='green')
| {
"repo_name": "allmightyspiff/softlayer-python",
"path": "SoftLayer/CLI/dns/record_add.py",
"copies": "3",
"size": "3602",
"license": "mit",
"hash": 5617266814533882000,
"line_mean": 39.0222222222,
"line_max": 117,
"alpha_frac": 0.640755136,
"autogenerated": false,
"ratio": 3.759916492693111,
"config_test": false,
"has_no_keywords": false,
"few_assignments": false,
"quality_score": 0.590067162869311,
"avg_score": null,
"num_lines": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.