text:
---
---

@string{iclr = {International Conference on Learning Representations (ICLR),}}
@string{aaai = {AAAI Conference on Artificial Intelligence (AAAI),}}
@string{icml = {International Conference on Machine Learning (ICML),}}
@string{neurips = {Annual Conference on Neural Information Processing System (NeurIPS),}}
@string{cvpr = {IEEE Conference on Computer Vision and Pattern Recognition (CVPR),}}
@string{eccv = {European Conference on Computer Vision (ECCV),}}
@string{icdm = {IEEE International Conference on Data Mining (ICDM),}}
@string{sigir = {ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR),}}
@string{wsdm = {ACM International WSDM Conference (WSDM),}}
@string{cc = {Critical Care,}}
@string{spl = {IEEE Signal Processing Letters,}}
@string{tweb = {ACM Transcations on the Web,}}
@string{wacv = {IEEE Winter Conference on Applications of Computer Vision (WACV),}}
@string{icassp = {IEEE International Conference on Acoustics, Speech, and Signal Processing
                  (ICASSP),}}

@inproceedings{yoon2020iclr,
    author = {Yoon, Jaehong and Kim, Saehoon and
              Yang, Eunho and Hwang, Sung Ju},
    title  = {Scalable and Order-robust Continual Learning
              with Additive Parameter Decomposition},
    booktitle = iclr,
    year   = 2020
}

@inproceedings{park2019arxiv,
    author = {Park, Sunho and Kim, Saehoon and Xu, Hongmin and Hwang, Tae Hyun},
    title  = {Deep Gaussian Processes for Weakly Supervised Learning: Tumor Mutation Burden (TMB) Prediction},
    booktitle = {NeurIPS 2019 Workshop on Bayesian Deep Learning,},
    year   = 2019
}

@inproceedings{liu2019iclr,
    author = {Liu, Yanbin and Lee, Juho and Park, Minseop and Kim, Saehoon
              and Yang, Eunho and Hwang, Sung Ju and Yang, Yi},
    title  = {Learning to Propagate Labels: Transductive Propagation
              Network for Few-shot Learning},
    booktitle = iclr,
    year   = 2019
}

@article{Kim2019cc,
    author = {Kim*, Soo Yeon and Kim*, Saehoon and Cho, Joongbum and Sol,
              In Suk and Sung, Youngchul and Cho, Inhyeok and
              Park, Minseop and Jang, Haerin and Kim, Yoon Hee and
              Kim, Kyung Won and Sohn, Myung Hyun},
    title = {A Deep Learning Model for Real-time Mortality Prediction
             in Critically-ill Children},
    journal = cc,
    year = 2019
}

