text:
// Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"). You may not
// use this file except in compliance with the License. A copy of the
// License is located at
//
// http://aws.amazon.com/apache2.0/
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
// implied. See the License for the specific language governing
// permissions and limitations under the License.

//go:build e2e
// +build e2e

package s3resource

import (
	"os"
	"path/filepath"
	"strings"
	"testing"

	"github.com/aws/amazon-ssm-agent/agent/appconfig"
	"github.com/aws/amazon-ssm-agent/agent/fileutil/artifact"
	filemock "github.com/aws/amazon-ssm-agent/agent/fileutil/filemanager/mock"
	"github.com/aws/amazon-ssm-agent/agent/mocks/context"
	"github.com/aws/amazon-ssm-agent/agent/plugins/downloadcontent/mocks/s3resource"
	"github.com/aws/amazon-ssm-agent/agent/s3util"
	"github.com/stretchr/testify/assert"
)

var contextMock = context.NewMockDefault()

func TestS3Resource_ValidateLocationInfoPath(t *testing.T) {

	locationInfo := `{
		"Path": "newpath"
	}`

	s3resource, _ := NewS3Resource(contextMock, locationInfo)
	_, err := s3resource.ValidateLocationInfo()

	assert.NoError(t, err)
}

func TestS3Resource_ValidateLocationInfoNoPath(t *testing.T) {

	locationInfo := `{
		"path": ""
	}`

	s3resource, _ := NewS3Resource(contextMock, locationInfo)
	_, err := s3resource.ValidateLocationInfo()

	assert.Error(t, err)
	assert.Equal(t, err.Error(), "S3 source path in SourceInfo must be specified")
}

func TestIsFolder_JSON(t *testing.T) {
	res := isPathType("nameOfFolder/nameOfFile.json")

	assert.False(t, res)
}

func TestIsFolder_Folder(t *testing.T) {
	res := isPathType("nameOfFolder/someOtherFolder/")

	assert.True(t, res)
}

func TestS3Resource_GetS3BucketURLString(t *testing.T) {
	resource := &S3Resource{
		context: contextMock,
		Info:    S3Info{Path: "https://s3.amazonaws.com/ssm-test-agent-bucket/mydummyfolder/myfile.ps"},
		s3Object: s3util.AmazonS3URL{
			Bucket: "ssm-test-agent-bucket",
		},
	}

	res, err := resource.getS3BucketURLString()

	assert.Equal(t, "https://s3.us-east-1.amazonaws.com/ssm-test-agent-bucket", res.String())
	assert.NoError(t, err)
}

func TestS3Resource_GetS3BucketURLString_sameBucketNameFile(t *testing.T) {
	resource := &S3Resource{
		context: contextMock,
		Info:    S3Info{Path: "https://s3.amazonaws.com/ssm-test-agent-bucket/mydummyfolder/my-bucket.ps"},
		s3Object: s3util.AmazonS3URL{
			Bucket: "ssm-test-agent-bucket",
		},
	}

	res, err := resource.getS3BucketURLString()

	assert.Equal(t, "https://s3.us-east-1.amazonaws.com/ssm-test-agent-bucket", res.String())
	assert.NoError(t, err)
}

func TestS3Resource_GetS3BucketURLString_hyphenatedEndpoint(t *testing.T) {
	resource := &S3Resource{
		context: contextMock,
		Info:    S3Info{Path: "https://s3-us-east-1.amazonaws.com/ssm-test-agent-bucket/mydummyfolder/my-bucket.ps"},
		s3Object: s3util.AmazonS3URL{
			Bucket: "ssm-test-agent-bucket",
		},
	}

	res, err := resource.getS3BucketURLString()

	assert.Equal(t, "https://s3.us-east-1.amazonaws.com/ssm-test-agent-bucket", res.String())
	assert.NoError(t, err)
}

