text:
@MASTERSTHESIS{Engdahl2005,
  author = {Bj\"orn Engdahl},
  title = {Ordered and Unordered Treemap. Algorithms and Their Applications on Handheld Devices},
  school = {Royal Institute of Technology, Stockholm, Sweden},
  year = {2005},
  abstract = {This thesis describes a way to visualize hierarchical structures on PDAs using Treemaps. A new ordered layout algorithm for treemaps, called Split Layout, is presented. Traditionally, treemap algorithms have exhibited a trade off between good aspect ratio and ordered layout. The new Split Layout is compared to five published treemap algorithms. Properties such as avarage aspect ratio, stability, run time and readability are measured, and it is shown that the new Split Layout performs better than any known ordered layout. The average aspect ratio is about 23\% better and the stability increased between 28\% and 40\%. A user study was performed to measure the quality of the ordering of the new algorithm. 30 users gave a total of 360 measured response times, and it was found that the median time to locate a specific rectangle in the treemap only took 0.14 seconds (5\%) longer for the Split Layout than for the Pivot by Split Size algorithm. The technique was implemented on a PDA and used for visualizing threaded discussion forums. User studies confirm that the concept on using treemaps on PDAs looks promising. The contents of the forum was easily grasped, even though the number of articles exceeded one hundred.},
  url = {http://w3.nada.kth.se/utbildning/grukth/exjobb/rapportlistor/2005/rapporter05/engdahl_bjorn_05033.pdf}
}

repository: vis-au/treevisnet

repo_name: vis-au/treevisnet


text:
// Copyright 2016 The LUCI Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.

// Package serviceaccounts implements ServiceAccounts API.
//
// Code defined here is either invoked by an administrator or by the service
// itself (from implementation of other services).
package serviceaccounts

import (
	"encoding/base64"
	"encoding/json"
	"fmt"
	"io"
	"io/ioutil"
	"net/http"
	"net/url"
	"regexp"
	"strings"
	"time"

	"golang.org/x/net/context"
	"golang.org/x/oauth2/jws"
	"google.golang.org/api/googleapi"
	"google.golang.org/api/iam/v1"
	"google.golang.org/grpc"
	"google.golang.org/grpc/codes"

	"github.com/luci/gae/service/datastore"
	"github.com/luci/gae/service/urlfetch"
	"github.com/luci/luci-go/appengine/gaeauth/client"
	"github.com/luci/luci-go/common/clock"
	"github.com/luci/luci-go/common/errors"
	"github.com/luci/luci-go/common/logging"
	"github.com/luci/luci-go/common/proto/google"

	"github.com/luci/luci-go/common/api/tokenserver"
	"github.com/luci/luci-go/common/api/tokenserver/admin/v1"
	"github.com/luci/luci-go/common/api/tokenserver/minter/v1"

	"github.com/luci/luci-go/appengine/cmd/tokenserver/certchecker"
	"github.com/luci/luci-go/appengine/cmd/tokenserver/model"
)

// accountIDRegexp is regular expression for allowed service account emails.
var accountIDRegexp = regexp.MustCompile(`^[a-z]([-a-z0-9]*[a-z0-9])$`)

var (
	googleTokenURL = "https://www.googleapis.com/oauth2/v4/token"
	jwtGrantType   = "urn:ietf:params:oauth:grant-type:jwt-bearer"
	jwtHeader      = &jws.Header{Algorithm: "RS256", Typ: "JWT"}
)

// Server implements admin.ServiceAccountsServer RPC interface.
//
// It assumes authorization has happened already.
type Server struct {
	transport       http.RoundTripper // used in unit tests to mock OAuth
	iamBackendURL   string            // used in unit tests to mock IAM API
	tokenBackendURL string            // used in unit tests to mock OAuth token endpoint
	ownEmail        string            // used in unit tests to mock GAE Info API
}

// CreateServiceAccount creates Google Cloud IAM service account associated
// with given CN.
func (s *Server) CreateServiceAccount(c context.Context, r *admin.CreateServiceAccountRequest) (*admin.CreateServiceAccountResponse, error) {
	// Validate FQDN and load proper config.
	accountID, domain, err := validateFQDN(r.Fqdn)
	if err != nil {
		return nil, grpc.Errorf(codes.InvalidArgument, "%s", err)
	}
	cfg, err := s.getCAConfig(c, r.Ca)
	if err != nil {
		return nil, err
	}
	domainCfg, err := domainConfig(cfg, domain)
	if err != nil {
		return nil, grpc.Errorf(codes.InvalidArgument, "%s", err)
	}

	// Create the service account.
	account, err := s.ensureServiceAccount(c, serviceAccountParams{
		Project:   domainCfg.CloudProjectName,
		AccountID: accountID,
		FQDN:      r.Fqdn,
		Force:     r.Force,
	})
	if err != nil {
		return nil, err
	}
	return &admin.CreateServiceAccountResponse{
		ServiceAccount: account,
	}, nil
}

// serviceAccountParams is passed to ensureServiceAccount.
type serviceAccountParams struct {
	Project   string // cloud project name to create account in
	AccountID string // account ID, the email will be <accountID>@...
	FQDN      string // FQDN of a host to create an account for
	Force     bool   // true to skip datastore check and call IAM API no matter what
}

// ensureServiceAccount does the actual job of CreateServiceAccount.
//
// Assumes 'params' is validated already. Returns grpc.Errorf on errors.
func (s *Server) ensureServiceAccount(c context.Context, params serviceAccountParams) (*tokenserver.ServiceAccount, error) {
	// Normalize fqdn for comparison.
	fqdn := strings.ToLower(params.FQDN)

	// Checks the datastore, perhaps we already registered it.
	if !params.Force {
		account, err := fetchAccountInfo(c, params.Project, params.AccountID)
		if err != nil {
			return nil, grpc.Errorf(codes.Internal, "transient error when fetching account info from datastore - %s", err)
		}
		if account != nil {
			// Two FQDN's happen to have identical hostname? This is a big deal and
			// generally not supported.
			if account.Fqdn != fqdn {
				return nil, grpc.Errorf(codes.FailedPrecondition, "the account is already assigned to %q", account.Fqdn)
			}
			return account, nil
		}
	}

	// Account display name must be < 100 bytes. We don't use it for anything
	// very important, so just trim.
	displayName := fqdn
	if len(fqdn) >= 100 {
		displayName = fqdn[:100]
	}

	// Attempt to create. May fail with http.StatusConflict if already exists.
	expectedEmail := serviceAccountEmail(params.Project, params.AccountID)
	logging.Infof(c, "Creating account %q", expectedEmail)
	account, err := s.iamCreateAccount(c, params.Project, params.AccountID, displayName)

	switch apiErr, _ := err.(*googleapi.Error); {
	case err == nil:
		logging.Infof(c, "Account %q created", expectedEmail)
		if account.Email != expectedEmail {
			// Log the error, but proceed anyway, since the expectedEmail is
			// important only when dealing with rare race conditions. Returning error
			// here would block the token server operations completely in case Google
			// decides to unexpectedly change service account email format.
			logging.Errorf(
				c, "Real account email %q doesn't match expected one %q",
				account.Email, expectedEmail)
		}

	case apiErr != nil && apiErr.Code == http.StatusConflict:
		logging.Warningf(c, "Account %q already exists, fetching its details", expectedEmail)
		account, err = s.iamGetAccount(c, params.Project, expectedEmail)
		if err != nil {
			return nil, grpc.Errorf(
				codes.Internal, "unexpected error when fetching account details for %q - %s",
				expectedEmail, err)
		}
		// In an unlikely event of a race condition when creating two accounts with
		// identical hostnames but different FQDNs, the display names here will not
		// match. Ask the client to retry (to read account state from the datastore
		// and fail properly).
		if account.DisplayName != displayName {
			return nil, grpc.Errorf(
				codes.Internal, "expected account %q to have display name %q, but it is %q",
				expectedEmail, displayName, account.DisplayName)
		}

	case err != nil:
		return nil, grpc.Errorf(codes.Internal, "cloud IAM call to create a service account failed - %s", err)
	}

	// Store the account state in the datastore to avoid redoing all this again.
	result, err := storeAccountInfo(c, params.Project, params.AccountID, fqdn, account)
	if err != nil {
		return nil, grpc.Errorf(codes.Internal, "failed to save account info - %s", err)
	}
	return result, nil
}

// MintAccessTokenParams is passed to DoMintAccessToken.
type MintAccessTokenParams struct {
	Config *admin.CertificateAuthorityConfig // domain configs, scopes whitelist
	FQDN   string                            // FQDN of a host to mint a token for
	Scopes []string                          // OAuth2 scopes to grant the token
}

// Validate returns nil if the parameters are valid.
//
// It checks FQDN matches some known domain, account ID matches the regexp, and
// requests scopes are all whitelisted.
func (p *MintAccessTokenParams) Validate() error {
	_, domain, err := validateFQDN(p.FQDN)
	if err != nil {
		return err
	}
	domainCfg, err := domainConfig(p.Config, domain)
	if err != nil {
		return err
	}
	return validateOAuthScopes(domainCfg, p.Scopes)
}

// DoMintAccessToken makes an OAuth access token for the given service account.
//
// Return grpc.Error on errors.
func (s *Server) DoMintAccessToken(c context.Context, params MintAccessTokenParams) (*tokenserver.ServiceAccount, *minter.OAuth2AccessToken, error) {
	if err := params.Validate(); err != nil {
		return nil, nil, grpc.Errorf(codes.InvalidArgument, "%s", err)
	}

	// Load proper domain config.
	accountID, domain, err := validateFQDN(params.FQDN)
	if err != nil {
		panic("impossible") // params where validated already
	}
	domainCfg, err := domainConfig(params.Config, domain)
	if err != nil {
		panic("impossible") // params where validated already
	}

	// Create the corresponding service account if necessary.
	account, err := s.ensureServiceAccount(c, serviceAccountParams{
		Project:   domainCfg.CloudProjectName,
		AccountID: accountID,
		FQDN:      params.FQDN,
	})
	if err != nil {
		return nil, nil, err
	}

	// Mint the access token.
	//
	// See https://developers.google.com/identity/protocols/OAuth2ServiceAccount#authorizingrequests
	// Also https://github.com/golang/oauth2/blob/master/jwt/jwt.go.

	// Prepare a claim set to be signed by the service account key. Note that
	// Google backend seems to ignore Exp field and always gives one-hour long
	// tokens.
	//
	// Also revert time back for machines whose time is not perfectly in sync.
	// If client machine's time is in the future according to Google servers, an
	// access token will not be issued.
	now := clock.Now(c).Add(-10 * time.Second)
	claimSet := &jws.ClaimSet{
		Iat:   now.Unix(),
		Exp:   now.Add(time.Hour).Unix(),
		Iss:   account.Email,
		Scope: strings.Join(params.Scopes, " "),
		Aud:   googleTokenURL,
	}

	// Sign it, thus obtaining so called 'assertion'. Note that with Google gRPC
	// endpoints, an assertion by itself can be used as an access token (with few
	// small changes). It doesn't work for GAE though.
	assertion, err := jws.EncodeWithSigner(
		jwtHeader, claimSet, s.iamSigner(c, account.ProjectId, account.Email))
	if err != nil {
		return nil, nil, grpc.Errorf(codes.Internal, "error when signing JWT - %s", err)
	}

	// Exchange the assertion for the access token.
	token, err := s.fetchAccessToken(c, assertion)
	if err != nil {
		return nil, nil, grpc.Errorf(codes.Internal, "error when calling token endpoint - %s", err)
	}
	return account, token, nil
}

// fetchAccessToken does the final part of OAuth 2-legged flow.
func (s *Server) fetchAccessToken(c context.Context, assertion string) (*minter.OAuth2AccessToken, error) {
	// The client without auth, the token endpoint doesn't need auth.
	client, err := s.httpClient(c, false)
	if err != nil {
		return nil, err
	}
	tokenURL := s.tokenBackendURL
	if tokenURL == "" {
		tokenURL = googleTokenURL
	}

	// This is mostly copy-pasta from https://github.com/golang/oauth2/blob/master/jwt/jwt.go.
	v := url.Values{}
	v.Set("grant_type", jwtGrantType)
	v.Set("assertion", assertion)
	resp, err := client.PostForm(tokenURL, v)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	body, err := ioutil.ReadAll(io.LimitReader(resp.Body, 1<<20))
	if err != nil {
		return nil, fmt.Errorf("oauth2: cannot fetch token: %s", err)
	}
	if c := resp.StatusCode; c < 200 || c > 299 {
		return nil, fmt.Errorf("oauth2: cannot fetch token: %s\nResponse: %s", resp.Status, body)
	}
	var tokenRes struct {
		AccessToken string `json:"access_token"`
		TokenType   string `json:"token_type"`
		IDToken     string `json:"id_token"`
		ExpiresIn   int64  `json:"expires_in"` // relative seconds from now
	}
	if err := json.Unmarshal(body, &tokenRes); err != nil {
		return nil, fmt.Errorf("oauth2: cannot fetch token: %s", err)
	}
	// end of copy-pasta.

	// The Google endpoint always returns 'expires_in'.
	if tokenRes.ExpiresIn == 0 {
		return nil, fmt.Errorf("invalid token endpoint response, 'expires_in' is not set")
	}
	expiry := clock.Now(c).Add(time.Duration(tokenRes.ExpiresIn) * time.Second)
	return &minter.OAuth2AccessToken{
		AccessToken: tokenRes.AccessToken,
		TokenType:   tokenRes.TokenType,
		Expiry:      google.NewTimestamp(expiry),
	}, nil
}

// getCAConfig returns CertificateAuthorityConfig for a CA.
//
// Returns grpc.Error on errors.
func (s *Server) getCAConfig(c context.Context, ca string) (*admin.CertificateAuthorityConfig, error) {
	var entity *model.CA

	checker, err := certchecker.GetCertChecker(c, ca)
	if err != nil {
		goto fail
	}
	entity, err = checker.GetCA(c)
	if err != nil {
		goto fail
	}
	return entity.ParsedConfig, nil

fail:
	if errors.IsTransient(err) {
		return nil, grpc.Errorf(codes.Internal, "transient error when fetching CA config - %s", err)
	}
	return nil, grpc.Errorf(codes.Unknown, "error when fetching CA config - %s", err)
}

// httpClient returns a HTTP client with deadline set to 20 sec.
//
// Note that on GAE the only way to set a deadline for HTTP request is to grab
// a new transport based on a context with deadline.
//
// context/ctxhttp does not work, since it attempts to cancel in-flight requests
// on timeout and GAE ignores that.
func (s *Server) httpClient(c context.Context, withAuth bool) (*http.Client, error) {
	transport := s.transport
	if transport != nil {
		return &http.Client{Transport: transport}, nil
	}
	c, _ = clock.WithTimeout(c, 20*time.Second)
	if withAuth {
		var err error
		transport, err = client.Transport(c, []string{iam.CloudPlatformScope}, nil)
		if err != nil {
			return nil, err
		}
	} else {
		transport = urlfetch.Get(c)
	}
	return &http.Client{Transport: transport}, nil
}

// iamService returns configured *iam.Service to talk to Service Accounts API.
func (s *Server) iamService(c context.Context) (*iam.Service, error) {
	client, err := s.httpClient(c, true)
	if err != nil {
		return nil, err
	}
	service, err := iam.New(client)
	if err != nil {
		return nil, err
	}
	if s.iamBackendURL != "" {
		service.BasePath = s.iamBackendURL
	}
	return service, nil
}

// iamCreateAccount wraps ServiceAccounts.Create IAM API call.
//
// Requires at least 'Editor' role in the cloud project.
func (s *Server) iamCreateAccount(c context.Context, project, accountID, displayName string) (*iam.ServiceAccount, error) {
	service, err := s.iamService(c)
	if err != nil {
		return nil, err
	}
	call := service.Projects.ServiceAccounts.Create(
		"projects/"+project,
		&iam.CreateServiceAccountRequest{
			AccountId: accountID,
			ServiceAccount: &iam.ServiceAccount{
				DisplayName: displayName,
			},
		})
	return call.Context(c).Do()
}

// iamGetAccount wraps ServiceAccounts.Get IAM API call.
func (s *Server) iamGetAccount(c context.Context, project, email string) (*iam.ServiceAccount, error) {
	service, err := s.iamService(c)
	if err != nil {
		return nil, err
	}
	call := service.Projects.ServiceAccounts.Get(serviceAccountResource(project, email))
	return call.Context(c).Do()
}

// iamSigner returns a function that can RSA sign blobs using service account
// key of given service account.
//
// The token server's own service account should have 'serviceAccountActor' role
// in the service account resource or in the project that owns the service
// account.
func (s *Server) iamSigner(c context.Context, project, email string) func([]byte) ([]byte, error) {
	return func(data []byte) ([]byte, error) {
		service, err := s.iamService(c)
		if err != nil {
			return nil, err
		}
		call := service.Projects.ServiceAccounts.SignBlob(
			serviceAccountResource(project, email),
			&iam.SignBlobRequest{
				BytesToSign: base64.StdEncoding.EncodeToString(data),
			})
		resp, err := call.Context(c).Do()
		if err != nil {
			return nil, err
		}
		return base64.StdEncoding.DecodeString(resp.Signature)
	}
}

////////////////////////////////////////////////////////////////////////////////

// validateFQDN splits FQDN into hostname and domain name, validating them.
func validateFQDN(fqdn string) (host, domain string, err error) {
	fqdn = strings.ToLower(fqdn)
	chunks := strings.SplitN(fqdn, ".", 2)
	if len(chunks) != 2 {
		return "", "", fmt.Errorf("not a valid FQDN %q", fqdn)
	}
	// Host name is used as service account ID. Validate it.
	// See https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/create.
	// The account ID is also limited in length to 6-30 chars (this is not
	// documented though).
	host, domain = chunks[0], chunks[1]
	if len(host) < 6 || len(host) >= 30 || !accountIDRegexp.MatchString(host) {
		return "", "", fmt.Errorf(
			"the hostname (%q) must match %q and be 6-30 characters long, it doesn't",
			host, accountIDRegexp.String())
	}
	return host, domain, nil
}

// validateOAuthScopes checks the scopes are in the whitelist.
func validateOAuthScopes(cfg *admin.DomainConfig, scopes []string) error {
	if len(scopes) == 0 {
		return fmt.Errorf("at least one OAuth2 scope must be specified")
	}
	for _, scope := range scopes {
		ok := false
		for _, wl := range cfg.AllowedOauth2Scope {
			if scope == wl {
				ok = true
				break
			}
		}
		if !ok {
			return fmt.Errorf("OAuth2 scope %q is not whitelisted in the config", scope)
		}
	}
	return nil
}

// domainConfig returns DomainConfig for a domain.
//
// Returns grpc.Error when there's no such config.
func domainConfig(cfg *admin.CertificateAuthorityConfig, domain string) (*admin.DomainConfig, error) {
	for _, domainCfg := range cfg.KnownDomains {
		for _, domainInCfg := range domainCfg.Domain {
			if domainInCfg == domain {
				return domainCfg, nil
			}
		}
	}
	return nil, fmt.Errorf("the domain %q is not whitelisted in the config", domain)
}

// serviceAccountEmail returns expected email address of a service account.
//
// Unfortunately we had to hardcode this rule here to properly handle race
// conditions when creating an account: /v1/projects.serviceAccounts/get API
// accepts emails, not short account IDs we pass to 'create' API call. So if
// 'create' call fails with "Already exists" error, we had to guess an email to
// fetch details of the existing account.
func serviceAccountEmail(project, accountID string) string {
	return fmt.Sprintf("%s@%s.iam.gserviceaccount.com", accountID, project)
}

// serviceAccountResource returns full resource name of a service accounts.
func serviceAccountResource(project, email string) string {
	return fmt.Sprintf("projects/%s/serviceAccounts/%s", project, email)
}

// storeAccountInfo puts details about a service account in the datastore.
//
// Returns the resulting tokenserver.ServiceAccount object.
func storeAccountInfo(c context.Context, project, accountID, fqdn string, acc *iam.ServiceAccount) (*tokenserver.ServiceAccount, error) {
	entity := model.ServiceAccount{
		ID:             project + "/" + accountID,
		ProjectID:      project,
		UniqueID:       acc.UniqueId,
		Email:          acc.Email,
		DisplayName:    acc.DisplayName,
		OAuth2ClientID: acc.Oauth2ClientId,
		FQDN:           fqdn,
		Registered:     clock.Now(c).UTC(),
	}
	if err := datastore.Get(c).Put(&entity); err != nil {
		return nil, err
	}
	return entity.GetProto(), nil
}

// fetchAccountInfo returns service account details stored in the datastore.
//
// Returns (nil, nil) if no such service account was registered yet.
func fetchAccountInfo(c context.Context, project, accountID string) (*tokenserver.ServiceAccount, error) {
	entity := model.ServiceAccount{
		ID: project + "/" + accountID,
	}
	switch err := datastore.Get(c).Get(&entity); {
	case err == datastore.ErrNoSuchEntity:
		return nil, nil
	case err != nil:
		return nil, errors.WrapTransient(err)
	}
	return entity.GetProto(), nil
}

repository: mithro/luci-go

license_type: permissive

repo_name: mithro/luci-go

branch_name: refs/heads/master

gha_language: Go

extension: go


text:
package controller

import (
	assignmentsv1alpha1 "github.com/domoinc/kube-valet/pkg/apis/assignments/v1alpha1"
	corev1 "k8s.io/api/core/v1"
)

// NodeController a controller that processes node events
type NodeController interface {
	OnAddNode(node *corev1.Node)
	OnUpdateNode(oldNode *corev1.Node, newNode *corev1.Node)
	OnDeleteNode(node *corev1.Node)
}

// NagController a controller that processes nag events
type NagController interface {
	OnAddNag(nag *assignmentsv1alpha1.NodeAssignmentGroup)
	OnUpdateNag(oldNag *assignmentsv1alpha1.NodeAssignmentGroup, newNag *assignmentsv1alpha1.NodeAssignmentGroup)
	OnDeleteNag(nag *assignmentsv1alpha1.NodeAssignmentGroup)
}

// PodController a controller that processes pod events
type PodController interface {
	OnAddPod(pod *corev1.Pod)
	OnUpdatePod(oldPod *corev1.Pod, newPod *corev1.Pod)
	OnDeletePod(pod *corev1.Pod)
}

license: MIT

repository: domoinc/kube-valet

repo_name: domoinc/kube-valet

gha_license_id: MIT


text:
DESCRIPTION = "PetaLinux Vitis AI packages"

inherit packagegroup

# Since dnndk-deploy is SOC_FAMILY specific, this package must be also
PACKAGE_ARCH = "${SOC_FAMILY_ARCH}"

COMPATIBLE_MACHINE = "^$"
COMPATIBLE_MACHINE_zynqmp = ".*"

RDEPENDS_${PN} = "\
    glog \
    googletest \
    json-c \
    protobuf \
    python3-pip \
    opencv \
    dnndk-deploy \
    python3-pybind11 \
    vitis-ai-library-deploy \
    xir-deploy \
    target-factory-deploy \
    vart-deploy \
    unilog-deploy \
    "

RDEPENDS_${PN}-dev += "\
    protobuf-c \
    libeigen-dev \
    "

repository: sbahadirarslan/meta-petalinux

repo_name: sbahadirarslan/meta-petalinux

extension: bb


text:
package insidescraper

import (
	"encoding/json"
	"fmt"
	"testing"

	"github.com/gocolly/colly"
)

func TestExtractCompositeLessons(t *testing.T) {
	c := colly.NewCollector(
		colly.UserAgent("inside-scraper"),
		colly.AllowedDomains("insidechassidus.org"),
	)

	c.OnHTML("tbody tr", func(e *colly.HTMLElement) {
		scraper := LessonScraper{
			Row: e.DOM,
		}
		scraper.LoadLesson()

		jsonOut, _ := json.MarshalIndent(*scraper.Lesson, "", "    ")
		fmt.Println(string(jsonOut))
	})
	fmt.Println("Test1")
	//c.Visit("https://insidechassidus.org/maamarim/maamarim-of-the-rebbe/text-based-concise-summary/1553-maamarim-5715")
	//fmt.Println("Test2")
	c.Visit("https://insidechassidus.org/weekly-parsha/sefer-shemos/209-parshas-shemos/1319-complete-sichos-shmos")
}

// Check that sections which are only lessons are handled right.
func TestScrapeSimpleSection(t *testing.T) {
	runScraper("https://insidechassidus.org/jewish-and-chassidic-calendar/shvat/217-15-shvat")
}

func TestScrapeTorasMenachem(t *testing.T) {
	runScraper("https://insidechassidus.org/sichos/")
}

// Check output of parsing master page containing many simple sections.
func TestScrapeParentSimpleSection(t *testing.T) {
	runScraper("https://insidechassidus.org/thought-and-history/123-kabbala-and-philosophy-series")
}

// Intense PDF course.
func TestPdfCrash(t *testing.T) {
	runScraper("https://insidechassidus.org/maamarim/maamarim-of-the-rebbe/text-based-concise-summary")
}

repository: yringler/inside-chassidus-scraper

repo_name: yringler/inside-chassidus-scraper


text:
@article{bommarito-katz,
  title   = {On the Stability of Community Detection Algorithms on Longitudinal Citation Data},
  journal = {Procedia - Social and Behavioral Sciences},
  volume  = {4},
  pages   = {26 - 37},
  year    = {2010},
  note    = {Applications of Social Network Analysis},
  issn    = {1877-0428},
  doi     = {https://doi.org/10.1016/j.sbspro.2010.07.480},
  url     = {http://www.sciencedirect.com/science/article/pii/S1877042810018549},
  author  = {Michael J. Bommarito II and Daniel M. Katz and Jonathen L. Zelner}
}

@article{karrer-levina,
  title     = {Robustness of community structure in networks},
  volume    = {77},
  issn      = {1550-2376},
  url       = {http://dx.doi.org/10.1103/PhysRevE.77.046119},
  doi       = {10.1103/physreve.77.046119},
  number    = {4},
  journal   = {Physical Review E},
  publisher = {American Physical Society (APS)},
  author    = {Karrer, Brian and Levina, Elizaveta and Newman, M. E. J.},
  year      = {2008},
  month     = {Apr}
}

@article{Newman_2006,
  title     = {Finding community structure in networks using the eigenvectors of matrices},
  volume    = {74},
  issn      = {1550-2376},
  url       = {http://dx.doi.org/10.1103/PhysRevE.74.036104},
  doi       = {10.1103/physreve.74.036104},
  number    = {3},
  journal   = {Physical Review E},
  publisher = {American Physical Society (APS)},
  author    = {Newman, M. E. J.},
  year      = {2006},
  month     = {Sep}
}

@inproceedings{aadithya,
  author    = {Aadithya, Karthik V.
and Ravindran, Balaraman
and Michalak, Tomasz P.
and Jennings, Nicholas R.},
  editor    = {Saberi, Amin},
  title     = {Efficient Computation of the Shapley Value for Centrality in Networks},
  booktitle = {Internet and Network Economics},
  year      = {2010},
  publisher = {Springer Berlin Heidelberg},
  address   = {Berlin, Heidelberg},
  pages     = {1--13},
  isbn      = {978-3-642-17572-5}
}

@article{fenn-porter,
  author    = { Daniel   J.   Fenn  and  Mason   A.   Porter  and  Peter   J.   Mucha  and  Mark   McDonald  and  Stacy   Williams  and  Neil   F.   Johnson  and  Nick   S.   Jones },
  title     = {Dynamical clustering of exchange rates},
  journal   = {Quantitative Finance},
  volume    = {12},
  number    = {10},
  pages     = {1493-1520},
  year      = {2012},
  publisher = {Routledge},
  doi       = {10.1080/14697688.2012.668288},
  url       = {https://doi.org/10.1080/14697688.2012.668288},
  eprint    = {https://doi.org/10.1080/14697688.2012.668288}
}

@article{michalak,
  author  = {Michalak, Tomasz and Aadithya, Karthik and Szczepański, Piotr and Ravindran, Balaraman and Jennings, Nicholas},
  year    = {2014},
  month   = {02},
  pages   = {},
  title   = {Efficient Computation of the Shapley Value for Game-Theoretic Network Centrality},
  volume  = {46},
  journal = {Journal of Artificial Intelligence Research},
  doi     = {10.1613/jair.3806}
}

@article{kannan-vempala,
  author     = {Kannan, Ravi and Vempala, Santosh and Vetta, Adrian},
  title      = {On Clusterings: Good, Bad and Spectral},
  year       = {2004},
  issue_date = {May 2004},
  publisher  = {Association for Computing Machinery},
  address    = {New York, NY, USA},
  volume     = {51},
  number     = {3},
  issn       = {0004-5411},
  url        = {https://doi.org/10.1145/990308.990313},
  doi        = {10.1145/990308.990313},
  journal    = {J. ACM},
  month      = may,
  pages      = {497–515},
  numpages   = {19},
  keywords   = {graph algorithms, Clustering, spectral methods}
}

@article{narahari,
  author  = {Narahari, Yadati},
  year    = {2011},
  month   = {02},
  pages   = {130 - 147},
  title   = {A Shapley Value-Based Approach to Discover Influential Nodes in Social Networks},
  volume  = {8},
  journal = {Automation Science and Engineering, IEEE Transactions on},
  doi     = {10.1109/TASE.2010.2052042}
}

@inproceedings{yang-leskovec,
  author    = {J. {Yang} and J. {Leskovec}},
  booktitle = {2012 IEEE 12th International Conference on Data Mining},
  title     = {Community-Affiliation Graph Model for Overlapping Network Community Detection},
  year      = {2012},
  volume    = {},
  number    = {},
  pages     = {1170-1175}
}

@article{girvan-newman,
  author    = {Girvan, M. and Newman, M. E. J.},
  title     = {Community structure in social and biological networks},
  volume    = {99},
  number    = {12},
  pages     = {7821--7826},
  year      = {2002},
  doi       = {10.1073/pnas.122653799},
  publisher = {National Academy of Sciences},
  issn      = {0027-8424},
  url       = {https://www.pnas.org/content/99/12/7821},
  journal   = {Proceedings of the National Academy of Sciences}
}

@article{lfr,
  title     = {Benchmark graphs for testing community detection algorithms},
  author    = {Lancichinetti, Andrea and Fortunato, Santo and Radicchi, Filippo},
  journal   = {Phys. Rev. E},
  volume    = {78},
  issue     = {4},
  pages     = {046110},
  numpages  = {5},
  year      = {2008},
  month     = {Oct},
  publisher = {American Physical Society},
  doi       = {10.1103/PhysRevE.78.046110},
  url       = {https://link.aps.org/doi/10.1103/PhysRevE.78.046110}
}

@techreport{pagerank,
  number      = {1999-66},
  month       = {November},
  author      = {Lawrence Page and Sergey Brin and Rajeev Motwani and Terry Winograd},
  note        = {Previous number = SIDL-WP-1999-0120},
  title       = {The PageRank Citation Ranking: Bringing Order to the Web.},
  type        = {Technical Report},
  publisher   = {Stanford InfoLab},
  year        = {1999},
  institution = {Stanford InfoLab},
  url         = {http://ilpubs.stanford.edu:8090/422/},
}

@article{Jensen_2015,
  title     = {Detecting global bridges in networks},
  volume    = {4},
  issn      = {2051-1329},
  url       = {http://dx.doi.org/10.1093/comnet/cnv022},
  doi       = {10.1093/comnet/cnv022},
  number    = {3},
  journal   = {Journal of Complex Networks},
  publisher = {Oxford University Press (OUP)},
  author    = {Jensen, Pablo and Morini, Matteo and Karsai, Márton and Venturini, Tommaso and Vespignani, Alessandro and Jacomy, Mathieu and Cointet, Jean-Philippe and Mercklé, Pierre and Fleury, Eric},
  year      = {2015},
  month     = {Oct},
  pages     = {319–329}
}

@article{freeman,
  issn      = {00380431},
  url       = {http://www.jstor.org/stable/3033543},
  abstract  = {A Family of new measures of point and graph centrality based on early intuitions of Bavelas (1948) is introduced. These measures define centrality in terms of the degree to which a point falls on the shortest path between others and therefore has a potential for control of communication. They may be used to index centrality in any large or small network of symmetrical relations, whether connected or unconnected.},
  author    = {Linton C. Freeman},
  journal   = {Sociometry},
  number    = {1},
  pages     = {35--41},
  publisher = {[American Sociological Association, Sage Publications, Inc.]},
  title     = {A Set of Measures of Centrality Based on Betweenness},
  volume    = {40},
  year      = {1977}
}

@article{coscia-rossetti,
  author     = {Coscia, Michele and Rossetti, Giulio and Giannotti, Fosca and Pedreschi, Dino},
  title      = {Uncovering Hierarchical and Overlapping Communities with a Local-First Approach},
  year       = {2014},
  issue_date = {October 2014},
  publisher  = {Association for Computing Machinery},
  address    = {New York, NY, USA},
  volume     = {9},
  number     = {1},
  issn       = {1556-4681},
  url        = {https://doi.org/10.1145/2629511},
  doi        = {10.1145/2629511},
  journal    = {ACM Trans. Knowl. Discov. Data},
  month      = aug,
  articleno  = {6},
  numpages   = {27},
  keywords   = {Complex networks, community discovery, data mining}
}

@inproceedings{demon,
  author    = {Coscia, Michele and Rossetti, Giulio and Giannotti, Fosca and Pedreschi, Dino},
  title     = {DEMON: A Local-First Discovery Method for Overlapping Communities},
  year      = {2012},
  isbn      = {9781450314626},
  publisher = {Association for Computing Machinery},
  address   = {New York, NY, USA},
  url       = {https://doi.org/10.1145/2339530.2339630},
  doi       = {10.1145/2339530.2339630},
  booktitle = {Proceedings of the 18th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining},
  pages     = {615–623},
  numpages  = {9},
  keywords  = {community discovery, complex networks, data mining},
  location  = {Beijing, China},
  series    = {KDD ’12}
}

@article{palla-derenyi,
  author  = {Palla, Gergely and Derényi, Imre and Farkas, Illés and Vicsek, Tamás},
  year    = {2005},
  month   = {07},
  pages   = {814-818},
  title   = {Uncovering the overlapping community structure of complex networks in nature and society},
  volume  = {435},
  journal = {Nature}
}

@misc{leskovec-lang-mahoney,
  title         = {Empirical Comparison of Algorithms for Network Community Detection},
  author        = {Jure Leskovec and Kevin J. Lang and Michael W. Mahoney},
  year          = {2010},
  eprint        = {1004.3539},
  archiveprefix = {arXiv},
  primaryclass  = {cs.DS}
}

@misc{github-network,
  title         = {Multi-scale Attributed Node Embedding},
  author        = {Benedek Rozemberczki and Carl Allen and Rik Sarkar},
  year          = {2019},
  eprint        = {1909.13021},
  archiveprefix = {arXiv},
  primaryclass  = {cs.LG}
}

@misc{carissimo,
  title    = {Validation of community robustness},
  journal  = {Computational Statistics & Data Analysis},
  volume   = {120},
  pages    = {1-24},
  year     = {2018},
  doi      = {https://doi.org/10.1016/j.csda.2017.10.006},
  url      = {http://www.sciencedirect.com/science/article/pii/S0167947317302347},
  author   = {Annamaria Carissimo and Luisa Cutillo and Italia De Feis}
}

@article{wang-yang-fan,
  author  = {Wang, Yang and Di, Zengru and Fan, Ying},
  year    = {2011},
  month   = {11},
  pages   = {e27418},
  title   = {Identifying and Characterizing Nodes Important to Community Structure Using the Spectrum of the Graph},
  volume  = {6},
  journal = {PloS one},
  doi     = {10.1371/journal.pone.0027418}
}

@article{Raghavan-2007,
  title     = {Near linear time algorithm to detect community structures in large-scale networks},
  volume    = {76},
  issn      = {1550-2376},
  url       = {http://dx.doi.org/10.1103/PhysRevE.76.036106},
  doi       = {10.1103/physreve.76.036106},
  number    = {3},
  journal   = {Physical Review E},
  publisher = {American Physical Society (APS)},
  author    = {Raghavan, Usha Nandini and Albert, Réka and Kumara, Soundar},
  year      = {2007},
  month     = {Sep}
}

@misc{github-graph,
            title={Multi-scale Attributed Node Embedding},
            author={Benedek Rozemberczki and Carl Allen and Rik Sarkar},
            year={2019},
            eprint={1909.13021},
            archivePrefix={arXiv},
            primaryClass={cs.LG}
        }

@article{louvain,
	doi = {10.1088/1742-5468/2008/10/p10008},
	url = {https://doi.org/10.1088%2F1742-5468%2F2008%2F10%2Fp10008},
	year = 2008,
	month = {oct},
	publisher = {{IOP} Publishing},
	volume = {2008},
	number = {10},
	pages = {P10008},
	author = {Vincent D Blondel and Jean-Loup Guillaume and Renaud Lambiotte and Etienne Lefebvre},
	title = {Fast unfolding of communities in large networks},
	journal = {Journal of Statistical Mechanics: Theory and Experiment}
}

@misc{infomap,
author = {D. Edler and A. Eriksson and M. Rosvall},
title = {The MapEquation software package},
url = {http://www.mapequation.org}
}

repository: andrazdeluisa/project-ina

repo_name: andrazdeluisa/project-ina

extension: bib


text:
PDT,Max TemperatureF,Mean TemperatureF,Min TemperatureF,Max Dew PointF,MeanDew PointF,Min DewpointF,Max Humidity, Mean Humidity, Min Humidity, Max Sea Level PressureIn, Mean Sea Level PressureIn, Min Sea Level PressureIn, Max VisibilityMiles, Mean VisibilityMiles, Min VisibilityMiles, Max Wind SpeedMPH, Mean Wind SpeedMPH, Max Gust SpeedMPH,PrecipitationIn, CloudCover, Events, WindDirDegrees

2009-10-1,91,76,60,54,34,8,72,39,5,29.99,29.93,29.88,10,10,10,15,6,25,0.00,0,,13

2009-10-2,82,72,61,61,54,37,90,56,21,29.93,29.87,29.82,10,10,10,15,6,18,0.00,1,Fog,147

2009-10-3,73,67,60,60,56,51,84,71,57,29.83,29.75,29.68,10,10,10,18,9,23,0.00,3,,269

2009-10-4,66,61,56,51,47,43,77,61,44,29.85,29.75,29.69,10,10,9,35,14,38,0.00,2,,260

2009-10-5,67,60,53,51,47,42,72,57,42,29.96,29.92,29.86,10,10,10,17,8,22,0.00,1,,50

2009-10-6,67,61,54,53,50,47,77,67,56,29.93,29.89,29.84,10,10,10,21,7,24,0.00,1,,283

2009-10-7,66,62,57,54,52,50,80,69,58,29.99,29.94,29.89,10,10,10,16,6,22,0.00,4,,271

2009-10-8,68,61,54,56,53,50,86,72,58,30.08,30.04,29.99,10,10,10,15,6,21,0.00,2,,250

2009-10-9,66,62,57,57,55,54,90,77,63,30.09,30.03,29.96,10,10,7,15,7,18,0.00,5,,255

2009-10-10,66,63,59,56,54,51,84,74,63,29.94,29.88,29.81,10,10,9,17,7,22,0.00,5,,242

2009-10-11,66,62,58,51,49,48,72,64,56,29.90,29.86,29.84,10,10,10,18,6,21,0.00,5,,252

2009-10-12,65,62,58,54,50,48,72,64,56,29.88,29.85,29.82,10,10,10,13,5,17,T,6,,143

2009-10-13,67,64,60,63,58,54,93,83,72,30.00,29.93,29.86,10,9,3,18,11,26,0.21,7,Rain,139

2009-10-14,65,63,60,65,63,60,100,97,93,30.10,30.05,29.99,9,3,0,13,6,17,1.09,7,Fog-Rain,153

2009-10-15,72,67,61,64,62,61,100,88,76,30.06,30.00,29.91,10,5,0,14,6,17,0.01,2,Fog,249

2009-10-16,91,77,63,63,59,54,93,62,31,29.91,29.87,29.81,10,10,10,14,4,16,0.00,0,Fog,264

2009-10-17,84,73,62,65,61,58,100,72,43,29.92,29.88,29.85,10,8,0,15,5,18,0.00,1,Fog,151

2009-10-18,70,65,60,63,61,59,100,87,73,29.98,29.94,29.90,10,4,0,14,5,18,0.00,7,Fog,219

2009-10-19,69,66,62,59,57,53,84,74,63,30.00,29.94,29.89,10,10,8,23,9,28,0.00,5,,233

2009-10-20,74,66,58,57,53,47,86,65,44,29.92,29.89,29.85,10,10,10,20,7,23,0.00,1,,295

2009-10-21,72,65,57,59,54,50,84,68,51,29.93,29.88,29.84,10,10,10,15,4,21,0.00,2,,219

2009-10-22,76,67,57,61,58,51,93,68,43,29.93,29.88,29.85,10,6,0,14,6,17,0.00,4,Fog,219

2009-10-23,73,66,58,61,59,50,100,72,44,29.97,29.93,29.89,10,7,0,15,5,18,0.00,3,Fog,270

2009-10-24,73,66,59,61,60,57,100,84,68,29.95,29.89,29.83,10,5,0,14,5,17,0.00,4,Fog,198

2009-10-25,71,66,61,62,60,57,97,83,68,29.94,29.87,29.82,9,4,2,14,5,20,0.00,4,,262

2009-10-26,89,74,58,59,44,15,84,46,7,30.02,29.94,29.86,10,10,8,16,5,18,0.00,3,,254

2009-10-27,73,66,59,60,44,17,93,54,15,29.86,29.75,29.66,10,9,6,29,12,39,0.00,6,,11

2009-10-28,68,61,54,33,20,10,32,22,12,29.96,29.85,29.80,10,10,9,30,12,35,0.00,2,,337

2009-10-29,68,61,53,48,27,13,64,38,12,30.06,30.01,29.95,10,10,10,17,7,22,0.00,2,,326

2009-10-30,68,60,51,56,45,31,78,58,37,30.17,30.11,30.07,10,10,10,14,5,16,0.00,0,,216

2009-10-31,72,63,53,55,50,41,89,62,34,30.09,30.01,29.95,10,10,10,13,4,,0.00,0,,251

repository: nhuntwalker/mystuff

repo_name: nhuntwalker/mystuff


text:
@article{February2011-xm,
 abstract = {Here we aim to demonstrate that in arid environments the
competitive balance between species can be determined by niche
separation with either nitrogen or water as the relevant niche
axis. To do this we sampled roots< 2 mm in diameter for 5 soil
pits equidistant …},
 author = {February, E C and Allsopp, N and Shabane, T and Hattas, D},
 journal = {Plant Soil},
 publisher = {Springer},
 title = {Coexistence of a C4 grass and a leaf succulent shrub in an
arid ecosystem. The relationship between rooting depth, water
and nitrogen},
 year = {2011}
}

repository: SAEON/academic-kickstart

repo_name: SAEON/academic-kickstart


text:
inherit pypi python_setuptools_build_meta

SUMMARY = "Converting Jupyter Notebooks"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=d235895c780fa844e875697e16e5787b"

# Requirements from PIP:
# jupyter-core(OK), bleach, nbformat(OK), mistune(OK), pygments(OK),
# pandocfilters(OK), jinja2(-), entrypoints(-), traitlets(decorator, six, ipython-genutils), testpath(-)
#

RDEPENDS:${PN} += " \
        ${PYTHON_PN}-traitlets \
        ${PYTHON_PN}-jupyter-core \
        ${PYTHON_PN}-pygments \
        ${PYTHON_PN}-mistune \
        ${PYTHON_PN}-nbformat \
        ${PYTHON_PN}-jinja2 \
        ${PYTHON_PN}-entrypoints \
        ${PYTHON_PN}-pandocfilters \
        ${PYTHON_PN}-bleach \
        ${PYTHON_PN}-testpath \
        ${PYTHON_PN}-nbformat \
        ${PYTHON_PN}-defusedxml \
	${PYTHON_PN}-lxml \
	${PYTHON_PN}-beautifulsoup4 \
	${PYTHON_PN}-soupsieve \
        "

SRC_URI[sha256sum] = "10ed693c4cfd3c63583c87ca5c3a2f6ed874145103595f3824efcc8dfcb7522c"
FILES:${PN} += "/usr/share/jupyter/"

BBCLASSEXTEND = "native"

repository: Xilinx/meta-jupyter

repo_name: Xilinx/meta-jupyter

gha_language: BitBake