text:
@inproceedings{krzakala_mutual_2016,
 abstract = {We consider the estimation of a n-dimensional vector x from the knowledge of noisy and possibility non-linear element-wise measurements of xxT, a very generic problem that contains, e.g. stochastic 2-block model, submatrix localization or the spike perturbation of random matrices. Using an interpolation method proposed by Guerra [1] and later refined by Korada and Macris [2], we prove that the Bethe mutual information (related to the Bethe free energy and conjectured to be exact by Lesieur et al. [3] on the basis of the non-rigorous cavity method) always yields an upper bound to the exact mutual information. A lower bound is also provided using a similar technique. For concreteness, we illustrate our findings on the sparse PCA problem, and observe that (a) our bounds match for a large region of parameters and (b) that there exists a phase transition in a region where the spectrum remains uninformative. While we present only the case of rank-one symmetric matrix estimation, our proof technique is readily extendable to low-rank symmetric matrix or low-rank symmetric tensor estimation.},
 author = {Krzakala, F. and Xu, J. and Zdeborová, L.},
 booktitle = {2016 IEEE Information Theory Workshop (ITW)},
 doi = {10.1109/ITW.2016.7606798},
 file = {IEEE Xplore Abstract Record:/Users/florentkrzakala/Zotero/storage/8TD3ZHQE/7606798.html:text/html;Submitted Version:/Users/florentkrzakala/Zotero/storage/P5NWN8JW/Krzakala et al. - 2016 - Mutual information in rank-one matrix estimation.pdf:application/pdf},
 keywords = {Estimation, interpolation, Interpolation, interpolation method, low-rank symmetric tensor estimation, matrix algebra, mutual information, Mutual information, Noise measurement, Numerical models, principal component analysis, random matrices, rank-one symmetric matrix estimation, sparse PCA problem, Symmetric matrices, Upper bound},
 month = {September},
 pages = {71--75},
 title = {Mutual information in rank-one matrix estimation},
 year = {2016}
}

repository: krzakala/academic-kickstart

repo_name: krzakala/academic-kickstart


text:
// Package app contains your local application object. It uses an object oriented model to implement a default
// application, and provides hooks for you to customize its behavior. Web applications can grow in complicated ways,
// and this is the main place you will customize how the server itself behaves.
package app

import (
	"fmt"
	"github.com/goradd/goradd/web/app"
	"goradd-project/config"
	"log"
	"net/http"
)

type Application struct {
	app.Application

	// Your own vars, methods and overrides
}

// MakeApplication creates the application object and related objects.
//
// You can potentially read command line params and make other versions of the app for testing purposes.
func MakeApplication() *Application {
	a := new(Application)
	a.Init()
	return a
}

// Init initializes the application object.
func (a *Application) Init() {
	a.Application.Init(a)
}

// MakeAppServer creates the handler that serves the application.
//
// This is typically where you create the middleware stack that divides the server
// into small pieces that each do one job.
//
// The default use the base Application's middleware stack, which itself is quite flexible
// and has hooks where you can override pieces. Or, you can just replace the whole thing
// and reimplement it here.
//
// See also the Init function where can assign additional handlers to specific paths via
// the application muxers.
func (a *Application) MakeAppServer() http.Handler {
	return a.Application.MakeAppServer()
}

// RunWebServer launches the main webserver.
func (a *Application) RunWebServer() (err error) {
	handler := a.MakeAppServer()

	// If you are directly responding to encrypted requests, launch a server here. Note that you CAN put the app behind
	// a web server, like Nginx or Apache and let the web server handle the certificate issues.

	if config.TLSPort != 0 {
		go func() {
			var addr string
			if config.TLSPort != 0 {
				addr = fmt.Sprint(":", config.TLSPort)
			}

			log.Fatal(app.ListenAndServeTLSWithTimeouts(addr, config.TLSCertFile, config.TLSKeyFile, handler))
		}()
	}

	var addr string
	if config.Port != 0 {
		addr = fmt.Sprint(":", config.Port)
	}
	err = app.ListenAndServeWithTimeouts(addr, handler)

	return
}