func TestS3Resource_GetS3BucketURLString_bucketNameInS3URL(t *testing.T) {
	resource := &S3Resource{
		context: contextMock,
		Info:    S3Info{Path: "https://ssm-test-agent-bucket.s3.amazonaws.com/mydummyfolder/my-bucket.ps"},
		s3Object: s3util.AmazonS3URL{
			Bucket: "ssm-test-agent-bucket",
		},
	}

	res, err := resource.getS3BucketURLString()

	assert.Equal(t, "https://s3.us-east-1.amazonaws.com/ssm-test-agent-bucket", res.String())
	assert.NoError(t, err)
}

func TestS3Resource_Download(t *testing.T) {

	depMock := new(s3resource.S3DepMock)
	locationInfo := `{
		"path" : "https://s3.amazonaws.com/ssm-test-agent-bucket/mydummyfolder/file.rb"
	}`
	fileMock := &filemock.FileSystemMock{}

	fileMock.On("IsDirectory", "destination").Return(true)
	fileMock.On("Exists", "destination").Return(true)
	resource, _ := NewS3Resource(contextMock, locationInfo)

	input := artifact.DownloadInput{
		DestinationDirectory: "destination",
		SourceURL:            "https://s3.us-east-1.amazonaws.com/ssm-test-agent-bucket/mydummyfolder/file.rb",
	}
	output := artifact.DownloadOutput{
		LocalFilePath: input.DestinationDirectory,
	}

	s3Object := s3util.AmazonS3URL{
		IsValidS3URI: true,
		IsPathStyle:  true,
		Bucket:       "ssm-test-agent-bucket",
		Key:          "mydummyfolder/file.rb",
		Region:       "us-east-1",
	}
	var folders []string
	depMock.On("Download", contextMock, input).Return(output, nil)
	depMock.On("ListS3Directory", contextMock, s3Object).Return(folders, nil)

	fileMock.On("MoveAndRenameFile", ".", "destination", ".", "file.rb").Return(true, nil)

	dep = depMock
	err, result := resource.DownloadRemoteResource(fileMock, "destination")

	assert.NoError(t, err)
	depMock.AssertExpectations(t)
	fileMock.AssertExpectations(t)
	assert.NotNil(t, result)
	assert.Equal(t, 1, len(result.Files))
	assert.Equal(t, filepath.Join("destination", "file.rb"), result.Files[0])
}

func TestS3Resource_DownloadDirectory(t *testing.T) {
	depMock := new(s3resource.S3DepMock)
	locationInfo := `{
		"Path" : "https://s3.amazonaws.com/ssm-test-agent-bucket/foldername"
	}`
	downloadsDirectory := strings.TrimSuffix(appconfig.DownloadRoot, string(os.PathSeparator))
	fileMock := &filemock.FileSystemMock{}
	resource, _ := NewS3Resource(contextMock, locationInfo)

	input1 := artifact.DownloadInput{
		DestinationDirectory: downloadsDirectory,
		SourceURL:            "https://s3.us-east-1.amazonaws.com/ssm-test-agent-bucket/foldername/filename.ps",
	}
	input2 := artifact.DownloadInput{
		DestinationDirectory: downloadsDirectory,
		SourceURL:            "https://s3.us-east-1.amazonaws.com/ssm-test-agent-bucket/foldername/anotherfile.ps",
	}
	s3Object := s3util.AmazonS3URL{
		IsValidS3URI: true,
		IsPathStyle:  true,
		Bucket:       "ssm-test-agent-bucket",
		Key:          "foldername",
		Region:       "us-east-1",
	}
	output1 := artifact.DownloadOutput{
		LocalFilePath: filepath.Join(input1.DestinationDirectory, "randomfilename"),
	}
	output2 := artifact.DownloadOutput{
		LocalFilePath: filepath.Join(input2.DestinationDirectory, "anotherrandomfile"),
	}
	var folders []string
	folders = append(folders, "foldername/filename.ps")
	folders = append(folders, "foldername/anotherfile.ps")
	depMock.On("Download", contextMock, input1).Return(output1, nil).Once()
	depMock.On("Download", contextMock, input2).Return(output2, nil).Once()
	depMock.On("ListS3Directory", contextMock, s3Object).Return(folders, nil)

	fileMock.On("MoveAndRenameFile", downloadsDirectory, "randomfilename", downloadsDirectory, "filename.ps").Return(true, nil)
	fileMock.On("MoveAndRenameFile", downloadsDirectory, "anotherrandomfile", downloadsDirectory, "anotherfile.ps").Return(true, nil)

	dep = depMock
	err, result := resource.DownloadRemoteResource(fileMock, "")

	assert.NoError(t, err)
	depMock.AssertExpectations(t)
	fileMock.AssertExpectations(t)
	assert.NotNil(t, result)
	assert.Equal(t, 2, len(result.Files))
	assert.Equal(t, filepath.Join(downloadsDirectory, "filename.ps"), result.Files[0])
	assert.Equal(t, filepath.Join(downloadsDirectory, "anotherfile.ps"), result.Files[1])
}

