Need to track Membership status for sites

We need a way to track Membership status for Sites.

@amyrbrown would you like to track some membership requirements, too?
For example, on a site that's our Partner we could display number of workshops organized within last year. (Not sure if we can affiliate instructors with sites, though.)

I propose a Member model that has a foreign key to a Site, a start date,
a duration, an enumeration for kind, a foreign key to Person as
principal contact, and a Notes field (because all of our partnerships
and affiliations have special cases right now).

I think we could get Sites split into Hosts/Sites and then have Member 1-to-1 relationship with Host.

Could we associate Events with Members, too? So we can see how many Events a Member has run since their start date?

We have event's organizer and event's site.
If Member is linked to the Host [organizer] or Site (if we don't migrate to Host/Site) then we'll easily have the events organized by a Member.

How much extra effort will it be for admins to keep all of this
straight?  I already don't like the host-vs-site split: I agree it's a
better semantic model, but it's also more work to input everything.

How do you input data for events with different site and organizer?
For example, this event: 2014-12-06-wise-krakow is almost completely wrong. It was organized by WiSE, but the organizer field is empty. The site actually was AGH UST, not Jagiellonian University. The one person mentioned as organizer was KN and he's affiliated with Cyfronet, which is affiliated with AGH UST. But there's no AGH UST or Cyfronet in our sites.
10% (44 out of 447) of our workshops is organized by sites with no country (like WiSE, online or SwC).
366 workshops don't have organizer.
If we don't care about the site where event is taking place, maybe we should drop it completely, and have only the "host" (I assume it's the same as "organizer") field? Otherwise I'm not sure what we need site for, especially if we're going to store wrong information in it.

On Sun, Jun 21, 2015 at 03:29:52AM -0700, Greg Wilson wrote:

I propose a Member model that has a foreign key to a Site, a start date,
a duration, an enumeration for kind, a foreign key to Person as
principal contact, and a Notes field (because all of our partnerships
and affiliations have special cases right now).

That's basically what Host is, right?  In #120 I even asked about
linking to Person for contact information 1.  I'd suggest just
adding a membership link to the Host model pointing to a Membership
model that enumerates our different association levels (partner,
affiliate, … 2).  I'm still not clear on why adding host data is a
high bar.  We could even offload it to the organizer themselves and
parse it into Amy when reading the event website's metadata 3.

Okay, I'm lost. @pbanaszkiewicz says:

For example, this event: 2014-12-06-wise-krakow is almost completely wrong. It was organized by WiSE, but the organizer field is empty. The site actually was AGH UST, not Jagiellonian University. The one person mentioned as organizer was KN and he's affiliated with Cyfronet, which is affiliated with AGH UST. But there's no AGH UST or Cyfronet in our sites.

I don't see how "WiSE" can be an organizer. WiSE is a kind of workshop -- it should be listed under tags.
Site should refer to the location a workshop is being held, either physically or logically (i.e., if it's being presented by Berkeley but is physically located at a nearby restaurant, then logically the Site is Berkeley).

10% (44 out of 447) of our workshops is organized by sites with no country (like WiSE, online or SwC). 366 workshops don't have organizer.

But Sites don't organize --- the Organizer organizes (usually us or SSI, and not the person with the "organizer" task --- we used one word for two different things). Sites are where something is held. It doesn't make sense for WiSE to be a Site or an Organizer -- again, WiSE should be a tag. If WiSE is listed as a Site, that's bad data.
"online" can be a Site, and SWC can be an organizer.
The conflation between Sites as physical locations and Sites as entities which host workshops is addressed in @wking's PR #120 but as an admin I haven't felt a burning need for that functionality yet. If a workshop is hosted by ORGANIZATION A but presented at ORGANIZATION B I'm happy to have it listed with ORGANIZATION A as the Site -- the physical location is usually irrelevant (and if it isn't it's likely such a special case (e.g., ORGANIZATION B is doing us a big favour) that it will be addressed in the Notes anyway).
I think Site is very important since it's how we keep track of who we have worked with when, and it's how we determine whether a workshop is the second or later in the calendar year (and is therefore eligible for a reduced fee). If some of the data in Site is wrong, that's a problem with the data, not the structure of the database.

I think the simplest notion is to record 'Host' (who's paying the bill)
and 'Location' (lat/long or address) separately for each event, and not
try to connect the two beyond that:

We need to know the Host because that's who we invoice/give credit
to/whatever.
The workshop website records the Location, so we have that
information (and can use null for telepresence workshops without confusion).

Thoughts?

What are we going to do with the "Location" information?
And again, can we not reuse the "Host" terminology? Either rename the Task or rename the other thing. I think renaming the Task makes the most sense, but that might be a discussion for another thread.

On 2015-06-23 1:26 PM, Amy Brown wrote:

What are we going to do with the "Location" information?

If the host organization is something like iPlant (which has several
physical locations), we probably want to keep track of which of those
locations the workshop was at.  We also need it to find nearby
instructors (maybe?).

And again, can we not reuse the "Host" terminology? Either rename the
Task or rename the other thing. I think renaming the Task makes the
most sense, but that might be a discussion for another thread.

I'm happy with that.
--
Dr. Greg Wilson    |<EMAIL_ADDRESS>Software Carpentry | http://software-carpentry.org

On Tue, Jun 23, 2015 at 10:19:03AM -0700, Greg Wilson wrote:

I think the simplest notion is to record 'Host' (who's paying the
bill) and 'Location' (lat/long or address) separately for each
event, and not try to connect the two beyond that:

My Site model also includes a name, country, airport, and notes
(#120).  I'm ok dropping airport (we can query nearby airports on the
fly, but that may miss, e.g. intervening impassible geographic
features).  I don't think having a name, country information, or notes
is a large cost ;).

The workshop website records the Location, so we have that
information (and can use null for telepresence workshops without
confusion).

I'd still pull it into Amy, since you don't want to query workshop
websites for every query like “what previous events have been in
$CITY?”.
I think having accurate site/location information is important.  We're
putting pins for these things on a map, and we don't want to be
sending folks to the wrong place, or searching for instructors in the
wrong town.
I agree that nulling the site (or having a sentinal Site) for online
events makes sense.

Okay, I am still slightly suspicious about the utility of the Location (apart from pins in maps [1] and finding instructors[2]) but I agree that having a logical Host and a physical Location for each Event is tidy and sensible. (In terms of terminology, I prefer "Location" to "Site" because Location is more concrete -- Site has figurative/metaphorical associations which I think lead to confusion with "Host".)
I would ask that Location be stored as not just lat/lng but as a named entity (including lat/lng). As an admin, a set of coordinates means nothing and I don't fancy spending a lot of time looking up coordinates on a map and trying to guess which building the event was held in and what that means in terms of our relationships with the denizens of said building. (Sorry, Piotr, that was a very difficult sentence. (And sorry again if that seems patronizing. I try to write plainly but sometimes I just don't have time.))
[1] Do we (or do we plan to) generate the map on the website using data from the AMY database?
[2] I don't typically hunt for instructors automatically, but I suppose that's something that might be semi-automated in the future.

On Tue, Jun 23, 2015 at 10:51:50AM -0700, Amy Brown wrote:

In terms of terminology, I prefer "Location" to "Site" because
Location is more concrete -- Site has figurative/metaphorical
associations which I think lead to confusion with "Host".

Sounds good to me.

1 Do we (or do we plan to) generate the map on the website using
data from the AMY database?

I don't know if we've reached a consensus on this yet, but my
preferred information flow is 1:

Instructors/organizers pass an event URL to AMY (possibly via AMY
admins).
AMY grabs the event information from that URL (and occasionaly
polls for updates).
Consumers (such as swcarpentry/site) get information about
published events from AMY.

That centralized the collection of information in AMY, so the
consumers don't have to worry about collecting a URL list, polling for
updates, or parsing the event-website-stored metadata.

[2] I don't typically hunt for instructors automatically, but I
suppose that's something that might be semi-automated in the future.

We're tracking a lot of information about instructors (nearest
airport, lessons they feel comfortable teaching, counts of previous
events).  I expected that the goal there was to semi-automate
instructor/event matching, but I guess I haven't seen explicit plans
for that sort of functionality.

Hi everyone,

[1] Do we (or do we plan to) generate the map on the website using data from the AMY database?

We're going to, I believe.

Sorry, Piotr, that was a very difficult sentence.

No, it wasn't. Don't worry, I'll ask if I don't understand something ;)
Okay, I'll let you go on with discussion, but I'm going back to preparing for tomorrow. Cheers!

bump

I'll start working on this and #546, but without proper feedback from @jduckles, @maneesha and @gvwilson I don't think I'll be able to finish this one in time for v1.2.


cmd/go: 'go generate' fails to update PWD variable

Most subprocess invocations in the go command use base.AppendPWD to append an accurate value of PWD to the command's environment, which can speed up calls like os.Getwd and also help to provide less-confusing output from scripts.
As noted in https://github.com/golang/go/issues/43724#issuecomment-765717357 (CC @dylan-bourque), go generate currently fails to do so when invoking the generator command:
https://github.com/golang/go/blob/3a778ff50f7091b8a64875c8ed95bfaacf3d334c/src/cmd/go/internal/generate/generate.go#L451
It should be updated to do so.
(CC @matloob @jayconrod)

Oh, the cursed PWD variable. An apparently simple idea with offensively wide-ranging ramifications. An object lesson in  three letters for anyone paying attention.

Oh, the cursed PWD variable. An apparently simple idea with offensively wide-ranging ramifications. An object lesson in  three letters for anyone paying attention.


Firebase Auth + Database setup in unity editor failure