// Uncomment and edit to change the page cache. You can call the embedded Application version first, and then alter it too.
/*
func (a *Application) SetupPagestateCaching() {
	// Controls how pages are cached. This will vary depending on whether you are using multiple machines to run your app,
	// and whether you are in development mode, etc.

	// This default is for an in-memory store on one server and only one
	// process on that server. It basically does not serialize anything and leaves the entire formstate intact in memory.
	// This makes for a very fast server, but one that takes up quite a bit of RAM if you have a lot of simultaneous users.
	page.SetPagestateCache(page.NewFastPageCache())

	// comment out the above, and uncomment below to change to a serialized page cache. It is still
	// in memory, but can be used to test whether the page cache could be stored in a database instead.
	//page.SetPagestateCache(page.NewSerializedPageCache(100, 60*60*24))

	// Controls how pages are serialized if a serialization cache is being used. This version uses the gob encoder.
	// You likely will not need to change this, but you might if your database cannot handle binary data.
	page.SetPageEncoder(page.GobPageEncoder{})
}
*/

// SetupMessenger injects the global messenger that permits pub/sub communication between the server and client.
// Uncomment the following if you need to change parameters on the hub.
// If you don't need this at all, you can uncomment below and simply make it an empty function.
// Or, you can setup a different pub/sub messaging service here.
/*
func (a *Application) SetupMessenger() {
	// The default sets up a websocket based messenger appropriate for development and single-server applications
	messenger := new (ws.WsMessenger)
	messageServer.Messenger = messenger
	hub := messenger.Start()
	hub.WriteWait = 10 * time.Second // for example
}

*/

/*
This is an example of how you can setup your own custom handler for websockets.
Implement the functions you need.

// This is an example of a websocket auth handler for a custom websocket based messenger.
// At a minimum you must identify the user and set the client ID so that messages go to that client.
func (a *Application) myWebsocketAuthHandler(next http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		id := r.FormValue("id")

		// confirm that the client is authorized. Substitute your own way of doing this here.
		parts := strings.Split(id, "-")

		challenge := parts[0] + "mySalt"

		sum := sha256.Sum256([]byte(challenge))
		pSum := fmt.Sprintf("%x", sum)
		if pSum != parts[1] {
			return
		}

		// Put the client ID in the context so that the framework's websocket handler can be used it to identify the client
		ctx := context.WithValue(r.Context(), goradd.WebSocketContext, parts[0])
		next.ServeHTTP(w, r.WithContext(ctx))
	})
}
*/

// SetupDatabaseWatcher injects the global database watcher and broadcaster
// which detects database changes and then draws controls that are watching for those changes.
//
// The default uses the provided goradd websocket message server to broadcast changes to the database, which is sufficient
// for a single-server application. If you need a multi-server scalable version, change the watcher here to something that
// uses a distributed pub/sub mechanism.
//
// Changing the broadcaster will let you do additional things on the server side when specific
// database items change.
/*
func (a *Application) SetupDatabaseWatcher() {
	watcher.Watcher = &watcher.DefaultWatcher{}
	broadcast.Broadcaster = &broadcast.DefaultBroadcaster{}
}
*/

// ServeRequest is the place to serve up any files that have not been handled in any other way, either by a previously
// declared handler, or by the goradd app server, or the static file server. ServeRequest is only called when all
// the other methods have failed. The default serves up a 404 not found error, and you can customize whatever error
// message you want to present to the user when a bad url is entered into the browser.
/*
func (a *Application) ServeRequest (w http.ResponseWriter, r *http.Request) {
	http.NotFound(w, r)

	// If you want to log these errors to detect a potentially bad link somewhere on your site, uncomment below.
	//log.Error("Bad url entered: " + r.URL.Path)
}
*/

// SetupSessionManager sets up the global session manager. The session manager can be used to save data that is
// specific to a user and specific to the user's time on a browser. Sessions are often used to save
// login credentials so that you know the current user is logged in.
//
// The default uses a 3rd party session manager, stores the session in memory, and tracks sessions using cookies.
// This setup is useful for development, testing, debugging, and for moderately used websites.
// However, this default does not scale, so if you are launching multiple copies of the app in production,
// you should override this with a scalable storage mechanism.
//
// The code here calls the default, and then gives you the option to further refine how the session works.
/*
func (a *Application) SetupSessionManager() {
	a.Application.SetupSessionManager()
	sm := session.SessionManager()

	// If you are only serving your application over https, you should do this too for added security.
	if (config.Release) {
		sm.(session.ScsManager).SessionManager.Cookie.Secure = true
	}
}
*/