func TestS3Resource_DownloadDirectoryWithSubFolders(t *testing.T) {
	depMock := new(s3resource.S3DepMock)
	locationInfo := `{
		"Path" : "https://s3.amazonaws.com/ssm-test-agent-bucket/foldername"
	}`
	downloadsDirectory := strings.TrimSuffix(appconfig.DownloadRoot, string(os.PathSeparator))
	fileMock := &filemock.FileSystemMock{}
	resource, _ := NewS3Resource(contextMock, locationInfo)

	input1 := artifact.DownloadInput{
		DestinationDirectory: downloadsDirectory,
		SourceURL:            "https://s3.us-east-1.amazonaws.com/ssm-test-agent-bucket/foldername/filename.ps",
	}
	input2 := artifact.DownloadInput{
		DestinationDirectory: downloadsDirectory,
		SourceURL:            "https://s3.us-east-1.amazonaws.com/ssm-test-agent-bucket/foldername/anotherfile.ps",
	}
	input3 := artifact.DownloadInput{
		DestinationDirectory: strings.TrimSuffix(filepath.Join(appconfig.DownloadRoot, "subfolder"), string(os.PathSeparator)),
		SourceURL:            "https://s3.us-east-1.amazonaws.com/ssm-test-agent-bucket/foldername/subfolder/file.ps",
	}
	s3Object := s3util.AmazonS3URL{
		IsValidS3URI: true,
		IsPathStyle:  true,
		Bucket:       "ssm-test-agent-bucket",
		Key:          "foldername",
		Region:       "us-east-1",
	}
	output1 := artifact.DownloadOutput{
		LocalFilePath: filepath.Join(input1.DestinationDirectory, "randomfilename"),
	}
	output2 := artifact.DownloadOutput{
		LocalFilePath: filepath.Join(input2.DestinationDirectory, "anotherrandomfile"),
	}
	output3 := artifact.DownloadOutput{
		LocalFilePath: filepath.Join(input3.DestinationDirectory, "justanumber"),
	}

	var folders []string
	folders = append(folders, "foldername/filename.ps")
	folders = append(folders, "foldername/anotherfile.ps")
	folders = append(folders, "foldername/subfolder/")
	folders = append(folders, "foldername/subfolder/file.ps")
	depMock.On("Download", contextMock, input1).Return(output1, nil).Once()
	depMock.On("Download", contextMock, input2).Return(output2, nil).Once()
	depMock.On("Download", contextMock, input3).Return(output3, nil).Once()
	depMock.On("ListS3Directory", contextMock, s3Object).Return(folders, nil)
	fileMock.On("MoveAndRenameFile", downloadsDirectory, "randomfilename", downloadsDirectory, "filename.ps").Return(true, nil)
	fileMock.On("MoveAndRenameFile", downloadsDirectory, "anotherrandomfile", downloadsDirectory, "anotherfile.ps").Return(true, nil)
	fileMock.On("MoveAndRenameFile", filepath.Join(downloadsDirectory, "subfolder"), "justanumber", filepath.Join(downloadsDirectory, "subfolder"), "file.ps").Return(true, nil)

	dep = depMock
	err, result := resource.DownloadRemoteResource(fileMock, "")

	assert.NoError(t, err)
	depMock.AssertExpectations(t)
	fileMock.AssertExpectations(t)
	assert.NotNil(t, result)
	assert.Equal(t, 3, len(result.Files))
	assert.Equal(t, filepath.Join(downloadsDirectory, "filename.ps"), result.Files[0])
	assert.Equal(t, filepath.Join(downloadsDirectory, "anotherfile.ps"), result.Files[1])
	assert.Equal(t, filepath.Join(downloadsDirectory, "subfolder", "file.ps"), result.Files[2])
}

