repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/column/__init__.py
kansha/column/__init__.py
#-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- from . import view from .comp import CardsCounter, Column
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/board/comp.py
kansha/board/comp.py
# -*- coding:utf-8 -*- # -- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. # -- import json import itertools from functools import partial from nagare.i...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/board/view.py
kansha/board/view.py
# -*- coding:utf-8 -*- # -- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. # -- from nagare.i18n import _, _N, _L from nagare import ajax, component, pre...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
true
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/board/models.py
kansha/board/models.py
# -*- coding:utf-8 -*- # -- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- import uuid import urllib from elixir import using_options from elixir im...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/board/boardconfig.py
kansha/board/boardconfig.py
# -*- coding:utf-8 -*- #-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- from collections import OrderedDict from nagare import i18n from nagare imp...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/board/excel_export.py
kansha/board/excel_export.py
# -*- coding:utf-8 -*- # -- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. # -- import re import unicodedata from cStringIO import StringIO import xlwt ...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/board/templates.py
kansha/board/templates.py
# -*- coding:utf-8 -*- #-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- from nagare import ajax, component, editor, presentation, validator as naga...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/board/__init__.py
kansha/board/__init__.py
#-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- from . import view from .comp import (Board, BOARD_PUBLIC, BOARD_PRIVATE, ...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/board/boardsmanager.py
kansha/board/boardsmanager.py
# -*- coding:utf-8 -*- #-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- from collections import OrderedDict from nagare import security, component...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/board_card_filter/comp.py
kansha/board_card_filter/comp.py
# -*- coding:utf-8 -*- # -- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. # -- # TODO: make it a board extension class BoardCardFilter(object): d...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/board_card_filter/view.py
kansha/board_card_filter/view.py
# -*- coding:utf-8 -*- # -- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. # -- from nagare.i18n import _, _N, _L from nagare import ajax, component, pre...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/board_card_filter/__init__.py
kansha/board_card_filter/__init__.py
# -*- coding:utf-8 -*- # -- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. # -- from .comp import BoardCardFilter from . import view
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/toolbox/calendar_widget.py
kansha/toolbox/calendar_widget.py
# -*- coding:utf-8 -*- #-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- import calendar from datetime import date, datetime from dateutil import re...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/toolbox/autocomplete.py
kansha/toolbox/autocomplete.py
# -*- coding:utf-8 -*- #-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- import random import webob.exc from nagare import ajax from nagare import...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/toolbox/__init__.py
kansha/toolbox/__init__.py
# -*- coding:utf-8 -*- #-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #--
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/toolbox/remote.py
kansha/toolbox/remote.py
# -*- coding:utf-8 -*- #-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- from nagare import ajax, serializer import peak class ActionViewToJs(ajax...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/toolbox/popin.py
kansha/toolbox/popin.py
# -*- coding:utf-8 -*- #-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- from nagare import ajax from nagare import presentation, component from ka...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/toolbox/overlay.py
kansha/toolbox/overlay.py
# -*- coding:utf-8 -*- #-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- from nagare import presentation, ajax from nagare.i18n import _ class Ove...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/alembic/admin.py
kansha/alembic/admin.py
# -*- coding:utf-8 -*- #-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- import os.path import pkg_resources from alembic import command from alemb...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/alembic/__init__.py
kansha/alembic/__init__.py
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/alembic/env.py
kansha/alembic/env.py
#-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- from __future__ import with_statement from alembic import context from sqlalchemy import engine_fr...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/alembic/versions/55f89221fc55_email_index.py
kansha/alembic/versions/55f89221fc55_email_index.py
"""email index Revision ID: 55f89221fc55 Revises: 25739bc150b9 Create Date: 2017-01-24 16:44:02.500510 """ from alembic import op import sqlalchemy as sa from sqlalchemy.sql import and_ # revision identifiers, used by Alembic. revision = '55f89221fc55' down_revision = '25739bc150b9' users = sa.Table( 'user', ...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/alembic/versions/361f9cbae3fc_rename_board_archive.py
kansha/alembic/versions/361f9cbae3fc_rename_board_archive.py
"""Rename board.archive Revision ID: 361f9cbae3fc Revises: 2b0edcfa57b4 Create Date: 2015-12-18 17:00:10.034124 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '361f9cbae3fc' down_revision = '2b0edcfa57b4' def upgrade(): with op.batch_alter_table('board'...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/alembic/versions/b740362087_adding_max_cards.py
kansha/alembic/versions/b740362087_adding_max_cards.py
#-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- """adding max cards Revision ID: b740362087 Revises: 537fa16b46e7 Create Date: 2013-09-19 17:37:3...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/alembic/versions/25739bc150b9_membership.py
kansha/alembic/versions/25739bc150b9_membership.py
"""membership Revision ID: 25739bc150b9 Revises: 2c0a3788227 Create Date: 2017-01-13 17:58:55.516698 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '25739bc150b9' down_revision = '2c0a3788227' def upgrade(): bind = op.get_bind() members = {} # g...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/alembic/versions/537fa16b46e7_add_due_date_to_card.py
kansha/alembic/versions/537fa16b46e7_add_due_date_to_card.py
#-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- """Add due_date to cards Revision ID: 537fa16b46e7 Revises: None Create Date: 2013-09-10 16:44:45...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/alembic/versions/2c0a3788227_rm_display_week_numbers.py
kansha/alembic/versions/2c0a3788227_rm_display_week_numbers.py
"""empty message Revision ID: 2c0a3788227 Revises: f058ce7ee0c Create Date: 2016-01-20 17:18:51.047928 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '2c0a3788227' down_revision = 'f058ce7ee0c' def upgrade(): bind = op.get_bind() if bind.engine.name...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/alembic/versions/2b0edcfa57b4_add_templates.py
kansha/alembic/versions/2b0edcfa57b4_add_templates.py
"""Add templates Revision ID: 2b0edcfa57b4 Revises: 24be36b8c67 Create Date: 2015-11-24 17:50:13.280722 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '2b0edcfa57b4' down_revision = '24be36b8c67' DEFAULT_LABELS = ( (u'Green', u'#22C328'), (u'Red', u...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/alembic/versions/5791b368ac26_new_background_positions.py
kansha/alembic/versions/5791b368ac26_new_background_positions.py
"""new_background_positions Revision ID: 5791b368ac26 Revises: 443501b69d16 Create Date: 2017-04-27 11:03:20.788762 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '5791b368ac26' down_revision = '443501b69d16' def upgrade(): op.alter_column('board', 'bac...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/alembic/versions/f058ce7ee0c_data_in_extensions.py
kansha/alembic/versions/f058ce7ee0c_data_in_extensions.py
"""Data in extensions Revision ID: f058ce7ee0c Revises: 2b0edcfa57b4 Create Date: 2016-01-07 13:41:19.534150 """ import time from datetime import date from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'f058ce7ee0c' down_revision = '361f9cbae3fc' def upgrade(): ...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/alembic/versions/24be36b8c67_new_asset_path_to_assets.py
kansha/alembic/versions/24be36b8c67_new_asset_path_to_assets.py
"""new asset path to assets Revision ID: 24be36b8c67 Revises: 1bd634091036 Create Date: 2015-10-23 15:43:39.398148 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '24be36b8c67' down_revision = '1bd634091036' users = sa.Table( 'user', sa.MetaData(), ...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/alembic/versions/6cb3c668d65_add_column_archive_flag.py
kansha/alembic/versions/6cb3c668d65_add_column_archive_flag.py
"""Add column archive flag Revision ID: 6cb3c668d65 Revises: 36d972f11e3e Create Date: 2014-03-03 16:07:47.321713 """ # revision identifiers, used by Alembic. revision = '6cb3c668d65' down_revision = '36d972f11e3e' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('column', sa.Column...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/alembic/versions/1b6fbaffad32_add_notify_value.py
kansha/alembic/versions/1b6fbaffad32_add_notify_value.py
#-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- """Add notify value Revision ID: 1b6fbaffad32 Revises: d0e88000d3f Create Date: 2013-11-04 09:59:...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/alembic/versions/4fb34b202c5f_last_login_stamp.py
kansha/alembic/versions/4fb34b202c5f_last_login_stamp.py
#-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- """last_login stamp Revision ID: 4fb34b202c5f Revises: 6cb3c668d65 Create Date: 2015-05-18 19:00:...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/alembic/versions/d0e88000d3f_add_versioning.py
kansha/alembic/versions/d0e88000d3f_add_versioning.py
#-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- """Add versioning Revision ID: d0e88000d3f Revises: b740362087 Create Date: 2013-10-30 10:45:11.5...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/alembic/versions/443501b69d16_weights_are_numbers.py
kansha/alembic/versions/443501b69d16_weights_are_numbers.py
"""weights are numbers Revision ID: 443501b69d16 Revises: 55f89221fc55 Create Date: 2017-04-03 18:28:50.108072 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '443501b69d16' down_revision = '55f89221fc55' def upgrade(): bind = op.get_bind() op.create...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/alembic/versions/1bd634091036_add_display_week_numbers.py
kansha/alembic/versions/1bd634091036_add_display_week_numbers.py
"""add display week numbers Revision ID: 1bd634091036 Revises: 4fb34b202c5f Create Date: 2015-09-15 11:51:46.739150 """ # revision identifiers, used by Alembic. revision = '1bd634091036' down_revision = '4fb34b202c5f' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('user', sa.Colum...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/kansha/alembic/versions/36d972f11e3e_board_background.py
kansha/alembic/versions/36d972f11e3e_board_background.py
#-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- """board background Revision ID: 36d972f11e3e Revises: 1b6fbaffad32 Create Date: 2014-02-11 12:01...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/tests/tests_assetsmanager.py
tests/tests_assetsmanager.py
# -*- coding:utf-8 -*- #-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- import unittest import os, shutil import pkg_resources from kansha.service...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/tests/test_forms.py
tests/test_forms.py
# -*- coding:utf-8 -*- #-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- import logging import unittest from nagare import database from elixir imp...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/tests/__init__.py
tests/__init__.py
# -*- coding:utf-8 -*- #-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #--
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/tests/test_search.py
tests/test_search.py
# -*- coding:utf-8 -*- #-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- import unittest from kansha.services.search import schema, sqliteengine, e...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/tests/test_security.py
tests/test_security.py
# -*- coding:utf-8 -*- #-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- import unittest import sys from nagare import database, i18n, security, co...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/tests/test_boards.py
tests/test_boards.py
# -*- coding:utf-8 -*- #-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- import unittest from nagare import database from elixir import metadata as...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/tests/test_validators.py
tests/test_validators.py
# -*- coding:utf-8 -*- #-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #-- import unittest from kansha import validator class ValidatorTest(unittes...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/data/__init__.py
data/__init__.py
# -*- coding:utf-8 -*- #-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #--
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/doc/conf.py
doc/conf.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Kansha documentation build configuration file, created by # sphinx-quickstart on Tue Feb 17 09:57:39 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # aut...
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
Net-ng/kansha
https://github.com/Net-ng/kansha/blob/85b5816da126b1c7098707c98f217d8b2e524ff2/conf/__init__.py
conf/__init__.py
# -*- coding:utf-8 -*- #-- # Copyright (c) 2012-2014 Net-ng. # All rights reserved. # # This software is licensed under the BSD License, as described in # the file LICENSE.txt, which you should have received as part of # this distribution. #--
python
BSD-3-Clause
85b5816da126b1c7098707c98f217d8b2e524ff2
2026-01-05T07:10:52.983810Z
false
mattriemer/MER
https://github.com/mattriemer/MER/blob/4b7b9c977f3126f533e968b82321649f1ca7d446/main.py
main.py
### This is a modified version of main.py from https://github.com/facebookresearch/GradientEpisodicMemory ### The most significant changes are to the arguments: 1) allowing for new models and 2) changing the default settings in some cases # Copyright 2019-present, IBM Research # All rights reserved. # # This source c...
python
Apache-2.0
4b7b9c977f3126f533e968b82321649f1ca7d446
2026-01-05T07:10:56.517349Z
false
mattriemer/MER
https://github.com/mattriemer/MER/blob/4b7b9c977f3126f533e968b82321649f1ca7d446/download.py
download.py
######################################################################## # # Functions for downloading and extracting data-files from the internet. # # Implemented in Python 3.5 # ######################################################################## # # This file is part of the TensorFlow Tutorials available at: # #...
python
Apache-2.0
4b7b9c977f3126f533e968b82321649f1ca7d446
2026-01-05T07:10:56.517349Z
false
mattriemer/MER
https://github.com/mattriemer/MER/blob/4b7b9c977f3126f533e968b82321649f1ca7d446/get_data.py
get_data.py
# Copyright 2019-present, IBM Research # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import os import download import argparse def get_mnist_data(url, data_dir): print("Downloading {} into {}".format(url, data_dir))...
python
Apache-2.0
4b7b9c977f3126f533e968b82321649f1ca7d446
2026-01-05T07:10:56.517349Z
false
mattriemer/MER
https://github.com/mattriemer/MER/blob/4b7b9c977f3126f533e968b82321649f1ca7d446/model/gem.py
model/gem.py
### This is a copy of GEM from https://github.com/facebookresearch/GradientEpisodicMemory. ### In order to ensure complete reproducability, we do not change the file and treat it as a baseline. # Copyright 2019-present, IBM Research # All rights reserved. # # This source code is licensed under the license found in th...
python
Apache-2.0
4b7b9c977f3126f533e968b82321649f1ca7d446
2026-01-05T07:10:56.517349Z
false
mattriemer/MER
https://github.com/mattriemer/MER/blob/4b7b9c977f3126f533e968b82321649f1ca7d446/model/common.py
model/common.py
### A copy of common.py from https://github.com/facebookresearch/GradientEpisodicMemory. ### We leveraged the same architecture and weight initialization for all of our experiments. # Copyright 2019-present, IBM Research # All rights reserved. # # This source code is licensed under the license found in the # LICENSE...
python
Apache-2.0
4b7b9c977f3126f533e968b82321649f1ca7d446
2026-01-05T07:10:56.517349Z
false
mattriemer/MER
https://github.com/mattriemer/MER/blob/4b7b9c977f3126f533e968b82321649f1ca7d446/model/meralg1.py
model/meralg1.py
# An implementation of MER Algorithm 1 from https://openreview.net/pdf?id=B1gTShAct7 # Copyright 2019-present, IBM Research # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import torch import torch.nn as nn import torch.o...
python
Apache-2.0
4b7b9c977f3126f533e968b82321649f1ca7d446
2026-01-05T07:10:56.517349Z
false
mattriemer/MER
https://github.com/mattriemer/MER/blob/4b7b9c977f3126f533e968b82321649f1ca7d446/model/ewc.py
model/ewc.py
### We use the same version of EwC https://www.pnas.org/content/114/13/3521 originally used in https://github.com/facebookresearch/GradientEpisodicMemory ### We directly copied the ewc.py model file from the GEM project https://github.com/facebookresearch/GradientEpisodicMemory # Copyright 2019-present, IBM Research #...
python
Apache-2.0
4b7b9c977f3126f533e968b82321649f1ca7d446
2026-01-05T07:10:56.517349Z
false
mattriemer/MER
https://github.com/mattriemer/MER/blob/4b7b9c977f3126f533e968b82321649f1ca7d446/model/online.py
model/online.py
### code for this basline is copied directly from single.py in https://github.com/facebookresearch/GradientEpisodicMemory # Copyright 2019-present, IBM Research # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import torch...
python
Apache-2.0
4b7b9c977f3126f533e968b82321649f1ca7d446
2026-01-05T07:10:56.517349Z
false
mattriemer/MER
https://github.com/mattriemer/MER/blob/4b7b9c977f3126f533e968b82321649f1ca7d446/model/independent.py
model/independent.py
### code for this basline is copied directly from independent.py in https://github.com/facebookresearch/GradientEpisodicMemory # Copyright 2019-present, IBM Research # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import ...
python
Apache-2.0
4b7b9c977f3126f533e968b82321649f1ca7d446
2026-01-05T07:10:56.517349Z
false
mattriemer/MER
https://github.com/mattriemer/MER/blob/4b7b9c977f3126f533e968b82321649f1ca7d446/model/taskinput.py
model/taskinput.py
### Code for this basline is copied directly from multimodal.py in https://github.com/facebookresearch/GradientEpisodicMemory # Copyright 2019-present, IBM Research # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import t...
python
Apache-2.0
4b7b9c977f3126f533e968b82321649f1ca7d446
2026-01-05T07:10:56.517349Z
false
mattriemer/MER
https://github.com/mattriemer/MER/blob/4b7b9c977f3126f533e968b82321649f1ca7d446/model/meralg7.py
model/meralg7.py
# An implementation of Meta-Experience Replay (MER) Algorithm 7 from https://openreview.net/pdf?id=B1gTShAct7 # Copyright 2019-present, IBM Research # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import torch import torc...
python
Apache-2.0
4b7b9c977f3126f533e968b82321649f1ca7d446
2026-01-05T07:10:56.517349Z
false
mattriemer/MER
https://github.com/mattriemer/MER/blob/4b7b9c977f3126f533e968b82321649f1ca7d446/model/eralg4.py
model/eralg4.py
# An implementation of Experience Replay (ER) with reservoir sampling and without using tasks from Algorithm 4 of https://openreview.net/pdf?id=B1gTShAct7 # Copyright 2019-present, IBM Research # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory o...
python
Apache-2.0
4b7b9c977f3126f533e968b82321649f1ca7d446
2026-01-05T07:10:56.517349Z
false
mattriemer/MER
https://github.com/mattriemer/MER/blob/4b7b9c977f3126f533e968b82321649f1ca7d446/model/eralg5.py
model/eralg5.py
# An implementation of Experience Replay (ER) with tasks from Algorithm 5 in https://openreview.net/pdf?id=B1gTShAct7 # Copyright 2019-present, IBM Research # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import torch imp...
python
Apache-2.0
4b7b9c977f3126f533e968b82321649f1ca7d446
2026-01-05T07:10:56.517349Z
false
mattriemer/MER
https://github.com/mattriemer/MER/blob/4b7b9c977f3126f533e968b82321649f1ca7d446/model/meralg6.py
model/meralg6.py
# An implementation of Meta-Experience Replay (MER) Algorithm 6 from https://openreview.net/pdf?id=B1gTShAct7 # Copyright 2019-present, IBM Research # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. import torch import tor...
python
Apache-2.0
4b7b9c977f3126f533e968b82321649f1ca7d446
2026-01-05T07:10:56.517349Z
false
mattriemer/MER
https://github.com/mattriemer/MER/blob/4b7b9c977f3126f533e968b82321649f1ca7d446/metrics/metrics.py
metrics/metrics.py
### We directly copied the metrics.py model file from the GEM project https://github.com/facebookresearch/GradientEpisodicMemory # Copyright 2019-present, IBM Research # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. from ...
python
Apache-2.0
4b7b9c977f3126f533e968b82321649f1ca7d446
2026-01-05T07:10:56.517349Z
false
adamchainz/django-rich
https://github.com/adamchainz/django-rich/blob/108d5ffc147731143d7681b50a301e2f5b4ac8c8/src/django_rich/__init__.py
src/django_rich/__init__.py
python
MIT
108d5ffc147731143d7681b50a301e2f5b4ac8c8
2026-01-05T07:10:55.706641Z
false
adamchainz/django-rich
https://github.com/adamchainz/django-rich/blob/108d5ffc147731143d7681b50a301e2f5b4ac8c8/src/django_rich/test.py
src/django_rich/test.py
from __future__ import annotations import io import sys import unittest from collections.abc import Iterable from types import TracebackType from typing import Any, TypeAlias, cast from unittest.case import ( # type: ignore [attr-defined] TestCase, _SubTest, ) from unittest.result import STDERR_LINE, STDOUT_L...
python
MIT
108d5ffc147731143d7681b50a301e2f5b4ac8c8
2026-01-05T07:10:55.706641Z
false
adamchainz/django-rich
https://github.com/adamchainz/django-rich/blob/108d5ffc147731143d7681b50a301e2f5b4ac8c8/src/django_rich/management/__init__.py
src/django_rich/management/__init__.py
from __future__ import annotations import sys from typing import Any, TextIO from django.core.management import BaseCommand, CommandError from rich.console import Console class RichCommand(BaseCommand): def __init__( self, stdout: TextIO | None = None, stderr: TextIO | None = None, ...
python
MIT
108d5ffc147731143d7681b50a301e2f5b4ac8c8
2026-01-05T07:10:55.706641Z
false
adamchainz/django-rich
https://github.com/adamchainz/django-rich/blob/108d5ffc147731143d7681b50a301e2f5b4ac8c8/src/django_rich/management/commands/shell.py
src/django_rich/management/commands/shell.py
from __future__ import annotations from typing import Any from django.core.management.commands.shell import Command as BaseCommand from rich import pretty class Command(BaseCommand): def handle(self, **options: Any) -> None: pretty.install() return super().handle(**options) def get_auto_imp...
python
MIT
108d5ffc147731143d7681b50a301e2f5b4ac8c8
2026-01-05T07:10:55.706641Z
false
adamchainz/django-rich
https://github.com/adamchainz/django-rich/blob/108d5ffc147731143d7681b50a301e2f5b4ac8c8/src/django_rich/management/commands/__init__.py
src/django_rich/management/commands/__init__.py
python
MIT
108d5ffc147731143d7681b50a301e2f5b4ac8c8
2026-01-05T07:10:55.706641Z
false
adamchainz/django-rich
https://github.com/adamchainz/django-rich/blob/108d5ffc147731143d7681b50a301e2f5b4ac8c8/tests/test_management.py
tests/test_management.py
from __future__ import annotations import os from inspect import Parameter, Signature, signature from io import StringIO from typing import Any from unittest import mock import pytest from django.core.management import BaseCommand, CommandError from django.core.management import call_command as base_call_command from...
python
MIT
108d5ffc147731143d7681b50a301e2f5b4ac8c8
2026-01-05T07:10:55.706641Z
false
adamchainz/django-rich
https://github.com/adamchainz/django-rich/blob/108d5ffc147731143d7681b50a301e2f5b4ac8c8/tests/settings.py
tests/settings.py
from __future__ import annotations from typing import Any SECRET_KEY = "NOTASECRET" ALLOWED_HOSTS: list[str] = [] DATABASES: dict[str, dict[str, Any]] = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": "testdb", } } DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" INSTALL...
python
MIT
108d5ffc147731143d7681b50a301e2f5b4ac8c8
2026-01-05T07:10:55.706641Z
false
adamchainz/django-rich
https://github.com/adamchainz/django-rich/blob/108d5ffc147731143d7681b50a301e2f5b4ac8c8/tests/__init__.py
tests/__init__.py
python
MIT
108d5ffc147731143d7681b50a301e2f5b4ac8c8
2026-01-05T07:10:55.706641Z
false
adamchainz/django-rich
https://github.com/adamchainz/django-rich/blob/108d5ffc147731143d7681b50a301e2f5b4ac8c8/tests/test_shell.py
tests/test_shell.py
from __future__ import annotations import sys from code import InteractiveConsole from unittest import mock import django import pytest from django.core.management import call_command from django.test import SimpleTestCase from django.test.utils import captured_stdin, captured_stdout from django_rich.management.comm...
python
MIT
108d5ffc147731143d7681b50a301e2f5b4ac8c8
2026-01-05T07:10:55.706641Z
false
adamchainz/django-rich
https://github.com/adamchainz/django-rich/blob/108d5ffc147731143d7681b50a301e2f5b4ac8c8/tests/test_test.py
tests/test_test.py
from __future__ import annotations import inspect import os import re import subprocess import sys import time import unittest.case from pathlib import Path from textwrap import dedent import django import pytest from django.db import connection from django.test import SimpleTestCase, TestCase from django.test.runner...
python
MIT
108d5ffc147731143d7681b50a301e2f5b4ac8c8
2026-01-05T07:10:55.706641Z
true
adamchainz/django-rich
https://github.com/adamchainz/django-rich/blob/108d5ffc147731143d7681b50a301e2f5b4ac8c8/tests/testapp/__init__.py
tests/testapp/__init__.py
from __future__ import annotations import coverage coverage.process_startup()
python
MIT
108d5ffc147731143d7681b50a301e2f5b4ac8c8
2026-01-05T07:10:55.706641Z
false
adamchainz/django-rich
https://github.com/adamchainz/django-rich/blob/108d5ffc147731143d7681b50a301e2f5b4ac8c8/tests/testapp/management/__init__.py
tests/testapp/management/__init__.py
python
MIT
108d5ffc147731143d7681b50a301e2f5b4ac8c8
2026-01-05T07:10:55.706641Z
false
adamchainz/django-rich
https://github.com/adamchainz/django-rich/blob/108d5ffc147731143d7681b50a301e2f5b4ac8c8/tests/testapp/management/commands/example.py
tests/testapp/management/commands/example.py
from __future__ import annotations from django_rich.management import RichCommand class Command(RichCommand): def handle(self, *args, **options): self.console.print("[bold red]Alert![/bold red]")
python
MIT
108d5ffc147731143d7681b50a301e2f5b4ac8c8
2026-01-05T07:10:55.706641Z
false
adamchainz/django-rich
https://github.com/adamchainz/django-rich/blob/108d5ffc147731143d7681b50a301e2f5b4ac8c8/tests/testapp/management/commands/__init__.py
tests/testapp/management/commands/__init__.py
python
MIT
108d5ffc147731143d7681b50a301e2f5b4ac8c8
2026-01-05T07:10:55.706641Z
false
adafruit/Adafruit_CircuitPython_ADS1x15
https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15/blob/d56c704d7924397e2aee26e65e750b68db626c17/docs/conf.py
docs/conf.py
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # # SPDX-License-Identifier: MIT import datetime import os import sys sys.path.insert(0, os.path.abspath("..")) # -- General configuration ------------------------------------------------ # Add any Sphinx extension module names here, as strings. They ca...
python
MIT
d56c704d7924397e2aee26e65e750b68db626c17
2026-01-05T07:10:57.723495Z
false
adafruit/Adafruit_CircuitPython_ADS1x15
https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15/blob/d56c704d7924397e2aee26e65e750b68db626c17/examples/ads1x15_comparator_example.py
examples/ads1x15_comparator_example.py
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT import time import board import countio from adafruit_ads1x15 import ADS1015, AnalogIn, ads1x15 # Create the I2C bus i2c = board.I2C() # Create the ADS object ads = ADS1015(i2c) # ads = ADS.ADS1115(i2c) # Create a single...
python
MIT
d56c704d7924397e2aee26e65e750b68db626c17
2026-01-05T07:10:57.723495Z
false
adafruit/Adafruit_CircuitPython_ADS1x15
https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15/blob/d56c704d7924397e2aee26e65e750b68db626c17/examples/ads1x15_fast_read.py
examples/ads1x15_fast_read.py
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT import time import board import busio from adafruit_ads1x15 import ADS1015, AnalogIn, ads1x15 # Data collection setup RATE = 3300 SAMPLES = 1000 # Create the I2C bus with a fast frequency # NOTE: Your device may not respe...
python
MIT
d56c704d7924397e2aee26e65e750b68db626c17
2026-01-05T07:10:57.723495Z
false
adafruit/Adafruit_CircuitPython_ADS1x15
https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15/blob/d56c704d7924397e2aee26e65e750b68db626c17/examples/ads1x15_ads1115_simpletest.py
examples/ads1x15_ads1115_simpletest.py
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT import time import board from adafruit_ads1x15 import ADS1115, AnalogIn, ads1x15 # Create the I2C bus i2c = board.I2C() # Create the ADC object using the I2C bus ads = ADS1115(i2c) # you can specify an I2C adress instead ...
python
MIT
d56c704d7924397e2aee26e65e750b68db626c17
2026-01-05T07:10:57.723495Z
false
adafruit/Adafruit_CircuitPython_ADS1x15
https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15/blob/d56c704d7924397e2aee26e65e750b68db626c17/examples/ads1x15_gain_example.py
examples/ads1x15_gain_example.py
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT import time import board from adafruit_ads1x15 import ADS1115, AnalogIn, ads1x15 # Create the I2C bus i2c = board.I2C() # Create the ADS object # ads = ADS.ADS1015(i2c) ads = ADS1115(i2c) # Create a single-ended channel ...
python
MIT
d56c704d7924397e2aee26e65e750b68db626c17
2026-01-05T07:10:57.723495Z
false
adafruit/Adafruit_CircuitPython_ADS1x15
https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15/blob/d56c704d7924397e2aee26e65e750b68db626c17/examples/ads1x15_simpletest.py
examples/ads1x15_simpletest.py
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT import time import board from adafruit_ads1x15 import ADS1015, AnalogIn, ads1x15 # Create the I2C bus i2c = board.I2C() # Create the ADC object using the I2C bus ads = ADS1015(i2c) # Create single-ended input on channel ...
python
MIT
d56c704d7924397e2aee26e65e750b68db626c17
2026-01-05T07:10:57.723495Z
false
adafruit/Adafruit_CircuitPython_ADS1x15
https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15/blob/d56c704d7924397e2aee26e65e750b68db626c17/adafruit_ads1x15/analog_in.py
adafruit_ads1x15/analog_in.py
# SPDX-FileCopyrightText: 2018 Carter Nelson for Adafruit Industries # # SPDX-License-Identifier: MIT """ `analog_in` ============================== AnalogIn for single-ended and differential ADC readings. * Author(s): Carter Nelson, adapted from MCP3xxx original by Brent Rubell """ try: from typing import Optio...
python
MIT
d56c704d7924397e2aee26e65e750b68db626c17
2026-01-05T07:10:57.723495Z
false
adafruit/Adafruit_CircuitPython_ADS1x15
https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15/blob/d56c704d7924397e2aee26e65e750b68db626c17/adafruit_ads1x15/ads1015.py
adafruit_ads1x15/ads1015.py
# SPDX-FileCopyrightText: 2018 Carter Nelson for Adafruit Industries # # SPDX-License-Identifier: MIT """ `ads1015` ==================================================== CircuitPython driver for ADS1015 ADCs. * Author(s): Carter Nelson """ import struct try: from typing import Dict, List from typing_extens...
python
MIT
d56c704d7924397e2aee26e65e750b68db626c17
2026-01-05T07:10:57.723495Z
false
adafruit/Adafruit_CircuitPython_ADS1x15
https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15/blob/d56c704d7924397e2aee26e65e750b68db626c17/adafruit_ads1x15/ads1x15.py
adafruit_ads1x15/ads1x15.py
# SPDX-FileCopyrightText: 2018 Carter Nelson for Adafruit Industries # # SPDX-License-Identifier: MIT """ `ads1x15` ==================================================== CircuitPython base class driver for ADS1015/1115 ADCs. * Author(s): Carter Nelson """ __version__ = "0.0.0+auto.0" __repo__ = "https://github.com/a...
python
MIT
d56c704d7924397e2aee26e65e750b68db626c17
2026-01-05T07:10:57.723495Z
false
adafruit/Adafruit_CircuitPython_ADS1x15
https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15/blob/d56c704d7924397e2aee26e65e750b68db626c17/adafruit_ads1x15/ads1115.py
adafruit_ads1x15/ads1115.py
# SPDX-FileCopyrightText: 2018 Carter Nelson for Adafruit Industries # # SPDX-License-Identifier: MIT """ `ads1115` ==================================================== CircuitPython driver for 1115 ADCs. * Author(s): Carter Nelson """ import struct try: from typing import Dict, List from typing_extension...
python
MIT
d56c704d7924397e2aee26e65e750b68db626c17
2026-01-05T07:10:57.723495Z
false
adafruit/Adafruit_CircuitPython_ADS1x15
https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15/blob/d56c704d7924397e2aee26e65e750b68db626c17/adafruit_ads1x15/__init__.py
adafruit_ads1x15/__init__.py
# SPDX-FileCopyrightText: 2018 Carter Nelson for Adafruit Industries # SPDX-FileCopyrightText: 2025 Asadullah Shaikh <github.com/pantheraleo-7> # # SPDX-License-Identifier: MIT """ `adafruit_ads1x15` ==================================================== Support for the ADS1x15 series of analog-to-digital converters. ...
python
MIT
d56c704d7924397e2aee26e65e750b68db626c17
2026-01-05T07:10:57.723495Z
false
zhengchen1999/CAT
https://github.com/zhengchen1999/CAT/blob/89cbfc88a337344d6dee76278c96e033ec38d5c6/test_real_denoising_dnd.py
test_real_denoising_dnd.py
# The implementation builds on Restormer code https://github.com/swz30/Restormer import numpy as np import os import argparse from tqdm import tqdm import torch import torch.nn as nn import torch.nn.functional as F from basicsr.archs.cat_unet_arch import CAT_Unet from skimage import img_as_ubyte import cv2 import h5p...
python
Apache-2.0
89cbfc88a337344d6dee76278c96e033ec38d5c6
2026-01-05T07:10:50.865533Z
false
zhengchen1999/CAT
https://github.com/zhengchen1999/CAT/blob/89cbfc88a337344d6dee76278c96e033ec38d5c6/setup.py
setup.py
#!/usr/bin/env python from setuptools import find_packages, setup import os import subprocess import time import torch from torch.utils.cpp_extension import BuildExtension, CppExtension, CUDAExtension version_file = 'basicsr/version.py' def readme(): with open('README.md', encoding='utf-8') as f: conte...
python
Apache-2.0
89cbfc88a337344d6dee76278c96e033ec38d5c6
2026-01-05T07:10:50.865533Z
false
zhengchen1999/CAT
https://github.com/zhengchen1999/CAT/blob/89cbfc88a337344d6dee76278c96e033ec38d5c6/test_real_denoising_sidd.py
test_real_denoising_sidd.py
# The implementation builds on Restormer code https://github.com/swz30/Restormer import numpy as np import os import argparse from tqdm import tqdm import torch import torch.nn as nn from basicsr.archs.cat_unet_arch import CAT_Unet import scipy.io as sio import cv2 from skimage import img_as_ubyte parser = argparse....
python
Apache-2.0
89cbfc88a337344d6dee76278c96e033ec38d5c6
2026-01-05T07:10:50.865533Z
false
zhengchen1999/CAT
https://github.com/zhengchen1999/CAT/blob/89cbfc88a337344d6dee76278c96e033ec38d5c6/basicsr/train.py
basicsr/train.py
import datetime import logging import math import time import torch from os import path as osp from basicsr.data import build_dataloader, build_dataset from basicsr.data.data_sampler import EnlargedSampler from basicsr.data.prefetch_dataloader import CPUPrefetcher, CUDAPrefetcher from basicsr.models import build_model...
python
Apache-2.0
89cbfc88a337344d6dee76278c96e033ec38d5c6
2026-01-05T07:10:50.865533Z
false
zhengchen1999/CAT
https://github.com/zhengchen1999/CAT/blob/89cbfc88a337344d6dee76278c96e033ec38d5c6/basicsr/version.py
basicsr/version.py
# GENERATED VERSION FILE # TIME: Thu Sep 22 07:20:35 2022 __version__ = '1.3.5' __gitsha__ = 'cbc9a18' version_info = (1, 3, 5)
python
Apache-2.0
89cbfc88a337344d6dee76278c96e033ec38d5c6
2026-01-05T07:10:50.865533Z
false
zhengchen1999/CAT
https://github.com/zhengchen1999/CAT/blob/89cbfc88a337344d6dee76278c96e033ec38d5c6/basicsr/__init__.py
basicsr/__init__.py
from .archs import * from .data import * from .metrics import * from .models import * from .test import * from .utils import *
python
Apache-2.0
89cbfc88a337344d6dee76278c96e033ec38d5c6
2026-01-05T07:10:50.865533Z
false
zhengchen1999/CAT
https://github.com/zhengchen1999/CAT/blob/89cbfc88a337344d6dee76278c96e033ec38d5c6/basicsr/test.py
basicsr/test.py
import logging import torch from os import path as osp from basicsr.data import build_dataloader, build_dataset from basicsr.models import build_model from basicsr.utils import get_root_logger, get_time_str, make_exp_dirs from basicsr.utils.options import dict2str, parse_options def test_pipeline(root_path): # p...
python
Apache-2.0
89cbfc88a337344d6dee76278c96e033ec38d5c6
2026-01-05T07:10:50.865533Z
false
zhengchen1999/CAT
https://github.com/zhengchen1999/CAT/blob/89cbfc88a337344d6dee76278c96e033ec38d5c6/basicsr/losses/loss_util.py
basicsr/losses/loss_util.py
import functools from torch.nn import functional as F def reduce_loss(loss, reduction): """Reduce loss as specified. Args: loss (Tensor): Elementwise loss tensor. reduction (str): Options are 'none', 'mean' and 'sum'. Returns: Tensor: Reduced loss tensor. """ reduction_en...
python
Apache-2.0
89cbfc88a337344d6dee76278c96e033ec38d5c6
2026-01-05T07:10:50.865533Z
false
zhengchen1999/CAT
https://github.com/zhengchen1999/CAT/blob/89cbfc88a337344d6dee76278c96e033ec38d5c6/basicsr/losses/losses.py
basicsr/losses/losses.py
import math import torch from torch import autograd as autograd from torch import nn as nn from torch.nn import functional as F from basicsr.archs.vgg_arch import VGGFeatureExtractor from basicsr.utils.registry import LOSS_REGISTRY from .loss_util import weighted_loss _reduction_modes = ['none', 'mean', 'sum'] @wei...
python
Apache-2.0
89cbfc88a337344d6dee76278c96e033ec38d5c6
2026-01-05T07:10:50.865533Z
false
zhengchen1999/CAT
https://github.com/zhengchen1999/CAT/blob/89cbfc88a337344d6dee76278c96e033ec38d5c6/basicsr/losses/__init__.py
basicsr/losses/__init__.py
from copy import deepcopy from basicsr.utils import get_root_logger from basicsr.utils.registry import LOSS_REGISTRY from .losses import (CharbonnierLoss, GANLoss, L1Loss, MSELoss, WeightedTVLoss, g_path_regularize, gradient_penalty_loss, r1_penalty) __all__ = [ 'L1Loss', 'MSELoss', 'Charbonn...
python
Apache-2.0
89cbfc88a337344d6dee76278c96e033ec38d5c6
2026-01-05T07:10:50.865533Z
false
zhengchen1999/CAT
https://github.com/zhengchen1999/CAT/blob/89cbfc88a337344d6dee76278c96e033ec38d5c6/basicsr/metrics/metric_util.py
basicsr/metrics/metric_util.py
import numpy as np from basicsr.utils.matlab_functions import bgr2ycbcr def reorder_image(img, input_order='HWC'): """Reorder images to 'HWC' order. If the input_order is (h, w), return (h, w, 1); If the input_order is (c, h, w), return (h, w, c); If the input_order is (h, w, c), return as it is. ...
python
Apache-2.0
89cbfc88a337344d6dee76278c96e033ec38d5c6
2026-01-05T07:10:50.865533Z
false
zhengchen1999/CAT
https://github.com/zhengchen1999/CAT/blob/89cbfc88a337344d6dee76278c96e033ec38d5c6/basicsr/metrics/__init__.py
basicsr/metrics/__init__.py
from copy import deepcopy from basicsr.utils.registry import METRIC_REGISTRY from .psnr_ssim import calculate_psnr, calculate_ssim __all__ = ['calculate_psnr', 'calculate_ssim'] def calculate_metric(data, opt): """Calculate metric from data and options. Args: opt (dict): Configuration. It must cont...
python
Apache-2.0
89cbfc88a337344d6dee76278c96e033ec38d5c6
2026-01-05T07:10:50.865533Z
false