@inproceedings{kim2019aml,
    author = {Kim, Jungtaek and McCourt, Michael and You, Tackgeun
              and Kim, Saehoon and Choi, Seungjin},
    title  = {Bayesian Optimization over Sets},
    booktitle = {ICML'19 Workshop on Automated Machine Learning,},
    year   = 2019
}

@inproceedings{Park2018meta,
    author = {Park, Minseop and Kim, Saehoon and Kim, Jungtaek
              and Liu, Yanbin and Choi, Seungjin},
    title  = {TAEML: Task-Adaptive Ensemble of Meta-Learners},
    booktitle = {NeurIPS'18 Workshop on Meta-Learning,},
    year   = 2018
}

@inproceedings{lee2018arxiv,
    author = {Lee, Juho and Kim, Saehoon and Yoon, Jaehong and
              Lee, Hae Beom and Yang, Eunho and Hwang, Sung Ju},
    title  = {Adaptive Network Sparsification with Dependent Variational Beta-Bernoulli Dropout},
    booktitle = {arXiv preprint arXiv:1805.10896,},
    year   = 2018
}

@inproceedings{lee2018nips,
    author = {Lee, Hae Beom and Lee, Juho and Kim, Saehoon
              and Yang, Eunho and Hwang, Sung Ju},
    title  = {DropMax: Adaptive Variational Softmax},
    booktitle = neurips,
    year   = 2018
}

@inproceedings{Heo2018nips,
    author = {Heo, Jay and Lee, Hae Beom and Kim, Saehoon
              and Lee, Juho and Kim, Kwang Joon and Yang, Eunho
              and Hwang, Sung Ju},
    title  = {Uncertainty-Aware Attention for Reliable
              Interpretation and Prediction},
    booktitle = neurips,
    year   = 2018
}

@article{Kim2018spl,
    author = {Kim, Saehoon and Choi, Seungjin},
    title  = {Sparse Circulant Binary Embedding:
              An Asymptotic Analysis},
    journal = spl,
    year   = 2018
}

@inproceedings{Kim2018aaai,
    author = {Kim, Saehoon and Kim, Jungtaek and Choi, Seungjin},
    title  = {On the Optimal Bit Complexity of Circulant Binary Embedding},
    booktitle = aaai,
    year   = 2018
}

@inproceedings{Hwang2018aaai,
    author = {Hwang, Yoonho and Baek, Moo-yeol and Kim, Saehoon
              and Han, Bohyung and Ahn, Hee-kap},
    title  = {Product Qunatized Translations for Fast Nearest Neighbor Search},
    booktitle = aaai,
    year   = 2018
}

@inproceedings{Kim2017aaai,
    author = {Kim, Saehoon and Choi, Seungjin},
    title  = {Binary Embedding with Additive Homogeneous Kernels},
    booktitle = aaai,
    year   = 2017
}

@inproceedings{Kim2017bo,
    author = {Kim, Jungtaek and Kim, Saehoon and Choi, Seungjin},
    title  = {Learning to Transfer Initializations for Bayesian
              Hyperparameter Optimization},
    booktitle = {NeurIPS'17 Workshop on Bayesian Optimization,},
    year   = 2017
}

@article{Hwang2016tweb,
    author = {Hwang, Seungwon and Kim, Saehoon and He, Yuxiong
              and Elnikety, Sameh and Choi, Seungjin},
    title  = {Prediction and Predictability for Search
              Query Acceleration},
    journal = tweb,
    year   = 2016
}

@inproceedings{Kim2015cvpr,
    author = {Kim, Saehoon and Choi, Seungjin},
    title  = {Bilinear Random Projections for Locality-Sensitive
              Binary Codes},
    booktitle = cvpr,
    year   = 2015
}

@inproceedings{Kim2015wsdm,
    author = {Kim, Saehoon and He, Yuxiong and Hwang, Seungwon
              and Elnikety, Sameh and Choi, Seungjin},
    title  = {DDS Prediction: Reducing Extreme Tail Latency in Web Search},
    booktitle = wsdm,
    year   = 2015
}

@inproceedings{Kim2015wacv,
    author = {Kim, Saehoon and Wang, Xin-Jing and Zhang, Lei and Choi, Seungjin},
    title  = {Near-Duplicate Image Discovery on One Billion Images},
    booktitle = wacv,
    year   = 2015
}

@inproceedings{Jeon2014sigir,
    author = {Jeon, Myeongjae and Kim, Saehoon and Hwang, Seung-won
              and He, Yuxiong and Elnikety, Sameh and Cox, L. Alex
              and Rixner, Scott},
    title  = {Predictive Parallelization: Taming Tail Latencies in Web Search},
    booktitle = sigir,
    year   = 2014
}

@inproceedings{Kim2013icassp,
    author = {Kim, Saehoon and Choi, Seungjin},
    title  = {Multi-view Anchor Graph Hashing},
    booktitle = icassp,
    year   = 2013
}

@inproceedings{Yun2012icdm,
    author = {Yun, Jeong-Min and Kim, Saehoon and Choi, Seungjin},
    title  = {Hashing with Generalized Nystr\"om Approximation},
    booktitle = icdm,
    year   = 2012
}

@inproceedings{Kang2012icdm,
    author = {Kang, Yoonseop and Kim, Saehoon and Choi, Seungjin},
    title  = {Deep Learning to Hash with Multiple Representations},
    booktitle = icdm,
    year   = 2012
}

@inproceedings{Kim2012eccv,
    author = {Kim, Saehoon and Kang, Yoonseop and Choi, Seungjin},
    title  = {Sequential Spectral Learning to Hash with Multiple Representations},
    booktitle = eccv,
    year   = 2012
}

@inproceedings{Kim2011icdm,
    author = {Kim, Saehoon and Choi, Seungjin},
    title  = {Semi-Supervised Discriminant Hashing},
    booktitle = icdm,
    year   = 2011
}

@inproceedings{Kim2010mlsp,
    author = {Kim, Saehoon and Choi, Seungjin},
    title  = {Local Dimensionality Reduction for Multiple Instance Learning},
    booktitle = {IEEE International Workshop on Machine Learning for Signal Processing,},
    year   = 2010
}

repository: saehoonkim/al-folio

repo_name: saehoonkim/al-folio


text:
require linux-omap3.inc

COMPATIBLE_MACHINE = "ti814x"

KVER = "2.6.37"
PSPREL = "04.01.00.05.patch1"

BRANCH = "ti81xx-master"
# Use literal tags in SRCREV, when available, instead of commit IDs
SRCREV = "v2.6.37_TI814XPSP_04.01.00.05.patch1"

SRC_URI += "file://config-hdmi-wrapper-drive-venc-clock.patch \
            file://0001-ti814x-Force-Enable-I2C-Clock.patch \
            file://0001-board-ti8148-Fix-orientation-of-touchscreen-to-match.patch \
"

license: MIT

license_type: permissive

branch_name: refs/heads/master

extension: bb


text:
---
---

@InProceedings{MichaelTuDelft,
  author         = {Michael Niemeyer},
  title          = {Neural Scene Representations and Differentiable Rendering},
  booktitle      = {Delft University of Technology},
  year           = {2022},
  slides         = {https://m-niemeyer.github.io/assets/pdf/diffrend-slides.pdf},
  img            = {assets/img/talks/diffrend.jpg},
}

@InProceedings{MichaelGames,
  author         = {Michael Niemeyer},
  title          = {Implicit Neural Scene Representations and 3D-Aware Generative Modelling},
  booktitle      = {GAMES Webinar Series},
  year           = {2022},
  slides         = {https://m-niemeyer.github.io/assets/pdf/games-slides.pdf},
  img            = {assets/img/talks/games-talk.jpg},
}

@InProceedings{MichaelAdobe,
  author         = {Michael Niemeyer},
  title          = {Generative Neural Scene Representations},
  booktitle      = {Adobe Research},
  year           = {2021},
  slides         = {https://m-niemeyer.github.io/assets/pdf/gnsr-slides.pdf},
  img            = {assets/img/talks/adobe-pres.jpg},
}

@InProceedings{MichaelTUM,
  author         = {Michael Niemeyer},
  title          = {Implicit Scene Representations and Neural Rendering},
  booktitle      = {Technical University Munic - AI Lecture Series},
  year           = {2021},
  slides         = {https://m-niemeyer.github.io/assets/pdf/isr_nr.pdf},
  img            = {assets/img/talks/tum-lecture-img.jpg},
}

@InProceedings{MichaelAIT,
  author         = {Michael Niemeyer},
  title          = {Generative Neural Scene Representations for 3D-Aware Image Synthesis},
  booktitle      = {AIT (ETH)},
  year           = {2021},
  slides         = {https://m-niemeyer.github.io/assets/pdf/gnsr_slides.pdf},
  img            = {assets/img/talks/amazon.jpg},
}

@InProceedings{MichaelAmazon,
  author         = {Michael Niemeyer},
  title          = {Generative Neural Scene Representations for 3D-Aware Image Synthesis},
  booktitle      = {Amazon Research},
  year           = {2021},
  slides         = {https://m-niemeyer.github.io/assets/pdf/gnsr_slides.pdf},
  img            = {assets/img/talks/amazon.jpg},
}

@InProceedings{MichaelMIT,
  author         = {Michael Niemeyer},
  title          = {Generative Neural Scene Representations for 3D-Aware Image Synthesis},
  booktitle      = {Massachusetts Institute of Technology},
  year           = {2021},
  video          = {https://www.youtube.com/watch?v=scnXyCSMJF4},
  img            = {assets/img/talks/mit.jpg},
  slides         = {https://yenchenlin.me/3D-representation-reading/assets/Michael.pdf},
}

@InProceedings{NiemeyerFraunhofer,
  author         = {Michael Niemeyer},
  title          = {KI Forschung und 3D Deep Learning},
  booktitle      = {Frauenhofer IAO event 100 KI Talents},
  year           = {2020},
  video          = {https://www.youtube.com/watch?v=lpX85uNFZ0s},
  img            = {assets/img/talks/fraunhofer.jpg},
  slides         = {https://tiny.cc/100-ki-talente},
}

@InProceedings{MichaelNvidia,
  author         = {Michael Niemeyer},
  title          = {3D Deep Learning in Function Space},
  booktitle      = {NVIDIA. NVIDIA GPU Technology Conference (GTC)},
  year           = {2020},
  video          = {https://www.youtube.com/watch?v=U_jIN3qWVEw},
  img            = {assets/img/talks/gtc.jpg},
  slides         = {https://m-niemeyer.github.io/slides/gtc/},
}

extension: bib


text:
SUMMARY = "Prepare environment for cross building/debugging with QtCreator"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

inherit qmake5_base instant-toolchain-target

DEPENDS = "qtbase"

deltask do_prepare_recipe_sysroot

do_install[depends] = "qtbase:do_copy_to_target_sysroot"
do_install[nostamp] = "1"

do_install() {
    # inject qt.conf into native sysroot
    qtconf=`basename ${OE_QMAKE_QTCONF_PATH}`
    sourcepath=${INSTANT_TARGET_PATH}${OE_QMAKE_PATH_HOST_BINS}
    targetpath=${INSTANT_NATIVE_PATH}${OE_QMAKE_PATH_HOST_BINS}
    # be sure we remove old link (if any...)
    rm -f $targetpath/$qtconf
    cp $sourcepath/$qtconf $targetpath/
}

ALLOW_EMPTY:${PN} = "1"

# An image installing this requires the following packages at least for working
# instant sdk support
RDEPENDS:${PN} = " \
    qtbase \
    gdbserver \
    ${TASK_BASIC_SSHDAEMON} \
"

repository: ZeraGmbH/meta-mortsgna

repo_name: ZeraGmbH/meta-mortsgna

gha_license_id: MIT


text:
% This file was created with JabRef 2.10.
% Encoding: Cp1252

@Article{lucyAstro1974,
  Title                    = {An iterative technique for the rectification of observed distributions},
  Author                   = {Lucy, L. B.},
  Journal                  = {The Astronomical Journal},
  Year                     = {1974},

  Month                    = jun,
  Pages                    = {745},
  Volume                   = {79},

  Doi                      = {10.1086/111605}
}

@Article{TainOtt2007,
  Title                    = {Algorithms for the analysis of $\beta{}$-decay total absorption spectra},
  Author                   = {J.L. Tain and D. Cano-Ott},
  Journal                  = {NIMA},
  Year                     = {2007},
  Number                   = {3},
  Pages                    = {728 - 738},
  Volume                   = {571},

  Doi                      = {https://doi.org/10.1016/j.nima.2006.10.098},
  ISSN                     = {0168-9002},
  Keywords                 = {$\Beta{}$-decay strength distribution, Total absorption gamma-ray spectroscopy, Solution of ill-posed inverse problems},
  Url                      = {http://www.sciencedirect.com/science/article/pii/S0168900206018985}
}


text:
package model

import (
	"08_ihome/apiv1.0/handler"
	"github.com/jinzhu/gorm"
)

type User struct {
	gorm.Model
	Name string           `json:"name" gorm:"not null"`
	Password_hash string  `json:"password_hash" gorm:"not null"`
	Mobile string         `json:"mobile" gorm:"not null"`
	Real_name string      `json:"real_name"`
	Id_card string        `json:"id_card"`
	Avatar_url string     `json:"name"`
	Houses []Houses       `gorm:"foreignkey:UserID"`
	Orders []Orders
}

func ExistUserByID(mobile string) bool {
	var user User
	db.Select("mobile").Where("mobile=?",mobile).First(&user)
	if user.Mobile != "" {
		return true
	}
	return false
}

func AddUser(u handler.Register) bool {
	user := User {
		Name : u.Name,
		Password_hash : u.Pwd,
		Mobile : u.Mobile,
	}
	db.Create(&user)
	return true
}

func GetUser(mobile string) (user User) {
	db.Where("mobile = ?", mobile).First(&user)
	return
}

func Update(id int, data interface{}) bool {
	var user User
	db.Model(&user).Where("id = ?",id).Update(data)
	return true
}

func Login(mobile string, pwd string) bool {
	user := GetUser(mobile)
	if user.Password_hash != pwd {
		return false
	}
	return true
}

repository: kongerlengzi/ihome

repo_name: kongerlengzi/ihome

extension: go


text:
package tree

// InorderValues returns the values of each node in the tree in order of left < root < right
func (root *Node) InorderValues(actions ...func(*Node)) []int {
	var values []int

	left, right := root.Left, root.Right

	if !left.IsEmpty() {
		values = append(values, left.InorderValues(actions...)...)
	}

	values = append(values, process(root, actions...))

	if !right.IsEmpty() {
		values = append(values, right.InorderValues(actions...)...)
	}

	return values
}

// PreorderValues returns the values of each node in the tree in order of root < left < right
func (root *Node) PreorderValues(actions ...func(*Node)) []int {
	var values []int

	left, right := root.Left, root.Right

	values = append(values, process(root, actions...))

	if !left.IsEmpty() {
		values = append(values, left.InorderValues(actions...)...)
	}

	if !right.IsEmpty() {
		values = append(values, right.InorderValues(actions...)...)
	}

	return values
}

// PostorderValues returns the values of each node in the tree in order of left < right < root
func (root *Node) PostorderValues(actions ...func(*Node)) []int {
	var values []int

	left, right := root.Left, root.Right

	if !left.IsEmpty() {
		values = append(values, left.InorderValues(actions...)...)
	}

	if !right.IsEmpty() {
		values = append(values, right.InorderValues(actions...)...)
	}

	values = append(values, process(root, actions...))

	return values
}

func process(node *Node, actions ...func(*Node)) int {
	for _, actOn := range actions {
		actOn(node)
	}

	return node.Val
}

repository: Jared-Prime/leetcode

repo_name: Jared-Prime/leetcode


text:
package gen

import (
	"database/sql"
	_ "embed"
	"os"
	"path"
	"path/filepath"
	"strings"
	"testing"
	"time"

	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"

	"github.com/zeromicro/go-zero/core/logx"
	"github.com/zeromicro/go-zero/core/stores/builder"
	"github.com/zeromicro/go-zero/core/stringx"
	"github.com/zeromicro/go-zero/tools/goctl/config"
	"github.com/zeromicro/go-zero/tools/goctl/model/sql/parser"
	"github.com/zeromicro/go-zero/tools/goctl/util/pathx"
)

//go:embed testdata/user.sql
var source string

func TestCacheModel(t *testing.T) {
	logx.Disable()
	_ = Clean()

	sqlFile := filepath.Join(pathx.MustTempDir(), "tmp.sql")
	err := os.WriteFile(sqlFile, []byte(source), 0o777)
	assert.Nil(t, err)

	dir := filepath.Join(pathx.MustTempDir(), "./testmodel")
	cacheDir := filepath.Join(dir, "cache")
	noCacheDir := filepath.Join(dir, "nocache")
	g, err := NewDefaultGenerator(cacheDir, &config.Config{
		NamingFormat: "GoZero",
	})
	assert.Nil(t, err)

	err = g.StartFromDDL(sqlFile, true, false, "go_zero")
	assert.Nil(t, err)
	assert.True(t, func() bool {
		_, err := os.Stat(filepath.Join(cacheDir, "TestUserModel.go"))
		return err == nil
	}())
	g, err = NewDefaultGenerator(noCacheDir, &config.Config{
		NamingFormat: "gozero",
	})
	assert.Nil(t, err)

	err = g.StartFromDDL(sqlFile, false, false, "go_zero")
	assert.Nil(t, err)
	assert.True(t, func() bool {
		_, err := os.Stat(filepath.Join(noCacheDir, "testusermodel.go"))
		return err == nil
	}())
}

func TestNamingModel(t *testing.T) {
	logx.Disable()
	_ = Clean()

	sqlFile := filepath.Join(pathx.MustTempDir(), "tmp.sql")
	err := os.WriteFile(sqlFile, []byte(source), 0o777)
	assert.Nil(t, err)

	dir, _ := filepath.Abs("./testmodel")
	camelDir := filepath.Join(dir, "camel")
	snakeDir := filepath.Join(dir, "snake")
	defer func() {
		_ = os.RemoveAll(dir)
	}()
	g, err := NewDefaultGenerator(camelDir, &config.Config{
		NamingFormat: "GoZero",
	})
	assert.Nil(t, err)

	err = g.StartFromDDL(sqlFile, true, false, "go_zero")
	assert.Nil(t, err)
	assert.True(t, func() bool {
		_, err := os.Stat(filepath.Join(camelDir, "TestUserModel.go"))
		return err == nil
	}())
	g, err = NewDefaultGenerator(snakeDir, &config.Config{
		NamingFormat: "go_zero",
	})
	assert.Nil(t, err)

	err = g.StartFromDDL(sqlFile, true, false, "go_zero")
	assert.Nil(t, err)
	assert.True(t, func() bool {
		_, err := os.Stat(filepath.Join(snakeDir, "test_user_model.go"))
		return err == nil
	}())
}

func TestFolderName(t *testing.T) {
	logx.Disable()
	_ = Clean()

	sqlFile := filepath.Join(pathx.MustTempDir(), "tmp.sql")
	err := os.WriteFile(sqlFile, []byte(source), 0o777)
	assert.Nil(t, err)

	dir, _ := filepath.Abs("./testmodel")
	camelDir := filepath.Join(dir, "go-camel")
	snakeDir := filepath.Join(dir, "go-snake")
	defer func() {
		_ = os.RemoveAll(dir)
	}()
	g, err := NewDefaultGenerator(camelDir, &config.Config{
		NamingFormat: "GoZero",
	})
	assert.Nil(t, err)

	pkg := g.pkg

	err = g.StartFromDDL(sqlFile, true, true, "go_zero")
	assert.Nil(t, err)
	assert.True(t, func() bool {
		_, err := os.Stat(filepath.Join(camelDir, "TestUserModel.go"))
		return err == nil
	}())
	assert.Equal(t, pkg, g.pkg)

	g, err = NewDefaultGenerator(snakeDir, &config.Config{
		NamingFormat: "go_zero",
	})
	assert.Nil(t, err)

	err = g.StartFromDDL(sqlFile, true, true, "go_zero")
	assert.Nil(t, err)
	assert.True(t, func() bool {
		_, err := os.Stat(filepath.Join(snakeDir, "test_user_model.go"))
		return err == nil
	}())
}

func TestWrapWithRawString(t *testing.T) {
	assert.Equal(t, "``", wrapWithRawString("", false))
	assert.Equal(t, "``", wrapWithRawString("``", false))
	assert.Equal(t, "`a`", wrapWithRawString("a", false))
	assert.Equal(t, "a", wrapWithRawString("a", true))
	assert.Equal(t, "`   `", wrapWithRawString("   ", false))
}

func TestFields(t *testing.T) {
	type Student struct {
		ID         int64           `db:"id"`
		Name       string          `db:"name"`
		Age        sql.NullInt64   `db:"age"`
		Score      sql.NullFloat64 `db:"score"`
		CreateTime time.Time       `db:"create_time"`
		UpdateTime sql.NullTime    `db:"update_time"`
	}
	var (
		studentFieldNames          = builder.RawFieldNames(&Student{})
		studentRows                = strings.Join(studentFieldNames, ",")
		studentRowsExpectAutoSet   = strings.Join(stringx.Remove(studentFieldNames, "`id`", "`create_time`", "`update_time`"), ",")
		studentRowsWithPlaceHolder = strings.Join(stringx.Remove(studentFieldNames, "`id`", "`create_time`", "`update_time`"), "=?,") + "=?"
	)

	assert.Equal(t, []string{"`id`", "`name`", "`age`", "`score`", "`create_time`", "`update_time`"}, studentFieldNames)
	assert.Equal(t, "`id`,`name`,`age`,`score`,`create_time`,`update_time`", studentRows)
	assert.Equal(t, "`name`,`age`,`score`", studentRowsExpectAutoSet)
	assert.Equal(t, "`name`=?,`age`=?,`score`=?", studentRowsWithPlaceHolder)
}

func Test_genPublicModel(t *testing.T) {
	var err error
	dir := pathx.MustTempDir()
	modelDir := path.Join(dir, "model")
	err = os.MkdirAll(modelDir, 0o777)
	require.NoError(t, err)
	defer os.RemoveAll(dir)

	modelFilename := filepath.Join(modelDir, "foo.sql")
	err = os.WriteFile(modelFilename, []byte(source), 0o777)
	require.NoError(t, err)

	g, err := NewDefaultGenerator(modelDir, &config.Config{
		NamingFormat: config.DefaultFormat,
	})
	require.NoError(t, err)

	tables, err := parser.Parse(modelFilename, "", false)
	require.Equal(t, 1, len(tables))

	code, err := g.genModelCustom(*tables[0], false)
	assert.NoError(t, err)
	assert.True(t, strings.Contains(code, "package model"))
	assert.True(t, strings.Contains(code, "TestUserModel interface {\n\t\ttestUserModel\n\t}\n"))
	assert.True(t, strings.Contains(code, "customTestUserModel struct {\n\t\t*defaultTestUserModel\n\t}\n"))
	assert.True(t, strings.Contains(code, "func NewTestUserModel(conn sqlx.SqlConn) TestUserModel {"))
}