func TestS3Resource_DownloadAbsPath(t *testing.T) {
	depMock := new(s3resource.S3DepMock)
	locationInfo := `{
		"path" : "https://s3.amazonaws.com/ssm-test-agent-bucket/mydummyfolder/filename.ps"
	}`
	fileMock := &filemock.FileSystemMock{}

	fileMock.On("IsDirectory", "/var/tmp/foldername").Return(true)
	fileMock.On("Exists", "/var/tmp/foldername").Return(true)
	resource, _ := NewS3Resource(contextMock, locationInfo)
	resource.s3Object.Bucket = "ssm-test-agent-bucket"
	resource.s3Object.Key = "mydummyfolder/filename.ps"
	resource.s3Object.Region = "us-east-1"
	resource.s3Object.IsPathStyle = true
	resource.s3Object.IsValidS3URI = true

	input := artifact.DownloadInput{
		DestinationDirectory: "/var/tmp/foldername",
		SourceURL:            "https://s3.us-east-1.amazonaws.com/ssm-test-agent-bucket/mydummyfolder/filename.ps",
	}
	output := artifact.DownloadOutput{
		LocalFilePath: filepath.Join(input.DestinationDirectory, "justanumber"),
	}

	var folders []string

	depMock.On("ListS3Directory", contextMock, resource.s3Object).Return(folders, nil).Once()
	depMock.On("Download", contextMock, input).Return(output, nil).Once()

	fileMock.On("MoveAndRenameFile", filepath.Join("/var", "tmp", "foldername"), "justanumber", filepath.Join("/var", "tmp", "foldername"), "filename.ps").Return(true, nil)

	dep = depMock
	err, result := resource.DownloadRemoteResource(fileMock, "/var/tmp/foldername")

	assert.NoError(t, err)
	depMock.AssertExpectations(t)
	fileMock.AssertExpectations(t)
	assert.NotNil(t, result)
	assert.Equal(t, 1, len(result.Files))
	assert.Equal(t, filepath.Join("/var", "tmp", "foldername", "filename.ps"), result.Files[0])
}