// SessionHandler initializes the global session handler. The default version uses the global session handler, which is
// highly configurable. However, if you want to use a completely different session handler, you can do so here.
/*
func (a *Application) SessionHandler(next http.Handler) http.Handler {
	return session.Use(next)
}
*/

// PutContext allocates a blank context object for our application specific context data, to be populated later.
// Activate it by uncommenting the function below, and then edit the accompanying context.go file to add your
// application specific context data.
/*
func (a *Application) PutContext(r *http.Request) *http.Request {
	ctx := r.Context()
	// ctx = auth.PutContext(ctx) uncomment this to use the auth package for authentication
	ctx = PutLocalContext(ctx) // puts your local context if you need that
	r = r.WithContext(ctx)
	// be sure to call the superclass version so the goradd framework can operate
	return a.Application.PutContext(r)
}

// ServeRequestHandler is the last handler on the default call chain.
// The default below returns a simple not found error.
// By default, this handler is never reached, because of the html root handler registered in
// goradd-project/web/embedder.go. You will need to modify or delete that handler
// to reach this handler.
func (a *Application) ServeRequestHandler() http.Handler {
	fn := func(w http.ResponseWriter, r *http.Request) {
		http.NotFound(w, r)
	}
	return http.HandlerFunc(fn)
}
*/

license: MIT

repository: goradd/goradd

license_type: permissive

repo_name: goradd/goradd

branch_name: refs/heads/main

gha_license_id: MIT

gha_language: Go

extension: go


text:
# base recipe: meta/recipes-extended/watchdog/watchdog_5.15.bb
# base branch: warrior
# base commit: 6d2e12e79211b31cdf5ea824fb9a8be54ba9a9eb

SUMMARY = "Software watchdog"
DESCRIPTION = "Watchdog is a daemon that checks if your system is still \
working. If programs in user space are not longer executed \
it will reboot the system."
HOMEPAGE = "http://watchdog.sourceforge.net/"
BUGTRACKER = "http://sourceforge.net/tracker/?group_id=172030&atid=860194"

LICENSE = "GPL-2.0+"
LIC_FILES_CHKSUM = "file://COPYING;md5=ecc0551bf54ad97f6b541720f84d6569"

require recipes-debian/sources/${BPN}.inc
inherit debian-package

DEBIAN_UNPACK_DIR = "${WORKDIR}/${BPN}-${PV}"
DEBIAN_PATCH_TYPE = "nopatch"
FILESPATH_append = ":${COREBASE}/meta/recipes-extended/watchdog/watchdog"
SRC_URI += " \
           file://0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch \
           file://0001-watchdog-remove-interdependencies-of-watchdog-and-wd.patch \
           file://watchdog.init \
           file://wd_keepalive.init \
"

inherit autotools update-rc.d systemd pkgconfig

DEPENDS += "libtirpc"
CFLAGS += "-I${STAGING_INCDIR}/tirpc"
LDFLAGS += "-ltirpc"

EXTRA_OECONF += " --disable-nfs "

INITSCRIPT_PACKAGES = "${PN} ${PN}-keepalive"

INITSCRIPT_NAME_${PN} = "watchdog"
INITSCRIPT_PARAMS_${PN} = "start 25 1 2 3 4 5 . stop 85 0 6 ."

INITSCRIPT_NAME_${PN}-keepalive = "wd_keepalive"
INITSCRIPT_PARAMS_${PN}-keepalive = "start 25 1 2 3 4 5 . stop 85 0 6 ."

SYSTEMD_PACKAGES = "${PN} ${PN}-keepalive"
SYSTEMD_SERVICE_${PN} = "watchdog.service"
SYSTEMD_SERVICE_${PN}-keepalive = "wd_keepalive.service"
# When using systemd, consider making use of internal watchdog support of systemd.
# See RuntimeWatchdogSec in /etc/systemd/system.conf.
SYSTEMD_AUTO_ENABLE = "disable"