I am trying to make firebase work in unity editor but have no success so far. My rules setup to test database is like this
{
  "rules": {
    ".read": false,
    ".write": false,
    "unity-tests": {
      //This area is just for testing things
    	".read": "auth != null",
      	".write": "auth != null"
    }
}

I created service account, placed p12 file and also did initialisation as given in doc. I am facing 2 problems.

When i login, i am getting firebase user ID same as my email address and looking at console, it seems like user never logged In (Using Email / Password login)
When i connect to database, it responds in almost a min with error "Error obtaining service credential. Attempting unauthenticated access"

Logs screenshot attached. How can i make it work and i am wondering what i am doing wrong ?
P.S: Its working fine on iOS device & android too. Its the editor which i am trying to work with for faster development.

Hi sourabhverma, if you see the error message "Error obtaining service credential. Attempting unauthenticated access" it means there is an issue with your service account setup and it has nothing to do with either your users or rules -- which are checked much later.
Can you attach your initialization code and the location where you are dropping the p12 file?  Also you can first attempt service account auth in the editor without any auth code and without setting the UId.  Even if your rules are set to "false, false", you will be able to access your data through a service account.  Of course, if you impersonate a uid, you could be denied which is why you should see if it works without it.

Hi @benwulfe ,
Based on infos shared by you. I created a new p12 file but this time i created a key for "App Engine default service account" and used it and it worked !
However i am sharing screenshot of my service account console and wanted to understand if service account created by me by name "Unity Editor Service" can work or not for knowledge purpose

The name should not matter, but its possible it did not have the proper
permissions.  Did you give both the same?  Project Editor permissions
should be sufficient.
On Fri, Jan 20, 2017 at 11:53 PM, Sourabh Verma<EMAIL_ADDRESS>wrote:

Hi @benwulfe https://github.com/benwulfe ,
Based on infos shared by you. I created a new p12 file but this time i
created a key for "App Engine default service account" and used it and it
worked !
However i am sharing screenshot of my service account console and wanted
to understand if service account created by me by name "Unity Editor
Service" can work or not for knowledge purpose
[image: google console service accounts]
https://cloud.githubusercontent.com/assets/2278257/22173033/c66bdd0a-dfdc-11e6-9f67-a41cee22f467.png
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/firebase/quickstart-unity/issues/41#issuecomment-274246994,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH7cpT10l4sa-XIBFgCWu3_Owy7HSgYsks5rUbmLgaJpZM4LoioJ
.

Got it. It was permission issue, Permission in IAM was set to "service account actor" instead of "Editor".
Thanks a ton !


Updated competitive.conf + server.conf

Fixed a few bugs.
I don't understand still, why it will not accept the $TV_ENABLE is already 1.
The same issue with $usercon so I did add a -usercon after the line!

I don't understand still, why it will not accept the $TV_ENABLE is already 1.
The same issue with $usercon so I did add a -usercon after the line!

If GOTV and RCON don't work, it seems as if your launch arguments aren't generated properly. Can you copy/paste here ...

what you entered on your command line?
what is output as launch command when starting the server?
what your bash version is?

I don't understand still, why it will not accept the $TV_ENABLE is already 1.
The same issue with $usercon so I did add a -usercon after the line!

If GOTV and RCON don't work, it seems as if your launch arguments aren't generated properly. Can you copy/paste here ...

what you entered on your command line?
what is output as launch command when starting the server?
what your bash version is? bash --version

I did enter (what you can see below!): commandline
# Password for clients to connect
PASS=${PASS-"war"} # Password protect if you like

(( $RCON_ENABLED )) && {
        USE_RCON="-usercon"
        RCON_PASS=${RCON_PASS-"rcon"}
}
# Slots for players
SLOTS=${SLOTS-"12"}

# Additional slots for server admins and spectators
# Note that reserved slots require sourcemod plugins.
ADMIN_SLOTS=${ADMIN_SLOTS-"2"}

(it's like standard as this):
if (( TV_MAXCLIENTS > 0 || TV_ENABLE )); then
TV_ENABLE="1"
BUT. if I looking again on this:
# GOTV specific settings ####
(( $TV_ENABLE )) &&     cat <<-EOF >> "$AUTOEXEC_CFG"
//Here where i througt it will "incl" the field from $TV_ENABLE
aka. tv_enable 1 (because it has field: TV_ENABLE="1"

On your LAUNCH_ARGS it looks:
LAUNCH_ARGS=(
        -game csgo
        -console
        $USE_RCON //And here, where it should use -usercon (via $USE_RCON) but seems it wont. so if people do "rcon" they will get: Error connect, because the server thinks the -usercon is not set/enabled.
        -tickrate $TICKRATE

        ${GSLT:++sv_setsteamaccount $GSLT} # Game Server Login Token, if set
        -port $PORT
        ${LOCAL_IP:+"-ip $LOCAL_IP"}
        ${WAN_IP:+"+net_public_adr $WAN_IP"}

        +game_type $GAMETYPE
        +game_mode $GAMEMODE
        +mapgroup $MAPGROUP
        +map $MAP

        -maxplayers $(( SLOTS + ADMIN_SLOTS ))

        ${TV_ENABLE:+
                +tv_enable 1 << Here, where it seems enabled. but GOTV is not connecting to the server. I did checked "status on console" there was no GOTV.
                +tv_port "$TV_PORT"
                +tv_delay "$TV_DELAY"
                +tv_snapshotrate "$TV_SNAPSHOTRATE"
                +tv_maxclients "$TV_MAXCLIENTS"
        } # GOTV Settings

        ${TV_RELAY:+
                +tv_relay "$TV_RELAY"
                +tv_relay "$TV_RELAY"
                +tv_relaypassword "$TV_RELAYPASS"
        } # GOTV RELAY SETTINGS
)

Without to adding +maxplayers_override (since it's standard one, on another gameserver!)

output as launch command when starting the server:

        /home/mikkel/csgo@portalofficial/srcds_run -game csgo -console
        -tickrate 128 +sv_setsteamaccount "hide GSLT token"
        -port 27015 "-ip <IP_ADDRESS>" "+net_public_adr <IP_ADDRESS>"
        +game_type 0 +game_mode 1 +mapgroup mg_active +map de_dust2
        -maxplayers 14

// As you can see.. it wont set tv_enable 1
And bash version:
GNU bash, Version 4.4.12(1)-release (x86_64-pc-linux-gnu)

Ahh ok, I think I have an idea what the problem is. The point is that the (( $var )) && ... are conditionals, so the command after is only executed when $var is set and not zero.
So to fix the problem, you have to add RCON_ENABLED=1 and TV_ENABLE=1 above these constructs in your config file.
That may not be obvious for someone who hasn't written Bash scripts before, so I'll add some documentation there :)

So, for i can getting it works with (so it's display -usercon & +tv_enable 1)
So I need to-do like this - As an example on SECTION 4: GOTV I see this:

# Select the number of clients to serve with this server
#
# It is recommended to keep this low, to not decrease the performance for the players
# The clients should contain:
# - Your caster / cameraman
# - some relays to broadcast everything
# - the GOTV Bot that auto-records the demo
# Recommended, if you wish to use these GOTV features: "5"
# For Relays, this can, of course, be as high as the server can handle
TV_MAXCLIENTS=${TV_MAXCLIENTS-"$TV_AUTORECORD"}

if (( TV_MAXCLIENTS > 0 || TV_ENABLE )); then  //But what with here?

        TV_ENABLE="1" //Here it's 1.

        # If this is set to 1, people can watch the game via game UI. They will NOT need to type the password
        TV_ADVERTIZE_WATCHABLE=${TV_ADVERTIZE_WATCHABLE-"1"}

And with the usercon:
# Password for clients to connect
PASS=${PASS-"war"} # Password protect if you like

(( $RCON_ENABLED )) && { //As you see.. field with $RCON_ENABLED
        USE_RCON="-usercon" //And what the issue here? - (for it's tagged on launch_args with $USE_RCON so it should show/display: -usercon on the launch commandline (which it don't do)
        RCON_PASS=${RCON_PASS-"rcon"}
}

Can you see, what i mean?

To force GOTV, you need to put another TV_ENABLE=1 above the if check
Alternatively, you can update the
line with TV_MAXCLIENTS and set it to a number greater than zero, such as
TV_MAXCLIENTS=3

Its default value is 0, and running a GOTV server without anyone able to connect probably does not make much sense anyway
For RCON, just add the assignment on the line above, such as
RCON_ENABLED=1
(( $RCON_ENABLED )) && { //As you see.. field with $RCON_ENABLED
    USE_RCON="-usercon" //And what the issue here? - (for it's tagged on launch_args with $USE_RCON so it should show/display: -usercon on the launch commandline (which it don't do)
    RCON_PASS=${RCON_PASS-"rcon"}

}

GOTV - like this?
if (( TV_MAXCLIENTS > 0 || TV_ENABLE  1)); then  < example?
Sorry, if I'm wrong haha! :D

No, I mean on a separate line, like
TV_ENABLE=1
if (( TV_MAXCLIENTS > 0 || TV_ENABLE )); then

Sorry, if I'm wrong haha! :D
No problem :)

No, I mean on a separate line, like
TV_ENABLE=1
if (( TV_MAXCLIENTS > 0 || TV_ENABLE )); then

Sorry, if I'm wrong haha! :D
No problem :)

Oppps... haha :D

@dasisdormax I was thinking, about I could edit on the file. so it has some "cfg files" so people won't need to download esl5on5.cfg as an example.
E.g:
esl5on5
warmup/pregame
pracc
scrim/cevo incl alias.cfg (rcon pracc / rcon esl5on5 / rcon start / rcon cevo) ;)

So i need to make (like this?):

`out <<< "    cfg/alias.cfg"
ALIAS_CFG="$INSTANCE_DIR/csgo/cfg/ALIAS.cfg"
cfg-disclaimer-begin > "$ALIAS_CFG"
cat >> "$ALIAS_CFG" <<-EOF
        // -------- BASIC STUFF --------

alias "rr" "mp_restartgame 1;mp_restartgame 1;mp_restartgame 1"
alias "rr3" "mp_restartgame 3"
alias "lo3" "exec live.cfg"
alias "live" "exec live.cfg"
alias "!pause" "mp_pause_match"
alias "!unpause" "mp_unpause_match"
alias "scramble" "mp_scrambleteams"
alias "swap" "mp_swapteams"
alias "knife" "exec knife.cfg"
alias "war_on" "exec war_on.cfg"
alias "scrim" "exec scrim.cfg"
alias "esl5on5" "exec esl5on5.cfg;rr;praccoff;war_on"
alias "start" "exec esl5on5.cfg;rr;praccoff;war_on"
alias "cevo" "exec cevo.cfg;rr;praccoff;war_on"
alias "warmup" "war_on;exec warmup.cfg"
alias "pregame" "war_on;exec pregame.cfg"
alias "server" "exec server.cfg;rr;praccoff;war_on"
alias "trening" "exec pracc.cfg"
alias "pracc" "exec pracc.cfg"
alias "nores" "exec nores.cfg"
alias "praccoff" "exec praccoff.cfg"
alias "aztec" "map de_aztec"
alias "cache" "map de_cache"
alias "cbble" "map de_cbble"
alias "dust" "map de_dust"
alias "dust2" "map de_dust2"
alias "inferno" "map de_inferno"
alias "mirage" "map de_mirage"
alias "nuke" "map de_nuke"
alias "overpass" "map de_overpass"
alias "season" "map de_season"
alias "train" "map de_train"
EOF

It would be possible to include your config files this way. I see the problem though that, if the user has their own modified config files, they would be overwritten without asking.
So I would prefer leaving that out of server.conf, but you could create a copy of apps/csgo/scripts/modes/competitive.conf called esl5on5.conf with all these configs added (or what name you prefer). Then the user can choose to use your configs by updating MODE in server.conf (line 85) to something like
MODE=esl5on5

Good idea. I will look on it later.

hi @dasisdormax
How should it looks, if i want to create it?
Can i just paste the "commands" on the .conf file?
As example:
MAXPLAYERS="12"

MAPGROUP=${MAPGROUP-"mg_active"}
MAPS=${MAPS-"de_dust2 de_train de_mirage de_cache de_cbble de_overpass de_nuke de_inferno"}

// esl5on5.conf commands under this
ammo_grenade_limit_default 1
ammo_grenade_limit_flashbang 2
ammo_grenade_limit_total 4
bot_quota 0					// Determines the total number of bots in the game
cash_team_terrorist_win_bomb 3500
cash_team_elimination_bomb_map 3250
cash_team_win_by_time_running_out 3250
cash_team_win_by_defusing_bomb 3500
cash_team_loser_bonus 1400
cash_team_loser_bonus_consecutive_rounds 500
cash_team_planted_bomb_but_defused 800
cash_player_killed_teammate -300
cash_player_killed_enemy_default 300
cash_player_killed_enemy_factor 1
cash_player_bomb_planted 300
cash_player_bomb_defused 300
ff_damage_reduction_grenade 0.85                // How much to reduce damage done to teammates by a thrown grenade.  Range is from 0 - 1 (with 1 being damage equal to what is done to an enemy)
ff_damage_reduction_bullets 0.33                // How much to reduce damage done to teammates when shot.  Range is from 0 - 1 (with 1 being damage equal to what is done to an enemy)
ff_damage_reduction_other 0.4                   // How much to reduce damage done to teammates by things other than bullets and grenades.  Range is from 0 - 1 (with 1 being damage equal to what is done to an enemy)
ff_damage_reduction_grenade_self 1              // How much to damage a player does to himself with his own grenade.  Range is from 0 - 1 (with 1 being damage equal to what is done to an enemy)
mp_afterroundmoney 0				// amount of money awared to every player after each round
mp_autokick 0					// Kick idle/team-killing playermp_autoteambalance 0
mp_buytime 15                           	// How many seconds after round start players can buy items for.
mp_c4timer 40                           	// How long from when the C4 is armed until it blows
mp_death_drop_defuser 1				// Drop defuser on player death
mp_death_drop_grenade 2				// Which grenade to drop on player death: 0=none, 1=best, 2=current or best
mp_death_drop_gun 1				// Which gun to drop on player death: 0=none, 1=best, 2=current or best
mp_defuser_allocation 0				// How to allocate defusers to CTs at start or round: 0=none, 1=random, 2=everyone
mp_do_warmup_period 1				// Whether or not to do a warmup period at the start of a match.
mp_forcecamera 1                        	// Restricts spectator modes for dead players
mp_force_pick_time 160				// The amount of time a player has on the team screen to make a selection before being auto-teamed
mp_free_armor 0					// Determines whether armor and helmet are given automatically.
mp_freezetime 12                        	// How many seconds to keep players frozen when the round starts
mp_friendlyfire 1                       	// Allows team members to injure other members of their team
mp_halftime 1					// Determines whether or not the match has a team-swapping halftime event.
mp_halftime_duration 10				// Number of seconds that halftime lasts
mp_join_grace_time 30				// Number of seconds after round start to allow a player to join a game
mp_limitteams 0                         	// Max # of players 1 team can have over another (0 disables check)
mp_logdetail 3                          	// Logs attacks.  Values are: 0=off, 1=enemy, 2=teammate, 3=both)
mp_match_can_clinch 1				// Can a team clinch and end the match by being so far ahead that the other team has no way to catching up
mp_match_end_restart 1				// At the end of the match, perform a restart instead of loading a new map
mp_maxmoney 16000				// maximum amount of money allowed in a player's account
mp_maxrounds 30                         	// max number of rounds to play before server changes maps
mp_molotovusedelay 0                    	// Number of seconds to delay before the molotov can be used after acquiring it
mp_playercashawards 1				// Players can earn money by performing in-game actions
mp_playerid 0					// Controls what information player see in the status bar: 0 all names; 1 team names; 2 no names
mp_playerid_delay 0.5				// Number of seconds to delay showing information in the status bar
mp_playerid_hold 0.25				// Number of seconds to keep showing old information in the status bar
mp_round_restart_delay 5			// Number of seconds to delay before restarting a round after a win
mp_roundtime 1.92                       	// How many minutes each round takes.
mp_roundtime_defuse 1.92                	// How many minutes each round takes on defusal maps.
mp_solid_teammates 1 				// Determines whether teammates are solid or not.
mp_startmoney 800                       	// amount of money each player gets when they reset
mp_teamcashawards 1				// Teams can earn money by performing in-game actions
mp_timelimit 0                           	// game time per map in minutes
mp_tkpunish 0					// Will a TK'er be punished in the next round?  {0=no,  1=yes}
mp_warmuptime 1					// If true, there will be a warmup period/round at the start of each match to allow
mp_weapons_allow_map_placed 1             	// If this convar is set, when a match starts, the game will not delete weapons placed in the map.
mp_weapons_allow_zeus 1				// Determines whether the Zeus is purchasable or not.
mp_win_panel_display_time 10	                // The amount of time to show the win panel between matches / halfs
spec_freeze_time 5.0
spec_freeze_panel_extended_time 0
sv_accelerate 5.5			        // ( def. "10" ) client notify replicated
sv_stopspeed 80					//
sv_allow_votes 0				// Allow voting?
sv_allow_wait_command 0			        // Allow or disallow the wait command on clients connected to this server.
sv_cheats 0                                     // Allow cheats on server
sv_clockcorrection_msecs 0                    // The server tries to keep each player's m_nTickBase withing this many msecs of the server absolute tickcount
sv_damage_print_enable 1                        // Turn this off to disable the player's damage feed in the console after getting killed.
sv_dc_friends_reqd 1			        // Set this to 0 to allow direct connects to a game in progress even if no presents
sv_deadtalk 0					// Dead players can speak (voice, text) to the living
sv_forcepreload 0				// Force server side preloading.
sv_friction 5.2					// World friction.
sv_full_alltalk 0				// Any player (including Spectator team) can speak to any other player
sv_gameinstructor_disable 1		        // Force all clients to disable their game instructors.
sv_ignoregrenaderadio 0                         // Turn off Fire in the hole messages
sv_kick_players_with_cooldown 0                 // (0: do not kick; 1: kick Untrusted players; 2: kick players with any cooldown)
sv_kick_ban_duration 0                          // How long should a kick ban from the server should last (in minutes)
sv_lan 0                                        // Server is a lan server ( no heartbeat, no authentication, no non-class C addresses )
sv_log_onefile 0				// Log server information to only one file.
sv_logbans 1					// Log server bans in the server logs.
sv_logecho 1					// Echo log information to the console.
sv_logfile 1					// Log server information in the log file.
sv_logflush 0					// Flush the log file to disk on each write (slow).
sv_logsdir logfiles                             // Folder in the game directory where server logs will be stored.
sv_competitive_minspec 1                        // Enable to force certain client convars to minimum/maximum values to help prevent competitive advantages.
sv_competitive_official_5v5 1			// Enable to force the server to show 5v5 scoreboards and allows spectators to see characters through walls.
sv_pausable 1                                   // Is the server pausable.
sv_pure 1
sv_pure_kick_clients 1                          // If set to 1, the server will kick clients with mismatching files. Otherwise, it will issue a warning to the client.
sv_pure_trace 0					// If set to 1, the server will print a message whenever a client is verifying a CR
sv_spawn_afk_bomb_drop_time 30                 	// Players that spawn and don't move for longer than sv_spawn_afk_bomb_drop_time (default 15 seconds) will automatically drop the bomb.
sv_steamgroup_exclusive 0                     	// If set, only members of Steam group will be able to join the server when it's empty, public people will be able to join the server only if it has players.
sv_voiceenable 1
sv_alltalk 0
sv_auto_full_alltalk_during_warmup_half_end 0
sv_coaching_enabled 1
mp_overtime_enable 1
mp_overtime_halftime_pausetimer 0
mp_overtime_maxrounds 6
mp_overtime_startmoney 10000
sv_occlude_players 0
mp_starting_losses 1
mp_team_timeout_time 30
mp_team_timeout_max 4
mp_spectators_max 10

Can i just paste the "commands" on the .conf file?

Nope, CS:GO commands won't work directly in your gamemode.conf, you'll have to use the same syntax as in server.conf, like
MAXPLAYERS="12"

MAPGROUP=${MAPGROUP-"mg_active"}
MAPS=${MAPS-"de_dust2 de_train de_mirage de_cache de_cbble de_overpass de_nuke de_inferno"}

ALIAS_CFG="$INSTANCE_DIR/csgo/cfg/alias.cfg"
cat > "$ALIAS_CFG" <<-EOF
// your alias.cfg commands here
EOF

ESL_CFG="$INSTANCE_DIR/csgo/cfg/esl5on5.cfg"
cat > "$ESL_CFG" <<-EOF
// your esl5on5.cfg commands here
EOF

... and so on for all files that you want to create

Oh. Nice. :) i will do that.
I will update it so soon. Now playing some CS. :D
I have a question, without from this, where can i msg you? :-)

@dasisdormax .
So okey, can i do adding alias/esl5on5 + few .cfg (WITHOUT server.cfg) on the server.conf
Or do i need to paste them in competitive.conf ?
Example with server.conf:
out <<< "    cfg/praccoff.cfg"
PRACCOFF_CFG="$INSTANCE_DIR/csgo/cfg/praccoff.cfg"
cfg-disclaimer-begin > "$PRACCOFF_CFG"

cat >> "$PRACCOFF_CFG" <<-EOF
sv_cheats 0
mp_limitteams 2
mp_autoteambalance 1
mp_roundtime 2
mp_roundtime_defuse 2
mp_maxmoney 16000
mp_startmoney 800
mp_freezetime 15
mp_buytime 20
mp_autokick 0
mp_buy_anywhere 0
sv_infinite_ammo 0
ammo_grenade_limit_total 4
bot_kick
mp_warmup_end
ammo_grenade_limit_default 1
ammo_grenade_limit_flashbang 2
ammo_grenade_limit_total 4
sv_damage_print_enable "1"
mp_ct_default_grenades ""
mp_t_default_grenades ""
sv_grenade_trajectory 0
sv_grenade_trajectory_time 10
sv_showimpacts 0
sv_showimpacts_time 10
mp_respawn_on_death_ct 0;
mp_respawn_on_death_t 0;
mp_respawnwavetime_ct 10;
mp_respawnwavetime_t 10;
sv_occlude_players 0;
mp_restartgame 1
EOF

cfg-disclaimer-end >> "$PRACCOFF_CFG"


Restrict macro factor between 0.125x and 1.75x

Duplicate of https://github.com/Hydra-Chain/hydragon-issues/issues/156


Project is dead

Press F to pay respects
I wonder how hard it would be to re-create it in Godot Engine.

True. Well, be my guest. :)

It should be alive :)


ship with the EFF word list (by default?)

the current word list is okay - it's a curated list specially crafted with a few interesting properties.
but it wasn't designed specifically for password generation. the EFF actually crafted a word list specifically for that purpose that you may want to consider shipping as an alternative or as a default word list.

Thanks for the suggestion! I've added a comment to the README linking that list to people. I don't see licence information on that EFF page so I'm not sure about including it in the packaged version. I may contact the EFF though.

Hi-Joseph Bonneau from EFF here. All material on the EFF website, including the password lists, is licensed as CC-BY (https://www.eff.org/copyright) so it can be included freely (with attribution)

Hey Joseph - thanks for the info. I'll take a closer look this weekend!


.selected() or .isSelected ?

With Swift 3.0, I've tried to set a button as selected programmatically thus myButton.selected() but the instruction seemed to have no effect.
The only way I managed to get it to work was with myButton.isSelected = true. Is this expected, or a bug, or else?
Nice little library anyway. Thank you.

selected is a property of UIControl. isSelected is the getter of this property. The idea way of setting it should be myButton.selected = true.

If I put myButton.selected = true, Xcode protests that "selected has been renamed to isSelected". I guess it's a 3.0 thing. I've only known Swift in its last version, so you might be referring to previous versions, I guess.

@gbradley Try button.selected = false?

That results in the same issue described above, XCode reporting that selected has been replaced by isSelected.

On 9 Feb 2017, at 12:03, David Liu<EMAIL_ADDRESS>wrote:
@gbradley Try button.selected = false?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.


⚠ ClamAV has degraded performance

In f3bbb54, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 520 ms

Resolved: ClamAV performance has improved in d2522b2.


Real life examples?

Looks great, but are there any live examples online?

https://hyperbook.openpatch.org/ is written with hyperbook. I am also currently working on a workbook for developing a Smart Lights System with Raspberry Pis, Adafruit Huzzahs and the MIT App Inventor. The workbook will be based on this repository: https://github.com/mikebarkmin/smartlights.

sure, the documentation, but I was wondering how it looks in an actual use-case - so that's not ready yet, then. I'll keep an eye on this project though :)

Now powering https://docs.software-challenge.de and we are eager to build some IT quizzes with it, too :)


Fix PWM frequency

In order to get more stable dc voltage out of the PWM output, the PWM frequency needs to be set to a higher value.
This PR also removes the machine freq settings from all user contribution scripts and moves that command into the EuroPi firmware to ensure consistent cpu performance across all scripts.
Note: this is a continuation of PR #166 and includes changes in that branch too.

I haven't had a chance to test this yet, but I would like to make very sure that this has no chance of introducing an issue that used to happen with high PWM frequencies where the effective bit depth is reduced massively,

I have just tested the PWM change alone, with no other alterations, to 250_000_000, and set the machine.freq to the same in a test .py file, and I can't even get it to output voltage.
If I set the machine freq to 250_000_000 and the PWM to 10_000_000 I get very roughly 0.5V steps in the outgoing CV, so it seems to be the exact same issue as it used to be. Have you definitely had it working with these parameters @awonak ?
I have only changed the PWM rate so if there is another change in this PR that fixes it then maybe that's it!

[discussion] These most recent changes ignore the case where the user does not use the menu at all, and instead copies their favorite script to main.py. I'm not sure how many of those users there are (no me usually, sometimes for testing), but it is a supported mode.
So If we move all of the overclocking out of the scripts and only do it in the menu, then we are robbing those scripts of the speed change in the non-menu configuration. Same with the call to reset_state(). I don't think that this is what we want.

So If we move all of the overclocking out of the scripts and only do it in the menu, then we are robbing those scripts of the speed change in the non-menu configuration. Same with the call to reset_state(). I don't think that this is what we want.

Yeah, I thought about that. I was weighing the good points raised in #174 that we shouldn't be executing code when we import the firmware, vs the universal benefit those two calls would provide. I was thinking that it really should be up to the script author to make that call. menu.py is opinionated and makes that decision for all EuroPiScript subclassed scripts. For individual script authors who just want firmware + their script, it's up to them to make that decision in their script. Personally, I think I agree more with the point raised in #174 and that it's better to let individual script authors decide to add those calls to their scripts.

I have reverted the changes moving calls to reset_state() and freq() from the firmware to menu.py to be addressed in another RP.

It's probably worth updating the main description of this PR as it no longer makes a change to the PWM freq value.

Hmm, should we perhaps just close this PR since it doesn't change PWM and only makes unrelated changes, and address those all together in a separate issue/PR?

Hmm, should we perhaps just close this PR since it doesn't change PWM and only makes unrelated changes, and address those all together in a separate issue/PR?

I would just assume update this PR. It has all of the history right here and you have the approvals. Just add to the description to include the new direction. And readers can look at the conversation if they want to know more.
But if you want to open a new PR, I think that's fine too. IT's just more work for you.


Add enum type for properties/parameters

Should convert to something like
"protocol": {
   type: ["http", "https", "ftp", "sftp"],
   readonly: false
}

Should work for actual enums (get/set).
Should also work for strings and other types provided with the list of possible (string) values. Write (set) functionality should work for strings, and probably for other types via some type converter methods? Would it be possible for other languages?

Currently using proposing syntax is problematic because we expect the value of type property to be a type name (i.e. a token), not a composite something. Writing checks in every possible place where type could appear (properties, method parameters and return types) looks really troublesome.


[Bug]: maxOptions now accepting any values, and my droplist stays limited to the first 50 items

Bug description
Despite trying multiple setting for maxOptions (I've tried null, false, '', and even an integer of 500 & 1000000 and my dropdown field for my site is still being limited to 50 items.
When I remove the select-dancestyle if from the dropdown field in my Rails app, I lose the TomSelect JS look and my list of dance styles is completee.
  <%= f.select :dance_style_ids, DanceStyle.sorted.all.pluck(:name, :id),
    { label: "What are the main dance styles that will be represented at this event?",
      help: "Select the main dance styles that will be represented in the classes and/or socials." },
    { multiple: true, id: "select-dancestyle" } %>

const selectDancestyle = document.getElementById('select-dancestyle');
if (selectDancestyle) {
  new TomSelect(selectDancestyle, {
    maxOptions: 500,
    plugins: {
      remove_button: {
        title: 'Remove this dance style.'
      }
    },
    onItemAdd: function () {
      this.setTextboxValue('');
      this.refreshOptions();
    },
  });
}

The plugin for remove button is working.
Expected behavior
When I remove the select-dancestyle if from the dropdown field in my Rails app, I lose the TomSelect JS look and my list of dance styles is complete.
I'm expecting my list of dance styles to show completely, instead of being limited to 50.
Steps to reproduce
I have a separate tomselect.JS file that's being used in my Rails App, versus the JS code being on my same view page.
Additional context
This is an issue thats occuring on my deployed website.

OS: MacOS Sonoma
Browser: This issue appears regardless of my browser, I've tested on Chrome, Firefox, and Safari.

FWIW, I just noticed that my drop-downs were limited to 50 options. I realised I hadn't set maxOptions at all, set it to null, and now all of my many options are shown. So Tom Select seems to be working in this regard for me, anyway. Perhaps it's something else affecting your dropdown?
v.2.3.1.


SimplifyCFG: Simplify switch_enum on optional classes used by objc method calls

In the statement
optional1?.objc_setter = optional2?.objc_getter?.objc_getter
we can eliminate all optional switches expect for the first switch on
optional1. We must only execute the setter if optional1 has some value.
We can simplify the following switch_enum with a branch as long all
sideffecting instructions in someBB are objc_method calls on the
optional payload or on another objc_method call that transitively uses
the payload.
switch_enum %optionalValue, case #Optional.some!enumelt.1: someBB,
case #Optional.none: noneBB
someBB(%optionalPayload):
%1 = objc_method %optionalPayload
%2 = apply %1(..., %optionalPayload) // self position
br mergeBB(%2)
noneBB:
%4 = enum #Optional.none
br mergeBB(%4)
rdar://48007302

@swift-ci Please test

Awesome, this is way better than doing it in SILGen!

Build failed
Swift Test Linux Platform
Git Sha - 5298f81249b7880a80f0679c195bd09bd192cf7f

@swift-ci Please test

Build failed
Swift Test OS X Platform
Git Sha - 5298f81249b7880a80f0679c195bd09bd192cf7f

Build failed
Swift Test Linux Platform
Git Sha - 5298f81249b7880a80f0679c195bd09bd192cf7f

@swift-ci Please clean test OS X platform


[async component] add an API to reload load failed async component

What problem does this feature solve?
Currently vue async-component use http to load js file which may fail due to network break or timeout, if there is an API exposed in a way which can make errorComp lead user to interact and try to reload this component instead of refresh the whole page.
In addition, detailed error should be exposed to the errorComp so that it can show different states based on the error, tks in advance.
What does the proposed API look like?
<template>

{ $asyncComp.error.message }

  <button
     v-if="$asyncComp.error && $asyncComp.error.name === 'NETWORK_TIMEOUT'"
     @click="reload">click to reload</button>
</template>

I don't think this is a good idea because it should be easier to handle at an application level what can or cannot be displayed if there's no internet connection.
If you need a dynamic approach where you can retry fetching the component, you can implement it in userland by using a data property that you set to the result of the promise that resolves the component. Making it easy to trigger a new request.

This can be done with your own wrapper component. It doesn't need to be built-in.

https://codesandbox.io/s/vue-template-c63ne
If anybody would search for solution.


Support Node v20

Is your feature request related to a problem? Please describe.
We need to upgrade to Node 20 to get Next.js v14 working, but netlify-plugin-lighthouse requires Node <20.
Describe the solution you'd like
Test that netlify-plugin-lighthouse can run on Node 20. If it can, allow it.
Describe alternatives you've considered
N/A
Additional context
Node 20 is now in the LTS stream, so you should be able to rely on it being relatively stable going forwards.

I just upgraded my Nuxt app to require Node LTS (20.9 currently), but my Netlify build now fails due to netlify-plugin-lighthouse requiring < v20. Any plans to make this plugin compatible with latest Node LTS soon?

+1

+1

This is now resolved with v6.0.0 :)


vscode should highlight type

currently it is not highlighted as a keyword, e.g. in:
type Addr = str

Also, type names are rendered incorrectly, when they contain numbers:


Embed OpenAPI spec into site

This PR enhances the website to render the OpenAPI spec.
:memo: Reviewer Checklist
Review this pull request by ensuring the following items:

[ ] The commit with the sample OpenAPI spec file is replaced with the actual spec
[ ] There exists documentation on how to update the OpenAPI spec

Looks like this:


Predicate and Restrictions related functionality

Hi,
I am trying to implement Predicate and Restrictions related functionality in CreatePresentation method from ProofRequestViewModel, but I have some missunderstandings:
First of all, should we select the credential for the predicate same way we select credential for attribute ? If yes, how to get list of predicate credentials, because ListCredentialsForProofRequestAsync method from proofService is returning an empty list (for both cases when the predicate has restrictions and has no restrictions).
In case we should not select the credential for predicate, can someone give a hint on how this should be implemented.
Thanks

pr pr


Colors of lower division appear during the animations

@issuehuntfest has funded $30.00 to this issue. See it on IssueHunt

@mohitkyadav has submitted a pull request. See it on IssueHunt

@mohitkyadav has rewarded $21.00 to @mohitkyadav. See it on IssueHunt

:moneybag: Total deposit: $30.00
:tada: Repository reward(20%): $6.00
:wrench: Service fee(10%): $3.00


Android - Exception in HostObject::get(propName:ReactNativeBlobUtil)

Version: 0.13.7
OS: Android 11 (Samsung Note 10+)
Possibly related to: https://github.com/RonRadtke/react-native-blob-util/issues/33
The following crash is happening randomly (seen from our reporting tool) on android while the app is in background, presumably right before getting killed:
com.facebook.react.common.JavascriptException: Error: Exception in HostObject::get(propName:ReactNativeBlobUtil): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getAbsolutePath()' on a null object reference, stack:
<unknown>@856:161
v@2:1473
<unknown>@855:127
v@2:1473
<unknown>@852:176
v@2:1473
<unknown>@851:173
v@2:1473
<unknown>@804:153
v@2:1473
<unknown>@431:408
v@2:1473
d@2:875
<unknown>@6:1625
y@11:586
<unknown>@11:1889
y@11:586
o@11:1065
<unknown>@11:1208
f@127:154
<unknown>@127:881
x@132:655
y@132:1019
callImmediates@132:3084
callImmediates@-1
value@43:3106
<unknown>@43:1282
value@43:2798
value@43:1252
value@-1
value@-1

        at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.java:79)
        at java.lang.reflect.Method.invoke(Method.java:-2)
        at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
        at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:151)
        at com.facebook.react.bridge.queue.NativeRunnable.run(NativeRunnable.java:-2)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
        at android.os.Looper.loop(Looper.java:246)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
        at java.lang.Thread.run(Thread.java:923)

Basically, this:

com.facebook.react.common.JavascriptException: Error: Exception in HostObject::get(propName:ReactNativeBlobUtil): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getAbsolutePath()' on a null object

Looking at the breadcrumbs, it looks like the user opened the app, but it never entered in foreground mode.  The app works fine with normal use, and all permissions are properly defined in manifest and whatsoever.
I'm also loading some folders from the config.js file (loaded pretty much right after app start) like this:
import ReactNativeBlobUtil from 'react-native-blob-util';

// this is basically somewhere else so there's no hard dependencies to the library
let fs = {};
fs.ls = ReactNativeBlobUtil.fs.ls;
fs.mkdir = ReactNativeBlobUtil.fs.mkdir;
fs.df = ReactNativeBlobUtil.fs.df;
fs.dirs = ReactNativeBlobUtil.fs.dirs;

...

const DOCS_DIR = fs.dirs.DocumentDir;
const CACHE_DIR = fs.dirs.CacheDir;
const DOCS_DIR_S = DOCS_DIR + '/';

Crash is most likely happening from here or its surroundings, as this is the only place the reported method is called on app startup:
https://github.com/RonRadtke/react-native-blob-util/blob/master/android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilFS.java#L253
From the stack trace, it is impossible to tell which getAbsolutePath failed.

Which react-native version are you using?
Thank you for the information.
Then we probably have to wrap this part of the code too, so it won't fail.
But the questions is, how can that fail. The dictionaries we try to access should exist by default for every app on andorid or ios.

RN 0.62.2
I think the fail may be very rare, and it can be blamed on Android itself. Perhaps the crash itself is better than falling back to a default value, but at least a better message should be provided.

Looks like this is still happening and over time more consistently:

Last one was from android 11 on a samsung Note 10+

I wrapped both now in methods. This should prevent the app from crashing.
But this also means it could be that you get an empty string instead of a filepath.


The ssh_user and ssh_port parameters

The ssh_user and ssh_port parameters are complex and undocumented.
Old (released) system. The template create.yml hard coded ssh_user and ssh_port to ubuntu and 22. This was passed in to the instance config. driver.py read these from the instance config and used them to set the ansible_user and ansible_port portions of the connection options. To override them required setting ansible_user and ansible_port in the connection_options portion of the platform definition.
New system. The template create.yml reads ssh_user and ssh_port from the platform, the defaults are ubuntu and 22. This is used during the creation process, the user is set via cloud-init unless the key_inject_method is overridden and the port is used when polling until the instance starts. These are then passed via the instance config to driver.py and used to populate ansible_user and ansible_port for downstream inventory use.
I detailed both to highlight the backwards compatibility issue. My prior practice was to specify the ansible_user in connection_options, for example setting it to admin for a Debian distribution. This configured the inventory for the subsequent ansible stages, commands such as molecule login also worked. Using current master that breaks badly, cloud-init is used during create to set the user to ubuntu. The inventory is then configured to use admin, which breaks everything. The cause is not obvious.
I feel there are also issues with the name. Ansible is moving away from ansible_ssh_user to ansible_user. Setting ssh_port to 5986 for winrm looks weird.

There are a number of possible solutions. My personal view is that we should improve the documentation of the connection_options section and user the ansible_user and ansible_port portions of that section during the creation process.


MCS-1490 added globalSpace property for moves and fixed separate lid opening at angle based on ILE discoveries

Unity
I also got rid of a bunch of unused lines from the previous integration tests I made that I forgot to delete hence the 16k deletions

Getting an error for test 173:
FAILED INTEGRATION TESTS:
173.attachable_lid_at_angle (level1): Step 42 failed:
head_tilt: 20 != 10
return_status: UNDEFINED != SUCCESSFUL
173.attachable_lid_at_angle (level2): Step 42 failed:
head_tilt: 20 != 10
return_status: UNDEFINED != SUCCESSFUL
173.attachable_lid_at_angle (oracle): Step 43 failed:
objects container_1 visible: True != False

I might have to rebuild this and try again since everyone else is getting errors.

@ThomasSchellenbergNextCentury @brianpippin @rartiss55 I made a very minor float change on the container prefabs receptacle box on private  that may fix the issue. I really didnt think it would make a difference so thats why i pushed this pr separately from the private one but please try building again again. @ThomasSchellenbergNextCentury I cannot replicate your errors with the lid being off when running the build from the unity branch. The unity pr was meant to fix that issue so I really believe the most recent push should fix it. Could you guys please try one more time with the most recent push from unity and the newly updated private assets

@jaudick I'm unfortunately seeing the same issues (I copied over the new prefab, rebuilt my local addressables, removed the cached addressables from my /tmp/ folder, and reran the tests). I wonder if you're not testing using the same prefab we are? Whenever I copy over the new cube_hollow_with_bottom_lid.prefab from the mcs-private repo into the ai2thor repo, I notice it's not marked as an Addressable. I have to mark it as an Addressable, move it to the Container Prefabs asset group, and click Save Project, before I build my addressables locally. (Looking at the diff for the Container Prefabs.asset file, I guess it has a new GUID?) Jacob, could you try copying over the prefab file from the mcs-private repo into ai2thor, making sure it's marked as Addressable, rebuilding your addressables locally, and running your integration tests again? That's my only idea right now.

I'm still getting the error I was seeing for 173, but I'm not seeing the separate lid issue Thomas was seeing/174 passes fine for me. I copied assets from the MCS-1490-containers-with-separate-lids mcs-private branch and was on the 1490 branch for ai2thor (looks like I have latest for everything as well). Curious what others are seeing.

I'm still seeing the same issues as before. However, since Rachel isn't (just the initial errors for 173), I'm going to assume the lid issue is just on my end. I'll dig into it. For reference, here's what I did:

In mcs-private, checkout the MCS-1490 branch and pull the latest
Copy files from <mcs-private>/UnityAssetStore/Custom/* into <ai2thor>/unity/Assets/Addressables/MCS/UnityAssetStore/Custom/
In ai2thor, checkout the MCS-1490 branch and pull the latest
Delete the <ai2thor>/unity/ServerData/ folder
In the Unity Editor, first click Window->Asset Management->Addressables->Groups, then Build->Clean Build->All, and finally Build->New Build->Default Build Script
Build the Unity executable
Delete my locally cached addressables: rm -rf /tmp/CACI\ with\ the\ Allen\ Institute\ for\ Artificial\ Intelligence_MCS-AI2-THOR/
In the new ServerData/ folder, run sudo python3 -m http.server 80
In mcs, checkout the MCS-1490 branch and pull the latest
Run: source venv/bin/activate
Then run the integration tests: python integration_tests/run_tests.py --mcs_unity_build <mcs-unity-exe> --test 173 --dev (and also test 174)

Ugh... I rebuilt everything locally, and I thought I had a breakthrough, because Unity was accidentally saving the executable as MCS-AI2-THOR-Unity-App-v0.6.0x86_64.x86_64 (notice the extra x86_64?).
But now my test 173 is even wackier... I kept at it...
https://user-images.githubusercontent.com/10994382/199313528-d50e3c78-5d10-4c7c-aa59-41078cb01d08.mp4

@ThomasSchellenbergNextCentury @rartiss55  Could you rerun these tests with the latest commit from the unity branch. I fixed the not visible on step 43. I also changed the head tilts and return status to be accurate.

I got tests 173 and 174 working! Hallelujah. However:

I had to merge development into the MCS-1490 ai2thor branch for some of the other integration tests to pass.
Test 170 is failing for me, I think due to the recent changes made by @jaudick

RUNNING SCENE: 170.attachable_lid.scene.json
Step 33 failed:
        return_status: SUCCESSFUL != UNDEFINED
Step 34 failed:
        return_status: SUCCESSFUL != UNDEFINED
Step 38 failed:
        return_status: SUCCESSFUL != UNDEFINED
Step 39 failed:
        return_status: SUCCESSFUL != UNDEFINED
Step 40 failed:
        return_status: SUCCESSFUL != UNDEFINED
Step 43 failed:
        return_status: SUCCESSFUL != UNDEFINED
Step 68 failed:
        return_status: SUCCESSFUL != UNDEFINED
Step 76 failed:
        return_status: SUCCESSFUL != UNDEFINED
Step 101 failed:
        return_status: SUCCESSFUL != UNDEFINED
Step 102 failed:
        return_status: SUCCESSFUL != UNDEFINED
Step 108 failed:
        return_status: SUCCESSFUL != UNDEFINED
Step 109 failed:
        return_status: SUCCESSFUL != UNDEFINED

But we're very close!

@ThomasSchellenbergNextCentury I updated 170


Passing /dev/fd/0 to az storage blob upload no longer works

Description
With the azure CLI 2.0.12 and below, it was possible to upload a stream from STDIN to blob storage by an invocation like the following -
az storage blob upload -f /dev/fd/0 --max-connections 1 ....

Obviously this only worked on platforms that have /dev/fd, but otherwise this worked nicely to upload unknown-length streams we didn't want to buffer to disk.
This appears to have been broken since https://github.com/Azure/azure-cli/commit/7d51854504343b298f27d401e7bbf3bef8ffa039 - I suspect it's something to do with the MIME type detection. It now only uploads zero-byte file but otherwise exits successfully. Eyeballing the code suggests that passing --content-type should help, but this appeared to have no effect

Environment summary
Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Answer here: pip install azure-cli
CLI Version: What version of the CLI and modules are installed? (Use az --version)
Answer here:
azure-cli (2.0.15)

acr (2.0.11)
acs (2.0.14)
appservice (0.1.14)
batch (3.1.2)
billing (0.1.4)
cdn (0.0.7)
cloud (2.0.7)
cognitiveservices (0.1.7)
command-modules-nspkg (2.0.1)
component (2.0.7)
configure (2.0.10)
consumption (0.1.4)
container (0.1.9)
core (2.0.14)
cosmosdb (0.1.12)
dla (0.0.11)
dls (0.0.13)
eventgrid (0.1.3)
feedback (2.0.6)
find (0.2.6)
interactive (0.3.8)
iot (0.1.11)
keyvault (2.0.8)
lab (0.0.10)
monitor (0.0.9)
network (2.0.13)
nspkg (3.0.1)
profile (2.0.11)
rdbms (0.0.6)
redis (0.2.8)
resource (2.0.13)
role (2.0.11)
servicefabric (0.0.2)
sf (1.0.7)
sql (2.0.10)
storage (2.0.13)
vm (2.0.13)

OS Version: What OS and version are you using?
Answer here: CentOS 7
Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here: Bash

@KJTsanaktsidis thank you for posting this issue. We're not aware of this scenario so sorry for the inconvenience of breaking it. I assume you have work around to get around this scenario temporarily. If it blocks any critical scenario, please let me know.
Regarding the case, the content type inspection was added in 2.0.14, since you're on storage (2.0.13) I doubt if it is the root cause. I will take a look if I have time this sprint.

Thanks for your response. The only workaround I could find was to pin azure-cli 2.0.12. This is OK for now but obviously being able to track the latest release would be better!
Rather than trying to find out what broke this hack I wonder if adding an explicit option to read from stdin would be more desirable. The AWS cli tool allows uploads to S3 to be read from stdin by passing '-', for example. What do you think?

I do believe you can try:
command --foo @-  The @ symbol will read from file, and the dash is used to indicate STDIN as that file. @johanste feel free to correct me.

The one thing to be aware of is that the @- annotation will read in the whole file before resuming the command execution. It would most certainly be interesting to support the notion of a stream for commands that do support reading from a stream....

@KJTsanaktsidis, I can't repo this issue. Here's my repo command:
16:40 $ az storage blob upload -f /dev/fd/0 -n example.txt -c test <<< `date`
Finished[#############################################################]  100.0000%
LastModified
-------------------------
2017-09-06T23:43:21+00:00

Am I doing anything different? Can you share an example of your repo?

Did you check the resulting file that was uploaded? In my case it succeeded and created a file in azure, but it was empty.
The repro case we have is basically piping ~400GB of tarball into the following script. I don't think any of what it's doing should matter, but I could be wrong.
#!/usr/local/bin/zsh -e

# This is a shell script that is conceptually what we want:
# STDIN -> pigz -> gpg -> tee shasum -> split 100G -> tee (s3, azure) -> /dev/null
# We need to split it into 100G chunks because azure can't accept blobs bigger than 200G.
# Important to print the output of split into /dev/null, because we handle what we actually want
# to do withb the split output in the SPLITSCRIPT - and otherwise, we back up the pipeline because nothing
# is consuming the stdout of the pipeline.
# We want to connect the stderror's to the ruby logger, so we will define a bunch of pipes for errors to
# end up in, each of which has a thread printing to the logger.

set -e # and exit when it does
setopt pipefail
renice -n 10 -p $$ >&2 # It would be bad if replicas fell behind

echo "About to kick off pipeline" >&2

export SHELL="/usr/local/bin/zsh" # `split` uses this var to decide what shell to spawn

# This is kind of a sad problem with tee(1)
# It reads from stdin, terminates once it has written all of stdin to its arguments.
# if you do something like cmd-1 | tee <(cmd-2) | cmd-3, the shell waits for cmd-1,
# tee, and cmd-3 to finish before running the next line of the script. Unfortunately,
# tee has no way to wait for cmd-2 to finish, and bash doesn't care. This means that
# it will still be running when the script finishes.
# In practical terms, this means that doing ... | tee <(upload-to-s3) <(upload-to-azure) won't
# actually wait for the upload to finish, and the last part of the upload on s3/azure will actually
# never appear in the bucket, because the upload is not finalised.
# zsh on the other hand is polite enough to wait for the redirection to finish, so we'll go with that.

cat | \
    pigz -5 2>"$GZIP_ERR" | \
    gpg --batch --encrypt --sign --compress-level 0 --recipient "$ENCRYPT_KEY" --local-user "$SIGNING_KEY" --trust-model always 2>"$GPG_ERR" | \
    # Make a shasum, but pipe it into sed to replace "abcdef0123 -" with "abcdef0123 snapshot_file.tar.gz.gpg" so that it is a valid SHA256SUMS file
    { tee >(sha256sum - 2>"$SHASUM_ERR" | sed "s/-$/${BARE_FILE_NAME}/" >"$SHASUM_OUT" 2>"$SHASUM_ERR"); } 2>"$TEE_ERR" | \
    split --bytes<PHONE_NUMBER>00 --numeric-suffixes --filter='
        setopt pipefail;
        set -e;

        # Do this logic inside the split filter, because we cannot expoort an array as an env var
        if [[ -n "$OBJECT_SHOULD_EXPIRE_DATE" ]]; then
            S3_EXPIRY_FLAGS=("--expires" "$OBJECT_SHOULD_EXPIRE_DATE")
        else
            S3_EXPIRY_FLAGS=()
        fi

        { tee \
            >(
                aws s3 cp - "$S3_OBJECT_URI.$FILE" --expected-size<PHONE_NUMBER>00 --storage-class STANDARD_IA "${S3_EXPIRY_FLAGS[@]}" 2>"$S3_ERR" 1>&2
            ) \
            >(
                python2.7 -m azure.cli storage blob upload -f /dev/fd/0 -n "$AZURE_OBJECT_NAME.$FILE" \
                    --container-name "$AZURE_CONTAINER_NAME" --account-key "$AZURE_STORAGE_ACCESS_KEY" \
                    --account-name "$AZURE_STORAGE_ACCOUNT" --max-connections 1 2>"$AZ_ERR" 1>&2
            ) \
            >(
                sha256sum - 2>"$SHASUM_ERR" | sed "s/-$/${BARE_FILE_NAME}.${FILE}/" >"$SHASUM_OUT" 2>"$SHASUM_ERR"
            );
        } 2>"$TEE_ERR" >/dev/null
        exit 0;
    ' - 'part_' >/dev/null

I did check the content and it's there. I'm not sure if the either 1) the platform, which I was on MacOS; or 2) size of the content to upload may impact this.
I will take a close look at your script.

Is it possible to simplify your script to a more concise repo? For example, using the format of my example to upload a relatively large file?

09:49 $ az storage blob upload -f /dev/fd/0 -n test01.zip -c test < ~/Downloads/en_windows_10_n_multiple_editions_version_1607_updated_jan_2017_x64_dvd_9714419.iso
Finished[#############################################################]  100.0000%
{
  "etag": "\"0x8D4F61105F7F83F\"",
  "lastModified": "2017-09-07T16:53:54+00:00"
}

This uploads a 4GB file successfully. I'm wondering what's the error you got and --debug option told you. Please simplify your scenario a bit so that we can cut through the complexity of the bash script.
As I'm not able to repo this issue. I'll move this to the backlog.

Close for now due to lack of update for seven days. Please feel free to reopen the issue later.

For what it is worth: for me, a stream upload works only with append blobs, not default block blobs:
$ az --version
azure-cli (2.0.14)
$ export AZURE_STORAGE_CONNECTION_STRING...

$ tar cf - . | az storage blob upload -c repos -f /dev/stdin -n test4.tar
$ az storage blob show -c repos -n test4.tar
{
  "name": "test4.tar",
  "properties": {
    "appendBlobCommittedBlockCount": null,
    "blobType": "BlockBlob",
    "contentLength": 0,

$ tar cf - . | az storage blob upload -c repos -f /dev/stdin -n test6.tar -t append
$ az storage blob show -c repos -n test6.tar
...
  "name": "test6.tar",
  "properties": {
    "appendBlobCommittedBlockCount": 1,
    "blobType": "AppendBlob",
    "contentLength": 1392640,

Take a look the newly surfaced evidence.

@rnowagk unfortunately, I'm not able to repo your issue:
(env) ✔ ~/code/azure-cli [fss|✔ ]
13:56 $ tar cf - ../azure-multiapi-storage-python/ | az storage blob upload -c test -f /dev/stdin -n test01.tar
Finished[#############################################################]  100.0000%
{
  "etag": "\"0x8D50C339C46A25C\"",
  "lastModified": "2017-10-05T20:56:54+00:00"
}
(env) ✔ ~/code/azure-cli [fss|✔ ]
13:56 $ az storage blob show -c test -n test01.tar
{
  "content": "",
  "metadata": {},
  "name": "test01.tar",
  "properties": {
    "appendBlobCommittedBlockCount": null,
    "blobType": "BlockBlob",
    "contentLength": 65536,
    "contentRange": null,
    "contentSettings": {
      "cacheControl": null,
      "contentDisposition": null,
      "contentEncoding": null,
      "contentLanguage": null,
      "contentMd5": "Ho8pfnuE9rF7CWRwmHQRqQ==",
      "contentType": "application/octet-stream"
    },
    "copy": {
      "completionTime": null,
      "id": null,
      "progress": null,
      "source": null,
      "status": null,
      "statusDescription": null
    },
    "etag": "\"0x8D50C339C46A25C\"",
    "lastModified": "2017-10-05T20:56:54+00:00",
    "lease": {
      "duration": null,
      "state": "available",
      "status": "unlocked"
    },
    "pageBlobSequenceNumber": null,
    "serverEncrypted": false
  },
  "snapshot": null
}

Would you please give it a try with the latest CLI release (2.0.18)? If the issue persists, can you open a new issue with more debug output (--debug) and details about your environment?

I'm also experiencing this problem. I'm using approximately az storage blob upload --file <(ssh server cat /path/to/file) ..., which results in something like /dev/fd/52 instead of /dev/fd/0, but even if I use stdin, it only uploads an empty file. --content-type text/plain doesn't fix it. cat <(ssh server cat /path/to/file) works fine. I can upload the file fine if I pipe it into a temporary file, then upload that. Debug output of the problem:
Command arguments ['storage', 'blob', 'upload', '--container-name', 'upload-testing', '--file', '/dev/fd/63', '--name', 'b2']
Current cloud config:
{'endpoints': {'active_directory': 'https://login.microsoftonline.com',
               'active_directory_data_lake_resource_id': 'https://datalake.azure.net/',
               'active_directory_graph_resource_id': 'https://graph.windows.net/',
               'active_directory_resource_id': 'https://management.core.windows.net/',
               'batch_resource_id': 'https://batch.core.windows.net/',
               'gallery': 'https://gallery.azure.com/',
               'management': 'https://management.core.windows.net/',
               'resource_manager': 'https://management.azure.com/',
               'sql_management': 'https://management.core.windows.net:8443/',
               'vm_image_alias_doc': 'https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json'},
 'is_active': True,
 'name': 'AzureCloud',
 'profile': 'latest',
 'suffixes': {'azure_datalake_analytics_catalog_and_job_endpoint': 'azuredatalakeanalytics.net',
              'azure_datalake_store_file_system_endpoint': 'azuredatalakestore.net',
              'keyvault_dns': '.vault.azure.net',
              'sql_server_hostname': '.database.windows.net',
              'storage_endpoint': 'core.windows.net'}}
Registered application event handler 'CommandTableParams.Loaded' at <function add_id_parameters at 0x7fdd52c81d90>
Registered application event handler 'CommandTable.Loaded' at <function add_id_parameters at 0x7fdd52c81d90>
Successfully loaded command table from module 'storage'.
Extensions directory: '~/.azure/cliextensions'
Application event 'CommandTable.Loaded' with event data {'command_table': {'storage blob upload': <azure.cli.core.commands.CliCommand object at 0x7fdd52c39a20>}}
Application event 'CommandParser.Loaded' with event data {'parser': AzCliCommandParser(prog='az', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)}
Application event 'CommandTableParams.Loaded' with event data {'command_table': {'storage blob upload': <azure.cli.core.commands.CliCommand object at 0x7fdd52c39a20>}}
Application event 'CommandParser.Parsing' with event data {'argv': ['storage', 'blob', 'upload', '--container-name', 'upload-testing', '--file', '/dev/fd/63', '--name', 'b2']}
Application event 'CommandParser.Parsed' with event data {'command': 'storage blob upload', 'args': Namespace(_command_package='storage', _jmespath_query=None, _log_verbosity_debug=False, _log_verbosity_verbose=False, _output_format='json', _parser=AzCliCommandParser(prog='az storage blob upload', usage=None, description='Creates a new blob from a file path, or updates the content of an existing blob, with automatic chunking and progress notifications.', formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True),  [...]
Getting data service client service_type=BlockBlobService
azure.multiapi.storage.v2017_04_17.common.storageclient : Client-Request-ID=f4411418-c279-11e7-82bb-10feed10247e Outgoing request: Method=PUT, Path=/upload-testing/b2?<censored SAS token>, Query={'timeout': None}, Headers={'x-ms-blob-type': 'BlockBlob', 'x-ms-lease-id': None, 'If-Modified-Since': None, 'If-Unmodified-Since': None, 'If-Match': None, 'If-None-Match': None, 'x-ms-blob-cache-control': None, 'x-ms-blob-content-type': None, 'x-ms-blob-content-disposition': None, 'x-ms-blob-content-md5': None, 'x-ms-blob-content-encoding': None, 'x-ms-blob-content-language': None, 'x-ms-version': '2017-04-17', 'User-Agent': 'Azure-Storage/0.37.0-0.36.0 (Python CPython 3.6.3; Linux 4.13.9-1-ARCH) AZURECLI/2.0.20', 'x-ms-client-request-id': 'f401c2e0-c279-11e7-82bb-10feed10247e', 'x-ms-date': 'Sun, 05 Nov 2017 22:37:50 GMT'}.
urllib3.connectionpool : Starting new HTTPS connection (1): sandboxblobstorage.blob.core.windows.net
urllib3.connectionpool : https://sandboxblobstorage.blob.core.windows.net:443 "PUT /upload-testing/b2?<censored SAS token>" 201 None
azure.multiapi.storage.v2017_04_17.common.storageclient : Client-Request-ID=f4411418-c279-11e7-82bb-10feed10247e Receiving Response: Server-Timestamp=Sun, 05 Nov 2017 22:37:34 GMT, Server-Request-ID=4ffe0e3b-001e-0058-6686-56acb0000000, HTTP Status Code=201, Message=Created, Headers={'x-ms-blob-type': 'BlockBlob', 'x-ms-lease-id': None, 'If-Modified-Since': None, 'If-Unmodified-Since': None, 'If-Match': None, 'If-None-Match': None, 'x-ms-blob-cache-control': None, 'x-ms-blob-content-type': None, 'x-ms-blob-content-disposition': None, 'x-ms-blob-content-md5': None, 'x-ms-blob-content-encoding': None, 'x-ms-blob-content-language': None, 'x-ms-version': '2017-04-17', 'User-Agent': 'Azure-Storage/0.37.0-0.36.0 (Python CPython 3.6.3; Linux 4.13.9-1-ARCH) AZURECLI/2.0.20', 'x-ms-client-request-id': 'f401c2e0-c279-11e7-82bb-10feed10247e', 'x-ms-date': 'Sun, 05 Nov 2017 22:37:50 GMT'}.
Application event 'Application.TransformResults' with event data {'event_data': {'result': {'lastModified': '2017-11-05T22:37:34+00:00', 'etag': '"0x8D5249DCF51D8E5"'}}}
Application event 'Application.FilterResults' with event data {'event_data': {'result': {'lastModified': '2017-11-05T22:37:34+00:00', 'etag': '"0x8D5249DCF51D8E5"'}}}
{
  "etag": "\"0x8D5249DCF51D8E5\"",
  "lastModified": "2017-11-05T22:37:34+00:00"
}

I'm on Arch Linux, and I installed the Azure CLI through https://aka.ms/InstallAzureCli. I'm on Azure CLI version 2.0.20 and Python version 3.6.3.

I believe this bug is still present in azure-cli (2.0.47) with storage (2.2.2) from the Debian package (2.0.47-1~stretch).  Here's a quick way to reproduce the issue (requires environment variables $AZURE_STORAGE_ACCOUNT and $container to be set by the user):
date | az storage blob upload -c $container -n date.txt -f /dev/fd/0
az storage blob download -c $container -n date.txt -f date.txt
cat date.txt

On my system, date.txt is empty when it should contain the output of date at the time of upload.
I think the source of the previous confusion is that /dev/fd/0 works when redirected from a file (since seek(3) and stat(2) work) but does not work when stdin is a pipe.  So azure storage blob upload < file.iso works, while cat file.iso | azure storage blob upload does not.  This is also occurs with a named pipe:
mkfifo date.fifo
date > date.fifo &
az storage blob upload -c $container -n date.txt -f date.fifo
az storage blob download -c $container -n date.txt -f date.txt
cat date.txt

It would be great if azure-cli could support pipes without buffering, so that large intermediate files could be avoided.  If not, it would be nice if azure-cli could print a reasonable error message, rather than silently discarding data.
Thanks,
Kevin

@williexu


evaluation

i want evaluation dice,recall,precision for model but when run Below code :
import cv2
import numpy as np
import glob
import matplotlib.pyplot as plt
from copy import deepcopy
gt_list = []
seg_list = []
gt_list.append(pred)
seg_list.append(y_test)
dice =np.zeros(len(gt_list))
precision =np.zeros(len(gt_list))
recall =np.zeros(len(gt_list))
for i in range(len(gt_list)):
gt =gt_list[i]
seg =seg_list[i]
seg[seg>(0.85255)] = 255
seg[seg<=(0.85255)] = 0
gt_p = gt == 255
gt_n = gt == 0

seg_p = seg == 255
seg_n = seg == 0

TP = np.sum(gt_p * seg_p) / np.sum(gt_p)
TN = np.sum(gt_n * seg_n) / np.sum(gt_n)
FP = np.sum(gt_n * seg_p) / np.sum(gt_n)
FN = np.sum(gt_p * seg_n) / np.sum(gt_p)
print ('TP:', TP)
print ('TP+FP+FN:', TP+FP+FN)

dice[i] = (2*TP) / (2*TP + FP + FN)
precision[i] = TP / (TP + FP)
recall[i] = TP / (TP + FN)

mean_dice = np.round(np.mean(dice), 3)
mean_precision = np.round(np.mean(precision), 3)
mean_recall = np.round(np.mean(recall), 3)
print ("mean_dice",mean_dice)
print ("mean_precision",mean_precision)
print ("mean_recall",mean_recall)

resualt run code:
TP: nan
TP+FP+FN: nan
mean_dice nan
mean_precision nan
mean_recall nan
please help me

What are the values of gt_p, gt_n, seg_p and seg_n?

Each repetition of a loop is a matrix of its valu is treu or false

@sfarahaninia73 I think somewhere the value of one of those variables is not a boolean. Check it.

@sfarahaninia73 I think somewhere the value of one of those variables is not a boolean. Check it.
Not all values are boolean
I shared the code with you at Google colab
Thanks for checking


Release Checklist 1.41

Issues in Release

[x] Add watchdog URLs in http mode to outer and inner nginx proxies #4096 @alvacouch
[x] turn off TaskNotification creation for api downloads #4098 @sblack-usu
[x] url encode resourcemap urls #4099 @sblack-usu
[x] Fix botch in adding resources to collections #3932 @sblack-usu
[x] updated vocab schema.org url to be compatible with DataONE #4101 @hyi
[x] add missing abstract to timeseries rdf/xml #4100 @sblack-usu
[x] fixed the carriage return issue #3899 @hyi
[x] Remove frontend messages for large files download #3520 @cuahsimarko
[x] encode urls in aggregation map rdf/xml file #4103 @sblack-usu
[x] web service endpoints #3825 @kjlippold @sblack-usu
[x] Split bagit file creation from bag zipping to allow bagit file downloads #4102 @sblack-usu

Beta Deployment

[x] Diff RC to master to identify and manually make changes in the following files:

hsctl
config/hydroshare-config.yaml
nginx/config-files/hydroshare-ssl-nginx.conf.template
scripts/templates/docker-compose.template

[x] Deployed to Beta
[x] Review the search and discovery pages
[x] Create a new user and update profile
[x] Create iROD account, test connection and delete iROD account
[x] Create a new resource, check sharing/permission settings, delete new resource
[x] Developers test around issues
[x] QA testing around issues
[x] Stakeholders approval

Production Deployment

[x] Deployed to Production

Make manual changes to files identified in Beta Deployment

[x] Maps API key is correct and maps are displaying correctly
[x] Review the search and discovery pages
[x] Create a new user and update profile
[x] Create iROD account, test connection and delete iROD account
[x] Create a new resource, check sharing/permission settings, delete new resource
[x] Developers test around issue

Notes relevant to deployment

HSWS keys need to be coordinated with local_settings
nginx/config-files/hydroshare-ssl-nginx.conf.template changes need to be coordinated
 nginx/hs_proxy/nginx/config-files/hydroshare-ssl-nginx.conf.template changes need to be coordinated

Discussed with @martinseul and we are closing this issue.


[WIP] refactor the build phase of image in CI with gsctl

What do these changes do?

Make bash scripts not dependent on bashly and refactor gsctl.
Related issue number

To resolve issue #3074 .
The previous pr #3101  was too messy, so I opened a new pr to submit an issue #3074 .

Codecov Report

Merging #3142 (3250e58) into main (88c5180) will decrease coverage by 6.86%.
Report is 1 commits behind head on main.
The diff coverage is n/a.

Additional details and impacted files

@@            Coverage Diff             @@
##             main    #3142      +/-   ##
==========================================
- Coverage   42.64%   35.79%   -6.86%
==========================================
  Files         100      100
  Lines       10817    10826       +9
==========================================
- Hits         4613     3875     -738
- Misses       6204     6951     +747

see 29 files with indirect coverage changes

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f701fb8...3250e58. Read the comment docs.


Expose knex.cast function

Feature discussion / request

Explain what is your use case
To be able to cast values and references to specific types.

Explain what kind of feature would support this
Exposing a new function (or rather a set of functions)

Give some API proposal, how the feature should work
Disclaimer: Mostly inspiried by objectionjs as per original discussion in https://github.com/tgriesser/knex/issues/2507

knex.cast(value, type);
knex.castText(value);
knex.castInt(value);
knex.castBigInt(value);
knex.castFloat(value);
knex.castDecimal(value);
knex.castReal(value);
knex.castBool(value);
knex.castJson(value);
knex.cast*(value).as(alias)

Intended to support any "valid-knex" input:
knex.castText(1); //CAST '1' AS text
knex.castText(knex.raw(1)); //CAST 1 AS text
knex.castText(knex.ref('id')); // CAST "id" AS text

Example implementation
'use strict';
import Raw from './raw';

class Cast extends Raw {
  constructor(client) {
    super(client);

    this.value = null;
    this.to    = '';
    this.alias = '';
  }

  cast(value, to) {
    this.value = value;
    this.to    = to;

    return this;
  }

  as(alias) {
    this.alias = alias;

    return this;
  }

  static get TYPES() {
    return {
      Text:    'text',
      Integer: 'integer',
      BigInt:  'bigint',
      Float:   'float',
      Decimal: 'decimal',
      Real:    'real',
      Bool:    'boolean',
      Json:    'json',
    };
  }

  castText(value) {
    return this.cast(value, Cast.TYPES.Text);
  }

  castInt(value) {
    return this.cast(value, Cast.TYPES.Integer);
  }

  castBigInt(value) {
    return this.cast(value, Cast.TYPES.BigInt);
  }

  castFloat(value) {
    return this.cast(value, Cast.TYPES.Float);
  }

  castDecimal(value) {
    return this.cast(value, Cast.TYPES.Decimal);
  }

  castReal(value) {
    return this.cast(value, Cast.TYPES.Real);
  }

  castBool(value) {
    return this.cast(value, Cast.TYPES.Bool);
  }

  castJson(value) {
    return this.cast(value, Cast.TYPES.Json);
  }

  toSQL() {
    const {value, to, alias} = this;

    const asAlias = alias ? `AS ${this.client.formatter(this).wrap(alias)}` : '';

    const cast = to === Cast.TYPES.Json
      ? `to_jsonb(?) ${asAlias}`
      : `CAST(? AS ${to}) ${asAlias}`;

    this.set(cast, [value]);

    return super.toSQL(...arguments);
  }
}

export default Cast

Extending Raw (same as Ref) makes it a valid input across the knex API and adds automatic support for existing Raw functions such as .wrap.
Creating this for discussion purposes, I'm not sure what would be the most optimal API or implementation, but I believe this is something knex currently lacks.

I think that casting should be allowed for column references too and not only for literal values. Have you tried if knex.raw('?', [knex.ref('foo.bar')]) actually outputs column ref to replace the ?. IIRC this actually should work for casting complete queries / raw too :+1:

Yes the idea is that this covers all bases, including the new .ref. It plays well with existing query-compiler in that sense. For example knex.castText(knex.ref('id')); // CAST "id" AS text
What will not make sense and not even work is something like this, but it's kind of a given imo.. :)
knex.castText(knex.ref('id').as('Test')).as('Test');


Question: timedout vs timed_out?

I'm just curious: any reason why the method is timedout instead of timed_out? :thinking:
Same goes for timespent vs time_spent

@alexanderadam nice catch! I am recoding it a bit for support for clickhouse in #59 actually. I will fix better support for classes with clickhouse first, then I can clean up this type of method names I haven't even think second thought on.
I think they should even be called session_time_check or similar - Like what it actually is doing.
Thanks again for the look through! :D

I think they should even be called session_time_check or similar - Like what it actually is doing.

I thought the same but I didn't wanted to go to get down to the nitty-gritty here. :wink:
By the way: it's wonderful work, that you're doing! :+1:

@alexanderadam Thank you! Love that you like it!
This has been fixed when I merged clickhouse in #59.
So I will close this. Feel free to give me feedback and create more issues :)


remove unneessary usage of alias_method_chain

This PR removes the usage of alias_method_chain in SurveyGizmo::MultilingualTitle. alias_method_chain has been deprecated in Rails 5.
Fixes #95

as long as it works...  too bad we don't have VCR specs

Do you know how to provoke this behavior from Survey Gizmo? As far as I understand, this does not always happen, right?

i thought it did always happen?  but i've forgotten at this point.

Okay, in this case, let me verify this a bit closer in my current project here.

look at the debug output; if the title is coming back as a hash then you're seeing the right behavior.  if not, you might have to change some setting on the survey.
it might be that the behavior happens only on one of the individual load or multiple survey loads, like the teams

I did break some specs first, before I got this right. Like I said, I'll check and report back.

Ok so at lest it's covered by some specs ;)

@jarthod sorry for the delay. As far as I can tell, the change is fine and has not caused issues.

Thanks, just released 6.4.1


816 retirement pledge ctas

Description
Please test with existing pledge, was unable to test on localhost due to issues with ens names.. (see discord)

Styling updates to match SingleRetirement designs (font sizes, spacing etc)
Add a conditional view or create pledge button on retirement section

Note: there are still font and styling differences between the designs and production that should be resolved in a separate ticket
Designs
https://www.figma.com/file/HXwNOLfM9CQHgwmouz0rpk/CARBON-OFFSETTING?node-id=1662%3A3535&t=SDhxVgz55R9izLbp-0
Related Ticket
Resolves #816
Changes

Before
After

Checklist

[x] Building the site with npm run build-site works without errors
[x] Building the app with npm run build-app works without errors
[x] I formatted JS and TS files with running npm run format-all

Missing a period at the end of "Create a pledge now", as shown in the figma.

@ShimonD-KlimaDAO I moved the button thing to a new ticket #880
I am jumping in to add that missing period, rebase this PR and merge it!


Make calibration file for detector params

Things like rowreadtime and other detector params that are slowly changed over time should be moved to a calibration file rather than a function, to make it easier to change/deploy the code on CTC. Right now, we decided to use functions, so this work would just be:

make a calibration file that handles all of these variables
update functions to use this calibration file (as one of the inputs) rather than calling the functions
make a function that can easily generate a calibration file given input values for these variables
update the install script so that we generate a default calibration file (with pre-launch TVAC numbers) upon install that is tracked in the calibration database, so there is always a value to use
update the tests accordingly

@semaphoreP, is this closed now with PR #106?

Completed!


adds ability to export non-EPSG CRSs

grabs the authority, version and code from the CRS directly to encode the URIs. Related to #92 but can be merged separately. I'm not aware of any issues this would cause but I am open to hearing about them

okay so I know that the None object is most likely due to the too-high confidence level default to the to_authority call, although I can't seem to find much information on why proj doesn't always have high confidence, is there information missing from the CRS of that polar projection?

okay so although tests pass, I am going to add back a check to ensure we don't try to unpack a None to allow for cases when the right answer really is EPSG/0/None

@vincentsarago I've added a test (one parameterized test per authority, not checking every code) and fixed remaining black formatting issues. I could see adding a test to try to ensure that EPSG/0/None is at least returned sometimes, your call.


DEV: recover run start

just as simple examples.

Codecov Report

Merging #270 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #270   +/-   ##
=======================================
  Coverage   90.18%   90.18%
=======================================
  Files           4        4
  Lines         489      489
  Branches       80       80
=======================================
  Hits          441      441
  Misses         33       33
  Partials       15       15

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d2bfe2b...e08a224. Read the comment docs.

This repository is deprecated. Would you like to make a PR against databroker, where this code now lives?


chore(vaultwarden): update common chart to v3.5.1

I noticed the common chart version is pretty outdated.
Btw, I couldn't get the gen-chart-summary pre-commit hook working:

$ gc -m'chore(vaultwarden): update common chart to v3.5.1'
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
fix utf-8 byte order marker..............................................Passed
mixed line ending........................................................Passed
check for merge conflicts................................................Passed
check for case conflicts.................................................Passed
CRLF end-lines remover...................................................Passed
Tabs remover.............................................................Passed
Artifact Hub Lint........................................................Passed
Helm Docs................................................................Passed
Generate Chart Summary...................................................Failed
- hook id: gen-chart-summary
- exit code: 2

sed: can't read /^## Chart Overview$/,$d: No such file or directory

@varac I'd like to update all of the chart dependencies, but unfortunately there are quite a few breaking changes. I have transitioned my personal infrastructure to use bjw-s's app-template chart. Here's what my Vaultwarden deployment looks like


enabling the test to run on jdk 17+ on all Platforms

Made changes with aqa-tests to enable the jck-runtime-API-javax_print test for jdk17 on openj9 as part of Jenkins migration.
This PR adds a jck-runtime-API-javax_print test to run on Jenkins for jdk17 on all platforms.
Modified playlist.xml which contains Perl commands to execute tests.
Verified Tests on all Platforms
https://hyc-runtimes-jenkins.swg-devops.com/view/Test_grinder/job/Grinder/25202/ - AIX
https://hyc-runtimes-jenkins.swg-devops.com/view/Test_grinder/job/Grinder/24623/ - Linux
https://hyc-runtimes-jenkins.swg-devops.com/view/Test_grinder/job/Grinder/25203/ - Windows
https://hyc-runtimes-jenkins.swg-devops.com/view/Test_grinder/job/Grinder/25204/ - Mac
https://hyc-runtimes-jenkins.swg-devops.com/view/Test_grinder/job/Grinder/25205/ - Linux ppc64le
https://hyc-runtimes-jenkins.swg-devops.com/view/Test_grinder/job/Grinder/25207/ - Linux_390-64
https://hyc-runtimes-jenkins.swg-devops.com/view/Test_grinder/job/Grinder/25208/ - Linux_aarch64
https://hyc-runtimes-jenkins.swg-devops.com/view/Test_grinder/job/Grinder/25209/ - Mac_arch64

jck-runtime-API-javax_print was excluded due to backlog/issues/633 (intermittent failure). Did the underline issue get resolved? Also, please run multiple iterations x multiple machines in Grinder.
As a side note, please do not use KEEP THIS BUILD FOREVER in any Jenkins job. Thanks.

FYI @Mesbah-Alam @JasonFengJ9

Concerns in https://github.com/adoptium/aqa-tests/pull/3874#issuecomment-1191565109 are not addressed. There are no comments about resolving the underlying issue and no adequate testing. Closing this PR without merging. Please reopen after adequate testing is done on all platforms, or the underlying issue is resolved. Thanks!


getting rid of ts dict validation when not array like

When fetching witness channels, their sample rate will be different than the strain data's. Enforcing the validate_ts_dict check when array_like=False precludes this use case entirely. In principle this is less of a problem when reading, since you can always write things with the same sample rate (and I think the write_timeseries API even enforces that, correct?), but I guess my thinking is if people want TimeSeriesDicts, and TimeSeriesDicts can handle this, then give them what they're asking for and trust they know what they want to do with the channels downstream.

Logic makes sense to me. write_timeseries enforces this because it should only be used for arrays. If you already have a TimeSeriesDict you should simply just call TimeSeriesDict.write().
Now that i'm thinking of it we should probably have a function that given a TimeSeriesDict, returns the appropriate file name according to our convention