database/sql: Ability to get drivername from instance

I'd like to be able to get the driver name..
eg
Db, err = sql.Open("mysql", "root:root@/somestuff")
fmt.Printf("Driver= ",  Db.Driver.Name) << Need...

Case Example.. I want to derive an sqlx instance from an existing connection
// Currently
func SetupDb( driver string, db *sql.DB){
    Dbx = sqlx.NewDb(db, driver)
}
// Wanted
func SetupDb( db *sql.DB){
    Dbx = sqlx.NewDb(db, db.Driver.Name)
}

https://github.com/daffodil/go-mailkit/blob/master/postfixadmin/setup.go#L15

I don't know what an sqlx is. When you open a *DB with https://golang.org/pkg/database/sql/#Open , can't you just remember the mapping between (driverName, dataSourceName) and the *DB yourself?

In this case, I am trying to avoid having to store another variable with the driver name and having to pass it around. Expect it could be added to the Db instance itself for convenienace instead.

Maybe we could add it to DBStats, so we don't add new methods to DB and users can just use the existing Stats method.

I need this functionality also. I am using some external libraries and they want the database connection and the driver name (as string).

One way you can do this today is to get the DB.Driver() and reflect on that type.
See https://github.com/golang-sql/sqlexp/blob/c2488a8be21d20d31abf0d05c2735efd2d09afe4/quoter.go#L46
for an example. It isn't foolproof as driver type names may change, but they usually don't.

Well thats one way to skin a cat, what I am having to do as a workaroundzzz,
is pass a struct{driver+creds+ nick+stuff} around....
and it seems daft to me that there is not a "field" for the want of the word that simply contains the driver_name and some meta data..
Example case.. Here u are with a new db connection... and a new project..
So before i start to even load that, I need to run around all the db admins asking ? which engine is this code using ?
so its daft.. in my case btw i run www sites + scripts and interfacing db's of all types.. so this is a "bane of contention" as I now need to move around all driver info et all, instead of a DB "object" that COULD do that for me.. Its a simple solution and i dont unserstand quite why it aint there.. to be honest..
https://golang.org/pkg/database/sql/driver/#Driver
type Driver interface {
        // Open returns a new connection to the database.
        // The name is a string in a driver-specific format.
        //
        // Open may return a cached connection (one previously
        // closed), but doing so is unnecessary; the sql package
        // maintains a pool of idle connections for efficient re-use.
        //
        // The returned connection is only used by one goroutine at a
        // time.
        Open(name string) (Conn, error)
        Name << Sriver caches name for help down line later
}

Anyway. .sorry for rant..

@kardianos Make is  "method" or something.. help me ..  Im my case I am using multiple db's(as a new integrator)..

@pedromorgan You're fine. Are you aware of the DB.Driver method?
https://golang.org/pkg/database/sql/#DB.Driver
Let me think on this though. I created a playground for possible extensions:
https://godoc.org/github.com/golang-sql/sqlexp
as you saw before.
In the meantime I could create something like:
package sqlexp

type Flavor int // Flavor of SQL text.

const (
    Unknown Flavor = iota
    Postgres
    TSQL
    MySQL
    SQLite
)

// DriverFlavor returns the SQL variant used.
//
// Obtain the driver value with the sql.DB.Driver method.
func DriverFlavor(d driver.Driver) Flavor {

}

Then you just have to pass around the *sql.DB, right?

No.. I don't want contstants.. I want to know which driver am using.. from string
If its mysql = No spatial//
The only things I want passed is the Name() of the interface..
Is it postgis ?? is it mysql ?? is it gitsql ?? I need to know that cos I cant even create a connection+addoen unless I know that... !!
Othewise Please implement asap the Reflact Inteterface() which @bradfitz is probally correct in the stats module..

Up 2 Speed.. is spatial..

sqlite
-- vs sqlspatial

and

postres
-- vs postgis

If spatial ever got into golang, then I will drop all other tools,
go on a months holiday and come back.. clean up the yards and goo..

Here is the problem..
https://godoc.org/github.com/freeflightsim/fg-navdb/navdb
I want a local cache vs online one in same interface..

The name should be considered for Flavor vs Dialect. :+1:

@mattn, yeah, Dialect would probably be a better name. I don't think this needs to be in the std lib right away. I'll prototype something in sqlexp.
@pedromorgan I may not be completly understanding your usecase, but if you want to see if postgresql has the postgis extensions installed, that seems like a capability you would query initially when connection. But I'm not arguing with you, a name would be useful attached to a driver. Let me work something up.

I encountered the same problem.
In my case, I want to write some middleware without leting the users care about which database type they use.
func init(db *sql.DB) {
   swith(getDbType(db)) {
        case "mysql":
            // logic 1
        case "oracle":
           // logic 2
        case "postgres":
          // logic 3

   }
}

SELECT version(); and parsing response after helps me. Not a best idea i know.

As an author of database libraries that work with multiple drivers (PostgreSQL, MySQL, SQLite, MSSQL, etc) I also think it'd be extremely useful to be able to detect which driver the user is using (without having to ask for an additional parameter).

I also need this feature to know the driver name while doing database migrations cause different driver requires different SQL.

I encountered the same problem.
In my case, I want to write some middleware without leting the users care about which database type they use.
func init(db *sql.DB) {
   swith(getDbType(db)) {
        case "mysql":
            // logic 1
        case "oracle":
           // logic 2
        case "postgres":
          // logic 3

   }
}

I have a similar need to know what is the SQL dialect of a database (MySQL, Oracle, etc.). For now, I manually maintain a list of Go driver package names and their dialects (eg. github.com/go-sql-driver/mysql => MySQL). So I get the package name using reflect on the driver instance. Ideally, I'd love a driver to provide the dialect its database has.

I believe this issue has been solved.
It's trivial in recent Go versions.
var db *sql.DB
switch db.Driver().(type) {
    case *mysql.MySQLDriver:
        break // mysql
    ...
}

I believe this issue has been solved.
It's trivial in recent Go versions.
var db *sql.DB
switch db.Driver().(type) {
    case *mysql.MySQLDriver:
        break // mysql
    ...
}

@terorie The ability to get only the driver name would be better.
As you suggested, a given library would have to import many SQL drivers to be able to match them, even if the user will only use one of them.
If it returned a string, libraries would not need to import any driver at all, and the user will only import those he uses.

@terorie The ability to get only the driver name would be better.
As you suggested, a given library would have to import many SQL drivers to be able to match them, even if the user will only use one of them.
If it returned a string, libraries would not need to import any driver at all, and the user will only import those he uses.

a given library would have to import many SQL drivers to be able to match them, even if the user will only use one of them

@andreynering It's hard to understand the use-case for this. If your code tries to match a specific driver, with a code path that is only taken when that driver is active anyways, what's the issue with importing its package? Modularization for shared libraries can be achieved via side-effect imports. Another cheap and easy option is checking matching the driver type via reflection: reflect.TypeOf(driver).String().

a given library would have to import many SQL drivers to be able to match them, even if the user will only use one of them

@andreynering It's hard to understand the use-case for this. If your code tries to match a specific driver, with a code path that is only taken when that driver is active anyways, what's the issue with importing its package? Modularization for shared libraries can be achieved via side-effect imports. Another cheap and easy option is checking matching the driver type via reflection: reflect.TypeOf(driver).String().

@terorie In short, it'll be imported and bloat the binary size without being used.
And an important detail: some SQL drivers require a C compiler to be available if imported, notably SQLite. That's annoying if the user is not using that driver at all.
I've shortly dealt with some Oracle drivers in the past, and they require even more complicated setups, just to compile the binary, even if you don't use it.

@terorie In short, it'll be imported and bloat the binary size without being used.
And an important detail: some SQL drivers require a C compiler to be available if imported, notably SQLite. That's annoying if the user is not using that driver at all.
I've shortly dealt with some Oracle drivers in the past, and they require even more complicated setups, just to compile the binary, even if you don't use it.