do_install_append() {
	install -d ${D}${systemd_system_unitdir}
	install -m 0644 ${S}/debian/watchdog.service ${D}${systemd_system_unitdir}
	install -m 0644 ${S}/debian/wd_keepalive.service ${D}${systemd_system_unitdir}

	install -Dm 0755 ${WORKDIR}/watchdog.init ${D}/${sysconfdir}/init.d/watchdog
	install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive

	# watchdog.conf is provided by the watchdog-config recipe
	rm ${D}${sysconfdir}/watchdog.conf
}

do_debian_unpack_extra() {
	cd ${DEBIAN_UNPACK_DIR}
	patch -p1 < ${WORKDIR}/${BPN}_${DPV}.diff
}

PACKAGES =+ "${PN}-keepalive"

FILES_${PN}-keepalive = " \
    ${sysconfdir}/init.d/wd_keepalive \
    ${systemd_system_unitdir}/wd_keepalive.service \
    ${sbindir}/wd_keepalive \
"

RDEPENDS_${PN} += "${PN}-config"
RRECOMMENDS_${PN} += "kernel-module-softdog"

RDEPENDS_${PN}-keepalive += "${PN}-config"
RCONFLICTS_${PN}-keepalive += "${PN}"
RRECOMMENDS_${PN}-keepalive += "kernel-module-softdog"

repository: miraclelinux/meta-debian-extended

repo_name: miraclelinux/meta-debian-extended

branch_name: refs/heads/warrior

gha_language: BitBake

extension: bb


text:
SUMMARY = "Run a subprocess in a pseudo terminal"
HOMEPAGE = "http://ptyprocess.readthedocs.io/en/latest/"
SECTION = "devel/python"
LICENSE = "ISC"
LIC_FILES_CHKSUM = "file://LICENSE;md5=cfdcd51fa7d5808da4e74346ee394490"

SRCNAME = "ptyprocess"

SRC_URI = "https://files.pythonhosted.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
SRC_URI[md5sum] = "94e537122914cc9ec9c1eadcd36e73a1"
SRC_URI[sha256sum] = "0530ce63a9295bfae7bd06edc02b6aa935619f486f0f1dc0972f516265ee81a6"

UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/ptyprocess"

S = "${WORKDIR}/${SRCNAME}-${PV}"

inherit setuptools

RDEPENDS_${PN} = "\
    python-core \
"

BBCLASSEXTEND = "native nativesdk"

branch_name: refs/heads/master


text:
package main

import (
	"fmt"

	"github.com/lazytiger/unityai"
	"github.com/lazytiger/unityai/format"
)

func main() {
	var a uint8 = 0x01
	a &= ^uint8(0x01)
	a |= 0x02
	fmt.Printf("%x\n", a)
	return
	data, err := format.LoadFromTxtFile("CSZ.asset.txt")
	if err != nil {
		println(err.Error())
	}
	fmt.Printf("%+v\n", len(data.M_NavMeshTiles))
	nvData := unityai.NewDataFromFormat(data)
	manager := unityai.NewNavMeshManager()
	manager.LoadData(nvData)
	var hit unityai.NavMeshHit
	var sourcePos, targetPos, nSource, nTarget unityai.Vector3f
	sourcePos.Set(100, 6, 68)
	if manager.SamplePosition(&hit, sourcePos, 100) {
		fmt.Printf("hit found:%+v\n", hit)
		nSource = hit.GetPosition()
	} else {
		println("nothing hit")
	}
	targetPos.Set(100, 10, 100)
	if manager.Raycast(&hit, sourcePos, targetPos) {
		fmt.Printf("hit found:%+v\n", hit)
		nTarget = hit.GetPosition()
	} else {
		println("nothing hit")
	}

	path := unityai.NewNavMeshPath()
	count := manager.CalculatePolygonPath(path, nSource, nTarget, 30)
	if count > 0 {
		fmt.Printf("count:%d, path:%+v\n", count, path)
	} else {
		fmt.Printf("no path found\n")
	}

	corners := make([]unityai.Vector3f, count)
	count = manager.CalculatePathCorners(corners, count, path)
	if count > 0 {
		fmt.Printf("count:%d, path:%+v\n", count, corners)
	} else {
		println("not found")
	}
}