func TestS3Resource_DownloadRelativePathNameChange(t *testing.T) {

	depMock := new(s3resource.S3DepMock)
	locationInfo := `{
		"path" : "https://s3.amazonaws.com/ssm-test-agent-bucket/mydummyfolder/file.rb"
	}`
	fileMock := &filemock.FileSystemMock{}

	fileMock.On("Exists", "destination").Return(false)
	resource, _ := NewS3Resource(contextMock, locationInfo)

	input := artifact.DownloadInput{
		DestinationDirectory: ".",
		SourceURL:            "https://s3.us-east-1.amazonaws.com/ssm-test-agent-bucket/mydummyfolder/file.rb",
	}
	output := artifact.DownloadOutput{
		LocalFilePath: filepath.Join(input.DestinationDirectory, "random"),
	}

	s3Object := s3util.AmazonS3URL{
		IsValidS3URI: true,
		IsPathStyle:  true,
		Bucket:       "ssm-test-agent-bucket",
		Key:          "mydummyfolder/file.rb",
		Region:       "us-east-1",
	}
	var folders []string
	depMock.On("Download", contextMock, input).Return(output, nil)
	depMock.On("ListS3Directory", contextMock, s3Object).Return(folders, nil)

	fileMock.On("MoveAndRenameFile", ".", "random", ".", "destination").Return(true, nil)

	dep = depMock
	err, result := resource.DownloadRemoteResource(fileMock, "destination")

	assert.NoError(t, err)
	depMock.AssertExpectations(t)
	fileMock.AssertExpectations(t)
	assert.NotNil(t, result)
	assert.Equal(t, 1, len(result.Files))
	assert.Equal(t, "destination", result.Files[0])
}

repository: aws/amazon-ssm-agent

repo_name: aws/amazon-ssm-agent

branch_name: refs/heads/mainline


text:
% Encoding: UTF-8