Db, err = sql.Open("mysql", "root:root@/some_db")
Db['__DRIVER__"] = "mysql"
Db['__LABEL__"] = "connection to some db"

Db, err = sql.Open("mysql", "root:root@/some_db")
Db['__DRIVER__"] = "mysql"
Db['__LABEL__"] = "connection to some db"

In short, it'll be imported and bloat the binary size without being used.

@andreynering I understand the concern about the import graph but there are other ways to solve this. To elaborate on my previous comment here are some options:

Carry the driver name in a struct (e.g. https://github.com/jmoiron/sqlx)
Inverse dependencies: Instead of having the generic component switch and invoke driver-specific code, offer driver wrappers to be imported via side-effect or similar (e.g. https://github.com/go-gorm/gorm)
Using a type switch through reflection rather than the regular .(type) switch.

In short, it'll be imported and bloat the binary size without being used.

@andreynering I understand the concern about the import graph but there are other ways to solve this. To elaborate on my previous comment here are some options:

Carry the driver name in a struct (e.g. https://github.com/jmoiron/sqlx)
Inverse dependencies: Instead of having the generic component switch and invoke driver-specific code, offer driver wrappers to be imported via side-effect or similar (e.g. https://github.com/go-gorm/gorm)
Using a type switch through reflection rather than the regular .(type) switch.

there are any updates on the SQL get river name feature? this issue is still open.

This is useful when your function receives *sql.DB or *sql.TX as a input parameter and you want to figure out what placeholders should used.

If this is done someday, please don't forget we want the db type from *sql.Tx as well.

Here is my hacks, how dirty!
// due to the lack of a common interface between *sql.DB and *sql.Tx
// when I said go's sql sucks, I meant it.
type DB interface {
	Query(query string, args ...any) (*sql.Rows, error)
	Exec(query string, args ...any) (sql.Result, error)
}

type DbType int

const (
	Unknown DbType = iota
	SQLite
	MySQL
	PostgreSQL
	MSSQLServer
	Oracle
)

var dbTypeMap = map[DB]DbType{}

func getDbType(conn DB) DbType {
	if val, ok := dbTypeMap[conn]; ok {
		return val
	}

	v, err := QueryToMaps(conn, "SELECT VERSION() AS version")
	if err == nil && len(v) > 0 {
		version := strings.ToLower(fmt.Sprint(v[0]["version"]))
		if strings.Contains(version, "postgres") {
			dbTypeMap[conn] = PostgreSQL
			return PostgreSQL
		} else {
			dbTypeMap[conn] = MySQL
			return MySQL
		}
	}

	v, err = QueryToMaps(conn, "SELECT @@VERSION AS version")
	if err == nil && len(v) > 0 {
		version := strings.ToLower(fmt.Sprint(v[0]["version"]))
		if strings.Contains(version, "microsoft") {
			dbTypeMap[conn] = MSSQLServer
			return MSSQLServer
		} else {
			return Unknown
		}
	}

	v, err = QueryToMaps(conn, "SELECT * FROM v$version")
	if err == nil && len(v) > 0 {
		dbTypeMap[conn] = Oracle
		return Oracle
	}

	v, err = QueryToMaps(conn, "SELECT sqlite_version() AS version")
	if err == nil && len(v) > 0 {
		dbTypeMap[conn] = SQLite
		return SQLite
	}

	return Unknown
}


simplify and fix broken PHPDoc references

Would love this to be merged, currently the library causes PHPStan to fail in our CI


push notifications not working

http://octopodprint.com/
http://my_pi_IP:8080/?action=snapshot
I've got the "pro" version of the app open on my phone, and send test notification fails everytime. my phone is on the same network as my pi.

Hi @Linkeb3, thanks for reporting this and sharing your setup. Those parameters look fine to me.
What do you mean by the pro version of the app? Do you have OctoPod installed or is this another application that you are running? If you have OctoPod installed then something else to check is what @csimmons01 found in this thread https://github.com/gdombiak/OctoPrint-OctoPod/issues/39.
Let me know how it goes with that information.
Thanks,
Gaston

The octopod has a paid version, I did pay to upgrade it. I can see the camera, bed temp, everything in the app. But when I go to send a test message it fails, citing it cannot find an IOS device.
I looked through the other article, that appears to be for bad messages, not no messages.

@Linkeb3 are you maybe using OctoClient? OctoPod is a 100% free and open source client. This plugin only works with OctoPod app (not with OctoClient or any other iOS app)
Regards,
Gaston

Wow, sorry for the waste of time.. that’s 100% it.

No worries. Give it a try to OctoPod app. Hope you like it enough to use it as your main app. :)

The layout in OctoClient was easier, but the functionality in octopod is superior


NullPointerException in JsonType when used in ColumnResult

Hello,
First of all, thanks for the library!
I've encountered a NullPointerException when trying to use one of the types in the library in a ResultSetMapping/ColumnResult.
Specifically, when I replace JsonNode.class with JsonType.class in this line https://github.com/vladmihalcea/hibernate-types/blob/master/hibernate-types-52/src/test/java/com/vladmihalcea/hibernate/type/json/PostgreSQLJsonNodeTypeTest.java#L200 the test gives
org.hibernate.MappingException: Could not instantiate Type: com.vladmihalcea.hibernate.type.json.JsonType

	at org.hibernate.type.TypeFactory.type(TypeFactory.java:113)
	at org.hibernate.type.TypeFactory.byClass(TypeFactory.java:70)
	at org.hibernate.type.TypeResolver.heuristicType(TypeResolver.java:126)
	at org.hibernate.type.TypeResolver.heuristicType(TypeResolver.java:91)
	at org.hibernate.cfg.annotations.ResultsetMappingSecondPass.doSecondPass(ResultsetMappingSecondPass.java:184)
	at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processSecondPasses(InFlightMetadataCollectorImpl.java:1693)
	at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processSecondPasses(InFlightMetadataCollectorImpl.java:1660)
	at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:295)
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1224)
	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1255)
	at com.vladmihalcea.hibernate.util.AbstractTest.newEntityManagerFactory(AbstractTest.java:271)
	at com.vladmihalcea.hibernate.util.AbstractTest.init(AbstractTest.java:74)
	...
Caused by: java.lang.NullPointerException
	at com.vladmihalcea.hibernate.type.json.internal.JsonTypeDescriptor.setParameterValues(JsonTypeDescriptor.java:70)
	at com.vladmihalcea.hibernate.type.json.JsonType.setParameterValues(JsonType.java:96)
	at org.hibernate.type.TypeFactory.injectParameters(TypeFactory.java:123)
	at org.hibernate.type.TypeFactory.type(TypeFactory.java:108)
	... 33 more
...

However replacing it with JsonNodeBinaryType.class passes the test, so I wasn't sure if specifying the Hibernate type is a supported use case. Seems like I would have to write a custom concrete Hibernate type to use here if I wanted to get an extraction to a Map. Maybe a better error message would be helpful to figure out what's supported / not supported?
Thanks.

Thanks. I'm glad you liked it.
Since you already found a way to reproduce the issue, you could try to debug it and see what's needed to be changed in order to have the test working. Once you figure out the problem, you should send me a Pull Request so that I could review it.

You can't replace this:
@ColumnResult(name = "properties", type = JsonNode.class)

with this:
@ColumnResult(name = "properties", type = JsonType.class)

The former tells that the properties will be a JSON object. Your change tells that the properties entity attribute is a Hibernate TYpe, which makes no sense.


Ported STOCKMARKET to Javascript

📈📉

BTW made a mistake, it was the 93th program ported. Now all of Javascript is completed.

Really? WOW! That's amazing!
On Tue, Mar 30, 2021 at 7:31 PM Oscar Toledo @.***>
wrote:

BTW made a mistake, it was the 93th program ported. Now all of Javascript
is completed.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/coding-horror/basic-computer-games/pull/258#issuecomment-810711006,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AALTWVLZNANGROYVOSFS5Z3TGKCOLANCNFSM4Z6YKOTQ
.


Feature request: Disable increasing the slider

Is there a way to prevent the user from increasing the slider? Eg. only being able to decrease it until 0? If yes, any tips how someone would do it?

I have something similar define min/max for initial and end handler, but haven't finished the testing if you help me out with the testing can load that change to my fork.

refer to my fork and use
minmaxValidator: MinMaxAngleValidator(
iniHandlerMinValue: 5,
iniHandlerMaxValue: 5,
endHandlerMinValue: 50,
endHandlerMaxValue: 200,


Add a hero image

Make us a nice big header image, that can fill the horizontal space and is a bombastic start to our baby website!
Don't worry about the specific perfect code to add it with - whether as an image or CSS background-image, we can figure out those details later :)

Oh man we're going to look pro.
Do you mind adding in the description what a hero image is, just in case someone is unaware? Please/thanks 😉

Whoever is going to do this -- add the image into a new folder called "images". I thought about having it in "static/images" but I feel just having an images folder will be easier for newcomers to understand.
Does that make sense?

Oh that's a good idea!

I didn't even see this before I posted the Rick Roll.

Hi folks!
I can handle this one. Just sent it a request. :)


Resector Error in Terminal

I've typed in resect -help and have the following output. Anyone else had this issue?
rorypiper@MS00048528 anat % resect sub-15_preop_t1w_iso1mm.nii.gz gif_parcellation.nii.gz t1_resected.nii.gz t1_resection_label.nii.gz
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 791, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (SimpleITK 2.0.2 (/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages), Requirement.parse('SimpleITK!=2.0.*'), {'torchio'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/resect", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3251, in <module>
    def _initialize_master_working_set():
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
    f(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3263, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 585, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 791, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (SimpleITK 2.0.2 (/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages), Requirement.parse('SimpleITK!=2.0.*'), {'torchio'})

Hi, @roryjpiper. I incorrectly pointed you to the TorchIO repo, so I moved the issue here instead.
I suspect some of your installed libraries are clashing. I have updated the installation instructions on the README of this repository. Things should be easier now. Please try them and let me know if that worked.
This code is a bit experimental and not very well documented, so feel free to request features, ask questions and report any other issues that you have. I'm also happy to meet if you think the library can be further adapted to your needs.

Thanks Fernando,
Thanks very much for this. I have uninstalled everything and then tried to re-install using the read-me from GitHub …..unfortunately, I am still getting the glitch below.
I would be very grateful if we could meet - virtual or in-person - to troubleshoot.
Thanks,
Rory
@.*** sub-001 % resect sub-001_preop_T1w.nii.gz gif_parcellation.nii.gz t1_resected.nii.gz t1_resection_label.nii.gz
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/bin/resect", line 6, in
from pkg_resources import load_entry_point
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/init.py", line 3251, in
def _initialize_master_working_set():
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/init.py", line 3234, in _call_aside
f(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/init.py", line 3263, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/init.py", line 583, in _build_master
ws.require(requires)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/init.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/init.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'resector' distribution was not found and is required by the application

On 2 Aug 2021, at 17:04, Fernando Pérez-García @.***> wrote:
Hi, @roryjpiper https://github.com/roryjpiper. I incorrectly pointed you to the TorchIO repo, so I moved the issue here instead.
I suspect some of your installed libraries are clashing. I have updated the installation instructions on the README of this repository. Things should be easier now. Please try them and let me know if that worked.
This code is a bit experimental and not very well documented, so feel free to request features, ask questions and report any other issues that you have. I'm also happy to meet if you think the library can be further adapted to your needs.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/fepegar/resector/issues/8#issuecomment-891144298, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJYYLT3S5SHME4F7FJNCHBDT226XVANCNFSM5BM5I7FQ.

Could you please paste here the exact commands you are using?

Hi,
This what I typed
resect sub-001_preop_T1w.nii.gz gif_parcellation.nii.gz t1_resected.nii.gz t1_resection_label.nii.gz

On 2 Aug 2021, at 22:48, Fernando Pérez-García @.***> wrote:
Could you please paste here the exact commands you are using?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/fepegar/resector/issues/8#issuecomment-891356420, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJYYLT2WSXEHSU3BZ6CDZJLT24HCJANCNFSM5BM5I7FQ.
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

I meant all the commands you used to install the library as well, not just to run the algorithm, sorry.

Thanks.
Here it is. Line by line. I have seen the small error at the start about the conda directory. Is this the whole problem?
@.*** ~ % conda create --name resenv python=3.8 --yes && conda activate resenv
Collecting package metadata (current_repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.10.1
latest version: 4.10.3
Please update conda by running
$ conda update -n base -c defaults conda

Package Plan
environment location: /Users/rorypiper/opt/anaconda3/envs/resenv
added / updated specs:
- python=3.8
The following NEW packages will be INSTALLED:
ca-certificates    pkgs/main/osx-64::ca-certificates-2021.7.5-hecd8cb5_1
certifi            pkgs/main/osx-64::certifi-2021.5.30-py38hecd8cb5_0
libcxx             pkgs/main/osx-64::libcxx-10.0.0-1
libffi             pkgs/main/osx-64::libffi-3.3-hb1e8313_2
ncurses            pkgs/main/osx-64::ncurses-6.2-h0a44026_1
openssl            pkgs/main/osx-64::openssl-1.1.1k-h9ed2024_0
pip                pkgs/main/osx-64::pip-21.2.2-py38hecd8cb5_0
python             pkgs/main/osx-64::python-3.8.11-h88f2d9e_0_cpython
readline           pkgs/main/osx-64::readline-8.1-h9ed2024_0
setuptools         pkgs/main/osx-64::setuptools-52.0.0-py38hecd8cb5_0
sqlite             pkgs/main/osx-64::sqlite-3.36.0-hce871da_0
tk                 pkgs/main/osx-64::tk-8.6.10-hb0a8c7a_0
wheel              pkgs/main/noarch::wheel-0.36.2-pyhd3eb1b0_0
xz                 pkgs/main/osx-64::xz-5.2.5-h1de35cc_0
zlib               pkgs/main/osx-64::zlib-1.2.11-h1de35cc_3
Preparing transaction: done
Verifying transaction: - WARNING conda.core.path_actions:verify(962): Unable to create environments file. Path not writable.
environment location: /Users/rorypiper/.conda/environments.txt
done
Executing transaction: / WARNING conda.core.envs_manager:register_env(50): Unable to register environment. Path not writable or missing.
environment location: /Users/rorypiper/opt/anaconda3/envs/resenv
registry file: /Users/rorypiper/.conda/environments.txt
done

To activate this environment, use

$ conda activate resenv

To deactivate an active environment, use

$ conda deactivate
(resenv) @.*** ~ % pip install light-the-torch
Collecting light-the-torch
Using cached light_the_torch-0.3.3-py3-none-any.whl (18 kB)
Collecting pip<20.3.,>=20.1.
Using cached pip-20.2.4-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip, light-the-torch
Attempting uninstall: pip
Found existing installation: pip 21.2.2
Uninstalling pip-21.2.2:
Successfully uninstalled pip-21.2.2
Successfully installed light-the-torch-0.3.3 pip-20.2.4
(resenv) @.*** ~ % ltt install torch
Collecting torch==1.9.0
Using cached https://download.pytorch.org/whl/cpu/torch-1.9.0-cp38-none-macosx_10_9_x86_64.whl (127.9 MB)
Collecting typing-extensions
Using cached typing_extensions-<IP_ADDRESS>-py3-none-any.whl (26 kB)
Installing collected packages: typing-extensions, torch
Successfully installed torch-1.9.0 typing-extensions-<IP_ADDRESS>
WARNING: You are using pip version 20.2.4; however, version 21.2.2 is available.
You should consider upgrading via the '/Users/rorypiper/opt/anaconda3/envs/resenv/bin/python -m pip install --upgrade pip' command.
Requirement already satisfied: torch in ./opt/anaconda3/envs/resenv/lib/python3.8/site-packages (1.9.0)
Requirement already satisfied: typing-extensions in ./opt/anaconda3/envs/resenv/lib/python3.8/site-packages (from torch) (<IP_ADDRESS>)
WARNING: You are using pip version 20.2.4; however, version 21.2.2 is available.
You should consider upgrading via the '/Users/rorypiper/opt/anaconda3/envs/resenv/bin/python -m pip install --upgrade pip' command.
(resenv) @.*** ~ % pip install git+https://github.com/fepegar/resector
Collecting git+https://github.com/fepegar/resector
Cloning https://github.com/fepegar/resector to /private/var/folders/2p/vgnsmsgj4vl20d8gff9z74ch0000gp/T/pip-req-build-y6fplz6a
Collecting Click>=7.0
Using cached click-8.0.1-py3-none-any.whl (97 kB)
Processing ./Library/Caches/pip/wheels/b3/e1/a8/cf0ce54c603bc4e4965e354a7aa3d8dacb8714f2c2db82ba04/noise-1.2.2-cp38-cp38-macosx_10_9_x86_64.whl
Collecting torchio
Downloading torchio-0.18.46-py2.py3-none-any.whl (148 kB)
|████████████████████████████████| 148 kB 11.6 MB/s
Collecting SimpleITK
Using cached SimpleITK-2.1.0-cp38-cp38-macosx_10_9_x86_64.whl (44.3 MB)
Collecting scikit-image
Using cached scikit_image-0.18.2-cp38-cp38-macosx_10_9_x86_64.whl (12.8 MB)
Collecting scipy
Using cached scipy-1.7.1-cp38-cp38-macosx_10_9_x86_64.whl (32.6 MB)
Collecting vtk
Using cached vtk-9.0.3-cp38-cp38-macosx_10_10_x86_64.whl (47.9 MB)
Collecting numpy>=1.15
Using cached numpy-1.21.1-cp38-cp38-macosx_10_9_x86_64.whl (16.9 MB)
Collecting tqdm
Using cached tqdm-4.62.0-py2.py3-none-any.whl (76 kB)
Collecting nibabel
Using cached nibabel-3.2.1-py3-none-any.whl (3.3 MB)
Requirement already satisfied: torch>=1.1 in ./opt/anaconda3/envs/resenv/lib/python3.8/site-packages (from torchio->resector==0.2.9) (1.9.0)
Collecting humanize
Using cached humanize-3.11.0-py3-none-any.whl (90 kB)
Collecting Deprecated
Using cached Deprecated-1.2.12-py2.py3-none-any.whl (9.5 kB)
Collecting pillow!=7.1.0,!=7.1.1,>=4.3.0
Using cached Pillow-8.3.1-cp38-cp38-macosx_10_10_x86_64.whl (2.9 MB)
Collecting PyWavelets>=1.1.1
Using cached PyWavelets-1.1.1-cp38-cp38-macosx_10_9_x86_64.whl (4.3 MB)
Collecting tifffile>=2019.7.26
Using cached tifffile-2021.7.30-py3-none-any.whl (171 kB)
Collecting matplotlib!=3.0.0,>=2.0.0
Using cached matplotlib-3.4.2-cp38-cp38-macosx_10_9_x86_64.whl (7.2 MB)
Collecting imageio>=2.3.0
Using cached imageio-2.9.0-py3-none-any.whl (3.3 MB)
Collecting networkx>=2.0
Using cached networkx-2.6.2-py3-none-any.whl (1.9 MB)
Collecting autobahn>=17.7.1
Using cached autobahn-21.3.1-py2.py3-none-any.whl (495 kB)
Collecting Twisted>=17.5.0
Using cached Twisted-21.7.0-py3-none-any.whl (3.1 MB)
Collecting wslink>=0.1.3
Using cached wslink-0.2.0-py2.py3-none-any.whl (19 kB)
Collecting packaging>=14.3
Using cached packaging-21.0-py3-none-any.whl (40 kB)
Requirement already satisfied: typing-extensions in ./opt/anaconda3/envs/resenv/lib/python3.8/site-packages (from torch>=1.1->torchio->resector==0.2.9) (<IP_ADDRESS>)
Requirement already satisfied: setuptools in ./opt/anaconda3/envs/resenv/lib/python3.8/site-packages (from humanize->torchio->resector==0.2.9) (52.0.0.post20210125)
Processing ./Library/Caches/pip/wheels/5f/fd/9e/b6cf5890494cb8ef0b5eaff72e5d55a70fb56316007d6dfe73/wrapt-1.12.1-cp38-cp38-macosx_10_9_x86_64.whl
Collecting cycler>=0.10
Using cached cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)
Collecting python-dateutil>=2.7
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting kiwisolver>=1.0.1
Using cached kiwisolver-1.3.1-cp38-cp38-macosx_10_9_x86_64.whl (61 kB)
Collecting pyparsing>=2.2.1
Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting hyperlink>=21.0.0
Using cached hyperlink-21.0.0-py2.py3-none-any.whl (74 kB)
Collecting txaio>=21.2.1
Using cached txaio-21.2.1-py2.py3-none-any.whl (30 kB)
Collecting cryptography>=3.4.6
Using cached cryptography-3.4.7-cp36-abi3-macosx_10_10_x86_64.whl (2.0 MB)
Collecting constantly>=15.1
Using cached constantly-15.1.0-py2.py3-none-any.whl (7.9 kB)
Collecting attrs>=19.2.0
Using cached attrs-21.2.0-py2.py3-none-any.whl (53 kB)
Collecting zope.interface>=4.4.2
Using cached zope.interface-5.4.0-cp38-cp38-macosx_10_14_x86_64.whl (208 kB)
Collecting incremental>=21.3.0
Using cached incremental-21.3.0-py2.py3-none-any.whl (15 kB)
Collecting Automat>=0.8.0
Using cached Automat-20.2.0-py2.py3-none-any.whl (31 kB)
Collecting six
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting idna>=2.5
Using cached idna-3.2-py3-none-any.whl (59 kB)
Collecting cffi>=1.12
Using cached cffi-1.14.6-cp38-cp38-macosx_10_9_x86_64.whl (176 kB)
Collecting pycparser
Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Building wheels for collected packages: resector
Building wheel for resector (setup.py) ... done
Created wheel for resector: filename=resector-0.2.9-py2.py3-none-any.whl size=86327 sha256=ff87af2895cd7046c5a26aae13a02cea444ba6aa08ff3eca1d1a17f964bd942d
Stored in directory: /private/var/folders/2p/vgnsmsgj4vl20d8gff9z74ch0000gp/T/pip-ephem-wheel-cache-xd7ryi_t/wheels/9a/ed/b3/79d655777b74420c62515cca24d1af82c33994055c9947f4a5
Successfully built resector
Installing collected packages: Click, noise, numpy, tqdm, SimpleITK, pyparsing, packaging, nibabel, humanize, scipy, wrapt, Deprecated, torchio, pillow, PyWavelets, tifffile, six, cycler, python-dateutil, kiwisolver, matplotlib, imageio, networkx, scikit-image, idna, hyperlink, txaio, pycparser, cffi, cryptography, autobahn, constantly, attrs, zope.interface, incremental, Automat, Twisted, wslink, vtk, resector
Successfully installed Automat-20.2.0 Click-8.0.1 Deprecated-1.2.12 PyWavelets-1.1.1 SimpleITK-2.1.0 Twisted-21.7.0 attrs-21.2.0 autobahn-21.3.1 cffi-1.14.6 constantly-15.1.0 cryptography-3.4.7 cycler-0.10.0 humanize-3.11.0 hyperlink-21.0.0 idna-3.2 imageio-2.9.0 incremental-21.3.0 kiwisolver-1.3.1 matplotlib-3.4.2 networkx-2.6.2 nibabel-3.2.1 noise-1.2.2 numpy-1.21.1 packaging-21.0 pillow-8.3.1 pycparser-2.20 pyparsing-2.4.7 python-dateutil-2.8.2 resector-0.2.9 scikit-image-0.18.2 scipy-1.7.1 six-1.16.0 tifffile-2021.7.30 torchio-0.18.46 tqdm-4.62.0 txaio-21.2.1 vtk-9.0.3 wrapt-1.12.1 wslink-0.2.0 zope.interface-5.4.0
WARNING: You are using pip version 20.2.4; however, version 21.2.2 is available.
You should consider upgrading via the '/Users/rorypiper/opt/anaconda3/envs/resenv/bin/python -m pip install --upgrade pip' command.
r%                                                                                (resenv) @.*** ~ %
(resenv) @.*** ~ % resect --help
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/bin/resect", line 6, in
from pkg_resources import load_entry_point
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/init.py", line 3251, in
def _initialize_master_working_set():
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/init.py", line 3234, in _call_aside
f(args, kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/init.py", line 3263, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/init.py", line 583, in _build_master
ws.require(requires)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/init.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/init.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'resector' distribution was not found and is required by the application
(resenv) @. ~ %

On 4 Aug 2021, at 15:21, Fernando Pérez-García @.***> wrote:
I meant all the commands you used to install the library as well, not just to run the algorithm, sorry.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/fepegar/resector/issues/8#issuecomment-892700956, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJYYLT5A4K7HV7Q3QCYITV3T3FEGNANCNFSM5BM5I7FQ.
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

I have seen the small error at the start about the conda directory. Is this the whole problem?

It might be. What is the output of which resector?
I recommend deleting the environment with conda remove --all --name resenv, then trying this solution and start over.

Thanks. That has helped the first error ….but still getting the same end result:
@.*** bin % resect --help
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/bin/resect", line 6, in
from pkg_resources import load_entry_point
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/init.py", line 3251, in
def _initialize_master_working_set():
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/init.py", line 3234, in _call_aside
f(args, kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/init.py", line 3263, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/init.py", line 583, in _build_master
ws.require(requires)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/init.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/init.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'resector' distribution was not found and is required by the application
@. bin %

On 4 Aug 2021, at 17:14, Fernando Pérez-García @.***> wrote:
I have seen the small error at the start about the conda directory. Is this the whole problem?
It might be. What is the output of which resector?
I recommend deleting the environment with conda remove --all --name resenv, then trying this solution https://stackoverflow.com/a/59842072/3956024 and start over.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/fepegar/resector/issues/8#issuecomment-892789478, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJYYLT6SWKNZLAOQAVD7YHLT3FRNJANCNFSM5BM5I7FQ.
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

/Library/Frameworks/Python.framework/Versions/3.8/bin
It seems that your computer is trying to use the system Python, not the conda one. What is the output of which python?

And which pip.

And which resect.


Cannot view Portal

Can anyone please provide me with a working config for Portal?

I've added portal.cfg file here: https://github.com/w23/OpenSource/blob/master/misc/portal.cfg
With default path steam install of Portal, it should be enough to just drag-and-drop this file onto OpenSource.exe.

Thanks Ivan! Here's what I get in the console before abruptly closing (please see attachment).
Cannon read config file C:...\portal.cfg
Error handling free option with argument 'C:...\portal.cfg'
Error parsing command line arguments

Please help if possible. I will be very grateful.

This is interesting. It seems that it does get to the end of the cfg file, but then fails to register it as success (?!).
I've added a bunch more logs, and also it now writes all messages into OpenSource.log file, so there's no more need to try to catch this obnoxious disappearing window. These changes are here: https://github.com/w23/OpenSource/pull/84
Are you building it from source yourself, or using a pre-built artifact? If you're using pre-built ones: this is the one from this PR: https://github.com/w23/OpenSource/actions/runs/7483592904/artifacts/1161300082 (can be seen on this page: https://github.com/w23/OpenSource/actions/runs/7483592904)

Thank you responding Ivan! I've download the new version with with the log file. (Sorry I am not totally familiar with the programmer/github lingo). It seems to locate the .vpk files without problem but fails after the "new map" steps. Here is the log output:
D:\a\OpenSource\OpenSource\src\OpenSource.c:816: Default platform steam basedir = C:\Program Files (x86)/Steam/steamapps/common
D:\a\OpenSource\OpenSource\src\collection.c:293: Opening collection C:\Program Files (x86)/Steam/steamapps/common/Portal/portal/portal_pak_dir.vpk
D:\a\OpenSource\OpenSource\src\collection.c:293: Opening collection C:\Program Files (x86)/Steam/steamapps/common/Portal/hl2/hl2_misc_dir.vpk
D:\a\OpenSource\OpenSource\src\collection.c:293: Opening collection C:\Program Files (x86)/Steam/steamapps/common/Portal/hl2/hl2_textures_dir.vpk
D:\a\OpenSource\OpenSource\src\OpenSource.c:123: Added new map to the queue: testchmb_a_00
D:\a\OpenSource\OpenSource\src\OpenSource.c:598: configReadCallback: Unexpected key "C:\Program"
D:\a\OpenSource\OpenSource\src\OpenSource.c:780: Cannot read config file C:\OpenSource\portal.cfg
D:\a\OpenSource\OpenSource\src\OpenSource.c:734: Error handling free option with argument 'C:\OpenSource\portal.cfg'
D:\a\OpenSource\OpenSource\src\OpenSource.c:819: Error parsing command line arguments
D:\a\OpenSource\OpenSource\src\OpenSource.c:677: Usage: C:\OpenSource\OpenSource.exe
D:\a\OpenSource\OpenSource\src\OpenSource.c:682: 	-s: Override steam basedir
D:\a\OpenSource\OpenSource\src\OpenSource.c:682: 	-m: Add map name to list of maps to load
D:\a\OpenSource\OpenSource\src\OpenSource.c:682: 	-p: Add VPK file to list of files to load assets from
D:\a\OpenSource\OpenSource\src\OpenSource.c:682: 	-d: Add directory to list of files to load assets from
D:\a\OpenSource\OpenSource\src\OpenSource.c:682: 	-n: Specify a limit of number of maps to load
D:\a\OpenSource\OpenSource\src\OpenSource.c:690: 	free arguments: Game configuration file to load

Is there anything else in the portal.cfg file, after the map line?

No, sir. Using the .cfg you shared.

thanks

This is somewhat puzzling. It's as if the cfg file contents are corrupted somehow.
Try this one: https://github.com/w23/OpenSource/actions/runs/7497109902/artifacts/1164170031 it should just tolerate cfg errors.
Also, now portal.cfg and bat are included in the archive, you can just click on the bat file.
And even if it works, please send me the log file, at least first few dozens of lines of it, up until (hopefully) GL init lines.

Thanks Ivan, it worked!
I compared the new .cfg with my old one and I identified the issue: there needs to be a line break at the end. I added one into the older .cfg, just to confirm, and it fixed it.
PS: Is there a working .cfg file for Portal 2? I recall reading that the maps would need to be manually adjusted. If that hasn't been done yet, I wouldn't mind working on it, but I'd like to be sure no one has done it already, so that I don't waste my time.
Thanks again!

I compared the new .cfg with my old one and I identified the issue: there needs to be a line break at the end. I added one into the older .cfg, just to confirm, and it fixed it.

Haha, that means my cfg parser is extremely sloppy, I'll look into making it a bit more robust.

PS: Is there a working .cfg file for Portal 2? I recall reading that the maps would need to be manually adjusted. If that hasn't been done yet, I wouldn't mind working on it, but I'd like to be sure no one has done it already, so that I don't waste my time.

There's this one: https://github.com/w23/OpenSource/blob/master/misc/portal2.cfg
However, the major issue with Portal 2 is that the engine has changed way too much for this little very experimental utility to make sense of the updated map file format. Maps mostly don't even look like anything they are in the game. This is the furthest I've got: https://www.youtube.com/live/eerFMHHJG7A?si=aH1GXicmvGLFLJrb&t=7640
There are also several unavoidable rendering glitches -- I've used this project to try out a bunch of very experimental approaches to software design and architecture, most of them not really that good :sweat_smile:, so it isn't very stable or robust (but hey, at least the whole self-contained executable is smaller than 90KiB uncompressed! Take that, modern 100GiB+ games!).
If you still want to do it, there are a few keys you can use to move maps within the game:

<Tab> to cycle through maps,
<Left>, <Right>, <Up>, <Down> arrow keys for XY
<PgUp>, <PgDown> for Z axis
<Shift> will increase moving velocity.
Q to drop selection

Every move will write new map coords into log. It is then a manual labor to extract these offsets and update the cfg file with them (look at hl2/hl1 files for examples, I no longer remember the format).

Thanks again!

Happy to help!

Saw the video ;), this can be closed now.


My provider still se my traffic

Hello
I bought an OVH VPS and installed openvpn-install to use my VPS as VPN.
I have a limited traffic on my LTE connection so I need a VPN to hide my traffic from my provider's eyes.
I setup openVPN using the port 80 TCP.
Yet my provider still see how many traffic I'm consuming.
Any suggestion?

Any suggestion?

Use Google, this is not an issue with the script.

I don't find anything on google. please help

I have no interest in helping you to defraud your ISP.


[Safari] Heatmap not stretching vertically to fill space

Describe the bug
On Safari, the heatmap is not being stretched vertically: It looks like each row of the raster is only one pixel high, and this is most noticeable for the two metadata tracks at the top.

(See #360 for all Safari issues.)
Environment:

Release or git hash: 17f43b8
Browser: Safari

Have not been able to find any description of this problem on the web.
Setting height in px (rather than percent) does work.

Suggest that someone else spend a little time looking at this, and if that is also unsuccessful, wire it up to update with pixel heights.
... Unless we want to replace the whole thing. This began as an ad-hoc solution.

Updated the title.  I just noticed this as well.


get alarms is not implemented.

get alarms method needs to be implemented to be compliant with the spec. Please see spec on how to retrieve alarms. The endpoint needs to be at /v2.0/alarms

It is covered in Pull Request #29


Keep the reference icons when opening references

Close https://github.com/Microsoft/visualfsharp/issues/559.

WTF!? That's the change? Crazy.

lol, nice. Honestly seems like we are doing the right thing and C# should change... Ah well, LGTM.

I don't mind either way. Visually, I think C# project system does the right thing. We shouldn't display a folder as a reference group; it's quite confusing.

BTW, it's fun to send two one-liner PRs in a row :sunglasses:


OpenCV Help

hi, all compilation problem has been solved and i want to process camera image with opencv, anyone can help me to how i get image before reflect to surfaceview?

Hi, I think you can find something here:
http://docs.opencv.org/2.4/modules/highgui/doc/reading_and_writing_images_and_video.html?highlight=video#VideoCapture
Just use your webcam to capture video frames.

If you want the raw pixel buffer, look at the getNextFrame function in easycapture.cpp. You'll find a pointer to a CaptureBuffer struct named curBuf.  It contains a reference to the current frame after vDevice->processCapture() is called.  curBuf->start is a pointer to the raw pixels, curBuf->length is the size of the array.
Obviously if you are doing some kind of processing you will want to create your own render pipeline, replacing the fRenderer->renderFrame call.  getNextFrame is passed a handle to the surface (see the jobject surface parameter), so everything you need is there to process the raw pixels and render it to a view.


fix: split 401 and 403 errors

Fixes #256.
Split the current Unauthorized into UnauthorizedError and ForbiddenError. Also, removes NoDefaultPoolAccessError, as it can be replaced by ForbiddenError.
/deploy #notest

You can access the deployment of this PR at https://renku-ci-ds-330.dev.renku.ch

Pull Request Test Coverage Report for Build<PHONE_NUMBER>2
Details

39 of 73 (53.42%)  changed or added relevant lines in 14 files are covered.
5 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-0.02%) to 90.461%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

components/renku_data_services/base_api/auth.py
2
3
66.67%

components/renku_data_services/project/db.py
2
3
66.67%

components/renku_data_services/users/blueprints.py
0
1
0.0%

components/renku_data_services/users/db.py
1
2
50.0%

components/renku_data_services/platform/db.py
2
4
50.0%

components/renku_data_services/authn/gitlab.py
1
4
25.0%

components/renku_data_services/crc/db.py
2
5
40.0%

components/renku_data_services/namespace/db.py
0
3
0.0%

components/renku_data_services/user_preferences/db.py
0
3
0.0%

components/renku_data_services/session/db.py
6
13
46.15%

Files with Coverage Reduction
New Missed Lines
%

components/renku_data_services/base_api/auth.py
1
89.61%

components/renku_data_services/base_api/pagination.py
2
87.72%

components/renku_data_services/storage/blueprints.py
2
94.12%

Totals

Change from base Build<PHONE_NUMBER>1:
-0.02%

Covered Lines:
9038

Relevant Lines:
9991

💛  - Coveralls


Add third party submodules

@AlexLynd as per your suggestion, I looked into git submodules, they're exactly what we needed!. This PR version-locks the code we usually download from GitHub. The two libraries left to version lock are the OLED driver and NeoPixel libraries, though I have a little more faith in those.

The arduino_cli_install.sh script zips up the sub-modules we use because arduino-cli needs them in zip form to install

We are rushed; review will be skipped with @AlexLynd's blessing


Validation of reserved labels and expose modes doesn't fail

Describe the bug
The validation of reserved labels and expose modes doesn't fail when the validation of the broker images cause a non-fatal failure, i.e.
apiVersion: broker.amq.io/v1beta1
kind: ActiveMQArtemis
metadata:
  name: artemis-ingress
spec:
  console:
    expose: true
    exposeMode: ingress
  deploymentPlan:
    image: quay.io/artemiscloud/activemq-artemis-broker-kubernetes:snapshot

[!TIP]
Vote this issue reacting with :+1: or :-1:

Resolved by https://github.com/artemiscloud/activemq-artemis-operator/commit/41111714f388ce3d136dcaab520724c7107de21c


Mechanism for creating a much smaller DB

https://github.com/LukePrior/nbn-upgrade-map/issues/98
❯ docker images
REPOSITORY           TAG       IMAGE ID       CREATED         SIZE
mydb                 latest    84af660a3493   8 minutes ago   3.73GB
minus34/gnafloader   latest    d2c552c72a0a   10 days ago     32GB

Maybe image should be pushed somewhere, and used in GHA?

Yeah it would be good to get it on Docker Hub.
I don't know if it should be contained within this repo, main concern is it's increasing the amount of maintaince required incase of changes.
Maybe a new repo for it or see if the original creator would be open to offering a slim version like this.

The reason I put it in this repo is that the data is 100% aligned to this tool. Frankly, I have trouble running the upstream docker container - it's so big, and I don't have a lot of space in my docker VM.

Oh yeah that makes sense, well I'll merge it in and we can investigate getting it hosted somewhere/switching GHA over to using it.

The reduced image size will save ~90% of the ~6.5 minutes that GHA takes to pull the image. The new image would also run the DB query faster because the query index is built-in.
2023-06-02T03:57:19.9813499Z 2023-06-02 03:57:19,981 INFO Fetching all addresses for Narrabri, NSW
2023-06-02T03:58:34.1744133Z 2023-06-02 03:58:34,173 INFO Fetched 5175 addresses from database


Include numerical calculations

Hi, just and Idea
What about a notation to do numerical calculations
# How to add numbers

To add two numbers like $ a + b $ you just add them like $ 2 + 2 $ equals $@ 2 + 2 @$

It can also work with other numbers
@@
a = 2;
b = 3;
@@
$$
\begin{align}
a &= @a@ \\
b &= @b@ \\
a + b &= @a+b@
\end{align}
$$

https://mathb.in/75890
Everything in between @  and @@ would evaluate numerically. Even if it is also in between $
It would evaluate and be similar to
How to add numbers
To add two numbers like $a + b$ you just add them like $2 + 2$ equals $4$
It can also work with other numbers
$$\begin{align}
a &= 2 \
b &= 3 \
a + b &= 5
\end{align}$$
I've been working on something similar just as a reference https://dvd101x.github.io/math-notepad/

It might not be well suited for this project, just an idea. I will close this as it's not really an issue.


Create dataset registration issues in this repo instead of bio_data_guide?

I heard once or twice from attendees about confusion on the dataset registration issues. I think it might have been confusing why we had folks adding issues to bio_data_guide instead of this workshop repository.
If I recall correctly, the reason we did that was to get folks involved in the SMBDWG and post their issues to the space we use for that working group. Which would more fluidly feed into ongoing activities, beyond the workshop.
After the last workshop, I'm wondering if it would be clearer for attendees to post their dataset description issues to this repository?
At least if we created the issues here it would more tightly couple the datasets with the workshop. But, maybe that doesn't matter.

I didn't receive any comments like that so I'm guessing here but I doubt that the location of the repo was the issue. I'm going to guess that most participants weren't even really aware that there is a GitHub repo associated with the website. So it's probably less about what repo the GitHub issues were being entered in and more about that we asked them to create a GitHub issue at all. That's my guess.


The "xiaomi_miot_raw 1.4.3" component is reporting an error during loading.

2024-04-10 22:54:44.956 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/config/custom_components/xiaomi_miot_raw/basic_dev_class.py", line 554, in create_sub_entities
self._hass.data[DOMAIN]['add_handler']['number'][self._entry_id](num_to_add, update_before_add=True)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 'number'

fixed

fixed


[VierVijfKijkOnline] Fix extractor

Before submitting a pull request make sure you have:

[x] Searched the bugtracker for similar pull requests
[x] Read adding new extractor tutorial
[x] Read youtube-dl coding conventions and adjusted the code to meet them
[x] Covered the code with tests (note that PRs without tests will be REJECTED)
[x] Checked the code with flake8

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

[ ] I am the original author of this code and I am willing to release it under Unlicense
[x] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

Note: Part of the code was written in the form of a pull request and comments here. Another part was taken from a GPL-3 license repository by michaelarnauts, who also contributed to that earlier PR. He'll have to confirm this is OK if I understand the GPL-3 license correctly.
What is the purpose of your pull request?

[x] Bug fix
[ ] Improvement
[ ] New extractor
[ ] New feature

This updates the extractor for Vier.be and Vijf.be to support KijkOnline. All new (and older as well?) videos seem to be in this format, so this can be seen as a bug-fix. Many people have reported this issue, e.g. https://github.com/ytdl-org/youtube-dl/issues/13575, https://github.com/ytdl-org/youtube-dl/pull/15412, and https://github.com/ytdl-org/youtube-dl/pull/15636. Previous attempts where never merged in unfortunately. This is a new attempt which is based on everything done and said in #15636:

Took the latest code from wernerkarlheisenberg's PR: https://github.com/ytdl-org/youtube-dl/pull/15636
Added the fix given by hexylena in this comment: https://github.com/ytdl-org/youtube-dl/pull/15636#issuecomment-599553142
Added michaelarnauts's suggested AWS login from https://github.com/ytdl-org/youtube-dl/pull/15636#issuecomment-611909967 to not depend on external packages (with some small changes to use .compat instead of six and requests)
Fixed the issue with the sorting of the formats as raised in the comments in https://github.com/ytdl-org/youtube-dl/pull/15636
Based on the latest master as of January 14, 2021

I can confirm this works. 👍

I can confirm this works. 👍

why hasn't this been merged yet?

@CNugteren do you have an idea how we can speed up this PR?

@CNugteren do you have an idea how we can speed up this PR?

No, I think it is just a matter of patience, I believe the developers are overloaded. If there is anything I can do let me know.
Alternatively anyone can build a Python wheel from this branch and publish it on PyPi or elsewhere I guess, and name it as goplay-dl or something.

@dstftw could you take a look at this when you have some time? Thanks!

fix also broken ? it does not work :'(

Same for me :/

fix also broken ? it does not work :'(

Same for me :/

heb een fix gemaakt die eerst via selenium de m3u8 neemt ( moest via selenium omdat ik het login via aws niet aan de praat kreeg) volledige seizoenen gaat ook! voeg me anders toe op discord Frank_#3555

Is this PR still active?
it is still broken for me
./youtube-dl --username <NAME> --password <PASSWD> https://www.goplay.be/video/de-mol/de-mol-s9/de-mol-s9-aflevering-1\#autoplay

[viervijfkijkonline] None: Downloading webpage

Traceback (most recent call last):

  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main

    "__main__", fname, loader, pkg_name)

  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code

    exec code in run_globals

  File "./youtube-dl/__main__.py", line 19, in <module>

  File "./youtube-dl/youtube_dl/__init__.py", line 475, in main

  File "./youtube-dl/youtube_dl/__init__.py", line 465, in _real_main

  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 2056, in download

  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 799, in extract_info

  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 806, in wrapper

  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 827, in __extract_info

  File "./youtube-dl/youtube_dl/extractor/common.py", line 532, in extract

  File "./youtube-dl/youtube_dl/extractor/vier.py", line 87, in _real_extract

IndexError: list index out of range

I also tested this video and got a similar result:
[viervijfkijkonline] None: Downloading webpage

Traceback (most recent call last):

  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main

    "__main__", fname, loader, pkg_name)

  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code

    exec code in run_globals

  File "./youtube-dl/__main__.py", line 19, in <module>

  File "./youtube-dl/youtube_dl/__init__.py", line 475, in main

  File "./youtube-dl/youtube_dl/__init__.py", line 465, in _real_main

  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 2056, in download

  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 799, in extract_info

  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 806, in wrapper

  File "./youtube-dl/youtube_dl/YoutubeDL.py", line 827, in __extract_info

  File "./youtube-dl/youtube_dl/extractor/common.py", line 532, in extract

  File "./youtube-dl/youtube_dl/extractor/vier.py", line 73, in _real_extract

IndexError: list index out of range

Is this PR still active?

Sorry I don't have the time to dig into the code itself. I just collected a bunch of earlier fixes and make a PR such that it worked. Unfortunately merging things in takes a really long time, and apparently by now it doesn't work anymore. If there is anyone that has a fix on top of my PR I'll happily incorporate it, but I don't have the time to look for the issue myself.

Just a few notes:

This patch does still work for me.  Do note that the code is unable to handle url's with # symbols in it, so you do have to remove the #autoplay part of the url, the part before the # symbol is enough
You can add the lines

    if "#" in url:
           url = url.split("#")[0]

after the line def _real_extract(self, url): if you do not want to be bothered by manually adjusting the url

Sometimes it does not find any formats. I did fix that by adding self._sort_formats(formats) in the _real_extract from VierVijfKijkOnlineIE (and ofcourse change the return line so it wont reverse them anymore)

Thanks to @pateik's explanation I can confirm that my issue was related to the "#autoplay". Both removing this tag, or implementing pateik's fix solved my problems.

:+1: I'll try to add those patches in the next few days to the branch.

Can we also re-license the GPL part, so we get rid of this legal issue?
In https://github.com/yt-dlp/yt-dlp/issues/1546#issuecomment-961380827 @michaelarnauts already mentioned he wouldn't mind re-licensing, I think this just still needs to be reflected in the code itself (by michael)

I've just implemented @pateik's suggestions in 7a489ea. And I've also merged in the latest master branch so that everything is up-to-date. I tested locally and it seems to work fine.

@CNugteren I took some time to clean up the extractor and also rename it to goplay. While at it I've also cleaned up episode and season parsing (and fixed season numbers by doing so).
You can find the code in https://github.com/jeroenj/youtube-dl/pull/1. But feel free to pull all of that into this MR.
That said I doubt we'll ever see it merged here.
I'd like to see this merged in yt-dlp, but as mentioned in https://github.com/yt-dlp/yt-dlp/issues/1546 we either need to rewrite the authentication code or @michaelarnauts to relicense it (https://github.com/yt-dlp/yt-dlp/issues/1546#issuecomment-961380827).

@CNugteren I took some time to clean up the extractor and also rename it to goplay. While at it I've also cleaned up episode and season parsing (and fixed season numbers by doing so).
You can find the code in jeroenj#1. But feel free to pull all of that into this MR.
That said I doubt we'll ever see it merged here.
I'd like to see this merged in yt-dlp, but as mentioned in yt-dlp/yt-dlp#1546 we either need to rewrite the authentication code or @michaelarnauts to relicense it (yt-dlp/yt-dlp#1546 (comment)).

How do I re-license it? I do remember I based this on code of @basrieter.

The code originates from me. And I don't mind either. The source has has a link to my original code, that is fine with me.


[Android] Add releaseOnDetach parameter to EditorStyledText

Adds a releaseOnDetach parameter so the view can be reused in Lazy composables when it's set to false.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (e9e9048) 87.47% compared to head (210ebc3) 89.43%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #914      +/-   ##
============================================
+ Coverage     87.47%   89.43%   +1.95%
============================================
  Files           166       86      -80
  Lines         19006    15358    -3648
  Branches       1032        0    -1032
============================================
- Hits          16625    13735    -2890
+ Misses         2078     1623     -455
+ Partials        303        0     -303

Flag
Coverage Δ

uitests
?

uitests-android
?

uitests-ios
?

unittests
89.43% <ø> (+3.88%)
:arrow_up:

unittests-android
?

unittests-ios
?

unittests-rust
89.43% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Markers

This implements markers support.
Related to https://github.com/asciinema/asciinema/pull/341

[x] marker support in recording driver
[x] marker support in asciicast parser
[x] ability to configure out-of-band markers via player option
[x] auto-pausing on markers when pauseOnMarkers: true option given
[x] rewind to the previous marker with [ key
[x] fast-forward to the next marker with ] key
[ ] documentation
[x] emit marker event upon a marker

Renamed from "breakpoints" to "markers".


harvest.py --annotation option usage is obscure

Hi,
I cannot figure out what infos --annotation will give me (I want all references with their coordinates in the PDF file), and where this infos are stored once downloaded (btw script generates a .json file but no .xml or .tei).
Thx for your help
My current code is simple test: python3 harvest.py --dois "/home/.../doi.txt" --annotation

Hello @NicolasMICAUX !
I reviewed the latest changes and I just pushed some additional checks on the configuration. I also added as default parameter call the addition of coordinates in the TEI file.

where this infos are stored once downloaded (btw script generates a .json file but no .xml or .tei).

This is documented, with generated file types and metadata index infos, here:
https://github.com/kermitt2/article-dataset-builder#generated-files
The simple *.json file gives the metadata information. The *-ref-annotations.json file gives what is necessary to annotate in a "visual" manner the reference markers and reference in a PDF.
The generated TEI file now contains also all the coordinates (reference markers and references with coordinates and fully parsed structures).

python3 harvest.py --dois "/home/.../doi.txt" --annotation

This works fine for me, be sure to complete the config.jsonwith the external service information.
(env) lopez@work:~/article-dataset-builder$ ll  data/41/26/26/58/41262658-9da3-488f-b064-4a1c9330d237/
total 180K
drwxrwxr-x 2 lopez lopez 4.0K Aug 30 12:10 ./
drwxrwxr-x 3 lopez lopez 4.0K Aug 30 12:10 ../
-rw-rw-r-- 1 lopez lopez  59K Aug 30 12:10 41262658-9da3-488f-b064-4a1c9330d237.grobid.tei.xml
-rw-rw-r-- 1 lopez lopez 2.2K Aug 30 12:10 41262658-9da3-488f-b064-4a1c9330d237.json
-rw-rw-r-- 1 lopez lopez  89K Aug 30 12:10 41262658-9da3-488f-b064-4a1c9330d237.pdf
-rw-rw-r-- 1 lopez lopez  14K Aug 30 12:10 41262658-9da3-488f-b064-4a1c9330d237-ref-annotations.json

Just an additional comment, if you don't get the expected resources under the data path given in the config.json file, the logs available in harvester.log should point to the possible errors (service not available or similar).

Hi,
Thanks for the answer
It's been long since I last worked on this, but i'll check your solution


Stream support

LLMs are currently too slow in many use cases for guards to be placed at end of completion
Any real time use case relies on token streaming because the wait times for an _x_k response can be 10, 20 or even 30s. A starting UX principle is to accept that a response > 1s will disrupt a user's flow and > 10s and they'll task switch.
Support for streamed interpretation
I think any practical LLM securitiy solution needs to be streamed. That is, signal detection needs to be assessed quickly, and incrementally, token by token. I had thought that some kind of parallel GAN might be an interesting approach here.
Describe alternatives you've considered
Currently the guardrails I'm using are essentially prompt-based. There are tools like youai.ai that do a remarkable job of putting guardrails in place on streamed output: I did a like for like comparison of the same prompt ChatGPT vs YouAI.ai and YouAI could not be jailbroken on my basic jailbreak tests, where ChatGPT did.

Hey @boxabirds ,
Thanks for raising it. You are definitely right that streaming is required when building customer-facing applications.
Do you know how youai.ai does that? Based on their website, it's not shown. I know that Azure has guardrails with support for streaming that we could look at.
We will experiment with some approaches like analyzing individual generated logits to see the accuracy.

I suspect youai has a prompt solution. But I think the innovation will be on systems that can do ultra fast signal detection. I think companion special purpose microLLMs (“small” LMs? 🙂) might be an interesting area to explore. Inference times would need to be in the milliseconds for it to work I think.


Dashcast no longer seems to work on Google Nest Hub

Up until a few months ago, I was able to use DashCast to display a camera on the Google Nest Hub whenever a motion event occurred.  Since then, the camera is displayed, but only as a single frame (no video).  A current snapshot of the camera is displayed, and theere is a Play button on the bottom left of the screen.  However, pressing the play button doess not do anything.
If a try to cast a view containing a WebRTC camera, the view comes up but continually displays "Waiting for WebRTC Card to Load".  Anyone else seeing this behavior?

yes, known issue
https://github.com/AlexxIT/WebRTC/issues/88 , you can close this one

@pergolafabio thanks. Hope to find time to fix it


Current block height: 16371

Current block height: 16371
一直16371，区块连浏览器不更新。节点在生成区块。什么原因

I've used google translate to english to understand your message. Hope i'm right.
You are saying that the neo-scan only have block 16371 but the nodes are generating new blocks without problem.
Well, it might me a problem with neo-scan container. You can restart neo-scan with these commands on linux:
docker-compose stop neo-scan-api
docker-compose restart neo-scan-sync
docker-compose start neo-scan-api

That should correct it.

@senhanxiao Did that help?


Update case README.md with latest <IP_ADDRESS> changes

@frankmalin please merge

Please ignore these changes.  Adding correct changes now.


Gke support

Google Cloud Engine changes.
Description
Google Cloud Engine changes.
Motivation and Context

How Has This Been Tested?

[ ] Covered by existing integration testing
[ ] Added integration testing to cover
[ ] Tested locally
[ ] Have not tested

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.

@edwarnicke I'm able to deploy most of NSC/NSE to GKE Kubernetes.
After rebasing to latest master, with some cpu limit fixes and NSC yaml fix, some of NSC looks OK, but could not ping, so will continue checking tomorrow.

Shall we close #798?

Hi @edwarnicke  today fight with #849, not yet able to make it working :-(


image tile doesn't appear if the system language is Arabic

As we develop the application in Arabic language and for Arabic users, so many of the users have their system language as Arabic, so in this case the image doesn't appear. if the system language are something other than Arabic it works fine.
Thanks in advance

to be clear, it's just for your application, correct?  the demos function properly regardless of system language?

i just test your demo and it has the same problem

this is a video show the bug in demo
https://youtu.be/EpLGS4YocX4

Hi ,
First of all i want to thank you moagrius for this amazing library and also for your fast reply for all the previous issues :)
Secondly my device language is Arabic and tiles are not visible like the demo in the video that was shown by mahmoudmsa
thank you in advance

i can take a look but it's probably going to be at least a few days (it's a holiday today and i'm occupied tomorrow night).  feel free to try to find the fix on your end, otherwise any additional information would be helpful.  presumably there are errors printed to logcat when this happens which might be a good place to start

Thanks for support, will try to investigate more and will update you if i got any result or find any hint can help, and will be waiting your check result also when you get time.
Thanks again for your support and Happy Holiday

thanks!

Hello @moagrius, Did you have a chance to check this issue, our developer tried to investigate but unfortunately he hit the wall and he couldn't fix it.
Thanks in advance

Not yet

Hello @moagrius , hope everything is fine, any updates? i know you may be don't have time, but actually my project is waiting for this fix to be published, so i will be thankful if you give it a try, and you could charge me if you want also.
Thanks in advance

this has been fixed in https://github.com/moagrius/TileView/releases/latest
compile 'com.qozix:tileview:2.2.4'

You just needed to use a Locale in your BitmapDecoder.

@moagrius Thank you very much, appreciate your response. it works fine


Complete vaccination add command

Issues resolved

Resolves #51
Resolves #69
Resolves #85
Resolves #96
Resolves #102
Resolves #106

Significant changes

Changed VaxName to more abstract GroupName
Created Age class to handle age type arguments.

Has a minimum value of 0 and maximum of 200.
Values are allowed to go above 200 but they will all equate to the same value.

Add parser functions for Integer, lists of argumetns and parts of arguments.

Delimiter of list is ,
Delimiter for argument parts is ::

Testing
Automated test created for everything except UI related things. I believe almost full path coverage.
Additional stuff
GroupName  is created to represent tag like things (maybe allergies can use this as well). Vaccination types I believe will be tags in patients. It restricts the length the name to 30, allowing alphanumeric characters, spaces and brackets except for < and >. Length is restricted as tags are very difficult to display properly if they are too long; it requires too much effort.
(gomenasai @francisyzy for changing again)

rip build failed


Document Microsoft.Data.Sqlite

Here's everything (well, almost everything) I know about Microsoft.Data.Sqlite. 😉
Preview URL: https://review.docs.microsoft.com/msdata-sqlite/?branch=pr-en-us-1915
To do after merging:

[x] Update README in product repo
[x] Add <seealso>'s to XML docs
[ ] Link to from other docs

Do we want a different docset for this? like docs.microsoft.com/mssqlite ?

Merging to move things forward, but please feel free to provide additional feedback here.


Altering default prompt

First i just wanted to say that this is incredibly easy to use and all around awesome as a plugin!
I checked under the advanced settings and the template/prompt and am a bit confused regarding what parts should/should not be copied over if i want to override the prompt.
If i simply copy everything (removing commenting) in default and replace the first lines it refuses to save, would be great with some documentation on how to do it :)

Thanks for the feedback, and glad you love it!  Super great to hear it.
Customizing the yaml in that way is not at all obvious, but here's how you do it:
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# template
# .
template:

  # The main prompt sent to Oobabooga to generate a response from the bot AI.  The AI's
  # reply to this prompt will be sent to discord as the bot's response.
  # .
  # Allowed tokens: {AI_NAME}, {IMAGE_COMING}, {MESSAGE_HISTORY}, {PERSONA}
  # .
  #   default:  You are in a chat room with multiple participants. Below is a transcript of
  # recent messages in the conversation. Write the next one to three messages that you would
  # send in this conversation, from the point of view of the participant named {AI_NAME}.
  # {PERSONA}  All responses you write must be from the point of view of {AI_NAME}. ###
  # Transcript: {MESSAGE_HISTORY} {IMAGE_COMING}
  prompt: |
    You are in a chat room with multiple participants. Below is a transcript of
    recent messages in the conversation. Write the next one to three messages that you would
    send in this conversation, from the point of view of the participant named {AI_NAME}.
    {PERSONA}  All responses you write must be from the point of view of {AI_NAME}. ###
    Transcript: {MESSAGE_HISTORY} {IMAGE_COMING}

I think I'll put in an example of this into the FAQ / default .yml so that it will be easier for newer folks to figure out in the future!


Adding Jenkinsfile

Cherrypick Adding Jenkinsfile to release branch @danielpassos

closing as release branch to be created from master.


Fix when GLFW_LIBRARY_NAME.get() is null.

This is a simple fix for the line:
if (!Configuration.GLFW_LIBRARY_NAME.get().equals("glfw_async")) {

When Configuration.GLFW_LIBRARY_NAME.get() returns null, this throws an NPE. Flipping the .equals() means the LHS will never be null, making it valid when GLFW_LIBRARY_NAME is not set.
This also runs Spotless.

(Thank you!)


Update test

I'm glad it's getting better and better.
The company has used it in many projects, thank you here.

Oh, by the way, it is more meaningful to change t.Error to t.Fatal, so it is recommended to replace it.

If you find it useless, please close it directly.

I'm glad it's getting better and better.
The company has used it in many projects, thank you here.

I'm really glad to hear that. I'm planning a couple performance improvements around rehashing and Range for the nearest future, so it should get even better.

Oh, by the way, it is more meaningful to change t.Error to t.Fatal, so it is recommended to replace it.

t.Error is used in non-main goroutines only and that's on purpose. See testing package documentation:
"A test ends when its Test function returns or calls any of the methods FailNow, Fatal, Fatalf, SkipNow, Skip, or Skipf. Those methods, as well as the Parallel method, must be called only from the goroutine running the Test function."

Is it ok if I close the PR?


Bring new test images for CI

Fixes: #130

I have replaced the test image with the one of community. However, that one is not signed by cosign now. I will use the policy
{
    "default": [{"type": "reject"}],
    "transports": {
        "docker": {
            "ghcr.io/confidential-containers": [
                {
                    "type": "insecureAcceptAnything"
                }
            ]
        }
    }
}

which means the image will be accepted without signature verification.

@Xynnn007 thanks!


Workflow summary page does not render under some circustances

I'm seeing the following error in some of my running workflows, but I haven't figured out yet how to reproduce consistently:
index.vue:193 TypeError: _summarizeEvents.summarizeEvents[e.eventType] is not a function
    at map-timeline-events.js:53
    at Array.forEach (<anonymous>)
    at exports.default (map-timeline-events.js:22)
    at getHistoryTimelineEvents (get-history-timeline-events.js:5)
    at index.vue:175

I will, thank you! Are you planning to publish it at https://hub.docker.com/r/ubercadence/web/tags? Looking at that page makes me realize that the image doubled its size in the most recent v3.6.0, although it's still manageable.

I can try to publish it now.

It should be available now in dockerhub. Thanks!

Thanks! And back to 4xx mb! Will test shortly.

It works! Nicely done, thanks.


Autocomplete with functionality to create new if not present in auto complete list

Hi, first of all thanks for the wonderful package it has my life a lot easier. :)
Now, coming to the point. I was wondering if there's any possibility of enabling autocomplete alongside ability to create new entry, if not present in the auto complete list. like what is done in excel or google spreadsheet.
Any suggestion would be much appreciated. Thanks!

This would be a great feature, please make it happen. The current offered methods and callbacks don't really allow it.

What is your opinion for the KEY => VALUE dropdown?

In the docs I saw you mention a "value or key-value selectbox" being available, but I didn't really understand what you meant and I didn't find an example. Could you elaborate a bit?

This is exactly what I‘m looking for.
sometimes the key should come from user, since I can't assure that my database is complete.
better if jexcel can mark those new keys for me, so I can update my database afterwards.
THX!

eg. the dropdown has a list of a,b,c,d
now when i type in e, i want it could be possible to do the input, while now the autocomplete only allows me to choose within a,b,c,d.
what's more,  it would be better to mark those new "e" or add "e" into the list of a,b,c,d,e

Something custom implementation for Jexcel Pro v5.
https://jsfiddle.net/paulhodel/482931bp/


HMI file request

Hello, very good work, you could be so kind to share the nextion HMI file to be able to adjust it to another screen model, thank you very much

Also I'm interested about hmi file please; I made a project for Nextion and share it all, even I spend some days to finalize.
From PDF and schematic jpg file, I see TFT_ILI9163C LCD display, not Nextion ?!

Hello,
can you give me the HMI File too???
very good work, you could be so kind to share the nextion HMI file to be able to adjust it to another screen model, thank you very much

Hello,
I'll be glad if I can get HMI file from you.
Greeting

bump would also like the hmi file thanks

Hello,
I also would like to have the hmi file for the Nextion.
Thanks
Greetings

Hello, need hmi file to port it to NX4024T032_011 display ! pls share !!!

Hello,
i would like to have the hmi file as well .
Thanks
best regards

This project would have been so much better had you shared the .hmi file so users with newer nextion displays could build it. Without the file the majority of interested builders are unable to complete it....what a waste!!

Отличная версия. Пожалуйста, выложите HMI код для nextion. У меня другой экран nextion. Спасибо!!!!!!


Readme updated and new documents dir created.

Readme updated and document directory created - which will have

system_design
api specification
Contributing
Testing
@Toshbrown

Fixed

All changes from this PR were merged in PR #127


Add MergeInitializer to Coercian example

Before:
class Tweet < Hash
  include Hashie::Extensions::Coercion
  coerce_key :user, User
end

user_hash = { name: "Bob" }
Tweet.new(user: user_hash)
# => {}

After:
class Tweet < Hash
  include Hashie::Extensions::Coercion
  include Hashie::Extensions::MergeInitializer
  coerce_key :user, User
end

user_hash = { name: "Bob" }
Tweet.new(user: user_hash)
#=> {:user=>#<struct User name={:name=>"Bob"}>}

Fixes #332

Will need rebasing once #384 is merged in order to pass Travis. But it's only a README change.

I marged #384, party on.

Bump @boffbowsh

It's ready to merge

Yep, totally looks good to me. I'm merging it in.


Install on 16.04 LTS

Please tell me - Really set on 16.04 LTS ?

Sorry, this project is deprecated


Does it only one solution to make 4 sides of the 2D box corresponding to 4 of 3D box points？

Hi
i have a littie confused in this powerful method.
Please give me your instruction and advice.
In the paper you said that 2D box sides has 64 configurations between 3D box points.
'''''''''''''
So Does it only one solution to make 4 sides of the 2D box corresponding to 4 of 3D box points?
'''''''''''''
if it is Yes.
How to make 64 configurations to decide only one possible corresponding solution?
if it is no.
By solving the Linear System
it has so many best solution of translation parameters T = [Tx Ty Tz 1]
How to decide the final translation parameters T
Thank you.

@kuo-shih-chun Did you find the solution?


The terminal process terminated with exit code: 1.

Hi markw65, first off, let me say that this extension is amazing, and is exactly what us MonkeyC developers need in order to have readable code and memory efficient code!! Thanks for putting this out there!
I tried the latest version 2.0.0 on a very small app I have (uses 9.2 kb) and it instantly brought the app size down to 9.0kb.  Very cool!
I'm now trying to use it on a huge app I have (the code itself is 45kb of memory).  It also has multiple .mc files.  I'm getting this error:
The terminal process "node '/Users/myname/.vscode/extensions/markw65.prettier-extension-monkeyc-2.0.0/bin/build.js', 'venu', '{"workspace":"/Users/myname/Documents/MyApp/MyApp","outputPath":"bin/optimized","jungleFiles":"monkey.jungle","developerKeyPath":"/Users/myname/Downloads/developer_key","typeCheckLevel":"Default","compilerWarnings":true,"name":"Run Optimized","request":"launch","type":"omonkeyc","device":"venu"}'" terminated with exit code: 1.
Is there something I can do to help identify where the error is getting snagged?
Thanks!

I think that if it was failing at build time you would get a meaningful error from the monkeyc compiler, so I think its not getting that far (you can probably check by seeing if it generated code under bin/optimized).
I've got a couple of small fixes that I was going to push today; but I'll add better diagnostics first so we can figure out what's going on.

I just pushed the new version. Hopefully, we get a better diagnostic message now.

Thank you for the update! The error codes are definitely more helpful!
I got this error with the new version:
ERROR: SyntaxError: source/MyApp.mc:171,7: Expected "(", ":", "[", "me", "self", "{", "}", comment, end of line, identifier, number, string, or whitespace but "-" found.
Here's the code:
MyApp.mc:
170 var code_dict = {404=>"Your phone may not be connected to the internet.",
171				  		-2=>"Bluetooth connection error.",
172				  		-104=>"Connect Phone"};
(I couldn't figure out how to get the code to format correctly using GitHub's code snippet feature.) In my code, I let each key have its own line for readability.
When I remove the negative keys for testing, the compiler gets farther, but then gets:
ERROR: Internal: TypeError: Cannot read properties of undefined (reading 'name') The terminal process "node '/Users/myname/.vscode/extensions/markw65.prettier-extension-monkeyc-2.0.1/bin/build.js', 'venu', '{"workspace":"/Users/myname/Documents/MyApp/MyApp","outputPath":"bin/optimized","jungleFiles":"monkey.jungle","developerKeyPath":"/Users/myname/Downloads/developer_key","typeCheckLevel":"Default","compilerWarnings":true,"name":"Run Optimized","request":"launch","type":"omonkeyc","device":"venu"}'" terminated with exit code: 1.
Thanks again for the latest update!
Lance

Thanks for the info. The first problem was just the parser being too restrictive, the new update should fix that. I can't tell what's going wrong for the Internal error,  but the new update will also dump a stack trace, which may pin it down. I should have done that last time.
Please update to latest and try again!

Thanks so much!  The parser works very nicely now!
Here's the error:
ERROR: Internal: TypeError: Cannot read properties of undefined (reading 'push') TypeError: Cannot read properties of undefined (reading 'push')     at /Users/myname/.vscode/extensions/markw65.prettier-extension-monkeyc-2.0.3/node_modules/@markw65/monkeyc-optimizer/build/optimizer.cjs:8374:53     at Array.forEach (<anonymous>)     at generateOptimizedProject (/Users/myname/.vscode/extensions/markw65.prettier-extension-monkeyc-2.0.3/node_modules/@markw65/monkeyc-optimizer/build/optimizer.cjs:8367:11)     at async buildOptimizedProject (/Users/myname/.vscode/extensions/markw65.prettier-extension-monkeyc-2.0.3/node_modules/@markw65/monkeyc-optimizer/build/optimizer.cjs:8345:36) The terminal process "node '/Users/myname/.vscode/extensions/markw65.prettier-extension-monkeyc-2.0.3/bin/build.js', 'venu', '{"workspace":"/Users/myname/Documents/MyApp/MyApp","outputPath":"bin/optimized","jungleFiles":"monkey.jungle","developerKeyPath":"/Users/myname/Downloads/developer_key","typeCheckLevel":"Default","compilerWarnings":true,"name":"Run Optimized","request":"launch","type":"omonkeyc","device":"venu"}'" terminated with exit code: 1.
Again, thanks for all the time you've invested in this project!

Alright, I think we found the problem!
Using the excludeAnnotations gets us back to the original problem.
It appears the error is occurring because I have a 3rd party barrel in my app.  My code goes like this:
using KPayApp.KPay as KPay;
The error I get from your code is this:
ERROR: Internal: TypeError: Cannot read properties of undefined (reading 'name') TypeError: Cannot read properties of undefined (reading 'name')     at /Users/myname/.vscode/extensions/markw65.prettier-extension-monkeyc-2.0.3/node_modules/@markw65/monkeyc-optimizer/build/optimizer.cjs:7638:66     at Array.forEach (<anonymous>)     at processImports (/Users/myname/.vscode/extensions/markw65.prettier-extension-monkeyc-2.0.3/node_modules/@markw65/monkeyc-optimizer/build/optimizer.cjs:7637:14)     at analyze (/Users/myname/.vscode/extensions/markw65.prettier-extension-monkeyc-2.0.3/node_modules/@markw65/monkeyc-optimizer/build/optimizer.cjs:7765:3)     at async optimizeMonkeyC (/Users/myname/.vscode/extensions/markw65.prettier-extension-monkeyc-2.0.3/node_modules/@markw65/monkeyc-optimizer/build/optimizer.cjs:7983:28)     at async generateOneConfig (/Users/myname/.vscode/extensions/markw65.prettier-extension-monkeyc-2.0.3/node_modules/@markw65/monkeyc-optimizer/build/optimizer.cjs:8480:20)     at async Promise.all (index 0)     at async generateOptimizedProject (/Users/myname/.vscode/extensions/markw65.prettier-extension-monkeyc-2.0.3/node_modules/@markw65/monkeyc-optimizer/build/optimizer.cjs:8438:3)     at async buildOptimizedProject (/Users/myname/.vscode/extensions/markw65.prettier-extension-monkeyc-2.0.3/node_modules/@markw65/monkeyc-optimizer/build/optimizer.cjs:8345:36) The terminal process "node '/Users/myname/.vscode/extensions/markw65.prettier-extension-monkeyc-2.0.3/bin/build.js', 'venu', '{"workspace":"/Users/myname/Documents/MyApp/MyApp","outputPath":"bin/optimized","jungleFiles":"monkey.jungle","developerKeyPath":"/Users/myname/Downloads/developer_key","typeCheckLevel":"Default","compilerWarnings":true,"name":"Run Optimized","request":"launch","type":"omonkeyc","device":"venu"}'" terminated with exit code: 1.
Adding some console.log statements to your code returns this object for KPay:
{   type: 'Using',   id: {     property: { type: 'Identifier', name: 'KPay', start: 62, end: 66 },     computed: false,     start: 54,     end: 66,     type: 'MemberExpression',     object: { type: 'Identifier', name: 'KPayApp', start: 54, end: 61 }   },   as: { type: 'Identifier', name: 'KPay', start: 70, end: 74 },   start: 48,   end: 75 }
I think we've almost got it!!

Yes, I've been adding a bunch of open source projects as tests, and I just found that one. I've also found several more, so I'm going to roll them all up into one update.
If you want to fix that one, locally, just change:
-    const [name, module] = lookup(node.id, node.as && node.as.id.name, stack);
+    const [name, module] = lookup(node.id, node.as && node.as.name, stack);

in /Users/myname/.vscode/extensions/markw65.prettier-extension-monkeyc-2.0.3/node_modules/@markw65/monkeyc-optimizer/build/optimizer.cjs:7638.
Meanwhile I will put a full fix later today, once I sort the other issues out.
That particular issue has nothing to do with barrels; I just had a bug with using ... as (none of my code uses the as clause, and nor do any of the Garmin sample apps). In fact, it looks like you could drop the as clause there, with no change to the meaning. But, I've not yet added barrel support; so I'm not sure what its going to do to your code...

New version is ready.

Thank you! We're so close!
I can now remove the excludeAnnotations, and your code doesn't throw an error at that step!
Now I'm getting this error.
ERROR: The Monkey Barrel dependency KPayApp (version 1.3.1) could not be resolved. Please make sure the barrel path was linked to within the main application's jungle file. com.garmin.connectiq.common.manifest.ManifestException: [102] The Monkey Barrel dependency KPayApp (version 1.3.1) could not be resolved. Please make sure the barrel path was linked to within the main application's jungle file.         at com.garmin.monkeybrains.ProjectBuilder.createBarrelContexts(ProjectBuilder.java:476)         at com.garmin.monkeybrains.Monkeybrains.runPRGCompiler(Monkeybrains.java:1559)         at com.garmin.monkeybrains.Monkeybrains.compileApplication(Monkeybrains.java:1335)         at com.garmin.monkeybrains.Monkeybrains.run(Monkeybrains.java:2774)         at com.garmin.monkeybrains.Monkeybrains.simpleMain(Monkeybrains.java:342)         at com.garmin.monkeybrains.Monkeybrains.main(Monkeybrains.java:371) usage: monkeyc [-a <arg>] [-b <arg>] [-c <arg>] [-d <arg>] [-e]        [--Eno-invalid-symbol] [-f <arg>] [-g] [-h] [-i <arg>] [-k] [-l <arg>]        [-m <arg>] [-o <arg>] [-p <arg>] [-r] [-s <arg>] [-t] [-u <arg>] [-v]        [-w] [-x <arg>] [-y <arg>] [-z <arg>] -a,--apidb <arg>       API import file -b,--apimir <arg>      API MIR file -c,--api-level <arg>   API Level to target -d,--device <arg>      Target device -e,--package-app       Create an application package.    --Eno-invalid-symbolDo not error when a symbol is found to be invalid -f,--jungles <arg>     Jungle files -g,--debug             Print debug output -h,--help              Prints help information -i,--import-dbg <arg>  Import api.debug.xml -k,--profile           Enable profiling support -l,--typecheck <arg>   Type check [0=off, 1=gradual, 2=informative, 3=strict] -m,--manifest <arg>    Manifest file (deprecated) -o,--output <arg>      Output file to create -p,--project-info <arg>projectInfo.xml file to use when compiling -r,--release           Strip debug information -s,--sdk-version <arg> SDK version to target (deprecated, use -c -t,--unit-test         Enables compilation of unit tests -u,--devices <arg>     devices.xml file to use when compiling (deprecated) -v,--version           Prints the compiler version -w,--warn              Show compiler warnings -x,--excludes <arg>    Add annotations to the exclude list (deprecated) -y,--private-key <arg> Private key to sign builds with -z,--rez <arg>         Resource files (deprecated) ERROR: Internal: 102 The terminal process "node '/Users/myname/.vscode/extensions/markw65.prettier-extension-monkeyc-2.0.4/bin/build.js', 'venu', '{"workspace":"/Users/myname/Documents/MyApp/MyApp","outputPath":"bin/optimized","jungleFiles":"monkey.jungle","developerKeyPath":"/Users/myname/Downloads/developer_key","typeCheckLevel":"Default","compilerWarnings":true,"name":"Run Optimized","request":"launch","type":"omonkeyc","device":"venu"}'" terminated with exit code: 1.
I bet it has something to do with the barrel path.  In fact, I can copy the code from MyApp/bin/optimized/group000-debug/source, and put it in MyApp/source, and the compiler works correctly!
Thanks!

Right - all paths in jungle files are resolved relative to the jungle file itself. I'm generating the source paths, and updating the resource paths, but I'm not doing anything with the barrel paths, so since the jungle file is in another directory, it's not going to work. That should be easy enough to fix, but the real issue is what to do about the barrels themselves; the optimizer assumes its seen all of the code, and makes decisions accordingly. Code in barrels could break its assumptions.
Anyway, I've got a few more bugs to sort out that came up through testing more open source projects, and then I'll see what I can do about barrels.

Thank you! I'm guessing the barrel paths should appear in the debug.jungle file?
My monkey.jungle file is only one line:
project.manifest = manifest.xml
The file .../group000-debug/source/debug.jungle doesn't say anything about barrels.
Here's a sample:
project.manifest=../../manifest.xml
approachs60.sourcePath = group000-debug/.mc
approachs60.resourcePath = ../../resources;../../resources-approachs60
approachs62.sourcePath = group000-debug/.mc
Thanks!

I think the latest version should fix this. I still have some work to do to make it actually optimize barrel code. Please give it a try.

It works correctly now! It seems to take 1-1.5kb off my app size.  Very nice, thank you so much!

@La-S I just pushed v2.0.8 that adds full support for optimizing barrels.
If your barrels contain code, rather than just resources, this version should help more. I'd appreciate an update on whether it still works, and whether it gets better results. Thanks!

It works great. Now it knocks 1.6kb off! This optimizer is very helpful.  1.6 kb is a big deal when you're near the memory limit! Thank you!