@InProceedings{kang_etal_2006,
  author    = {Kang, Feng and Jin, Rong and Sukthankar, Rahul},
  title     = {Correlated Label Propagation with Application to Multi-label Learning},
  booktitle = {Proceedings of the 2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition - Volume 2},
  year      = {2006},
  series    = {CVPR '06},
  pages     = {1719--1726},
  address   = {Washington, DC, USA},
  publisher = {IEEE Computer Society},
  acmid     = {1153652},
  doi       = {10.1109/CVPR.2006.90},
  isbn      = {0-7695-2597-0},
  numpages  = {8},
  url       = {http://dx.doi.org/10.1109/CVPR.2006.90},
}

@InBook{guo_schuurmans_2012,
  pages     = {355--370},
  title     = {Semi-supervised Multi-label Classification},
  publisher = {Springer Berlin Heidelberg},
  year      = {2012},
  author    = {Guo, Yuhong and Schuurmans, Dale},
  editor    = {Flach, Peter A. and De Bie, Tijl and Cristianini, Nello},
  address   = {Berlin, Heidelberg},
  isbn      = {978-3-642-33486-3},
  abstract  = {Labeled data is often sparse in common learning scenarios, either because it is too time consuming or too expensive to obtain, while unlabeled data is almost always plentiful. This asymmetry is exacerbated in multi-label learning, where the labeling process is more complex than in the single label case. Although it is important to consider semi-supervised methods for multi-label learning, as it is in other learning scenarios, surprisingly, few proposals have been investigated for this particular problem. In this paper, we present a new semi-supervised multi-label learning method that combines large-margin multi-label classification with unsupervised subspace learning. We propose an algorithm that learns a subspace representation of the labeled and unlabeled inputs, while simultaneously training a supervised large-margin multi-label classifier on the labeled portion. Although joint training of these two interacting components might appear intractable, we exploit recent developments in induced matrix norm optimization to show that these two problems can be solved jointly, globally and efficiently. In particular, we develop an efficient training procedure based on subgradient search and a simple coordinate descent strategy. An experimental evaluation demonstrates that semi-supervised subspace learning can improve the performance of corresponding supervised multi-label learning methods.},
  booktitle = {Machine Learning and Knowledge Discovery in Databases: European Conference, ECML PKDD 2012, Bristol, UK, September 24-28, 2012. Proceedings, Part II},
  doi       = {10.1007/978-3-642-33486-3_23},
  url       = {https://doi.org/10.1007/978-3-642-33486-3_23},
}

@Article{chen_etal_2008,
  author = {Gang Chen and Yangqiu Song and Fei Wang and Changshui Zhang},
  title  = {Semi-supervised Multi-label Learning by Solving a Sylvester Equation},
  year   = {2008},
  url    = {https://pdfs.semanticscholar.org/955d/807225cc9cd2646efa9f23df77f17f4abfab.pdf},
}

@InBook{godbole_sarawagi_2004,
  pages     = {22--30},
  title     = {Discriminative Methods for Multi-labeled Classification},
  publisher = {Springer Berlin Heidelberg},
  year      = {2004},
  author    = {Godbole, Shantanu and Sarawagi, Sunita},
  editor    = {Dai, Honghua and Srikant, Ramakrishnan and Zhang, Chengqi},
  address   = {Berlin, Heidelberg},
  isbn      = {978-3-540-24775-3},
  abstract  = {In this paper we present methods of enhancing existing discriminative classifiers for multi-labeled predictions. Discriminative methods like support vector machines perform very well for uni-labeled text classification tasks. Multi-labeled classification is a harder task subject to relatively less attention. In the multi-labeled setting, classes are often related to each other or part of a is-a hierarchy. We present a new technique for combining text features and features indicating relationships between classes, which can be used with any discriminative algorithm. We also present two enhancements to the margin of SVMs for building better models in the presence of overlapping classes. We present results of experiments on real world text benchmark datasets. Our new methods beat accuracy of existing methods with statistically significant improvements.},
  booktitle = {Advances in Knowledge Discovery and Data Mining: 8th Pacific-Asia Conference, PAKDD 2004, Sydney, Australia, May 26-28, 2004. Proceedings},
  doi       = {10.1007/978-3-540-24775-3_5},
  url       = {https://doi.org/10.1007/978-3-540-24775-3_5},
}

@InProceedings{ramage_etal_2009,
  author    = {Ramage, Daniel and Hall, David and Nallapati, Ramesh and Manning, Christopher D.},
  title     = {Labeled LDA: A Supervised Topic Model for Credit Attribution in Multi-labeled Corpora},
  booktitle = {Proceedings of the 2009 Conference on Empirical Methods in Natural Language Processing: Volume 1 - Volume 1},
  year      = {2009},
  series    = {EMNLP '09},
  pages     = {248--256},
  address   = {Stroudsburg, PA, USA},
  publisher = {Association for Computational Linguistics},
  acmid     = {1699543},
  isbn      = {978-1-932432-59-6},
  location  = {Singapore},
  numpages  = {9},
  url       = {http://dl.acm.org/citation.cfm?id=1699510.1699543},
}

@InProceedings{wang_etal_2009,
  author    = {C. Wang and Shuicheng Yan and Lei Zhang and H. J. Zhang},
  title     = {Multi-label sparse coding for automatic image annotation},
  booktitle = {2009 IEEE Conference on Computer Vision and Pattern Recognition},
  year      = {2009},
  pages     = {1643-1650},
  month     = {June},
  abstract  = {In this paper, we present a multi-label sparse coding framework for feature extraction and classification within the context of automatic image annotation. First, each image is encoded into a so-called supervector, derived from the universal Gaussian Mixture Models on orderless image patches. Then, a label sparse coding based subspace learning algorithm is derived to effectively harness multi-label information for dimensionality reduction. Finally, the sparse coding method for multi-label data is proposed to propagate the multi-labels of the training images to the query image with the sparse ℓ1 reconstruction coefficients. Extensive image annotation experiments on the Corel5k and Corel30k databases both show the superior performance of the proposed multi-label sparse coding framework over the state-of-the-art algorithms.},
  doi       = {10.1109/CVPR.2009.5206866},
  issn      = {1063-6919},
  keywords  = {Gaussian processes;feature extraction;image coding;learning (artificial intelligence);Corel30k database;Corel5k database;automatic image annotation;dimensionality reduction;feature extraction;image classification;image encoding;image supervector;multilabel sparse coding;orderless image patches;query image;subspace learning algorithm;universal Gaussian Mixture Models;Asia;Feature extraction;Humans;Image coding;Image databases;Image reconstruction;Image representation;Image retrieval;Image segmentation;Scattering},
}

@Article{gibaja_ventura_2014,
  author    = {Gibaja, Eva and Ventura, Sebastián},
  title     = {Multi-label learning: a review of the state of the art and ongoing research},
  journal   = {Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery},
  year      = {2014},
  volume    = {4},
  number    = {6},
  pages     = {411--444},
  issn      = {1942-4795},
  abstract  = {Multi-label learning is quite a recent supervised learning paradigm. Owing to its capabilities to improve performance in problems where a pattern may have more than one associated class, it has attracted the attention of researchers, producing an increasing number of publications. This study presents an up-to-date overview about multi-label learning with the aim of sorting and describing the main approaches developed till now. The formal definition of the paradigm, the analysis of its impact on the literature, its main applications, works developed, pitfalls and guidelines, and ongoing research are presented. WIREs Data Mining Knowl Discov 2014, 4:411–444. doi: 10.1002/widm.1139For further resources related to this article, please visit the WIREs website.Conflict of interest: The authors have declared no conflicts of interest for this article.},
  doi       = {10.1002/widm.1139},
  publisher = {Wiley Periodicals, Inc},
  url       = {http://dx.doi.org/10.1002/widm.1139},
}

@Article{barezi_etal_2017,
  author   = {Elham J. Barezi and James T. Kwok and Hamid R. Rabiee},
  title    = {Multi-Label learning in the independent label sub-spaces},
  journal  = {Pattern Recognition Letters},
  year     = {2017},
  volume   = {97},
  pages    = {8 - 12},
  issn     = {0167-8655},
  doi      = {http://dx.doi.org/10.1016/j.patrec.2017.06.024},
  keywords = {Large scale learning, Multi label learning, Independent learning, rank1},
  url      = {http://www.sciencedirect.com/science/article/pii/S0167865517302295},
}

@Comment{jabref-meta: databaseType:bibtex;}

license: MIT

repository: queirozfcom/auto-tagger

license_type: permissive

repo_name: queirozfcom/auto-tagger

branch_name: refs/heads/master

extension: bib


text:
@MISC{snapnets:p2p-Gnutella08,
  author       = "Jure Leskovec and Andrej Krevl",
  title        = "{SNAP Datasets}: {Stanford} Large Network Dataset Collection: p2p-Gnutella08",
  howpublished = "\url{http://snap.stanford.edu/data/p2p-Gnutella08.html}",
  month        = "jun",
  year         = "2014"
}

repository: tfgraph/tfgraph

repo_name: tfgraph/tfgraph

gha_language: Python


text:
@article{sutskever2014sequence,
  title={Sequence to sequence learning with neural networks},
  author={Sutskever, Ilya and Vinyals, Oriol and Le, Quoc V},
  journal={arXiv preprint arXiv:1409.3215},
  year={2014}
}

url: https://raw.githubusercontent.com/rbt-c/DL-NLP-Readings/82ca76e9184a3b00ac87129d99391477c85cfcd2/Bibtex/Sequence to Sequence Learning with Neural Networks.bib

repository: rbt-c/DL-NLP-Readings

repo_name: rbt-c/DL-NLP-Readings


text:
@article{2014ApJ...784L..12G,
 abstract = {We report on the discovery of SN 2014J in the nearby galaxy M82. Given
its proximity, it offers the best opportunity to date to study a
thermonuclear supernova (SN) over a wide range of the
electromagnetic spectrum. Optical, near-IR, and mid-IR
observations on the rising light curve, orchestrated by the
intermediate Palomar Transient Factory, show that SN 2014J is a
spectroscopically normal Type Ia supernova (SN Ia), albeit
exhibiting high-velocity features in its spectrum and heavily
reddened by dust in the host galaxy. Our earliest detections
start just hours after the fitted time of explosion. We use
high-resolution optical spectroscopy to analyze the dense
intervening material and do not detect any evolution in the
resolved absorption features during the light curve rise.
Similar to other highly reddened SNe Ia, a low value of total-
to-selective extinction, R$_V$
<åisebox-0.5ex~ 2, provides the best match
to our observations. We also study pre-explosion optical and
near-IR images from Hubble Space Telescope with special emphasis
on the sources nearest to the SN location.},
 adsnote = {Provided by the SAO/NASA Astrophysics Data System},
 adsurl = {https://ui.adsabs.harvard.edu/abs/2014ApJ...784L..12G},
 archiveprefix = {arXiv},
 author = {Goobar, A. and Johansson, J. and Amanullah, R. and Cao, Y. and
Perley, D.~A. and Kasliwal, M.~M. and Ferretti, R. and
Nugent, P.~E. and Harris, C. and Gal-Yam, A. and Ofek, E.~O. and
Tendulkar, S.~P. and Dennefeld, M. and Valenti, S. and
Arcavi, I. and Banerjee, D.~P.~K. and Venkataraman, V. and
Joshi, V. and Ashok, N.~M. and Cenko, S.~B. and Diaz, R.~F. and
Fremling, C. and Horesh, A. and Howell, D.~A. and
Kulkarni, S.~R. and Papadogiannakis, S. and Petrushevska, T. and
Sand, D. and Sollerman, J. and Stanishev, V. and Bloom, J.~S. and
Surace, J. and Dupuy, T.~J. and Liu, M.~C.},
 doi = {10.1088/2041-8205/784/1/L12},
 eid = {L12},
 eprint = {1402.0849},
 journal = {\apjl},
 keywords = {dust, extinction, galaxies: individual: Messier 82, supernovae: individual: SN 2014J, Astrophysics - Astrophysics of Galaxies, Astrophysics - Cosmology and Nongalactic Astrophysics, Astrophysics - Solar and Stellar Astrophysics},
 month = {Mar},
 number = {1},
 pages = {L12},
 primaryclass = {astro-ph.GA},
 title = {The Rise of SN 2014J in the Nearby Galaxy M82},
 volume = {784},
 year = {2014}
}

repository: profjsb/my-content

repo_name: profjsb/my-content

gha_license_id: MIT

gha_language: TeX


text:
@inproceedings{dreyer-eisner-2011,
 abstract = {We present an inference algorithm that organizes observed words (tokens) into structured inflectional paradigms (types). It also naturally predicts the spelling of unobserved forms that are missing from these paradigms, and discovers inflectional principles (grammar) that generalize to wholly unobserved words. Our Bayesian generative model of the data explicitly represents tokens, types, inflections, paradigms, and locally conditioned string edits. It assumes that inflected word tokens are generated from an infinite mixture of inflectional paradigms (string tuples). Each paradigm is sampled all at once from a graphical model, whose potential functions are weighted finitestate transducers with language-specific parameters to be learned. These assumptions naturally lead to an elegant empirical Bayes inference procedure that exploits Monte Carlo EM, belief propagation, and dynamic programming.  Given 50–100 seed paradigms, adding a 10-million-word corpus reduces prediction error for morphological inflections by up to 10%.},
 aclid = {D11-1057},
 address = {Edinburgh},
 author = {Markus Dreyer and Jason Eisner},
 booktitle = {Proceedings of the Conference on Empirical Methods in
Natural Language Processing (EMNLP)},
 keywords = {emnlp,morphology,monte carlo,dirichlet,belief propagation,graphical models},
 month = {July},
 note = {Supplementary material (9 pages) also available},
 pages = {616--627},
 title = {Discovering Morphological Paradigms from Plain Text
Using a Dirichlet Process Mixture Model},
 url = {http://cs.jhu.edu/~jason/papers/#dreyer-eisner-2011},
 year = {2011}
}

repository: markusdr/academic-kickstart

repo_name: markusdr/academic-kickstart