content stringlengths 4 1.04M | lang stringclasses 358 values | score int64 0 5 | repo_name stringlengths 5 114 | repo_path stringlengths 4 229 | repo_licenses listlengths 1 8 |
|---|---|---|---|---|---|
BEGIN {
data = "abc:easy:as:one:two:three"
FS = ":"
FIELDWIDTHS = "3 1 4 1 2 1 3 1 3 1 5"
n = split(data, a)
printf "n = %d, a[3] = %s\n", n, a[3]
}
| Awk | 3 | Crestwave/goawk | testdata/gawk/splitdef.awk | [
"MIT"
] |
find 1.4427084503999819 0.0 0.0 0.65677953638907038 0.0 0.0 0.52641771852582697 0.0 0.88309266246455909 0.0 0.0 0.43110753872150198 0.0 0.0 0.0 0.0 0.0 0.0 0.43110753872150198 0.0 0.0 0.0 0.0 0.0 0.0 1.2195648990857724 0.0 0.34409616173187213 0.0 0.34409616173187213 1.2195648990857724 0.0 0.0 0.0 0.0 0.0 0.0 0.26405345405833586 0.43110753872150198 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.1358556309599273 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.4427084503999819 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.8290028115198727 0.0 0.0 0.0 0.0 0.0 0.0 2.8290028115198727 0.0 0.0 0.0 1.2195648990857724 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
weigh 0.0 2.4723278675811402 0.0 0.0 0.0 0.0 0.0 1.3091770577754593 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.3886185994552953 0.0 2.0023242383354045 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0023242383354045 2.1358556309599273 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.0817657800152407 0.0 0.0 0.0 0.0 0.0 2.9831534913471307 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
shoot 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.25312438352614564 0.0 0.0 0.0 0.0 3.0257131057659268 1.4162751933318265 0.0 0.0 1.4162751933318265 0.0 0.0 3.0257131057659268 1.6394187446460362 0.0 0.0 0.0 0.0 0.0 0.0 0.54080645597792643 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.94627156408609092 0.0 0.62781783296755633 0.0 0.0 0.0 0.0 1.927100817097817 1.927100817097817 1.2339536365378718 0.0 0.0 1.4162751933318265 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.6394187446460362 0.0 0.0 0.0 0.0 2.3325659252059814 0.0 0.0 2.3325659252059814 0.0 0.0 0.0 0.0 2.3325659252059814 1.927100817097817 0.0 0.0 0.0 1.4162751933318265 0.0 0.0 0.0 0.0 0.0 2.3325659252059814 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
attempt 0.0 0.0 0.0 0.28768207245178085 1.5660874715604867 0.0 0.0 0.0 0.0 0.91946030663543388 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.5776883832389665 2.3545448319247568 2.0180725953035439 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.8653704556907473 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.3545448319247568 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
determine 0.0 0.0 0.0 0.0 3.7633120488967062 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
show 0.0 0.0 0.0 0.40546510810816438 0.0 3.1654750481410856 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.0817657800152407 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.7749129605751861 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
murder 0.78592891401091136 0.0 0.51399519852726949 0.28768207245178085 0.0 0.0 0.96825047080486615 0.0 0.91946030663543388 0.0 0.0 0.87294029100054127 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.78592891401091136 1.2559325432566473 0.22631312607548862 0.38046380590274703 0.0 0.78592891401091136 0.56278536269670187 0.78592891401091136 0.0 0.0 0.092781733450966075 0.0 0.0 0.7058862063373752 0.46747518289237694 0.0 0.0 2.1722232751308019 0.0 0.0 0.0 0.0 0.0 0.78592891401091136 0.0 0.0 1.0736109864626924 1.0736109864626924 0.0 0.0 0.0 0.78592891401091136 0.0 0.56278536269670187 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.56278536269670187 1.4790760945708568 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.2559325432566473 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
hear 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.2900063107871858 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.3694478524670215 0.0 0.0 3.2708355637989119 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
hope 0.0 0.0 1.7303905228517629 0.40546510810816438 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.2900063107871858 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.1654750481410856 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
circumstance 0.0 0.0 0.28347153991543739 0.75030559439989375 0.0 0.0 1.0254088846448148 0.0 1.3820838285835471 0.0 0.0 0.93009870484048984 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.84308732785086016 0.0 0.84308732785086016 1.7185560652047602 0.0 0.0 0.0 0.0 0.0 0.0 0.76304462017732388 0.93009870484048984 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.9416996165189697 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.7185560652047602 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
boasting 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.6954714188953499 0.0 2.423537703411708 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
convict 2.3770176877768154 0.0 0.0 0.49247648509779407 1.3654167760983356 0.0 0.0 0.0 0.0 0.71878961117328299 3.7633120488967062 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.3770176877768154 0.0 1.8174018998413926 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.6646997602285962 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.1538741364626057 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
in_connection 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.1166848839716534 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
die 0.0 0.0 0.0 0.0 2.1538741364626057 0.0 0.0 0.0 0.0 1.5072469715375532 0.0 0.0 0.0 0.0 0.0 0.0 2.9423314968268759 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.4531571205928664 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.1654750481410856 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
investigate 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0180725953035439 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.8653704556907473 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.8845412026790211 0.0 0.0 0.0 1.5660874715604867 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.3545448319247568 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.2708355637989119 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
death 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.9831534913471307 3.3886185994552953 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0023242383354045 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.4723278675811402 0.0 2.1358556309599273 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.6954714188953499 0.0 0.0 2.6954714188953499 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
get 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 5.4680601411351315 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
leave 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.1654750481410856 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.6763006719070761 0.0 0.0 0.0 3.1654750481410856 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.3886185994552953 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
try 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.5517694092609764 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
shooting 0.0 0.0 0.0 0.0 1.3654167760983356 0.0 0.0 0.99072332665692475 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.6646997602285962 1.3654167760983356 0.0 0.0 0.0 3.0701648683367608 0.0 0.0 0.0 1.8174018998413926 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.68387050721687 0.0 0.0 3.0701648683367608 0.0 0.0 0.0 0.0 0.0 0.0 2.6646997602285962 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.0701648683367608 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
'cowering 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.7633120488967062 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
conclude 0.0 2.9423314968268759 0.0 0.0 0.0 0.0 0.0 1.779180687021195 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.4723278675811402 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.4723278675811402 2.6058592602056629 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
ambush 0.0 2.6058592602056629 0.0 0.0 0.0 0.0 0.0 1.4427084503999819 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.5221499920798176 0.0 2.1358556309599273 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.1358556309599273 2.2693870235844495 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.1166848839716534 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
lie 0.0 0.0 1.3249254147435983 0.69314718055994529 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.9715525796686508 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.8845412026790211 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.8044984950054848 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
warrant 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.2900063107871858 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.9831534913471307 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.1166848839716534 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
marry 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.423537703411708 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.858622228701031 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
knock 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.0701648683367608 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.6763006719070761 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.0817657800152407 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
use 0.0 0.0 1.7303905228517629 1.0986122886681098 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.2099636031136494 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
guilty 2.6954714188953499 0.0 0.0 1.0986122886681098 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.4723278675811402 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.6954714188953499 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.4723278675811402 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
ruling 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.6954714188953499 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.6763006719070761 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
wait 0.0 0.0 1.5072469715375532 0.87546873735390007 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.066862759472976 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.9868200517994397 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
avoid 0.0 0.0 0.91946030663543388 0.69314718055994529 0.0 0.0 1.6613976513648114 0.0 0.0 0.0 0.0 1.5660874715604867 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.4790760945708568 0.0 1.4790760945708568 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.3990333868973206 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
attack 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.1612073216950769 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
file 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.0817657800152407 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.3694478524670215 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
emotion 0.0 0.0 0.0 0.69314718055994529 0.0 3.4531571205928664 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.3694478524670215 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
sentence 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.5968591302272404 0.0 0.0 0.0 0.0 0.0 0.0 3.2708355637989119 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.760009940032921 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.9831534913471307 0.0 0.0 2.9831534913471307 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
yard_work 0.0 0.0 0.0 0.0 2.6646997602285962 0.0 0.0 0.0 0.0 2.0180725953035439 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.1166848839716534 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
call 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.7303905228517629 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.3886185994552953 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.6954714188953499 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.7749129605751861 0.0 0.0 0.0 0.0 0.0
perform 0.0 0.0 0.63177823418365309 0.69314718055994529 0.0 0.0 1.3737155789130306 0.0 1.7303905228517629 0.0 0.0 1.2784053991087057 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.1913940221190757 0.0 1.1913940221190757 2.066862759472976 0.0 0.0 0.0 0.0 0.0 0.0 1.1113513144455396 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
suspicion 0.0 0.0 2.423537703411708 1.0986122886681098 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
kill 0.0 0.0 0.025642430613337652 0.087011376989629699 0.0 0.0 0.76757977534271504 0.0 1.1242547192814474 0.71878961117328299 0.0 0.67226959553839016 0.0 2.1538741364626057 0.0 0.0 0.0 1.9715525796686508 0.67226959553839016 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.58525821854876026 0.0 0.58525821854876026 1.4607269559026603 0.0 0.0 0.0 0.0 0.0 1.68387050721687 0.50521551087522409 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.68387050721687 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.9715525796686508 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
duty 0.0 0.0 0.71878961117328299 0.78015855754957497 0.0 0.0 1.4607269559026603 0.0 1.8174018998413926 0.0 0.0 1.3654167760983356 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.2784053991087057 0.0 1.2784053991087057 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.1983626914351695 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
case 0.0 2.760009940032921 0.0 0.0 0.0 0.0 0.0 1.5968591302272404 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.2900063107871858 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.423537703411708 0.0 0.0 1.9715525796686508 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.760009940032921 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
in_search 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.7749129605751861 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.3694478524670215 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
slaying 0.0 2.760009940032921 0.0 0.0 0.0 0.0 0.0 1.5968591302272404 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.2900063107871858 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.2900063107871858 2.423537703411708 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.2708355637989119 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
consider 0.0 0.0 1.5072469715375532 0.18232155679395479 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.066862759472976 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.4531571205928664 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.9423314968268759 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
arrest 0.0 0.0 1.4119367917332282 0.78015855754957497 0.0 0.0 1.4607269559026603 0.0 0.0 0.0 0.0 1.3654167760983356 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.2784053991087057 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.1983626914351695 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.1538741364626057 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
charge 0.0 0.0 0.0 0.18232155679395479 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.1654750481410856 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.4531571205928664 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.858622228701031 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.858622228701031 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
work 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.3770176877768154 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.6954714188953499 0.0 3.0701648683367608 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
laugh 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0023242383354045 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.0817657800152407 0.0 0.0 2.9831534913471307 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.7749129605751861 0.0
burst_out 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.0817657800152407 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.6763006719070761 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
transfer 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.858622228701031 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.3886185994552953 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
order 0.0 0.0 0.0 0.0 0.0 2.760009940032921 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.760009940032921 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.2900063107871858 0.0 0.0 2.9831534913471307 0.0 0.0 0.0 4.3694478524670215 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
ask 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0023242383354045 0.0 1.7303905228517629 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.7749129605751861 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.0817657800152407 0.0 0.0 0.0
custody 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.760009940032921 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.2900063107871858 0.0 0.0 0.0 1.9715525796686508 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.3694478524670215 0.0 0.0 2.760009940032921 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
report 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0180725953035439 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.6763006719070761 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.9831534913471307 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
interview 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.3770176877768154 0.0 3.3886185994552953 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.9831534913471307 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.0817657800152407 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
attempted 0.0 0.0 0.0 1.791759469228055 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
gun_down 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.1612073216950769 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
speak 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0180725953035439 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.6646997602285962 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.3694478524670215 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
appeal 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.6763006719070761 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.1654750481410856 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.6954714188953499 0.0 0.0 3.3886185994552953 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
look 0.0 0.0 1.17077473491634 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.8174018998413926 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.7303905228517629 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.1166848839716534 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.5221499920798176 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.6058592602056629 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
fan_out 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.3694478524670215 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.9639827443588569 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 5.0625950330269669 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
do 0.0 0.0 0.0 0.0 2.3770176877768154 0.0 0.0 0.0 0.0 1.7303905228517629 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.8290028115198727 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.1654750481410856 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
operation 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.7749129605751861 0.0 0.0 0.0 0.0 0.0 0.0 4.3694478524670215 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
seek 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.7749129605751861 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.3694478524670215 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
run 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.858622228701031 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.0817657800152407 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
review 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.2900063107871858 0.0 2.0180725953035439 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.3694478524670215 0.0 0.0 0.0
shot 0.0 0.0 0.0 0.0 2.1538741364626057 0.0 0.0 0.0 0.0 1.5072469715375532 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.1654750481410856 0.0 2.6058592602056629 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.9423314968268759 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
Gunfire 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.3694478524670215 0.0 0.0 0.0 0.0 0.0 0.0 3.9639827443588569 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 5.0625950330269669 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
put 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.6954714188953499 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.0817657800152407 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
life 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.0817657800152407 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
surprised 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 5.0625950330269669 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
recommendation 0.0 0.0 0.0 0.0 3.0701648683367608 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.858622228701031 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
trial 0.0 0.0 0.0 1.0986122886681098 0.0 3.858622228701031 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
status 0.0 0.0 0.0 0.18232155679395479 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.9423314968268759 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.4723278675811402 0.0 0.0 0.0 2.1538741364626057 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.9423314968268759 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
Charges 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.3694478524670215 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.9639827443588569 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 5.0625950330269669 0.0 0.0
accuse 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.7749129605751861 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
await 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.0817657800152407 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
occur 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.9831534913471307 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.9639827443588569 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4.3694478524670215 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
commit 0.0 0.0 2.0180725953035439 1.3862943611198906 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
execution 0.0 0.0 0.0 1.0986122886681098 0.0 3.858622228701031 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
Convicted 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 5.4680601411351315 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
Death 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 5.0625950330269669 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
uphold 0.0 0.0 0.0 0.0 2.6646997602285962 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.4531571205928664 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 5.0625950330269669 0.0 0.0 0.0 0.0 0.0 0.0
Shot 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.1612073216950769 0.0 0.0 0.0 0.0 0.0 0.0 0.0
Kills 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.1612073216950769 0.0 0.0 0.0 0.0
plague 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 5.0625950330269669 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
involve 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 5.0625950330269669 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
"this 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 6.1612073216950769
appear 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 3.7633120488967062 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
| DM | 0 | tommasoc80/EventStoryLine | ppmi_events_ecb+_test/16/same_sentence_ppmi.dm | [
"CC-BY-3.0"
] |
// first boot the server (Ctrl-B)
// then load the synthdefs from synthdefs.scd (run the entire file) (if you don't want to do that remove the @instrument line)
// then run this.
("
80 => )
@plucking => @instrument
.high mf
.low o~~ ff
,segno`
4/4
.high | _g ]] _a# ]] d ]] d# ]] _g ]] _a# ]] d ]] d# ]] _g ]] _a# ]] d ]] d# ]] _g ]] _a# ]] d ]] d# ]] |
.low | g )) a# ) ~o d ) |
.high | _f# ]] _a# ]] d ]] d# ]] _f# ]] _a# ]] d ]] d# ]] _f# ]] _a# ]] d ]] d# ]] _f# ]] _a# ]] d ]] d# ]] |
.low | c# ) o~ f# )). |
.high | _f ]] _g# ]] d ]] d# ]] _f ]] _g# ]] d ]] d# ]] _f ]] _g# ]] d ]] d# ]] _f ]] _g# ]] d ]] d# ]] |
.low | f )) f ]. g# ]. ~o c# ] |
.high | _e ]] _g ]] d ]] d# ]] _e ]] _g ]] d ]] d# ]] _e ]] _g ]] d ]] d# ]] _e ]] _g ]] d ]] d# ]] |
.low | c ) o~ e )). |
.high | _d# ]] _g ]] c ]] d ]] _d# ]] _g ]] c ]] d ]] _d# ]] _g ]] c ]] d ]] _d# ]] _g ]] c ]] d ]] |
.low | _d# ]] _d ]] _d# ). g ]. ~o d# ]. d ] o~ |
.high | _d ]] _g ]] c ]] d ]] _d ]] _g ]] c ]] d ]] _d ]] _g ]] c ]] d ]] _d ]] _g ]] c ]] d ]] |
.low | _d ]] _c# ]] _d ). g ]. ~o d ]. c# ] o~ |
5/4
.low ~o
.high | _c ]] _f# ]] _a ]] c ]] _f# ]] _a ]] c ]] d# ]] _a ]] c ]] d# ]] c ]] d# ]] f# ]] d# ]] f# ]] a ]] _f# ]] a ]] ~o c ]] | o~
.low | _d ]] _f# ]] _a ]] _f# ]] _a ]] c ]] _a ]] c ]] d# ]] c ]] d# ]] ~o f# ]] a ]] f# ]] d# ]] c ]] d# ]] c ]] _a ]] _f# ]] | o~~
D.S.
".skoar.play;
)
| SuperCollider | 4 | sofakid/Skoarcery | SuperCollider/examples/dungeontimes.scd | [
"Artistic-2.0"
] |
<?Lassoscript
// Last modified 8/31/09 by ECL, Landmann InterActive
/*
Tagdocs;
{Tagname= OutputAuthor }
{Description= Outputs the already-built $vAuthor }
{Author= Eric Landmann }
{AuthorEmail= support@iterate.ws }
{ModifiedBy= }
{ModifiedByEmail= }
{Date= 7/6/09 }
{Usage= OutputAuthor }
{ExpectedResults= HTML for the Author }
{Dependencies= $vAuthor must be defined, otherwise a comment will be output }
{DevelNotes= $vAuthor is defined in build_detail.inc
This tag is merely a convenience to make it less awkward for a designer }
{ChangeNotes= 8/31/09
Integrated into itPage codebase. }
/Tagdocs;
*/
If: !(Lasso_TagExists:'OutputAuthor');
Define_Tag:'OutputAuthor',
-Description='Outputs the author (in $vAuthor)';
Local('Result') = null;
// Check if var is defined
If: (Var:'vAuthor') != '';
#Result += '<!-- OutputAuthor -->\n';
#Result += '<div class="ContentPanelAuthor">'($vAuthor)'</div>\n';
Return: (Encode_Smart:(#Result));
Else;
// Output a comment that variable is not defined
#Result = '<!-- OutputAuthor: Author is undefined -->\n';
Return: (Encode_Smart:(#Result));
/If;
/Define_Tag;
Log_Critical: 'Custom Tag Loaded - OutputAuthor';
/If;
?> | Lasso | 4 | subethaedit/SubEthaEd | Documentation/ModeDevelopment/Reference Files/LassoScript-HTML/itpage/LassoStartup/OutputAuthor.lasso | [
"MIT"
] |
extensions [ gis ]
globals [landuse
green-percent
greenroof-percent
init-green-percent
]
patches-own[land]
breed [bugs bug] ;; turtles representing our species of interest
bugs-own[steps green-steps gray-steps]
breed [targets target]
to load-gis
ca
set landuse gis:load-dataset asc-filename
gis:set-world-envelope-ds gis:envelope-of landuse
gis:apply-raster landuse land
end
to data-out
file-open data-filename
file-print "asc-filename data-filename data-header vision-width vision-distance init-green-proportion green-proportion greenroof-proportion gray-steps green-steps steps paint-radius"
file-close
end
to setup
ask patches [
ifelse land = 0 [ set pcolor cyan ] [ ;; park
ifelse land = 1 [ set pcolor green ] [ ;; trees
ifelse land = 2 [set pcolor yellow][ ;; grass
ifelse land = 3 [set pcolor gray][ ;; road
ifelse land = 4 [set pcolor blue][ ;; water
ifelse land = 5 [set pcolor black][ ;; roofs
set pcolor brown
]]]]]]
]
set-default-shape bugs "butterfly"
clear-turtles
clear-drawing
while[count bugs < bug-number] ;; until we have 100 bugs
[
create-bugs 1 ;; create the insects
[
set color blue
set size 10
setxy max-pxcor random-ycor ;; scatter bugs along right edge
set steps 0
set green-steps 0
set gray-steps 0
]
]
calculate-percent-roofs-green
calculate-percent-green
set init-green-percent green-percent
reset-ticks
end
;; This is where the functions start
to go
calculate-percent-roofs-green ;; make sure this number is up to date before writing header to file
random-greenroof
data-out
while [count bugs > 0]
[ move-bug ]
stop
end
to move-bug
ask bugs [
count-steps
if pxcor = min-pxcor [
file-open data-filename
file-type asc-filename
file-type " "
file-type data-filename
file-type " "
file-type data-header
file-write vision-width
file-write vision-distance
file-write init-green-percent
file-write green-percent
file-write greenroof-percent
file-write gray-steps
file-write green-steps
file-write steps
file-write paint-radius ;; added this but only for analyzing blobs
file-type "\n"
file-close
]
if pxcor = min-pxcor [die]
set heading 270
pen-down
let green_target nobody
let perceived_patches patches in-cone vision-distance vision-width
let patch-under-me patch-here
set green_target perceived_patches with [ (pcolor = green and self != patch-under-me) or (pcolor = cyan and self != patch-under-me)]
ifelse count green_target != 0 [
let target min-one-of green_target[ distance myself ]
let target_heading towards target
move-to patch-at-heading-and-distance target_heading 1 ]
[ fd 1]
]
end
to draw-greenroof ;; This prodcedure allows you to color certain black roofs green
if mouse-down? [
ask patch round mouse-xcor round mouse-ycor
[
set pcolor green
ask patches in-radius paint-radius [if pcolor = black [set pcolor green] ]
calculate-percent-roofs-green
]
]
end
to calculate-percent-green ;; This calculates green percentage of all patches at setup, before any roof painting
let all-patches count patches
let green-patches count patches with [pcolor = green]
set green-percent green-patches / all-patches
end
to calculate-percent-roofs-green ;; This procedure calculates the % greenroof to display in the monitor window on button push
let roofs patches with [land = 5]
let roof-number count roofs
let roofs-number count patches with [land = 5]
let greenroofs-number count roofs with [pcolor = green]
if roof-number = 0 [set roofs-number 1] ;; added this line of code to present divide by 0 error
set greenroof-percent greenroofs-number / roofs-number
end
to count-steps
set steps steps + 1
ifelse pcolor = green [set green-steps green-steps + 1][set gray-steps gray-steps + 1] ;;Does not currently account for CYAN Park squares
end
to Random-Greenroof
let radius paint-radius
while[ greenroof-percent < Greenroof_Target_Proportion]
[
ask one-of patches with [ pcolor = black ] [
set pcolor green
ask patches in-radius paint-radius [if pcolor = black [set pcolor green] ]
]
calculate-percent-roofs-green
calculate-percent-green
]
end
to paint-guide
set-default-shape targets "target"
ask one-of patches with [ pcolor = black ] [
sprout-targets 1
[
set breed targets
set color white
set size 20
]]
end
to clear-targets
ask targets
[die]
end
;; 0 = Parks
;; 1 = Tree Canopy
;; 2 = Grass/Srhub/Bare Soil
;; 3 = Urban Matrix (Roads, Railroads, Parking Lots, etc.)
;; 4 = Water
;; 5 = Buildings
@#$#@#$#@
GRAPHICS-WINDOW
205
10
1216
1042
500
500
1.0
1
10
1
1
1
0
0
0
1
-500
500
-500
500
0
0
1
ticks
30.0
BUTTON
-1
69
196
102
NIL
load-GIS
NIL
1
T
OBSERVER
NIL
NIL
NIL
NIL
1
BUTTON
115
238
181
271
NIL
setup
NIL
1
T
OBSERVER
NIL
NIL
NIL
NIL
1
BUTTON
35
584
154
617
Run the Model
go
NIL
1
T
OBSERVER
NIL
NIL
NIL
NIL
1
SLIDER
10
290
182
323
vision-width
vision-width
1
179
120
1
1
NIL
HORIZONTAL
SLIDER
10
324
182
357
vision-distance
vision-distance
0
100
20
1
1
NIL
HORIZONTAL
MONITOR
19
489
174
534
prop roofs green
greenroof-percent
5
1
11
BUTTON
8
633
184
666
Draw greenroofs manually
draw-greenroof
T
1
T
OBSERVER
NIL
NIL
NIL
NIL
1
SLIDER
19
359
174
392
paint-radius
paint-radius
1
104
15
1
1
NIL
HORIZONTAL
INPUTBOX
-1
10
196
70
asc-filename
AOI_rand_185.asc
1
0
String
INPUTBOX
-2
106
199
166
data-filename
AOI_115to185
1
0
String
INPUTBOX
-2
166
195
226
data-header
BSpace
1
0
String
BUTTON
8
667
107
700
click for guide
paint-guide
NIL
1
T
OBSERVER
NIL
NIL
NIL
NIL
1
BUTTON
108
667
184
700
clear guides
clear-targets
NIL
1
T
OBSERVER
NIL
NIL
NIL
NIL
1
INPUTBOX
19
394
174
454
Greenroof_Target_Proportion
0.5
1
0
Number
BUTTON
19
455
174
488
Set Random Greenroofs
Random-Greenroof
NIL
1
T
OBSERVER
NIL
NIL
NIL
NIL
1
INPUTBOX
9
228
94
288
bug-number
200
1
0
Number
MONITOR
19
534
174
579
Prop patches green
green-percent
5
1
11
@#$#@#$#@
## WHAT IS IT?
This model explores how does the geometry of urban environments affect the movement patterns of hypothetical organisms.
WHYYYYY????
## HOW IT WORKS
There are two main components to this model. The first component focuses on the movement and behavior of hypothetical organisms. Butterflies represent organisms migrating through an urban area. Movement rules for the butterflies were coded as follows; the butterflies are to go west unless they see a green patch. The vision width and the vision distance can be varfied depending on the experiment. If two patches are equidistant, the butterflies choose at random. When they spot a favorable patch in their cone of vision they are to change their heading to the closest green patch. Each butterfly records WRITES TO A FILEthe number of steps it is taking on favorable (green) vs unfavorable (every other color) as it moves through the area of interest. The data file is created and saved as a text file which can be used for analysis.
The model was one of simple favorability designation. Tree and shrub cover in the model represented favorable habitat and were coded green. All other land cover types were assumed to be unfavorable habitat. We started with a landuse and building footprint map of Philadelphia at a 1 foot scale.
The second component revolves around the manipulation of these areas of interest (AOI). You are able to set the paint brush size and overall percentage of green to add to the buildings which are represented by black in the AOI in order to montior how they change the number of steps these organisms take in favorable vs. unfavorable habitats.
## HOW TO USE IT
1) Load GIS
- type the name of your GIS date file into the "asc-filename" box in the top. All GIS file names should be in "filename.asc" format. Then hit load-GIS button.
2) Create data file name.
- Type data file name in to the "data-filename" box. This is the name of the file where all of the step data will be sent for each run.
3) Create data header
-Type the data header name into the "data-header" box. This is important to help differentiate runs from one another for analysis.
4) Number of bugs
-Change the number of bugs you are running through the simulaiton. Type the desired number of bug into the "bug number" box.
5) Hit setup
- Designated GIS file will load on the screen.
6) Change variables and Set Random Greenroofs
- Here you can change vision width, vision distance, paint radius and target green roof percent with the sliders and boxes depending on what you are trying to study.
7) Run the model
- The moment you have been waiting for. Hit the run the model button to start the simulation. Once it ends ss
* Data file will be save din the same folder as the this netlogo model. GIS AOIs need to be in the same folder as the netlogo model
## THINGS TO NOTICE
(suggested things for the user to notice while running the model)
## THINGS TO TRYs
(suggested things for the user to try to do (move sliders, switches, etc.) with the model)
## EXTENDING THE MODEL
(suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.)
Making different patch categories on the landscape have different behaviors, e.g. animals don't move through buildings.
Adding building height to footprint.
## NETLOGO FEATURES
(interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features)
Takes in GIS file in .asc format to create landscape.
Writes to file for each turtle
## RELATED MODELS
(models in the NetLogo Models Library and elsewhere which are of related interest)
## CREDITS AND REFERENCES
(a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links)
GITHUB ADDRESS FOR THE MODEL
@#$#@#$#@
default
true
0
Polygon -7500403 true true 150 5 40 250 150 205 260 250
airplane
true
0
Polygon -7500403 true true 150 0 135 15 120 60 120 105 15 165 15 195 120 180 135 240 105 270 120 285 150 270 180 285 210 270 165 240 180 180 285 195 285 165 180 105 180 60 165 15
arrow
true
0
Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150
box
false
0
Polygon -7500403 true true 150 285 285 225 285 75 150 135
Polygon -7500403 true true 150 135 15 75 150 15 285 75
Polygon -7500403 true true 15 75 15 225 150 285 150 135
Line -16777216 false 150 285 150 135
Line -16777216 false 150 135 15 75
Line -16777216 false 150 135 285 75
bug
true
0
Circle -7500403 true true 96 182 108
Circle -7500403 true true 110 127 80
Circle -7500403 true true 110 75 80
Line -7500403 true 150 100 80 30
Line -7500403 true 150 100 220 30
butterfly
true
0
Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240
Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240
Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163
Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165
Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225
Circle -16777216 true false 135 90 30
Line -16777216 false 150 105 195 60
Line -16777216 false 150 105 105 60
car
false
0
Polygon -7500403 true true 300 180 279 164 261 144 240 135 226 132 213 106 203 84 185 63 159 50 135 50 75 60 0 150 0 165 0 225 300 225 300 180
Circle -16777216 true false 180 180 90
Circle -16777216 true false 30 180 90
Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89
Circle -7500403 true true 47 195 58
Circle -7500403 true true 195 195 58
circle
false
0
Circle -7500403 true true 0 0 300
circle 2
false
0
Circle -7500403 true true 0 0 300
Circle -16777216 true false 30 30 240
cow
false
0
Polygon -7500403 true true 200 193 197 249 179 249 177 196 166 187 140 189 93 191 78 179 72 211 49 209 48 181 37 149 25 120 25 89 45 72 103 84 179 75 198 76 252 64 272 81 293 103 285 121 255 121 242 118 224 167
Polygon -7500403 true true 73 210 86 251 62 249 48 208
Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123
cylinder
false
0
Circle -7500403 true true 0 0 300
dot
false
0
Circle -7500403 true true 90 90 120
face happy
false
0
Circle -7500403 true true 8 8 285
Circle -16777216 true false 60 75 60
Circle -16777216 true false 180 75 60
Polygon -16777216 true false 150 255 90 239 62 213 47 191 67 179 90 203 109 218 150 225 192 218 210 203 227 181 251 194 236 217 212 240
face neutral
false
0
Circle -7500403 true true 8 7 285
Circle -16777216 true false 60 75 60
Circle -16777216 true false 180 75 60
Rectangle -16777216 true false 60 195 240 225
face sad
false
0
Circle -7500403 true true 8 8 285
Circle -16777216 true false 60 75 60
Circle -16777216 true false 180 75 60
Polygon -16777216 true false 150 168 90 184 62 210 47 232 67 244 90 220 109 205 150 198 192 205 210 220 227 242 251 229 236 206 212 183
fish
false
0
Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166
Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165
Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60
Polygon -7500403 true true 30 136 151 77 226 81 280 119 292 146 292 160 287 170 270 195 195 210 151 212 30 166
Circle -16777216 true false 215 106 30
flag
false
0
Rectangle -7500403 true true 60 15 75 300
Polygon -7500403 true true 90 150 270 90 90 30
Line -7500403 true 75 135 90 135
Line -7500403 true 75 45 90 45
flower
false
0
Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135
Circle -7500403 true true 85 132 38
Circle -7500403 true true 130 147 38
Circle -7500403 true true 192 85 38
Circle -7500403 true true 85 40 38
Circle -7500403 true true 177 40 38
Circle -7500403 true true 177 132 38
Circle -7500403 true true 70 85 38
Circle -7500403 true true 130 25 38
Circle -7500403 true true 96 51 108
Circle -16777216 true false 113 68 74
Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218
Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240
house
false
0
Rectangle -7500403 true true 45 120 255 285
Rectangle -16777216 true false 120 210 180 285
Polygon -7500403 true true 15 120 150 15 285 120
Line -16777216 false 30 120 270 120
leaf
false
0
Polygon -7500403 true true 150 210 135 195 120 210 60 210 30 195 60 180 60 165 15 135 30 120 15 105 40 104 45 90 60 90 90 105 105 120 120 120 105 60 120 60 135 30 150 15 165 30 180 60 195 60 180 120 195 120 210 105 240 90 255 90 263 104 285 105 270 120 285 135 240 165 240 180 270 195 240 210 180 210 165 195
Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195
line
true
0
Line -7500403 true 150 0 150 300
line half
true
0
Line -7500403 true 150 0 150 150
pentagon
false
0
Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120
person
false
0
Circle -7500403 true true 110 5 80
Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90
Rectangle -7500403 true true 127 79 172 94
Polygon -7500403 true true 195 90 240 150 225 180 165 105
Polygon -7500403 true true 105 90 60 150 75 180 135 105
plant
false
0
Rectangle -7500403 true true 135 90 165 300
Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285
Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285
Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210
Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135
Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135
Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60
Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90
sheep
false
15
Circle -1 true true 203 65 88
Circle -1 true true 70 65 162
Circle -1 true true 150 105 120
Polygon -7500403 true false 218 120 240 165 255 165 278 120
Circle -7500403 true false 214 72 67
Rectangle -1 true true 164 223 179 298
Polygon -1 true true 45 285 30 285 30 240 15 195 45 210
Circle -1 true true 3 83 150
Rectangle -1 true true 65 221 80 296
Polygon -1 true true 195 285 210 285 210 240 240 210 195 210
Polygon -7500403 true false 276 85 285 105 302 99 294 83
Polygon -7500403 true false 219 85 210 105 193 99 201 83
square
false
0
Rectangle -7500403 true true 30 30 270 270
square 2
false
0
Rectangle -7500403 true true 30 30 270 270
Rectangle -16777216 true false 60 60 240 240
star
false
0
Polygon -7500403 true true 151 1 185 108 298 108 207 175 242 282 151 216 59 282 94 175 3 108 116 108
target
false
0
Circle -7500403 true true 0 0 300
Circle -16777216 true false 30 30 240
Circle -7500403 true true 60 60 180
Circle -16777216 true false 90 90 120
Circle -7500403 true true 120 120 60
tree
false
0
Circle -7500403 true true 118 3 94
Rectangle -6459832 true false 120 195 180 300
Circle -7500403 true true 65 21 108
Circle -7500403 true true 116 41 127
Circle -7500403 true true 45 90 120
Circle -7500403 true true 104 74 152
triangle
false
0
Polygon -7500403 true true 150 30 15 255 285 255
triangle 2
false
0
Polygon -7500403 true true 150 30 15 255 285 255
Polygon -16777216 true false 151 99 225 223 75 224
truck
false
0
Rectangle -7500403 true true 4 45 195 187
Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194
Rectangle -1 true false 195 60 195 105
Polygon -16777216 true false 238 112 252 141 219 141 218 112
Circle -16777216 true false 234 174 42
Rectangle -7500403 true true 181 185 214 194
Circle -16777216 true false 144 174 42
Circle -16777216 true false 24 174 42
Circle -7500403 false true 24 174 42
Circle -7500403 false true 144 174 42
Circle -7500403 false true 234 174 42
turtle
true
0
Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210
Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105
Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105
Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87
Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210
Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99
wheel
false
0
Circle -7500403 true true 3 3 294
Circle -16777216 true false 30 30 240
Line -7500403 true 150 285 150 15
Line -7500403 true 15 150 285 150
Circle -7500403 true true 120 120 60
Line -7500403 true 216 40 79 269
Line -7500403 true 40 84 269 221
Line -7500403 true 40 216 269 79
Line -7500403 true 84 40 221 269
wolf
false
0
Polygon -16777216 true false 253 133 245 131 245 133
Polygon -7500403 true true 2 194 13 197 30 191 38 193 38 205 20 226 20 257 27 265 38 266 40 260 31 253 31 230 60 206 68 198 75 209 66 228 65 243 82 261 84 268 100 267 103 261 77 239 79 231 100 207 98 196 119 201 143 202 160 195 166 210 172 213 173 238 167 251 160 248 154 265 169 264 178 247 186 240 198 260 200 271 217 271 219 262 207 258 195 230 192 198 210 184 227 164 242 144 259 145 284 151 277 141 293 140 299 134 297 127 273 119 270 105
Polygon -7500403 true true -1 195 14 180 36 166 40 153 53 140 82 131 134 133 159 126 188 115 227 108 236 102 238 98 268 86 269 92 281 87 269 103 269 113
x
false
0
Polygon -7500403 true true 270 75 225 30 30 225 75 270
Polygon -7500403 true true 30 75 75 30 270 225 225 270
@#$#@#$#@
NetLogo 5.3.1
@#$#@#$#@
@#$#@#$#@
@#$#@#$#@
<experiments>
<experiment name="blobs" repetitions="5" runMetricsEveryStep="true">
<setup>load-GIS
setup
Random-Greenroof</setup>
<go>go</go>
<enumeratedValueSet variable="Greenroof_Target_Proportion">
<value value="0.11"/>
<value value="0.17"/>
</enumeratedValueSet>
<enumeratedValueSet variable="bug-number">
<value value="100"/>
</enumeratedValueSet>
<enumeratedValueSet variable="data-header">
<value value=""Blob""/>
</enumeratedValueSet>
<enumeratedValueSet variable="vision-distance">
<value value="10"/>
</enumeratedValueSet>
<enumeratedValueSet variable="asc-filename">
<value value=""Black.asc""/>
</enumeratedValueSet>
<enumeratedValueSet variable="vision-width">
<value value="120"/>
</enumeratedValueSet>
<enumeratedValueSet variable="paint-radius">
<value value="104"/>
<value value="84"/>
<value value="56"/>
<value value="28"/>
<value value="20"/>
<value value="14"/>
<value value="10"/>
<value value="7"/>
</enumeratedValueSet>
<enumeratedValueSet variable="data-filename">
<value value=""rvss_blobs""/>
</enumeratedValueSet>
</experiment>
<experiment name="blobs2" repetitions="5" runMetricsEveryStep="true">
<setup>setup
Random-Greenroof</setup>
<go>go</go>
<enumeratedValueSet variable="Greenroof_Target_Proportion">
<value value="0.11"/>
</enumeratedValueSet>
<enumeratedValueSet variable="bug-number">
<value value="100"/>
</enumeratedValueSet>
<enumeratedValueSet variable="data-header">
<value value=""Blob""/>
</enumeratedValueSet>
<enumeratedValueSet variable="vision-distance">
<value value="10"/>
</enumeratedValueSet>
<enumeratedValueSet variable="asc-filename">
<value value=""Black.asc""/>
</enumeratedValueSet>
<enumeratedValueSet variable="vision-width">
<value value="120"/>
</enumeratedValueSet>
<enumeratedValueSet variable="paint-radius">
<value value="10"/>
<value value="7"/>
</enumeratedValueSet>
<enumeratedValueSet variable="data-filename">
<value value=""rvss_blobs""/>
</enumeratedValueSet>
</experiment>
<experiment name="blobs17" repetitions="5" runMetricsEveryStep="true">
<setup>setup
Random-Greenroof</setup>
<go>go</go>
<enumeratedValueSet variable="Greenroof_Target_Proportion">
<value value="0.17"/>
</enumeratedValueSet>
<enumeratedValueSet variable="bug-number">
<value value="100"/>
</enumeratedValueSet>
<enumeratedValueSet variable="data-header">
<value value=""Blob""/>
</enumeratedValueSet>
<enumeratedValueSet variable="vision-distance">
<value value="10"/>
</enumeratedValueSet>
<enumeratedValueSet variable="asc-filename">
<value value=""Black.asc""/>
</enumeratedValueSet>
<enumeratedValueSet variable="vision-width">
<value value="120"/>
</enumeratedValueSet>
<enumeratedValueSet variable="paint-radius">
<value value="104"/>
<value value="56"/>
<value value="28"/>
<value value="20"/>
<value value="14"/>
<value value="10"/>
<value value="7"/>
</enumeratedValueSet>
<enumeratedValueSet variable="data-filename">
<value value=""rvss_blobs""/>
</enumeratedValueSet>
</experiment>
<experiment name="Sweep_greenroof_percent_vision_distance_" repetitions="1" runMetricsEveryStep="true">
<setup>load-GIS
setup</setup>
<go>go</go>
<enumeratedValueSet variable="vision-width">
<value value="120"/>
</enumeratedValueSet>
<enumeratedValueSet variable="vision-distance">
<value value="1"/>
<value value="10"/>
<value value="20"/>
</enumeratedValueSet>
<enumeratedValueSet variable="Greenroof_Target_Proportion">
<value value="0"/>
<value value="0.05"/>
<value value="0.1"/>
<value value="0.15"/>
<value value="0.2"/>
<value value="0.25"/>
<value value="0.3"/>
<value value="0.35"/>
<value value="0.4"/>
<value value="0.45"/>
<value value="0.5"/>
</enumeratedValueSet>
<enumeratedValueSet variable="paint-radius">
<value value="15"/>
</enumeratedValueSet>
<enumeratedValueSet variable="data-filename">
<value value=""AOI_115to185""/>
</enumeratedValueSet>
<enumeratedValueSet variable="bug-number">
<value value="200"/>
</enumeratedValueSet>
<enumeratedValueSet variable="asc-filename">
<value value=""AOI_rand_115.asc""/>
<value value=""AOI_rand_125.asc""/>
<value value=""AOI_rand_127.asc""/>
<value value=""AOI_rand_129.asc""/>
<value value=""AOI_rand_130.asc""/>
<value value=""AOI_rand_153.asc""/>
<value value=""AOI_rand_156.asc""/>
<value value=""AOI_rand_172.asc""/>
<value value=""AOI_rand_173.asc""/>
<value value=""AOI_rand_185.asc""/>
</enumeratedValueSet>
<enumeratedValueSet variable="data-header">
<value value=""BSpace""/>
</enumeratedValueSet>
</experiment>
</experiments>
@#$#@#$#@
@#$#@#$#@
default
0.0
-0.2 0 0.0 1.0
0.0 1 1.0 0.0
0.2 0 0.0 1.0
link direction
true
0
Line -7500403 true 150 150 90 180
Line -7500403 true 150 150 210 180
@#$#@#$#@
0
@#$#@#$#@
| NetLogo | 5 | ajnavarro/language-dataset | data/github.com/klemensj/Pollinators/e06b2e51070c914c6684015f23209d755cc8ed1f/Greenroofs.nlogo | [
"MIT"
] |
%%
%% %CopyrightBegin%
%%
%% Copyright Ericsson AB 2021. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% http://www.apache.org/licenses/LICENSE-2.0
%%
%% Unless required by applicable law or agreed to in writing, software
%% distributed under the License is distributed on an "AS IS" BASIS,
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
%% See the License for the specific language governing permissions and
%% limitations under the License.
%%
%% %CopyrightEnd%
%%
-module(column_pt).
-export([parse_transform/2, parse_transform_info/0, format_error/1]).
parse_transform_info() ->
%% Will default to {error_location,column}.
#{}.
parse_transform(Forms, Options) ->
HasColumn =
case proplists:get_value(error_location, Options, column) of
column ->
true;
line ->
false
end,
AddColumns = proplists:get_value(add_columns, Options, false),
AddError = proplists:get_value(add_error, Options, false),
{eof,LastLocation} = lists:keyfind(eof, 1, Forms),
LastLine = erl_anno:line(erl_anno:new(LastLocation)),
ExtraFormsAnno =
if HasColumn ->
erl_anno:new({LastLine,1});
not HasColumn ->
erl_anno:new(LastLine)
end,
ExtraForms = [{warning,{ExtraFormsAnno,?MODULE,"injected warning"}}] ++
[{error,{ExtraFormsAnno,?MODULE,"injected error"}} || AddError],
lists:map(
fun
({eof,Location}) ->
Anno = erl_anno:new(Location),
HasColumn = erl_anno:column(Anno) =/= undefined,
if AddColumns ->
{eof,{erl_anno:line(Anno), 1}};
not AddColumns ->
{eof,Location}
end;
({ErrorOrWarning,{Location,Module,Text}})
when ErrorOrWarning =:= error;
ErrorOrWarning =:= warning ->
Anno = erl_anno:new(Location),
HasColumn = erl_anno:column(Anno) =/= undefined,
if AddColumns ->
{ErrorOrWarning,{{erl_anno:line(Anno), 1}, Module, Text}};
not AddColumns ->
{ErrorOrWarning, {Location, Module, Text}}
end;
(Form) ->
erl_parse:map_anno(
fun(Anno) ->
HasColumn = erl_anno:column(Anno) =/= undefined,
if AddColumns ->
erl_anno:set_location({erl_anno:line(Anno), 1}, Anno);
not AddColumns ->
Anno
end
end, Form)
end, Forms ++ ExtraForms).
format_error(Error) ->
Error.
| Erlang | 4 | jjhoo/otp | lib/compiler/test/compile_SUITE_data/column_pt.erl | [
"Apache-2.0"
] |
#!/bin/bash
# Copyright 2021 The Kubernetes Authors All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Takes a gopogh summary in a GCS bucket, extracts test data as a CSV and
# appends to the existing CSV data in the flake rate GCS bucket.
# Example usage: ./upload_tests.sh gs://some-bucket/gopogh_summary.json
set -eu -o pipefail
if [ "$#" -ne 1 ]; then
echo "Wrong number of arguments. Usage: upload_tests.sh <gopogh_summary.json>" 1>&2
exit 1
fi
TMP_DATA=$(mktemp)
# Use the gopogh summary, process it, optimize the data, remove the header, and store.
gsutil cat "$1" \
| ./test-flake-chart/process_data.sh \
| ./test-flake-chart/optimize_data.sh \
| sed "1d" > $TMP_DATA
GCS_TMP="gs://minikube-flake-rate/$(basename "$TMP_DATA")"
# Copy data to append to GCS
gsutil cp $TMP_DATA $GCS_TMP
# Append data to existing data.
gsutil compose gs://minikube-flake-rate/data.csv $GCS_TMP gs://minikube-flake-rate/data.csv
# Clear all the temp stuff.
rm $TMP_DATA
gsutil rm $GCS_TMP
| Shell | 4 | skyplaying/minikube | hack/jenkins/test-flake-chart/upload_tests.sh | [
"Apache-2.0"
] |
0 reg32_t "dword"
1 code_t "proc*"
2 ptr(reg32_t) "dword[]"
3 num32_t "int"
4 uint32_t "unsigned int"
5 ptr(uint32_t) "unsigned int[]"
6 ptr(num32_t) "int*"
4 uint32_t "size_t"
7 ptr(TOP) "void*"
8 ptr(struct(0:num32_t,4:ptr(num8_t),8:ptr(num8_t),12:ptr(num8_t),16:ptr(num8_t),20:ptr(num8_t),24:ptr(num8_t),28:ptr(num8_t),32:ptr(num8_t),36:ptr(num8_t),40:ptr(num8_t),44:ptr(num8_t),48:ptr(struct(0:ptr(TOP),4:ptr(struct(0:num32_t,4:ptr(reg8_t),8:ptr(reg8_t),12:ptr(reg8_t),16:ptr(reg8_t),20:ptr(reg8_t),24:ptr(reg8_t),28:ptr(reg8_t),32:ptr(reg8_t),36:ptr(reg8_t),40:ptr(reg8_t),44:ptr(reg8_t),48:ptr(TOP),52:ptr(TOP),56:num32_t,60:num32_t,64:num32_t,68:uint16_t,70:int8_t,71:array(num8_t,1),72:ptr(TOP),76:num64_t,84:ptr(TOP),88:ptr(TOP),92:ptr(TOP),96:ptr(TOP),100:uint32_t,104:num32_t,108:array(num8_t,40))),8:num32_t)),52:ptr(struct(0:num32_t,4:ptr(num8_t),8:ptr(num8_t),12:ptr(num8_t),16:ptr(num8_t),20:ptr(num8_t),24:ptr(num8_t),28:ptr(num8_t),32:ptr(num8_t),36:ptr(num8_t),40:ptr(num8_t),44:ptr(num8_t),48:ptr(struct(0:ptr(TOP),4:ptr(TOP),8:num32_t)),52:ptr(TOP),56:num32_t,60:num32_t,64:num32_t,68:uint16_t,70:int8_t,71:array(num8_t,1),72:ptr(TOP),76:num64_t,84:ptr(TOP),88:ptr(TOP),92:ptr(TOP),96:ptr(TOP),100:uint32_t,104:num32_t,108:array(num8_t,40))),56:num32_t,60:num32_t,64:num32_t,68:uint16_t,70:int8_t,71:array(num8_t,1),72:ptr(TOP),76:num64_t,84:ptr(TOP),88:ptr(TOP),92:ptr(TOP),96:ptr(TOP),100:uint32_t,104:num32_t,108:array(num8_t,40))) "FILE*"
9 ptr(num8_t) "char*"
1 code_t "(_In_ void*,_In_ void* -?-> int)*"
2 ptr(reg32_t) "dword*"
10 ptr(struct(0:ptr(TOP),12:reg32_t,16:reg32_t,20:ptr(struct(8:float32_t,12:float32_t)))) "Struct_25*"
11 num8_t "char"
12 ptr(array(reg8_t,24)) "unknown_192*"
13 ptr(ptr(num8_t)) "char**"
14 ptr(array(reg8_t,16)) "unknown_128*"
15 ptr(array(reg8_t,56)) "unknown_448*"
16 ptr(array(reg8_t,173)) "unknown_1384*"
17 ptr(struct(0:reg64_t,8:reg32_t)) "StructFrag_5*"
18 ptr(struct(0:num32_t,4:ptr(num8_t),8:ptr(num8_t),12:ptr(num8_t),16:ptr(num8_t),20:ptr(num8_t),24:ptr(num8_t),28:ptr(num8_t),32:ptr(num8_t),36:ptr(num8_t),40:ptr(num8_t),44:ptr(num8_t),48:ptr(struct(0:ptr(TOP),4:ptr(TOP),8:num32_t)),52:ptr(TOP),56:num32_t,60:num32_t,64:num32_t,68:uint16_t,70:int8_t,71:array(num8_t,1),72:ptr(TOP),76:num64_t,84:ptr(TOP),88:ptr(TOP),92:ptr(TOP),96:ptr(TOP),100:uint32_t,104:num32_t,108:array(num8_t,40))) "_IO_FILE*"
19 ptr(array(reg8_t,28)) "unknown_224*"
20 union(ptr(struct(0:num32_t,4:ptr(num8_t),8:ptr(num8_t),12:ptr(num8_t),16:ptr(num8_t),20:ptr(num8_t),24:ptr(num8_t),28:ptr(num8_t),32:ptr(num8_t),36:ptr(num8_t),40:ptr(num8_t),44:ptr(num8_t),48:ptr(struct(0:ptr(TOP),4:ptr(struct(0:num32_t,4:ptr(reg8_t),8:ptr(reg8_t),12:ptr(reg8_t),16:ptr(reg8_t),20:ptr(reg8_t),24:ptr(reg8_t),28:ptr(reg8_t),32:ptr(reg8_t),36:ptr(reg8_t),40:ptr(reg8_t),44:ptr(reg8_t),48:ptr(TOP),52:ptr(TOP),56:num32_t,60:num32_t,64:num32_t,68:uint16_t,70:int8_t,71:array(reg8_t,1),72:ptr(TOP),76:num64_t,84:ptr(TOP),88:ptr(TOP),92:ptr(TOP),96:ptr(TOP),100:uint32_t,104:num32_t,108:array(reg8_t,40))),8:num32_t)),52:ptr(struct(0:num32_t,4:ptr(num8_t),8:ptr(num8_t),12:ptr(num8_t),16:ptr(num8_t),20:ptr(num8_t),24:ptr(num8_t),28:ptr(num8_t),32:ptr(num8_t),36:ptr(num8_t),40:ptr(num8_t),44:ptr(num8_t),48:ptr(struct(0:ptr(TOP),4:ptr(TOP),8:num32_t)),52:ptr(TOP),56:num32_t,60:num32_t,64:num32_t,68:uint16_t,70:int8_t,71:array(num8_t,1),72:ptr(TOP),76:num64_t,84:ptr(TOP),88:ptr(TOP),92:ptr(TOP),96:ptr(TOP),100:uint32_t,104:num32_t,108:array(num8_t,40))),56:num32_t,60:num32_t,64:num32_t,68:uint16_t,70:int8_t,71:array(num8_t,1),72:ptr(TOP),76:num64_t,84:ptr(TOP),88:ptr(TOP),92:ptr(TOP),96:ptr(TOP),100:uint32_t,104:num32_t,108:array(num8_t,40))),ptr(struct(0:num32_t,4:ptr(num8_t),8:ptr(num8_t),12:ptr(num8_t),16:ptr(num8_t),20:ptr(num8_t),24:ptr(num8_t),28:ptr(num8_t),32:ptr(num8_t),36:ptr(num8_t),40:ptr(num8_t),44:ptr(num8_t),48:ptr(struct(0:ptr(TOP),4:ptr(TOP),8:num32_t)),52:ptr(TOP),56:num32_t,60:num32_t,64:num32_t,68:uint16_t,70:int8_t,71:array(num8_t,1),72:ptr(TOP),76:num64_t,84:ptr(TOP),88:ptr(TOP),92:ptr(TOP),96:ptr(TOP),100:uint32_t,104:num32_t,108:array(num8_t,40)))) "Union_0"
9 ptr(num8_t) "char[]"
21 union(ptr(reg32_t),ptr(struct(0:ptr(TOP),12:reg32_t,16:reg32_t,20:ptr(struct(8:float32_t,12:float32_t))))) "Union_10"
22 union(ptr(reg32_t),ptr(struct(0:reg32_t,4:reg32_t,88:ptr(TOP),92:reg32_t))) "Union_11"
23 ptr(struct(0:array(reg8_t,44),44:reg32_t)) "StructFrag_23*"
24 ptr(struct(0:array(reg8_t,48),48:reg32_t)) "StructFrag_48*"
25 union(ptr(num8_t),ptr(struct(0:reg32_t,4:ptr(TOP))),ptr(struct(4:ptr(struct(0:reg32_t,4:ptr(TOP))),24:ptr(num8_t),28:ptr(num8_t),32:num32_t,48:reg32_t,60:reg16_t,64:reg16_t,68:reg32_t,72:reg32_t,156:reg32_t,160:reg32_t))) "Union_3"
26 ptr(struct(0:reg32_t,4:reg32_t,8:ptr(TOP),12:reg32_t,16:ptr(struct(68:reg32_t,72:reg32_t,156:ptr(TOP),160:reg32_t)))) "Struct_123*"
27 ptr(struct(0:reg32_t,4:reg32_t,88:ptr(TOP),92:reg32_t)) "Struct_128*"
28 ptr(struct(0:num8_t,4:reg32_t,8:num8_t,9:num8_t,10:num8_t,12:ptr(reg32_t),16:num8_t,17:num8_t)) "Struct_59*"
29 ptr(struct(0:ptr(TOP),32:code_t,36:ptr(struct(0:reg32_t,4:ptr(TOP))))) "Struct_21*"
30 union(ptr(struct(0:reg64_t,8:reg32_t)),ptr(struct(0:reg64_t,8:ptr(TOP)))) "Union_8"
31 union(ptr(num8_t),ptr(struct(0:reg64_t,8:reg32_t)),ptr(struct(0:reg64_t,8:ptr(TOP))),ptr(struct(0:reg32_t,4:ptr(TOP))),ptr(struct(4:ptr(struct(0:reg32_t,4:ptr(TOP))),24:ptr(num8_t),28:ptr(num8_t),32:num32_t,48:reg32_t,60:reg16_t,64:reg16_t,68:reg32_t,72:reg32_t,156:reg32_t,160:reg32_t)),ptr(struct(0:array(reg8_t,224),224:ptr(TOP)))) "Union_6"
32 ptr(struct(0:reg32_t,4:ptr(TOP))) "StructFrag_37*"
5 ptr(uint32_t) "size_t*"
32 ptr(struct(0:reg32_t,4:ptr(TOP))) "Struct_0*"
33 ptr(struct(4:ptr(TOP),8:ptr(TOP))) "Struct_35*"
34 ptr(struct(0:ptr(struct(4:ptr(TOP),8:ptr(TOP))),8:ptr(TOP),20:ptr(TOP),24:num32_t,28:num32_t,48:ptr(struct(0:ptr(TOP),32:code_t,36:ptr(struct(0:reg32_t,4:ptr(TOP))))))) "Struct_119*"
35 ptr(ptr(reg32_t)) "dword[]*"
36 union(ptr(num8_t),uint32_t) "Union_7"
37 ptr(struct(0:array(reg8_t,64),64:union(ptr(num8_t),uint32_t))) "StructFrag_55*"
38 ptr(struct(0:union(ptr(num8_t),uint32_t),8:reg32_t)) "Struct_112*"
39 union(uint32_t,ptr(array(reg8_t,42))) "Union_4"
40 ptr(struct(0:ptr(TOP),4:ptr(TOP),8:num8_t)) "Struct_84*"
41 ptr(array(reg8_t,32)) "unknown_256*"
42 ptr(struct(0:union(ptr(num8_t),ptr(struct(0:reg32_t,4:ptr(TOP))),ptr(struct(4:ptr(struct(0:reg32_t,4:ptr(TOP))),24:ptr(num8_t),28:ptr(num8_t),32:num32_t,48:reg32_t,60:reg16_t,64:reg16_t,68:reg32_t,72:reg32_t,156:reg32_t,160:reg32_t))),4:union(ptr(num8_t),ptr(struct(0:reg32_t,4:ptr(TOP))),ptr(struct(4:ptr(struct(0:reg32_t,4:ptr(TOP))),24:ptr(num8_t),28:ptr(num8_t),32:num32_t,48:reg32_t,60:reg16_t,64:reg16_t,68:reg32_t,72:reg32_t,156:reg32_t,160:reg32_t))),12:ptr(TOP),16:ptr(TOP),20:union(ptr(num8_t),ptr(struct(0:reg32_t,4:ptr(TOP))),ptr(struct(4:ptr(struct(0:reg32_t,4:ptr(TOP))),24:ptr(num8_t),28:ptr(num8_t),32:num32_t,48:reg32_t,60:reg16_t,64:reg16_t,68:reg32_t,72:reg32_t,156:reg32_t,160:reg32_t))),44:reg32_t)) "Struct_85*"
43 ptr(struct(0:ptr(struct(0:reg32_t,4:ptr(TOP))),8:ptr(TOP),20:ptr(TOP),24:num32_t,28:num32_t,40:ptr(TOP),44:uint32_t,48:ptr(struct(0:ptr(TOP),32:code_t,36:ptr(struct(0:reg32_t,4:ptr(TOP))))))) "Struct_65*"
44 ptr(struct(0:array(reg8_t,64),64:reg16_t)) "StructFrag_24*"
45 union(ptr(num8_t),uint32_t,ptr(struct(0:reg64_t,8:reg32_t)),ptr(struct(0:reg64_t,8:ptr(TOP))),ptr(struct(0:reg32_t,4:ptr(TOP))),ptr(struct(4:ptr(struct(0:reg32_t,4:ptr(TOP))),24:ptr(num8_t),28:ptr(num8_t),32:num32_t,48:reg32_t,60:reg16_t,64:reg16_t,68:reg32_t,72:reg32_t,156:reg32_t,160:reg32_t)),ptr(struct(0:array(reg8_t,224),224:ptr(TOP)))) "Union_9"
46 ptr(struct(0:ptr(struct(0:reg64_t,8:reg32_t)),4:reg32_t)) "Struct_107*"
47 ptr(struct(0:array(reg8_t,92),92:reg32_t)) "StructFrag_56*"
48 ptr(struct(0:ptr(TOP),12:reg32_t)) "Struct_56*"
49 reg64_t "qword"
50 reg16_t "word"
51 num64_t "long long"
52 ptr(struct(0:ptr(TOP),4:ptr(TOP),8:reg32_t,12:reg32_t,16:reg32_t,20:ptr(struct(0:float32_t,4:float32_t,8:float32_t)),36:ptr(struct(0:reg32_t,4:ptr(TOP))))) "Struct_14*"
53 ptr(ptr(struct(0:reg32_t,4:ptr(TOP)))) "StructFrag_37**"
54 union(ptr(struct(0:ptr(TOP),4:ptr(TOP),8:num8_t)),ptr(struct(0:reg32_t,4:reg32_t,8:ptr(TOP),12:reg32_t,16:ptr(struct(68:reg32_t,72:reg32_t,156:ptr(TOP),160:reg32_t))))) "Union_13"
55 ptr(struct(0:ptr(struct(0:array(reg8_t,20),20:ptr(TOP))),32:code_t,36:ptr(struct(0:reg32_t,4:ptr(TOP))))) "Struct_148*"
56 ptr(struct(0:ptr(TOP),4:reg32_t,16:reg32_t)) "Struct_146*"
57 ptr(struct(0:ptr(struct(0:reg32_t,4:ptr(TOP))),4:reg32_t)) "Struct_144*"
58 union(ptr(struct(0:array(reg8_t,16),16:reg32_t)),ptr(struct(0:ptr(TOP),12:reg32_t,16:reg32_t,20:ptr(struct(8:float32_t,12:float32_t))))) "Union_12"
59 ptr(struct(0:array(reg8_t,16),16:ptr(struct(68:reg32_t,72:reg32_t,156:ptr(TOP),160:reg32_t)))) "StructFrag_61*"
60 ptr(struct(0:union(ptr(struct(0:ptr(TOP),4:ptr(TOP),8:num8_t)),ptr(struct(0:reg32_t,4:reg32_t,8:ptr(TOP),12:reg32_t,16:ptr(struct(68:reg32_t,72:reg32_t,156:ptr(TOP),160:reg32_t))))),4:ptr(struct(0:reg32_t,4:ptr(TOP))))) "Struct_132*"
61 ptr(struct(0:ptr(TOP),4:ptr(TOP),8:reg32_t,12:reg32_t,16:reg32_t,20:ptr(struct(8:float32_t,12:float32_t)),36:ptr(struct(0:reg32_t,4:ptr(TOP))))) "Struct_131*"
62 ptr(struct(0:reg64_t,8:num8_t)) "StructFrag_43*"
63 ptr(struct(0:array(reg8_t,28),28:code_t)) "StructFrag_22*"
64 float64_t "double"
65 ptr(struct(0:ptr(struct(0:reg32_t,4:ptr(TOP))),4:reg32_t,8:reg32_t,12:reg32_t,16:reg32_t)) "Struct_139*"
66 ptr(struct(0:reg64_t,8:float32_t)) "StructFrag_11*"
67 ptr(struct(0:ptr(TOP),4:ptr(TOP),8:reg32_t,12:reg32_t,20:ptr(struct(0:reg64_t,8:float32_t)))) "Struct_134*"
68 ptr(struct(0:array(reg8_t,28),28:num8_t)) "StructFrag_16*"
69 ptr(struct(0:num32_t,4:ptr(ptr(num8_t)),4294967292:reg32_t)) "Struct_57*"
70 ptr(struct(0:ptr(num8_t),4:num32_t,8:ptr(num32_t),12:num32_t)) "option*"
71 ptr(struct(0:reg32_t,40:ptr(num8_t),44:ptr(num8_t))) "Struct_1*"
72 ptr(struct(0:num32_t,4:reg32_t,40:ptr(num8_t),44:ptr(num8_t))) "Struct_79*"
73 int32_t "signed int"
43 ptr(struct(0:ptr(struct(0:reg32_t,4:ptr(TOP))),8:ptr(TOP),20:ptr(TOP),24:num32_t,28:num32_t,40:ptr(TOP),44:uint32_t,48:ptr(struct(0:ptr(TOP),32:code_t,36:ptr(struct(0:reg32_t,4:ptr(TOP))))))) "Struct_60*"
74 ptr(struct(4:ptr(struct(0:reg32_t,4:ptr(TOP))),24:ptr(num8_t),28:ptr(num8_t),32:num32_t,48:reg32_t,60:reg16_t,64:reg16_t,68:reg32_t,72:reg32_t,156:reg32_t,160:reg32_t)) "Struct_61*"
75 ptr(struct(0:array(reg8_t,16),16:reg32_t)) "StructFrag_6*"
76 ptr(struct(0:array(reg8_t,18),18:num8_t)) "StructFrag_1*"
77 ptr(struct(0:ptr(struct(0:reg32_t,4:ptr(struct(0:reg32_t,4:ptr(TOP))))),12:reg32_t)) "Struct_140*"
78 ptr(struct(0:reg32_t,4:ptr(struct(0:reg32_t,4:ptr(TOP))))) "StructFrag_39*"
79 ptr(struct(0:array(reg8_t,3),3:num8_t)) "StructFrag_45*"
5 ptr(uint32_t) "unsigned int*"
4 uint32_t "__uid_t"
80 ptr(ptr(uint16_t)) "unsigned short**"
81 ptr(ptr(TOP)) "void**"
82 ptr(struct(0:num32_t,4:uint32_t,40:ptr(num8_t),44:ptr(num8_t))) "Struct_81*"
83 ptr(struct(0:num32_t,40:ptr(num8_t),44:ptr(num8_t))) "Struct_78*"
84 ptr(struct(0:union(ptr(struct(0:reg64_t,8:reg32_t)),ptr(struct(0:reg32_t,4:ptr(TOP)))),20:ptr(TOP),24:num32_t,40:ptr(TOP),44:uint32_t)) "Struct_80*"
85 ptr(struct(68:reg32_t,72:reg32_t,156:ptr(TOP),160:reg32_t)) "Struct_30*"
86 ptr(struct(0:array(reg8_t,38),38:num8_t)) "StructFrag_52*"
87 ptr(array(reg8_t,42)) "unknown_336*"
88 ptr(struct(0:reg16_t,2:num8_t)) "StructFrag_0*"
89 ptr(struct(0:array(reg8_t,224),224:ptr(TOP))) "StructFrag_21*"
90 union(ptr(struct(0:reg32_t,4:ptr(TOP))),ptr(struct(0:reg32_t,4:ptr(TOP))),ptr(struct(0:reg32_t,4:ptr(struct(0:reg32_t,4:ptr(TOP))))),ptr(struct(0:ptr(struct(0:reg64_t,8:num8_t)),4:ptr(TOP)))) "Union_15"
77 ptr(struct(0:ptr(struct(0:reg32_t,4:ptr(struct(0:reg32_t,4:ptr(TOP))))),12:reg32_t)) "Struct_122*"
91 ptr(struct(0:ptr(struct(0:reg64_t,8:num8_t)),4:ptr(TOP))) "Struct_142*"
32 ptr(struct(0:reg32_t,4:ptr(TOP))) "StructFrag_12*"
92 ptr(struct(8:float32_t)) "Struct_127*"
93 ptr(struct(8:float32_t,12:float32_t)) "Struct_23*"
94 ptr(struct(0:float32_t,4:float32_t,8:float32_t)) "Struct_13*"
95 ptr(reg16_t) "word[]"
96 ptr(ptr(struct(0:float32_t,4:float32_t,8:float32_t,12:float32_t))) "Struct_5**"
97 ptr(struct(0:array(reg8_t,28),28:reg32_t)) "StructFrag_42*"
98 ptr(struct(0:array(reg8_t,52),52:ptr(struct(0:ptr(TOP),32:code_t,36:ptr(struct(0:reg32_t,4:ptr(TOP))))))) "StructFrag_50*"
99 ptr(struct(0:array(reg8_t,20),20:reg32_t)) "StructFrag_3*"
100 ptr(struct(0:array(reg8_t,64),64:uint32_t)) "StructFrag_53*"
101 ptr(struct(8:ptr(struct(0:ptr(struct(0:reg64_t,8:reg32_t)),4:reg32_t)),36:reg32_t,40:code_t)) "Struct_117*"
102 ptr(struct(28:code_t,36:ptr(struct(0:reg32_t,4:ptr(TOP))))) "Struct_137*"
103 ptr(struct(0:array(reg8_t,52),52:ptr(struct(0:ptr(TOP),4:ptr(TOP),8:reg32_t,12:reg32_t,16:reg32_t,20:ptr(struct(0:float32_t,4:float32_t,8:float32_t)),36:ptr(struct(0:reg32_t,4:ptr(TOP))))))) "StructFrag_63*"
6 ptr(num32_t) "int[]"
104 ptr(struct(0:reg32_t,8:reg32_t,24:code_t)) "Struct_145*"
105 ptr(struct(0:array(reg8_t,52),52:ptr(struct(0:array(reg8_t,16),16:reg32_t)))) "StructFrag_60*"
106 ptr(struct(12:reg32_t,36:ptr(struct(0:reg32_t,4:ptr(TOP))))) "Struct_141*"
107 ptr(struct(4:ptr(struct(0:reg32_t,4:ptr(TOP))),24:reg32_t,28:ptr(num8_t),32:num32_t)) "Struct_76*"
108 ptr(struct(28:reg32_t,48:ptr(struct(0:ptr(TOP),12:reg32_t,16:reg32_t,20:ptr(struct(8:float32_t,12:float32_t)))))) "Struct_86*"
109 ptr(struct(0:array(reg8_t,115154),115154:reg32_t)) "StructFrag_30*"
110 ptr(struct(0:array(reg8_t,536870908),4294967292:reg32_t)) "StructFrag_31*"
111 ptr(struct(0:array(reg8_t,50524),50524:reg32_t)) "StructFrag_34*"
112 ptr(struct(0:array(reg8_t,648),648:reg32_t)) "StructFrag_35*"
113 ptr(struct(68:reg32_t,72:reg32_t,156:ptr(TOP),160:ptr(TOP))) "Struct_15*"
114 ptr(struct(16:reg32_t,24:reg32_t,28:ptr(num8_t))) "Struct_67*"
115 ptr(struct(0:uint32_t,4:ptr(TOP))) "Struct_77*"
116 ptr(uint16_t) "unsigned short*"
117 ptr(union(ptr(num8_t),uint32_t)) "Union_7*"
118 ptr(struct(0:float32_t,4:float32_t,8:float32_t,12:float32_t)) "Struct_5*"
119 ptr(struct(4:ptr(struct(68:reg32_t,72:reg32_t,156:ptr(TOP),160:ptr(TOP))),68:reg32_t,72:reg32_t,156:reg32_t,160:reg32_t)) "Struct_135*"
120 ptr(struct(0:reg64_t,8:uint32_t)) "StructFrag_44*"
121 array(reg8_t,4096) "unknown_32768"
122 array(reg8_t,135168) "unknown_1081344"
123 array(reg8_t,30) "unknown_240"
124 array(reg8_t,5) "unknown_40"
125 array(reg8_t,17) "unknown_136"
126 array(reg8_t,16) "unknown_128"
127 array(reg8_t,173) "unknown_1384"
128 array(reg8_t,99) "unknown_792"
129 array(reg8_t,64) "unknown_512"
130 array(reg8_t,120) "unknown_960"
131 array(reg8_t,24) "unknown_192"
132 array(reg8_t,62) "unknown_496"
133 array(reg8_t,12) "unknown_96"
134 array(reg8_t,9) "unknown_72"
135 array(reg8_t,21) "unknown_168"
136 array(reg8_t,11) "unknown_88"
137 array(reg8_t,129) "unknown_1032"
138 array(reg8_t,10) "unknown_80"
139 array(reg8_t,27) "unknown_216"
140 array(reg8_t,34) "unknown_272"
141 array(reg8_t,31) "unknown_248"
142 array(reg8_t,51) "unknown_408"
143 array(reg8_t,49) "unknown_392"
144 array(reg8_t,18) "unknown_144"
145 array(reg8_t,37) "unknown_296"
146 array(reg8_t,105) "unknown_840"
147 array(reg8_t,41) "unknown_328"
148 array(reg8_t,7) "unknown_56"
149 array(reg8_t,13) "unknown_104"
150 array(reg8_t,32) "unknown_256"
151 array(reg8_t,52) "unknown_416"
152 array(reg8_t,397) "unknown_3176"
153 array(reg8_t,53) "unknown_424"
154 array(reg8_t,65) "unknown_520"
155 array(reg8_t,80) "unknown_640"
156 array(reg8_t,58) "unknown_464"
157 array(reg8_t,23) "unknown_184"
158 array(reg8_t,46) "unknown_368"
159 array(reg8_t,48) "unknown_384"
160 array(reg8_t,28) "unknown_224"
161 array(reg8_t,19) "unknown_152"
162 array(reg8_t,6) "unknown_48"
163 array(reg8_t,38) "unknown_304"
164 array(reg8_t,26) "unknown_208"
165 array(reg8_t,152) "unknown_1216"
166 array(reg8_t,78) "unknown_624"
167 array(reg8_t,110) "unknown_880"
168 array(reg8_t,66) "unknown_528"
169 array(reg8_t,35) "unknown_280"
170 array(reg8_t,77) "unknown_616"
171 array(reg8_t,15) "unknown_120"
172 array(reg8_t,20) "unknown_160"
173 array(reg8_t,40) "unknown_320"
174 array(reg8_t,54) "unknown_432"
175 array(reg8_t,25) "unknown_200"
176 array(reg8_t,3) "unknown_24"
177 array(reg8_t,59) "unknown_472"
178 array(reg8_t,61) "unknown_488"
179 array(reg8_t,36) "unknown_288"
180 array(reg8_t,42) "unknown_336"
181 array(reg8_t,56) "unknown_448"
182 array(reg8_t,22) "unknown_176"
183 array(reg8_t,90) "unknown_720"
184 array(reg8_t,71) "unknown_568"
185 array(reg8_t,84) "unknown_672"
186 array(reg8_t,70) "unknown_560"
187 array(reg8_t,43) "unknown_344"
188 array(reg8_t,57) "unknown_456"
189 array(reg8_t,33) "unknown_264"
190 array(reg8_t,39) "unknown_312"
191 array(reg8_t,73) "unknown_584"
192 array(reg8_t,14) "unknown_112"
193 array(reg8_t,104) "unknown_832"
194 array(reg8_t,109) "unknown_872"
195 array(reg8_t,45) "unknown_360"
196 array(reg8_t,29) "unknown_232"
197 array(reg8_t,96) "unknown_768"
198 array(reg8_t,112) "unknown_896"
199 array(reg8_t,74) "unknown_592"
200 array(reg8_t,47) "unknown_376"
201 array(reg8_t,44) "unknown_352"
202 array(reg8_t,87) "unknown_696"
203 array(reg8_t,162) "unknown_1296"
204 array(reg8_t,176) "unknown_1408"
205 array(reg8_t,160) "unknown_1280"
206 array(reg8_t,72) "unknown_576"
207 array(reg8_t,83) "unknown_664"
208 array(reg8_t,60) "unknown_480"
209 array(reg8_t,81) "unknown_648"
210 array(reg8_t,117) "unknown_936"
211 array(reg8_t,50) "unknown_400"
212 array(reg8_t,86) "unknown_688"
213 array(reg8_t,88) "unknown_704"
214 array(reg8_t,138) "unknown_1104"
215 array(reg8_t,102) "unknown_816"
216 array(reg8_t,214) "unknown_1712"
217 array(reg8_t,153) "unknown_1224"
218 array(reg8_t,108) "unknown_864"
219 array(reg8_t,147) "unknown_1176"
220 array(reg8_t,111) "unknown_888"
221 array(num8_t,39) "char[39]"
222 array(num8_t,31) "char[31]"
223 array(num8_t,160) "char[160]"
224 array(num8_t,376) "char[376]"
225 array(num8_t,224) "char[224]"
226 array(num8_t,280) "char[280]"
227 array(num8_t,45) "char[45]"
228 array(num8_t,54) "char[54]"
229 array(num8_t,155) "char[155]"
230 array(num8_t,122) "char[122]"
231 array(num8_t,226) "char[226]"
232 array(num8_t,69) "char[69]"
233 array(num8_t,65) "char[65]"
234 array(num8_t,87) "char[87]"
235 array(num8_t,38) "char[38]"
236 array(num8_t,76) "char[76]"
237 array(num8_t,23) "char[23]"
238 array(num8_t,10) "char[10]"
239 array(num8_t,4) "char[4]"
240 array(num8_t,14) "char[14]"
241 array(num8_t,13) "char[13]"
242 array(num8_t,20) "char[20]"
243 array(num8_t,16) "char[16]"
244 array(num8_t,11) "char[11]"
245 array(num8_t,3) "char[3]"
246 array(num8_t,8) "char[8]"
247 array(num8_t,9) "char[9]"
248 array(num8_t,27) "char[27]"
249 array(num8_t,26) "char[26]"
250 array(num8_t,6) "char[6]"
251 array(num8_t,5) "char[5]"
252 struct(0:num32_t,4:ptr(num8_t),8:ptr(num8_t),12:ptr(num8_t),16:ptr(num8_t),20:ptr(num8_t),24:ptr(num8_t),28:ptr(num8_t),32:ptr(num8_t),36:ptr(num8_t),40:ptr(num8_t),44:ptr(num8_t),48:ptr(struct(0:ptr(TOP),4:ptr(array(reg8_t,148)),8:num32_t)),52:ptr(array(reg8_t,148)),56:num32_t,60:num32_t,64:num32_t,68:uint16_t,70:int8_t,71:array(num8_t,1),72:ptr(TOP),76:num64_t,84:ptr(TOP),88:ptr(TOP),92:ptr(TOP),96:ptr(TOP),100:uint32_t,104:num32_t,108:array(num8_t,40)) "_IO_FILE"
253 struct(0:ptr(num8_t),4:num32_t,8:ptr(num32_t),12:num32_t) "option"
254 ptr(struct(0:ptr(TOP),4:ptr(struct(0:num32_t,4:ptr(num8_t),8:ptr(num8_t),12:ptr(num8_t),16:ptr(num8_t),20:ptr(num8_t),24:ptr(num8_t),28:ptr(num8_t),32:ptr(num8_t),36:ptr(num8_t),40:ptr(num8_t),44:ptr(num8_t),48:ptr(TOP),52:ptr(TOP),56:num32_t,60:num32_t,64:num32_t,68:uint16_t,70:int8_t,71:array(num8_t,1),72:ptr(TOP),76:num64_t,84:ptr(TOP),88:ptr(TOP),92:ptr(TOP),96:ptr(TOP),100:uint32_t,104:num32_t,108:array(num8_t,40))),8:num32_t)) "_IO_marker*"
3 num32_t "__off_t"
255 uint16_t "unsigned short"
256 int8_t "signed char"
51 num64_t "__quad_t"
257 array(reg8_t,76) "unknown_608"
258 array(num8_t,12) "char[12]"
259 array(num8_t,17) "char[17]"
260 array(num8_t,19) "char[19]"
261 array(num8_t,21) "char[21]"
262 array(num8_t,22) "char[22]"
263 array(num8_t,48) "char[48]"
264 array(num8_t,32) "char[32]"
265 array(num8_t,35) "char[35]"
266 array(num8_t,51) "char[51]"
267 array(num8_t,58) "char[58]"
268 array(num8_t,49) "char[49]"
269 array(num8_t,46) "char[46]"
270 array(num8_t,186) "char[186]"
271 array(num8_t,56) "char[56]"
272 array(num8_t,61) "char[61]"
273 array(ptr(TOP),14) "void*[14]"
274 array(num8_t,29) "char[29]"
275 array(num8_t,7) "char[7]"
276 array(num8_t,2) "char[2]"
277 array(reg32_t,9) "dword[9]"
278 array(reg32_t,127) "dword[127]"
279 array(reg32_t,34) "dword[34]"
280 array(num8_t,28) "char[28]"
281 array(num8_t,203) "char[203]"
282 array(num8_t,36) "char[36]"
283 array(num8_t,40) "char[40]"
284 array(num8_t,44) "char[44]"
285 array(num8_t,52) "char[52]"
286 array(num8_t,60) "char[60]"
287 array(num8_t,64) "char[64]"
288 array(ptr(TOP),10) "void*[10]"
289 array(num8_t,47) "char[47]"
290 array(num8_t,18) "char[18]"
291 array(num8_t,24) "char[24]"
292 array(num8_t,33) "char[33]"
293 float32_t "float"
294 array(num8_t,78) "char[78]"
295 array(reg8_t,1268) "unknown_10144"
296 array(reg8_t,12864) "unknown_102912"
297 array(reg8_t,4292) "unknown_34336"
1 code_t "(void -?-> dword)*"
298 array(reg8_t,232) "unknown_1856"
299 array(reg8_t,256) "unknown_2048"
300 ptr(struct(0:ptr(struct(0:reg64_t,8:reg32_t)),20:reg32_t,24:num32_t,40:reg32_t,44:uint32_t)) "Struct_10*"
301 union(ptr(num8_t),ptr(struct(0:reg32_t,4:ptr(TOP))),ptr(struct(4:ptr(struct(0:reg32_t,4:ptr(TOP))),24:ptr(num8_t),28:ptr(num8_t),32:num32_t,48:reg32_t,60:reg16_t,64:reg16_t,68:reg32_t,72:reg32_t,156:reg32_t,160:reg32_t)),ptr(struct(0:array(reg8_t,224),224:ptr(TOP)))) "Union_5"
302 ptr(struct(0:ptr(struct(0:reg64_t,8:ptr(TOP))),20:reg32_t,24:num32_t,40:reg32_t,44:uint32_t)) "Struct_8*"
| BlitzBasic | 2 | matt-noonan/retypd-data | data/rm.decls | [
"MIT"
] |
Fair Correlation Clustring
===============================
This is the implementation accompanying the AISTATS 2020 paper,
[_Fair Correlation Clustering_](https://arxiv.org/abs/2002.02274).
Example Usage:
--------------
First, create a fresh virtual environment and install the requirements.
# From google-research/
virtualenv -p python3 .
source ./bin/activate
python3 -m pip install -r graph_embedding/fair_correlation_clustering/requirements.txt
How to run:
-------
You can run our experiments with the following:
python3 -m fair_correlation_clustering.correlation_clustering \
--input_graph=GRAPH.edgelist \
--output_results=RESULTS.json
Citing
------
If you find _Fair Correlation Clustering_ useful in your research, we ask that
you cite the following paper:
> Ahmadian, S., Epasto, A., Mahdian, M., Kumar, R. (2020).
> Fair Correlation Clustering.
> In _AISTATS_.
@inproceedings{ahmadian2020fair,
author={Ahmadian, Epasto, Mahdian, Kumar}
title={Fair Correlation Clustering},
booktitle = {AISTATS},
year = {2020},
}
Contact Us
----------
For questions or comments about the implementation, please contact
<aepasto@google.com>.
| Groff | 3 | deepneuralmachine/google-research | correlation_clustering/READ.me | [
"Apache-2.0"
] |
lexer grammar t052importS8;
options {
language=JavaScript;
}
@members {
this.capture = function(t) {
this.gt052importM8.capture(t);
};
}
A : 'a' {this.capture("S.A");} ;
| G-code | 3 | DanielMabadeje/Artificial-Intelligence-Deep-Learning-Machine-Learning-Tutorials | java/java2py/antlr-3.1.3/runtime/JavaScript/tests/functional/t052importS8.g | [
"Apache-2.0"
] |
use crate::{EarlyContext, EarlyLintPass, LintContext};
use ast::util::unicode::{contains_text_flow_control_chars, TEXT_FLOW_CONTROL_CHARS};
use rustc_ast as ast;
use rustc_errors::{Applicability, SuggestionStyle};
use rustc_span::{BytePos, Span, Symbol};
declare_lint! {
/// The `text_direction_codepoint_in_literal` lint detects Unicode codepoints that change the
/// visual representation of text on screen in a way that does not correspond to their on
/// memory representation.
///
/// ### Explanation
///
/// The unicode characters `\u{202A}`, `\u{202B}`, `\u{202D}`, `\u{202E}`, `\u{2066}`,
/// `\u{2067}`, `\u{2068}`, `\u{202C}` and `\u{2069}` make the flow of text on screen change
/// its direction on software that supports these codepoints. This makes the text "abc" display
/// as "cba" on screen. By leveraging software that supports these, people can write specially
/// crafted literals that make the surrounding code seem like it's performing one action, when
/// in reality it is performing another. Because of this, we proactively lint against their
/// presence to avoid surprises.
///
/// ### Example
///
/// ```rust,compile_fail
/// #![deny(text_direction_codepoint_in_literal)]
/// fn main() {
/// println!("{:?}", '');
/// }
/// ```
///
/// {{produces}}
///
pub TEXT_DIRECTION_CODEPOINT_IN_LITERAL,
Deny,
"detect special Unicode codepoints that affect the visual representation of text on screen, \
changing the direction in which text flows",
}
declare_lint_pass!(HiddenUnicodeCodepoints => [TEXT_DIRECTION_CODEPOINT_IN_LITERAL]);
impl HiddenUnicodeCodepoints {
fn lint_text_direction_codepoint(
&self,
cx: &EarlyContext<'_>,
text: Symbol,
span: Span,
padding: u32,
point_at_inner_spans: bool,
label: &str,
) {
// Obtain the `Span`s for each of the forbidden chars.
let spans: Vec<_> = text
.as_str()
.char_indices()
.filter_map(|(i, c)| {
TEXT_FLOW_CONTROL_CHARS.contains(&c).then(|| {
let lo = span.lo() + BytePos(i as u32 + padding);
(c, span.with_lo(lo).with_hi(lo + BytePos(c.len_utf8() as u32)))
})
})
.collect();
cx.struct_span_lint(TEXT_DIRECTION_CODEPOINT_IN_LITERAL, span, |lint| {
let mut err = lint.build(&format!(
"unicode codepoint changing visible direction of text present in {}",
label
));
let (an, s) = match spans.len() {
1 => ("an ", ""),
_ => ("", "s"),
};
err.span_label(
span,
&format!(
"this {} contains {}invisible unicode text flow control codepoint{}",
label, an, s,
),
);
if point_at_inner_spans {
for (c, span) in &spans {
err.span_label(*span, format!("{:?}", c));
}
}
err.note(
"these kind of unicode codepoints change the way text flows on applications that \
support them, but can cause confusion because they change the order of \
characters on the screen",
);
if point_at_inner_spans && !spans.is_empty() {
err.multipart_suggestion_with_style(
"if their presence wasn't intentional, you can remove them",
spans.iter().map(|(_, span)| (*span, "".to_string())).collect(),
Applicability::MachineApplicable,
SuggestionStyle::HideCodeAlways,
);
err.multipart_suggestion(
"if you want to keep them but make them visible in your source code, you can \
escape them",
spans
.into_iter()
.map(|(c, span)| {
let c = format!("{:?}", c);
(span, c[1..c.len() - 1].to_string())
})
.collect(),
Applicability::MachineApplicable,
);
} else {
// FIXME: in other suggestions we've reversed the inner spans of doc comments. We
// should do the same here to provide the same good suggestions as we do for
// literals above.
err.note("if their presence wasn't intentional, you can remove them");
err.note(&format!(
"if you want to keep them but make them visible in your source code, you can \
escape them: {}",
spans
.into_iter()
.map(|(c, _)| { format!("{:?}", c) })
.collect::<Vec<String>>()
.join(", "),
));
}
err.emit();
});
}
}
impl EarlyLintPass for HiddenUnicodeCodepoints {
fn check_attribute(&mut self, cx: &EarlyContext<'_>, attr: &ast::Attribute) {
if let ast::AttrKind::DocComment(_, comment) = attr.kind {
if contains_text_flow_control_chars(comment.as_str()) {
self.lint_text_direction_codepoint(cx, comment, attr.span, 0, false, "doc comment");
}
}
}
fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &ast::Expr) {
// byte strings are already handled well enough by `EscapeError::NonAsciiCharInByteString`
let (text, span, padding) = match &expr.kind {
ast::ExprKind::Lit(ast::Lit { token, kind, span }) => {
let text = token.symbol;
if !contains_text_flow_control_chars(text.as_str()) {
return;
}
let padding = match kind {
// account for `"` or `'`
ast::LitKind::Str(_, ast::StrStyle::Cooked) | ast::LitKind::Char(_) => 1,
// account for `r###"`
ast::LitKind::Str(_, ast::StrStyle::Raw(val)) => *val as u32 + 2,
_ => return,
};
(text, span, padding)
}
_ => return,
};
self.lint_text_direction_codepoint(cx, text, *span, padding, true, "literal");
}
}
| Rust | 5 | ohno418/rust | compiler/rustc_lint/src/hidden_unicode_codepoints.rs | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] |
CREATE TABLE v2(s VARCHAR(16));
| SQL | 2 | WizardXiao/tidb | br/tests/lightning_view/data/db0.v2-schema.sql | [
"Apache-2.0"
] |
import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon([/*#__PURE__*/_jsx("path", {
d: "M20 4H4c-1.1 0-2 .9-2 2v3h2V6h16v3h2V6c0-1.1-.9-2-2-2zm0 14H4v-3H2v3c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-3h-2v3z"
}, "0"), /*#__PURE__*/_jsx("path", {
d: "M14.89 7.55c-.34-.68-1.45-.68-1.79 0L10 13.76l-1.11-2.21A.988.988 0 0 0 8 11H2v2h5.38l1.72 3.45c.18.34.52.55.9.55s.72-.21.89-.55L14 10.24l1.11 2.21c.17.34.51.55.89.55h6v-2h-5.38l-1.73-3.45z"
}, "1")], 'MonitorHeartOutlined'); | JavaScript | 3 | dany-freeman/material-ui | packages/mui-icons-material/lib/esm/MonitorHeartOutlined.js | [
"MIT"
] |
from libcpp.string cimport string as c_string
from libcpp.unordered_map cimport unordered_map
from libcpp.vector cimport vector as c_vector
cdef extern from "opencensus/tags/tag_key.h" nogil:
cdef cppclass CTagKey "opencensus::tags::TagKey":
@staticmethod
CTagKey Register(c_string &name)
const c_string &name() const
cdef extern from "ray/stats/metric.h" nogil:
cdef cppclass CMetric "ray::stats::Metric":
CMetric(const c_string &name,
const c_string &description,
const c_string &unit,
const c_vector[CTagKey] &tag_keys)
c_string GetName() const
void Record(double value)
void Record(double value,
unordered_map[c_string, c_string] &tags)
cdef cppclass CGauge "ray::stats::Gauge":
CGauge(const c_string &name,
const c_string &description,
const c_string &unit,
const c_vector[CTagKey] &tag_keys)
cdef cppclass CCount "ray::stats::Count":
CCount(const c_string &name,
const c_string &description,
const c_string &unit,
const c_vector[CTagKey] &tag_keys)
cdef cppclass CSum "ray::stats::Sum":
CSum(const c_string &name,
const c_string &description,
const c_string &unit,
const c_vector[CTagKey] &tag_keys)
cdef cppclass CHistogram "ray::stats::Histogram":
CHistogram(const c_string &name,
const c_string &description,
const c_string &unit,
const c_vector[double] &boundaries,
const c_vector[CTagKey] &tag_keys)
| Cython | 4 | firebolt55439/ray | python/ray/includes/metric.pxd | [
"Apache-2.0"
] |
x=-4.601 y=-6.397 z=11.336 s=20
:px+=x:py+=y:pz+=z s-- :done=1 q/=s goto2
x=:dx y=:dy z=:dz
x=(:dx+x)/2 y=(:dy+y)/2 z=(:dz+z)/2 :px+=x:py+=y:pz+=z :done=1 goto4
/--------//--------//--------//--------//--------//--------//--------/
ux=:dx ox=1
k=ox/(ox+1) ux+=k*(:dx-ux) ox-=k*ox px+=ux :done=1
goto2-((((:dx-ux)^2+(:dy-uy)^2+(:dz-uz)^2)^0.5)>1)
/--------//--------//--------//--------//--------//--------//--------/
ux=:dx ox=1 uy=:dy oy=1 uz=:dz oz=1
k=ox/(ox+1) ux+=k*(:dx-ux) ox-=k*ox :px+=ux
k=oy/(oy+1) uy+=k*(:dy-uy) oy-=k*oy :py+=uy
k=oz/(oz+1) uz+=k*(:dz-uz) oz-=k*oz :pz+=uz :done=1
goto2-((((:dx-ux)^2+(:dy-uy)^2+(:dz-uz)^2)^0.5)>1)
// https://www.lesswrong.com/posts/nM4bm6tkbZZaScLPp/kalman-filter-for-bayesians
// Prior: N(μ0,σ0)
// Observation: N(μ1,σ1)
// Posterior:
// μ′ = μ0 + k*(μ1 − μ0)
// σ′ = σ0 − k*σ0
// k = σ0 / (σ0+σ1)
/--------//--------//--------//--------//--------//--------//--------/
x=:dx y=:dy z=:dz u=:px v=:py w=:pz i=1
x=(:dx+x)/2y=(:dy+y)/2z=(:dz+z)/2 :px=u+x*i:py=v+y*i:pz=w+z*i++:done=1
goto2-((((:dx-x)^2+(:dy-y)^2+(:dz-z)^2)^0.5)>1)
/--------//--------//--------//--------//--------//--------//--------/
x=-4.601 y=-6.397 z=11.336
x=(:dx+x)/2 y=(:dy+y)/2 z=(:dz+z)/2 :px+=x:py+=y:pz+=z :done=1 goto2
x=(:dx+x)/2
x/=2x+=:dx/2
/--------//--------//--------//--------//--------//--------//--------/
:px+=:dx:py+=:dy:pz+=:dz goto:done++
/--------//--------//--------//--------//--------//--------//--------/
uvw = position at direction change
xyz = best estimate of current velocity
i = counter since last velocity change | LOLCODE | 3 | Dude112113/Yolol | YololEmulator/Scripts/DriftingSpaceship.lol | [
"MIT"
] |
@prefix p: <http://a.example/>.
<http://a.example/s> p:p <http://a.example/o> .
| Turtle | 1 | joshrose/audacity | lib-src/lv2/serd/tests/TurtleTests/prefixed_IRI_predicate.ttl | [
"CC-BY-3.0"
] |
<html>
<head>
{{ghost_head}}
</head>
<body>
home.hbs
</body>
</html> | Handlebars | 2 | tiendq/Ghost | test/utils/fixtures/themes/test-theme/home.hbs | [
"MIT"
] |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http2Cat;
using Microsoft.Extensions.DependencyInjection;
namespace Microsoft.Extensions.Hosting
{
internal static class Http2CatIHostBuilderExtensions
{
public static IHostBuilder UseHttp2Cat(this IHostBuilder hostBuilder, string address, Func<Http2Utilities, Task> scenario)
{
hostBuilder.ConfigureServices(services =>
{
services.UseHttp2Cat(options =>
{
options.Url = address;
options.Scenaro = scenario;
});
});
return hostBuilder;
}
}
}
| C# | 4 | tomaswesterlund/aspnetcore | src/Shared/Http2cat/Http2CatIHostBuilderExtensions.cs | [
"MIT"
] |
Module: jam-internals
Author: Peter S. Housel
Copyright: Original Code is Copyright 2004 Gwydion Dylan Maintainers
All rights reserved.
License: See License.txt in this distribution for details.
Warranty: Distributed WITHOUT WARRANTY OF ANY KIND
define function extract-grist
(name :: <byte-string>)
=> (grist :: <byte-string>);
if (name.size > 1 & name[0] == '<')
let grist-end = find-key(name, curry(\==, '>'));
if (grist-end)
copy-sequence(name, end: grist-end + 1)
else
""
end if
else
""
end if
end function;
define function strip-grist
(name :: <byte-string>)
=> (result :: <byte-string>);
if (name.size > 1 & name[0] == '<')
let grist-end = find-key(name, curry(\==, '>'));
if (grist-end)
copy-sequence(name, start: grist-end + 1)
else
name
end if
else
name
end if
end function;
define function add-grist
(old :: <byte-string>, new :: <byte-string>)
=> (result :: <byte-string>);
let old-grist = extract-grist(old);
if (old-grist.empty?)
new
else
concatenate(old-grist, new)
end if
end function;
| Dylan | 4 | kryptine/opendylan | sources/lib/jam/jam-grist.dylan | [
"BSD-2-Clause"
] |
import io/Reader
/**
* Implement the Reader interface for Buffer.
*/
BufferReader: class extends Reader {
buffer: Buffer
init: func ~withBuffer (=buffer) {}
close: func {
// nothing to close.
}
read: func (dest: Char*, destOffset: Int, maxRead: Int) -> SizeT {
if (marker >= buffer size) {
Exception new(This, "Buffer overflow! Offset is larger than buffer size.") throw()
}
copySize := (marker + maxRead > buffer size ? buffer size - marker : maxRead)
memcpy(dest, buffer data + marker, copySize)
marker += copySize
copySize
}
peek: func -> Char {
buffer get(marker)
}
read: func ~char -> Char {
c := buffer get(marker)
marker += 1
c
}
hasNext?: func -> Bool {
return marker < buffer size
}
seek: func (offset: Long, mode: SeekMode) -> Bool {
match mode {
case SeekMode SET =>
marker = offset
case SeekMode CUR =>
marker += offset
case SeekMode END =>
marker = buffer size + offset
}
_clampMarker()
true
}
_clampMarker: func {
if (marker < 0) {
marker = 0
}
if (marker >= buffer size) {
marker = buffer size - 1
}
}
mark: func -> Long {
return marker
}
}
| ooc | 3 | fredrikbryntesson/launchtest | sdk/io/BufferReader.ooc | [
"MIT"
] |
.. bpo: 38722
.. date: 2019-11-18-16-17-56
.. nonce: x3mECW
.. release date: 2019-11-19
.. section: Security
:mod:`runpy` now uses :meth:`io.open_code` to open code files. Patch by
Jason Killen.
..
.. bpo: 38622
.. date: 2019-11-14-16-13-23
.. nonce: 3DYkfb
.. section: Security
Add additional audit events for the :mod:`ctypes` module.
..
.. bpo: 38418
.. date: 2019-10-08-19-29-55
.. nonce: QL7s0-
.. section: Security
Fixes audit event for :func:`os.system` to be named ``os.system``.
..
.. bpo: 38243
.. date: 2019-09-25-13-21-09
.. nonce: 1pfz24
.. section: Security
Escape the server title of :class:`xmlrpc.server.DocXMLRPCServer` when
rendering the document page as HTML. (Contributed by Dong-hee Na in
:issue:`38243`.)
..
.. bpo: 38174
.. date: 2019-09-23-21-02-46
.. nonce: MeWuJd
.. section: Security
Update vendorized expat library version to 2.2.8, which resolves
CVE-2019-15903.
..
.. bpo: 37764
.. date: 2019-08-27-01-13-05
.. nonce: qv67PQ
.. section: Security
Fixes email._header_value_parser.get_unstructured going into an infinite
loop for a specific case in which the email header does not have trailing
whitespace, and the case in which it contains an invalid encoded word. Patch
by Ashwin Ramaswami.
..
.. bpo: 37461
.. date: 2019-07-16-08-11-00
.. nonce: 1Ahz7O
.. section: Security
Fix an infinite loop when parsing specially crafted email headers. Patch by
Abhilash Raj.
..
.. bpo: 37363
.. date: 2019-07-01-10-31-14
.. nonce: fSjatj
.. section: Security
Adds audit events for the range of supported run commands (see
:ref:`using-on-general`).
..
.. bpo: 37463
.. date: 2019-07-01-08-46-14
.. nonce: 1CHwjE
.. section: Security
ssl.match_hostname() no longer accepts IPv4 addresses with additional text
after the address and only quad-dotted notation without trailing
whitespaces. Some inet_aton() implementations ignore whitespace and all data
after whitespace, e.g. '127.0.0.1 whatever'.
..
.. bpo: 37363
.. date: 2019-06-21-15-58-59
.. nonce: diouyl
.. section: Security
Adds audit events for :mod:`ensurepip`, :mod:`ftplib`, :mod:`glob`,
:mod:`imaplib`, :mod:`nntplib`, :mod:`pdb`, :mod:`poplib`, :mod:`shutil`,
:mod:`smtplib`, :mod:`sqlite3`, :mod:`subprocess`, :mod:`telnetlib`,
:mod:`tempfile` and :mod:`webbrowser`, as well as :func:`os.listdir`,
:func:`os.scandir` and :func:`breakpoint`.
..
.. bpo: 37364
.. date: 2019-06-21-14-42-53
.. nonce: IIRc2s
.. section: Security
:func:`io.open_code` is now used when reading :file:`.pth` files.
..
.. bpo: 34631
.. date: 2019-06-17-09-34-25
.. nonce: DBfM4j
.. section: Security
Updated OpenSSL to 1.1.1c in Windows installer
..
.. bpo: 34155
.. date: 2019-05-04-13-33-37
.. nonce: MJll68
.. section: Security
Fix parsing of invalid email addresses with more than one ``@`` (e.g.
a@b@c.com.) to not return the part before 2nd ``@`` as valid email address.
Patch by maxking & jpic.
..
.. bpo: 38631
.. date: 2019-11-18-17-10-20
.. nonce: tRHaAk
.. section: Core and Builtins
Replace ``Py_FatalError()`` call with a regular :exc:`RuntimeError`
exception in :meth:`float.__getformat__`.
..
.. bpo: 38639
.. date: 2019-10-30-11-31-47
.. nonce: 9-vKtO
.. section: Core and Builtins
Optimized :func:`math.floor()`, :func:`math.ceil()` and :func:`math.trunc()`
for floats.
..
.. bpo: 38640
.. date: 2019-10-30-11-25-25
.. nonce: 4sAFh5
.. section: Core and Builtins
Fixed a bug in the compiler that was causing to raise in the presence of
break statements and continue statements inside always false while loops.
Patch by Pablo Galindo.
..
.. bpo: 38613
.. date: 2019-10-29-15-44-24
.. nonce: V_R3NC
.. section: Core and Builtins
Optimized some set operations (e.g. ``|``, ``^``, and ``-``) of
``dict_keys``. ``d.keys() | other`` was slower than ``set(d) | other`` but
they are almost same performance for now.
..
.. bpo: 28029
.. date: 2019-10-29-09-38-54
.. nonce: AmRMEF
.. section: Core and Builtins
``"".replace("", s, n)`` now returns ``s`` instead of an empty string for
all non-zero ``n``. There are similar changes for :class:`bytes` and
:class:`bytearray` objects.
..
.. bpo: 38535
.. date: 2019-10-20-12-43-48
.. nonce: ESMkVN
.. section: Core and Builtins
Fixed line numbers and column offsets for AST nodes for calls without
arguments in decorators.
..
.. bpo: 38525
.. date: 2019-10-20-00-36-18
.. nonce: Vty1cA
.. section: Core and Builtins
Fix a segmentation fault when using reverse iterators of empty ``dict``
objects. Patch by Dong-hee Na and Inada Naoki.
..
.. bpo: 38465
.. date: 2019-10-19-12-44-13
.. nonce: V1L8c4
.. section: Core and Builtins
:class:`bytearray`, :class:`~array.array` and :class:`~mmap.mmap` objects
allow now to export more than ``2**31`` buffers at a time.
..
.. bpo: 38469
.. date: 2019-10-13-23-41-38
.. nonce: 9kmuQj
.. section: Core and Builtins
Fixed a bug where the scope of named expressions was not being resolved
correctly in the presence of the *global* keyword. Patch by Pablo Galindo.
..
.. bpo: 38437
.. date: 2019-10-10-20-42-09
.. nonce: z_0mZp
.. section: Core and Builtins
Activate the ``GC_DEBUG`` macro for debug builds of the interpreter (when
``Py_DEBUG`` is set). Patch by Pablo Galindo.
..
.. bpo: 38379
.. date: 2019-10-10-01-41-02
.. nonce: _q4dhn
.. section: Core and Builtins
When the garbage collector makes a collection in which some objects
resurrect (they are reachable from outside the isolated cycles after the
finalizers have been executed), do not block the collection of all objects
that are still unreachable. Patch by Pablo Galindo and Tim Peters.
..
.. bpo: 38379
.. date: 2019-10-09-16-50-52
.. nonce: oz5qZx
.. section: Core and Builtins
When cyclic garbage collection (gc) runs finalizers that resurrect
unreachable objects, the current gc run ends, without collecting any cyclic
trash. However, the statistics reported by ``collect()`` and
``get_stats()`` claimed that all cyclic trash found was collected, and that
the resurrected objects were collected. Changed the stats to report that
none were collected.
..
.. bpo: 38392
.. date: 2019-10-07-22-51-39
.. nonce: KaXXps
.. section: Core and Builtins
In debug mode, :c:func:`PyObject_GC_Track` now calls ``tp_traverse()`` of
the object type to ensure that the object is valid: test that objects
visited by ``tp_traverse()`` are valid.
..
.. bpo: 38210
.. date: 2019-10-06-15-01-57
.. nonce: Xgc6F_
.. section: Core and Builtins
Remove unnecessary intersection and update set operation in dictview with
empty set. (Contributed by Dong-hee Na in :issue:`38210`.)
..
.. bpo: 38402
.. date: 2019-10-05-19-36-16
.. nonce: EZuzgK
.. section: Core and Builtins
Check the error from the system's underlying ``crypt`` or ``crypt_r``.
..
.. bpo: 37474
.. date: 2019-10-01-12-46-30
.. nonce: cB3se1
.. section: Core and Builtins
On FreeBSD, Python no longer calls ``fedisableexcept()`` at startup to
control the floating point control mode. The call became useless since
FreeBSD 6: it became the default mode.
..
.. bpo: 38006
.. date: 2019-09-30-09-33-21
.. nonce: UYlJum
.. section: Core and Builtins
Fix a bug due to the interaction of weakrefs and the cyclic garbage
collector. We must clear any weakrefs in garbage in order to prevent their
callbacks from executing and causing a crash.
..
.. bpo: 38317
.. date: 2019-09-30-00-56-21
.. nonce: pmqlIQ
.. section: Core and Builtins
Fix warnings options priority: ``PyConfig.warnoptions`` has the highest
priority, as stated in the :pep:`587`.
..
.. bpo: 38310
.. date: 2019-09-28-22-54-25
.. nonce: YDTbEo
.. section: Core and Builtins
Predict ``BUILD_MAP_UNPACK_WITH_CALL`` -> ``CALL_FUNCTION_EX`` opcode pairs
in the main interpreter loop. Patch by Brandt Bucher.
..
.. bpo: 36871
.. date: 2019-09-24-18-45-46
.. nonce: p47knk
.. section: Core and Builtins
Improve error handling for the assert_has_calls and assert_has_awaits
methods of mocks. Fixed a bug where any errors encountered while binding the
expected calls to the mock's spec were silently swallowed, leading to
misleading error output.
..
.. bpo: 11410
.. date: 2019-09-24-05-32-27
.. nonce: vS182p
.. section: Core and Builtins
Better control over symbol visibility is provided through use of the
visibility attributes available in gcc >= 4.0, provided in a uniform way
across POSIX and Windows. The POSIX build files have been updated to compile
with -fvisibility=hidden, minimising exported symbols.
..
.. bpo: 38219
.. date: 2019-09-22-13-56-18
.. nonce: rFl7JD
.. section: Core and Builtins
Optimized the :class:`dict` constructor and the :meth:`~dict.update` method
for the case when the argument is a dict.
..
.. bpo: 38236
.. date: 2019-09-20-19-06-23
.. nonce: eQ0Tmj
.. section: Core and Builtins
Python now dumps path configuration if it fails to import the Python codecs
of the filesystem and stdio encodings.
..
.. bpo: 38013
.. date: 2019-09-12-19-50-01
.. nonce: I7btD0
.. section: Core and Builtins
Allow to call ``async_generator_athrow().throw(...)`` even for non-started
async generator helper. It fixes annoying warning at the end of
:func:`asyncio.run` call.
..
.. bpo: 38124
.. date: 2019-09-12-00-14-01
.. nonce: n6E0H7
.. section: Core and Builtins
Fix an off-by-one error in PyState_AddModule that could cause out-of-bounds
memory access.
..
.. bpo: 38116
.. date: 2019-09-11-14-49-42
.. nonce: KDwmwt
.. section: Core and Builtins
The select module is now PEP-384 compliant and no longer has static state
..
.. bpo: 38113
.. date: 2019-09-11-14-10-02
.. nonce: yZXC3P
.. section: Core and Builtins
ast module updated to PEP-384 and all statics removed
..
.. bpo: 38076
.. date: 2019-09-09-16-36-37
.. nonce: C5dVBl
.. section: Core and Builtins
The struct module is now PEP-384 compatible
..
.. bpo: 38075
.. date: 2019-09-09-15-59-50
.. nonce: N8OZKF
.. section: Core and Builtins
The random module is now PEP-384 compatible
..
.. bpo: 38074
.. date: 2019-09-09-15-40-57
.. nonce: MsVbeI
.. section: Core and Builtins
zlib module made PEP-384 compatible
..
.. bpo: 38073
.. date: 2019-09-09-15-17-58
.. nonce: ZoKYOU
.. section: Core and Builtins
Make pwd extension module PEP-384 compatible
..
.. bpo: 38072
.. date: 2019-09-09-15-00-42
.. nonce: Y1xpDO
.. section: Core and Builtins
grp module made PEP-384 compatible
..
.. bpo: 38069
.. date: 2019-09-09-14-46-05
.. nonce: cn8XLv
.. section: Core and Builtins
Make _posixsubprocess PEP-384 compatible
..
.. bpo: 38071
.. date: 2019-09-09-14-44-17
.. nonce: bLwkBJ
.. section: Core and Builtins
Make termios extension module PEP-384 compatible
..
.. bpo: 38005
.. date: 2019-09-02-20-00-31
.. nonce: e7VsTA
.. section: Core and Builtins
Fixed comparing and creating of InterpreterID and ChannelID.
..
.. bpo: 36946
.. date: 2019-09-02-16-17-42
.. nonce: _lAuSR
.. section: Core and Builtins
Fix possible signed integer overflow when handling slices. Patch by
hongweipeng.
..
.. bpo: 37994
.. date: 2019-08-31-11-13-25
.. nonce: Rj6S4j
.. section: Core and Builtins
Fixed silencing arbitrary errors if an attribute lookup fails in several
sites. Only AttributeError should be silenced.
..
.. bpo: 8425
.. date: 2019-08-29-01-55-38
.. nonce: FTq4A8
.. section: Core and Builtins
Optimize set difference_update for the case when the other set is much
larger than the base set. (Suggested by Evgeny Kapun with code contributed
by Michele Orrù).
..
.. bpo: 37966
.. date: 2019-08-27-21-21-36
.. nonce: 5OBLez
.. section: Core and Builtins
The implementation of :func:`~unicodedata.is_normalized` has been greatly
sped up on strings that aren't normalized, by implementing the full
normalization-quick-check algorithm from the Unicode standard.
..
.. bpo: 37947
.. date: 2019-08-26-04-09-57
.. nonce: mzAQtB
.. section: Core and Builtins
Adjust correctly the recursion level in the symtable generation for named
expressions. Patch by Pablo Galindo.
..
.. bpo: 37812
.. date: 2019-08-23-22-46-25
.. nonce: vsWZwS
.. section: Core and Builtins
The ``CHECK_SMALL_INT`` macro used inside :file:`Object/longobject.c` has
been replaced with an explicit ``return`` at each call site.
..
.. bpo: 37751
.. date: 2019-08-20-04-36-37
.. nonce: CSFzUd
.. section: Core and Builtins
Fix :func:`codecs.lookup` to normalize the encoding name the same way than
:func:`encodings.normalize_encoding`, except that :func:`codecs.lookup` also
converts the name to lower case.
..
.. bpo: 37830
.. date: 2019-08-17-18-41-59
.. nonce: fNfMbz
.. section: Core and Builtins
Fixed compilation of :keyword:`break` and :keyword:`continue` in the
:keyword:`finally` block when the corresponding :keyword:`try` block
contains :keyword:`return` with a non-constant value.
..
.. bpo: 20490
.. date: 2019-08-15-12-48-36
.. nonce: -hXeEn
.. section: Core and Builtins
Improve import error message for partially initialized module on circular
``from`` imports - by Anthony Sottile.
..
.. bpo: 37840
.. date: 2019-08-13-18-05-20
.. nonce: elLCci
.. section: Core and Builtins
Fix handling of negative indices in :c:member:`~PySequenceMethods.sq_item`
of :class:`bytearray`. Patch by Sergey Fedoseev.
..
.. bpo: 37802
.. date: 2019-08-09-18-28-57
.. nonce: pKxcAW
.. section: Core and Builtins
Slightly improve performance of :c:func:`PyLong_FromUnsignedLong`,
:c:func:`PyLong_FromUnsignedLongLong` and :c:func:`PyLong_FromSize_t`. Patch
by Sergey Fedoseev.
..
.. bpo: 37409
.. date: 2019-08-06-23-39-05
.. nonce: 1qwzn2
.. section: Core and Builtins
Ensure explicit relative imports from interactive sessions and scripts
(having no parent package) always raise ImportError, rather than treating
the current module as the package. Patch by Ben Lewis.
..
.. bpo: 32912
.. date: 2019-08-06-14-03-59
.. nonce: UDwSMJ
.. section: Core and Builtins
Reverted :issue:`32912`: emitting :exc:`SyntaxWarning` instead of
:exc:`DeprecationWarning` for invalid escape sequences in string and bytes
literals.
..
.. bpo: 37757
.. date: 2019-08-05-14-22-59
.. nonce: lRv5HX
.. section: Core and Builtins
:pep:`572`: As described in the PEP, assignment expressions now raise
:exc:`SyntaxError` when their interaction with comprehension scoping results
in an ambiguous target scope.
The ``TargetScopeError`` subclass originally proposed by the PEP has been
removed in favour of just raising regular syntax errors for the disallowed
cases.
..
.. bpo: 36279
.. date: 2019-08-04-12-24-18
.. nonce: 8Zy7jZ
.. section: Core and Builtins
Fix potential use of uninitialized memory in :func:`os.wait3`.
..
.. bpo: 36311
.. date: 2019-08-02-15-01-33
.. nonce: uY5vt-
.. section: Core and Builtins
Decoding bytes objects larger than 2GiB is faster and no longer fails when a
multibyte characters spans a chunk boundary.
..
.. bpo: 34880
.. date: 2019-08-01-10-45-51
.. nonce: u_x_CG
.. section: Core and Builtins
The :keyword:`assert` statement now works properly if the
:exc:`AssertionError` exception is being shadowed. Patch by Zackery Spytz.
..
.. bpo: 37340
.. date: 2019-07-25-11-06-57
.. nonce: 5ktLEg
.. section: Core and Builtins
Removed object cache (``free_list``) for bound method objects. Temporary
bound method objects are less used than before thanks to the ``LOAD_METHOD``
opcode and the ``_PyObject_VectorcallMethod`` C API.
..
.. bpo: 37648
.. date: 2019-07-22-11-05-05
.. nonce: 6TY2L-
.. section: Core and Builtins
Fixed minor inconsistency in :meth:`list.__contains__`,
:meth:`tuple.__contains__` and a few other places. The collection's item is
now always at the left and the needle is on the right of ``==``.
..
.. bpo: 37444
.. date: 2019-07-20-22-34-42
.. nonce: UOd3Xs
.. section: Core and Builtins
Update differing exception between :meth:`builtins.__import__` and
:meth:`importlib.__import__`.
..
.. bpo: 37619
.. date: 2019-07-18-11-50-49
.. nonce: X6Lulo
.. section: Core and Builtins
When adding a wrapper descriptor from one class to a different class (for
example, setting ``__add__ = str.__add__`` on an ``int`` subclass), an
exception is correctly raised when the operator is called.
..
.. bpo: 37593
.. date: 2019-07-14-23-57-27
.. nonce: yHSTwH
.. section: Core and Builtins
Swap the positions of the *posonlyargs* and *args* parameters in the
constructor of :class:`ast.parameters` nodes.
..
.. bpo: 37543
.. date: 2019-07-10-20-33-53
.. nonce: EvI19D
.. section: Core and Builtins
Optimized pymalloc for non PGO build.
..
.. bpo: 37537
.. date: 2019-07-10-09-56-47
.. nonce: OkB0wd
.. section: Core and Builtins
Compute allocated pymalloc blocks inside _Py_GetAllocatedBlocks(). This
slows down _Py_GetAllocatedBlocks() but gives a small speedup to
_PyObject_Malloc() and _PyObject_Free().
..
.. bpo: 37467
.. date: 2019-07-01-12-22-44
.. nonce: u-XyEu
.. section: Core and Builtins
Fix :func:`sys.excepthook` and :c:func:`PyErr_Display` if a filename is a
bytes string. For example, for a SyntaxError exception where the filename
attribute is a bytes string.
..
.. bpo: 37433
.. date: 2019-06-27-15-01-14
.. nonce: amNGqr
.. section: Core and Builtins
Fix ``SyntaxError`` indicator printing too many spaces for multi-line
strings - by Anthony Sottile.
..
.. bpo: 37417
.. date: 2019-06-26-18-41-00
.. nonce: VsZeHL
.. section: Core and Builtins
:meth:`bytearray.extend` now correctly handles errors that arise during
iteration. Patch by Brandt Bucher.
..
.. bpo: 37414
.. date: 2019-06-26-17-27-26
.. nonce: o6Lnbc
.. section: Core and Builtins
The undocumented ``sys.callstats()`` function has been removed. Since Python
3.7, it was deprecated and always returned ``None``. It required a special
build option ``CALL_PROFILE`` which was already removed in Python 3.7.
..
.. bpo: 37392
.. date: 2019-06-25-01-45-06
.. nonce: J3JhIx
.. section: Core and Builtins
Remove ``sys.getcheckinterval()`` and ``sys.setcheckinterval()`` functions.
They were deprecated since Python 3.2. Use :func:`sys.getswitchinterval` and
:func:`sys.setswitchinterval` instead. Remove also ``check_interval`` field
of the ``PyInterpreterState`` structure.
..
.. bpo: 37388
.. date: 2019-06-24-21-53-52
.. nonce: 0XTZmW
.. section: Core and Builtins
In development mode and in debug build, *encoding* and *errors* arguments
are now checked on string encoding and decoding operations. Examples:
:func:`open`, :meth:`str.encode` and :meth:`bytes.decode`.
By default, for best performances, the *errors* argument is only checked at
the first encoding/decoding error, and the *encoding* argument is sometimes
ignored for empty strings.
..
.. bpo: 37348
.. date: 2019-06-23-00-26-30
.. nonce: pp8P-x
.. section: Core and Builtins
Optimized decoding short ASCII string with UTF-8 and ascii codecs.
``b"foo".decode()`` is about 15% faster. Patch by Inada Naoki.
..
.. bpo: 24214
.. date: 2019-06-22-12-45-20
.. nonce: hIiHeD
.. section: Core and Builtins
Improved support of the surrogatepass error handler in the UTF-8 and UTF-16
incremental decoders.
..
.. bpo: 37330
.. date: 2019-06-18-17-53-06
.. nonce: wAvHmz
.. section: Core and Builtins
:func:`open`, :func:`io.open`, :func:`codecs.open` and
:class:`fileinput.FileInput` no longer accept ``'U'`` ("universal newline")
in the file mode. This flag was deprecated since Python 3.3.
..
.. bpo: 35224
.. date: 2019-06-17-06-03-55
.. nonce: FHWPGv
.. section: Core and Builtins
Reverse evaluation order of key: value in dict comprehensions as proposed in
PEP 572. I.e. in ``{k: v for ...}``, ``k`` will be evaluated before ``v``.
..
.. bpo: 37316
.. date: 2019-06-17-03-53-16
.. nonce: LytDX_
.. section: Core and Builtins
Fix the :c:func:`PySys_Audit` call in :class:`mmap.mmap`.
..
.. bpo: 37300
.. date: 2019-06-16-02-38-25
.. nonce: WJkgKV
.. section: Core and Builtins
Remove an unnecessary Py_XINCREF in classobject.c.
..
.. bpo: 37269
.. date: 2019-06-14-06-32-33
.. nonce: SjVVAe
.. section: Core and Builtins
Fix a bug in the peephole optimizer that was not treating correctly constant
conditions with binary operators. Patch by Pablo Galindo.
..
.. bpo: 20443
.. date: 2019-06-13-12-55-38
.. nonce: bQWAxg
.. section: Core and Builtins
Python now gets the absolute path of the script filename specified on the
command line (ex: "python3 script.py"): the __file__ attribute of the
__main__ module and sys.path[0] become an absolute path, rather than a
relative path.
..
.. bpo: 37257
.. date: 2019-06-13-02-27-12
.. nonce: IMxDvT
.. section: Core and Builtins
Python's small object allocator (``obmalloc.c``) now allows (no more than)
one empty arena to remain available for immediate reuse, without returning
it to the OS. This prevents thrashing in simple loops where an arena could
be created and destroyed anew on each iteration.
..
.. bpo: 37231
.. date: 2019-06-12-14-39-16
.. nonce: LF41Es
.. section: Core and Builtins
The dispatching of type slots to special methods (for example calling
``__mul__`` when doing ``x * y``) has been made faster.
..
.. bpo: 36974
.. date: 2019-06-11-12-59-38
.. nonce: bVYmSA
.. section: Core and Builtins
Implemented separate vectorcall functions for every calling convention of
builtin functions and methods. This improves performance for calls.
..
.. bpo: 37213
.. date: 2019-06-11-11-15-19
.. nonce: UPii5K
.. section: Core and Builtins
Handle correctly negative line offsets in the peephole optimizer. Patch by
Pablo Galindo.
..
.. bpo: 37219
.. date: 2019-06-10-23-18-31
.. nonce: jPSufq
.. section: Core and Builtins
Remove erroneous optimization for empty set differences.
..
.. bpo: 15913
.. date: 2019-06-06-20-52-38
.. nonce: 5Sg5cv
.. section: Core and Builtins
Implement :c:func:`PyBuffer_SizeFromFormat()` function (previously
documented but not implemented): call :func:`struct.calcsize`. Patch by
Joannah Nanjekye.
..
.. bpo: 36922
.. date: 2019-06-06-13-59-52
.. nonce: EMZ3TF
.. section: Core and Builtins
Slot functions optimize any callable with ``Py_TPFLAGS_METHOD_DESCRIPTOR``
instead of only instances of ``function``.
..
.. bpo: 36974
.. date: 2019-06-06-11-00-55
.. nonce: wdzzym
.. section: Core and Builtins
The slot ``tp_vectorcall_offset`` is inherited unconditionally to support
``super().__call__()`` when the base class uses vectorcall.
..
.. bpo: 37160
.. date: 2019-06-05-09-24-17
.. nonce: O3IAY3
.. section: Core and Builtins
:func:`threading.get_native_id` now also supports NetBSD.
..
.. bpo: 37077
.. date: 2019-05-28-11-47-44
.. nonce: S1h0Fc
.. section: Core and Builtins
Add :func:`threading.get_native_id` support for AIX. Patch by M. Felt
..
.. bpo: 36781
.. date: 2019-05-06-09-59-31
.. nonce: uocWt6
.. section: Core and Builtins
:func:`sum` has been optimized for boolean values.
..
.. bpo: 34556
.. date: 2019-05-05-18-09-40
.. nonce: o9kfpu
.. section: Core and Builtins
Add ``--upgrade-deps`` to venv module. Patch by Cooper Ry Lees
..
.. bpo: 20523
.. date: 2019-02-15-20-42-36
.. nonce: rRLrvr
.. section: Core and Builtins
``pdb.Pdb`` supports ~/.pdbrc in Windows 7. Patch by Tim Hopper and Dan
Lidral-Porter.
..
.. bpo: 35551
.. date: 2019-01-18-16-16-27
.. nonce: oF5pbO
.. section: Core and Builtins
Updated encodings: - Removed the "tis260" encoding, which was an alias for
the nonexistent "tactis" codec. - Added "mac_centeuro" as an alias for the
mac_latin2 encoding.
..
.. bpo: 19072
.. date: 2018-07-23-13-09-54
.. nonce: Gc59GS
.. section: Core and Builtins
The :class:`classmethod` decorator can now wrap other descriptors such as
property objects. Adapted from a patch written by Graham Dumpleton.
..
.. bpo: 27575
.. date: 2018-06-14-13-55-45
.. nonce: mMYgzv
.. section: Core and Builtins
Improve speed of dictview intersection by directly using set intersection
logic. Patch by David Su.
..
.. bpo: 30773
.. date: 2018-06-07-01-01-20
.. nonce: C31rVE
.. section: Core and Builtins
Prohibit parallel running of aclose() / asend() / athrow(). Fix ag_running
to reflect the actual running status of the AG.
..
.. bpo: 36589
.. date: 2019-11-16-22-56-51
.. nonce: 0Io76D
.. section: Library
The :func:`curses.update_lines_cols` function now returns ``None`` instead
of ``1`` on success.
..
.. bpo: 38807
.. date: 2019-11-15-09-30-29
.. nonce: PsmRog
.. section: Library
Update :exc:`TypeError` messages for :meth:`os.path.join` to include
:class:`os.PathLike` objects as acceptable input types.
..
.. bpo: 38724
.. date: 2019-11-14-14-13-29
.. nonce: T5ySfR
.. section: Library
Add a repr for ``subprocess.Popen`` objects. Patch by Andrey Doroschenko.
..
.. bpo: 38786
.. date: 2019-11-13-16-49-03
.. nonce: gNOwKh
.. section: Library
pydoc now recognizes and parses HTTPS URLs. Patch by python273.
..
.. bpo: 38785
.. date: 2019-11-13-16-17-43
.. nonce: NEOEfk
.. section: Library
Prevent asyncio from crashing if parent ``__init__`` is not called from a
constructor of object derived from ``asyncio.Future``.
..
.. bpo: 38723
.. date: 2019-11-12-15-46-28
.. nonce: gcdMFn
.. section: Library
:mod:`pdb` now uses :meth:`io.open_code` to trigger auditing events.
..
.. bpo: 27805
.. date: 2019-11-11-21-43-06
.. nonce: D3zl1_
.. section: Library
Allow opening pipes and other non-seekable files in append mode with
:func:`open`.
..
.. bpo: 38438
.. date: 2019-11-11-06-14-25
.. nonce: vSVeHN
.. section: Library
Simplify the :mod:`argparse` usage message for ``nargs="*"``.
..
.. bpo: 38761
.. date: 2019-11-10-13-40-33
.. nonce: P1UUIZ
.. section: Library
WeakSet is now registered as a collections.abc.MutableSet.
..
.. bpo: 38716
.. date: 2019-11-06-15-58-07
.. nonce: R3uMLT
.. section: Library
logging: change RotatingHandler namer and rotator to class-level attributes.
This stops __init__ from setting them to None in the case where a subclass
defines them with eponymous methods.
..
.. bpo: 38713
.. date: 2019-11-05-21-22-22
.. nonce: bmhquU
.. section: Library
Add :data:`os.P_PIDFD` constant, which may be passed to :func:`os.waitid` to
wait on a Linux process file descriptor.
..
.. bpo: 38692
.. date: 2019-11-05-19-15-57
.. nonce: 2DCDA-
.. section: Library
Add :class:`asyncio.PidfdChildWatcher`, a Linux-specific child watcher
implementation that polls process file descriptors.
..
.. bpo: 38692
.. date: 2019-11-05-07-18-24
.. nonce: UpatA7
.. section: Library
Expose the Linux ``pidfd_open`` syscall as :func:`os.pidfd_open`.
..
.. bpo: 38602
.. date: 2019-10-27-22-29-45
.. nonce: 7jvYFA
.. section: Library
Added constants :data:`~fcntl.F_OFD_GETLK`, :data:`~fcntl.F_OFD_SETLK` and
:data:`~fcntl.F_OFD_SETLKW` to the :mod:`fcntl` module. Patch by Dong-hee
Na.
..
.. bpo: 38334
.. date: 2019-10-27-00-08-49
.. nonce: pfLLmc
.. section: Library
Fixed seeking backward on an encrypted :class:`zipfile.ZipExtFile`.
..
.. bpo: 38312
.. date: 2019-10-26-14-42-20
.. nonce: e_FVWh
.. section: Library
Add :func:`curses.get_escdelay`, :func:`curses.set_escdelay`,
:func:`curses.get_tabsize`, and :func:`curses.set_tabsize` functions - by
Anthony Sottile.
..
.. bpo: 38586
.. date: 2019-10-24-17-26-39
.. nonce: cyq5nr
.. section: Library
Now :func:`~logging.config.fileConfig` correctly sets the .name of handlers
loaded.
..
.. bpo: 38565
.. date: 2019-10-24-08-10-30
.. nonce: SWSUst
.. section: Library
Add new cache_parameters() method for functools.lru_cache() to better
support pickling.
..
.. bpo: 34679
.. date: 2019-10-23-16-25-12
.. nonce: Bnw8o3
.. section: Library
asynci.ProactorEventLoop.close() now only calls signal.set_wakeup_fd() in
the main thread.
..
.. bpo: 31202
.. date: 2019-10-20-12-04-48
.. nonce: NfdIus
.. section: Library
The case the result of :func:`pathlib.WindowsPath.glob` matches now the case
of the pattern for literal parts.
..
.. bpo: 36321
.. date: 2019-10-19-21-41-20
.. nonce: CFlxfy
.. section: Library
Remove misspelled attribute. The 3.8 changelog noted that this would be
removed in 3.9.
..
.. bpo: 38521
.. date: 2019-10-18-13-57-31
.. nonce: U-7aaM
.. section: Library
Fixed erroneous equality comparison in statistics.NormalDist().
..
.. bpo: 38493
.. date: 2019-10-16-19-56-51
.. nonce: 86ExWB
.. section: Library
Added :data:`~os.CLD_KILLED` and :data:`~os.CLD_STOPPED` for
:attr:`si_code`. Patch by Dong-hee Na.
..
.. bpo: 38478
.. date: 2019-10-15-11-37-57
.. nonce: A87OPO
.. section: Library
Fixed a bug in :meth:`inspect.signature.bind` that was causing it to fail
when handling a keyword argument with same name as positional-only
parameter. Patch by Pablo Galindo.
..
.. bpo: 33604
.. date: 2019-10-15-09-47-40
.. nonce: J12cWT
.. section: Library
Fixed `hmac.new` and `hmac.HMAC` to raise TypeError instead of ValueError
when the digestmod parameter, now required in 3.8, is omitted. Also
clarified the hmac module documentation and docstrings.
..
.. bpo: 38378
.. date: 2019-10-13-11-00-03
.. nonce: yYNpSm
.. section: Library
Parameters *out* and *in* of :func:`os.sendfile` was renamed to *out_fd* and
*in_fd*.
..
.. bpo: 38417
.. date: 2019-10-12-00-13-47
.. nonce: W7x_aS
.. section: Library
Added support for setting the umask in the child process to the subprocess
module on POSIX systems.
..
.. bpo: 38449
.. date: 2019-10-11-18-49-00
.. nonce: 9TWMlz
.. section: Library
Revert GH-15522, which introduces a regression in
:meth:`mimetypes.guess_type` due to improper handling of filenames as urls.
..
.. bpo: 38431
.. date: 2019-10-10-16-53-00
.. nonce: d5wzNp
.. section: Library
Fix ``__repr__`` method for :class:`dataclasses.InitVar` to support typing
objects, patch by Samuel Colvin.
..
.. bpo: 38109
.. date: 2019-10-10-00-25-28
.. nonce: 9w-IGF
.. section: Library
Add missing :data:`stat.S_IFDOOR`, :data:`stat.S_IFPORT`,
:data:`stat.S_IFWHT`, :func:`stat.S_ISDOOR`, :func:`stat.S_ISPORT`, and
:func:`stat.S_ISWHT` values to the Python implementation of :mod:`stat`.
..
.. bpo: 38422
.. date: 2019-10-09-18-16-51
.. nonce: aiM5bq
.. section: Library
Clarify docstrings of pathlib suffix(es)
..
.. bpo: 38405
.. date: 2019-10-08-11-18-40
.. nonce: 0-7e7s
.. section: Library
Nested subclasses of :class:`typing.NamedTuple` are now pickleable.
..
.. bpo: 38332
.. date: 2019-10-05-02-07-52
.. nonce: hwrPN7
.. section: Library
Prevent :exc:`KeyError` thrown by :func:`_encoded_words.decode` when given
an encoded-word with invalid content-type encoding from propagating all the
way to :func:`email.message.get`.
..
.. bpo: 38371
.. date: 2019-10-04-18-39-59
.. nonce: S6Klvm
.. section: Library
Deprecated the ``split()`` method in :class:`_tkinter.TkappType` in favour
of the ``splitlist()`` method which has more consistent and predicable
behavior.
..
.. bpo: 38341
.. date: 2019-10-01-21-06-18
.. nonce: uqwgU_
.. section: Library
Add :exc:`smtplib.SMTPNotSupportedError` to the :mod:`smtplib` exported
names.
..
.. bpo: 38319
.. date: 2019-09-30-22-06-33
.. nonce: 5QjiDa
.. section: Library
sendfile() used in socket and shutil modules was raising OverflowError for
files >= 2GiB on 32-bit architectures. (patch by Giampaolo Rodola)
..
.. bpo: 38242
.. date: 2019-09-30-00-15-27
.. nonce: uPIyAc
.. section: Library
Revert the new asyncio Streams API
..
.. bpo: 13153
.. date: 2019-09-29-22-47-37
.. nonce: 0mO9qR
.. section: Library
OS native encoding is now used for converting between Python strings and Tcl
objects. This allows to display, copy and paste to clipboard emoji and
other non-BMP characters. Converting strings from Tcl to Python and back
now never fails (except MemoryError).
..
.. bpo: 38019
.. date: 2019-09-29-13-50-24
.. nonce: 6MoOE3
.. section: Library
Correctly handle pause/resume reading of closed asyncio unix pipe.
..
.. bpo: 38163
.. date: 2019-09-28-20-16-40
.. nonce: x51-vK
.. section: Library
Child mocks will now detect their type as either synchronous or
asynchronous, asynchronous child mocks will be AsyncMocks and synchronous
child mocks will be either MagicMock or Mock (depending on their parent
type).
..
.. bpo: 38161
.. date: 2019-09-27-16-31-28
.. nonce: zehai1
.. section: Library
Removes _AwaitEvent from AsyncMock.
..
.. bpo: 38216
.. date: 2019-09-27-15-24-45
.. nonce: -7yvZR
.. section: Library
Allow the rare code that wants to send invalid http requests from the
`http.client` library a way to do so. The fixes for bpo-30458 led to
breakage for some projects that were relying on this ability to test their
own behavior in the face of bad requests.
..
.. bpo: 28286
.. date: 2019-09-26-12-16-30
.. nonce: LdSsrN
.. section: Library
Deprecate opening :class:`~gzip.GzipFile` for writing implicitly. Always
specify the *mode* argument for writing.
..
.. bpo: 38108
.. date: 2019-09-25-21-37-02
.. nonce: Jr9HU6
.. section: Library
Any synchronous magic methods on an AsyncMock now return a MagicMock. Any
asynchronous magic methods on a MagicMock now return an AsyncMock.
..
.. bpo: 38265
.. date: 2019-09-25-05-16-19
.. nonce: X6-gsT
.. section: Library
Update the *length* parameter of :func:`os.pread` to accept
:c:type:`Py_ssize_t` instead of :c:type:`int`.
..
.. bpo: 38112
.. date: 2019-09-24-10-55-01
.. nonce: 2EinX9
.. section: Library
:mod:`compileall` has a higher default recursion limit and new command-line
arguments for path manipulation, symlinks handling, and multiple
optimization levels.
..
.. bpo: 38248
.. date: 2019-09-22-13-05-36
.. nonce: Yo3N_1
.. section: Library
asyncio: Fix inconsistent immediate Task cancellation
..
.. bpo: 38237
.. date: 2019-09-20-14-27-17
.. nonce: xRUZbx
.. section: Library
The arguments for the builtin pow function are more descriptive. They can
now also be passed in as keywords.
..
.. bpo: 34002
.. date: 2019-09-19-19-58-33
.. nonce: KBnaVX
.. section: Library
Improve efficiency in parts of email package by changing while-pop to a for
loop, using isdisjoint instead of set intersections.
..
.. bpo: 38191
.. date: 2019-09-17-12-28-27
.. nonce: 1TU0HV
.. section: Library
Constructors of :class:`~typing.NamedTuple` and :class:`~typing.TypedDict`
types now accept arbitrary keyword argument names, including "cls", "self",
"typename", "_typename", "fields" and "_fields".
..
.. bpo: 38155
.. date: 2019-09-16-21-47-48
.. nonce: d92lRc
.. section: Library
Add ``__all__`` to :mod:`datetime`. Patch by Tahia Khan.
..
.. bpo: 38185
.. date: 2019-09-16-19-12-57
.. nonce: zYWppY
.. section: Library
Fixed case-insensitive string comparison in :class:`sqlite3.Row` indexing.
..
.. bpo: 38136
.. date: 2019-09-16-09-54-42
.. nonce: MdI-Zb
.. section: Library
Changes AsyncMock call count and await count to be two different counters.
Now await count only counts when a coroutine has been awaited, not when it
has been called, and vice-versa. Update the documentation around this.
..
.. bpo: 37828
.. date: 2019-09-15-21-31-18
.. nonce: gLLDX7
.. section: Library
Fix default mock name in :meth:`unittest.mock.Mock.assert_called`
exceptions. Patch by Abraham Toriz Cruz.
..
.. bpo: 38175
.. date: 2019-09-15-10-30-33
.. nonce: 61XlUv
.. section: Library
Fix a memory leak in comparison of :class:`sqlite3.Row` objects.
..
.. bpo: 33936
.. date: 2019-09-14-10-34-00
.. nonce: 8wCI_n
.. section: Library
_hashlib no longer calls obsolete OpenSSL initialization function with
OpenSSL 1.1.0+.
..
.. bpo: 34706
.. date: 2019-09-13-14-54-33
.. nonce: HWVpOY
.. section: Library
Preserve subclassing in inspect.Signature.from_callable.
..
.. bpo: 38153
.. date: 2019-09-13-12-18-51
.. nonce: nHAbuJ
.. section: Library
Names of hashing algorithms from OpenSSL are now normalized to follow
Python's naming conventions. For example OpenSSL uses sha3-512 instead of
sha3_512 or blake2b512 instead of blake2b.
..
.. bpo: 38115
.. date: 2019-09-13-09-24-58
.. nonce: BOO-Y1
.. section: Library
Fix a bug in dis.findlinestarts() where it would return invalid bytecode
offsets. Document that a code object's co_lnotab can contain invalid
bytecode offsets.
..
.. bpo: 38148
.. date: 2019-09-13-08-55-43
.. nonce: Lnww6D
.. section: Library
Add slots to :mod:`asyncio` transport classes, which can reduce memory
usage.
..
.. bpo: 38142
.. date: 2019-09-12-18-41-35
.. nonce: 1I0Ch0
.. section: Library
The _hashlib OpenSSL wrapper extension module is now PEP-384 compliant.
..
.. bpo: 9216
.. date: 2019-09-12-14-54-45
.. nonce: W7QMpC
.. section: Library
hashlib constructors now support usedforsecurity flag to signal that a
hashing algorithm is not used in a security context.
..
.. bpo: 36991
.. date: 2019-09-12-14-52-38
.. nonce: 1OcSm8
.. section: Library
Fixes a potential incorrect AttributeError exception escaping
ZipFile.extract() in some unsupported input error situations.
..
.. bpo: 38134
.. date: 2019-09-12-13-18-55
.. nonce: gXJTbP
.. section: Library
Remove obsolete copy of PBKDF2_HMAC_fast. All supported OpenSSL versions
contain a fast implementation.
..
.. bpo: 38132
.. date: 2019-09-12-12-47-35
.. nonce: KSFx1F
.. section: Library
The OpenSSL hashlib wrapper uses a simpler implementation. Several Macros
and pointless caches are gone. The hash name now comes from OpenSSL's EVP.
The algorithm name stays the same, except it is now always lower case.
..
.. bpo: 38008
.. date: 2019-09-12-10-47-34
.. nonce: sH74Iy
.. section: Library
Fix parent class check in protocols to correctly identify the module that
provides a builtin protocol, instead of assuming they all come from the
:mod:`collections.abc` module
..
.. bpo: 34037
.. date: 2019-09-11-21-38-41
.. nonce: LIAS_3
.. section: Library
For :mod:`asyncio`, add a new coroutine
:meth:`loop.shutdown_default_executor`. The new coroutine provides an API to
schedule an executor shutdown that waits on the threadpool to finish
closing. Also, :func:`asyncio.run` has been updated to utilize the new
coroutine. Patch by Kyle Stanley.
..
.. bpo: 37405
.. date: 2019-09-11-20-27-41
.. nonce: MG5xiY
.. section: Library
Fixed regression bug for socket.getsockname() for non-CAN_ISOTP AF_CAN
address family sockets by returning a 1-tuple instead of string.
..
.. bpo: 38121
.. date: 2019-09-11-16-54-57
.. nonce: SrSDzB
.. section: Library
Update parameter names on functions in importlib.metadata matching the
changes in the 0.22 release of importlib_metadata.
..
.. bpo: 38110
.. date: 2019-09-11-14-49-20
.. nonce: A19Y-q
.. section: Library
The os.closewalk() implementation now uses the libc fdwalk() API on
platforms where it is available.
..
.. bpo: 38093
.. date: 2019-09-11-14-45-30
.. nonce: yQ6k7y
.. section: Library
Fixes AsyncMock so it doesn't crash when used with AsyncContextManagers or
AsyncIterators.
..
.. bpo: 37488
.. date: 2019-09-11-11-44-16
.. nonce: S8CJUL
.. section: Library
Add warning to :meth:`datetime.utctimetuple`, :meth:`datetime.utcnow` and
:meth:`datetime.utcfromtimestamp` .
..
.. bpo: 35640
.. date: 2019-09-10-15-52-55
.. nonce: X0lp5f
.. section: Library
Allow passing a :term:`path-like object` as ``directory`` argument to the
:class:`http.server.SimpleHTTPRequestHandler` class. Patch by Géry Ogam.
..
.. bpo: 38086
.. date: 2019-09-10-11-42-59
.. nonce: w5TlG-
.. section: Library
Update importlib.metadata with changes from `importlib_metadata 0.21
<https://gitlab.com/python-devs/importlib_metadata/blob/0.21/importlib_metadata/docs/changelog.rst>`_.
..
.. bpo: 37251
.. date: 2019-09-10-10-59-50
.. nonce: 8zn2o3
.. section: Library
Remove `__code__` check in AsyncMock that incorrectly evaluated function
specs as async objects but failed to evaluate classes with `__await__` but
no `__code__` attribute defined as async objects.
..
.. bpo: 38037
.. date: 2019-09-09-18-39-23
.. nonce: B0UgFU
.. section: Library
Fix reference counters in the :mod:`signal` module.
..
.. bpo: 38066
.. date: 2019-09-09-14-39-47
.. nonce: l9mWv-
.. section: Library
Hide internal asyncio.Stream methods: feed_eof(), feed_data(),
set_exception() and set_transport().
..
.. bpo: 38059
.. date: 2019-09-08-11-36-50
.. nonce: 8SA6co
.. section: Library
inspect.py now uses sys.exit() instead of exit()
..
.. bpo: 38049
.. date: 2019-09-07-12-32-50
.. nonce: xKP4tf
.. section: Library
Added command-line interface for the :mod:`ast` module.
..
.. bpo: 37953
.. date: 2019-09-06-17-40-34
.. nonce: db5FQq
.. section: Library
In :mod:`typing`, improved the ``__hash__`` and ``__eq__`` methods for
:class:`ForwardReferences`.
..
.. bpo: 38026
.. date: 2019-09-04-20-34-14
.. nonce: 0LLRX-
.. section: Library
Fixed :func:`inspect.getattr_static` used ``isinstance`` while it should
avoid dynamic lookup.
..
.. bpo: 35923
.. date: 2019-09-03-01-41-35
.. nonce: lYpKbY
.. section: Library
Update :class:`importlib.machinery.BuiltinImporter` to use
``loader._ORIGIN`` instead of a hardcoded value. Patch by Dong-hee Na.
..
.. bpo: 38010
.. date: 2019-09-02-14-30-39
.. nonce: JOnz9Z
.. section: Library
In ``importlib.metadata`` sync with ``importlib_metadata`` 0.20, clarifying
behavior of ``files()`` and fixing issue where only one requirement was
returned for ``requires()`` on ``dist-info`` packages.
..
.. bpo: 38006
.. date: 2019-09-02-13-37-27
.. nonce: Y7vA0Q
.. section: Library
weakref.WeakValueDictionary defines a local remove() function used as
callback for weak references. This function was created with a closure.
Modify the implementation to avoid the closure.
..
.. bpo: 37995
.. date: 2019-08-31-13-36-09
.. nonce: rS8HzT
.. section: Library
Added the *indent* option to :func:`ast.dump` which allows it to produce a
multiline indented output.
..
.. bpo: 34410
.. date: 2019-08-31-01-52-59
.. nonce: 7KbWZQ
.. section: Library
Fixed a crash in the :func:`tee` iterator when re-enter it. RuntimeError is
now raised in this case.
..
.. bpo: 37140
.. date: 2019-08-30-11-21-10
.. nonce: cFAX-a
.. section: Library
Fix a ctypes regression of Python 3.8. When a ctypes.Structure is passed by
copy to a function, ctypes internals created a temporary object which had
the side effect of calling the structure finalizer (__del__) twice. The
Python semantics requires a finalizer to be called exactly once. Fix ctypes
internals to no longer call the finalizer twice.
..
.. bpo: 37587
.. date: 2019-08-29-18-48-48
.. nonce: N7TGTC
.. section: Library
``_json.scanstring`` is now up to 3x faster when there are many backslash
escaped characters in the JSON string.
..
.. bpo: 37834
.. date: 2019-08-29-16-41-36
.. nonce: FThnsh
.. section: Library
Prevent shutil.rmtree exception when built on non-Windows system without fd
system call support, like older versions of macOS.
..
.. bpo: 10978
.. date: 2019-08-29-01-19-13
.. nonce: J6FQYY
.. section: Library
Semaphores and BoundedSemaphores can now release more than one waiting
thread at a time.
..
.. bpo: 37972
.. date: 2019-08-28-21-40-12
.. nonce: kP-n4L
.. section: Library
Subscripts to the `unittest.mock.call` objects now receive the same chaining
mechanism as any other custom attributes, so that the following usage no
longer raises a `TypeError`:
call().foo().__getitem__('bar')
Patch by blhsing
..
.. bpo: 37965
.. date: 2019-08-28-14-04-18
.. nonce: 7xGE-C
.. section: Library
Fix C compiler warning caused by distutils.ccompiler.CCompiler.has_function.
..
.. bpo: 37964
.. date: 2019-08-27-21-19-28
.. nonce: SxdnsF
.. section: Library
Add ``F_GETPATH`` command to :mod:`fcntl`.
..
.. bpo: 37960
.. date: 2019-08-27-10-52-13
.. nonce: CTY7Lw
.. section: Library
``repr()`` of buffered and text streams now silences only expected
exceptions when get the value of "name" and "mode" attributes.
..
.. bpo: 37961
.. date: 2019-08-27-10-30-44
.. nonce: 4nm0zZ
.. section: Library
Add a ``total_nframe`` field to the traces collected by the tracemalloc
module. This field indicates the original number of frames before it was
truncated.
..
.. bpo: 37951
.. date: 2019-08-27-10-03-48
.. nonce: MfRQgL
.. section: Library
Most features of the subprocess module now work again in subinterpreters.
Only *preexec_fn* is restricted in subinterpreters.
..
.. bpo: 36205
.. date: 2019-08-27-03-53-26
.. nonce: AfkGRl
.. section: Library
Fix the rusage implementation of time.process_time() to correctly report the
sum of the system and user CPU time.
..
.. bpo: 37950
.. date: 2019-08-26-10-45-51
.. nonce: -K1IKT
.. section: Library
Fix :func:`ast.dump` when call with incompletely initialized node.
..
.. bpo: 34679
.. date: 2019-08-25-18-07-48
.. nonce: HECzL7
.. section: Library
Restores instantiation of Windows IOCP event loops from the non-main thread.
..
.. bpo: 36917
.. date: 2019-08-25-14-56-42
.. nonce: GBxdw2
.. section: Library
Add default implementation of the :meth:`ast.NodeVisitor.visit_Constant`
method which emits a deprecation warning and calls corresponding methody
``visit_Num()``, ``visit_Str()``, etc.
..
.. bpo: 37798
.. date: 2019-08-24-16-54-49
.. nonce: 7mRQCk
.. section: Library
Update test_statistics.py to verify that the statistics module works well
for both C and Python implementations. Patch by Dong-hee Na
..
.. bpo: 26589
.. date: 2019-08-23-00-55-19
.. nonce: M1xyxG
.. section: Library
Added a new status code to the http module: 451
UNAVAILABLE_FOR_LEGAL_REASONS
..
.. bpo: 37915
.. date: 2019-08-22-16-13-27
.. nonce: xyoZI5
.. section: Library
Fix a segmentation fault that appeared when comparing instances of
``datetime.timezone`` and ``datetime.tzinfo`` objects. Patch by Pablo
Galindo.
..
.. bpo: 32554
.. date: 2019-08-22-01-49-05
.. nonce: 4xiXyM
.. section: Library
Deprecate having random.seed() call hash on arbitrary types.
..
.. bpo: 9938
.. date: 2019-08-21-16-38-56
.. nonce: t3G7N9
.. section: Library
Add optional keyword argument ``exit_on_error`` for :class:`ArgumentParser`.
..
.. bpo: 37851
.. date: 2019-08-21-13-43-04
.. nonce: mIIfD_
.. section: Library
The :mod:`faulthandler` module no longer allocates its alternative stack at
Python startup. Now the stack is only allocated at the first faulthandler
usage.
..
.. bpo: 32793
.. date: 2019-08-20-05-17-32
.. nonce: cgpXl6
.. section: Library
Fix a duplicated debug message when :meth:`smtplib.SMTP.connect` is called.
..
.. bpo: 37885
.. date: 2019-08-19-10-31-41
.. nonce: 4Nc9sp
.. section: Library
venv: Don't generate unset variable warning on deactivate.
..
.. bpo: 37868
.. date: 2019-08-17-22-33-54
.. nonce: hp64fi
.. section: Library
Fix dataclasses.is_dataclass when given an instance that never raises
AttributeError in __getattr__. That is, an object that returns something
for __dataclass_fields__ even if it's not a dataclass.
..
.. bpo: 37811
.. date: 2019-08-14-21-41-07
.. nonce: d1xYj7
.. section: Library
Fix ``socket`` module's ``socket.connect(address)`` function being unable to
establish connection in case of interrupted system call. The problem was
observed on all OSes which ``poll(2)`` system call can take only
non-negative integers and -1 as a timeout value.
..
.. bpo: 37863
.. date: 2019-08-14-20-46-39
.. nonce: CkXqgX
.. section: Library
Optimizations for Fraction.__hash__ suggested by Tim Peters.
..
.. bpo: 21131
.. date: 2019-08-14-15-34-23
.. nonce: 0MMQRi
.. section: Library
Fix ``faulthandler.register(chain=True)`` stack. faulthandler now allocates
a dedicated stack of ``SIGSTKSZ*2`` bytes, instead of just ``SIGSTKSZ``
bytes. Calling the previous signal handler in faulthandler signal handler
uses more than ``SIGSTKSZ`` bytes of stack memory on some platforms.
..
.. bpo: 37798
.. date: 2019-08-14-13-51-24
.. nonce: AmXrik
.. section: Library
Add C fastpath for statistics.NormalDist.inv_cdf() Patch by Dong-hee Na
..
.. bpo: 37804
.. date: 2019-08-12-23-07-47
.. nonce: Ene6L-
.. section: Library
Remove the deprecated method `threading.Thread.isAlive()`. Patch by Dong-hee
Na.
..
.. bpo: 37819
.. date: 2019-08-11-10-34-19
.. nonce: LVJls-
.. section: Library
Add Fraction.as_integer_ratio() to match the corresponding methods in bool,
int, float, and decimal.
..
.. bpo: 14465
.. date: 2019-08-10-18-50-04
.. nonce: qZGC4g
.. section: Library
Add an xml.etree.ElementTree.indent() function for pretty-printing XML
trees. Contributed by Stefan Behnel.
..
.. bpo: 37810
.. date: 2019-08-10-12-33-27
.. nonce: d4zbvB
.. section: Library
Fix :mod:`difflib` ``?`` hint in diff output when dealing with tabs. Patch
by Anthony Sottile.
..
.. bpo: 37772
.. date: 2019-08-07-23-48-09
.. nonce: hLCvdn
.. section: Library
In ``zipfile.Path``, when adding implicit dirs, ensure that ancestral
directories are added and that duplicates are excluded.
..
.. bpo: 18578
.. date: 2019-08-07-19-34-07
.. nonce: xfvdb_
.. section: Library
Renamed and documented `test.bytecode_helper` as
`test.support.bytecode_helper`. Patch by Joannah Nanjekye.
..
.. bpo: 37785
.. date: 2019-08-07-14-49-22
.. nonce: y7OlT8
.. section: Library
Fix xgettext warnings in :mod:`argparse`.
..
.. bpo: 34488
.. date: 2019-08-06-21-30-58
.. nonce: OqxVo8
.. section: Library
:meth:`writelines` method of :class:`io.BytesIO` is now slightly faster when
many small lines are passed. Patch by Sergey Fedoseev.
..
.. bpo: 37449
.. date: 2019-08-04-17-22-33
.. nonce: ycbL2z
.. section: Library
`ensurepip` now uses `importlib.resources.read_binary()` to read data
instead of `pkgutil.get_data()`. Patch by Joannah Nanjekye.
..
.. bpo: 28292
.. date: 2019-08-04-11-47-58
.. nonce: vkihH5
.. section: Library
Mark calendar.py helper functions as being private. The follows PEP 8
guidance to maintain the style conventions in the module and it addresses a
known case of user confusion.
..
.. bpo: 18049
.. date: 2019-08-02-16-44-42
.. nonce: OA4qBL
.. section: Library
Add definition of THREAD_STACK_SIZE for AIX in Python/thread_pthread.h The
default thread stacksize caused crashes with the default recursion limit
Patch by M Felt
..
.. bpo: 37742
.. date: 2019-08-02-14-01-25
.. nonce: f4Xn9S
.. section: Library
The logging.getLogger() API now returns the root logger when passed the name
'root', whereas previously it returned a non-root logger named 'root'. This
could affect cases where user code explicitly wants a non-root logger named
'root', or instantiates a logger using logging.getLogger(__name__) in some
top-level module called 'root.py'.
..
.. bpo: 37738
.. date: 2019-08-01-17-11-16
.. nonce: A3WWcT
.. section: Library
Fix the implementation of curses ``addch(str, color_pair)``: pass the color
pair to ``setcchar()``, instead of always passing 0 as the color pair.
..
.. bpo: 37723
.. date: 2019-07-31-16-49-01
.. nonce: zq6tw8
.. section: Library
Fix performance regression on regular expression parsing with huge character
sets. Patch by Yann Vaginay.
..
.. bpo: 35943
.. date: 2019-07-31-15-52-51
.. nonce: -KswoB
.. section: Library
The function :c:func:`PyImport_GetModule` now ensures any module it returns
is fully initialized. Patch by Joannah Nanjekye.
..
.. bpo: 32178
.. date: 2019-07-30-22-41-05
.. nonce: X-IFLe
.. section: Library
Fix IndexError in :mod:`email` package when trying to parse invalid address
fields starting with ``:``.
..
.. bpo: 37268
.. date: 2019-07-30-01-27-29
.. nonce: QDmA44
.. section: Library
The :mod:`parser` module is deprecated and will be removed in future
versions of Python.
..
.. bpo: 11953
.. date: 2019-07-29-21-39-45
.. nonce: 4Hpwf9
.. section: Library
Completing WSA* error codes in :mod:`socket`.
..
.. bpo: 37685
.. date: 2019-07-28-22-25-25
.. nonce: _3bN9f
.. section: Library
Fixed comparisons of :class:`datetime.timedelta` and
:class:`datetime.timezone`.
..
.. bpo: 37697
.. date: 2019-07-28-17-44-21
.. nonce: 7UV5d0
.. section: Library
Synchronize ``importlib.metadata`` with `importlib_metadata 0.19
<https://gitlab.com/python-devs/importlib_metadata/-/milestones/20>`_,
improving handling of EGG-INFO files and fixing a crash when entry point
names contained colons.
..
.. bpo: 37695
.. date: 2019-07-27-20-21-03
.. nonce: QANdvg
.. section: Library
Correct :func:`curses.unget_wch` error message. Patch by Anthony Sottile.
..
.. bpo: 37689
.. date: 2019-07-27-18-00-43
.. nonce: glEmZi
.. section: Library
Add :meth:`is_relative_to` in :class:`PurePath` to determine whether or not
one path is relative to another.
..
.. bpo: 29553
.. date: 2019-07-27-10-14-45
.. nonce: TVeIDe
.. section: Library
Fixed :meth:`argparse.ArgumentParser.format_usage` for mutually exclusive
groups. Patch by Andrew Nester.
..
.. bpo: 37691
.. date: 2019-07-26-22-30-01
.. nonce: 1Li3rx
.. section: Library
Let math.dist() accept coordinates as sequences (or iterables) rather than
just tuples.
..
.. bpo: 37685
.. date: 2019-07-26-00-12-29
.. nonce: TqckMZ
.. section: Library
Fixed ``__eq__``, ``__lt__`` etc implementations in some classes. They now
return :data:`NotImplemented` for unsupported type of the other operand.
This allows the other operand to play role (for example the equality
comparison with :data:`~unittest.mock.ANY` will return ``True``).
..
.. bpo: 37354
.. date: 2019-07-25-10-28-40
.. nonce: RT3_3H
.. section: Library
Make Activate.ps1 Powershell script static to allow for signing it.
..
.. bpo: 37664
.. date: 2019-07-24-18-27-44
.. nonce: o-GYZC
.. section: Library
Update wheels bundled with ensurepip (pip 19.2.3 and setuptools 41.2.0)
..
.. bpo: 37663
.. date: 2019-07-24-14-38-53
.. nonce: h4-9-1
.. section: Library
Bring consistency to venv shell activation scripts by always using
__VENV_PROMPT__.
..
.. bpo: 37642
.. date: 2019-07-21-20-59-31
.. nonce: L61Bvy
.. section: Library
Allowed the pure Python implementation of :class:`datetime.timezone` to
represent sub-minute offsets close to minimum and maximum boundaries,
specifically in the ranges (23:59, 24:00) and (-23:59, 24:00). Patch by
Ngalim Siregar
..
.. bpo: 36161
.. date: 2019-07-20-01-17-43
.. nonce: Fzf-f9
.. section: Library
In :mod:`posix`, use ``ttyname_r`` instead of ``ttyname`` for thread safety.
..
.. bpo: 36324
.. date: 2019-07-19-22-44-41
.. nonce: 1VjywS
.. section: Library
Make internal attributes for statistics.NormalDist() private.
..
.. bpo: 37555
.. date: 2019-07-19-20-13-48
.. nonce: S5am28
.. section: Library
Fix `NonCallableMock._call_matcher` returning tuple instead of `_Call`
object when `self._spec_signature` exists. Patch by Elizabeth Uselton
..
.. bpo: 29446
.. date: 2019-07-19-16-06-48
.. nonce: iXGuoi
.. section: Library
Make `from tkinter import *` import only the expected objects.
..
.. bpo: 16970
.. date: 2019-07-19-01-46-56
.. nonce: GEASf5
.. section: Library
Adding a value error when an invalid value in passed to nargs Patch by
Robert Leenders
..
.. bpo: 34443
.. date: 2019-07-17-11-10-08
.. nonce: OFnGqz
.. section: Library
Exceptions from :mod:`enum` now use the ``__qualname`` of the enum class in
the exception message instead of the ``__name__``.
..
.. bpo: 37491
.. date: 2019-07-17-06-54-43
.. nonce: op0aMs
.. section: Library
Fix ``IndexError`` when parsing email headers with unexpectedly ending
bare-quoted string value. Patch by Abhilash Raj.
..
.. bpo: 37587
.. date: 2019-07-13-16-02-48
.. nonce: fd-1aF
.. section: Library
Make json.loads faster for long strings. (Patch by Marco Paolini)
..
.. bpo: 18378
.. date: 2019-07-13-13-40-12
.. nonce: NHcojp
.. section: Library
Recognize "UTF-8" as a valid value for LC_CTYPE in locale._parse_localename.
..
.. bpo: 37579
.. date: 2019-07-13-10-59-43
.. nonce: B1Tq9i
.. section: Library
Return :exc:`NotImplemented` in Python implementation of ``__eq__`` for
:class:`~datetime.timedelta` and :class:`~datetime.time` when the other
object being compared is not of the same type to match C implementation.
Patch by Karthikeyan Singaravelan.
..
.. bpo: 21478
.. date: 2019-07-10-23-07-11
.. nonce: cCw9rF
.. section: Library
Record calls to parent when autospecced object is attached to a mock using
:func:`unittest.mock.attach_mock`. Patch by Karthikeyan Singaravelan.
..
.. bpo: 37531
.. date: 2019-07-09-19-38-26
.. nonce: GX7s8S
.. section: Library
"python3 -m test -jN --timeout=TIMEOUT" now kills a worker process if it
runs longer than *TIMEOUT* seconds.
..
.. bpo: 37482
.. date: 2019-07-09-11-20-21
.. nonce: auzvev
.. section: Library
Fix serialization of display name in originator or destination address
fields with both encoded words and special chars.
..
.. bpo: 36993
.. date: 2019-07-09-05-44-39
.. nonce: 4javqu
.. section: Library
Improve error reporting for corrupt zip files with bad zip64 extra data.
Patch by Daniel Hillier.
..
.. bpo: 37502
.. date: 2019-07-08-03-15-04
.. nonce: qZGC4g
.. section: Library
pickle.loads() no longer raises TypeError when the buffers argument is set
to None
..
.. bpo: 37520
.. date: 2019-07-07-21-09-08
.. nonce: Gg0KD6
.. section: Library
Correct behavior for zipfile.Path.parent when the path object identifies a
subdirectory.
..
.. bpo: 18374
.. date: 2019-07-05-21-46-45
.. nonce: qgE0H3
.. section: Library
Fix the ``.col_offset`` attribute of nested :class:`ast.BinOp` instances
which had a too large value in some situations.
..
.. bpo: 37424
.. date: 2019-07-04-13-00-20
.. nonce: 0i1MR-
.. section: Library
Fixes a possible hang when using a timeout on `subprocess.run()` while
capturing output. If the child process spawned its own children or
otherwise connected its stdout or stderr handles with another process, we
could hang after the timeout was reached and our child was killed when
attempting to read final output from the pipes.
..
.. bpo: 37421
.. date: 2019-07-03-12-47-52
.. nonce: gR5hC8
.. section: Library
Fix :func:`multiprocessing.util.get_temp_dir` finalizer: clear also the
'tempdir' configuration of the current process, so next call to
``get_temp_dir()`` will create a new temporary directory, rather than
reusing the removed temporary directory.
..
.. bpo: 37481
.. date: 2019-07-02-13-08-30
.. nonce: hd5k09
.. section: Library
The distutils ``bdist_wininst`` command is deprecated in Python 3.8, use
``bdist_wheel`` (wheel packages) instead.
..
.. bpo: 37479
.. date: 2019-07-02-12-43-57
.. nonce: O53a5S
.. section: Library
When `Enum.__str__` is overridden in a derived class, the override will be
used by `Enum.__format__` regardless of whether mixin classes are present.
..
.. bpo: 37440
.. date: 2019-06-28-16-40-17
.. nonce: t3wX-N
.. section: Library
http.client now enables TLS 1.3 post-handshake authentication for default
context or if a cert_file is passed to HTTPSConnection.
..
.. bpo: 37437
.. date: 2019-06-27-20-33-50
.. nonce: du39_A
.. section: Library
Update vendorized expat version to 2.2.7.
..
.. bpo: 37428
.. date: 2019-06-27-13-27-02
.. nonce: _wcwUd
.. section: Library
SSLContext.post_handshake_auth = True no longer sets
SSL_VERIFY_POST_HANDSHAKE verify flag for client connections. Although the
option is documented as ignored for clients, OpenSSL implicitly enables cert
chain validation when the flag is set.
..
.. bpo: 37420
.. date: 2019-06-26-22-25-05
.. nonce: CxFJ09
.. section: Library
:func:`os.sched_setaffinity` now correctly handles errors that arise during
iteration over its ``mask`` argument. Patch by Brandt Bucher.
..
.. bpo: 37412
.. date: 2019-06-26-16-28-59
.. nonce: lx0VjC
.. section: Library
The :func:`os.getcwdb` function now uses the UTF-8 encoding on Windows,
rather than the ANSI code page: see :pep:`529` for the rationale. The
function is no longer deprecated on Windows.
..
.. bpo: 37406
.. date: 2019-06-26-03-00-06
.. nonce: uovkpq
.. section: Library
The sqlite3 module now raises TypeError, rather than ValueError, if
operation argument type is not str: execute(), executemany() and calling a
connection.
..
.. bpo: 29412
.. date: 2019-06-25-19-27-25
.. nonce: n4Zqdh
.. section: Library
Fix IndexError in parsing a header value ending unexpectedly. Patch by
Abhilash Raj.
..
.. bpo: 36546
.. date: 2019-06-25-05-07-48
.. nonce: RUcxaK
.. section: Library
The *dist* argument for statistics.quantiles() is now positional only. The
current name doesn't reflect that the argument can be either a dataset or a
distribution. Marking the parameter as positional avoids confusion and
makes it possible to change the name later.
..
.. bpo: 37394
.. date: 2019-06-25-02-10-00
.. nonce: srZ1zx
.. section: Library
Fix a bug that was causing the :mod:`queue` module to fail if the
accelerator module was not available. Patch by Pablo Galindo.
..
.. bpo: 37376
.. date: 2019-06-24-11-26-34
.. nonce: SwSUQ4
.. section: Library
:mod:`pprint` now has support for :class:`types.SimpleNamespace`. Patch by
Carl Bordum Hansen.
..
.. bpo: 26967
.. date: 2019-06-23-12-46-10
.. nonce: xEuem1
.. section: Library
An :class:`~argparse.ArgumentParser` with ``allow_abbrev=False`` no longer
disables grouping of short flags, such as ``-vv``, but only disables
abbreviation of long flags as documented. Patch by Zac Hatfield-Dodds.
..
.. bpo: 37212
.. date: 2019-06-22-22-00-35
.. nonce: Zhv-tq
.. section: Library
:func:`unittest.mock.call` now preserves the order of keyword arguments in
repr output. Patch by Karthikeyan Singaravelan.
..
.. bpo: 37372
.. date: 2019-06-22-12-30-00
.. nonce: kIKqZ6
.. section: Library
Fix error unpickling datetime.time objects from Python 2 with seconds>=24.
Patch by Justin Blanchard.
..
.. bpo: 37345
.. date: 2019-06-22-08-51-44
.. nonce: o8XABX
.. section: Library
Add formal support for UDPLITE sockets. Support was present before, but it
is now easier to detect support with ``hasattr(socket, 'IPPROTO_UDPLITE')``
and there are constants defined for each of the values needed:
:py:obj:`socket.IPPROTO_UDPLITE`, :py:obj:`UDPLITE_SEND_CSCOV`, and
:py:obj:`UDPLITE_RECV_CSCOV`. Patch by Gabe Appleton.
..
.. bpo: 37358
.. date: 2019-06-21-14-54-02
.. nonce: RsASpn
.. section: Library
Optimized ``functools.partial`` by using vectorcall.
..
.. bpo: 37347
.. date: 2019-06-20-14-23-48
.. nonce: Gf9yYI
.. section: Library
:meth:`sqlite3.Connection.create_aggregate`,
:meth:`sqlite3.Connection.create_function`,
:meth:`sqlite3.Connection.set_authorizer`,
:meth:`sqlite3.Connection.set_progress_handler`
:meth:`sqlite3.Connection.set_trace_callback` methods lead to segfaults if
some of these methods are called twice with an equal object but not the
same. Now callbacks are stored more carefully. Patch by Aleksandr Balezin.
..
.. bpo: 37163
.. date: 2019-06-19-10-35-53
.. nonce: 9pPg2F
.. section: Library
The *obj* argument of :func:`dataclasses.replace` is positional-only now.
..
.. bpo: 37085
.. date: 2019-06-18-16-29-31
.. nonce: GeYaD6
.. section: Library
Add the optional Linux SocketCAN Broadcast Manager constants, used as flags
to configure the BCM behaviour, in the socket module. Patch by Karl Ding.
..
.. bpo: 37328
.. date: 2019-06-18-15-31-33
.. nonce: 2PW1-l
.. section: Library
``HTMLParser.unescape`` is removed. It was undocumented and deprecated
since Python 3.4.
..
.. bpo: 37305
.. date: 2019-06-18-13-59-55
.. nonce: fGzWlP
.. section: Library
Add .webmanifest -> application/manifest+json to list of recognized file
types and content type headers
..
.. bpo: 37320
.. date: 2019-06-17-22-10-37
.. nonce: ffieYa
.. section: Library
``aifc.openfp()`` alias to ``aifc.open()``, ``sunau.openfp()`` alias to
``sunau.open()``, and ``wave.openfp()`` alias to ``wave.open()`` have been
removed. They were deprecated since Python 3.7.
..
.. bpo: 37315
.. date: 2019-06-17-11-59-52
.. nonce: o1xFC0
.. section: Library
Deprecated accepting floats with integral value (like ``5.0``) in
:func:`math.factorial`.
..
.. bpo: 37312
.. date: 2019-06-17-10-03-52
.. nonce: qKvBfF
.. section: Library
``_dummy_thread`` and ``dummy_threading`` modules have been removed. These
modules were deprecated since Python 3.7 which requires threading support.
..
.. bpo: 33972
.. date: 2019-06-15-14-39-50
.. nonce: XxnNPw
.. section: Library
Email with single part but content-type set to ``multipart/*`` doesn't raise
AttributeError anymore.
..
.. bpo: 37280
.. date: 2019-06-14-13-30-47
.. nonce: Fxur0F
.. section: Library
Use threadpool for reading from file for sendfile fallback mode.
..
.. bpo: 37279
.. date: 2019-06-14-13-25-56
.. nonce: OHlW6l
.. section: Library
Fix asyncio sendfile support when sendfile sends extra data in fallback
mode.
..
.. bpo: 19865
.. date: 2019-06-14-08-30-16
.. nonce: FRGH4I
.. section: Library
:func:`ctypes.create_unicode_buffer()` now also supports non-BMP characters
on platforms with 16-bit :c:type:`wchar_t` (for example, Windows and AIX).
..
.. bpo: 37266
.. date: 2019-06-13-11-59-52
.. nonce: goLjef
.. section: Library
In a subinterpreter, spawning a daemon thread now raises an exception.
Daemon threads were never supported in subinterpreters. Previously, the
subinterpreter finalization crashed with a Python fatal error if a daemon
thread was still running.
..
.. bpo: 37210
.. date: 2019-06-12-16-10-50
.. nonce: r4yMg6
.. section: Library
Allow pure Python implementation of :mod:`pickle` to work even when the C
:mod:`_pickle` module is unavailable.
..
.. bpo: 21872
.. date: 2019-06-12-08-56-22
.. nonce: V9QGGN
.. section: Library
Fix :mod:`lzma`: module decompresses data incompletely. When decompressing a
FORMAT_ALONE format file, and it doesn't have the end marker, sometimes the
last one to dozens bytes can't be output. Patch by Ma Lin.
..
.. bpo: 35922
.. date: 2019-06-11-19-34-29
.. nonce: rxpzWr
.. section: Library
Fix :meth:`RobotFileParser.crawl_delay` and
:meth:`RobotFileParser.request_rate` to return ``None`` rather than raise
:exc:`AttributeError` when no relevant rule is defined in the robots.txt
file. Patch by Rémi Lapeyre.
..
.. bpo: 35766
.. date: 2019-06-11-16-41-40
.. nonce: v1Kj-T
.. section: Library
Change the format of feature_version to be a (major, minor) tuple.
..
.. bpo: 36607
.. date: 2019-06-11-13-52-04
.. nonce: 5_mJkQ
.. section: Library
Eliminate :exc:`RuntimeError` raised by :func:`asyncio.all_tasks()` if
internal tasks weak set is changed by another thread during iteration.
..
.. bpo: 18748
.. date: 2019-06-11-01-54-19
.. nonce: ADqCkq
.. section: Library
:class:`_pyio.IOBase` destructor now does nothing if getting the ``closed``
attribute fails to better mimic :class:`_io.IOBase` finalizer.
..
.. bpo: 36402
.. date: 2019-06-11-00-35-02
.. nonce: b0IJVp
.. section: Library
Fix a race condition at Python shutdown when waiting for threads. Wait until
the Python thread state of all non-daemon threads get deleted (join all
non-daemon threads), rather than just wait until non-daemon Python threads
complete.
..
.. bpo: 37206
.. date: 2019-06-09-22-25-03
.. nonce: 2WBg4q
.. section: Library
Default values which cannot be represented as Python objects no longer
improperly represented as ``None`` in function signatures.
..
.. bpo: 37111
.. date: 2019-06-09-17-22-33
.. nonce: 2I0z2k
.. section: Library
Added ``encoding`` and ``errors`` keyword parameters to
``logging.basicConfig``.
..
.. bpo: 12144
.. date: 2019-06-08-23-26-58
.. nonce: Z7mz-q
.. section: Library
Ensure cookies with ``expires`` attribute are handled in
:meth:`CookieJar.make_cookies`.
..
.. bpo: 34886
.. date: 2019-06-08-16-03-19
.. nonce: Ov-pc9
.. section: Library
Fix an unintended ValueError from :func:`subprocess.run` when checking for
conflicting `input` and `stdin` or `capture_output` and `stdout` or `stderr`
args when they were explicitly provided but with `None` values within a
passed in `**kwargs` dict rather than as passed directly by name. Patch
contributed by Rémi Lapeyre.
..
.. bpo: 37173
.. date: 2019-06-08-11-33-48
.. nonce: 0e_8gS
.. section: Library
The exception message for ``inspect.getfile()`` now correctly reports the
passed class rather than the builtins module.
..
.. bpo: 37178
.. date: 2019-06-07-17-16-09
.. nonce: Day_oB
.. section: Library
Give math.perm() a one argument form that means the same as
math.factorial().
..
.. bpo: 37178
.. date: 2019-06-07-17-11-34
.. nonce: b1StSv
.. section: Library
For math.perm(n, k), let k default to n, giving the same result as
factorial.
..
.. bpo: 37165
.. date: 2019-06-05-11-48-19
.. nonce: V_rwfE
.. section: Library
Converted _collections._count_elements to use the Argument Clinic.
..
.. bpo: 34767
.. date: 2019-06-04-23-44-52
.. nonce: BpDShN
.. section: Library
Do not always create a :class:`collections.deque` in :class:`asyncio.Lock`.
..
.. bpo: 37158
.. date: 2019-06-04-22-25-38
.. nonce: JKm15S
.. section: Library
Speed-up statistics.fmean() by switching from a function to a generator.
..
.. bpo: 34282
.. date: 2019-06-04-15-39-14
.. nonce: aAK54n
.. section: Library
Remove ``Enum._convert`` method, deprecated in 3.8.
..
.. bpo: 37150
.. date: 2019-06-04-14-44-41
.. nonce: TTzHxj
.. section: Library
`argparse._ActionsContainer.add_argument` now throws error, if someone
accidentally pass FileType class object instead of instance of FileType as
`type` argument
..
.. bpo: 28724
.. date: 2019-05-30-15-51-42
.. nonce: 34TrS8
.. section: Library
The socket module now has the :func:`socket.send_fds` and
:func:`socket.recv.fds` methods. Contributed by Joannah Nanjekye, Shinya
Okano and Victor Stinner.
..
.. bpo: 35621
.. date: 2019-05-28-19-03-46
.. nonce: Abc1lf
.. section: Library
Support running asyncio subprocesses when execution event loop in a thread
on UNIX.
..
.. bpo: 36520
.. date: 2019-05-28-02-37-00
.. nonce: W4tday
.. section: Library
Lengthy email headers with UTF-8 characters are now properly encoded when
they are folded. Patch by Jeffrey Kintscher.
..
.. bpo: 30835
.. date: 2019-05-27-15-29-46
.. nonce: 3FoaWH
.. section: Library
Fixed a bug in email parsing where a message with invalid bytes in
content-transfer-encoding of a multipart message can cause an
AttributeError. Patch by Andrew Donnellan.
..
.. bpo: 31163
.. date: 2019-05-26-16-34-53
.. nonce: 21A802
.. section: Library
pathlib.Path instance's rename and replace methods now return the new Path
instance.
..
.. bpo: 25068
.. date: 2019-05-22-04-52-35
.. nonce: vR_rC-
.. section: Library
:class:`urllib.request.ProxyHandler` now lowercases the keys of the passed
dictionary.
..
.. bpo: 26185
.. date: 2019-05-20-14-17-29
.. nonce: pQW4mI
.. section: Library
Fix :func:`repr` on empty :class:`ZipInfo` object. Patch by Mickaël
Schoentgen.
..
.. bpo: 21315
.. date: 2019-05-19-10-48-46
.. nonce: PgXVqF
.. section: Library
Email headers containing RFC2047 encoded words are parsed despite the
missing whitespace, and a defect registered. Also missing trailing
whitespace after encoded words is now registered as a defect.
..
.. bpo: 31904
.. date: 2019-05-17-16-50-02
.. nonce: 4a5ggm
.. section: Library
Port test_datetime to VxWorks: skip zoneinfo tests on VxWorks
..
.. bpo: 35805
.. date: 2019-05-17-15-11-08
.. nonce: E4YwYz
.. section: Library
Add parser for Message-ID header and add it to default HeaderRegistry. This
should prevent folding of Message-ID using RFC 2048 encoded words.
..
.. bpo: 36871
.. date: 2019-05-12-12-58-37
.. nonce: 6xiEHZ
.. section: Library
Ensure method signature is used instead of constructor signature of a class
while asserting mock object against method calls. Patch by Karthikeyan
Singaravelan.
..
.. bpo: 35070
.. date: 2019-05-09-18-50-55
.. nonce: 4vaqNL
.. section: Library
posix.getgrouplist() now works correctly when the user belongs to
NGROUPS_MAX supplemental groups. Patch by Jeffrey Kintscher.
..
.. bpo: 31783
.. date: 2019-05-07-19-25-55
.. nonce: lgLo69
.. section: Library
Fix race condition in ThreadPoolExecutor when worker threads are created
during interpreter shutdown.
..
.. bpo: 36582
.. date: 2019-05-07-17-42-36
.. nonce: L_dxR6
.. section: Library
Fix ``UserString.encode()`` to correctly return ``bytes`` rather than a
``UserString`` instance.
..
.. bpo: 32424
.. date: 2019-04-28-10-34-19
.. nonce: eqNPhM
.. section: Library
Deprecate xml.etree.ElementTree.Element.copy() in favor of copy.copy().
Patch by Gordon P. Hemsley
..
.. bpo: 36564
.. date: 2019-04-08-13-00-13
.. nonce: _n67m_
.. section: Library
Fix infinite loop in email header folding logic that would be triggered when
an email policy's max_line_length is not long enough to include the required
markup and any values in the message. Patch by Paul Ganssle
..
.. bpo: 36543
.. date: 2019-04-06-20-08-12
.. nonce: RPjmUz
.. section: Library
Removed methods Element.getchildren(), Element.getiterator() and
ElementTree.getiterator() and the xml.etree.cElementTree module.
..
.. bpo: 36409
.. date: 2019-03-23-16-42-46
.. nonce: ZYVKao
.. section: Library
Remove the old plistlib API deprecated in Python 3.4
..
.. bpo: 36302
.. date: 2019-03-21-19-23-46
.. nonce: Yc591g
.. section: Library
distutils sorts source file lists so that Extension .so files build more
reproducibly by default
..
.. bpo: 36250
.. date: 2019-03-09-16-04-12
.. nonce: tSK4N1
.. section: Library
Ignore ``ValueError`` from ``signal`` with ``interaction`` in non-main
thread.
..
.. bpo: 36046
.. date: 2019-02-19-17-32-45
.. nonce: fX9OPj
.. section: Library
Added ``user``, ``group`` and ``extra_groups`` parameters to the
subprocess.Popen constructor. Patch by Patrick McLean.
..
.. bpo: 32627
.. date: 2019-02-03-19-13-08
.. nonce: b68f64
.. section: Library
Fix compile error when ``_uuid`` headers conflicting included.
..
.. bpo: 35800
.. date: 2019-01-25-17-12-17
.. nonce: MCGJdQ
.. section: Library
Deprecate ``smtpd.MailmanProxy`` ready for future removal.
..
.. bpo: 35168
.. date: 2019-01-22-09-23-20
.. nonce: UGv2yW
.. section: Library
:attr:`shlex.shlex.punctuation_chars` is now a read-only property.
..
.. bpo: 8538
.. date: 2019-01-09-16-18-52
.. nonce: PfVZia
.. section: Library
Add support for boolean actions like ``--foo`` and ``--no-foo`` to argparse.
Patch contributed by Rémi Lapeyre.
..
.. bpo: 20504
.. date: 2018-11-21-18-05-50
.. nonce: kG0ub5
.. section: Library
Fixes a bug in :mod:`cgi` module when a multipart/form-data request has no
`Content-Length` header.
..
.. bpo: 25988
.. date: 2018-11-19-10-23-58
.. nonce: 6o7gGK
.. section: Library
The abstract base classes in :mod:`collections.abc` no longer are exposed in
the regular :mod:`collections` module.
..
.. bpo: 11122
.. date: 2018-11-12-19-08-50
.. nonce: Gj7BQn
.. section: Library
Distutils won't check for rpmbuild in specified paths only.
..
.. bpo: 34775
.. date: 2018-09-23-03-18-52
.. nonce: vHeuHk
.. section: Library
Division handling of PurePath now returns NotImplemented instead of raising
a TypeError when passed something other than an instance of str or PurePath.
Patch by Roger Aiudi.
..
.. bpo: 34749
.. date: 2018-09-21-13-23-29
.. nonce: B0k819
.. section: Library
:func:`binascii.a2b_base64` is now up to 2 times faster. Patch by Sergey
Fedoseev.
..
.. bpo: 34519
.. date: 2018-08-27-15-44-50
.. nonce: cPlH1h
.. section: Library
Add additional aliases for HP Roman 8. Patch by Michael Osipov.
..
.. bpo: 28009
.. date: 2018-08-04-12-26-11
.. nonce: 4JcHZb
.. section: Library
Fix uuid.getnode() on platforms with '.' as MAC Addr delimiter as well fix
for MAC Addr format that omits a leading 0 in MAC Addr values. Currently,
AIX is the only know platform with these settings. Patch by Michael Felt.
..
.. bpo: 30618
.. date: 2018-07-14-13-48-56
.. nonce: T5AUF6
.. section: Library
Add :meth:`~pathlib.Path.readlink`. Patch by Girts Folkmanis.
..
.. bpo: 32498
.. date: 2018-06-17-21-02-25
.. nonce: La3TZz
.. section: Library
Made :func:`urllib.parse.unquote()` accept bytes in addition to strings.
Patch by Stein Karlsen.
..
.. bpo: 33348
.. date: 2018-04-24-13-18-48
.. nonce: XaJDei
.. section: Library
lib2to3 now recognizes expressions after ``*`` and `**` like in ``f(*[] or
[])``.
..
.. bpo: 32689
.. date: 2018-02-13-17-58-30
.. nonce: a-3SnH
.. section: Library
Update :func:`shutil.move` function to allow for Path objects to be used as
source argument. Patch by Emily Morehouse and Maxwell "5.13b" McKinnon.
..
.. bpo: 32820
.. date: 2018-02-13-12-25-43
.. nonce: 0stF0u
.. section: Library
Added __format__ to IPv4 and IPv6 classes. Always outputs a fully zero-
padded string. Supports b/x/n modifiers (bin/hex/native format). Native
format for IPv4 is bin, native format for IPv6 is hex. Also supports '#' and
'_' modifiers.
..
.. bpo: 27657
.. date: 2017-12-26-14-32-23
.. nonce: 6BhyVK
.. section: Library
Fix urllib.parse.urlparse() with numeric paths. A string like "path:80" is
no longer parsed as a path but as a scheme ("path") and a path ("80").
..
.. bpo: 4963
.. date: 2017-08-15-11-24-41
.. nonce: LRYres
.. section: Library
Fixed non-deterministic behavior related to mimetypes extension mapping and
module reinitialization.
..
.. bpo: 21767
.. date: 2019-11-17-11-54-57
.. nonce: Qq3Dos
.. section: Documentation
Explicitly mention abc support in functools.singledispatch
..
.. bpo: 38816
.. date: 2019-11-15-11-39-13
.. nonce: vUaSVL
.. section: Documentation
Provides more details about the interaction between :c:func:`fork` and
CPython's runtime, focusing just on the C-API. This includes cautions about
where :c:func:`fork` should and shouldn't be called.
..
.. bpo: 38351
.. date: 2019-11-15-09-22-28
.. nonce: xwhlse
.. section: Documentation
Modernize :mod:`email` examples from %-formatting to f-strings.
..
.. bpo: 38778
.. date: 2019-11-12-15-31-09
.. nonce: PHhTlv
.. section: Documentation
Document the fact that :exc:`RuntimeError` is raised if :meth:`os.fork` is
called in a subinterpreter.
..
.. bpo: 38592
.. date: 2019-10-26-13-19-07
.. nonce: Y96BYO
.. section: Documentation
Add Brazilian Portuguese to the language switcher at Python Documentation
website.
..
.. bpo: 38294
.. date: 2019-09-27-23-37-41
.. nonce: go_jFf
.. section: Documentation
Add list of no-longer-escaped chars to re.escape documentation
..
.. bpo: 38053
.. date: 2019-09-07-19-09-01
.. nonce: lttibE
.. section: Documentation
Modernized the plistlib documentation
..
.. bpo: 26868
.. date: 2019-09-07-15-55-46
.. nonce: Raw0Gd
.. section: Documentation
Fix example usage of :c:func:`PyModule_AddObject` to properly handle errors.
..
.. bpo: 36797
.. date: 2019-09-05-14-47-51
.. nonce: KN9Ga5
.. section: Documentation
Fix a dead link in the distutils API Reference.
..
.. bpo: 37977
.. date: 2019-08-29-14-38-01
.. nonce: pML-UI
.. section: Documentation
Warn more strongly and clearly about pickle insecurity
..
.. bpo: 37979
.. date: 2019-08-29-10-40-05
.. nonce: TAUx_E
.. section: Documentation
Added a link to dateutil.parser.isoparse in the datetime.fromisoformat
documentation. Patch by Paul Ganssle
..
.. bpo: 12707
.. date: 2019-08-27-01-14-59
.. nonce: Yj3_7_
.. section: Documentation
Deprecate info(), geturl(), getcode() methods in favor of the headers, url,
and status properties, respectively, for HTTPResponse and addinfourl. Also
deprecate the code attribute of addinfourl in favor of the status attribute.
Patch by Ashwin Ramaswami
..
.. bpo: 37937
.. date: 2019-08-24-12-59-06
.. nonce: F7fHbt
.. section: Documentation
Mention ``frame.f_trace`` in :func:`sys.settrace` docs.
..
.. bpo: 37878
.. date: 2019-08-16-20-01-10
.. nonce: MvA6rZ
.. section: Documentation
Make :c:func:`PyThreadState_DeleteCurrent` Internal.
..
.. bpo: 37759
.. date: 2019-08-04-19-20-58
.. nonce: EHRF4i
.. section: Documentation
Beginning edits to Whatsnew 3.8
..
.. bpo: 37726
.. date: 2019-07-31-11-40-06
.. nonce: h-3o9a
.. section: Documentation
Stop recommending getopt in the tutorial for command line argument parsing
and promote argparse.
..
.. bpo: 32910
.. date: 2019-07-25-10-30-32
.. nonce: caLLAe
.. section: Documentation
Remove implementation-specific behaviour of how venv's Deactivate works.
..
.. bpo: 37256
.. date: 2019-07-16-14-48-12
.. nonce: qJTrBb
.. section: Documentation
Fix wording of arguments for :class:`Request` in :mod:`urllib.request`
..
.. bpo: 37284
.. date: 2019-07-13-12-58-20
.. nonce: rP8WpB
.. section: Documentation
Add a brief note to indicate that any new ``sys.implementation`` required
attributes must go through the PEP process.
..
.. bpo: 30088
.. date: 2019-07-13-12-43-01
.. nonce: CIcBjy
.. section: Documentation
Documented that :class:`mailbox.Maildir` constructor doesn't attempt to
verify the maildir folder layout correctness. Patch by Sviatoslav Sydorenko.
..
.. bpo: 37521
.. date: 2019-07-12-15-09-56
.. nonce: 7tiFR-
.. section: Documentation
Fix `importlib` examples to insert any newly created modules via
importlib.util.module_from_spec() immediately into sys.modules instead of
after calling loader.exec_module().
Thanks to Benjamin Mintz for finding the bug.
..
.. bpo: 37456
.. date: 2019-07-06-17-51-36
.. nonce: lgAQHn
.. section: Documentation
Slash ('/') is now part of syntax.
..
.. bpo: 37487
.. date: 2019-07-06-17-19-26
.. nonce: QagfZ5
.. section: Documentation
Fix PyList_GetItem index description to include 0.
..
.. bpo: 37149
.. date: 2019-07-06-02-19-02
.. nonce: NumHn3
.. section: Documentation
Replace the dead link to the Tkinter 8.5 reference by John Shipman, New
Mexico Tech, with a link to the archive.org copy.
..
.. bpo: 37478
.. date: 2019-07-06-00-57-27
.. nonce: B0ioLw
.. section: Documentation
Added possible exceptions to the description of os.chdir().
..
.. bpo: 34903
.. date: 2019-06-17-09-36-46
.. nonce: r_wGRc
.. section: Documentation
Documented that in :meth:`datetime.datetime.strptime()`, the leading zero in
some two-digit formats is optional. Patch by Mike Gleen.
..
.. bpo: 36260
.. date: 2019-06-04-09-29-00
.. nonce: WrGuc-
.. section: Documentation
Add decompression pitfalls to zipfile module documentation.
..
.. bpo: 37004
.. date: 2019-05-22-04-30-07
.. nonce: BRgxrt
.. section: Documentation
In the documentation for difflib, a note was added explicitly warning that
the results of SequenceMatcher's ratio method may depend on the order of the
input strings.
..
.. bpo: 36960
.. date: 2019-05-18-16-25-44
.. nonce: xEKHXj
.. section: Documentation
Restructured the :mod:`datetime` docs in the interest of making them more
user-friendly and improving readability. Patch by Brad Solomon.
..
.. bpo: 36487
.. date: 2019-04-02-19-23-00
.. nonce: Jg6-MG
.. section: Documentation
Make C-API docs clear about what the "main" interpreter is.
..
.. bpo: 23460
.. date: 2019-02-14-07-12-48
.. nonce: Iqiqtm
.. section: Documentation
The documentation for decimal string formatting using the `:g` specifier has
been updated to reflect the correct exponential notation cutoff point.
Original patch contributed by Tuomas Suutari.
..
.. bpo: 35803
.. date: 2019-01-21-14-30-59
.. nonce: yae6Lq
.. section: Documentation
Document and test that ``tempfile`` functions may accept a :term:`path-like
object` for the ``dir`` argument. Patch by Anthony Sottile.
..
.. bpo: 33944
.. date: 2018-10-26-18-10-29
.. nonce: V1YeOA
.. section: Documentation
Added a note about the intended use of code in .pth files.
..
.. bpo: 34293
.. date: 2018-07-31-15-38-26
.. nonce: yHupAL
.. section: Documentation
Fix the Doc/Makefile regarding PAPER environment variable and PDF builds
..
.. bpo: 25237
.. date: 2018-06-02-12-55-23
.. nonce: m8-JMu
.. section: Documentation
Add documentation for tkinter modules
..
.. bpo: 38614
.. date: 2019-10-30-15-12-32
.. nonce: M6UnLB
.. section: Tests
Fix test_communicate() of test_asyncio.test_subprocess: use
``support.LONG_TIMEOUT`` (5 minutes), instead of just 1 minute.
..
.. bpo: 38614
.. date: 2019-10-28-15-56-02
.. nonce: aDdDYE
.. section: Tests
Add timeout constants to :mod:`test.support`:
:data:`~test.support.LOOPBACK_TIMEOUT`,
:data:`~test.support.INTERNET_TIMEOUT`, :data:`~test.support.SHORT_TIMEOUT`
and :data:`~test.support.LONG_TIMEOUT`.
..
.. bpo: 38502
.. date: 2019-10-17-00-49-38
.. nonce: vUEic7
.. section: Tests
test.regrtest now uses process groups in the multiprocessing mode (-jN
command line option) if process groups are available: if :func:`os.setsid`
and :func:`os.killpg` functions are available.
..
.. bpo: 35998
.. date: 2019-10-16-01-36-15
.. nonce: G305Bf
.. section: Tests
Fix a race condition in test_asyncio.test_start_tls_server_1(). Previously,
there was a race condition between the test main() function which replaces
the protocol and the test ServerProto protocol which sends ANSWER once it
gets HELLO. Now, only the test main() function is responsible to send data,
ServerProto no longer sends data.
..
.. bpo: 38470
.. date: 2019-10-14-22-46-35
.. nonce: NHtzpy
.. section: Tests
Fix ``test_compileall.test_compile_dir_maxlevels()`` on Windows without long
path support: only create 3 subdirectories instead of between 20 and 100
subdirectories.
..
.. bpo: 37531
.. date: 2019-10-08-16-42-05
.. nonce: 7v-_Ca
.. section: Tests
On timeout, regrtest no longer attempts to call ``popen.communicate()``
again: it can hang until all child processes using stdout and stderr pipes
completes. Kill the worker process and ignores its output. Change also the
faulthandler timeout of the main process from 1 minute to 5 minutes, for
Python slowest buildbots.
..
.. bpo: 38239
.. date: 2019-09-26-15-48-36
.. nonce: MfoVzY
.. section: Tests
Fix test_gdb for Link Time Optimization (LTO) builds.
..
.. bpo: 38275
.. date: 2019-09-25-14-40-57
.. nonce: -kdveI
.. section: Tests
test_ssl now handles disabled TLS/SSL versions better. OpenSSL's crypto
policy and run-time settings are recognized and tests for disabled versions
are skipped. Tests also accept more TLS minimum_versions for platforms that
override OpenSSL's default with strict settings.
..
.. bpo: 38271
.. date: 2019-09-25-13-11-29
.. nonce: iHXNIg
.. section: Tests
The private keys for test_ssl were encrypted with 3DES in traditional PKCS#5
format. 3DES and the digest algorithm of PKCS#5 are blocked by some strict
crypto policies. Use PKCS#8 format with AES256 encryption instead.
..
.. bpo: 38270
.. date: 2019-09-25-12-18-31
.. nonce: _x-9uH
.. section: Tests
test.support now has a helper function to check for availability of a hash
digest function. Several tests are refactored avoid MD5 and use SHA256
instead. Other tests are marked to use MD5 and skipped when MD5 is disabled.
..
.. bpo: 37123
.. date: 2019-09-24-12-30-55
.. nonce: IoutBn
.. section: Tests
Multiprocessing test test_mymanager() now also expects -SIGTERM, not only
exitcode 0. BaseManager._finalize_manager() sends SIGTERM to the manager
process if it takes longer than 1 second to stop, which happens on slow
buildbots.
..
.. bpo: 38212
.. date: 2019-09-24-12-24-05
.. nonce: IWbhWz
.. section: Tests
Multiprocessing tests: increase test_queue_feeder_donot_stop_onexc() timeout
from 1 to 60 seconds.
..
.. bpo: 38117
.. date: 2019-09-11-17-22-32
.. nonce: X7LgGY
.. section: Tests
Test with OpenSSL 1.1.1d
..
.. bpo: 38018
.. date: 2019-09-03-19-33-10
.. nonce: zTrMu7
.. section: Tests
Increase code coverage for multiprocessing.shared_memory.
..
.. bpo: 37805
.. date: 2019-08-25-19-51-46
.. nonce: Kl1sti
.. section: Tests
Add tests for json.dump(..., skipkeys=True). Patch by Dong-hee Na.
..
.. bpo: 37531
.. date: 2019-08-20-19-24-19
.. nonce: wRoXfU
.. section: Tests
Enhance regrtest multiprocess timeout: write a message when killing a worker
process, catch popen.kill() and popen.wait() exceptions, put a timeout on
the second call to popen.communicate().
..
.. bpo: 37876
.. date: 2019-08-16-16-15-14
.. nonce: m3k1w3
.. section: Tests
Add tests for ROT-13 codec.
..
.. bpo: 36833
.. date: 2019-07-18-14-52-58
.. nonce: Zoe9ek
.. section: Tests
Added tests for PyDateTime_xxx_GET_xxx() macros of the C API of the
:mod:`datetime` module. Patch by Joannah Nanjekye.
..
.. bpo: 37558
.. date: 2019-07-11-10-33-56
.. nonce: SKHRsL
.. section: Tests
Fix test_shared_memory_cleaned_after_process_termination name handling
..
.. bpo: 37526
.. date: 2019-07-09-12-33-18
.. nonce: vmm5y7
.. section: Tests
Add :func:`test.support.catch_threading_exception`: context manager catching
:class:`threading.Thread` exception using :func:`threading.excepthook`.
..
.. bpo: 37421
.. date: 2019-07-08-10-11-36
.. nonce: OY77go
.. section: Tests
test_concurrent_futures now explicitly stops the ForkServer instance if it's
running.
..
.. bpo: 37421
.. date: 2019-07-05-14-47-55
.. nonce: n8o2to
.. section: Tests
multiprocessing tests now stop the ForkServer instance if it's running:
close the "alive" file descriptor to ask the server to stop and then remove
its UNIX address.
..
.. bpo: 37421
.. date: 2019-07-03-00-05-28
.. nonce: ORGRSG
.. section: Tests
test_distutils.test_build_ext() is now able to remove the temporary
directory on Windows: don't import the newly built C extension ("xx") in the
current process, but test it in a separated process.
..
.. bpo: 37421
.. date: 2019-07-02-23-29-06
.. nonce: WEfc5A
.. section: Tests
test_concurrent_futures now cleans up multiprocessing to remove immediately
temporary directories created by multiprocessing.util.get_temp_dir().
..
.. bpo: 37421
.. date: 2019-07-02-23-20-35
.. nonce: HCkKWz
.. section: Tests
test_winconsoleio doesn't leak a temporary file anymore: use
tempfile.TemporaryFile() to remove it when the test completes.
..
.. bpo: 37421
.. date: 2019-07-01-19-57-26
.. nonce: NFH1f0
.. section: Tests
multiprocessing tests now explicitly call ``_run_finalizers()`` to
immediately remove temporary directories created by tests.
..
.. bpo: 37421
.. date: 2019-07-01-19-56-17
.. nonce: bOe350
.. section: Tests
urllib.request tests now call :func:`~urllib.request.urlcleanup` to remove
temporary files created by ``urlretrieve()`` tests and to clear the
``_opener`` global variable set by ``urlopen()`` and functions calling
indirectly ``urlopen()``.
..
.. bpo: 37472
.. date: 2019-07-01-17-19-47
.. nonce: WzkEAx
.. section: Tests
Remove ``Lib/test/outstanding_bugs.py``.
..
.. bpo: 37199
.. date: 2019-06-29-23-56-28
.. nonce: FHDsLf
.. section: Tests
Fix test failures when IPv6 is unavailable or disabled.
..
.. bpo: 19696
.. date: 2019-06-29-16-02-21
.. nonce: 05ijhN
.. section: Tests
Replace deprecated method "random.choose" with "random.choice" in
"test_pkg_import.py".
..
.. bpo: 37335
.. date: 2019-06-28-16-37-52
.. nonce: o5S2hY
.. section: Tests
Remove no longer necessary code from c locale coercion tests
..
.. bpo: 37421
.. date: 2019-06-27-00-37-59
.. nonce: rVJb3x
.. section: Tests
Fix test_shutil to no longer leak temporary files.
..
.. bpo: 37411
.. date: 2019-06-26-15-28-45
.. nonce: 5lGNhM
.. section: Tests
Fix test_wsgiref.testEnviron() to no longer depend on the environment
variables (don't fail if "X" variable is set).
..
.. bpo: 37400
.. date: 2019-06-25-16-02-43
.. nonce: cx_EWv
.. section: Tests
Fix test_os.test_chown(): use os.getgroups() rather than grp.getgrall() to
get groups. Rename also the test to test_chown_gid().
..
.. bpo: 37359
.. date: 2019-06-24-10-47-07
.. nonce: CkdtyO
.. section: Tests
Add --cleanup option to python3 -m test to remove ``test_python_*``
directories of previous failed jobs. Add "make cleantest" to run ``python3
-m test --cleanup``.
..
.. bpo: 37362
.. date: 2019-06-21-15-47-33
.. nonce: D3xppx
.. section: Tests
test_gdb no longer fails if it gets an "unexpected" message on stderr: it
now ignores stderr. The purpose of test_gdb is to test that python-gdb.py
commands work as expected, not to test gdb.
..
.. bpo: 35998
.. date: 2019-06-14-17-05-49
.. nonce: yX82oD
.. section: Tests
Avoid TimeoutError in test_asyncio: test_start_tls_server_1()
..
.. bpo: 37278
.. date: 2019-06-14-12-21-47
.. nonce: z0HUOr
.. section: Tests
Fix test_asyncio ProactorLoopCtrlC: join the thread to prevent leaking a
running thread and leaking a reference.
..
.. bpo: 37261
.. date: 2019-06-13-12-19-56
.. nonce: NuKFVo
.. section: Tests
Fix :func:`test.support.catch_unraisable_exception`: its __exit__() method
now ignores unraisable exception raised when clearing its ``unraisable``
attribute.
..
.. bpo: 37069
.. date: 2019-06-13-00-46-25
.. nonce: wdktFo
.. section: Tests
regrtest now uses :func:`sys.unraisablehook` to mark a test as "environment
altered" (ENV_CHANGED) if it emits an "unraisable exception". Moreover,
regrtest logs a warning in this case.
Use ``python3 -m test --fail-env-changed`` to catch unraisable exceptions in
tests.
..
.. bpo: 37252
.. date: 2019-06-12-14-30-29
.. nonce: 4o-uLs
.. section: Tests
Fix assertions in ``test_close`` and ``test_events_mask_overflow`` devpoll
tests.
..
.. bpo: 37169
.. date: 2019-06-07-12-23-15
.. nonce: yfXTFg
.. section: Tests
Rewrite ``_PyObject_IsFreed()`` unit tests.
..
.. bpo: 37153
.. date: 2019-06-04-18-30-39
.. nonce: 711INB
.. section: Tests
``test_venv.test_multiprocessing()`` now explicitly calls
``pool.terminate()`` to wait until the pool completes.
..
.. bpo: 34001
.. date: 2019-06-03-20-47-10
.. nonce: KvYx9z
.. section: Tests
Make test_ssl pass with LibreSSL. LibreSSL handles minimum and maximum TLS
version differently than OpenSSL.
..
.. bpo: 36919
.. date: 2019-05-28-15-41-34
.. nonce: -vGt_m
.. section: Tests
Make ``test_source_encoding.test_issue2301`` implementation independent. The
test will work now for both CPython and IronPython.
..
.. bpo: 30202
.. date: 2019-04-15-19-05-35
.. nonce: Wt7INj
.. section: Tests
Update ``test.test_importlib.test_abc`` to test ``find_spec()``.
..
.. bpo: 28009
.. date: 2019-04-11-07-59-43
.. nonce: s85urF
.. section: Tests
Modify the test_uuid logic to test when a program is available AND can be
used to obtain a MACADDR as basis for an UUID. Patch by M. Felt
..
.. bpo: 34596
.. date: 2018-09-07-01-18-27
.. nonce: r2-EGd
.. section: Tests
Fallback to a default reason when :func:`unittest.skip` is uncalled. Patch
by Naitree Zhu.
..
.. bpo: 38809
.. date: 2019-11-15-09-25-44
.. nonce: 9jwta6
.. section: Build
On Windows, build scripts will now recognize and use python.exe from an
active virtual env.
..
.. bpo: 38684
.. date: 2019-11-04-14-30-37
.. nonce: aed593
.. section: Build
Fix _hashlib build when Blake2 is disabled, but OpenSSL supports it.
..
.. bpo: 38468
.. date: 2019-10-13-16-18-24
.. nonce: buCO84
.. section: Build
Misc/python-config.in now uses `getvar()` for all still existing
`sysconfig.get_config_var()` calls. Patch by Joannah Nanjekye.
..
.. bpo: 37415
.. date: 2019-10-11-15-32-58
.. nonce: D9RXrq
.. section: Build
Fix stdatomic.h header check for ICC compiler: the ICC implementation lacks
atomic_uintptr_t type which is needed by Python.
..
.. bpo: 38301
.. date: 2019-09-28-02-37-11
.. nonce: 123456
.. section: Build
In Solaris family, we must be sure to use ``-D_REENTRANT``. Patch by Jesús
Cea Avión.
..
.. bpo: 36002
.. date: 2019-09-13-14-12-36
.. nonce: Bcl4oe
.. section: Build
Locate ``llvm-profdata`` and ``llvm-ar`` binaries using ``AC_PATH_TOOL``
rather than ``AC_PATH_TARGET_TOOL``.
..
.. bpo: 37936
.. date: 2019-09-10-00-54-48
.. nonce: E7XEwu
.. section: Build
The :file:`.gitignore` file systematically keeps "rooted", with a
non-trailing slash, all the rules that are meant to apply to files in a
specific place in the repo. Previously, when the intended file to ignore
happened to be at the root of the repo, we'd most often accidentally also
ignore files and directories with the same name anywhere in the tree.
..
.. bpo: 37760
.. date: 2019-08-24-17-39-09
.. nonce: f3jXuH
.. section: Build
The :file:`Tools/unicode/makeunicodedata.py` script, which is used for
converting information from the Unicode Character Database into generated
code and data used by the methods of :class:`str` and by the
:mod:`unicodedata` module, now handles each character's data as a
``dataclass`` with named attributes, rather than a length-18 list of
different fields.
..
.. bpo: 37936
.. date: 2019-08-24-00-29-40
.. nonce: QrORqA
.. section: Build
The :file:`.gitignore` file no longer applies to any files that are in fact
tracked in the Git repository. Patch by Greg Price.
..
.. bpo: 37725
.. date: 2019-07-30-16-26-11
.. nonce: MkG1TT
.. section: Build
Change "clean" makefile target to also clean the program guided optimization
(PGO) data. Previously you would have to use "make clean" and "make
profile-removal", or "make clobber".
..
.. bpo: 37707
.. date: 2019-07-29-11-36-16
.. nonce: Sm-dGk
.. section: Build
Mark some individual tests to skip when --pgo is used. The tests marked
increase the PGO task time significantly and likely don't help improve
optimization of the final executable.
..
.. bpo: 36044
.. date: 2019-07-11-01-28-24
.. nonce: gIgfiJ
.. section: Build
Reduce the number of unit tests run for the PGO generation task. This
speeds up the task by a factor of about 15x. Running the full unit test
suite is slow. This change may result in a slightly less optimized build
since not as many code branches will be executed. If you are willing to
wait for the much slower build, the old behavior can be restored using
'./configure [..] PROFILE_TASK="-m test --pgo-extended"'. We make no
guarantees as to which PGO task set produces a faster build. Users who care
should run their own relevant benchmarks as results can depend on the
environment, workload, and compiler tool chain.
..
.. bpo: 37468
.. date: 2019-07-01-14-39-40
.. nonce: trbQ-_
.. section: Build
``make install`` no longer installs ``wininst-*.exe`` files used by
distutils bdist_wininst: bdist_wininst only works on Windows.
..
.. bpo: 37189
.. date: 2019-06-17-09-40-59
.. nonce: j5ebdT
.. section: Build
Many ``PyRun_XXX()`` functions like :c:func:`PyRun_String` were no longer
exported in ``libpython38.dll`` by mistake. Export them again to fix the ABI
compatibility.
..
.. bpo: 25361
.. date: 2019-03-19-22-07-37
.. nonce: XO9Bfr
.. section: Build
Enables use of SSE2 instructions in Windows 32-bit build.
..
.. bpo: 36210
.. date: 2019-03-06-18-55-10
.. nonce: fup9H2
.. section: Build
Update optional extension module detection for AIX. ossaudiodev and spwd are
not applicable for AIX, and are no longer reported as missing. 3rd-party
packaging of ncurses (with ASIS support) conflicts with officially supported
AIX curses library, so configure AIX to use libcurses.a. However, skip
trying to build _curses_panel.
patch by M Felt
..
.. bpo: 38589
.. date: 2019-10-28-10-48-16
.. nonce: V69Q1a
.. section: Windows
Fixes HTML Help shortcut when Windows is not installed to C drive
..
.. bpo: 38453
.. date: 2019-10-28-10-32-43
.. nonce: NwwatW
.. section: Windows
Ensure ntpath.realpath() correctly resolves relative paths.
..
.. bpo: 38519
.. date: 2019-10-28-05-01-29
.. nonce: dCkY66
.. section: Windows
Restores the internal C headers that were missing from the nuget.org and
Microsoft Store packages.
..
.. bpo: 38492
.. date: 2019-10-16-09-49-09
.. nonce: Te1LxC
.. section: Windows
Remove ``pythonw.exe`` dependency on the Microsoft C++ runtime.
..
.. bpo: 38344
.. date: 2019-10-05-05-50-58
.. nonce: scr2LO
.. section: Windows
Fix error message in activate.bat
..
.. bpo: 38359
.. date: 2019-10-03-08-04-14
.. nonce: wzwsl_
.. section: Windows
Ensures ``pyw.exe`` launcher reads correct registry key.
..
.. bpo: 38355
.. date: 2019-10-02-15-38-49
.. nonce: n3AWX6
.. section: Windows
Fixes ``ntpath.realpath`` failing on ``sys.executable``.
..
.. bpo: 38117
.. date: 2019-09-16-14-07-11
.. nonce: hJVf0C
.. section: Windows
Update bundled OpenSSL to 1.1.1d
..
.. bpo: 38092
.. date: 2019-09-13-14-11-42
.. nonce: x31ehI
.. section: Windows
Reduce overhead when using multiprocessing in a Windows virtual environment.
..
.. bpo: 38133
.. date: 2019-09-12-12-05-55
.. nonce: yFeRGS
.. section: Windows
Allow py.exe launcher to locate installations from the Microsoft Store and
improve display of active virtual environments.
..
.. bpo: 38114
.. date: 2019-09-11-15-24-04
.. nonce: cc0E5E
.. section: Windows
The ``pip.ini`` is no longer included in the Nuget package.
..
.. bpo: 32592
.. date: 2019-09-11-14-51-56
.. nonce: jvQMD9
.. section: Windows
Set Windows 8 as the minimum required version for API support
..
.. bpo: 36634
.. date: 2019-09-11-14-42-04
.. nonce: 8Un8ih
.. section: Windows
:func:`os.cpu_count` now returns active processors rather than maximum
processors.
..
.. bpo: 36634
.. date: 2019-09-11-12-34-31
.. nonce: xLaGgb
.. section: Windows
venv activate.bat now works when the existing variables contain double quote
characters.
..
.. bpo: 38081
.. date: 2019-09-11-10-22-01
.. nonce: 8JhzjD
.. section: Windows
Prevent error calling :func:`os.path.realpath` on ``'NUL'``.
..
.. bpo: 38087
.. date: 2019-09-10-14-21-40
.. nonce: --eIib
.. section: Windows
Fix case sensitivity in test_pathlib and test_ntpath.
..
.. bpo: 38088
.. date: 2019-09-10-14-17-25
.. nonce: FOvWSM
.. section: Windows
Fixes distutils not finding vcruntime140.dll with only the v142 toolset
installed.
..
.. bpo: 37283
.. date: 2019-09-09-12-22-23
.. nonce: 8NvOkU
.. section: Windows
Ensure command-line and unattend.xml setting override previously detected
states in Windows installer.
..
.. bpo: 38030
.. date: 2019-09-04-14-01-08
.. nonce: _USdtk
.. section: Windows
Fixes :func:`os.stat` failing for block devices on Windows
..
.. bpo: 38020
.. date: 2019-09-03-11-47-37
.. nonce: xFZ2j0
.. section: Windows
Fixes potential crash when calling :func:`os.readlink` (or indirectly
through :func:`~os.path.realpath`) on a file that is not a supported link.
..
.. bpo: 37705
.. date: 2019-08-30-15-15-22
.. nonce: 2o4NWW
.. section: Windows
Improve the implementation of ``winerror_to_errno()``.
..
.. bpo: 37549
.. date: 2019-08-22-09-04-44
.. nonce: TpKI3M
.. section: Windows
:func:`os.dup` no longer fails for standard streams on Windows 7.
..
.. bpo: 1311
.. date: 2019-08-21-12-58-18
.. nonce: BoW1wU
.. section: Windows
The ``nul`` file on Windows now returns True from :func:`~os.path.exists`
and a valid result from :func:`os.stat` with ``S_IFCHR`` set.
..
.. bpo: 9949
.. date: 2019-08-14-13-40-15
.. nonce: zW45Ks
.. section: Windows
Enable support for following symlinks in :func:`os.realpath`.
..
.. bpo: 37834
.. date: 2019-08-12-12-00-24
.. nonce: VB2QVj
.. section: Windows
Treat all name surrogate reparse points on Windows in :func:`os.lstat` and
other reparse points as regular files in :func:`os.stat`.
..
.. bpo: 36266
.. date: 2019-08-08-18-05-27
.. nonce: x4eZU3
.. section: Windows
Add the module name in the formatted error message when DLL load fail
happens during module import in ``_PyImport_FindSharedFuncptrWindows()``.
Patch by Srinivas Nyayapati.
..
.. bpo: 25172
.. date: 2019-08-06-18-09-18
.. nonce: Akreij
.. section: Windows
Trying to import the :mod:`crypt` module on Windows will result in an
:exc:`ImportError` with a message explaining that the module isn't supported
on Windows. On other platforms, if the underlying ``_crypt`` module is not
available, the ImportError will include a message explaining the problem.
..
.. bpo: 37778
.. date: 2019-08-06-13-54-12
.. nonce: AY1XhH
.. section: Windows
Fixes the icons used for file associations to the Microsoft Store package.
..
.. bpo: 37734
.. date: 2019-08-06-09-35-12
.. nonce: EoJ9Nh
.. section: Windows
Fix use of registry values to launch Python from Microsoft Store app.
..
.. bpo: 37702
.. date: 2019-07-29-16-49-31
.. nonce: Lj2f5e
.. section: Windows
Fix memory leak on Windows in creating an SSLContext object or running
urllib.request.urlopen('https://...').
..
.. bpo: 37672
.. date: 2019-07-24-14-36-28
.. nonce: uKEVHN
.. section: Windows
Switch Windows Store package's pip to use bundled :file:`pip.ini` instead of
:envvar:`PIP_USER` variable.
..
.. bpo: 10945
.. date: 2019-07-01-12-38-48
.. nonce: s0YBHG
.. section: Windows
Officially drop support for creating bdist_wininst installers on non-Windows
systems.
..
.. bpo: 37445
.. date: 2019-06-28-18-10-29
.. nonce: LsdYO6
.. section: Windows
Include the ``FORMAT_MESSAGE_IGNORE_INSERTS`` flag in ``FormatMessageW()``
calls.
..
.. bpo: 37369
.. date: 2019-06-28-09-44-08
.. nonce: 1iVpxq
.. section: Windows
Fixes path for :data:`sys.executable` when running from the Microsoft Store.
..
.. bpo: 37380
.. date: 2019-06-25-04-15-22
.. nonce: tPxjuz
.. section: Windows
Don't collect unfinished processes with ``subprocess._active`` on Windows to
cleanup later. Patch by Ruslan Kuprieiev.
..
.. bpo: 37351
.. date: 2019-06-20-12-50-32
.. nonce: asTnVW
.. section: Windows
Removes libpython38.a from standard Windows distribution.
..
.. bpo: 35360
.. date: 2019-06-18-09-05-08
.. nonce: tdqSmo
.. section: Windows
Update Windows builds to use SQLite 3.28.0.
..
.. bpo: 37267
.. date: 2019-06-13-04-15-51
.. nonce: Ygo5ef
.. section: Windows
On Windows, :func:`os.dup` no longer creates an inheritable fd when handling
a character file.
..
.. bpo: 36779
.. date: 2019-06-11-15-41-34
.. nonce: 0TMw6f
.. section: Windows
Ensure ``time.tzname`` is correct on Windows when the active code page is
set to CP_UTF7 or CP_UTF8.
..
.. bpo: 32587
.. date: 2019-05-10-15-25-44
.. nonce: -0g2O3
.. section: Windows
Make :data:`winreg.REG_MULTI_SZ` support zero-length strings.
..
.. bpo: 28269
.. date: 2019-05-05-05-23-34
.. nonce: -MOHI7
.. section: Windows
Replace use of :c:func:`strcasecmp` for the system function
:c:func:`_stricmp`. Patch by Minmin Gong.
..
.. bpo: 36590
.. date: 2019-04-10-21-13-26
.. nonce: ZTaKcu
.. section: Windows
Add native Bluetooth RFCOMM support to socket module.
..
.. bpo: 38117
.. date: 2019-09-15-21-29-13
.. nonce: ZLsoAZ
.. section: macOS
Updated OpenSSL to 1.1.1d in macOS installer.
..
.. bpo: 38089
.. date: 2019-09-10-14-24-35
.. nonce: eedgyD
.. section: macOS
Move Azure Pipelines to latest VM versions and make macOS tests optional
..
.. bpo: 18049
.. date: 2019-07-13-15-58-18
.. nonce: MklhQQ
.. section: macOS
Increase the default stack size of threads from 5MB to 16MB on macOS, to
match the stack size of the main thread. This avoids crashes on deep
recursion in threads.
..
.. bpo: 34602
.. date: 2019-07-02-01-06-47
.. nonce: 10d4wl
.. section: macOS
Avoid test suite failures on macOS by no longer calling resource.setrlimit
to increase the process stack size limit at runtime. The runtime change is
no longer needed since the interpreter is being built with a larger default
stack size.
..
.. bpo: 35360
.. date: 2019-06-18-08-58-30
.. nonce: -CWbfy
.. section: macOS
Update macOS installer to use SQLite 3.28.0.
..
.. bpo: 34631
.. date: 2019-06-18-00-30-40
.. nonce: vSifcv
.. section: macOS
Updated OpenSSL to 1.1.1c in macOS installer.
..
.. bpo: 26353
.. date: 2019-11-09-23-55-59
.. nonce: duYZiF
.. section: IDLE
Stop adding newline when saving an IDLE shell window.
..
.. bpo: 4630
.. date: 2019-10-28-04-48-03
.. nonce: upgjiV
.. section: IDLE
Add an option to toggle IDLE's cursor blink for shell, editor, and output
windows. See Settings, General, Window Preferences, Cursor Blink. Patch by
Zackery Spytz.
..
.. bpo: 38598
.. date: 2019-10-26-18-16-24
.. nonce: 6kH9FY
.. section: IDLE
Do not try to compile IDLE shell or output windows
..
.. bpo: 36698
.. date: 2019-10-04-18-03-09
.. nonce: BKcmom
.. section: IDLE
IDLE no longer fails when write non-encodable characters to stderr. It now
escapes them with a backslash, as the regular Python interpreter. Added the
``errors`` field to the standard streams.
..
.. bpo: 35379
.. date: 2019-09-17-01-28-56
.. nonce: yAECDr
.. section: IDLE
When exiting IDLE, catch any AttributeError. One happens when
EditorWindow.close is called twice. Printing a traceback, when IDLE is run
from a terminal, is useless and annoying.
..
.. bpo: 38183
.. date: 2019-09-16-15-04-29
.. nonce: eudCN1
.. section: IDLE
To avoid problems, test_idle ignores the user config directory. It no longer
tries to create or access .idlerc or any files within. Users must run IDLE
to discover problems with saving settings.
..
.. bpo: 38077
.. date: 2019-09-09-22-08-36
.. nonce: Mzpfe2
.. section: IDLE
IDLE no longer adds 'argv' to the user namespace when initializing it. This
bug only affected 3.7.4 and 3.8.0b2 to 3.8.0b4.
..
.. bpo: 38041
.. date: 2019-09-05-23-12-13
.. nonce: nxmGGK
.. section: IDLE
Shell restart lines now fill the window width, always start with '=', and
avoid wrapping unnecessarily. The line will still wrap if the included file
name is long relative to the width.
..
.. bpo: 35771
.. date: 2019-09-01-10-22-55
.. nonce: tdbmbP
.. section: IDLE
To avoid occasional spurious test_idle failures on slower machines, increase
the ``hover_delay`` in test_tooltip.
..
.. bpo: 37824
.. date: 2019-08-26-00-41-53
.. nonce: YY5jAI
.. section: IDLE
Properly handle user input warnings in IDLE shell. Cease turning
SyntaxWarnings into SyntaxErrors.
..
.. bpo: 37929
.. date: 2019-08-24-22-00-33
.. nonce: jb7523
.. section: IDLE
IDLE Settings dialog now closes properly when there is no shell window.
..
.. bpo: 37902
.. date: 2019-08-21-16-02-49
.. nonce: _R_adE
.. section: IDLE
Add mousewheel scrolling for IDLE module, path, and stack browsers. Patch by
George Zhang.
..
.. bpo: 37849
.. date: 2019-08-14-09-43-15
.. nonce: -bcYF3
.. section: IDLE
Fixed completions list appearing too high or low when shown above the
current line.
..
.. bpo: 36419
.. date: 2019-08-04-17-10-01
.. nonce: TJZqOc
.. section: IDLE
Refactor IDLE autocomplete and improve testing.
..
.. bpo: 37748
.. date: 2019-08-04-15-27-50
.. nonce: 0vf6pg
.. section: IDLE
Reorder the Run menu. Put the most common choice, Run Module, at the top.
..
.. bpo: 37692
.. date: 2019-07-27-15-14-20
.. nonce: TRHGjD
.. section: IDLE
Improve highlight config sample with example shell interaction and better
labels for shell elements.
..
.. bpo: 37628
.. date: 2019-07-26-17-51-13
.. nonce: kX4AUF
.. section: IDLE
Settings dialog no longer expands with font size.
..
.. bpo: 37627
.. date: 2019-07-20-23-33-53
.. nonce: dQhUNB
.. section: IDLE
Initialize the Customize Run dialog with the command line arguments most
recently entered before. The user can optionally edit before submitting
them.
..
.. bpo: 33610
.. date: 2019-07-18-10-11-36
.. nonce: xYqMLg
.. section: IDLE
Fix code context not showing the correct context when first toggled on.
..
.. bpo: 37530
.. date: 2019-07-11-00-05-31
.. nonce: AuyCyD
.. section: IDLE
Optimize code context to reduce unneeded background activity. Font and
highlight changes now occur along with text changes instead of after a
random delay.
..
.. bpo: 27452
.. date: 2019-07-03-22-47-44
.. nonce: nePPLi
.. section: IDLE
Cleanup ``config.py`` by inlining ``RemoveFile`` and simplifying the
handling of ``file`` in ``CreateConfigHandlers``.
..
.. bpo: 37325
.. date: 2019-06-18-16-40-05
.. nonce: GssOf1
.. section: IDLE
Fix tab focus traversal order for help source and custom run dialogs.
..
.. bpo: 37321
.. date: 2019-06-17-16-35-30
.. nonce: zVTTGS
.. section: IDLE
Both subprocess connection error messages now refer to the 'Startup failure'
section of the IDLE doc.
..
.. bpo: 17535
.. date: 2019-06-13-01-07-20
.. nonce: K8i2St
.. section: IDLE
Add optional line numbers for IDLE editor windows. Windows open without
line numbers unless set otherwise in the General tab of the configuration
dialog.
..
.. bpo: 26806
.. date: 2019-06-10-22-48-50
.. nonce: Zltkum
.. section: IDLE
To compensate for stack frames added by IDLE and avoid possible problems
with low recursion limits, add 30 to limits in the user code execution
process. Subtract 30 when reporting recursion limits to make this addition
mostly transparent.
..
.. bpo: 37177
.. date: 2019-06-07-00-17-41
.. nonce: voU6pQ
.. section: IDLE
Properly 'attach' search dialogs to their main window so that they behave
like other dialogs and do not get hidden behind their main window.
..
.. bpo: 37039
.. date: 2019-06-04-23-27-33
.. nonce: FN_fBf
.. section: IDLE
Adjust "Zoom Height" to individual screens by momentarily maximizing the
window on first use with a particular screen. Changing screen settings may
invalidate the saved height. While a window is maximized, "Zoom Height" has
no effect.
..
.. bpo: 35763
.. date: 2019-06-04-20-36-24
.. nonce: 7XdoWz
.. section: IDLE
Make calltip reminder about '/' meaning positional-only less obtrusive by
only adding it when there is room on the first line.
..
.. bpo: 5680
.. date: 2019-06-03-00-39-29
.. nonce: VCQfOO
.. section: IDLE
Add 'Run... Customized' to the Run menu to run a module with customized
settings. Any 'command line arguments' entered are added to sys.argv. One
can suppress the normal Shell main module restart.
..
.. bpo: 36390
.. date: 2019-03-21-08-35-00
.. nonce: OdDCGk
.. section: IDLE
Gather Format menu functions into format.py. Combine paragraph.py,
rstrip.py, and format methods from editor.py.
..
.. bpo: 38118
.. date: 2019-10-08-15-07-52
.. nonce: pIZD6H
.. section: Tools/Demos
Update Valgrind suppression file to ignore a false alarm in
:c:func:`PyUnicode_Decode` when using GCC builtin strcmp().
..
.. bpo: 38347
.. date: 2019-10-02-09-48-42
.. nonce: 2Tq5D1
.. section: Tools/Demos
pathfix.py: Assume all files that end on '.py' are Python scripts when
working recursively.
..
.. bpo: 37803
.. date: 2019-09-12-16-15-55
.. nonce: chEizy
.. section: Tools/Demos
pdb's ``--help`` and ``--version`` long options now work.
..
.. bpo: 37942
.. date: 2019-08-24-12-11-30
.. nonce: 7H8N9a
.. section: Tools/Demos
Improve ArgumentClinic converter for floats.
..
.. bpo: 37704
.. date: 2019-07-29-13-59-19
.. nonce: xxGUz_
.. section: Tools/Demos
Remove ``Tools/scripts/h2py.py``: use cffi to access a C API in Python.
..
.. bpo: 37675
.. date: 2019-07-24-16-20-54
.. nonce: 951Cvf
.. section: Tools/Demos
2to3 now works when run from a zipped standard library.
..
.. bpo: 37034
.. date: 2019-05-27-16-13-08
.. nonce: zbTgy8
.. section: Tools/Demos
Argument Clinic now uses the argument name on errors with keyword-only
argument instead of their position. Patch contributed by Rémi Lapeyre.
..
.. bpo: 37064
.. date: 2019-05-27-15-26-12
.. nonce: k_SPW2
.. section: Tools/Demos
Add option -k to pathscript.py script: preserve shebang flags. Add option -a
to pathscript.py script: add flags.
..
.. bpo: 37633
.. date: 2019-11-04-21-10-47
.. nonce: oOGVdo
.. section: C API
Re-export some function compatibility wrappers for macros in ``pythonrun.h``.
..
.. bpo: 38644
.. date: 2019-11-04-17-59-46
.. nonce: euO_RR
.. section: C API
Provide :c:func:`Py_EnterRecursiveCall` and :c:func:`Py_LeaveRecursiveCall`
as regular functions for the limited API. Previously, there were defined as
macros, but these macros didn't work with the limited API which cannot
access ``PyThreadState.recursion_depth`` field. Remove
``_Py_CheckRecursionLimit`` from the stable ABI.
..
.. bpo: 38650
.. date: 2019-10-30-22-03-03
.. nonce: 0pi8zt
.. section: C API
The global variable :c:data:`PyStructSequence_UnnamedField` is now a
constant and refers to a constant string.
..
.. bpo: 38540
.. date: 2019-10-21-09-24-03
.. nonce: 314N_T
.. section: C API
Fixed possible leak in :c:func:`PyArg_Parse` and similar functions for
format units ``"es#"`` and ``"et#"`` when the macro
:c:macro:`PY_SSIZE_T_CLEAN` is not defined.
..
.. bpo: 38395
.. date: 2019-10-08-01-23-24
.. nonce: MJ6Ey9
.. section: C API
Fix a crash in :class:`weakref.proxy` objects due to incorrect lifetime
management when calling some associated methods that may delete the last
reference to object being referenced by the proxy. Patch by Pablo Galindo.
..
.. bpo: 36389
.. date: 2019-10-07-17-15-09
.. nonce: hFX_jD
.. section: C API
The ``_PyObject_CheckConsistency()`` function is now also available in
release mode. For example, it can be used to debug a crash in the
``visit_decref()`` function of the GC.
..
.. bpo: 38266
.. date: 2019-10-03-12-53-53
.. nonce: 0FIC1q
.. section: C API
Revert the removal of PyThreadState_DeleteCurrent() with documentation.
..
.. bpo: 38303
.. date: 2019-09-30-16-53-30
.. nonce: YoIs0M
.. section: C API
Update audioop extension module to use the stable ABI (PEP-384). Patch by
Tyler Kieft.
..
.. bpo: 38234
.. date: 2019-09-24-17-09-48
.. nonce: d0bhEA
.. section: C API
:c:func:`Py_SetPath` now sets :data:`sys.executable` to the program full
path (:c:func:`Py_GetProgramFullPath`) rather than to the program name
(:c:func:`Py_GetProgramName`).
..
.. bpo: 38234
.. date: 2019-09-20-17-22-41
.. nonce: ZbquVK
.. section: C API
Python ignored arguments passed to :c:func:`Py_SetPath`,
:c:func:`Py_SetPythonHome` and :c:func:`Py_SetProgramName`: fix Python
initialization to use specified arguments.
..
.. bpo: 38205
.. date: 2019-09-19-18-26-29
.. nonce: Db1OJL
.. section: C API
The :c:func:`Py_UNREACHABLE` macro now calls :c:func:`Py_FatalError`.
..
.. bpo: 38140
.. date: 2019-09-13-01-24-47
.. nonce: y59qaO
.. section: C API
Make dict and weakref offsets opaque for C heap types by passing the offsets
through PyMemberDef
..
.. bpo: 15088
.. date: 2019-09-05-14-17-21
.. nonce: plt8Em
.. section: C API
The C function ``PyGen_NeedsFinalizing`` has been removed. It was not
documented, tested or used anywhere within CPython after the implementation
of :pep:`442`. Patch by Joannah Nanjekye. (Patch by Joannah Nanjekye)
..
.. bpo: 36763
.. date: 2019-08-23-18-45-11
.. nonce: q3Kh8Z
.. section: C API
Options added by ``PySys_AddXOption()`` are now handled the same way than
``PyConfig.xoptions`` and command line ``-X`` options.
..
.. bpo: 37926
.. date: 2019-08-23-11-35-55
.. nonce: hnI5IQ
.. section: C API
Fix a crash in ``PySys_SetArgvEx(0, NULL, 0)``.
..
.. bpo: 37879
.. date: 2019-08-17-13-50-21
.. nonce: CZeUem
.. section: C API
Fix subtype_dealloc to suppress the type decref when the base type is a C
heap type
..
.. bpo: 37645
.. date: 2019-07-21-21-08-47
.. nonce: 4DcUaI
.. section: C API
Add :c:func:`_PyObject_FunctionStr` to get a user-friendly string
representation of a function-like object. Patch by Jeroen Demeyer.
..
.. bpo: 29548
.. date: 2019-07-17-09-50-50
.. nonce: 5wIptQ
.. section: C API
The functions ``PyEval_CallObject``, ``PyEval_CallFunction``,
``PyEval_CallMethod`` and ``PyEval_CallObjectWithKeywords`` are deprecated.
Use :c:func:`PyObject_Call` and its variants instead.
..
.. bpo: 37151
.. date: 2019-07-16-11-02-00
.. nonce: YKfuNA
.. section: C API
``PyCFunction_Call`` is now a deprecated alias of :c:func:`PyObject_Call`.
..
.. bpo: 37540
.. date: 2019-07-10-12-27-28
.. nonce: E8Z773
.. section: C API
The vectorcall protocol now requires that the caller passes only strings as
keyword names.
..
.. bpo: 37207
.. date: 2019-07-07-10-37-07
.. nonce: SlVNky
.. section: C API
The vectorcall protocol is now enabled for ``type`` objects: set
``tp_vectorcall`` to a vectorcall function to be used instead of ``tp_new``
and ``tp_init`` when calling the class itself.
..
.. bpo: 21120
.. date: 2019-07-06-23-56-47
.. nonce: lXHqlT
.. section: C API
Exclude Python-ast.h, ast.h and asdl.h from the limited API.
..
.. bpo: 37483
.. date: 2019-07-02-15-42-37
.. nonce: vftT4f
.. section: C API
Add new function ``_PyObject_CallOneArg`` for calling an object with one
positional argument.
..
.. bpo: 36763
.. date: 2019-06-28-15-49-16
.. nonce: zrmgki
.. section: C API
Add :func:`PyConfig_SetWideStringList` function.
..
.. bpo: 37337
.. date: 2019-06-19-12-06-31
.. nonce: gXIGyU
.. section: C API
Add fast functions for calling methods:
:c:func:`_PyObject_VectorcallMethod`, :c:func:`_PyObject_CallMethodNoArgs`
and :c:func:`_PyObject_CallMethodOneArg`.
..
.. bpo: 28805
.. date: 2019-06-14-14-03-51
.. nonce: qZC0N_
.. section: C API
The :const:`METH_FASTCALL` calling convention has been documented.
..
.. bpo: 37221
.. date: 2019-06-11-02-50-38
.. nonce: 4tClQT
.. section: C API
The new function :c:func:`PyCode_NewWithPosOnlyArgs` allows to create code
objects like :c:func:`PyCode_New`, but with an extra *posonlyargcount*
parameter for indicating the number of positonal-only arguments.
..
.. bpo: 37215
.. date: 2019-06-10-15-32-34
.. nonce: yzoNyU
.. section: C API
Fix dtrace issue introduce by bpo-36842
..
.. bpo: 37194
.. date: 2019-06-07-14-03-52
.. nonce: uck7MD
.. section: C API
Add a new public :c:func:`PyObject_CallNoArgs` function to the C API: call a
callable Python object without any arguments. It is the most efficient way
to call a callback without any argument. On x86-64, for example,
``PyObject_CallFunctionObjArgs(func, NULL)`` allocates 960 bytes on the
stack per call, whereas ``PyObject_CallNoArgs(func)`` only allocates 624
bytes per call.
..
.. bpo: 37170
.. date: 2019-06-06-08-47-04
.. nonce: hO_fpM
.. section: C API
Fix the cast on error in :c:func:`PyLong_AsUnsignedLongLongMask()`.
..
.. bpo: 35381
.. date: 2019-01-18-17-05-26
.. nonce: 9CbeW3
.. section: C API
Convert posixmodule.c statically allocated types ``DirEntryType`` and
``ScandirIteratorType`` to heap-allocated types.
..
.. bpo: 34331
.. date: 2018-08-04-00-59-44
.. nonce: iaUkmU
.. section: C API
Use singular/plural noun in error message when instantiating an abstract
class with non-overriden abstract method(s).
| reStructuredText | 1 | oleksandr-pavlyk/cpython | Misc/NEWS.d/3.9.0a1.rst | [
"0BSD"
] |
---
title: "R Notebook"
author: shawshank
date: 4/20/20
output: html_document
---
# Choosing the DAG that best represents the data
### Reading data
```{r, warning=FALSE}
library(bnlearn)
library(Rgraphviz)
# df <- read.csv("data/cleansed_data.csv")
df <- read.csv("data/cleansed_data.csv")
df$BPB = as.factor(as.character(df$BPB))
df$Beds = as.factor(as.character(df$Beds))
df$Baths = as.factor(as.character(df$Baths))
nrow(df)
```
### Exploring Different DAGs
We explored the following causal DAGs for our analysis:
DAG1 : This DAG split up the regions based on neighbourhoods. We split up the neighbourhoods into 2 broad categories, neighbourhood north and neighbourhood south. 'Palo Alto', 'Mountain View', 'Los Altos', 'Milpitas', 'Sunnyvale', 'Santa Clara' were classified as neighbourhood north and 'Campbell', 'Cupertino', 'Saratoga', 'San Jose' were classified as neighbourhood south.
DAG2 : In this model we considered the latitude and longitude as separate nodes replacing the discrete neighbourhoods. We did this because we thought a continuous function for the location will allow the model to be more accurate compared to a discrete neighbourhood categorization.
DAG3 : In this model we combined the latitude and longitude nodes from DAG2 to a single node by multiplying their values. We did this to reduce the model complexity of DAG2 but preserving the continuous nature of the location function.
DAG4 : This model is similar to DAG3 with the edge between Neigh and Rent removed. We did this because when we looked at the conditional independence tests(on the data) for DAG3 we found out that latlng does not effect Rent.
DAG5 : This model is This model is similar to DAG1 with the edge between Neigh and Rent removed. We did this because when we looked at the conditional independence tests(on the data) for DAG1 we found out that Neigh does not effect Rent.
```{r}
dag1 <- model2network("[Neigh][BPB][Zest|BPB:Neigh][Rent|BPB:Neigh][ROI|Zest:Rent]")
dag2 <- model2network("[latitude][longitude][BPB][Zest|BPB:latitude:longitude][Rent|BPB:latitude:longitude][ROI|Zest:Rent]")
dag3 <- model2network("[latlng][Type][BPB|Type][Zest|BPB:latlng:Type][Rent|BPB:latlng][ROI|Zest:Rent]")
dag4 <- model2network("[latlng][BPB][Zest|BPB:latlng][Rent|BPB:latlng][ROI|Zest:Rent]")
dag5 <- model2network("[Neigh][BPB][Zest|BPB:Neigh][Rent|BPB][ROI|Zest:Rent]")
dag6 <- model2network("[Neigh][Type][BPB|Type][Zest|BPB:Neigh:Type][Rent|BPB:Neigh][ROI|Zest:Rent]")
dags <- list()
dags[[1]] <- dag1
dags[[2]] <- dag2
dags[[3]] <- dag3
dags[[4]] <- dag4
dags[[5]] <- dag5
dags[[6]] <- dag6
graphviz.plot(dag1)
graphviz.plot(dag2)
graphviz.plot(dag3)
graphviz.plot(dag4)
graphviz.plot(dag5)
graphviz.plot(dag6)
```
### Fitting the data to the models
```{r}
fit_models <- list()
for (i in 1:length(dags)) {
fit_models[[i]] <- bn.fit(dags[[i]], df[,nodes(dags[[i]])])
}
```
### Listing the subsets for all possible pairs
```{r}
get_subsets <- function(model, subset_size){
vars <- nodes(model)
pairs <- combn(x = vars, 2, list)
arg_sets <- list()
for(pair in pairs){
others <- setdiff(vars, pair)
conditioning_sets <- unlist(lapply(0:subset_size, function(.x) combn(others, .x, list)), recursive = F)
for(set in conditioning_sets){
args <- list(x = pair[1], y = pair[2], z = set)
arg_sets <- c(arg_sets, list(args))
}
}
return(arg_sets)
}
dag_subsets <- list()
for (i in 1:length(dags)) {
dag <- dags[[i]]
dag_subsets[[i]] <- get_subsets(dag, subset_size = length(nodes(dag)) - 2)
}
```
### Evaluating d-separtaions
```{r}
d_sep <- bnlearn:::dseparation
get_d_sep_statments <- function (model, subsets){
d_sep_list <- list()
for(arg in subsets){
if(d_sep(bn=model, x=arg$x, y=arg$y, z=arg$z)){
args <- list(x = arg$x, y = arg$y, z = arg$z)
d_sep_list <- c(d_sep_list, list(args))
}
}
return(d_sep_list)
}
dag_dsep_lists <- list()
for (i in 1:length(dags)) {
dag_dsep_lists[[i]] <- get_d_sep_statments(dags[[i]], dag_subsets[[i]])
print(length(dag_dsep_lists[[i]]))
}
```
### Evaluating conditional independence tests on the data
```{r, warning=FALSE}
get_CI_sets = function(subsets, data){
ci_sets = list()
for(arg in subsets){
test_outcome <- ci.test(arg$x, arg$y, arg$z, data)
alpha <- .05
if(test_outcome$p.value > alpha){
args <- list(x = arg$x, y = arg$y, z = arg$z)
ci_sets <- c(ci_sets, list(args))
}
}
return(ci_sets)
}
dag_ci_sets <- list()
for (i in 1:length(dags)) {
dag_ci_sets[[i]] <- get_CI_sets(dag_subsets[[i]], df[,nodes(dags[[i]])])
print(length(dag_ci_sets[[i]]))
}
```
If we want to find pairs that are CI but not D-separated. Here we look at it for our best DAG
```{r}
d_sep_list <- dag_dsep_lists[[5]]
ci_test <- dag_ci_sets[[5]]
for (c in ci_test) {
found <- FALSE
for(d in d_sep_list){
if (isTRUE(all.equal(d,c))){
found <- TRUE
}
}
if (!found & length(c$z) == 0) {
# print(c)
}
}
```
### Evaluating the Global Markov Property and the Faithfulness assumption
```{r}
eval_GM_and_F <- function (d_sep_list, ci_sets){
count <- 0
for(d in d_sep_list){
for(c in ci_sets){
if (isTRUE(all.equal(d,c))){
count <- count + 1
break
}
}
}
return(c(count/length(d_sep_list), count/length(ci_sets)))
}
gmfs <- list()
for (i in 1:length(dags)) {
gmfs[[i]] <- eval_GM_and_F(dag_dsep_lists[[i]], dag_ci_sets[[i]])
print(gmfs[[i]])
}
```
### Conclusion
We picked model number 5 to answer queries because it had gave the best results for the Global Markov Property and the Faithfulness assumption.
| RMarkdown | 5 | amoskowitz14/causalML | projects/airbnb santa clara/dag_analysis.rmd | [
"MIT"
] |
SockJS relay server
require('source-map-support').install()
sockjs = require 'sockjs'
sockjsUtil = require 'sockjs/lib/utils'
http = require 'http'
crypto = require 'crypto'
serveStatic = require 'serve-static'
finalhandler = require 'finalhandler'
path = require 'path'
_ = require './lib/lodash.min'
requirejs = require('requirejs').config
baseUrl: path.dirname(module.filename)
paths:
immutable: 'lib/immutable-3.7.4.min'
{
badMasterIdError
badMsgTypeError
disapprovedError
badVersionError
noTrim
} = requirejs './common'
{
runReplacements
} = requirejs './ot'
masters = {}
slaves = {}
socketPrefix = '/Leisure/(master|slave(?:-([^/]*)))'
Thanks to [Broofa's stackoverflow post](http://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript/105074#105074) Altered the code to use crypto's random.
s4 = ->
bytes = crypto.randomBytes 2
n = (bytes[0] + (bytes[1] << 8)).toString(16)
while n.length < 4
n = '0' + n
n
guid = -> "#{s4()}#{s4()}-#{s4()}-#{s4()}-#{s4()}-#{s4()}#{s4()}#{s4()}"
diag = (args...)-> console.log args...
class MessageHandler
constructor: ->
@id = guid()
@messageCount = 1
@lastVersionAck = -1
setConnection: (@con)->
console.log "#{@type} connection: #{@id}"
@con.leisure = this
@con.on 'data', (msg)=> @handleMessage JSON.parse msg
@con.on 'close', => @closed()
type: 'Unknown Handler'
close: -> @con.close()
closed: ->
console.log "#{@type} closed: #{@id}"
send: (msg)->
#diag "S #{JSON.stringify msg}"
@con.write JSON.stringify msg
sendError: (msg)->
msg.type = 'error'
@send msg
setTimeout (=> @close()), 1
Handle a message from the connected browser
handleMessage: (msg)->
msg.connectionId = @connectionId
#diag "R #{JSON.stringify msg}"
if !(msg.type of @handler)
console.log "Received bad message #{msg.type}", msg
@close()
else @handler[msg.type].call this, msg
handler:
log: (msg)-> console.log msg.msg
replace: (msg)->
@lastVersionAck = msg.parent
@master.relay msg
conditionalReplace: (msg)->
if msg.version != @master.version && @master.versionDirty
@send type: 'rejectChange', targetVersion: msg.targetVersion, version: @version
else @master.relay msg
ack: (msg)->
@lastVersionAck = msg.version
@master.peerAcknowledgedVersion msg
shouldEcho: (msg)-> isTextMsg(msg) && msg.connectionId == @connectionId
isTextMsg = (msg)-> msg.type in ['replace', 'conditionalReplace']
validateBatch = (replacements)->
replacements = _.sortBy replacements, (x)-> x.start
last = 0
for repl in replacements
if repl.start < last then throw new Error "Attempt to perform overlapping replacements in batch"
last = repl.end
replacements
class MasterHandler extends MessageHandler
constructor: ->
super()
@master = this
@connectionId = "peer-0"
@slaves = {}
@pendingSlaves = {}
@doc = ''
@peerCount = 0
@version = 0
@nextVersionCallbacks = []
@pendingVersionAcks = {}
@remainingVersionAcks = 0
@versionDirty = false
@versionOps = []
@unreplacements = []
@ackedVersion = -1
type: 'Master'
setConnection: (con)->
masters[@id] = this
super con
@send type: 'connect', id: @id, connectionId: @connectionId, version: @messageCount
addSlave: (slave)->
slave.connectionId = "peer-#{++@peerCount}"
@pendingSlaves[slave.connectionId] = slave
@send type: 'slaveConnect', slaveId: slave.connectionId
removeSlave: (slave)->
delete @slaves[slave.connectionId]
delete @pendingSlaves[slave.connectionId]
@send type: 'slaveDisconnect', slaveId: slave.connectionId
@broadcast type: 'connections', count: 1 + _.size @slaves
closed: ->
delete masters[@con.leisure.id]
for id, slave of @slaves
slave.close()
@slaves = {}
super()
versionClean: -> !@versionDirty && !@remainingVersionAcks
startVersionInc: ->
if @versionDirty && !@remainingVersionAcks
@pendingVersionAcks = _.clone slaves
@pendingVersionAcks[@connectionId] = this
@remainingVersionAcks = _.size @pendingVersionAcks
@broadcast type: 'newVersion', version: @version + 1
peerAcknowledgedVersion: (msg)->
#diag "RECEIVED VERSION ACK"
@trimVersions()
connection: (msg)->
if msg.connectionId == @connectionId then this else @slaves[msg.connectionId]
relay: (msg)->
if msg.type == 'replace'
{start, end, text} = msg
@versionOps.push msg
@trimVersions()
else if msg.type == 'conditionalReplace'
msg.replacements = validateBatch msg.replacements
offset = 0
for repl in msg.replacements
@doc = @doc.substring(0, repl.start + offset) + repl.text + @doc.substring repl.end + offset
offset += repl.text.length - repl.end + repl.start
@broadcast msg
trimVersions: ->
if noTrim then return
minVersion = @lastVersionAck
for id, slave of @slaves
minVersion = Math.min minVersion, slave.lastVersionAck
for op, pos in @versionOps
if op.version >= minVersion
if pos > 0
@updateDoc @versionOps.slice 0, pos
@unreplacements = []
@versionOps = @versionOps.slice pos
@updateDoc()
@broadcast type: 'trimVersions', version: minVersion
break
replace: (start, end, text)->
@doc = @doc.substring(0, start) + text + @doc.substring end
updateDoc: (changes)->
for repl in @unreplacements by -1
@replace repl.start, repl.end, repl.text
@unreplacements = []
runReplacements changes || @versionOps, (start, end, text)=>
@unreplacements.push start: start, end: start + text.length, text: @doc.substring start, end
@replace start, end, text
sendEchoIfNeeded: (msg)->
if isTextMsg(msg) && con = @connection msg
con.send type: 'echo', version: msg.version
con
broadcast: (msg)->
msg.version = ++@messageCount
if (echoer = @sendEchoIfNeeded(msg)) != this then @send msg
for id, slave of @slaves
if echoer != slave then slave.send msg
handler:
__proto__: MessageHandler::handler
initDoc: ({@doc})->
slaveApproval: ({slaveId, approval})->
if slave = @pendingSlaves[slaveId]
delete @pendingSlaves[slaveId]
if approval
@slaves[slaveId] = slave
slave.send type: 'connect', id: @id, connectionId: slave.connectionId, doc: @doc, version: @messageCount
@broadcast type: 'connections', count: 1 + _.size @slaves
else slave.sendError disapprovedError()
class SlaveHandler extends MessageHandler
type: 'Slave'
setConnection: (con, masterId)->
if !(@master = masters[masterId])
@sendError badMasterIdError masterId
else @master.addSlave this
super con
setId: (@id)->
closed: ->
@master.removeSlave this
super()
startServer = (port)->
console.log 'serve: ' + path.dirname(process.cwd())
fileServer = serveStatic path.dirname(process.cwd()), index: ['index.html']
http_server = http.createServer (req, res)->
fileServer req, res, finalhandler req, res
sockjs.createServer(
sockjs_url: 'http://cdn.jsdelivr.net/sockjs/1.0.1/sockjs.min.js'
prefix: socketPrefix)
.on 'connection', (con)->
[ignore, type, masterId] = con.pathname.match socketPrefix
if type == 'master' then new MasterHandler().setConnection con
else new SlaveHandler().setConnection con, masterId
.installHandlers(http_server)
http_server.listen(port, '0.0.0.0')
module.exports = {
startServer
guid
}
| Literate CoffeeScript | 4 | zot/Leisure | server/server.litcoffee | [
"Zlib"
] |
--TEST--
Do not constant fold increment of array
--FILE--
<?php
function test_inc_array() {
$a = [];
$a++;
}
function test_inc_partial_array($k) {
$a = [];
$a[$k] = 0;
$a++;
}
try {
test_inc_array();
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
try {
test_inc_partial_array(0);
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
Cannot increment array
Cannot increment array
| PHP | 3 | NathanFreeman/php-src | ext/opcache/tests/inc_array.phpt | [
"PHP-3.01"
] |
package com.baeldung.spring.cloud.archaius.zookeeperconfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class ZookeeperConfigApplication {
public static void main(String[] args) {
SpringApplication.run(ZookeeperConfigApplication.class, args);
}
}
| Java | 4 | DBatOWL/tutorials | spring-cloud/spring-cloud-archaius/zookeeper-config/src/main/java/com/baeldung/spring/cloud/archaius/zookeeperconfig/ZookeeperConfigApplication.java | [
"MIT"
] |
datatype foo = A | B of bar
and bar = C | D of foo
val q = B (D A)
fun main () = return <xml>
{case q of
B (D A) => <xml>Good</xml>
| _ => <xml>Bad</xml>}
</xml>
| UrWeb | 3 | apple314159/urweb | tests/mutual.ur | [
"BSD-3-Clause"
] |
(define (string.rpad s n c) (string s (string.rep c (- n (string.count s)))))
(define (string.rep s k)
(cond ((< k 4)
(cond ((<= k 0) "")
((= k 1) (string s))
((= k 2) (string s s))
(else (string s s s))))
((odd? k) (string s (string.rep s (- k 1))))
(else (string.rep (string s s) (/ k 2)))))
(let ((*profiles* (table))
(running #f))
(set! profile
(lambda (s)
(let ((f (top-level-value s)))
(put! *profiles* s (cons 0 (cons 0 0))) ; count, self, total
(set-top-level-value! s
(lambda args
(define tt (get *profiles* s))
(define last-tt running)
(define last-t0 (cddr tt))
(define t0 (time.now))
(set! running tt)
(define v (apply f args))
(set! running last-tt)
(define t1 (time.now))
(define tdelta (- t1 t0))
(if last-tt (set-car! (cdr last-tt) (- (cadr last-tt) tdelta)))
(set-car! (cdr tt) (+ (cadr tt) tdelta))
(set-cdr! (cdr tt) (+ last-t0 tdelta))
(set-car! tt (+ (car tt) 1))
v)))))
(set! show-profiles
(lambda ()
(define total 0)
(define pr (filter (lambda (x) (> (cadr x) 0))
(table.pairs *profiles*)))
(define width (+ 4
(apply max
(map (lambda (x)
(length (string x)))
(cons 'Function
(map car pr))))))
(princ (string.rpad "Function" width #\ )
"#Calls Total Time (seconds) Self Time (seconds)")
(newline)
(princ (string.rpad "--------" width #\ )
"------ -------------------- -------------------")
(newline)
(for-each
(lambda (p)
(set! total (+ total (cadr p)))
(princ (string.rpad (string (cadddr p)) width #\ )
(string.rpad (string (caddr p)) 11 #\ )
(string.rpad (string (car p)) 24 #\ )
(cadr p))
(newline))
(reverse (simple-sort (map (lambda (l) (reverse (to-proper l)))
pr))))
(princ (string.rpad "--------" width #\ )
"------ -------------------- -------------------")
(newline)
(princ (string.rpad "Total " width #\ )
" " (string total))
(newline)))
(set! clear-profiles
(lambda ()
(for-each (lambda (k)
(put! *profiles* k (cons 0 (cons 0 0))))
(table.keys *profiles*)))))
| Scheme | 3 | greimel/julia | src/flisp/profile.scm | [
"Zlib"
] |
module com.networknt.encode.decode {
exports com.networknt.encode;
exports com.networknt.decode;
requires com.networknt.config;
requires com.networknt.handler;
requires com.networknt.utility;
requires com.networknt.status;
requires xnio.api;
requires org.slf4j;
requires java.logging;
} | Jasmin | 3 | KellyShao/light-4j | encode-decode/src/main/java/module-info.j | [
"Apache-2.0"
] |
# A print command that concatenates arguments together with an optional separator
# By default there will be no newline
def print [
--separator(-s):any # Optional separator (not yet flagged as optional?)
...rest # All of the parameters
] {
let is_empty = ($separator | empty?)
let num_of_rest = ($rest | length)
$rest | each --numbered { |param|
if $is_empty {
$param.item
} {
if $num_of_rest > ($param.index + 1) {
$"($param.item)($separator)"
} {
$param.item
}
}
} | into string | str collect
}
# > print 1 2 3 "four" -s '--'
# 1--2--3--four
# > print 1 2 3 "four"
# 123four
# An alternate print command that concatenates arguments together with an optional separator.
# This one uses str collect instead of build-string.
# By default there will be no newline
def print2 [
--separator(-s):any # Optional separator (not yet flagged as optional?)
...rest # All of the parameters
] {
let is_empty = ($separator | empty?)
let num_of_rest = ($rest | length)
if $is_empty {
$rest | into string | str collect
} {
$rest | into string | str collect $separator
}
}
# Bring in the logging command
#source logging.nu
# A print command that concatenates arguments together with an optional separator.
# This print command will also concatenate tables like [1 2 3] as well as most other primitives
# since the into string command has been updated with wider support.
def print3 [
--separator(-s):any # Optional separator (not yet flagged as optional?)
--flat(-f) # If tables are found, flatten them
...rest # All of the parameters
] {
let sep_empty = ($separator | empty?)
let num_of_rest = ($rest | length)
let flat = ($flat | empty?)
$rest | each --numbered { |param|
if $sep_empty {
#log 'sep is empty'
if (echo $param.item | length) > 1 && $flat {
#log 'flatten please'
let flatter = ($param.item | flatten | into string | str collect)
$flatter
} {
#log 'no flat'
$param.item
}
} {
if $num_of_rest > ($param.index + 1) {
if ($param.item | length) > 1 && $flat {
let flatter = ($param.item | flatten | into string | str collect $separator)
$"($flatter)($separator)"
} {
$"($param.item)($separator)"
}
} {
if ($param.item | length) > 1 && $flat {
let flatter = ($param.item | flatten | into string | str collect $separator)
$flatter
} {
$param.item
}
}
}
} | str collect
}
| Nu | 4 | x3rAx/nu_scripts | stdlib_candidate/print.nu | [
"MIT"
] |
// edition:2018
#![deny(unused_extern_crates)]
#![feature(test, rustc_private, crate_visibility_modifier)]
extern crate libc;
//~^ ERROR unused extern crate
//~| HELP remove
extern crate libc as x;
//~^ ERROR unused extern crate
//~| HELP remove
extern crate proc_macro;
#[macro_use]
extern crate test;
pub extern crate test as y;
pub extern crate alloc;
pub(crate) extern crate alloc as a;
crate extern crate alloc as b;
mod foo {
pub(in crate::foo) extern crate alloc as c;
pub(super) extern crate alloc as d;
extern crate libc;
//~^ ERROR unused extern crate
//~| HELP remove
extern crate libc as x;
//~^ ERROR unused extern crate
//~| HELP remove
pub extern crate test;
pub extern crate test as y;
mod bar {
extern crate libc;
//~^ ERROR unused extern crate
//~| HELP remove
extern crate libc as x;
//~^ ERROR unused extern crate
//~| HELP remove
pub(in crate::foo::bar) extern crate alloc as e;
fn dummy() {
e::string::String::new();
}
}
fn dummy() {
c::string::String::new();
d::string::String::new();
}
}
fn main() {
a::string::String::new();
b::string::String::new();
proc_macro::TokenStream::new();
}
| Rust | 2 | Eric-Arellano/rust | src/test/ui/unnecessary-extern-crate.rs | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] |
method tryMatch(pattern, obj) {
if (pattern.match(obj)) then {
print "OK"
} else {
print "Not OK; {obj} should have matched"
}
}
method tryNoMatch(pattern, obj) {
if (pattern.match(obj)) then {
print "Not OK; {obj} should not have matched"
} else {
print "OK"
}
}
tryMatch(String, "hello")
tryMatch(String, "hello" ++ "world")
tryNoMatch(String, 1)
tryMatch(Number, 1)
tryNoMatch(Number, "hello")
tryMatch(Boolean, true)
tryNoMatch(Boolean, 1)
| Grace | 4 | Dmitri-2/GraceWebsite | js-simple/tests/retired/t116_builtintypematch_test.grace | [
"MIT",
"BSD-3-Clause"
] |
extends Button
# This script shows how to save data using Godot's custom ConfigFile format.
# ConfigFile can store any Godot type natively.
# The root game node (so we can get and instance enemies).
export(NodePath) var game_node
# The player node (so we can set/get its health and position).
export(NodePath) var player_node
const SAVE_PATH = "user://save_config_file.ini"
func save_game():
var config = ConfigFile.new()
var player = get_node(player_node)
config.set_value("player", "position", player.position)
config.set_value("player", "health", player.health)
var enemies = []
for enemy in get_tree().get_nodes_in_group("enemy"):
enemies.push_back({
position = enemy.position,
})
config.set_value("enemies", "enemies", enemies)
config.save(SAVE_PATH)
get_node("../LoadConfigFile").disabled = false
# `load()` is reserved.
func load_game():
var config = ConfigFile.new()
config.load(SAVE_PATH)
var player = get_node(player_node)
player.position = config.get_value("player", "position")
player.health = config.get_value("player", "health")
# Remove existing enemies and add new ones.
for enemy in get_tree().get_nodes_in_group("enemy"):
enemy.queue_free()
var enemies = config.get_value("enemies", "enemies")
# Ensure the node structure is the same when loading.
var game = get_node(game_node)
for enemy_config in enemies:
var enemy = preload("res://enemy.tscn").instance()
enemy.position = enemy_config.position
game.add_child(enemy)
| GDScript | 5 | ironpeak/godot-demo-projects | loading/serialization/save_load_config_file.gd | [
"MIT"
] |
@echo off
scrcpy.exe %*
:: if the exit code is >= 1, then pause
if errorlevel 1 pause
| Batchfile | 4 | LuckyNigel/scrcpy | app/data/scrcpy-console.bat | [
"Apache-2.0"
] |
--TEST--
Relative print commands
--INI--
opcache.enable_cli=0
--PHPDBG--
b foo
r
p
p o
q
--EXPECTF--
[Successful compilation of %s]
prompt> [Breakpoint #0 added at foo]
prompt> string(4) "test"
[Breakpoint #0 in foo() at %s:15, hits: 1]
>00015: var_dump(strrev($baz));
00016: }
00017:
prompt> [Stack in foo() (8 ops)]
foo:
; (lines=8, args=1, vars=1, tmps=2)
; %s:14-16
L0014 0000 CV0($baz) = RECV 1
L0015 0001 INIT_FCALL %d %d string("var_dump")
L0015 0002 INIT_FCALL %d %d string("strrev")
L0015 0003 SEND_VAR CV0($baz) 1
L0015 0004 V1 = DO_ICALL
L0015 0005 SEND_VAR V1 1
L0015 0006 DO_ICALL
L0016 0007 RETURN null
prompt> L0015 0001 INIT_FCALL %d %d string("var_dump")
prompt>
--FILE--
<?php
namespace Foo {
class Bar {
function Foo($bar) {
var_dump($bar);
}
function baz() { }
}
}
namespace {
function foo($baz) {
var_dump(strrev($baz));
}
(new \Foo\Bar)->Foo("test");
foo("test");
}
| PHP | 4 | NathanFreeman/php-src | sapi/phpdbg/tests/print_002.phpt | [
"PHP-3.01"
] |
{
// Because these are not like a token object with a 'value' attribute,
// Style Dictionary won't consider them tokens and therefore won't output them.
// But, you can still access/reference them in tokens using the same reference
// syntax: "value": "{alpha.0}"
// This is an array, you can access its members with dot notation and
// the index of the item.
alpha: [
1,
0.9,
0.75,
0.5
]
}
| JSON5 | 3 | pcsubirachs/sats_stream | node_modules/style-dictionary/examples/advanced/transitive-transforms/tokens/alpha.json5 | [
"MIT"
] |
\x -> x ++ ""
| Grace | 1 | DebugSteven/grace | tasty/data/unit/append-simplify-input.grace | [
"BSD-3-Clause"
] |
CREATE TABLE `tb_hbheuprskb` (
`col_mqqxkezdux` enum('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8 NOT NULL,
UNIQUE KEY `col_mqqxkezdux` (`col_mqqxkezdux`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
| SQL | 3 | yuanweikang2020/canal | parse/src/test/resources/ddl/alter/mysql_59.sql | [
"Apache-2.0"
] |
%{
/*
* Copyright © 2008, 2009 Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#include <ctype.h>
#include <limits.h>
#include "strtod.h"
#include "ast.h"
#include "glsl_parser_extras.h"
#include "glsl_parser.h"
#if defined(_MSC_VER)
# pragma warning(disable: 4065) // warning C4065: switch statement contains 'default' but no 'case' labels
# pragma warning(disable: 4244) // warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
# pragma warning(disable: 4267) // warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
#endif // defined(_MSC_VER)
static int classify_identifier(struct _mesa_glsl_parse_state *, const char *);
#ifdef _MSC_VER
#define YY_NO_UNISTD_H
#endif
#define YY_USER_ACTION \
do { \
yylloc->source = 0; \
yylloc->first_column = yycolumn + 1; \
yylloc->first_line = yylloc->last_line = yylineno + 1; \
yycolumn += yyleng; \
yylloc->last_column = yycolumn + 1; \
} while(0);
#define YY_USER_INIT yylineno = 0; yycolumn = 0;
/* A macro for handling reserved words and keywords across language versions.
*
* Certain words start out as identifiers, become reserved words in
* later language revisions, and finally become language keywords.
* This may happen at different times in desktop GLSL and GLSL ES.
*
* For example, consider the following lexer rule:
* samplerBuffer KEYWORD(130, 0, 140, 0, SAMPLERBUFFER)
*
* This means that "samplerBuffer" will be treated as:
* - a keyword (SAMPLERBUFFER token) ...in GLSL >= 1.40
* - a reserved word - error ...in GLSL >= 1.30
* - an identifier ...in GLSL < 1.30 or GLSL ES
*/
#define KEYWORD(reserved_glsl, reserved_glsl_es, \
allowed_glsl, allowed_glsl_es, token) \
KEYWORD_WITH_ALT(reserved_glsl, reserved_glsl_es, \
allowed_glsl, allowed_glsl_es, false, token)
/**
* Like the KEYWORD macro, but the word is also treated as a keyword
* if the given boolean expression is true.
*/
#define KEYWORD_WITH_ALT(reserved_glsl, reserved_glsl_es, \
allowed_glsl, allowed_glsl_es, \
alt_expr, token) \
do { \
if (yyextra->is_version(allowed_glsl, allowed_glsl_es) \
|| (alt_expr)) { \
return token; \
} else if (yyextra->is_version(reserved_glsl, \
reserved_glsl_es)) { \
_mesa_glsl_error(yylloc, yyextra, \
"illegal use of reserved word `%s'", yytext); \
return ERROR_TOK; \
} else { \
void *mem_ctx = yyextra; \
yylval->identifier = ralloc_strdup(mem_ctx, yytext); \
return classify_identifier(yyextra, yytext); \
} \
} while (0)
/**
* A macro for handling keywords that have been present in GLSL since
* its origin, but were changed into reserved words in GLSL 3.00 ES.
*/
#define DEPRECATED_ES_KEYWORD(token) \
do { \
if (yyextra->is_version(0, 300)) { \
_mesa_glsl_error(yylloc, yyextra, \
"illegal use of reserved word `%s'", yytext); \
return ERROR_TOK; \
} else { \
return token; \
} \
} while (0)
static int
literal_integer(char *text, int len, struct _mesa_glsl_parse_state *state,
YYSTYPE *lval, YYLTYPE *lloc, int base)
{
bool is_uint = (text[len - 1] == 'u' ||
text[len - 1] == 'U');
const char *digits = text;
/* Skip "0x" */
if (base == 16)
digits += 2;
#ifdef _MSC_VER
unsigned __int64 value = _strtoui64(digits, NULL, base);
#else
unsigned long long value = strtoull(digits, NULL, base);
#endif
lval->n = (int)value;
if (value > UINT_MAX) {
/* Note that signed 0xffffffff is valid, not out of range! */
if (state->is_version(130, 300)) {
_mesa_glsl_error(lloc, state,
"literal value `%s' out of range", text);
} else {
_mesa_glsl_warning(lloc, state,
"literal value `%s' out of range", text);
}
} else if (base == 10 && !is_uint && (unsigned)value > (unsigned)INT_MAX + 1) {
/* Tries to catch unintentionally providing a negative value.
* Note that -2147483648 is parsed as -(2147483648), so we don't
* want to warn for INT_MAX.
*/
_mesa_glsl_warning(lloc, state,
"signed literal value `%s' is interpreted as %d",
text, lval->n);
}
return is_uint ? UINTCONSTANT : INTCONSTANT;
}
#define LITERAL_INTEGER(base) \
literal_integer(yytext, yyleng, yyextra, yylval, yylloc, base)
%}
%option bison-bridge bison-locations reentrant noyywrap
%option nounput noyy_top_state
%option never-interactive
%option prefix="_mesa_glsl_lexer_"
%option extra-type="struct _mesa_glsl_parse_state *"
%option warn nodefault
/* Note: When adding any start conditions to this list, you must also
* update the "Internal compiler error" catch-all rule near the end of
* this file. */
%x PP PRAGMA
DEC_INT [1-9][0-9]*
HEX_INT 0[xX][0-9a-fA-F]+
OCT_INT 0[0-7]*
INT_T ({DEC_INT}|{HEX_INT}|{OCT_INT})
SPC [ \t]*
SPCP [ \t]+
HASH ^{SPC}#{SPC}
%%
[ \r\t]+ ;
/* Preprocessor tokens. */
^[ \t]*#[ \t]*$ ;
^[ \t]*#[ \t]*version { BEGIN PP; return VERSION_TOK; }
^[ \t]*#[ \t]*extension { BEGIN PP; return EXTENSION; }
{HASH}line{SPCP}{INT_T}{SPCP}{INT_T}{SPC}$ {
/* Eat characters until the first digit is
* encountered
*/
char *ptr = yytext;
while (!isdigit(*ptr))
ptr++;
/* Subtract one from the line number because
* yylineno is zero-based instead of
* one-based.
*/
yylineno = strtol(ptr, &ptr, 0) - 1;
yylloc->source = strtol(ptr, NULL, 0);
}
{HASH}line{SPCP}{INT_T}{SPC}$ {
/* Eat characters until the first digit is
* encountered
*/
char *ptr = yytext;
while (!isdigit(*ptr))
ptr++;
/* Subtract one from the line number because
* yylineno is zero-based instead of
* one-based.
*/
yylineno = strtol(ptr, &ptr, 0) - 1;
}
^{SPC}#{SPC}pragma{SPCP}debug{SPC}\({SPC}on{SPC}\) {
BEGIN PP;
return PRAGMA_DEBUG_ON;
}
^{SPC}#{SPC}pragma{SPCP}debug{SPC}\({SPC}off{SPC}\) {
BEGIN PP;
return PRAGMA_DEBUG_OFF;
}
^{SPC}#{SPC}pragma{SPCP}optimize{SPC}\({SPC}on{SPC}\) {
BEGIN PP;
return PRAGMA_OPTIMIZE_ON;
}
^{SPC}#{SPC}pragma{SPCP}optimize{SPC}\({SPC}off{SPC}\) {
BEGIN PP;
return PRAGMA_OPTIMIZE_OFF;
}
^{SPC}#{SPC}pragma{SPCP}STDGL{SPCP}invariant{SPC}\({SPC}all{SPC}\) {
BEGIN PP;
return PRAGMA_INVARIANT_ALL;
}
^{SPC}#{SPC}pragma{SPCP} { BEGIN PRAGMA; }
<PRAGMA>\n { BEGIN 0; yylineno++; yycolumn = 0; }
<PRAGMA>. { }
<PP>\/\/[^\n]* { }
<PP>[ \t\r]* { }
<PP>: return COLON;
<PP>[_a-zA-Z][_a-zA-Z0-9]* {
void *mem_ctx = yyextra;
yylval->identifier = ralloc_strdup(mem_ctx, yytext);
return IDENTIFIER;
}
<PP>[1-9][0-9]* {
yylval->n = strtol(yytext, NULL, 10);
return INTCONSTANT;
}
<PP>\n { BEGIN 0; yylineno++; yycolumn = 0; return EOL; }
<PP>. { return yytext[0]; }
\n { yylineno++; yycolumn = 0; }
attribute DEPRECATED_ES_KEYWORD(ATTRIBUTE);
const return CONST_TOK;
bool return BOOL_TOK;
float return FLOAT_TOK;
int return INT_TOK;
uint KEYWORD(130, 300, 130, 300, UINT_TOK);
break return BREAK;
continue return CONTINUE;
do return DO;
while return WHILE;
else return ELSE;
for return FOR;
if return IF;
discard return DISCARD;
return return RETURN;
bvec2 return BVEC2;
bvec3 return BVEC3;
bvec4 return BVEC4;
ivec2 return IVEC2;
ivec3 return IVEC3;
ivec4 return IVEC4;
uvec2 KEYWORD(130, 300, 130, 300, UVEC2);
uvec3 KEYWORD(130, 300, 130, 300, UVEC3);
uvec4 KEYWORD(130, 300, 130, 300, UVEC4);
vec2 return VEC2;
vec3 return VEC3;
vec4 return VEC4;
mat2 return MAT2X2;
mat3 return MAT3X3;
mat4 return MAT4X4;
mat2x2 KEYWORD(120, 300, 120, 300, MAT2X2);
mat2x3 KEYWORD(120, 300, 120, 300, MAT2X3);
mat2x4 KEYWORD(120, 300, 120, 300, MAT2X4);
mat3x2 KEYWORD(120, 300, 120, 300, MAT3X2);
mat3x3 KEYWORD(120, 300, 120, 300, MAT3X3);
mat3x4 KEYWORD(120, 300, 120, 300, MAT3X4);
mat4x2 KEYWORD(120, 300, 120, 300, MAT4X2);
mat4x3 KEYWORD(120, 300, 120, 300, MAT4X3);
mat4x4 KEYWORD(120, 300, 120, 300, MAT4X4);
in return IN_TOK;
out return OUT_TOK;
inout return INOUT_TOK;
uniform return UNIFORM;
varying DEPRECATED_ES_KEYWORD(VARYING);
centroid KEYWORD(120, 300, 120, 300, CENTROID);
invariant KEYWORD(120, 100, 120, 100, INVARIANT);
flat KEYWORD(130, 100, 130, 300, FLAT);
smooth KEYWORD(130, 300, 130, 300, SMOOTH);
noperspective KEYWORD(130, 300, 130, 0, NOPERSPECTIVE);
sampler1D DEPRECATED_ES_KEYWORD(SAMPLER1D);
sampler2D return SAMPLER2D;
sampler3D return SAMPLER3D;
samplerCube return SAMPLERCUBE;
sampler1DArray KEYWORD(130, 300, 130, 0, SAMPLER1DARRAY);
sampler2DArray KEYWORD(130, 300, 130, 300, SAMPLER2DARRAY);
sampler1DShadow DEPRECATED_ES_KEYWORD(SAMPLER1DSHADOW);
sampler2DShadow return SAMPLER2DSHADOW;
samplerCubeShadow KEYWORD(130, 300, 130, 300, SAMPLERCUBESHADOW);
sampler1DArrayShadow KEYWORD(130, 300, 130, 0, SAMPLER1DARRAYSHADOW);
sampler2DArrayShadow KEYWORD(130, 300, 130, 300, SAMPLER2DARRAYSHADOW);
isampler1D KEYWORD(130, 300, 130, 0, ISAMPLER1D);
isampler2D KEYWORD(130, 300, 130, 300, ISAMPLER2D);
isampler3D KEYWORD(130, 300, 130, 300, ISAMPLER3D);
isamplerCube KEYWORD(130, 300, 130, 300, ISAMPLERCUBE);
isampler1DArray KEYWORD(130, 300, 130, 0, ISAMPLER1DARRAY);
isampler2DArray KEYWORD(130, 300, 130, 300, ISAMPLER2DARRAY);
usampler1D KEYWORD(130, 300, 130, 0, USAMPLER1D);
usampler2D KEYWORD(130, 300, 130, 300, USAMPLER2D);
usampler3D KEYWORD(130, 300, 130, 300, USAMPLER3D);
usamplerCube KEYWORD(130, 300, 130, 300, USAMPLERCUBE);
usampler1DArray KEYWORD(130, 300, 130, 0, USAMPLER1DARRAY);
usampler2DArray KEYWORD(130, 300, 130, 300, USAMPLER2DARRAY);
/* additional keywords in ARB_texture_multisample, included in GLSL 1.50 */
/* these are reserved but not defined in GLSL 3.00 */
sampler2DMS KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, SAMPLER2DMS);
isampler2DMS KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, ISAMPLER2DMS);
usampler2DMS KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, USAMPLER2DMS);
sampler2DMSArray KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, SAMPLER2DMSARRAY);
isampler2DMSArray KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, ISAMPLER2DMSARRAY);
usampler2DMSArray KEYWORD_WITH_ALT(150, 300, 150, 0, yyextra->ARB_texture_multisample_enable, USAMPLER2DMSARRAY);
/* keywords available with ARB_texture_cube_map_array_enable extension on desktop GLSL */
samplerCubeArray KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, SAMPLERCUBEARRAY);
isamplerCubeArray KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, ISAMPLERCUBEARRAY);
usamplerCubeArray KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, USAMPLERCUBEARRAY);
samplerCubeArrayShadow KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_texture_cube_map_array_enable, SAMPLERCUBEARRAYSHADOW);
samplerExternalOES {
if (yyextra->OES_EGL_image_external_enable)
return SAMPLEREXTERNALOES;
else
return IDENTIFIER;
}
/* keywords available with ARB_gpu_shader5 */
precise KEYWORD_WITH_ALT(400, 0, 400, 0, yyextra->ARB_gpu_shader5_enable, PRECISE);
/* keywords available with ARB_shader_image_load_store */
image1D KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE1D);
image2D KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE2D);
image3D KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE3D);
image2DRect KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE2DRECT);
imageCube KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGECUBE);
imageBuffer KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGEBUFFER);
image1DArray KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE1DARRAY);
image2DArray KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE2DARRAY);
imageCubeArray KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGECUBEARRAY);
image2DMS KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE2DMS);
image2DMSArray KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IMAGE2DMSARRAY);
iimage1D KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE1D);
iimage2D KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE2D);
iimage3D KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE3D);
iimage2DRect KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE2DRECT);
iimageCube KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGECUBE);
iimageBuffer KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGEBUFFER);
iimage1DArray KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE1DARRAY);
iimage2DArray KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE2DARRAY);
iimageCubeArray KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGECUBEARRAY);
iimage2DMS KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE2DMS);
iimage2DMSArray KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, IIMAGE2DMSARRAY);
uimage1D KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE1D);
uimage2D KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE2D);
uimage3D KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE3D);
uimage2DRect KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE2DRECT);
uimageCube KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGECUBE);
uimageBuffer KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGEBUFFER);
uimage1DArray KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE1DARRAY);
uimage2DArray KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE2DARRAY);
uimageCubeArray KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGECUBEARRAY);
uimage2DMS KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE2DMS);
uimage2DMSArray KEYWORD_WITH_ALT(130, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, UIMAGE2DMSARRAY);
image1DShadow KEYWORD(130, 300, 0, 0, IMAGE1DSHADOW);
image2DShadow KEYWORD(130, 300, 0, 0, IMAGE2DSHADOW);
image1DArrayShadow KEYWORD(130, 300, 0, 0, IMAGE1DARRAYSHADOW);
image2DArrayShadow KEYWORD(130, 300, 0, 0, IMAGE2DARRAYSHADOW);
coherent KEYWORD_WITH_ALT(420, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, COHERENT);
volatile KEYWORD_WITH_ALT(110, 100, 420, 0, yyextra->ARB_shader_image_load_store_enable, VOLATILE);
restrict KEYWORD_WITH_ALT(420, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, RESTRICT);
readonly KEYWORD_WITH_ALT(420, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, READONLY);
writeonly KEYWORD_WITH_ALT(420, 300, 420, 0, yyextra->ARB_shader_image_load_store_enable, WRITEONLY);
atomic_uint KEYWORD_WITH_ALT(420, 300, 420, 0, yyextra->ARB_shader_atomic_counters_enable, ATOMIC_UINT);
struct return STRUCT;
void return VOID_TOK;
layout {
if ((yyextra->is_version(140, 300))
|| yyextra->AMD_conservative_depth_enable
|| yyextra->ARB_conservative_depth_enable
|| yyextra->ARB_explicit_attrib_location_enable
|| yyextra->ARB_explicit_uniform_location_enable
|| yyextra->has_separate_shader_objects()
|| yyextra->ARB_uniform_buffer_object_enable
|| yyextra->ARB_fragment_coord_conventions_enable
|| yyextra->ARB_shading_language_420pack_enable
|| yyextra->ARB_compute_shader_enable) {
return LAYOUT_TOK;
} else {
void *mem_ctx = yyextra;
yylval->identifier = ralloc_strdup(mem_ctx, yytext);
return classify_identifier(yyextra, yytext);
}
}
\+\+ return INC_OP;
-- return DEC_OP;
\<= return LE_OP;
>= return GE_OP;
== return EQ_OP;
!= return NE_OP;
&& return AND_OP;
\|\| return OR_OP;
"^^" return XOR_OP;
"<<" return LEFT_OP;
">>" return RIGHT_OP;
\*= return MUL_ASSIGN;
\/= return DIV_ASSIGN;
\+= return ADD_ASSIGN;
\%= return MOD_ASSIGN;
\<\<= return LEFT_ASSIGN;
>>= return RIGHT_ASSIGN;
&= return AND_ASSIGN;
"^=" return XOR_ASSIGN;
\|= return OR_ASSIGN;
-= return SUB_ASSIGN;
[1-9][0-9]*[uU]? {
return LITERAL_INTEGER(10);
}
0[xX][0-9a-fA-F]+[uU]? {
return LITERAL_INTEGER(16);
}
0[0-7]*[uU]? {
return LITERAL_INTEGER(8);
}
[0-9]+\.[0-9]+([eE][+-]?[0-9]+)?[fF]? {
yylval->real = glsl_strtof(yytext, NULL);
return FLOATCONSTANT;
}
\.[0-9]+([eE][+-]?[0-9]+)?[fF]? {
yylval->real = glsl_strtof(yytext, NULL);
return FLOATCONSTANT;
}
[0-9]+\.([eE][+-]?[0-9]+)?[fF]? {
yylval->real = glsl_strtof(yytext, NULL);
return FLOATCONSTANT;
}
[0-9]+[eE][+-]?[0-9]+[fF]? {
yylval->real = glsl_strtof(yytext, NULL);
return FLOATCONSTANT;
}
[0-9]+[fF] {
yylval->real = glsl_strtof(yytext, NULL);
return FLOATCONSTANT;
}
true {
yylval->n = 1;
return BOOLCONSTANT;
}
false {
yylval->n = 0;
return BOOLCONSTANT;
}
/* Reserved words in GLSL 1.10. */
asm KEYWORD(110, 100, 0, 0, ASM);
class KEYWORD(110, 100, 0, 0, CLASS);
union KEYWORD(110, 100, 0, 0, UNION);
enum KEYWORD(110, 100, 0, 0, ENUM);
typedef KEYWORD(110, 100, 0, 0, TYPEDEF);
template KEYWORD(110, 100, 0, 0, TEMPLATE);
this KEYWORD(110, 100, 0, 0, THIS);
packed KEYWORD_WITH_ALT(110, 100, 140, 300, yyextra->ARB_uniform_buffer_object_enable, PACKED_TOK);
goto KEYWORD(110, 100, 0, 0, GOTO);
switch KEYWORD(110, 100, 130, 300, SWITCH);
default KEYWORD(110, 100, 130, 300, DEFAULT);
inline KEYWORD(110, 100, 0, 0, INLINE_TOK);
noinline KEYWORD(110, 100, 0, 0, NOINLINE);
public KEYWORD(110, 100, 0, 0, PUBLIC_TOK);
static KEYWORD(110, 100, 0, 0, STATIC);
extern KEYWORD(110, 100, 0, 0, EXTERN);
external KEYWORD(110, 100, 0, 0, EXTERNAL);
interface KEYWORD(110, 100, 0, 0, INTERFACE);
long KEYWORD(110, 100, 0, 0, LONG_TOK);
short KEYWORD(110, 100, 0, 0, SHORT_TOK);
double KEYWORD(110, 100, 400, 0, DOUBLE_TOK);
half KEYWORD(110, 100, 0, 0, HALF);
fixed KEYWORD(110, 100, 0, 0, FIXED_TOK);
unsigned KEYWORD(110, 100, 0, 0, UNSIGNED);
input KEYWORD(110, 100, 0, 0, INPUT_TOK);
output KEYWORD(110, 100, 0, 0, OUTPUT);
hvec2 KEYWORD(110, 100, 0, 0, HVEC2);
hvec3 KEYWORD(110, 100, 0, 0, HVEC3);
hvec4 KEYWORD(110, 100, 0, 0, HVEC4);
dvec2 KEYWORD(110, 100, 400, 0, DVEC2);
dvec3 KEYWORD(110, 100, 400, 0, DVEC3);
dvec4 KEYWORD(110, 100, 400, 0, DVEC4);
fvec2 KEYWORD(110, 100, 0, 0, FVEC2);
fvec3 KEYWORD(110, 100, 0, 0, FVEC3);
fvec4 KEYWORD(110, 100, 0, 0, FVEC4);
sampler2DRect DEPRECATED_ES_KEYWORD(SAMPLER2DRECT);
sampler3DRect KEYWORD(110, 100, 0, 0, SAMPLER3DRECT);
sampler2DRectShadow DEPRECATED_ES_KEYWORD(SAMPLER2DRECTSHADOW);
sizeof KEYWORD(110, 100, 0, 0, SIZEOF);
cast KEYWORD(110, 100, 0, 0, CAST);
namespace KEYWORD(110, 100, 0, 0, NAMESPACE);
using KEYWORD(110, 100, 0, 0, USING);
/* Additional reserved words in GLSL 1.20. */
lowp KEYWORD(120, 100, 130, 100, LOWP);
mediump KEYWORD(120, 100, 130, 100, MEDIUMP);
highp KEYWORD(120, 100, 130, 100, HIGHP);
precision KEYWORD(120, 100, 130, 100, PRECISION);
/* Additional reserved words in GLSL 1.30. */
case KEYWORD(130, 300, 130, 300, CASE);
common KEYWORD(130, 300, 0, 0, COMMON);
partition KEYWORD(130, 300, 0, 0, PARTITION);
active KEYWORD(130, 300, 0, 0, ACTIVE);
superp KEYWORD(130, 100, 0, 0, SUPERP);
samplerBuffer KEYWORD(130, 300, 140, 0, SAMPLERBUFFER);
filter KEYWORD(130, 300, 0, 0, FILTER);
row_major KEYWORD_WITH_ALT(130, 0, 140, 0, yyextra->ARB_uniform_buffer_object_enable && !yyextra->es_shader, ROW_MAJOR);
/* Additional reserved words in GLSL 1.40 */
isampler2DRect KEYWORD(140, 300, 140, 0, ISAMPLER2DRECT);
usampler2DRect KEYWORD(140, 300, 140, 0, USAMPLER2DRECT);
isamplerBuffer KEYWORD(140, 300, 140, 0, ISAMPLERBUFFER);
usamplerBuffer KEYWORD(140, 300, 140, 0, USAMPLERBUFFER);
/* Additional reserved words in GLSL ES 3.00 */
resource KEYWORD(0, 300, 0, 0, RESOURCE);
patch KEYWORD(0, 300, 0, 0, PATCH);
sample KEYWORD_WITH_ALT(400, 300, 400, 0, yyextra->ARB_gpu_shader5_enable, SAMPLE);
subroutine KEYWORD(0, 300, 0, 0, SUBROUTINE);
[_a-zA-Z][_a-zA-Z0-9]* {
struct _mesa_glsl_parse_state *state = yyextra;
void *ctx = state;
yylval->identifier = ralloc_strdup(ctx, yytext);
return classify_identifier(state, yytext);
}
. { return yytext[0]; }
%%
int
classify_identifier(struct _mesa_glsl_parse_state *state, const char *name)
{
if (state->symbols->get_variable(name) || state->symbols->get_function(name))
return IDENTIFIER;
else if (state->symbols->get_type(name))
return TYPE_IDENTIFIER;
else
return NEW_IDENTIFIER;
}
void
_mesa_glsl_lexer_ctor(struct _mesa_glsl_parse_state *state, const char *string)
{
yylex_init_extra(state, & state->scanner);
yy_scan_string(string, state->scanner);
}
void
_mesa_glsl_lexer_dtor(struct _mesa_glsl_parse_state *state)
{
yylex_destroy(state->scanner);
}
| LLVM | 5 | christiancoder/bgfx | 3rdparty/glsl-optimizer/src/glsl/glsl_lexer.ll | [
"BSD-2-Clause"
] |
module audiostreamerscrobbler.players.heos.HeosDetector
import audiostreamerscrobbler.maintypes.Player.types.PlayerTypes
import audiostreamerscrobbler.players.heos.{HeosConnectionSingleton, HeosDeviceDescriptorXmlParser, HeosPlayer}
import audiostreamerscrobbler.players.heos.HeosPlayer.types.HeosImpl
import audiostreamerscrobbler.players.protocols.SSDPHandler
import audiostreamerscrobbler.utils.ThreadUtils
import java.lang.Thread
import java.net.URL
import java.util.concurrent.atomic.AtomicBoolean
let DEBUG = false
let SEARCH_TEXT_HEOS = "urn:schemas-denon-com:device:ACT-Denon:1"
let PORT_HEOS = 1255
let REQUEST_PLAYERS_INTERVAL = 60
let CMD_GET_PLAYERS = "player/get_players"
let CMD_ENABLE_CHANGE_EVENTS = "system/register_for_change_events"
union HeosDetectModes = {
FindPlayerMode
ConnectedMode
}
function createHeosDetector = |cb| {
let heosConnection = getHeosConnectionInstance()
let ssdpHandler = getSsdpHandlerInstance()
let isRunning = AtomicBoolean(false)
let detector = DynamicObject("HeosDetector"):
define("_cb", |this| -> cb):
define("_heosConnection", |this| -> heosConnection):
define("_ssdpHandler", |this| -> ssdpHandler):
define("_isRunning", isRunning):
define("playerType", PlayerTypes.Heos()):
define("start", |this| -> startHeosDetector(this)):
define("stop", |this| -> stopHeosDetector(this))
let ignoredHosts = set[]
let ssdpCb = _createSsdpCallback(detector, ignoredHosts)
detector: define("_ssdpCb", |this| -> ssdpCb)
let heosCb = _createHeosCallback(detector)
detector: define("_heosCb", |this| -> heosCb)
return detector
}
local function startHeosDetector = |detector| {
let isRunning = detector: _isRunning()
isRunning: set(true)
let mode = _getMode(detector)
case {
when mode: isFindPlayerMode() {
_startFindingPlayerMode(detector)
}
when mode: isConnectedMode() {
_startConnectedMode(detector)
}
otherwise {
raise("Internal error, unknown mode: " + mode)
}
}
}
local function stopHeosDetector = |detector| {
let isRunning = detector: _isRunning()
isRunning: set(false)
_stopFindingPlayerMode(detector)
_stopConnectedMode(detector)
}
local function _getMode = |detector| {
if (detector: _heosConnection(): isConnected()) {
return HeosDetectModes.ConnectedMode()
}
return HeosDetectModes.FindPlayerMode()
}
# FindPlayerMode handling (Find a HEOS player to connect to)
local function _startFindingPlayerMode = |detector| {
let ssdpHandler = detector: _ssdpHandler()
ssdpHandler: addCallback(SEARCH_TEXT_HEOS, detector: _ssdpCb())
println("Looking for HEOS player to connect to...")
}
local function _stopFindingPlayerMode = |detector| {
let ssdpHandler = detector: _ssdpHandler()
ssdpHandler: removeCallback(SEARCH_TEXT_HEOS, detector: _ssdpCb())
}
local function _createSsdpCallback = |detector, ignoredHosts| {
let parser = createHeosDeviceDescriptorXMLParser()
let ssdpCb = |host, headers| {
if (host isnt null and ignoredHosts: contains(host)) {
if (DEBUG) {
println("Device at '" + host + "' is ignored")
}
return
} else if (detector: _heosConnection(): isConnected()) {
if (DEBUG) {
println("Already connected to HEOS player")
}
return
} else if (not detector: _isRunning(): get()) {
if (DEBUG) {
println("HEOS detector is stopped")
}
return
}
var inputStream = null
try {
let deviceDescriptorUrl = headers: get("location")
if (deviceDescriptorUrl isnt null) {
inputStream = URL(deviceDescriptorUrl): openStream()
try {
let deviceDescriptor = parser: parse(inputStream)
if (_isHeosDevice(deviceDescriptor)) {
let heosConnection = detector: _heosConnection()
let deviceDescriptorHost = _getHost(deviceDescriptorUrl)
heosConnection: connect(deviceDescriptorHost, PORT_HEOS)
_stopFindingPlayerMode(detector)
_startConnectedMode(detector)
} else {
# Always ignore unknown hosts
ignoredHosts: add(host)
}
} finally {
inputStream: close()
}
}
} catch(ex) {
println("Error while processing incoming possible HEOS SSDP data: " + ex)
throw(ex)
} finally {
if (inputStream != null) {
inputStream: close()
}
}
}
return ssdpCb
}
local function _isHeosDevice = |deviceDescriptor| {
# Denon does not document how to verify that device is a true HEOS compatible
# product. So this validation should be considered an uneducated guess.
return (deviceDescriptor: deviceType() == "urn:schemas-denon-com:device:AiosDevice:1")
}
local function _getHost = |url| {
var result = url
let protocolIndex = result: indexOf("://")
if (protocolIndex >= 0) {
result = result: substring(protocolIndex + 3)
}
let portIndex = result: indexOf(":")
if (portIndex >= 0) {
result = result: substring(0, portIndex)
}
let pathIndex = result: indexOf("/")
if (pathIndex >= 0) {
result = result: substring(0, pathIndex)
}
return result
}
# ConnectedMode handling (Send commands to HEOS player to find other players in the network)
local function _startConnectedMode = |detector| {
let heosConnection = detector: _heosConnection()
let host = heosConnection: host()
println("Connected to HEOS player's CLI server at " + host + ".")
heosConnection: addCallback(detector: _heosCb())
let thread = _createAndRunFindPlayersThread(detector)
# TODO 1: this command should not be given more than once...
# TODO 2: Ensure this command was processed correctly
heosConnection: sendCommand("heos://" + CMD_ENABLE_CHANGE_EVENTS + "?enable=on")
}
local function _stopConnectedMode = |detector| {
let heosConnection = detector: _heosConnection()
heosConnection: removeCallback(detector: _heosCb())
}
local function _createAndRunFindPlayersThread = |detector| {
if (DEBUG) {
println("Starting HeosAliveThread...")
}
return runInNewThread("HeosAliveThread", {
let heosConnection = detector: _heosConnection()
let isRunning = detector: _isRunning()
while (isRunning: get()) {
if(not heosConnection: isConnected()) {
println("Lost connection to HEOS player")
_stopConnectedMode(detector)
_startFindingPlayerMode(detector)
return
}
heosConnection: sendCommand("heos://" + CMD_GET_PLAYERS)
Thread.sleep(REQUEST_PLAYERS_INTERVAL * 1000_L)
}
if (DEBUG) {
println("Stopping HeosAliveThread...")
}
})
}
local function _createHeosCallback = |detector| {
let heosCb = |response| {
let cb = detector: _cb()
let heos = response: get("heos")
if (heos: get("command") == CMD_GET_PLAYERS) {
if (heos: get("result") != "success") {
println("ERROR RESPONSE FROM HEOS: " + response)
return
}
let players = response: get("payload")
foreach (player in players) {
let heosPlayerImpl = HeosImpl(
player: get("pid"),
player: get("name"),
player: get("model"),
player: get("ip"))
let heosPlayer = createHeosPlayer(heosPlayerImpl)
cb(heosPlayer)
}
}
}
return heosCb
}
| Golo | 5 | vvdleun/audiostreamerscrobbler | src/main/golo/include/players/heos/HeosDetector.golo | [
"MIT"
] |
-- name: create-table-nodes
CREATE TABLE IF NOT EXISTS nodes (
node_id INTEGER PRIMARY KEY AUTO_INCREMENT
,node_uid VARCHAR(500)
,node_provider VARCHAR(50)
,node_state VARCHAR(50)
,node_name VARCHAR(50)
,node_image VARCHAR(500)
,node_region VARCHAR(100)
,node_size VARCHAR(100)
,node_os VARCHAR(50)
,node_arch VARCHAR(50)
,node_kernel VARCHAR(50)
,node_variant VARCHAR(50)
,node_address VARCHAR(500)
,node_capacity INTEGER
,node_filter VARCHAR(2000)
,node_labels VARCHAR(2000)
,node_error VARCHAR(2000)
,node_ca_key BLOB
,node_ca_cert BLOB
,node_tls_key BLOB
,node_tls_cert BLOB
,node_tls_name VARCHAR(500)
,node_paused BOOLEAN
,node_protected BOOLEAN
,node_created INTEGER
,node_updated INTEGER
,node_pulled INTEGER
,UNIQUE(node_name)
);
| SQL | 4 | sthagen/drone-drone | store/shared/migrate/mysql/files/010_create_table_nodes.sql | [
"Apache-2.0"
] |
[
This is another cell size detector. Unlike the very simple ones it
positivly confirms that an interpreter has a cell size of 8, 16 or
32bits. If it's cells size is actually 12, 17, 31bits or something
else you get a different response.
In addition unlike the other Cellsize programs the only optimisation
this needs to run successfully on a 32bit interpreter is run length
encoding.
Though, in fact, a JIT or assembler generator is likely to run in a
few seconds without any optimisation and a C compiler will probably
do the optimisation for you.
]
[-]>[-]++++++++++++[<+++++++>-]<.>+++++[<++++>-]<.+.++++++++++.[
-]++++++++[>++++<-]>.<+++++++++[>++++++++<-]>+.+++++.++++++.----
-----------.+++++++++++++.--.++.-------------.+++++++++++++++.--
-------------.+++++++++++++.[-]++++++++[<++++>-]<.>+++++++++[<++
++++++>-]<.-------.>++++++[<+++>-]<.[-]++++++++[>++++<-]>.[-]<
+>>+++++[-<<[->++++++++<]>[-<+>]>]<+<[[-]>[-]<
+[>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<-]>[<
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>-]<[>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<-]>[<
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>->+<]
+<[>-<
// Cell zero is 2147483648; Wipe carefully
>>[-<<
----------------------------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------
>>]<<[-]
+[>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<-]>[<
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>-]<[>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<-]>[<
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>->+<]
+<[
// Huge or abnormal cell size; cell is now 4294967296
>>[-<<
----------------------------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------
>>]<[-]<[-]
// This checks for ANY cell size under 21169 by using a
// double byte increment and checking the high 'byte'
+++++++[[->+++++++>+<<]>>[-<<+>>]<[[->++++++>+<<]>>[-<<+>>]<[>>
>+<+[>-]>[->>+<]<<
<<-]<-]<-] >>>>[-]>>>[[-]<<<<<<<+>>>>>>>]<<<<<<+<
[
// Small and weird cells
[-]>[-]+++++++++++++[<+++++++++>-]<--.------.------------.++++++
+++++..[-]++++++++[>++++<-]>.<+++++++++++++[>++++++<-]>.+.-.<+++
+++++[>--------<-]>-.<+++++++++[>++++++<-]>-.+++++++.+++++.-----
--------.<++++[>++++<-]>+.+++++++.[-]++++++++[<++++>-]<.>+++++++
++++[<++++++>-]<+.++.+++++++..+++++++.[-]++++++++++.[-]
]>[
// Huge cells
[-]>[-]++++++++++++[<+++++++++>-]<.-----------.>++++[<++++>-]<+.
-----------.--.[-]++++++++[>++++<-]>.<++++++++++[>++++++++<-]>-.
+++.[-]++++++++[<++++>-]<.>+++++++++++++[<++++++>-]<.+.-.>++++++
++[<-------->-]<-.>+++++++++[<++++++>-]<-.+++++++.+++++.--------
-----.>++++[<++++>-]<+.+++++++.[-]++++++++[>++++<-]>.<++++++++++
+[>++++++<-]>+.++.+++++++..+++++++.[-]++++++++++.[-]<
]<
#
>[-]<[-]] >[[-]>[-]<<
// 32bit cells
[-]>[-]++++++++++[<+++++>-]<+.-.>++++++++[<++++++>-]<.+++++++.++
+++++++++.[-]++++++++[>++++<-]>.<+++++++++++[>++++++<-]>+.++.+++
++++..+++++++.<++++++++++[>-------<-]>+.[-]++++++++++.[-]<
>[-]]<
[-]] >[-<
// 16 to 31 bit cells
// Check for exactly 16bit interpreters
[-]++>[-]>[-]+++++[-<<[->++++++++<]>[-<+>]>]<<
>+<[[-]>-<
// 17 to 31 bits
[-]>[-]+++++++[<+++++++>-]<.++++++.---------..+++++.--.>++++[<--
-->-]<-.>+++++++++++[<++++++>-]<.+++++++.+++++++++++.[-]++++++++
[>++++<-]>.<+++++++++++[>++++++<-]>+.++.+++++++..+++++++.[-]++++
++++++.[-]<
>[-]<[-]]>[-<
// Exactly 16 bits
[-]>[-]+++++++[<+++++++>-]<.+++++.>+++++++++++[<++++>-]<.+++++++
.+++++++++++.[-]++++++++[>++++<-]>.<+++++++++++[>++++++<-]>+.++.
+++++++..+++++++.<++++++++++[>-------<-]>+.[-]++++++++++.[-]<
>[-]]<
>[-]]<
>[-]<[-]]>[-<
// Less than 16bit cells
+>>[-]<[-]++++++++[>++++<-]>[<++++>-]<[
[-]>[-]++++++++[<++++++++>-]<[>++++<-]+>[<->[-]]<[
<->
// Exactly 8bit cells
[-]>[-]++++++++[<+++++++>-]<.[-]
[-]]
[-]]
<
[-
// 15 or fewer bits using a generic routine
>+[ [->++<]>[-<+>]<<+> ]<
>[-]>[-]>[-]>[-]>[-]>[-]+>[-]+>[-]+>[-]+<<<<<<<<<[->>+>+<<<]>>>[
-<<<+>>>]<[>[-]>[-]<<[>+>+<<-]>>[<<+>>-]+++++++++<[>>>[-]+<<[>+>
[-]<<-]>[<+>-]>[<<++++++++++>>-]<<-<-]+++++++++>[<->-]<[>+<-]<[>
+<-]<[>+<-]>>>[<<<+>>>-]>>>[-]<<<+++++++++<[>>>[-]+<<[>+>[-]<<-]
>[<+>-]>[<<++++++++++>>>+<-]<<-<-]>>>>[<<<<+>>>>-]<<<[-]<<+>]<[>
[-]<[>+<-]+++++++[<+++++++>-]<-.[-]>>[<<+>>-]<<-]<
[-]]
[-]>[-]++++++++++++++[<+++++++>-]<.+++++++.+++++++++++.[-]++++++
++[>++++<-]>.<+++++++++++[>++++++<-]>+.++.+++++++..+++++++.<++++
++++++[>-------<-]>+.[-]++++++++++.[-]<
>[-]]< | Brainfuck | 3 | RubenNL/brainheck | examples/cell-size-2.bf | [
"Apache-2.0"
] |
import io.vertx.ceylon.platform {
Verticle,
Container
}
import io.vertx.ceylon.core {
Vertx
}
import io.vertx.ceylon.core.http {
WebSocket
}
import org.vertx.java.core.buffer {
Buffer
}
shared class WebsocketsClient() extends Verticle() {
shared actual void start(Vertx vertx, Container container) {
vertx.createHttpClient(8080, "localhost").connectWebsocket("/myapp").onComplete(
void(WebSocket websocket) {
websocket.readStream.dataHandler(
(Buffer data) => print("Received data " + data.string));
//Send some data
websocket.writeTextFrame("hello world");
}
);
}
}
| Ceylon | 3 | vietj/vertx-examples | src/raw/ceylon/websockets/WebsocketsClient.ceylon | [
"Apache-2.0"
] |
#include "caffe2/operators/elementwise_add_op.h"
#include "caffe2/core/context_gpu.h"
namespace caffe2 {
REGISTER_CUDA_OPERATOR(
Add,
BinaryElementwiseBroadcastOp<NumericTypes, CUDAContext, AddFunctor<CUDAContext>>);
REGISTER_CUDA_OPERATOR(
AddGradient,
BinaryElementwiseGradientBroadcastOp<
NumericTypes,
CUDAContext,
AddFunctor<CUDAContext>>);
} // namespace caffe2
| C++ | 3 | Hacky-DH/pytorch | caffe2/operators/elementwise_add_op_gpu.cc | [
"Intel"
] |
#!/usr/local/bin/bash
## should be run in V's main repo folder!
rm -rf tinycc/
rm -rf thirdparty/tcc/
pushd .
git clone git://repo.or.cz/tinycc.git
cd tinycc
export CC=clang
./configure \
--cc=clang \
--prefix=thirdparty/tcc \
--bindir=thirdparty/tcc \
--crtprefix=thirdparty/tcc/lib:/usr/lib \
--libpaths=thirdparty/tcc/lib:/usr/lib:/lib:/usr/local/lib \
--debug
gmake
gmake install
popd
mv tinycc/thirdparty/tcc thirdparty/tcc
mv thirdparty/tcc/tcc thirdparty/tcc/tcc.exe
sudo ln -s $(pwd)/thirdparty/tcc/tcc.exe /usr/local/bin/tcc
thirdparty/tcc/tcc.exe -v -v
| Shell | 3 | gamemaker1/v | .github/workflows/freebsd_build_tcc.sh | [
"MIT"
] |
package jadx.tests.integration.others;
import org.junit.jupiter.api.Test;
import jadx.tests.api.IntegrationTest;
import static jadx.tests.api.utils.assertj.JadxAssertions.assertThat;
public class TestFieldInitOrder extends IntegrationTest {
public static class TestCls {
private final StringBuilder sb = new StringBuilder();
private final String a = sb.append("a").toString();
private final String b = sb.append("b").toString();
private final String c = sb.append("c").toString();
private final String result = sb.toString();
public void check() {
assertThat(result).isEqualTo("abc");
assertThat(a).isEqualTo("a");
assertThat(b).isEqualTo("ab");
assertThat(c).isEqualTo("abc");
}
}
@Test
public void test() {
assertThat(getClassNode(TestCls.class))
.code()
.doesNotContain("TestCls() {") // constructor removed
.doesNotContain("String result;")
.containsOne("String result = this.sb.toString();");
}
}
| Java | 4 | Dev-kishan1999/jadx | jadx-core/src/test/java/jadx/tests/integration/others/TestFieldInitOrder.java | [
"Apache-2.0"
] |
module ciena-waveserver-xcvr-modem {
namespace "urn:ciena:params:xml:ns:yang:ciena-ws:ciena-waveserver-xcvr-modem";
prefix xcvr-modem;
import ciena-waveserver-typedefs {
prefix cienawstypes;
}
import ciena-waveserver-xcvr {
prefix xcvr;
}
organization
"Ciena Corporation";
contact
"Web URL: http://www.ciena.com/
Postal: 7035 Ridge Road
Hanover, Maryland 21076
U.S.A.
Phone: +1 800-921-1144
Fax: +1 410-694-5750";
description
"This YANG module defines Ciena's XCVR modem specific data for the NETCONF protocol. It will augment the ciena-waveserver-xcvr module.";
revision 2017-10-24 {
description
"Changed type for 'frequency-min' and 'frequency-max' leafs from int to decimal.
Changed type for 'tx-dispersion-min' and 'tx-dispersion-max' from unsigned to signed int.";
reference "Waveserver Ai user's guide.";
}
revision 2017-08-28 {
description
"Waveserver Platform Data Model
Migrated from Waveserver Classic R1.4 YANG model.
Updated namespace to 'ciena-waveserver'.
Added 'c-band', 'l-band', and 'frequency-resolution' to 'transmitter-technology' container.
Removed 'modulation-support' container and added 'supported-modes' to 'vendor-data/properties' container.
Added 'temperature-critical' and 'temperature-warning' to 'diagnostics/device' container.
Removed 'wavelength-control' and 'wavelength-tolerance' attributes.
Removed 'transport-protocols' and 'line-system-support' containers.";
reference "Waveserver Ai user's guide.";
}
augment "/xcvr:waveserver-xcvrs/xcvr:xcvrs/xcvr:properties/xcvr:vendor-data/xcvr:properties/xcvr:diagnostic-monitoring" {
when "../../../xcvr:type = 'WaveLogic Ai'" {
description
"XCVR vendor diagnostic-monitoring properties specific to modem XCVRs.";
}
description
"XCVR vendor diagnostic-monitoring properties specific to modem XCVRs.";
leaf diagnostic-support {
type cienawstypes:yes-no-enum;
config false;
description
"Diagnostic Monitoring, is Diagnostic Support turned on.";
}
leaf dispersion-measurement {
type cienawstypes:yes-no-enum;
config false;
description
"Diagnostic Monitoring, is Dispersion Measurement turned on.";
}
}
augment "/xcvr:waveserver-xcvrs/xcvr:xcvrs/xcvr:properties/xcvr:vendor-data/xcvr:properties" {
when "../../xcvr:type = 'WaveLogic Ai'" {
description
"XCVR vendor properties specific to modem XCVRs.";
}
description
"XCVR vendor properties specific to modem XCVRs.";
leaf supported-modes {
type bits {
bit mode-35-100 {
description
"Modem is capable of 35Gbaud / 100Gbps transmission.";
}
bit mode-35-150 {
description
"Modem is capable of 35Gbaud / 150Gbps transmission.";
}
bit mode-35-200 {
description
"Modem is capable of 35Gbaud / 200Gbps transmission.";
}
bit mode-35-250 {
description
"Modem is capable of 35Gbaud / 250Gbps transmission.";
}
bit mode-56-100 {
description
"Modem is capable of 56Gbaud / 100Gbps transmission.";
}
bit mode-56-150 {
description
"Modem is capable of 56Gbaud / 150Gbps transmission.";
}
bit mode-56-200 {
description
"Modem is capable of 56Gbaud / 200Gbps transmission.";
}
bit mode-56-250 {
description
"Modem is capable of 56Gbaud / 250Gbps transmission.";
}
bit mode-56-300 {
description
"Modem is capable of 56Gbaud / 300Gbps transmission.";
}
bit mode-56-350 {
description
"Modem is capable of 56Gbaud / 350Gbps transmission.";
}
bit mode-56-400 {
description
"Modem is capable of 56Gbaud / 400Gbps transmission.";
}
}
config false;
description
"Supported baud/line-rate modes on this modem.";
}
container transmitter-technology {
config false;
description
"Modem Transmitter Technology properties/capabilities.";
leaf tunable {
type cienawstypes:yes-no-enum;
config false;
description
"Modem Transmitter Technology, Tunable.";
}
leaf wavelength-min {
type cienawstypes:decimal-2-dig;
units "nm";
config false;
description
"Modem Transmitter Technology, Wavelength Min value, in nanometers.";
}
leaf wavelength-max {
type cienawstypes:decimal-2-dig;
units "nm";
config false;
description
"Modem Transmitter Technology, Wavelength Max value, in nanometers.";
}
leaf frequency-min {
type cienawstypes:modem-frequency;
units "GHz";
config false;
description
"Modem Transmitter Technology, minimum supported frequency, in GHz.";
}
leaf frequency-max {
type cienawstypes:modem-frequency;
units "GHz";
config false;
description
"Modem Transmitter Technology, maximum supported frequency, in GHz.";
}
leaf frequency-resolution {
type uint32;
units "MHz";
config false;
description
"Modem Transmitter Technology, frequency resolution, in MHz.";
}
leaf tx-dispersion-min {
type int32;
units "ps/nm";
config false;
description
"Modem Transmitter Technology, Tx Dispersion Min (ps/nm).";
}
leaf tx-dispersion-max {
type int32;
units "ps/nm";
config false;
description
"Modem Transmitter Technology, Tx Dispersion Max (ps/nm).";
}
leaf edfa {
type cienawstypes:yes-no-enum;
config false;
description
"Whether this modem is an EDFA modem.";
}
leaf c-band {
type cienawstypes:yes-no-enum;
config false;
description
"Whether this modem supports C-Band frequencies.";
}
leaf l-band {
type cienawstypes:yes-no-enum;
config false;
description
"Whether this modem supports L-Band frequencies.";
}
}
}
augment "/xcvr:waveserver-xcvrs/xcvr:xcvrs/xcvr:properties/xcvr:diagnostics/xcvr:device" {
when "../../xcvr:type = 'WaveLogic Ai'" {
description
"XCVR device diagnostic properties specific to modem XCVRs.";
}
description
"XCVR device diagnostic properties specific to modem XCVRs.";
container equipment-status {
config false;
description
"XCVR modem equipment status properties.";
leaf transmitter-state {
type cienawstypes:enabled-disabled-enum;
config false;
description
"Transmitter State of the Modem.";
}
leaf equipment-out-of-spec {
type cienawstypes:yes-no-enum;
config false;
description
"Is the alarm associated with Equipment Out of Spec raised.";
}
leaf temperature-critical {
type cienawstypes:yes-no-enum;
config false;
description
"Is there a critical temperature alarm currently raised.";
}
leaf temperature-warning {
type cienawstypes:yes-no-enum;
config false;
description
"Is there a temperature warning currently raised.";
}
leaf equipment-failure {
type cienawstypes:yes-no-enum;
config false;
description
"Is the alarm associated with Equipment Failure raised.";
}
leaf data-link-suspect {
type cienawstypes:yes-no-enum;
config false;
description
"Is the alarm associated with Data Link Suspect raised.";
}
leaf comms-link-suspect {
type cienawstypes:yes-no-enum;
config false;
description
"Is the alarm associated with Comms Link Suspect raised.";
}
leaf clock-suspect {
type cienawstypes:yes-no-enum;
config false;
description
"Is the alarm associated with Clock Suspect raised.";
}
leaf loss-of-synchronization-tick {
type cienawstypes:yes-no-enum;
config false;
description
"Is the alarm associated with Loss of Synchronization Tick raised.";
}
}
}
}
| YANG | 5 | Shinkirou/onos | models/ciena/waveserverai/src/main/yang/ciena-waveserver-xcvr-modem@2017-10-24.yang | [
"Apache-2.0"
] |
package unit.issues;
import haxe.Int64;
class Issue4436 extends Test {
function test() {
nullableValue = 29;
t(checkNull(29));
}
var nullableValue:Null<Int64>;
private function checkNull(value:Int64) {
if (nullableValue == value) {
return true;
}
return false;
}
} | Haxe | 4 | Alan-love/haxe | tests/unit/src/unit/issues/Issue4436.hx | [
"MIT"
] |
--TEST--
A script with die() must end "normally"
--PHPDBG--
r
q
--EXPECTF--
[Successful compilation of %s]
prompt> [Script ended normally]
prompt>
--FILE--
<?php
(function($argv) {
die();
})($argv);
| PHP | 2 | thiagooak/php-src | sapi/phpdbg/tests/normal_exit.phpt | [
"PHP-3.01"
] |
package org.elixir_lang.beam.assembly;
import com.intellij.psi.tree.IElementType;
import org.elixir_lang.beam.assembly.psi.Types;
import com.intellij.psi.TokenType;
%%
%class FlexLexer
%implements com.intellij.lexer.FlexLexer
%unicode
%function advance
%type IElementType
%eof{ return;
%eof}
WHITE_SPACE=([\ ]|\R)+
IDENTIFIER_TOKEN_END = [?!]
IDENTIFIER_TOKEN_MIDDLE = [0-9a-zA-Z_]
IDENTIFIER_TOKEN_START = [a-z_]
IDENTIFIER_TOKEN_HEAD = {IDENTIFIER_TOKEN_START}
IDENTIFIER_TOKEN_TAIL = {IDENTIFIER_TOKEN_MIDDLE}* {IDENTIFIER_TOKEN_END}?
IDENTIFIER_TOKEN = ({IDENTIFIER_TOKEN_HEAD} {IDENTIFIER_TOKEN_TAIL} | "...")
ALIAS_HEAD=[A-Z]
ALIAS={ALIAS_HEAD} {IDENTIFIER_TOKEN_MIDDLE}*
SINGLE_QUOTE="'"
ESCAPED_SINGLE_QUOTE="\\'"
NOT_SINGLE_QUOTE=[^']
CHARLIST = {SINGLE_QUOTE} ({ESCAPED_SINGLE_QUOTE} | {NOT_SINGLE_QUOTE})* {SINGLE_QUOTE}
DOUBLE_QUOTE="\""
ESCAPED_DOUBLE_QUOTE="\\\""
NOT_DOUBLE_QUOTE=[^\"]
STRING={DOUBLE_QUOTE} ({ESCAPED_DOUBLE_QUOTE} | {NOT_DOUBLE_QUOTE})* {DOUBLE_QUOTE}
COLON=":"
ATOM={COLON} ({IDENTIFIER_TOKEN} | {SYMBOLIC_OPERATOR} | {STRING})
ATOM_KEYWORD = "false" | "nil" | "true"
CLOSING_BIT = ">>"
CLOSING_BRACKET="]"
CLOSING_CURLY="}"
CLOSING_PARENTHESIS=")"
COMMA=","
DOT_OPERATOR="."
INTEGER=0|[1-9][0-9]*
KEY=({IDENTIFIER_TOKEN} | {SYMBOLIC_OPERATOR}){COLON}
MAP_OPERATOR="%"
NAME_ARITY_SEPARATOR="/"
OPENING_BIT = "<<"
OPENING_BRACKET="["
OPENING_CURLY="{"
OPENING_PARENTHESIS="("
PIPE_OPERATOR="|"
THREE_SYMBOL_OPERATOR = "!==" |
"&&&" |
"<<<" |
"<<~" |
"<|>" |
"<~>" |
"===" |
">>>" |
"^^^" |
"|||" |
"~>>" |
"~~~"
TWO_SYMBOL_OPERATOR = "!=" |
"&&" |
"++" |
"--" |
".." |
"::" |
"<-" |
"<=" |
"<=" |
"<>" |
"<~" |
"==" |
"=~" |
">=" |
"|>" |
"||" |
"~>"
ONE_SYMBOL_OPERATOR = "!" |
"&" |
"*" |
"+" |
"-" |
"/" |
"<" |
"=" |
">" |
"@" |
"^" |
"|"
SYMBOLIC_OPERATOR = {THREE_SYMBOL_OPERATOR} | {TWO_SYMBOL_OPERATOR} | {ONE_SYMBOL_OPERATOR}
QUALIFIED_ALIAS={ALIAS}(\.{ALIAS})*
REFERENCE_OPERATOR="&"
%%
<YYINITIAL> {
{ATOM} { return Types.ATOM; }
{ATOM_KEYWORD} { return Types.ATOM_KEYWORD; }
{CHARLIST} { return Types.CHARLIST; }
{DOT_OPERATOR} { return Types.DOT_OPERATOR; }
{QUALIFIED_ALIAS} { return Types.QUALIFIED_ALIAS; }
{CLOSING_BIT} { return Types.CLOSING_BIT; }
{CLOSING_BRACKET} { return Types.CLOSING_BRACKET; }
{CLOSING_CURLY} { return Types.CLOSING_CURLY; }
{CLOSING_PARENTHESIS} { return Types.CLOSING_PARENTHESIS; }
{COMMA} { return Types.COMMA; }
{INTEGER} { return Types.INTEGER; }
{IDENTIFIER_TOKEN} { return Types.NAME; }
{KEY} / {WHITE_SPACE} { return Types.KEY; }
{MAP_OPERATOR} { return Types.MAP_OPERATOR; }
{NAME_ARITY_SEPARATOR} { return Types.NAME_ARITY_SEPARATOR; }
{OPENING_BIT} { return Types.OPENING_BIT; }
{OPENING_BRACKET} { return Types.OPENING_BRACKET; }
{OPENING_CURLY} { return Types.OPENING_CURLY; }
{OPENING_PARENTHESIS} { return Types.OPENING_PARENTHESIS; }
{PIPE_OPERATOR} { return Types.PIPE_OPERATOR; }
{REFERENCE_OPERATOR} { return Types.REFERENCE_OPERATOR; }
{STRING} { return Types.STRING; }
{SYMBOLIC_OPERATOR} { return Types.SYMBOLIC_OPERATOR; }
{WHITE_SPACE} { return TokenType.WHITE_SPACE; }
}
. { return TokenType.BAD_CHARACTER; }
| JFlex | 3 | keyno63/intellij-elixir | src/org/elixir_lang/beam/assembly/BEAM.Assembly.flex | [
"Apache-2.0"
] |
#include "colors.inc"
// Toggle to generate all 16 states.
#declare north = (clock >= 8);
#declare binary1 = mod(clock, 8);
#declare east = (binary1 >= 4);
#declare binary2 = mod(binary1, 4);
#declare south = (binary2 >= 2);
#declare binary3 = mod(binary2, 2);
#declare west = binary3;
#declare seed1 = seed(north * 1 + east * 2 + south * 4 + west * 8);
// Camera's angle (zoom) to keep everything in view.
#declare camera_angle = 30;
// How far back is the camera, drags the lights along with it.
#declare camera_back = 50;
#declare colour1 = color rgb <1, 1, 1>; // modules
#declare colour2 = color rgb <0.8, 0.8, 0.85>; // tunnels
#declare colour3 = color rgb <0.7, 0.7, 0.75>; // boxes
#declare hex1 = 4;
#declare hex2 = 1;
#if (north)
// North
cylinder { // module
<0, 0, 0>, <0, 11, 0>, 5
texture {pigment { colour1 }}
normal { wrinkles 0.2 scale .1 }
}
cylinder { // tunnel
<0, 0, 0>, <0, 20, 0>, 3
texture {pigment { colour2 }}
normal { wrinkles 0.2 scale .1 }
}
text {
ttf "cyrvetic.ttf" str(rand(seed1)*100, -2, 0) .5, 0
pigment { Black }
scale 2
translate -1*x
translate -0.7*y
translate -5*z
rotate 90*z
translate 8*y
}
box {
<-hex1, 0, -hex2>, <hex1, 12, hex2>
texture {pigment { colour3 }}
normal { wrinkles 0.2 scale .1 }
}
box {
<-hex1, 0, -hex2>, <hex1, 12, hex2>
texture {pigment { colour3 }}
normal { wrinkles 0.2 scale .1 }
rotate <0, 60, 0>
}
box {
<-hex1, 0, -hex2>, <hex1, 12, hex2>
texture {pigment { colour3 }}
normal { wrinkles 0.2 scale .1 }
rotate <0, -60, 0>
}
#end
#if (east)
// East
cylinder { // module
<0, 0, 0>, <11, 0, 0>, 5
texture {pigment { colour1 }}
normal { wrinkles 0.2 scale .1 }
}
cylinder { // tunnel
<0, 0, 0>, <20, 0, 0>, 3
texture {pigment { colour2 }}
normal { wrinkles 0.2 scale .1 }
}
text {
ttf "cyrvetic.ttf" str(rand(seed1)*100, -2, 0) .5, 0
pigment { Black }
scale 2
translate -1*x
translate -0.7*y
translate -5*z
rotate 0*z
translate 8*x
}
box {
<0, -hex1, -hex2>, <12, hex1, hex2>
texture {pigment { colour3 }}
normal { wrinkles 0.2 scale .1 }
}
box {
<0, -hex1, -hex2>, <12, hex1, hex2>
texture {pigment { colour3 }}
normal { wrinkles 0.2 scale .1 }
rotate <60, 0, 0>
}
box {
<0, -hex1, -hex2>, <12, hex1, hex2>
texture {pigment { colour3 }}
normal { wrinkles 0.2 scale .1 }
rotate <-60, 0, 0>
}
#end
#if (south)
// South
cylinder { // module
<0, 0, 0>, <0, -11, 0>, 5
texture {pigment { colour1 }}
normal { wrinkles 0.2 scale .1 }
}
cylinder { // tunnel
<0, 0, 0>, <0, -20, 0>, 3
texture {pigment { colour2 }}
normal { wrinkles 0.2 scale .1 }
}
text {
ttf "cyrvetic.ttf" str(rand(seed1)*100, -2, 0) .5, 0
pigment { Black }
scale 2
translate -1*x
translate -0.7*y
translate -5*z
rotate -90*z
translate -8*y
}
box {
<-hex1, 0, -hex2>, <hex1, -12, hex2>
texture {pigment { colour3 }}
normal { wrinkles 0.2 scale .1 }
}
box {
<-hex1, 0, -hex2>, <hex1, -12, hex2>
texture {pigment { colour3 }}
normal { wrinkles 0.2 scale .1 }
rotate <0, 60, 0>
}
box {
<-hex1, 0, -hex2>, <hex1, -12, hex2>
texture {pigment { colour3 }}
normal { wrinkles 0.2 scale .1 }
rotate <0, -60, 0>
}
#end
#if (west)
// West
cylinder { // module
<0, 0, 0>, <-11, 0, 0>, 5
texture {pigment { colour1 }}
normal { wrinkles 0.2 scale .1 }
}
cylinder { // tunnel
<0, 0, 0>, <-20, 0, 0>, 3
texture {pigment { colour2 }}
normal { wrinkles 0.2 scale .1 }
}
text {
ttf "cyrvetic.ttf" str(rand(seed1)*100, -2, 0) .5, 0
pigment { Black }
scale 2
translate -1*x
translate -.7*y
translate -5*z
rotate 180*z
translate -8*x
}
box {
<0, -hex1, -hex2>, <-12, hex1, hex2>
texture {pigment { colour3 }}
normal { wrinkles 0.2 scale .1 }
}
box {
<0, -hex1, -hex2>, <-12, hex1, hex2>
texture {pigment { colour3 }}
normal { wrinkles 0.2 scale .1 }
rotate <60, 0, 0>
}
box {
<0, -hex1, -hex2>, <-12, hex1, hex2>
texture {pigment { colour3 }}
normal { wrinkles 0.2 scale .1 }
rotate <-60, 0, 0>
}
#end
#declare paths = north + east + south + west;
#if (paths = 1)
// Dead end.
sphere {
<0, 0, 0>, 8
texture {pigment { colour1 }}
normal { wrinkles 0.2 scale .1 }
}
#else
#if (paths != 0)
sphere {
<0, 0, 0>, 5
texture {pigment { colour1 }}
normal { wrinkles 0.2 scale .1 }
}
#end
#end
// Look from slightly below.
camera {
orthographic
location <0, -camera_back/5, -camera_back>
look_at <0, 0, 0>
angle camera_angle
right .58 // Aspect ratio
}
// Sunlight.
light_source {
<-camera_back/2, -camera_back/2, -camera_back*2>
color White
parallel
point_at <0,0,0>
}
| POV-Ray SDL | 5 | bharati-software/blockly-games-Kannada | appengine/maze/sources/space_station.pov | [
"Apache-2.0"
] |
sleep X
t app appmode photo_burst
sleep 1
t app burst_settings 10-2
sleep 1
t app button shutter PR
sleep 9
t app appmode photo_burst
d.\autoexec.ash
REBOOt yes
| AGS Script | 1 | waltersgrey/autoexechack | BurstHacks/BurstLoop/10-2/Hero3Black/autoexec.ash | [
"MIT"
] |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <caml/memory.h>
#ifdef _WIN32
#include <windows.h>
#else
#include <unistd.h>
#endif
value nproc(void) {
CAMLparam0();
CAMLlocal1(result);
#ifdef _WIN32
SYSTEM_INFO sysinfo;
GetSystemInfo(&sysinfo);
result = Val_long(sysinfo.dwNumberOfProcessors);
#else
result = Val_long(sysconf(_SC_NPROCESSORS_ONLN));
#endif
CAMLreturn(result);
}
| C | 4 | esilkensen/flow | src/hack_forked/utils/sys/nproc.c | [
"MIT"
] |
#!/usr/bin/env bash
###############################################################################
# Copyright 2020 The Apollo Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
###############################################################################
# Fail on first error.
set -e
cd "$(dirname "${BASH_SOURCE[0]}")"
. ./installer_base.sh
apt_get_update_and_install \
libsqlite3-dev \
sqlite3 \
libtiff-dev \
libcurl4-openssl-dev
# Note(storypku)
# apt_get_update_and_install libproj-dev
# proj installed via apt was 4.9.3, incompatible with pyproj which
# requres proj >= 6.2.0
if ldconfig -p | grep -q "libproj.so"; then
warning "Proj was already installed. Reinstallation skipped."
exit 0
fi
VERSION="7.1.0"
PKG_NAME="proj-${VERSION}.tar.gz"
CHECKSUM="876151e2279346f6bdbc63bd59790b48733496a957bccd5e51b640fdd26eaa8d"
DOWNLOAD_LINK="https://github.com/OSGeo/PROJ/releases/download/${VERSION}/${PKG_NAME}"
download_if_not_cached "$PKG_NAME" "$CHECKSUM" "$DOWNLOAD_LINK"
tar xzf "${PKG_NAME}"
pushd proj-${VERSION} >/dev/null
mkdir build && cd build
cmake .. \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_INSTALL_PREFIX="${SYSROOT_DIR}" \
-DCMAKE_BUILD_TYPE=Release
make -j$(nproc)
make install
popd >/dev/null
ldconfig
ok "Successfully built proj = ${VERSION}"
rm -fr "${PKG_NAME}" "proj-${VERSION}"
if [[ -n "${CLEAN_DEPS}" ]]; then
# Remove build-deps for proj
apt_get_remove \
libsqlite3-dev \
sqlite3 \
libtiff-dev \
libcurl4-openssl-dev
fi
# Clean up cache to reduce layer size.
apt-get clean &&
rm -rf /var/lib/apt/lists/*
| Shell | 4 | jzjonah/apollo | docker/build/installers/install_proj.sh | [
"Apache-2.0"
] |
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#!/bin/bash
set -e
set -x
virtualenv -p python3 bam_py
source bam_py/bin/activate
pip install tf-nightly
pip install -r bam/requirements.txt
BAM_DIR="/tmp/bam"
rm -rf $BAM_DIR
mkdir -p $BAM_DIR/glue_data
mkdir -p $BAM_DIR/pretrained_models/uncased_L-12_H-768_A-12
wget -P $BAM_DIR "https://firebasestorage.googleapis.com/v0/b/mtl-sentence-representations.appspot.com/o/data%2FRTE.zip?alt=media&token=5efa7e85-a0bb-4f19-8ea2-9e1840f077fb"
unzip -d $BAM_DIR "${BAM_DIR}/data%2FRTE.zip?alt=media&token=5efa7e85-a0bb-4f19-8ea2-9e1840f077fb"
mv $BAM_DIR/RTE $BAM_DIR/glue_data/rte
wget -P $BAM_DIR/pretrained_models/uncased_L-12_H-768_A-12 "https://storage.googleapis.com/bert_models/2018_10_18/uncased_L-12_H-768_A-12/vocab.txt"
wget -P $BAM_DIR/pretrained_models/uncased_L-12_H-768_A-12 "https://storage.googleapis.com/bert_models/2018_10_18/uncased_L-12_H-768_A-12/bert_config.json"
python -m bam.run_classifier debug-model $BAM_DIR '{"debug": true, "task_names": ["rte"]}'
| Shell | 3 | deepneuralmachine/google-research | bam/run.sh | [
"Apache-2.0"
] |
; States are agents
breed [states state]
states-own
[
content ; Stores the content of the state (the value)
explored? ; Shows if the state has been explored or not
path ; Stores the path to reach this state
]
; Transitions will be represented as links
directed-link-breed [transitions transition]
transitions-own
[
rule ; Stores the "representable" version of the applied rule
R ; Value of reward for Q-learning algorithm
Q ; Value of learning for Q-learning algorithm
variation ; Value of variation in learning for Q-learning algorithm
]
globals [
M ; Number of towers, it is computed from the length of initial state
; The number of discs ared determined by the the values in use in
; input state
]
;--------------- Customizable Functions --------------------------
; Rules are represented as pairs [ "representation" f ] where f allows
; to move between states (transition function) and "representation" is
; string to identify the applied rule
to-report applicable-transitions [c]
let t-a []
let MList (n-values M [ ?1 -> ?1 ])
foreach MList [ ?1 ->
let i ?1
foreach MList [ ??1 ->
let j ??1
let t (list (word i "->" j) (list i j))
if transition-valid? t c [set t-a lput t t-a]
]
]
report t-a
end
; discs 1 < 2 < 3 < ... < N
; state = [ [Pole1] [Pole2] [Pole3] ... [PoleM] ]
; Pole_i= [i_1 < i_2 < i_3], [i_1 < i_2], [i_1], [ ]
to-report transition-valid? [t s]
let i first last t
let j last last t
if empty? (item i s) [report false]
if empty? (item j s) [report true]
let disc first (item i s)
let head first (item j s)
if disc < head [report true]
report false
end
to-report apply-transition [t s]
let i first last t
let j last last t
let disc first (item i s)
set s replace-item i s (bf (item i s))
set s replace-item j s (fput disc (item j s))
report s
end
; equal? is a report to identify the final states
to-report equal? [ob]
report ( content = ob)
end
;---------------- Procedure to build the complete graph ----------------
; Essentially, we calculate the children states for every non explored state
; and connect them with the applied transition. The process continues till
; there are no more non explored states.
to complete-graph [initial-state]
ca
ask patches [ set pcolor white ]
set M length read-from-string Initial_state
; Create the agent associated with the initial state
create-states 1
[
set shape "hanoi"
set color green
set size 2
set content read-from-string initial-state
set label-color black
set label content
set path (list self)
set explored? false
]
; While there are non explored states (the verification about reaching the
; goal is done in the loop)
while [any? states with [not explored?]]
[
ask states with [not explored?]
[
; Calculate the successor states applying every rule to the current state
foreach applicable-transitions content
[ ?1 ->
let applied-state apply-transition ?1 content
; Consider only new states
ifelse not any? states with [content = applied-state]
[
; Create a new agent for every new state
hatch-states 1
[
set content applied-state
set label content
set explored? false
; and connect it to its father with a labelled link
create-transition-from myself [set rule ?1 set label first ?1 set label-color black]
set color white
; Complete the path from initial state to here
set path lput self path
]
]
[
let past one-of states with [content = applied-state]
create-transition-to past [set rule ?1 set label first ?1 set label-color black]
]
; Update the representation
if layout? [repeat 10 [layout]]
]
; After calculated all the successors, we mark the state as explored
set explored? true
]
]
end
; Graph layout
to layout
if states-size != [size] of state 0 [ask states [set size states-size]]
layout-spring states transitions elasticity e-length repulsion
end
to adjust
ask states [setxy (xcor * .9 + random-float 1) (ycor * .9 + random-float 1)]
end
;;
;; Q-Learning algortihm Procedures
;;
; Training Procedure
to Q-learning
; Ticks will count the number of steps
reset-ticks
; Reset the values for transitions and states
ask transitions [
set Q 0
set R 0
set label ""
set thickness 0
set color grey
set variation (Max-Variation + 1)
]
ask states [
set label ""
]
; Transitions reaching final states get maximal reward
let f-state one-of states with [content = read-from-string Final_state]
ask f-state [
ask my-in-transitions [set R 100]
set color red
]
; Repeat the learning process for transitions until max of variations is under the boud
while [max [variation] of transitions > Max-Variation]
[
ask transitions [
let Q2 (1 - nu) * Q + nu * (R + gamma * max [Q] of ([my-out-transitions] of end2))
set variation abs (Q2 - Q)
set Q Q2
set label Q
]
tick
]
; Normalize the quality of transitions and show it as color and thickness on links
let MaxQ max [Q] of transitions
ask transitions [
set Q Q / MaxQ
set color scale-color color Q 1 0
set thickness Q / 4
set label ""
]
end
; To use the information of Q in the calculation of the Solution we move from the initial state
; to the final state using the transitions iwth higher weights (Q).
to Q-execute
ask states [set label ""]
ask transitions [set color scale-color grey Q 1 0]
let i-state one-of states with [content = read-from-string Initial_state]
ask i-state [ set color green ]
let f-state one-of states with [content = read-from-string Final_state]
while [i-state != f-state]
[
ask i-state [
set label (word content " ")
let accion max-one-of my-out-transitions [Q]
ask accion [
set color red
set label first rule
]
set i-state [end2] of accion
]
]
ask f-state [
set label (word content " ")
set color red
]
end
@#$#@#$#@
GRAPHICS-WINDOW
210
10
1085
580
-1
-1
17.0
1
16
1
1
1
0
0
0
1
-25
25
-16
16
0
0
1
ticks
30.0
BUTTON
110
560
200
593
NIL
layout
T
1
T
OBSERVER
NIL
NIL
NIL
NIL
1
MONITOR
10
45
105
90
Estados:
count turtles
17
1
11
INPUTBOX
10
95
200
155
Initial_state
[[1 2 3] [][]]
1
0
String
INPUTBOX
10
155
200
215
Final_state
[[][][1 2 3]]
1
0
String
BUTTON
10
10
105
43
Create Graph
complete-graph Initial_state
NIL
1
T
OBSERVER
NIL
NIL
NIL
NIL
1
BUTTON
10
220
105
253
Q-Entrena
Q-learning
NIL
1
T
OBSERVER
NIL
NIL
NIL
NIL
1
SWITCH
110
10
200
43
layout?
layout?
0
1
-1000
BUTTON
110
220
200
253
NIL
Q-Execute
NIL
1
T
OBSERVER
NIL
NIL
NIL
NIL
1
SLIDER
10
260
200
293
nu
nu
0
1
0.15
.01
1
NIL
HORIZONTAL
SLIDER
10
295
200
328
gamma
gamma
0
1
0.5
.01
1
NIL
HORIZONTAL
SLIDER
10
330
200
363
Max-Variation
Max-Variation
0
1
0.01
.01
1
NIL
HORIZONTAL
MONITOR
10
365
200
410
Convergence in steps:
ticks
17
1
11
SLIDER
10
420
200
453
states-size
states-size
0
4
1.6
.1
1
NIL
HORIZONTAL
SLIDER
10
455
200
488
elasticity
elasticity
0
1
0.4
.1
1
NIL
HORIZONTAL
SLIDER
10
490
200
523
e-length
e-length
0
10
4.5
.5
1
NIL
HORIZONTAL
SLIDER
10
525
200
558
repulsion
repulsion
0
2
1.0
.1
1
NIL
HORIZONTAL
@#$#@#$#@
## WHAT IS IT?
(a general understanding of what the model is trying to show or explain)
## HOW IT WORKS
(what rules the agents use to create the overall behavior of the model)
## HOW TO USE IT
(how to use the model, including a description of each of the items in the Interface tab)
## THINGS TO NOTICE
(suggested things for the user to notice while running the model)
## THINGS TO TRY
(suggested things for the user to try to do (move sliders, switches, etc.) with the model)
## EXTENDING THE MODEL
(suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.)
## NETLOGO FEATURES
(interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features)
## RELATED MODELS
(models in the NetLogo Models Library and elsewhere which are of related interest)
## CREDITS AND REFERENCES
(a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links)
@#$#@#$#@
default
true
0
Polygon -7500403 true true 150 5 40 250 150 205 260 250
hanoi
false
0
Rectangle -7500403 true true 0 30 300 285
Rectangle -16777216 false false 0 30 300 285
Rectangle -6459832 true false 0 225 300 255
Rectangle -6459832 true false 45 45 75 225
Rectangle -6459832 true false 225 45 255 225
Rectangle -6459832 true false 135 45 165 225
Rectangle -14835848 true false 0 180 120 210
Rectangle -13791810 true false 15 135 105 165
Rectangle -955883 true false 30 90 90 120
Rectangle -11221820 true false 180 180 300 210
Rectangle -5825686 true false 210 135 270 165
@#$#@#$#@
NetLogo 6.0.2
@#$#@#$#@
@#$#@#$#@
@#$#@#$#@
@#$#@#$#@
@#$#@#$#@
default
1.0
-0.2 0 0.0 1.0
0.0 1 1.0 0.0
0.2 0 0.0 1.0
link direction
true
0
Line -7500403 true 150 150 90 180
Line -7500403 true 150 150 210 180
@#$#@#$#@
1
@#$#@#$#@
| NetLogo | 5 | fsancho/IA | 11. Machine Learning/Reinforcement Learning/QLearning - Hanoi.nlogo | [
"MIT"
] |
##### http://autoconf-archive.cryp.to/ax_cflags_warn_all.html
#
# SYNOPSIS
#
# AX_CFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])]
#
# DESCRIPTION
#
# Try to find a compiler option that enables most reasonable
# warnings. This macro is directly derived from VL_PROG_CC_WARNINGS
# which is split up into two AX_CFLAGS_WARN_ALL and
# AX_CFLAGS_WARN_ALL_ANSI
#
# For the GNU CC compiler it will be -Wall (and -ansi -pedantic) The
# result is added to the shellvar being CFLAGS by default.
#
# Currently this macro knows about GCC, Solaris C compiler, Digital
# Unix C compiler, C for AIX Compiler, HP-UX C compiler, IRIX C
# compiler, NEC SX-5 (Super-UX 10) C compiler, and Cray J90 (Unicos
# 10.0.0.8) C compiler.
#
# - $1 shell-variable-to-add-to : CFLAGS
# - $2 add-value-if-not-found : nothing
# - $3 action-if-found : add value to shellvariable
# - $4 action-if-not-found : nothing
#
# LAST MODIFICATION
#
# 2006-12-12
#
# COPYLEFT
#
# Copyright (c) 2006 Guido U. Draheim <guidod@gmx.de>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
#
# As a special exception, the respective Autoconf Macro's copyright
# owner gives unlimited permission to copy, distribute and modify the
# configure scripts that are the output of Autoconf when processing
# the Macro. You need not follow the terms of the GNU General Public
# License when using or distributing such scripts, even though
# portions of the text of the Macro appear in them. The GNU General
# Public License (GPL) does govern all other use of the material that
# constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the
# Autoconf Macro released by the Autoconf Macro Archive. When you
# make and distribute a modified version of the Autoconf Macro, you
# may extend this special exception to the GPL to apply to your
# modified version as well.
AC_DEFUN([AX_CFLAGS_WARN_ALL],[dnl
AS_VAR_PUSHDEF([FLAGS],[CFLAGS])dnl
AS_VAR_PUSHDEF([VAR],[ac_cv_cflags_warn_all])dnl
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
VAR,[VAR="no, unknown"
AC_LANG_SAVE
AC_LANG_C
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
in "-pedantic % -Wall" dnl GCC
"-xstrconst % -v" dnl Solaris C
"-std1 % -verbose -w0 -warnprotos" dnl Digital Unix
"-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
"-ansi -ansiE % -fullwarn" dnl IRIX
"+ESlit % +w1" dnl HP-UX C
"-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
"-h conform % -h msglevel 2" dnl Cray C (Unicos)
#
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
*) m4_ifvaln($3,$3,[
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
fi ]) ;;
esac
AS_VAR_POPDEF([VAR])dnl
AS_VAR_POPDEF([FLAGS])dnl
])
dnl the only difference - the LANG selection... and the default FLAGS
AC_DEFUN([AX_CXXFLAGS_WARN_ALL],[dnl
AS_VAR_PUSHDEF([FLAGS],[CXXFLAGS])dnl
AS_VAR_PUSHDEF([VAR],[ac_cv_cxxflags_warn_all])dnl
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
VAR,[VAR="no, unknown"
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
in "-pedantic % -Wall" dnl GCC
"-xstrconst % -v" dnl Solaris C
"-std1 % -verbose -w0 -warnprotos" dnl Digital Unix
"-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
"-ansi -ansiE % -fullwarn" dnl IRIX
"+ESlit % +w1" dnl HP-UX C
"-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
"-h conform % -h msglevel 2" dnl Cray C (Unicos)
#
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_TRY_COMPILE([],[return 0;],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
AC_LANG_RESTORE
])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_ifvaln($4,$4,[m4_ifval($2,[
AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $2"])]) ;;
*) m4_ifvaln($3,$3,[
if echo " $[]m4_ifval($1,$1,FLAGS) " | grep " $VAR " 2>&1 >/dev/null
then AC_RUN_LOG([: m4_ifval($1,$1,FLAGS) does contain $VAR])
else AC_RUN_LOG([: m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"])
m4_ifval($1,$1,FLAGS)="$m4_ifval($1,$1,FLAGS) $VAR"
fi ]) ;;
esac
AS_VAR_POPDEF([VAR])dnl
AS_VAR_POPDEF([FLAGS])dnl
])
dnl implementation tactics:
dnl the for-argument contains a list of options. The first part of
dnl these does only exist to detect the compiler - usually it is
dnl a global option to enable -ansi or -extrawarnings. All other
dnl compilers will fail about it. That was needed since a lot of
dnl compilers will give false positives for some option-syntax
dnl like -Woption or -Xoption as they think of it is a pass-through
dnl to later compile stages or something. The "%" is used as a
dnl delimimiter. A non-option comment can be given after "%%" marks
dnl which will be shown but not added to the respective C/CXXFLAGS.
| M4 | 5 | joshrose/audacity | lib-src/portsmf/autotools/m4/ax_cflags_warn_all.m4 | [
"CC-BY-3.0"
] |
package gw.specification.classes.the_Member_Access_Modifiers.p0
enhancement DefaultAccessEnh0 : gw.specification.classes.the_Member_Access_Modifiers.p0.DefaultAccessC0 {
function m3(){}
static function m4(){}
property get Prop5() : String {
return "property 5"
}
static property get Prop6() : String {
return "property 6"
}
}
| Gosu | 4 | tcmoore32/sheer-madness | gosu-test/src/test/gosu/gw/specification/classes/the_Member_Access_Modifiers/p0/DefaultAccessEnh0.gsx | [
"Apache-2.0"
] |
document.write('#{escape_javascript(stylesheet_link_tag("#{stylesheet_url 'snippets'}"))}');
document.write('#{escape_javascript(render(partial: 'shared/snippets/embed', collection: @blobs, as: :blob))}');
| Haml | 3 | glimmerhq/glimmerhq | app/views/shared/snippets/show.js.haml | [
"MIT"
] |
[[documentation.actuator]]
== Moving to Production
When you are ready to push your Spring Boot application to production, we have <<actuator#actuator, some tricks>> that you might like:
* *Management endpoints:* <<actuator#actuator.endpoints, Overview>>
* *Connection options:* <<actuator#actuator.monitoring, HTTP>> | <<actuator#actuator.jmx, JMX>>
* *Monitoring:* <<actuator#actuator.metrics, Metrics>> | <<actuator#actuator.auditing, Auditing>> | <<actuator#actuator.tracing, HTTP Tracing>> | <<actuator#actuator.process-monitoring, Process>>
| AsciiDoc | 3 | techAi007/spring-boot | spring-boot-project/spring-boot-docs/src/docs/asciidoc/documentation/actuator.adoc | [
"Apache-2.0"
] |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package reflect
import (
"internal/goarch"
"sync"
"unsafe"
)
// MakeRO returns a copy of v with the read-only flag set.
func MakeRO(v Value) Value {
v.flag |= flagStickyRO
return v
}
// IsRO reports whether v's read-only flag is set.
func IsRO(v Value) bool {
return v.flag&flagStickyRO != 0
}
var CallGC = &callGC
// FuncLayout calls funcLayout and returns a subset of the results for testing.
//
// Bitmaps like stack, gc, inReg, and outReg are expanded such that each bit
// takes up one byte, so that writing out test cases is a little clearer.
// If ptrs is false, gc will be nil.
func FuncLayout(t Type, rcvr Type) (frametype Type, argSize, retOffset uintptr, stack, gc, inReg, outReg []byte, ptrs bool) {
var ft *rtype
var abid abiDesc
if rcvr != nil {
ft, _, abid = funcLayout((*funcType)(unsafe.Pointer(t.(*rtype))), rcvr.(*rtype))
} else {
ft, _, abid = funcLayout((*funcType)(unsafe.Pointer(t.(*rtype))), nil)
}
// Extract size information.
argSize = abid.stackCallArgsSize
retOffset = abid.retOffset
frametype = ft
// Expand stack pointer bitmap into byte-map.
for i := uint32(0); i < abid.stackPtrs.n; i++ {
stack = append(stack, abid.stackPtrs.data[i/8]>>(i%8)&1)
}
// Expand register pointer bitmaps into byte-maps.
bool2byte := func(b bool) byte {
if b {
return 1
}
return 0
}
for i := 0; i < intArgRegs; i++ {
inReg = append(inReg, bool2byte(abid.inRegPtrs.Get(i)))
outReg = append(outReg, bool2byte(abid.outRegPtrs.Get(i)))
}
if ft.kind&kindGCProg != 0 {
panic("can't handle gc programs")
}
// Expand frame type's GC bitmap into byte-map.
ptrs = ft.ptrdata != 0
if ptrs {
nptrs := ft.ptrdata / goarch.PtrSize
gcdata := ft.gcSlice(0, (nptrs+7)/8)
for i := uintptr(0); i < nptrs; i++ {
gc = append(gc, gcdata[i/8]>>(i%8)&1)
}
}
return
}
func TypeLinks() []string {
var r []string
sections, offset := typelinks()
for i, offs := range offset {
rodata := sections[i]
for _, off := range offs {
typ := (*rtype)(resolveTypeOff(unsafe.Pointer(rodata), off))
r = append(r, typ.String())
}
}
return r
}
var GCBits = gcbits
func gcbits(interface{}) []byte // provided by runtime
func MapBucketOf(x, y Type) Type {
return bucketOf(x.(*rtype), y.(*rtype))
}
func CachedBucketOf(m Type) Type {
t := m.(*rtype)
if Kind(t.kind&kindMask) != Map {
panic("not map")
}
tt := (*mapType)(unsafe.Pointer(t))
return tt.bucket
}
type EmbedWithUnexpMeth struct{}
func (EmbedWithUnexpMeth) f() {}
type pinUnexpMeth interface {
f()
}
var pinUnexpMethI = pinUnexpMeth(EmbedWithUnexpMeth{})
func FirstMethodNameBytes(t Type) *byte {
_ = pinUnexpMethI
ut := t.uncommon()
if ut == nil {
panic("type has no methods")
}
m := ut.methods()[0]
mname := t.(*rtype).nameOff(m.name)
if *mname.data(0, "name flag field")&(1<<2) == 0 {
panic("method name does not have pkgPath *string")
}
return mname.bytes
}
type OtherPkgFields struct {
OtherExported int
otherUnexported int
}
func IsExported(t Type) bool {
typ := t.(*rtype)
n := typ.nameOff(typ.str)
return n.isExported()
}
func ResolveReflectName(s string) {
resolveReflectName(newName(s, "", false))
}
type Buffer struct {
buf []byte
}
func clearLayoutCache() {
layoutCache = sync.Map{}
}
func SetArgRegs(ints, floats int, floatSize uintptr) (oldInts, oldFloats int, oldFloatSize uintptr) {
oldInts = intArgRegs
oldFloats = floatArgRegs
oldFloatSize = floatRegSize
intArgRegs = ints
floatArgRegs = floats
floatRegSize = floatSize
clearLayoutCache()
return
}
var MethodValueCallCodePtr = methodValueCallCodePtr
| Go | 5 | SSSDNSY/go | src/reflect/export_test.go | [
"BSD-3-Clause"
] |
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing
**
** This file is part of the Qt Build Suite.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms and
** conditions see http://www.qt.io/terms-conditions. For further information
** use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
import qbs 1.0
import qbs.FileInfo
import qbs.ModUtils
Module {
property string buildVariant: "debug"
property bool enableDebugCode: buildVariant == "debug"
property bool debugInformation: (buildVariant == "debug")
property string optimization: (buildVariant == "debug" ? "none" : "fast")
readonly property stringList hostOS: undefined // set internally
property string hostOSVersion: {
if (hostOS && hostOS.contains("osx")) {
return getNativeSetting("/System/Library/CoreServices/ServerVersion.plist", "ProductVersion") ||
getNativeSetting("/System/Library/CoreServices/SystemVersion.plist", "ProductVersion");
} else if (hostOS && hostOS.contains("windows")) {
var version = getNativeSetting("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion", "CurrentVersion");
return version + "." + hostOSBuildVersion;
}
}
property string hostOSBuildVersion: {
if (hostOS.contains("osx")) {
return getNativeSetting("/System/Library/CoreServices/ServerVersion.plist", "ProductBuildVersion") ||
getNativeSetting("/System/Library/CoreServices/SystemVersion.plist", "ProductBuildVersion");
} else if (hostOS.contains("windows")) {
return getNativeSetting("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion", "CurrentBuildNumber");
}
}
readonly property var hostOSVersionParts: hostOSVersion ? hostOSVersion.split('.').map(function(item) { return parseInt(item, 10); }) : []
readonly property int hostOSVersionMajor: hostOSVersionParts[0] || 0
readonly property int hostOSVersionMinor: hostOSVersionParts[1] || 0
readonly property int hostOSVersionPatch: hostOSVersionParts[2] || 0
property stringList targetOS: hostOS
property string pathListSeparator: hostOS.contains("windows") ? ";" : ":"
property string pathSeparator: hostOS.contains("windows") ? "\\" : "/"
property string profile
property stringList toolchain
property string architecture
property bool install: false
property string installSourceBase
readonly property string installRoot: undefined
property string installDir
property string installPrefix: ""
property path sysroot
PropertyOptions {
name: "buildVariant"
allowedValues: ['debug', 'release']
description: "name of the build variant"
}
PropertyOptions {
name: "optimization"
allowedValues: ['none', 'fast', 'small']
description: "optimization level"
}
validate: {
var validator = new ModUtils.PropertyValidator("qbs");
validator.setRequiredProperty("architecture", architecture,
"you might want to re-run 'qbs-setup-toolchains'");
validator.setRequiredProperty("hostOS", hostOS);
validator.setRequiredProperty("targetOS", targetOS);
if (hostOS && (hostOS.contains("windows") || hostOS.contains("osx"))) {
validator.setRequiredProperty("hostOSVersion", hostOSVersion,
"could not detect host operating system version; " +
"verify that system files and registry keys have not " +
"been modified.");
if (hostOSVersion)
validator.addVersionValidator("hostOSVersion", hostOSVersion, 2, 4);
validator.setRequiredProperty("hostOSBuildVersion", hostOSBuildVersion,
"could not detect host operating system build version; " +
"verify that system files or registry have not been " +
"tampered with.");
}
validator.addCustomValidator("architecture", architecture, function (value) {
return architecture === canonicalArchitecture(architecture);
}, "'" + architecture + "' is invalid. You must use the canonical name '" +
canonicalArchitecture(architecture) + "'");
validator.validate();
}
// private properties
property var commonRunEnvironment: {
var env = {};
if (targetOS.contains("windows")) {
env["PATH"] = [
FileInfo.joinPaths(installRoot, installPrefix)
];
} else if (hostOS.contains("darwin") && targetOS.contains("darwin")) {
env["DYLD_FRAMEWORK_PATH"] = [
FileInfo.joinPaths(installRoot, installPrefix, "Library", "Frameworks"),
FileInfo.joinPaths(installRoot, installPrefix, "lib"),
FileInfo.joinPaths(installRoot, installPrefix)
].join(pathListSeparator);
env["DYLD_LIBRARY_PATH"] = [
FileInfo.joinPaths(installRoot, installPrefix, "lib"),
FileInfo.joinPaths(installRoot, installPrefix, "Library", "Frameworks"),
FileInfo.joinPaths(installRoot, installPrefix)
].join(pathListSeparator);
if (targetOS.contains("ios-simulator") && sysroot) {
env["DYLD_ROOT_PATH"] = [sysroot];
}
} else if (hostOS.contains("unix") && targetOS.contains("unix")) {
env["LD_LIBRARY_PATH"] = [
FileInfo.joinPaths(installRoot, installPrefix, "lib")
];
}
return env;
}
// internal properties
readonly property string version: [versionMajor, versionMinor, versionPatch].join(".")
readonly property int versionMajor: undefined // set internally
readonly property int versionMinor: undefined // set internally
readonly property int versionPatch: undefined // set internally
}
| QML | 4 | JavascriptID/sourcerer-app | src/test/resources/samples/langs/QML/common.qbs | [
"MIT"
] |
// Camera is placed 10 units behind the origin
camera {
location <0, 0, -10>
look_at <0, 0, 0>
}
// Light source is placed 10 units behind the origin
light_source {
<0, 0, -10>
color rgb <1, 1, 1>
}
// Light source shining from top left corner of the scene
light_source {
<-10, 10, 0>
color rgb <1, 1, 1>
}
// White box is centred at the origin
box {
<0.5, 0.5, 0.5> <-0.5, -0.5, -0.5>
pigment {
color rgb <1, 1, 1>
}
}
// Red box is translated by <2, 2, 2>
box {
<0.5, 0.5, 0.5> <-0.5, -0.5, -0.5>
pigment {
color rgb <1, 0, 0>
}
translate <2, 2, 2>
}
// Green box is translated by <5, 5, 2>
box {
<0.5, 0.5, 0.5> <-0.5, -0.5, -0.5>
pigment {
color rgb <0, 1, 0>
}
translate <5, 5, 2>
}
// Blue box is translated by <5, 5, 5>
box {
<0.5, 0.5, 0.5> <-0.5, -0.5, -0.5>
pigment {
color rgb <0, 0, 1>
}
translate <5, 5, 5>
}
// Yellow box is first rotated around z axis by 45 degrees and then
// shifted left by 5 units
box {
<0.5, 0.5, 0.5> <-0.5, -0.5, -0.5>
pigment {
color rgb <1, 1, 0>
}
rotate <0, 0, 45>
translate <-5, 0, 0>
}
// Cyan box is first shift left by 5 units and then the box is rotated
// around z axis by 45 degrees. In the rendered image, it can be seen
// that the whole box as a whole orbits around the z axis due to the
// rotation and occupies a new place 45 degrees away from the yellow box
// in the orbit.
box {
<0.5, 0.5, 0.5> <-0.5, -0.5, -0.5>
pigment {
color rgb <0, 1, 1>
}
translate <-5, 0, 0>
rotate <0, 0, 45>
}
// The length of the brown box is first doubled along x axis, then it is
// rotated 45 degrees around y axis. As a result, the elongated face is
// rotated towards left. Then it is translated to a new position below
// the origin.
box {
<0.5, 0.5, 0.5> <-0.5, -0.5, -0.5>
pigment {
color rgb <0.8, 0.6, 0.5>
}
scale <2, 1, 1>
rotate <0, 45, 0>
translate <2, -1.0, 0>
}
// The pink box is first rotated 45 degrees around y axis. Then it is
// scaled by a factor of 2 along x axis. As a result, the diagonal of
// the box running along x axis seems to be elongated. Finally, this box
// is translated and placed right below the brown box.
box {
<0.5, 0.5, 0.5> <-0.5, -0.5, -0.5>
pigment {
color rgb <1, 0.5, 1>
}
rotate <0, 45, 0>
scale <2, 1, 1>
translate <2, -2.5, 0>
}
// The maroon box is first rotated along y axis by 45 degrees. Then it
// is translated to a new position right below the pink box. Finally, it
// is scaled by a factor of 2 along the x axis. As a result, the box
// appears to have moved further along the x axis. Also, its diagonal of
// along the x axis appears to be stretched.
box {
<0.5, 0.5, 0.5> <-0.5, -0.5, -0.5>
pigment {
color rgb <0.5, 0.0, 0.0>
}
rotate <0, 45, 0>
translate <2, -4, 0>
scale <2, 1, 1>
}
| POV-Ray SDL | 5 | spcask/pov-ray-tracing | src/scene02.pov | [
"MIT"
] |
void FutureApi::OnFrontConnected()
{
gil_scoped_acquire acquire;
this->onFrontConnected();
};
void FutureApi::OnFrontDisconnected(int iReason)
{
gil_scoped_acquire acquire;
this->onFrontDisconnected(iReason);
};
void FutureApi::OnHeartBeatWarning(int iTimeLapse)
{
gil_scoped_acquire acquire;
this->onHeartBeatWarning(iTimeLapse);
};
void FutureApi::OnRspNeedVerify(bool bFirstLogin, bool bHasSetQA)
{
gil_scoped_acquire acquire;
this->onRspNeedVerify(bFirstLogin, bHasSetQA);
};
void FutureApi::OnRspUserLogin(CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspUserLogin(error, iRequestID, bIsLast);
};
void FutureApi::OnRspUserLogout(CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspUserLogout(error, iRequestID, bIsLast);
};
void FutureApi::OnRspVerifyCode(CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspVerifyCode(error, iRequestID, bIsLast);
};
void FutureApi::OnRspSafeVerify(CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspSafeVerify(error, iRequestID, bIsLast);
};
void FutureApi::OnRspSetVerifyQA(CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspSetVerifyQA(error, iRequestID, bIsLast);
};
void FutureApi::OnRspAccount(CFutureRspAccountField *pRspAccount, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRspAccount)
{
data["UserId"] = toUtf(pRspAccount->UserId);
data["UserName"] = toUtf(pRspAccount->UserName);
data["UserType"] = toUtf(pRspAccount->UserType);
data["LoginPwd"] = toUtf(pRspAccount->LoginPwd);
data["AccountNo"] = toUtf(pRspAccount->AccountNo);
data["TradePwd"] = toUtf(pRspAccount->TradePwd);
data["IsSimulation"] = toUtf(pRspAccount->IsSimulation);
data["FrontendIp"] = toUtf(pRspAccount->FrontendIp);
data["FrontendPort"] = toUtf(pRspAccount->FrontendPort);
data["CurrencyNo"] = toUtf(pRspAccount->CurrencyNo);
data["UserState"] = toUtf(pRspAccount->UserState);
data["SelAll"] = toUtf(pRspAccount->SelAll);
data["Strategy"] = toUtf(pRspAccount->Strategy);
data["Inner"] = toUtf(pRspAccount->Inner);
data["YingSun"] = toUtf(pRspAccount->YingSun);
data["ChaoDan"] = toUtf(pRspAccount->ChaoDan);
data["Option"] = toUtf(pRspAccount->Option);
data["CmeMarket"] = toUtf(pRspAccount->CmeMarket);
data["CmeCOMEXMarket"] = toUtf(pRspAccount->CmeCOMEXMarket);
data["CmeNYMEXMarket"] = toUtf(pRspAccount->CmeNYMEXMarket);
data["CmeCBTMarket"] = toUtf(pRspAccount->CmeCBTMarket);
data["IceUSMarket"] = toUtf(pRspAccount->IceUSMarket);
data["IceECMarket"] = toUtf(pRspAccount->IceECMarket);
data["IceEFMarket"] = toUtf(pRspAccount->IceEFMarket);
data["CanTradeStockHK"] = toUtf(pRspAccount->CanTradeStockHK);
data["CanTradeStockAM"] = toUtf(pRspAccount->CanTradeStockAM);
data["MultiLogin"] = toUtf(pRspAccount->MultiLogin);
data["SellStockHK"] = toUtf(pRspAccount->SellStockHK);
data["SellStockAM"] = toUtf(pRspAccount->SellStockAM);
data["CanTradeStockKRX"] = toUtf(pRspAccount->CanTradeStockKRX);
data["HkexMarket"] = toUtf(pRspAccount->HkexMarket);
data["IdNumber"] = toUtf(pRspAccount->IdNumber);
data["HkexMarketFee"] = toUtf(pRspAccount->HkexMarketFee);
data["IsProfessional"] = toUtf(pRspAccount->IsProfessional);
data["IsOverSea"] = toUtf(pRspAccount->IsOverSea);
data["IsFirstLogin"] = toUtf(pRspAccount->IsFirstLogin);
data["UserMobile"] = toUtf(pRspAccount->UserMobile);
data["HasSetQA"] = toUtf(pRspAccount->HasSetQA);
data["CanTradeStockSGXQ"] = toUtf(pRspAccount->CanTradeStockSGXQ);
data["ExistMac"] = toUtf(pRspAccount->ExistMac);
data["RatioINE"] = toUtf(pRspAccount->RatioINE);
data["EurexMarket"] = toUtf(pRspAccount->EurexMarket);
data["HkexIsOverMaxTerminal"] = toUtf(pRspAccount->HkexIsOverMaxTerminal);
data["HkexOverMoney"] = toUtf(pRspAccount->HkexOverMoney);
data["CanTradeStockAU"] = toUtf(pRspAccount->CanTradeStockAU);
data["NyFlag"] = toUtf(pRspAccount->NyFlag);
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspAccount(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRspQuestion(CFutureRspQuestionField *pRspVersion, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRspVersion)
{
data["QuestionType"] = toUtf(pRspVersion->QuestionType);
data["QuestionId"] = toUtf(pRspVersion->QuestionId);
data["QuestionCN"] = toUtf(pRspVersion->QuestionCN);
data["QuestionEN"] = toUtf(pRspVersion->QuestionEN);
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspQuestion(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRspOrderInsert(CFutureRspOrderInsertField *pRspOrderInsert, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRspOrderInsert)
{
data["UserId"] = toUtf(pRspOrderInsert->UserId);
data["AccountNo"] = toUtf(pRspOrderInsert->AccountNo);
data["SystemNo"] = toUtf(pRspOrderInsert->SystemNo);
data["LocalNo"] = toUtf(pRspOrderInsert->LocalNo);
data["OrderNo"] = toUtf(pRspOrderInsert->OrderNo);
data["OrigOrderNo"] = toUtf(pRspOrderInsert->OrigOrderNo);
data["OrderMethod"] = toUtf(pRspOrderInsert->OrderMethod);
data["AcceptType"] = toUtf(pRspOrderInsert->AcceptType);
data["ExchangeCode"] = toUtf(pRspOrderInsert->ExchangeCode);
data["TreatyCode"] = toUtf(pRspOrderInsert->TreatyCode);
data["BuySale"] = toUtf(pRspOrderInsert->BuySale);
data["OrderNumber"] = toUtf(pRspOrderInsert->OrderNumber);
data["OrderPrice"] = toUtf(pRspOrderInsert->OrderPrice);
data["FilledNumber"] = toUtf(pRspOrderInsert->FilledNumber);
data["FilledPrice"] = toUtf(pRspOrderInsert->FilledPrice);
data["TradeType"] = toUtf(pRspOrderInsert->TradeType);
data["PriceType"] = toUtf(pRspOrderInsert->PriceType);
data["HtsType"] = toUtf(pRspOrderInsert->HtsType);
data["OrderDate"] = toUtf(pRspOrderInsert->OrderDate);
data["OrderTime"] = toUtf(pRspOrderInsert->OrderTime);
data["ErrorCode"] = toUtf(pRspOrderInsert->ErrorCode);
data["OrderState"] = toUtf(pRspOrderInsert->OrderState);
data["IsRiskOrder"] = toUtf(pRspOrderInsert->IsRiskOrder);
data["CancelUserId"] = toUtf(pRspOrderInsert->CancelUserId);
data["TriggerPrice"] = toUtf(pRspOrderInsert->TriggerPrice);
data["ValidDate"] = toUtf(pRspOrderInsert->ValidDate);
data["AddReduce"] = toUtf(pRspOrderInsert->AddReduce);
data["StrategyId"] = toUtf(pRspOrderInsert->StrategyId);
data["MaxShow"] = toUtf(pRspOrderInsert->MaxShow);
data["MinQty"] = toUtf(pRspOrderInsert->MinQty);
data["ExchangeTime"] = toUtf(pRspOrderInsert->ExchangeTime);
data["CancelTime"] = toUtf(pRspOrderInsert->CancelTime);
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspOrderInsert(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRspOrderModify(CFutureRspOrderModifyField *pRspOrderModify, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRspOrderModify)
{
data["UserId"] = toUtf(pRspOrderModify->UserId);
data["AccountNo"] = toUtf(pRspOrderModify->AccountNo);
data["SystemNo"] = toUtf(pRspOrderModify->SystemNo);
data["LocalNo"] = toUtf(pRspOrderModify->LocalNo);
data["OrderNo"] = toUtf(pRspOrderModify->OrderNo);
data["OrigOrderNo"] = toUtf(pRspOrderModify->OrigOrderNo);
data["OrderMethod"] = toUtf(pRspOrderModify->OrderMethod);
data["AcceptType"] = toUtf(pRspOrderModify->AcceptType);
data["ExchangeCode"] = toUtf(pRspOrderModify->ExchangeCode);
data["TreatyCode"] = toUtf(pRspOrderModify->TreatyCode);
data["BuySale"] = toUtf(pRspOrderModify->BuySale);
data["OrderNumber"] = toUtf(pRspOrderModify->OrderNumber);
data["OrderPrice"] = toUtf(pRspOrderModify->OrderPrice);
data["FilledNumber"] = toUtf(pRspOrderModify->FilledNumber);
data["FilledPrice"] = toUtf(pRspOrderModify->FilledPrice);
data["TradeType"] = toUtf(pRspOrderModify->TradeType);
data["PriceType"] = toUtf(pRspOrderModify->PriceType);
data["HtsType"] = toUtf(pRspOrderModify->HtsType);
data["OrderDate"] = toUtf(pRspOrderModify->OrderDate);
data["OrderTime"] = toUtf(pRspOrderModify->OrderTime);
data["ErrorCode"] = toUtf(pRspOrderModify->ErrorCode);
data["OrderState"] = toUtf(pRspOrderModify->OrderState);
data["IsRiskOrder"] = toUtf(pRspOrderModify->IsRiskOrder);
data["CancelUserId"] = toUtf(pRspOrderModify->CancelUserId);
data["TriggerPrice"] = toUtf(pRspOrderModify->TriggerPrice);
data["ValidDate"] = toUtf(pRspOrderModify->ValidDate);
data["AddReduce"] = toUtf(pRspOrderModify->AddReduce);
data["StrategyId"] = toUtf(pRspOrderModify->StrategyId);
data["MaxShow"] = toUtf(pRspOrderModify->MaxShow);
data["MinQty"] = toUtf(pRspOrderModify->MinQty);
data["ExchangeTime"] = toUtf(pRspOrderModify->ExchangeTime);
data["CancelTime"] = toUtf(pRspOrderModify->CancelTime);
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspOrderModify(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRspOrderCancel(CFutureRspOrderCancelField *pRspOrderCancel, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRspOrderCancel)
{
data["UserId"] = toUtf(pRspOrderCancel->UserId);
data["AccountNo"] = toUtf(pRspOrderCancel->AccountNo);
data["SystemNo"] = toUtf(pRspOrderCancel->SystemNo);
data["LocalNo"] = toUtf(pRspOrderCancel->LocalNo);
data["OrderNo"] = toUtf(pRspOrderCancel->OrderNo);
data["CancelNo"] = toUtf(pRspOrderCancel->CancelNo);
data["ExchangeCode"] = toUtf(pRspOrderCancel->ExchangeCode);
data["TreatyCode"] = toUtf(pRspOrderCancel->TreatyCode);
data["BuySale"] = toUtf(pRspOrderCancel->BuySale);
data["OrderNumber"] = toUtf(pRspOrderCancel->OrderNumber);
data["OrderPrice"] = toUtf(pRspOrderCancel->OrderPrice);
data["FilledNumber"] = toUtf(pRspOrderCancel->FilledNumber);
data["CancelNumber"] = toUtf(pRspOrderCancel->CancelNumber);
data["TradeType"] = toUtf(pRspOrderCancel->TradeType);
data["PriceType"] = toUtf(pRspOrderCancel->PriceType);
data["HtsType"] = toUtf(pRspOrderCancel->HtsType);
data["CancelDate"] = toUtf(pRspOrderCancel->CancelDate);
data["CancelTime"] = toUtf(pRspOrderCancel->CancelTime);
data["ErrorCode"] = toUtf(pRspOrderCancel->ErrorCode);
data["IsRiskOrder"] = toUtf(pRspOrderCancel->IsRiskOrder);
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspOrderCancel(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRspPasswordUpdate(CFutureRspPasswordUpdateField *pRspPasswordUpdate, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRspPasswordUpdate)
{
data["UserId"] = toUtf(pRspPasswordUpdate->UserId);
data["OldPassword"] = toUtf(pRspPasswordUpdate->OldPassword);
data["NewPassword"] = toUtf(pRspPasswordUpdate->NewPassword);
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspPasswordUpdate(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRtnTrade(CFutureRtnTradeField *pRtnTrade, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRtnTrade)
{
data["UserId"] = toUtf(pRtnTrade->UserId);
data["AccountNo"] = toUtf(pRtnTrade->AccountNo);
data["FilledNo"] = toUtf(pRtnTrade->FilledNo);
data["OrderNo"] = toUtf(pRtnTrade->OrderNo);
data["SystemNo"] = toUtf(pRtnTrade->SystemNo);
data["LocalNo"] = toUtf(pRtnTrade->LocalNo);
data["ExchangeCode"] = toUtf(pRtnTrade->ExchangeCode);
data["TreatyCode"] = toUtf(pRtnTrade->TreatyCode);
data["BuySale"] = toUtf(pRtnTrade->BuySale);
data["FilledNumber"] = toUtf(pRtnTrade->FilledNumber);
data["FilledPrice"] = toUtf(pRtnTrade->FilledPrice);
data["FilledDate"] = toUtf(pRtnTrade->FilledDate);
data["FilledTime"] = toUtf(pRtnTrade->FilledTime);
data["Commsion"] = toUtf(pRtnTrade->Commsion);
data["OrderNumber"] = toUtf(pRtnTrade->OrderNumber);
data["OrderPrice"] = toUtf(pRtnTrade->OrderPrice);
data["DeliveryDate"] = toUtf(pRtnTrade->DeliveryDate);
data["FilledType"] = toUtf(pRtnTrade->FilledType);
data["OrderType"] = toUtf(pRtnTrade->OrderType);
data["ValidDate"] = toUtf(pRtnTrade->ValidDate);
data["AddReduce"] = toUtf(pRtnTrade->AddReduce);
data["ErrorDescription"] = toUtf(pRtnTrade->ErrorDescription);
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRtnTrade(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRtnOrder(CFutureRtnOrderField *pRtnOrder, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRtnOrder)
{
data["LocalOrderNo"] = toUtf(pRtnOrder->LocalOrderNo);
data["ExchangeNo"] = toUtf(pRtnOrder->ExchangeNo);
data["TreatyCode"] = toUtf(pRtnOrder->TreatyCode);
data["OrderNo"] = toUtf(pRtnOrder->OrderNo);
data["OrderNumber"] = pRtnOrder->OrderNumber;
data["FilledNumber"] = pRtnOrder->FilledNumber;
data["FilledAdvPrice"] = pRtnOrder->FilledAdvPrice;
data["BuyHoldNumber"] = pRtnOrder->BuyHoldNumber;
data["BuyHoldOpenPrice"] = pRtnOrder->BuyHoldOpenPrice;
data["BuyHoldPrice"] = pRtnOrder->BuyHoldPrice;
data["SaleHoldNumber"] = pRtnOrder->SaleHoldNumber;
data["SaleHoldOpenPrice"] = pRtnOrder->SaleHoldOpenPrice;
data["SaleHoldPrice"] = pRtnOrder->SaleHoldPrice;
data["IsCanceled"] = toUtf(pRtnOrder->IsCanceled);
data["FilledTotalFee"] = pRtnOrder->FilledTotalFee;
data["Status"] = pRtnOrder->Status;
data["AccountNo"] = toUtf(pRtnOrder->AccountNo);
data["HoldType"] = toUtf(pRtnOrder->HoldType);
data["HoldMarginBuy"] = pRtnOrder->HoldMarginBuy;
data["HoldMarginSale"] = pRtnOrder->HoldMarginSale;
data["CurrPrice"] = pRtnOrder->CurrPrice;
data["FloatProfit"] = pRtnOrder->FloatProfit;
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRtnOrder(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRtnCapital(CFutureRtnCapitalField *pRtnCapital, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRtnCapital)
{
data["ClientNo"] = toUtf(pRtnCapital->ClientNo);
data["AccountNo"] = toUtf(pRtnCapital->AccountNo);
data["CurrencyNo"] = toUtf(pRtnCapital->CurrencyNo);
data["Available"] = pRtnCapital->Available;
data["YAvailable"] = pRtnCapital->YAvailable;
data["CanCashOut"] = pRtnCapital->CanCashOut;
data["Money"] = pRtnCapital->Money;
data["ExpiredProfit"] = pRtnCapital->ExpiredProfit;
data["FrozenDeposit"] = pRtnCapital->FrozenDeposit;
data["Fee"] = pRtnCapital->Fee;
data["Deposit"] = pRtnCapital->Deposit;
data["KeepDeposit"] = pRtnCapital->KeepDeposit;
data["Status"] = pRtnCapital->Status;
data["InMoney"] = pRtnCapital->InMoney;
data["OutMoney"] = pRtnCapital->OutMoney;
data["UnexpiredProfit"] = pRtnCapital->UnexpiredProfit;
data["TodayTotal"] = pRtnCapital->TodayTotal;
data["UnaccountProfit"] = pRtnCapital->UnaccountProfit;
data["Royalty"] = pRtnCapital->Royalty;
data["ExchangeNo"] = toUtf(pRtnCapital->ExchangeNo);
data["TreatyCode"] = toUtf(pRtnCapital->TreatyCode);
data["OrderNo"] = toUtf(pRtnCapital->OrderNo);
data["OrderNumber"] = pRtnCapital->OrderNumber;
data["FilledNumber"] = pRtnCapital->FilledNumber;
data["FilledAdvPrice"] = pRtnCapital->FilledAdvPrice;
data["BuyHoldNumber"] = pRtnCapital->BuyHoldNumber;
data["BuyHoldOpenPrice"] = pRtnCapital->BuyHoldOpenPrice;
data["BuyHoldPrice"] = pRtnCapital->BuyHoldPrice;
data["SaleHoldNumber"] = pRtnCapital->SaleHoldNumber;
data["SaleHoldOpenPrice"] = pRtnCapital->SaleHoldOpenPrice;
data["SaleHoldPrice"] = pRtnCapital->SaleHoldPrice;
data["IsCanceled"] = toUtf(pRtnCapital->IsCanceled);
data["FilledTotalFee"] = pRtnCapital->FilledTotalFee;
data["Credit"] = pRtnCapital->Credit;
data["MarginLimit"] = pRtnCapital->MarginLimit;
data["BorrowValue"] = pRtnCapital->BorrowValue;
data["MortgageMoney"] = pRtnCapital->MortgageMoney;
data["T1"] = pRtnCapital->T1;
data["T2"] = pRtnCapital->T2;
data["T3"] = pRtnCapital->T3;
data["TN"] = pRtnCapital->TN;
data["TradeLimit"] = pRtnCapital->TradeLimit;
data["FCrossMax"] = pRtnCapital->FCrossMax;
data["SellFreezenMoney"] = pRtnCapital->SellFreezenMoney;
data["SellInterest"] = pRtnCapital->SellInterest;
data["SellNeedAddMargin"] = pRtnCapital->SellNeedAddMargin;
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRtnCapital(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRtnPosition(CFutureRtnPositionField *pRtnPosition, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRtnPosition)
{
data["LocalOrderNo"] = toUtf(pRtnPosition->LocalOrderNo);
data["ExchangeNo"] = toUtf(pRtnPosition->ExchangeNo);
data["TreatyCode"] = toUtf(pRtnPosition->TreatyCode);
data["OrderNo"] = toUtf(pRtnPosition->OrderNo);
data["OrderNumber"] = pRtnPosition->OrderNumber;
data["FilledNumber"] = pRtnPosition->FilledNumber;
data["FilledAdvPrice"] = pRtnPosition->FilledAdvPrice;
data["BuyHoldNumber"] = pRtnPosition->BuyHoldNumber;
data["BuyHoldOpenPrice"] = pRtnPosition->BuyHoldOpenPrice;
data["BuyHoldPrice"] = pRtnPosition->BuyHoldPrice;
data["SaleHoldNumber"] = pRtnPosition->SaleHoldNumber;
data["SaleHoldOpenPrice"] = pRtnPosition->SaleHoldOpenPrice;
data["SaleHoldPrice"] = pRtnPosition->SaleHoldPrice;
data["IsCanceled"] = toUtf(pRtnPosition->IsCanceled);
data["FilledTotalFee"] = pRtnPosition->FilledTotalFee;
data["Status"] = pRtnPosition->Status;
data["AccountNo"] = toUtf(pRtnPosition->AccountNo);
data["HoldType"] = toUtf(pRtnPosition->HoldType);
data["HoldMarginBuy"] = pRtnPosition->HoldMarginBuy;
data["HoldMarginSale"] = pRtnPosition->HoldMarginSale;
data["CurrPrice"] = pRtnPosition->CurrPrice;
data["FloatProfit"] = pRtnPosition->FloatProfit;
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRtnPosition(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRspQryOrder(CFutureRspOrderField *pRspOrder, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRspOrder)
{
data["UserId"] = toUtf(pRspOrder->UserId);
data["AccountNo"] = toUtf(pRspOrder->AccountNo);
data["SystemNo"] = toUtf(pRspOrder->SystemNo);
data["LocalNo"] = toUtf(pRspOrder->LocalNo);
data["OrderNo"] = toUtf(pRspOrder->OrderNo);
data["OrigOrderNo"] = toUtf(pRspOrder->OrigOrderNo);
data["OrderMethod"] = toUtf(pRspOrder->OrderMethod);
data["AcceptType"] = toUtf(pRspOrder->AcceptType);
data["ExchangeCode"] = toUtf(pRspOrder->ExchangeCode);
data["TreatyCode"] = toUtf(pRspOrder->TreatyCode);
data["BuySale"] = toUtf(pRspOrder->BuySale);
data["OrderNumber"] = toUtf(pRspOrder->OrderNumber);
data["OrderPrice"] = toUtf(pRspOrder->OrderPrice);
data["FilledNumber"] = toUtf(pRspOrder->FilledNumber);
data["FilledPrice"] = toUtf(pRspOrder->FilledPrice);
data["TradeType"] = toUtf(pRspOrder->TradeType);
data["PriceType"] = toUtf(pRspOrder->PriceType);
data["HtsType"] = toUtf(pRspOrder->HtsType);
data["OrderDate"] = toUtf(pRspOrder->OrderDate);
data["OrderTime"] = toUtf(pRspOrder->OrderTime);
data["ErrorCode"] = toUtf(pRspOrder->ErrorCode);
data["OrderState"] = toUtf(pRspOrder->OrderState);
data["IsRiskOrder"] = toUtf(pRspOrder->IsRiskOrder);
data["CancelUserId"] = toUtf(pRspOrder->CancelUserId);
data["TriggerPrice"] = toUtf(pRspOrder->TriggerPrice);
data["ValidDate"] = toUtf(pRspOrder->ValidDate);
data["AddReduce"] = toUtf(pRspOrder->AddReduce);
data["StrategyId"] = toUtf(pRspOrder->StrategyId);
data["MaxShow"] = toUtf(pRspOrder->MaxShow);
data["MinQty"] = toUtf(pRspOrder->MinQty);
data["ExchangeTime"] = toUtf(pRspOrder->ExchangeTime);
data["CancelTime"] = toUtf(pRspOrder->CancelTime);
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspQryOrder(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRspQryTrade(CFutureRspTradeField *pRspTrade, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRspTrade)
{
data["UserId"] = toUtf(pRspTrade->UserId);
data["AccountNo"] = toUtf(pRspTrade->AccountNo);
data["FilledNo"] = toUtf(pRspTrade->FilledNo);
data["OrderNo"] = toUtf(pRspTrade->OrderNo);
data["SystemNo"] = toUtf(pRspTrade->SystemNo);
data["LocalNo"] = toUtf(pRspTrade->LocalNo);
data["ExchangeCode"] = toUtf(pRspTrade->ExchangeCode);
data["TreatyCode"] = toUtf(pRspTrade->TreatyCode);
data["BuySale"] = toUtf(pRspTrade->BuySale);
data["FilledNumber"] = toUtf(pRspTrade->FilledNumber);
data["FilledPrice"] = toUtf(pRspTrade->FilledPrice);
data["FilledDate"] = toUtf(pRspTrade->FilledDate);
data["FilledTime"] = toUtf(pRspTrade->FilledTime);
data["Commsion"] = toUtf(pRspTrade->Commsion);
data["OrderNumber"] = toUtf(pRspTrade->OrderNumber);
data["OrderPrice"] = toUtf(pRspTrade->OrderPrice);
data["DeliveryDate"] = toUtf(pRspTrade->DeliveryDate);
data["FilledType"] = toUtf(pRspTrade->FilledType);
data["OrderType"] = toUtf(pRspTrade->OrderType);
data["ValidDate"] = toUtf(pRspTrade->ValidDate);
data["AddReduce"] = toUtf(pRspTrade->AddReduce);
data["ErrorDescription"] = toUtf(pRspTrade->ErrorDescription);
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspQryTrade(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRspQryCapital(CFutureRspCapitalField *pRspCapital, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRspCapital)
{
data["UserId"] = toUtf(pRspCapital->UserId);
data["InMoney"] = toUtf(pRspCapital->InMoney);
data["OutMoney"] = toUtf(pRspCapital->OutMoney);
data["TodayCanUse"] = toUtf(pRspCapital->TodayCanUse);
data["TodayAmount"] = toUtf(pRspCapital->TodayAmount);
data["TodayBalance"] = toUtf(pRspCapital->TodayBalance);
data["FreezenMoney"] = toUtf(pRspCapital->FreezenMoney);
data["Commission"] = toUtf(pRspCapital->Commission);
data["Margin"] = toUtf(pRspCapital->Margin);
data["OldCanUse"] = toUtf(pRspCapital->OldCanUse);
data["OldAmount"] = toUtf(pRspCapital->OldAmount);
data["OldBalance"] = toUtf(pRspCapital->OldBalance);
data["FloatingProfit"] = toUtf(pRspCapital->FloatingProfit);
data["CurrencyNo"] = toUtf(pRspCapital->CurrencyNo);
data["CurrencyRate"] = pRspCapital->CurrencyRate;
data["UnexpiredProfit"] = pRspCapital->UnexpiredProfit;
data["UnaccountProfit"] = pRspCapital->UnaccountProfit;
data["KeepDeposit"] = pRspCapital->KeepDeposit;
data["Royalty"] = pRspCapital->Royalty;
data["Credit"] = pRspCapital->Credit;
data["AddCapital"] = pRspCapital->AddCapital;
data["IniEquity"] = pRspCapital->IniEquity;
data["AccountNo"] = toUtf(pRspCapital->AccountNo);
data["MortgageMoney"] = pRspCapital->MortgageMoney;
data["MarginLimit"] = pRspCapital->MarginLimit;
data["BorrowValue"] = pRspCapital->BorrowValue;
data["T1"] = pRspCapital->T1;
data["T2"] = pRspCapital->T2;
data["T3"] = pRspCapital->T3;
data["TN"] = pRspCapital->TN;
data["TradeLimit"] = pRspCapital->TradeLimit;
data["CanCashOut"] = pRspCapital->CanCashOut;
data["AccruedCrInt"] = pRspCapital->AccruedCrInt;
data["AccruedDrInt"] = pRspCapital->AccruedDrInt;
data["CrossMax"] = pRspCapital->CrossMax;
data["SellFreezenMoney"] = pRspCapital->SellFreezenMoney;
data["SellInterest"] = pRspCapital->SellInterest;
data["SellNeedAddMargin"] = pRspCapital->SellNeedAddMargin;
data["NetProfit"] = toUtf(pRspCapital->NetProfit);
data["ProfitRate"] = toUtf(pRspCapital->ProfitRate);
data["RiskRate"] = toUtf(pRspCapital->RiskRate);
data["ErrorDescription"] = toUtf(pRspCapital->ErrorDescription);
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspQryCapital(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRspQryVersion(CFutureRspVersionField *pRspVersion, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRspVersion)
{
data["Version"] = toUtf(pRspVersion->Version);
data["MustUpdate"] = toUtf(pRspVersion->MustUpdate);
data["MustVersion"] = toUtf(pRspVersion->MustVersion);
data["VersionContent_CN"] = toUtf(pRspVersion->VersionContent_CN);
data["VersionContent_US"] = toUtf(pRspVersion->VersionContent_US);
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspQryVersion(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRspQryPosition(CFutureRspPositionField *pRspPosition, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRspPosition)
{
data["MatchDate"] = toUtf(pRspPosition->MatchDate);
data["MatchNo"] = toUtf(pRspPosition->MatchNo);
data["ClientNo"] = toUtf(pRspPosition->ClientNo);
data["ExchangeNo"] = toUtf(pRspPosition->ExchangeNo);
data["CommodityNo"] = toUtf(pRspPosition->CommodityNo);
data["ContractNo"] = toUtf(pRspPosition->ContractNo);
data["Direct"] = toUtf(pRspPosition->Direct);
data["HoldVol"] = pRspPosition->HoldVol;
data["HoldPrice"] = pRspPosition->HoldPrice;
data["CurrencyNo"] = toUtf(pRspPosition->CurrencyNo);
data["ForciblyPrice"] = pRspPosition->ForciblyPrice;
data["Account"] = toUtf(pRspPosition->Account);
data["HoldType"] = toUtf(pRspPosition->HoldType);
data["DeliveryDate"] = toUtf(pRspPosition->DeliveryDate);
data["ExchangeName"] = toUtf(pRspPosition->ExchangeName);
data["CurrencyName"] = toUtf(pRspPosition->CurrencyName);
data["ContCode"] = toUtf(pRspPosition->ContCode);
data["HoldMargin"] = pRspPosition->HoldMargin;
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspQryPosition(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRspQryCurrency(CFutureRspCurrencyField *pRspCurrency, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRspCurrency)
{
data["CurrencyNo"] = toUtf(pRspCurrency->CurrencyNo);
data["IsBase"] = pRspCurrency->IsBase;
data["ChangeRate"] = pRspCurrency->ChangeRate;
data["CurrencyName"] = toUtf(pRspCurrency->CurrencyName);
data["CurrencyNameEN"] = toUtf(pRspCurrency->CurrencyNameEN);
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspQryCurrency(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRspQryExchange(CFutureRspExchangeField *pRspExchange, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRspExchange)
{
data["ExchangeNo"] = toUtf(pRspExchange->ExchangeNo);
data["ExchangeName"] = toUtf(pRspExchange->ExchangeName);
data["SettleType"] = toUtf(pRspExchange->SettleType);
data["NameEN"] = toUtf(pRspExchange->NameEN);
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspQryExchange(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRspQryStrategy(CFutureRspStrategyField *pRspStrategy, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRspStrategy)
{
data["UserId"] = toUtf(pRspStrategy->UserId);
data["KeyId"] = toUtf(pRspStrategy->KeyId);
data["Name"] = toUtf(pRspStrategy->Name);
data["Code"] = toUtf(pRspStrategy->Code);
data["PriceType"] = pRspStrategy->PriceType;
data["PriceTypeDetailType"] = pRspStrategy->PriceTypeDetailType;
data["PriceFormula"] = toUtf(pRspStrategy->PriceFormula);
data["TriggerMethod"] = pRspStrategy->TriggerMethod;
data["InnerProtect"] = pRspStrategy->InnerProtect;
data["PassiveFailCloseMainLeg"] = pRspStrategy->PassiveFailCloseMainLeg;
data["SlipPoint"] = pRspStrategy->SlipPoint;
data["RecoverPriceMethod"] = pRspStrategy->RecoverPriceMethod;
data["RecoverPriceSeconds"] = pRspStrategy->RecoverPriceSeconds;
data["SetType"] = toUtf(pRspStrategy->SetType);
data["MinChangePrice"] = pRspStrategy->MinChangePrice;
data["MaxNum"] = pRspStrategy->MaxNum;
data["SuportQuantity"] = pRspStrategy->SuportQuantity;
data["SafeDeep"] = pRspStrategy->SafeDeep;
data["MainRange"] = pRspStrategy->MainRange;
data["ManualZhuiDanBeyondNum"] = toUtf(pRspStrategy->ManualZhuiDanBeyondNum);
data["ManualPingZhuDongBeyondNum"] = toUtf(pRspStrategy->ManualPingZhuDongBeyondNum);
data["AutoGuaDanSeconds"] = pRspStrategy->AutoGuaDanSeconds;
data["AutoZhuiBeiDongDots"] = pRspStrategy->AutoZhuiBeiDongDots;
data["AutoPingZhuDongDots"] = pRspStrategy->AutoPingZhuDongDots;
data["AutoZhiSunDot"] = pRspStrategy->AutoZhiSunDot;
data["AutoZhiSunZhuiBeiDongDots"] = pRspStrategy->AutoZhiSunZhuiBeiDongDots;
data["AutoZhiSunPingZhuDongDots"] = pRspStrategy->AutoZhiSunPingZhuDongDots;
data["DotLen"] = pRspStrategy->DotLen;
data["TradeTime"] = toUtf(pRspStrategy->TradeTime);
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspQryStrategy(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRspQryCommodity(CFutureRspCommodityField *pRspCommodity, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRspCommodity)
{
data["CommodityNo"] = toUtf(pRspCommodity->CommodityNo);
data["ExchangeNo"] = toUtf(pRspCommodity->ExchangeNo);
data["CommodityType"] = toUtf(pRspCommodity->CommodityType);
data["Name"] = toUtf(pRspCommodity->Name);
data["Enabled"] = toUtf(pRspCommodity->Enabled);
data["RegDate"] = toUtf(pRspCommodity->RegDate);
data["CurrencyNo"] = toUtf(pRspCommodity->CurrencyNo);
data["ProductDot"] = pRspCommodity->ProductDot;
data["LowerTick"] = pRspCommodity->LowerTick;
data["UpperTick"] = pRspCommodity->UpperTick;
data["DotNum"] = pRspCommodity->DotNum;
data["StrikeCommodityId"] = pRspCommodity->StrikeCommodityId;
data["OptionStyle"] = toUtf(pRspCommodity->OptionStyle);
data["ExchangeNo2"] = toUtf(pRspCommodity->ExchangeNo2);
data["IsSFuture"] = toUtf(pRspCommodity->IsSFuture);
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspQryCommodity(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRspQryInstrument(CFutureRspInstrumentField *pRspInstrument, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRspInstrument)
{
data["CommodityCode"] = toUtf(pRspInstrument->CommodityCode);
data["ExchangeNo"] = toUtf(pRspInstrument->ExchangeNo);
data["ContractNo"] = toUtf(pRspInstrument->ContractNo);
data["ContractFName"] = toUtf(pRspInstrument->ContractFName);
data["CommodityNo"] = toUtf(pRspInstrument->CommodityNo);
data["CommodityFName"] = toUtf(pRspInstrument->CommodityFName);
data["CommodityType"] = toUtf(pRspInstrument->CommodityType);
data["CommodityFCurrencyNo"] = toUtf(pRspInstrument->CommodityFCurrencyNo);
data["CurrencyFName"] = toUtf(pRspInstrument->CurrencyFName);
data["ProductDot"] = pRspInstrument->ProductDot;
data["UpperTick"] = pRspInstrument->UpperTick;
data["ExchangeName"] = toUtf(pRspInstrument->ExchangeName);
data["LastSettlePrice"] = pRspInstrument->LastSettlePrice;
data["TradeMonth"] = toUtf(pRspInstrument->TradeMonth);
data["DotNum"] = pRspInstrument->DotNum;
data["LowerTick"] = pRspInstrument->LowerTick;
data["DotNumCarry"] = pRspInstrument->DotNumCarry;
data["UpperTickCarry"] = pRspInstrument->UpperTickCarry;
data["FirstNoticeDay"] = toUtf(pRspInstrument->FirstNoticeDay);
data["FreezenPercent"] = pRspInstrument->FreezenPercent;
data["FreezenMoney"] = pRspInstrument->FreezenMoney;
data["FeeMoney"] = pRspInstrument->FeeMoney;
data["FeePercent"] = pRspInstrument->FeePercent;
data["PriceStrike"] = pRspInstrument->PriceStrike;
data["ProductDotStrike"] = pRspInstrument->ProductDotStrike;
data["UpperTickStrike"] = pRspInstrument->UpperTickStrike;
data["LastTradeDay"] = toUtf(pRspInstrument->LastTradeDay);
data["LastUpdateDay"] = toUtf(pRspInstrument->LastUpdateDay);
data["CriticalPrice"] = pRspInstrument->CriticalPrice;
data["CriticalMinChangedPrice"] = pRspInstrument->CriticalMinChangedPrice;
data["ExchangeSub"] = toUtf(pRspInstrument->ExchangeSub);
data["OptionType"] = toUtf(pRspInstrument->OptionType);
data["OptionMonth"] = toUtf(pRspInstrument->OptionMonth);
data["OptionStrikePrice"] = toUtf(pRspInstrument->OptionStrikePrice);
data["OptionCommodityNo"] = toUtf(pRspInstrument->OptionCommodityNo);
data["OptionContractNo"] = toUtf(pRspInstrument->OptionContractNo);
data["ContractFNameEN"] = toUtf(pRspInstrument->ContractFNameEN);
data["CommodityFNameEN"] = toUtf(pRspInstrument->CommodityFNameEN);
data["OptionStyle"] = toUtf(pRspInstrument->OptionStyle);
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspQryInstrument(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRspQryExchangeTime(CFutureRspExchangeTimeField *pRspExchangeTime, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRspExchangeTime)
{
data["Year"] = toUtf(pRspExchangeTime->Year);
data["SummerBegin"] = toUtf(pRspExchangeTime->SummerBegin);
data["WinterBegin"] = toUtf(pRspExchangeTime->WinterBegin);
data["ExchangeNo"] = toUtf(pRspExchangeTime->ExchangeNo);
data["Name"] = toUtf(pRspExchangeTime->Name);
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspQryExchangeTime(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRspQryCommodityTime(CFutureRspCommodityTimeField *pRspCommodityTime, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRspCommodityTime)
{
data["CrossTrade"] = toUtf(pRspCommodityTime->CrossTrade);
data["Stage"] = toUtf(pRspCommodityTime->Stage);
data["Summer"] = toUtf(pRspCommodityTime->Summer);
data["Opendate"] = toUtf(pRspCommodityTime->Opendate);
data["Closingdate"] = toUtf(pRspCommodityTime->Closingdate);
data["CommodityNo"] = toUtf(pRspCommodityTime->CommodityNo);
data["ComName"] = toUtf(pRspCommodityTime->ComName);
data["ExchangeNo"] = toUtf(pRspCommodityTime->ExchangeNo);
data["ExName"] = toUtf(pRspCommodityTime->ExName);
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspQryCommodityTime(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRspQryTotalPosition(CFutureRspTotalPositionField *pRspTotalPosition, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRspTotalPosition)
{
data["LocalOrderNo"] = toUtf(pRspTotalPosition->LocalOrderNo);
data["ExchangeNo"] = toUtf(pRspTotalPosition->ExchangeNo);
data["TreatyCode"] = toUtf(pRspTotalPosition->TreatyCode);
data["OrderNo"] = toUtf(pRspTotalPosition->OrderNo);
data["OrderNumber"] = pRspTotalPosition->OrderNumber;
data["FilledNumber"] = pRspTotalPosition->FilledNumber;
data["FilledAdvPrice"] = pRspTotalPosition->FilledAdvPrice;
data["BuyHoldNumber"] = pRspTotalPosition->BuyHoldNumber;
data["BuyHoldOpenPrice"] = pRspTotalPosition->BuyHoldOpenPrice;
data["BuyHoldPrice"] = pRspTotalPosition->BuyHoldPrice;
data["SaleHoldNumber"] = pRspTotalPosition->SaleHoldNumber;
data["SaleHoldOpenPrice"] = pRspTotalPosition->SaleHoldOpenPrice;
data["SaleHoldPrice"] = pRspTotalPosition->SaleHoldPrice;
data["IsCanceled"] = toUtf(pRspTotalPosition->IsCanceled);
data["FilledTotalFee"] = pRspTotalPosition->FilledTotalFee;
data["Status"] = pRspTotalPosition->Status;
data["AccountNo"] = toUtf(pRspTotalPosition->AccountNo);
data["HoldType"] = toUtf(pRspTotalPosition->HoldType);
data["HoldMarginBuy"] = pRspTotalPosition->HoldMarginBuy;
data["HoldMarginSale"] = pRspTotalPosition->HoldMarginSale;
data["CurrPrice"] = pRspTotalPosition->CurrPrice;
data["FloatProfit"] = pRspTotalPosition->FloatProfit;
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspQryTotalPosition(data, error, iRequestID, bIsLast);
};
void FutureApi::OnRspQryStrategyDetail(CFutureRspStrategyDetailField *pRspStrategyDetail, CFutureRspInfoField *pRspInfo, int iRequestID, bool bIsLast)
{
gil_scoped_acquire acquire;
dict data;
if (pRspStrategyDetail)
{
data["StartegyCommodityNo"] = toUtf(pRspStrategyDetail->StartegyCommodityNo);
data["StartegyContractNo"] = toUtf(pRspStrategyDetail->StartegyContractNo);
data["Price"] = toUtf(pRspStrategyDetail->Price);
data["LegNum"] = pRspStrategyDetail->LegNum;
data["LastTradeDate"] = toUtf(pRspStrategyDetail->LastTradeDate);
data["SeqId"] = pRspStrategyDetail->SeqId;
data["CommodityNo"] = toUtf(pRspStrategyDetail->CommodityNo);
data["ContractNo"] = toUtf(pRspStrategyDetail->ContractNo);
data["Direct"] = toUtf(pRspStrategyDetail->Direct);
data["Quantity"] = pRspStrategyDetail->Quantity;
data["Model"] = toUtf(pRspStrategyDetail->Model);
data["ModifyDate"] = toUtf(pRspStrategyDetail->ModifyDate);
data["OrderMethod"] = toUtf(pRspStrategyDetail->OrderMethod);
data["PriceTolerance"] = pRspStrategyDetail->PriceTolerance;
data["PriceParam"] = pRspStrategyDetail->PriceParam;
data["SuportQuantity"] = pRspStrategyDetail->SuportQuantity;
data["MinMove"] = pRspStrategyDetail->MinMove;
data["TimerOrder"] = pRspStrategyDetail->TimerOrder;
data["TimerOrderBeyondNum"] = toUtf(pRspStrategyDetail->TimerOrderBeyondNum);
data["TimerOrderPrice"] = pRspStrategyDetail->TimerOrderPrice;
data["TimerOrderPriceBeyondNum"] = toUtf(pRspStrategyDetail->TimerOrderPriceBeyondNum);
data["TimerOrderPriceTriggerNum"] = toUtf(pRspStrategyDetail->TimerOrderPriceTriggerNum);
data["ZhiSunOrder"] = pRspStrategyDetail->ZhiSunOrder;
data["ZhiSunOrderBeyondNum"] = toUtf(pRspStrategyDetail->ZhiSunOrderBeyondNum);
data["TimerPingCang"] = pRspStrategyDetail->TimerPingCang;
data["TimerPingCangBeyondNum"] = toUtf(pRspStrategyDetail->TimerPingCangBeyondNum);
data["SafeDeep"] = pRspStrategyDetail->SafeDeep;
data["MainRange"] = pRspStrategyDetail->MainRange;
}
dict error;
if (pRspInfo)
{
error["ErrorID"] = pRspInfo->ErrorID;
error["ErrorMsg"] = toUtf(pRspInfo->ErrorMsg);
}
this->onRspQryStrategyDetail(data, error, iRequestID, bIsLast);
};
| C++ | 4 | funrunskypalace/vnpy | vnpy/api/da/generator/da_future_source_task.cpp | [
"MIT"
] |
# TODO: Translation updated at 2022-01-11 21:45
translate english strings:
# game/scripts/click_to_continue.rpy:14
old "Click to continue"
new "Click to continue"
| Ren'Py | 3 | googlebleh/LearnToCodeRPG | game/tl/english/scripts/click_to_continue.rpy | [
"BSD-3-Clause"
] |
FORMAT: 1A
HOST: http://127.0.0.1:8111
# proxy_list Web API
默认只对本地 127.0.0.1 IP 开放服务,默认端口为 8111。
只提供两个接口,代理的获取和删除。
# Group API
## 获取代理 [GET /proxy{?count,anonymity,protocol}]
+ Parameters
+ count: `1` (number, optional) - 获取的代理数量,默认为 1,非必填项。
+ anonymity: transparent (enum[string], optional)
你想要获取代理的类型,透明或匿名,枚举类型,非必填项。
* transparent: 透明代理
* anonymous: 匿名代理
+ Members
+ transparent
+ anonymous
+ protocol: http (enum[string], optional)
代理协议,枚举类型,非必填项。
* http: http 协议
* https: https 协议
+ Members
+ http
+ https
+ Response 200 (application/json)
+ Body
[
[
"124.207.126.5",
"3128"
]
]
## 删除代理 [GET /proxy/delete{?ip,port,protocol}]
+ Parameters
+ ip: 124.207.126.5 (string,required) - 要删除的 IP,必填。
+ port: 3128 (string,optional) - 端口,非必填。
+ protocol: http (string,optional) - 协议,非必填。
+ Response 204
| API Blueprint | 3 | Leader0721/ManyIP | doc/web_api.apib | [
"MIT"
] |
include("abe.nut");
function on_init_map(playerMapObj, map, xpos, ypos)
{
log_info("on_init_map for map creating player object map is " + map);
local player = Abe(playerMapObj, map);
playerMapObj.SetScriptInstance(player);
player.mBase.mXPos = xpos;
player.mBase.mYPos = ypos;
// TODO: Tell camera to follow the player
return true;
}
| Squirrel | 3 | mouzedrift/alive | data/scripts/map.nut | [
"MIT"
] |
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract ERC165MissingData {
function supportsInterface(bytes4 interfaceId) public view {} // missing return
}
| Solidity | 2 | oznfc/openzeppelin-contracts | contracts/mocks/ERC165/ERC165MissingData.sol | [
"MIT"
] |
module.exports (terms) = terms.term {
constructor (items) =
self.isRange = true
self.items = items
self.inList = false
self.range = terms.moduleConstants.define ['range'] as (
terms.javascript (
'function (a, b) {
var items = [];
for (var n = a; n <= b; n++) {
items.push(n);
}
return items;
}'
)
)
generate (scope) =
if (self.inList)
terms.functionCall (self.range, self.items).generate (scope)
else
terms.errors.addTerm (self) withMessage 'range operator can only be used in a list, as in [1..3]'.generate (scope)
}
| PogoScript | 3 | Sotrek/Alexa | Alexa_Cookbook/Workshop/StatePop/4_IOT/tests/node_modules/aws-sdk/node_modules/cucumber/node_modules/pogo/lib/terms/range.pogo | [
"MIT"
] |
# Copyright (c) 2018-2021, Carnegie Mellon University
# See LICENSE for details
Declare(GT);
Declare(ListProduct);
ListProduct := function(l)
local prod, i;
if Length(l) <=0 then return 0; fi;
prod := 1;
for i in l do
prod := prod * i;
od;
return(prod);
end;
GTVec := XChain([0,1]);
GTPar := XChain([1,0]);
TTensorI_GT := function(gt)
local spl, g, s, v, tags;
[spl,g,s,v] := gt.params;
tags := gt.getTags();
Constraint(IsList(v) and Length(v)=1 and IsPosInt(v[1]));
g := When(g=XChain([0,1]), AVec, APar);
s := When(s=XChain([0,1]), AVec, APar);
return TTensorI(spl, v[1], s, g).withTags(tags);
end;
GT_TTensorI := function(tt)
local spl, g, s, v, tags;
[spl,v,s,g] := tt.params;
tags := tt.getTags();
g := When(g=AVec, GTVec, GTPar);
s := When(s=AVec, GTVec, GTPar);
return GT(spl, g, s, [v]).withTags(tags);
end;
IsGT := x -> IsRec(x) and IsBound(x.isGT) and x.isGT;
Class(GTBase, rec(
isGT := true,
freeTags := self >> Filtered(self.tags, x -> not x.isSticky),
stickyTags := self >> Filtered(self.tags, x -> x.isSticky),
stickyRank := self >> Length(self.stickyTags()),
freeRank := self >> self.rank() - self.stickyRank(),
freeLoops := self >> [self.stickyRank()+1 .. self.rank()],
transposedTags := self >> List(self.tags, x->x.transpose()),
getSpl := self >> self.params[1],
setSpl := (self, spl) >> ApplyFunc(ObjId(self), Concatenation([spl], Drop(self.params, 1)))
.withTags(self.tags),
# need setIts(its) and getIts()
_fmanip := meth(self, func_manip, gt_manip, newits)
local cpy, z;
cpy := Copy(self);
z := SubstTopDownNR_named(cpy, @.cond(x -> (not Same(x, cpy) and IsGT(x)) or IsFunction(x) or IsFuncExp(x) or ObjId(x)=ind),
e -> When(IsGT(e), gt_manip(e), func_manip(e)), "__GT._fmanip");
return z.setIts(newits);
end,
bodyRank := self >> Maximum( [0] ::
List(Collect(self.getSpl(), @.cond(e->IsFunction(e) or IsFuncExp(e))), _rank)),
downRankFull := (self, inds) >> let(thisrank := self.rank(),
self._fmanip(f -> f.downRankFull(inds),
e -> Cond(e.bodyRank()=0, e, Error(".downRankFull does not work with nested GTs")),
[])),
downRank := (self, loopid, ind) >>
self._fmanip(f -> f.downRank(loopid, ind),
e -> e.downRankOuter(loopid + e.rank(), ind),
ListWithout(self.getIts(), loopid)),
# downRankOuter: notification that downRank performed on some outer GT,
# so that this GT can update its functions and notify children.
downRankOuter := (self, loopid, ind) >>
self._fmanip(f -> f.downRank(loopid + self.rank(), ind),
e -> e.downRankOuter(loopid + e.rank(), ind),
self.getIts()),
rotate := (self, n) >> When(n=1, self, let(
its := self.getIts(),
tags := self.getTags(), stags := self.stickyTags(), ftags := self.freeTags(),
res := self._fmanip(
f -> f.rotate(n),
e -> Cond(e.bodyRank() <= e.rank(), e,
Error(".rotate() doesn't support nested GTs where inner GTs depend on outer indices")),
[its[n]] :: its{[1..n-1]} :: its{[n+1..Length(its)]}),
Cond(self.stickyRank() = 0,
res,
n <= self.stickyRank(),
res.setTags( ftags :: [stags[n]] :: stags{[1..n-1]} :: stags{[n+1..Length(stags)]}),
# else, n > self.stickyRank(),
Error("Can't make non-sticky rank <n> an inner loop, because sticky tags exist")
# it could look like this instead: res.setTags( [ANoTag] :: tags )
))),
rotateIntoSticky := (self, n, newtag) >> let(
its := self.getIts(),
tags := self.getTags(), stags := self.stickyTags(), ftags := self.freeTags(),
res := self._fmanip(
f -> f.rotate(n),
e -> Cond(e.bodyRank() <= e.rank(), e,
Error(".rotate() doesn't support nested GTs where inner GTs depend on outer indices")),
[its[n]] :: its{[1..n-1]} :: its{[n+1..Length(its)]}),
Cond(self.stickyRank() = 0,
res.setTags(tags :: [newtag]),
n <= self.stickyRank(),
res.setTags( ftags :: [newtag] :: stags{[1..n-1]} :: stags{[n+1..Length(stags)]}),
# else, n > self.stickyRank(),
res.setTags( ftags :: [newtag] :: stags )
)),
# NOTE: upRank() leaves GT in inconsistent state, because sticky tags still need to be shifted
upRank := self >> self._fmanip(
f -> f.upRank(),
e -> Cond(e.bodyRank() <= e.rank(), e,
Error(".upRank() doesn't support nested GTs where inner GTs depend on outer indices")),
Concatenation([0], self.getIts())),
# NOTE: upRank() leaves GT in inconsistent state, because sticky tags still need to be shifted
upRankBy := (self, n) >> self._fmanip(
f -> f.upRankBy(n),
e -> Cond(e.bodyRank() <= e.rank(), e,
Error(".upRankBy() doesn't support nested GTs where inner GTs depend on outer indices")),
Concatenation(Replicate(n, 0), self.getIts())),
split := (self, loopid, inner_its, outer_its) >> let(its := self.getIts(),
self._fmanip(
f -> f.split(loopid, inner_its, outer_its),
e -> e.splitOuter(loopid + e.rank(), inner_its, outer_its),
Concatenation(its{[1..loopid-1]}, [inner_its, outer_its], its{[loopid+1..Length(its)]}))),
# splitOuter: notification that some outer GT is splitting loop,
# so that this GT can update its functions and notify children.
splitOuter := (self, loopid, inner_its, outer_its) >> let(its := self.getIts(),
self._fmanip(
f -> f.split(loopid + self.rank(), inner_its, outer_its),
e -> e.splitOuter(loopid + e.rank(), inner_its, outer_its),
its)),
getGath := self >> Error("Must be implemented in a subclass"),
getScat := self >> Error("Must be implemented in a subclass"),
isReal := self >> self.params[1].isReal(),
toAMat := self >> self.toSpl().toAMat(),
# when self.getIts() returns empty list it actually means single iteration,
# that's why [1] appended to the list
normalizedArithCost := self >> self.getSpl().normalizedArithCost() * ListProduct(self.getIts() :: [1]),
children := self >> [self.params[1]],
child := (self, n) >> Checked( n = 1, self.params[1] ),
# overrideing withTags() to make sure non-sticky/sticky tags order is preserved
# returns a copy of the object with 'tags' added on to any existing tags.
withTags := (self, tags) >> self.setTags(Flat(TransposedMat(
List([self.tags, tags], t -> SplitBy(t, e -> not e.isSticky))))),
));
# GT(<spl>, <gath>, <scat>, <v>) - generalized problem spec
#
# NOTE: assumes tightly packed data, i.e. Dims(GT(spl)) = Dims(spl) * Product(v)
# (if gath/scat functions have domain&range == 0)
Class(GT, GTBase, Tagged_tSPL, rec(
abbrevs := [
(spl, gath, scat, v) -> Checked(
IsSPL(spl), IsIndexMapping(gath), IsIndexMapping(scat), IsList(v),
ForAll(v, IsPosInt0Sym),
[spl, gath, scat, v]
) ],
dims := self >> let(p := self.params, r := range(p[3]), c := range(p[2]), d := p[1].dims(),
When(r<>0 and c<>0,
[r, c],
let(prod := Product(p[4]), [d[1]*prod, d[2]*prod]))), # NOTE: assumes XChain.
advdims := self >> let(p := self.params, [p[3].advrange(), p[2].advrange()]),
getIts := self >> self.params[4],
setIts := (self,its) >> ObjId(self)(self.params[1], self.params[2], self.params[3], its).withTags(self.tags),
getGath := self >> self.params[2],
getScat := self >> self.params[3],
rank := self >> Length(self.params[4]),
_scat := Scat,
_gath := Gath,
# NOTE: toSpl doesn't work with nested GTs. It should use downRank method for function manipulations
toSpl := self >> self.toSplCx([]),
toSplCx := (self, outer_inds) >> let(
p := self.params, spl := Copy(p[1]), g := Copy(p[2]), s := Copy(p[3]), dims := p[4],
inds := List(dims, Ind), allinds := Concatenation(inds, outer_inds),
kernel := self._scat(s.toSpl(allinds, Rows(spl))) * spl * self._gath(g.toSpl(allinds, Cols(spl))),
kerneld := Cond(inds=[], kernel, # downRank only if not rank-0
SubstTopDownNR(kernel, @.cond(e->IsFunction(e) or IsFuncExp(e)), e->e.downRankFull(allinds))),
FoldL(inds, (ker, idx) -> ISum(idx.setAttr("GT"), ker), kerneld)
),
toISums := self >> let(
inds := List(self.getIts(), Ind),
kernel := self._scat(self.getScat()) * self.params[1] * self._gath(self.getGath()),
FoldL(inds, (ker, idx) -> ISum(idx.setAttr("GT"), ker), kernel)
),
transpose := self >> let(p:=self.params,
GT(p[1].transpose(), p[3], p[2], p[4]).withTags(self.transposedTags())),
conjTranspose := self >> let(p:=self.params,
GT(p[1].conjTranspose(), p[3], p[2], p[4]).withTags(self.transposedTags())),
hashAs := self >> let(p:=self.params,
ObjId(self)(HashAsSPL(p[1]), p[2], p[3], p[4]).withTags(self.tags)),
));
Declare(GTAccT, GTAcc0T);
# GTAcc(<spl>, <gath>, <scat>, <v>) - generalized problem spec with accumulation on output side
#
Class(GTAcc, GT, rec(
transpose := self >> let(p:=self.params,
GTAccT(p[1].transpose(), p[3], p[2], p[4]).withTags(self.transposedTags())),
_scat := ScatAcc
));
Class(GTAcc0, GT, rec(
transpose := self >> let(p:=self.params,
GTAcc0T(p[1].transpose(), p[3], p[2], p[4]).withTags(self.transposedTags())),
_scat := ScatAcc,
toSplCx := (self, outer_inds) >> Checked(self.rank()=1, let( # NOTE: works only for rank-1
dims := self.getIts(),
inds0 := Concatenation(List(DropLast(dims,1), Ind), [0]),
inds := Concatenation(List(DropLast(dims,1), Ind), [Ind(Last(dims)-1)]),
inds_shft := Concatenation(DropLast(inds,1), [Last(inds)+1]),
dr0 := self.downRankFull(Concatenation(inds0, outer_inds)),
dr := self.downRankFull(Concatenation(inds_shft, outer_inds)),
kernel0 := Scat(dr0.getScat()) * dr0.params[1] * self._gath(dr0.getGath()),
kernel := ScatAcc(dr.getScat()) * dr .params[1] * self._gath(dr .getGath()),
When(Last(dims)=1,
kernel0,
SUM(kernel0, FoldL(inds, (ker, idx) -> ISum(idx.setAttr("GT"), ker), kernel))))
),
));
# GTAccT == GTAcc.transpose(), even though semantically GTAccT == GT, we need a separate object, so that
# GTAccT.transpose() is back to GTAcc itself.
Class(GTAccT, GT, rec(
transpose := self >> let(p:=self.params,
GTAcc(p[1].transpose(), p[3], p[2], p[4]).withTags(self.transposedTags())),
));
Class(GTAcc0T, GT, rec(
transpose := self >> let(p:=self.params,
GTAcc0(p[1].transpose(), p[3], p[2], p[4]).withTags(self.transposedTags())),
));
Declare(GTInplace);
Class(GTInplace, GTBase, Tagged_tSPL, rec(
abbrevs := [ (spl, gathscat, v) -> Checked(
IsSPL(spl), IsIndexMapping(gathscat), IsList(v), ForAll(v, IsPosInt0Sym),
[spl, gathscat, v]) ],
dims := self >> let(p := self.params, rc := range(p[2]), d := p[1].dims(),
When(rc<>0,
[rc, rc],
let(prod:=Product(p[3]), [d[1]*prod, d[2]*prod]))), # NOTE: assumes XChain.
getIts := self >> self.params[3],
setIts := (self,its) >> GTInplace(self.params[1], self.params[2], its).withTags(self.tags),
getGath := self >> self.params[2],
getScat := self >> self.params[2],
rank := self >> Length(self.params[3]),
toGT := self >> let(p:=self.params, GT(p[1], p[2], p[2], p[3]).withTags(self.tags)),
toNonInplace := self >> self.toGT(),
toSpl := self >> Inplace(self.toGT().toSpl()),
isInplace := self >> true,
conjTranspose := self >> let(p:=self.params,
GTInplace(p[1].conjTranspose(), p[2], p[3]).withTags(self.transposedTags())),
transpose := self >> let(p:=self.params,
GTInplace(p[1].transpose(), p[2], p[3]).withTags(self.transposedTags())),
hashAs := self >> let(p:=self.params,
ObjId(self)(HashAsSPL(p[1]), p[2], p[3]).withTags(self.tags))
));
#
# NOTE: what if there is no SUM scatters or gathers
#
Class(GTPS, GTBase, Tagged_tSPL, rec(
abbrevs := [
(spl, fb_cnt, gath, scat, v) -> Checked(
IsSPL(spl), IsPosInt(fb_cnt), IsIndexMapping(gath), IsIndexMapping(scat), IsList(v),
ForAll(v, IsPosInt0Sym),
[spl, fb_cnt, gath, scat, v]
) ],
dims := self >> let( p := self.params, r := range(p[4]), c := range(p[3]),
d := p[1].dims(),
[ StripList(Flat([d[1]]){[1..p[2]]} :: Flat([r])),
StripList(Flat([d[2]]){[1..p[2]]} :: Flat([c])) ]),
advdims := self >> let(p := self.params, r := p[4].advrange(), c := p[3].advrange(),
d := p[1].advdims(),
[ StripList(Flat([d[1]]){[1..p[2]]} :: Flat([r])),
StripList(Flat([d[2]]){[1..p[2]]} :: Flat([c])) ]),
getIts := self >> self.params[5],
setIts := (self,its) >> ObjId(self)(self.params[1], self.params[2], self.params[3], self.params[4], its).withTags(self.tags),
getGath := self >> fCross(List(Flat([self.params[1].advdims()[1]]){[1..self.params[2]]}, e -> fId(e)) :: [self.params[3]]),
getScat := self >> fCross(List(Flat([self.params[1].advdims()[2]]){[1..self.params[2]]}, e -> fId(e)) :: [self.params[4]]),
rank := self >> Length(self.params[5]),
toSpl := self >> let(
inds := List(self.params[5], Ind),
kernel := FoldR([1..self.rank()], (ker, i) -> ker.downRank(i, inds[i]), Copy(self)),
spl := Scat(kernel.getScat()) * kernel.child(1) * Gath(kernel.getGath()),
FoldL(inds, (ker, idx) -> IParSeq(idx.setAttr("GT"), kernel.params[2], ker), spl)),
hashAs := self >> let(p:=self.params,
ObjId(self)(HashAsSPL(p[1]), p[2], p[3], p[4], p[5]).withTags(self.tags)),
));
# Useful identities:
#
# Tr(m,n) = GT(I(m), XChain([0,1]), XChain([1,0]), [n]) =
# GT(I(n), XChain([1,0]), XChain([0,1]), [m]) = L(m*n, n)
GT_Tr1 := (m,n) -> GT(I(m), XChain([0,1]), XChain([1,0]), [n]);
GT_Tr2 := (m,n) -> GT(I(n), XChain([1,0]), XChain([0,1]), [m]);
GT_Tr1u := (m,n,u) -> let(uu:=When(m mod u = 0, u, 1),
GT(BB(I(uu)), XChain([1,0,2]), XChain([2,1,0]), [m/uu, n]));
GT_Tr2u := (m,n,u) -> let(uu:=When(n mod u = 0, u, 1),
GT(BB(I(uu)), XChain([2,1,0]), XChain([1,0,2]), [n/uu, m]));
NewRulesFor(GT, rec(
GT_Base := rec(
switch := false,
a := rec(maxSize := false),
# requiredFirstTag := ANoTag,
applicable := (self, t) >> let(rank := Length(t.params[4]), spl := t.params[1],
rank = 0 and (self.a.maxSize=false
or Rows(spl) <= self.a.maxSize or Cols(spl) <= self.a.maxSize)),
freedoms := (self, t) >> [],
child := (t, fr) -> [ t.params[1].withTags(t.getTags()) ],
apply := (t, C, Nonterms) -> let(
g := t.params[2], s := t.params[3],
Scat(s.toSpl([], Rows(C[1]))) * C[1] * Gath(g.toSpl([], Cols(C[1])))
)
),
GT_NthLoop := rec(
requiredFirstTag := [ANoTag, ALimitNthLoop],
applicable := t -> let(rank := Length(t.params[4]), rank > 0),
# restrict to innermost first (i.e. loop interchange)
# to search over loop orders use [1..nloops]
# Limit tag reduces the number of loop interchanges.
# it is useful when you don't want the number of potential
# ruletrees to explode, and you are not overtly concerned
# with having access to all the potential ones.
freedoms := t -> let(
fr := [1..Length(t.params[4])],
When(t.hasTag(ALimitNthLoop),
[[1]],
[fr]
)
),
child := (t, fr) -> let(
spl := t.params[1],
g := t.params[2],
s := t.params[3],
loopid := fr[1],
[
GT(spl, g.without(loopid),
s.without(loopid), ListWithout(t.params[4], loopid)),
InfoNt(loopid)
]
),
apply := (t, C, Nonterms) -> let(
loopid := Nonterms[2].params[1],
dft := Nonterms[1].params[1],
g := t.params[2],
s := t.params[3],
loop_dims := t.params[4],
i := Ind(loop_dims[loopid]),
ISum(i, Scat(s.part(loopid, i, Rows(dft), loop_dims))
* C[1]
* Gath(g.part(loopid, i, Cols(dft), loop_dims)))
)
),
GT_BufReshape := rec(
bufIters := [2, 4, 8, 16, 32],
requiredFirstTag := ANoTag,
applicable := (self, t) >> Length(t.params[4])=1 and let(
N := Minimum(t.params[1].dimensions), its := t.params[4][1],
PatternMatch(t, [GT, @, @(2,XChain), @(3,XChain), ...], empty_cx()) and
(@(2).val.params[1] = [0,1] or @(3).val.params[1] = [0,1]) and
ForAny(self.bufIters, bi -> bi < its and IsInt(its/bi))),
u := [2,4,8,16],
children := (self, t) >> let(
spl := t.params[1], its := t.params[4][1],
bufiters := Filtered(self.bufIters, bi -> (bi < its) and IsInt(its/bi)),
Map2(Cartesian(bufiters, self.u), (bi, u) ->
[ GT(spl, XChain([1,0]), XChain([1,0]), [bi]),
InfoNt(u) ])),
apply := (self, t, C, Nonterms) >> let(
g := t.params[2].params[1], s := t.params[3].params[1],
gg := When(g=[0,1], XChain([0,1,2]), XChain([1,2,0])),
ss := When(s=[0,1], XChain([0,1,2]), XChain([1,2,0])),
spl := t.params[1], its := t.params[4][1], inner := Nonterms[1].params[4][1],
i := Ind(its / inner),
u := When(IsBound(Nonterms[2]), Nonterms[2].params[1], 4),
ISum(i, Scat(ss.part(1, i, Rows(spl), [i.range, inner])) *
When(s=[0,1], GT_Tr2u(inner, Rows(spl), u).toSpl(), I(Rows(spl)*inner)) *
C[1] *
When(g=[0,1], GT_Tr1u(Cols(spl), inner, u).toSpl(), I(Cols(spl)*inner)) *
Gath(gg.part(1, i, Cols(spl), [i.range, inner]))
)
)
)
));
| GAP | 5 | sr7cb/spiral-software | namespaces/spiral/paradigms/common/gt.gi | [
"BSD-2-Clause-FreeBSD"
] |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.spark.sql.execution
import org.apache.spark.sql.QueryTest
import org.apache.spark.sql.execution.adaptive.DisableAdaptiveExecutionSuite
import org.apache.spark.sql.execution.aggregate.HashAggregateExec
import org.apache.spark.sql.expressions.scalalang.typed
import org.apache.spark.sql.test.SharedSparkSession
// Disable AQE because the WholeStageCodegenExec is added when running QueryStageExec
@deprecated("This test suite will be removed.", "3.0.0")
class DeprecatedWholeStageCodegenSuite extends QueryTest
with SharedSparkSession
with DisableAdaptiveExecutionSuite {
test("simple typed UDAF should be included in WholeStageCodegen") {
import testImplicits._
val ds = Seq(("a", 10), ("b", 1), ("b", 2), ("c", 1)).toDS()
.groupByKey(_._1).agg(typed.sum(_._2))
val plan = ds.queryExecution.executedPlan
assert(plan.find(p =>
p.isInstanceOf[WholeStageCodegenExec] &&
p.asInstanceOf[WholeStageCodegenExec].child.isInstanceOf[HashAggregateExec]).isDefined)
assert(ds.collect() === Array(("a", 10.0), ("b", 3.0), ("c", 1.0)))
}
}
| Scala | 4 | OlegPt/spark | sql/core/src/test/scala/org/apache/spark/sql/execution/DeprecatedWholeStageCodegenSuite.scala | [
"Apache-2.0"
] |
# that one is white-listed
[third-party]
clippy-feature = "nightly"
| TOML | 1 | Eric-Arellano/rust | src/tools/clippy/tests/ui-toml/good_toml_no_false_negatives/clippy.toml | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] |
--TEST--
Check that __invoke() works with named parameters
--FILE--
<?php
class Test {
public function __invoke($a = 'a', $b = 'b') {
echo "a: $a, b: $b\n";
}
}
class Test2 {
public function __invoke($a = 'a', $b = 'b', ...$rest) {
echo "a: $a, b: $b\n";
var_dump($rest);
}
}
$test = new Test;
$test(b: 'B', a: 'A');
$test(b: 'B');
try {
$test(b: 'B', c: 'C');
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
echo "\n";
$test2 = new Test2;
$test2(b: 'B', a: 'A', c: 'C');
$test2(b: 'B', c: 'C');
echo "\n";
$test3 = function($a = 'a', $b = 'b') {
echo "a: $a, b: $b\n";
};
$test3(b: 'B', a: 'A');
$test3(b: 'B');
try {
$test3(b: 'B', c: 'C');
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
?>
--EXPECT--
a: A, b: B
a: a, b: B
Unknown named parameter $c
a: A, b: B
array(1) {
["c"]=>
string(1) "C"
}
a: a, b: B
array(1) {
["c"]=>
string(1) "C"
}
a: A, b: B
a: a, b: B
Unknown named parameter $c
| PHP | 4 | NathanFreeman/php-src | Zend/tests/named_params/__invoke.phpt | [
"PHP-3.01"
] |
Assets:Static assets
AssetsOverview:Working with public assets
AssetsCoffeeScript:Using CoffeeScript
AssetsLess:Using LESS CSS
AssetsSass:Using Sass
AssetsJSHint:Using JSHint
RequireJS-support:Using RequireJs | TeX | 2 | eed3si9n/playframework | documentation/manual/working/commonGuide/assets/index.toc | [
"Apache-2.0"
] |
#
# Copyright (c) 2014, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
#
#
enum ReturnCode {
OK = 0,
INVALID_IP,
INVALID_TIMEOUT,
ID_EXHAUST,
NETLINK_ERROR,
UNKNOWN_ERROR,
NETLINK_HTB_ERROR,
UNKNOWN_HTB_ERROR,
NETLINK_NETEM_ERROR,
UNKNOWN_NETEM_ERROR,
NETLINK_FW_ERROR,
UNKNOWN_FW_ERROR,
UNKNOWN_SESSION,
UNKNOWN_IP,
ACCESS_DENIED,
}
struct Delay {
1: i32 delay,
2: optional i32 jitter = 0,
3: optional double correlation = 0,
}
struct Loss {
1: double percentage,
2: optional double correlation = 0,
}
struct Reorder {
1: double percentage,
2: i32 gap = 0,
3: optional double correlation = 0,
}
struct Corruption {
1: double percentage = 0,
2: optional double correlation = 0,
}
struct Shaping {
1: i32 rate,
2: optional Delay delay = {"delay": 0},
3: optional Loss loss = {"percentage": 0},
4: optional Reorder reorder = {"percentage": 0},
5: optional Corruption corruption = {"percentage": 0},
6: optional list<string> iptables_options,
}
struct TrafficControlSetting {
1: Shaping up,
2: Shaping down,
}
struct TrafficControlledDevice {
1: string controlledIP,
2: optional string controllingIP,
}
struct RemoteControlInstance {
1: TrafficControlledDevice device,
2: optional i32 timeout,
}
struct TrafficControl {
1: TrafficControlSetting settings,
2: TrafficControlledDevice device,
3: i32 timeout,
}
struct TrafficControlRc {
1: ReturnCode code,
2: optional string message,
}
exception TrafficControlException {
1: ReturnCode code,
2: optional string message,
}
exception PacketCaptureException {
1: string message,
}
struct PacketCaptureFile {
1: string name,
2: string url,
3: optional i32 bytes = 0,
}
struct PacketCapture {
1: string ip,
2: i32 start_time,
3: PacketCaptureFile file,
4: optional i32 pid = 0,
}
struct AccessToken {
1: i32 token,
2: i32 interval,
3: i32 valid_until,
}
service Atcd {
TrafficControlRc startShaping(1: TrafficControl tc)
throws (1: TrafficControlException failure),
TrafficControlRc stopShaping(1: TrafficControlledDevice device)
throws (1: TrafficControlException failure),
TrafficControl getCurrentShaping(1: TrafficControlledDevice device)
throws (1: TrafficControlException failure),
/* tell if whether of not an ip is shaped */
bool isShaped(1: TrafficControlledDevice device)
throws (1: TrafficControlException failure),
PacketCapture startPacketCapture(1: TrafficControlledDevice device, 2: i32 timeout)
throws (1: PacketCaptureException failure),
PacketCapture stopPacketCapture(1: TrafficControlledDevice device)
throws (1: PacketCaptureException failure),
void stopAllPacketCaptures(),
list<PacketCapture> listPacketCaptures(1: TrafficControlledDevice device)
throws (1: TrafficControlException failure)
list<PacketCapture> listRunningPacketCaptures(),
/* returns the number of actively shaped devices */
i32 getShapedDeviceCount(),
/* Remote Control */
AccessToken requestToken(1: string ip, 2: i32 duration),
bool requestRemoteControl(1: TrafficControlledDevice device 2: AccessToken accessToken),
list<RemoteControlInstance> getDevicesControlledBy(1: string ip),
list<RemoteControlInstance> getDevicesControlling(1: string ip),
}
| Thrift | 4 | KeleiAzz/augmented-traffic-control | atc/atc_thrift/atc_thrift.thrift | [
"BSD-3-Clause"
] |
# Find libuuid
find_package(PkgConfig)
pkg_check_modules(PC_UUID QUIET uuid)
set(UUID_DEFINITIONS ${PC_UUID_CFLAGS_OTHER})
find_path(UUID_INCLUDE_DIR uuid/uuid.h
HINTS ${PC_UUID_INCLUDEDIR} ${PC_UUID_INCLUDE_DIRS})
set(UUID_INCLUDE_DIRS ${UUID_INCLUDE_DIR})
# On OS X we don't need the library
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(UUID_REQUIRED UUID_INCLUDE_DIR)
else()
find_library(UUID_LIBRARY NAMES uuid
HINTS ${PC_UUID_LIBDIR} ${PC_UUID_LIBRARY_DIRS})
set(UUID_LIBRARIES ${UUID_LIBRARY})
set(UUID_REQUIRED UUID_INCLUDE_DIR UUID_LIBRARY)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(UUID DEFAULT_MSG ${UUID_REQUIRED})
mark_as_advanced(${UUID_REQUIRED})
| CMake | 3 | lwhsu/swift | cmake/modules/FindUUID.cmake | [
"Apache-2.0"
] |
$$ MODE TUSCRIPT
url_encoded="http%3A%2F%2Ffoo%20bar%2F"
BUILD S_TABLE hex=":%><:><2<>2<%:"
hex=STRINGS (url_encoded,hex), hex=SPLIT(hex)
hex=DECODE (hex,hex)
url_decoded=SUBSTITUTE(url_encoded,":%><2<>2<%:",0,0,hex)
PRINT "encoded: ", url_encoded
PRINT "decoded: ", url_decoded
| Turing | 3 | LaudateCorpus1/RosettaCodeData | Task/URL-decoding/TUSCRIPT/url-decoding.tu | [
"Info-ZIP"
] |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected ([<<'EOF', <<'EOF']);
(multi-child-fd) begin
(multi-child-fd) open "sample.txt"
(child-close) begin
(child-close) end
child-close: exit(0)
(multi-child-fd) wait(exec()) = 0
(multi-child-fd) verified contents of "sample.txt"
(multi-child-fd) end
multi-child-fd: exit(0)
EOF
(multi-child-fd) begin
(multi-child-fd) open "sample.txt"
(child-close) begin
child-close: exit(-1)
(multi-child-fd) wait(exec()) = -1
(multi-child-fd) verified contents of "sample.txt"
(multi-child-fd) end
multi-child-fd: exit(0)
EOF
pass;
| ChucK | 3 | nguyenvannam2698/os_pintos_20211 | src/tests/userprog/multi-child-fd.ck | [
"MIT"
] |
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
part of google_maps_flutter_web;
/// This class manages all the [CircleController]s associated to a [GoogleMapController].
class CirclesController extends GeometryController {
// A cache of [CircleController]s indexed by their [CircleId].
final Map<CircleId, CircleController> _circleIdToController;
// The stream over which circles broadcast their events
StreamController<MapEvent> _streamController;
/// Initialize the cache. The [StreamController] comes from the [GoogleMapController], and is shared with other controllers.
CirclesController({
required StreamController<MapEvent> stream,
}) : _streamController = stream,
_circleIdToController = Map<CircleId, CircleController>();
/// Returns the cache of [CircleController]s. Test only.
@visibleForTesting
Map<CircleId, CircleController> get circles => _circleIdToController;
/// Adds a set of [Circle] objects to the cache.
///
/// Wraps each [Circle] into its corresponding [CircleController].
void addCircles(Set<Circle> circlesToAdd) {
circlesToAdd.forEach((circle) {
_addCircle(circle);
});
}
void _addCircle(Circle circle) {
if (circle == null) {
return;
}
final populationOptions = _circleOptionsFromCircle(circle);
gmaps.Circle gmCircle = gmaps.Circle(populationOptions);
gmCircle.map = googleMap;
CircleController controller = CircleController(
circle: gmCircle,
consumeTapEvents: circle.consumeTapEvents,
onTap: () {
_onCircleTap(circle.circleId);
});
_circleIdToController[circle.circleId] = controller;
}
/// Updates a set of [Circle] objects with new options.
void changeCircles(Set<Circle> circlesToChange) {
circlesToChange.forEach((circleToChange) {
_changeCircle(circleToChange);
});
}
void _changeCircle(Circle circle) {
final circleController = _circleIdToController[circle.circleId];
circleController?.update(_circleOptionsFromCircle(circle));
}
/// Removes a set of [CircleId]s from the cache.
void removeCircles(Set<CircleId> circleIdsToRemove) {
circleIdsToRemove.forEach((circleId) {
final CircleController? circleController =
_circleIdToController[circleId];
circleController?.remove();
_circleIdToController.remove(circleId);
});
}
// Handles the global onCircleTap function to funnel events from circles into the stream.
bool _onCircleTap(CircleId circleId) {
// Have you ended here on your debugging? Is this wrong?
// Comment here: https://github.com/flutter/flutter/issues/64084
_streamController.add(CircleTapEvent(mapId, circleId));
return _circleIdToController[circleId]?.consumeTapEvents ?? false;
}
}
| Dart | 5 | suryatmodulus/flutter-plugins | packages/google_maps_flutter/google_maps_flutter_web/lib/src/circles.dart | [
"BSD-3-Clause"
] |
i=--:i++c--i++c--i++c--i++c--i++c--i++c--i++c:i=--i++c goto1+(i=="")
:o=c c=0goto:done++
/--------//--------//--------//--------//--------//--------//--------/
i=--:i i--i--i--i--c=5i--c++i--c++i--c++i--c++i--c++i--c++i--c++i--c++
--i++c--i++c--i++c--i++c--i++c--i++c--i++c--i++c--i++c--i++c goto2
:o=c goto:done++
/--------//--------//--------//--------//--------//--------//--------/
i=:i i--i--i--i--i--i--:i=--i c+=7i--i--i--i--i--i--:i=--i c+=7goto1
x=:i x--c++x--c++x--c++x--c++x--c++x--c++x--c++
:o=c c=0goto:done++
/--------//--------//--------//--------//--------//--------//--------/
i=:i i--i--i--i--i--i--:i=--i c+=7i--i--i--i--i--i--:i=--i c+=7goto1
:o=c c=0x=:i:done=1x--:o++x--:o++x--:o++x--:o++x--:o++x--:o++x--:o++
goto1
/--------//--------//--------//--------//--------//--------//--------/
i=--:i++c--i++c--i++c--i++c--i++c--i++c--i++c--i++c:i=--i++c goto1
:o=c c=0goto:done++
/--------//--------//--------//--------//--------//--------//--------/
i=--:i c++i--c++i--c++i--c++i--c++i--c++i--c++i--c++:i=--i++c goto1
:o=c c=0goto:done++
/--------//--------//--------//--------//--------//--------//--------/
i=:i c=0i--c++i--c++i--c++i--c++i--c++i--c++i--c++i--c++i--c++i--c++
x=i--i--i--i-- c+=4 goto2
x--c++x--c++x--c++x--c++x--c++x--c++x--c++x--c++x--c++x--c++goto3
:o=c goto:done++
/--------//--------//--------//--------//--------//--------//--------/
i=:i c=0i--c++i--c++i--c++i--c++i--c++i--c++i--c++i--c++i--c++i--c++
i--c++i--c++i--c++i--c++i--c++i--c++i--c++i--c++i--c++i--c++goto2
:o=c goto:done++
/--------//--------//--------//--------//--------//--------//--------/ | LOLCODE | 0 | Dude112113/Yolol | YololEmulator/Scripts/StringLength.lol | [
"MIT"
] |
GET /api/v1/blocks?transaction_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1
Host: example.com
| HTTP | 2 | jaromil/bigchaindb | docs/root/source/installation/api/http-samples/get-block-txid-request.http | [
"Apache-2.0"
] |
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dreamview</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script>
loadJSON('parameters.json', (response) => {
window.PARAMETERS = JSON.parse(response);
});
function loadJSON(jsonFilePath, callback) {
console.log("Loading Json file:", jsonFilePath);
const xobj = new XMLHttpRequest();
xobj.overrideMimeType('application/json');
xobj.open('GET', jsonFilePath, false /* synchronous */);
xobj.onreadystatechange = () => {
if (xobj.readyState === 4 && xobj.status === 200) {
// Required use of an anonymous callback as .open will NOT
// return a value but simply returns undefined in asynchronous mode
callback(xobj.responseText);
}
};
xobj.send(null);
}
</script>
</head>
<body>
<div id="root"></div>
</body>
</html>
| Handlebars | 4 | seeclong/apollo | modules/dreamview/frontend/src/index.hbs | [
"Apache-2.0"
] |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.spark.ui
import java.util.concurrent.Semaphore
import scala.util.Random
import org.apache.spark.{SparkConf, SparkContext}
import org.apache.spark.internal.config.SCHEDULER_MODE
import org.apache.spark.scheduler.SchedulingMode
// scalastyle:off
/**
* Continuously generates jobs that expose various features of the WebUI (internal testing tool).
*
* Usage: ./bin/spark-class org.apache.spark.ui.UIWorkloadGenerator [master] [FIFO|FAIR] [#job set (4 jobs per set)]
*/
// scalastyle:on
private[spark] object UIWorkloadGenerator {
val NUM_PARTITIONS = 100
val INTER_JOB_WAIT_MS = 5000
def main(args: Array[String]): Unit = {
if (args.length < 3) {
// scalastyle:off println
println(
"Usage: ./bin/spark-class org.apache.spark.ui.UIWorkloadGenerator " +
"[master] [FIFO|FAIR] [#job set (4 jobs per set)]")
// scalastyle:on println
System.exit(1)
}
val conf = new SparkConf().setMaster(args(0)).setAppName("Spark UI tester")
val schedulingMode = SchedulingMode.withName(args(1))
if (schedulingMode == SchedulingMode.FAIR) {
conf.set(SCHEDULER_MODE, "FAIR")
}
val nJobSet = args(2).toInt
val sc = new SparkContext(conf)
def setProperties(s: String): Unit = {
if (schedulingMode == SchedulingMode.FAIR) {
sc.setLocalProperty(SparkContext.SPARK_SCHEDULER_POOL, s)
}
sc.setLocalProperty(SparkContext.SPARK_JOB_DESCRIPTION, s)
}
val baseData = sc.makeRDD(1 to NUM_PARTITIONS * 10, NUM_PARTITIONS)
def nextFloat(): Float = new Random().nextFloat()
val jobs = Seq[(String, () => Long)](
("Count", () => baseData.count),
("Cache and Count", () => baseData.map(x => x).cache().count),
("Single Shuffle", () => baseData.map(x => (x % 10, x)).reduceByKey(_ + _).count),
("Entirely failed phase", () => baseData.map { x => throw new Exception(); 1 }.count),
("Partially failed phase", () => {
baseData.map{x =>
val probFailure = (4.0 / NUM_PARTITIONS)
if (nextFloat() < probFailure) {
throw new Exception("This is a task failure")
}
1
}.count
}),
("Partially failed phase (longer tasks)", () => {
baseData.map{x =>
val probFailure = (4.0 / NUM_PARTITIONS)
if (nextFloat() < probFailure) {
Thread.sleep(100)
throw new Exception("This is a task failure")
}
1
}.count
}),
("Job with delays", () => baseData.map(x => Thread.sleep(100)).count)
)
val barrier = new Semaphore(-nJobSet * jobs.size + 1)
(1 to nJobSet).foreach { _ =>
for ((desc, job) <- jobs) {
new Thread {
override def run(): Unit = {
// scalastyle:off println
try {
setProperties(desc)
job()
println("Job finished: " + desc)
} catch {
case e: Exception =>
println("Job Failed: " + desc)
} finally {
barrier.release()
}
// scalastyle:on println
}
}.start
Thread.sleep(INTER_JOB_WAIT_MS)
}
}
// Waiting for threads.
barrier.acquire()
sc.stop()
}
}
| Scala | 4 | OlegPt/spark | core/src/main/scala/org/apache/spark/ui/UIWorkloadGenerator.scala | [
"Apache-2.0"
] |
function f<T>(x: T): T { return null; }
var r = <T>(x: T) => x;
var r2 = < <T>(x: T) => T>f; // valid
var r3 = <<T>(x: T) => T>f; // ambiguous, appears to the parser as a << operation
| TypeScript | 2 | nilamjadhav/TypeScript | tests/cases/compiler/ambiguousGenericAssertion1.ts | [
"Apache-2.0"
] |
-- Copyright 2021 Stanford University
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- runs-with:
-- [["-lg:inorder", "-ll:force_kthreads", "-level", "3"]]
import "regent"
-- This tests that we filter various Legion input arguments.
local format = require("std/format")
task main()
var {argv, argc} = regentlib.c.legion_runtime_get_input_args()
for i = 0, argc do
format.println("{}: {}", i, argv[i])
end
regentlib.assert(argc == 1, "test failed")
end
regentlib.start(main)
| Rouge | 3 | mmccarty/legion | language/tests/regent/run_pass/runtime_input_args.rg | [
"Apache-2.0"
] |
"""
bar
"""
class Foo:
[getter(Bar)]
_a = Clickable(Name: "bar", Clicked: foo)
def foo():
print _a.Name
class Clickable:
[property(Name)]
_name as string
event Clicked as callable()
def Click():
Clicked()
Foo().Bar.Click()
| Boo | 2 | popcatalin81/boo | tests/testcases/regression/BOO-369-2.boo | [
"BSD-3-Clause"
] |
(set-info :smt-lib-version 2.6)
(set-logic QF_UFLRA)
(set-info :source |CPAchecker with k-induction on SV-COMP14 program using MathSAT5, submitted by Philipp Wendler, http://cpachecker.sosy-lab.org|)
(set-info :category "industrial")
(set-info :status unsat)
(declare-fun ldv_spin@1 () Real)
(declare-fun |main::ldv_s_mpu3050_i2c_driver_i2c_driver@1| () Real)
(define-fun _7 () Real 0)
(define-fun _1937 () Real |main::ldv_s_mpu3050_i2c_driver_i2c_driver@1|)
(define-fun _1938 () Bool (= _1937 _7))
(define-fun _3608 () Real ldv_spin@1)
(define-fun _3609 () Bool (= _3608 _7))
(define-fun _3610 () Bool (and _1938 _3609))
(define-fun _2 () Bool false)
(assert _3610)
(assert _2)
(check-sat)
(exit)
| SMT | 2 | livinlife6751/infer | sledge/test/smt/QF_UFLRA/cpachecker-induction-svcomp14/cpachecker-induction.43_1a_cilled_true-unreach-call_ok_nondet_linux-43_1a-drivers--input--misc--mpu3050.ko-ldv_main0_sequence_infinite_withcheck_stateful.cil.out.c.smt2 | [
"MIT"
] |
#include-once
#include <File.au3>
#include <FileConstants.au3>
#include <StringConstants.au3>
#include "ProcessEx.au3"
#AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w- 7
; #INDEX# =======================================================================================================================
; Title ............: Tor UDF.
; AutoIt Version ...: 3.3.14.1
; Description ......: UDF for Tor, meant to be used by ProxAllium. Not the best Tor UDF around ;)
; Author(s) ........: Damon Harris (TheDcoder).
; This UDF Uses ....: Process UDF (439a393) - https://git.io/vXmF6
; Links ............: GitHub - https://github.com/DcodingTheWeb/ProxAllium/blob/master/Tor.au3
; ===============================================================================================================================
; #CURRENT# =====================================================================================================================
; _Tor_CheckVersion - Check the version of Tor.
; _Tor_Controller_Authenticate - Authenticate with the Tor controller
; _Tor_Controller_CheckReplyForError - Check for errors in a reply/response from the controller
; _Tor_Controller_Connect - Connect to Tor's TCP controller interface
; _Tor_Controller_SendRaw - Send raw commands to the controller interface
; _Tor_Controller_TakeOwnership - Take ownership of the Tor process (Tor closes if it loses the connection)
; _Tor_Controller_WaitForMsg - Wait for a message to arrive completely and get it
; _Tor_GenHash - Generate a hash for use with Tor
; _Tor_Find - Lists the tor executables and geoip files.
; _Tor_SetPath - Sets Tor.exe's path, it will be used by the UDF in the rest of the functions.
; _Tor_Start - Starts Tor
; _Tor_Stop - Stops Tor
; _Tor_SwitchCircuit - Switch Tor to clean circuits so new application requests don't share any circuits with old ones
; _Tor_VerifyConfig - Check if the configuration is valid.
; ===============================================================================================================================
; #CONSTANTS# ===================================================================================================================
Global Const $TOR_ERROR_GENERIC = 1 ; Reserved for generic errors.
Global Const $TOR_ERROR_PROCESS = 2 ; Error related to Tor.exe's process.
Global Const $TOR_ERROR_VERSION = 3 ; Error related to version.
Global Const $TOR_ERROR_CONFIG = 4 ; Error related to configuration.
Global Const $TOR_ERROR_NETWORK = 5 ; Error related to networking (TCP).
Global Const $TOR_ERROR_CONTROLLER = 6 ; Error related to the Tor controller.
Global Enum $TOR_VERSION, $TOR_VERSION_NUMBER, $TOR_VERSION_GIT ; Associated with $aTorVersion returned by _Tor_CheckVersion
Global Enum $TOR_PROCESS_PID, $TOR_PROCESS_HANDLE, $TOR_PROCESS_SOCKET ; Associated with $aTorProcess returned by _Tor_Start
Global Enum $TOR_CONTROLLER_AUTH_NONE, $TOR_CONTROLLER_AUTH_HASH ; Methods of authentication with Tor controller
Global Enum $TOR_FIND_VERSION, $TOR_FIND_PATH ; Associated with $aList returned by _Tor_Find
Global Enum $TOR_FIND_TORLIST, $TOR_FIND_GEOIP, $TOR_FIND_GEOIP6 ; Associated with arrays found inside $aList returned by _Tor_Find
; ===============================================================================================================================
; #VARIABLES# ===================================================================================================================
Global $g__sTorPath = "" ; Path to Tor.exe
; ===============================================================================================================================
TCPStartup()
OnAutoItExitRegister(__Tor_OnExitTCPShutdown)
; #FUNCTION# ====================================================================================================================
; Name ..........: _Tor_CheckVersion
; Description ...: Check the version of Tor.
; Syntax ........: _Tor_CheckVersion([$sTorPath = $g__sTorPath])
; Parameters ....: $sTorPath - [optional] Path of Tor's executable. Default is $g__sTorPath.
; Return values .: Success: $aTorVersion with 3 elements:
; $aTorVersion[$TOR_VERSION] - Will contain the full version string, see remarks for the format.
; $aTorVersion[$TOR_VERSION_NUMBER] - Will contain the version number in this format: x.x.x.x
; $aTorVersion[$TOR_VERSION_GIT] - Will contain Git's truncated hash of the commit.
; Failure: False and @error set to:
; $TOR_ERROR_PROCESS - If it is an invalid Tor path.
; $TOR_ERROR_VERSION - If unable to determine version, @extended is set to StringRegExp's @error.
; Author ........: Damon Harris (TheDcoder)
; Remarks .......: $TOR_VERSION Format : x.x.x.x (git-a1b2c3d4e5f6g7h8)
; Example: 0.2.9.10 (git-1f6c8eda0073f464)
; The git hash may not be present at all times.
; Example .......: No
; ===============================================================================================================================
Func _Tor_CheckVersion($sTorPath = $g__sTorPath)
Local $sOutput = _Process_RunCommand($PROCESS_RUNWAIT, $sTorPath & ' --version')
If @error Then Return SetError($TOR_ERROR_PROCESS, @error, False)
Local $aTorVersion[3]
Local $aRegEx = StringRegExp($sOutput, '(\d*\.\d*\.\d*\.\d*)(?: \(git-([a-z0-9]{16})\))?', $STR_REGEXPARRAYFULLMATCH)
If @error Then Return SetError($TOR_ERROR_VERSION, @error, False)
$aTorVersion[$TOR_VERSION] = $aRegEx[0]
$aTorVersion[$TOR_VERSION_NUMBER] = $aRegEx[1]
If UBound($aRegEx) = 3 Then $aTorVersion[$TOR_VERSION_GIT] = $aRegEx[2]
Return $aTorVersion
EndFunc
; #FUNCTION# ====================================================================================================================
; Name ..........: _Tor_Controller_Authenticate
; Description ...: Authenticate with the Tor controller
; Syntax ........: _Tor_Controller_Authenticate(Byref $aTorProcess[, $iMethod = $TOR_CONTROLLER_AUTH_NONE[, $vPassword = ""]])
; Parameters ....: $aTorProcess - [in/out] $aTorProcess from _Tor_Start.
; $iMethod - [optional] One of the $TOR_CONTROLLER_AUTH constants. Default is $TOR_CONTROLLER_AUTH_NONE.
; $vPassword - [optional] Password. Default is "" (None).
; Return values .: Success: True
; Failure: @error is set to:
; $TOR_ERROR_NETWORK - If there was a network error, @extended is set to TCPSend or TCPRecv's error.
; $TOR_ERROR_CONTROLLER - If Tor replied with an unexpected response, the response string is returned.
; Author ........: Damon Harris (TheDcoder)
; Remarks .......: This should be the second step after _Tor_Controller_Connect
; Example .......: No
; ===============================================================================================================================
Func _Tor_Controller_Authenticate(ByRef $aTorProcess, $iMethod = $TOR_CONTROLLER_AUTH_NONE, $vPassword = "")
Local $sRawCommand = "AUTHENTICATE"
If $iMethod = $TOR_CONTROLLER_AUTH_HASH Then $sRawCommand &= ' "' & $vPassword & '"'
_Tor_Controller_SendRaw($aTorProcess, $sRawCommand)
If @error Then Return SetError($TOR_ERROR_NETWORK, @extended, False)
Local $sResponse = _Tor_Controller_WaitForMsg($aTorProcess)
If @error Then Return SetError($TOR_ERROR_NETWORK, @extended, False)
_Tor_Controller_CheckReplyForError($sResponse)
If Not @error Then Return True
Return SetError($TOR_ERROR_CONTROLLER, 0, $sResponse)
EndFunc
; #FUNCTION# ====================================================================================================================
; Name ..........: _Tor_Controller_CheckReplyForError
; Description ...: Check for errors in a reply/response from the controller
; Syntax ........: _Tor_Controller_CheckReplyForError($sReply)
; Parameters ....: $sReply - The reply or response from the controller server.
; Return values .: Success: True
; Failure: False and @error set to $TOR_ERROR_GENERIC, @extended is set to 1 if error is fatal.
; Special: @extended is set to 2 and @error is not set, this happens if the status is unknown.
; Author ........: Damon Harris (TheDcoder)
; Example .......: No
; ===============================================================================================================================
Func _Tor_Controller_CheckReplyForError($sReply)
Local $aReply = StringSplit($sReply, ' ')
Local $sStatusCode = $aReply[1]
Switch StringLeft($sStatusCode, 1)
Case "2" ; All OK
Return True
Case "4" ; Temporary Negative (Non-fatal error)
Return SetError($TOR_ERROR_GENERIC, 0, False)
Case "5" ; Permanent Negetive (Fatal error)
Return SetError($TOR_ERROR_GENERIC, 1, False)
Case Else ; Unknown error status (error???)
Return SetExtended(2, False)
EndSwitch
EndFunc
; #FUNCTION# ====================================================================================================================
; Name ..........: _Tor_Controller_Connect
; Description ...: Connect to Tor's TCP controller interface
; Syntax ........: _Tor_Controller_Connect(Byref $aTorProcess, $iPort[, $sAddress = '127.0.0.1'])
; Parameters ....: $aTorProcess - [in/out] $aTorProcess from _Tor_Start.
; $iPort - The port where the controller interface is listening.
; $sAddress - [optional] IP Address of the host. Default is '127.0.0.1'.
; Return values .: Success: True
; Failure: False and @error is set to TCPConnect's @error
; Author ........: Damon Harris (TheDcoder)
; Remarks .......: Autentication should be done before beginning the communication
; Example .......: No
; ===============================================================================================================================
Func _Tor_Controller_Connect(ByRef $aTorProcess, $iPort, $sAddress = '127.0.0.1')
Local $iSocket = TCPConnect($sAddress, $iPort)
If @error Then Return SetError(@error, 0, False)
$aTorProcess[$TOR_PROCESS_SOCKET] = $iSocket
Return True
EndFunc
; #FUNCTION# ====================================================================================================================
; Name ..........: _Tor_Controller_SendRaw
; Description ...: Send raw commands to the controller interface
; Syntax ........: _Tor_Controller_SendRaw($aTorProcess, $sRawCommand[, $bAutoCRLF = True])
; Parameters ....: $aTorProcess - $aTorProcess from _Tor_Start.
; $sRawCommand - The string containing the raw command, CRLF is optional by default.
; $bAutoCRLF - [optional] If True, CRLF is automatically appended before sending the command. Default is True.
; Return values .: Success: True
; Failure: False and @error is set to $TOR_ERROR_NETWORK & @extended is set to TCPSend's @error
; Author ........: Damon Harris (TheDcoder)
; Example .......: No
; ===============================================================================================================================
Func _Tor_Controller_SendRaw(ByRef $aTorProcess, $sRawCommand, $bAutoCRLF = True)
If $bAutoCRLF Then $sRawCommand &= @CRLF
TCPSend($aTorProcess[$TOR_PROCESS_SOCKET], $sRawCommand)
If @error Then Return SetError($TOR_ERROR_NETWORK, @error, False)
Return True
EndFunc
; #FUNCTION# ====================================================================================================================
; Name ..........: _Tor_Controller_TakeOwnership
; Description ...: Take ownership of the Tor process (Tor closes if it loses the connection)
; Syntax ........: _Tor_Controller_TakeOwnership($aTorProcess)
; Parameters ....: $aTorProcess - [in/out] $aTorProcess from _Tor_Start.
; Return values .: Success: True
; Failure: False, @error set to:
; $TOR_ERROR_GENERIC - If controller sent a reply indicating an error and @extended is
; set to _Tor_Controller_CheckReplyForError's @extended
; $TOR_ERROR_NETWORK - If a network error occurs, @extended is set to TCPSend/TCPRecv's @error
; Author ........: Damon Harris (TheDcoder)
; Example .......: No
; ===============================================================================================================================
Func _Tor_Controller_TakeOwnership($aTorProcess)
_Tor_Controller_SendRaw($aTorProcess, 'TAKEOWNERSHIP')
If @error Then Return SetError($TOR_ERROR_NETWORK, @extended, False)
Local $sReply = _Tor_Controller_WaitForMsg($aTorProcess)
If @error Then Return SetError($TOR_ERROR_NETWORK, @extended, False)
_Tor_Controller_CheckReplyForError($sReply)
If @error Then Return SetError($TOR_ERROR_GENERIC, @extended, False)
Return True
EndFunc
; #FUNCTION# ====================================================================================================================
; Name ..........: _Tor_Controller_WaitForMsg
; Description ...: Wait for a message to arrive completely and get it
; Syntax ........: _Tor_Controller_WaitForMsg(Byref $aTorProcess[, $iTimeout = 0[, $bTrimCRLF = True]])
; Parameters ....: $aTorProcess - [in/out] $aTorProcess from _Tor_Start.
; $iTimeout - [optional] Timeout in milliseconds. Default is 0 (no timeout).
; $bTrimCRLF - [optional] Trim the trailing CRLF in the message. Default is True.
; Return values .: Success: $sMessage
; Failure: $sMessage (can be blank or contain partial content) and @error is set to:
; $TOR_ERROR_NETWORK - If TCPRecv set an error, @extended is set to TCPRecv's @error
; $TOR_ERROR_GENERIC - If $iTimeout is reached
; Author ........: Damon Harris (TheDcoder)
; Example .......: No
; ===============================================================================================================================
Func _Tor_Controller_WaitForMsg(ByRef $aTorProcess, $iTimeout = 0, $bTrimCRLF = True)
Local $sMessage
If $iTimeout > 0 Then Local $hTimer = TimerInit()
Do
$sMessage &= TCPRecv($aTorProcess[$TOR_PROCESS_SOCKET], 2)
If @error Then Return SetError($TOR_ERROR_NETWORK, @error, $sMessage)
If ($iTimeout > 0) And (TimerDiff($hTimer) >= $iTimeout) Then Return SetError($TOR_ERROR_GENERIC, 0, $sMessage)
Sleep(10)
Until (StringRight($sMessage, 2) = @CRLF)
Return ($bTrimCRLF ? StringTrimRight($sMessage, 2) : $sMessage)
EndFunc
; #FUNCTION# ====================================================================================================================
; Name ..........: _Tor_Find
; Description ...: Lists the tor executables and geoip files.
; Syntax ........: _Tor_Find($vFolders)
; Parameters ....: $vFolders - $vFolders to search. Can be an array or a string delimited by a pipe charecter (|)
; Return values .: Success: $aList, See remarks for format.
; Failure: False and @error set to $TOR_ERROR_GENERIC
; Author ........: Damon Harris (TheDcoder)
; Remarks .......: 1. $aList is an array with 3 elements:
; $aList[$TOR_FIND_TORLIST] - This element contains the list of tor executables
; $aList[$TOR_FIND_GEOIP] - This element contains the list of GeoIP files
; $aList[$TOR_FIND_GEOIP6] - This element contains the list of GeoIP6 files
; Each of the elements are made up of 2 columns
; $TOR_FIND_VERSION - This column contains the version of the found file
; $TOR_FIND_PATH - This column contains the path fo the found file
; 2. This function can take some time to return.
; 3. Arrays inside $aList are not sorted!
; Example .......: No
; ===============================================================================================================================
Func _Tor_Find($vFolders)
If IsString($vFolders) Then $vFolders = StringSplit($vFolders, '|', $STR_NOCOUNT)
Local $aFiles[0]
For $sFolder In $vFolders
_ArrayConcatenate($aFiles, _FileListToArrayRec($sFolder, "tor.exe;geoip;geoip6", $FLTAR_FILES, $FLTAR_RECUR, $FLTAR_NOSORT, $FLTAR_FULLPATH), 1)
Next
If UBound($aFiles) = 0 Then Return SetError($TOR_ERROR_GENERIC, 0, False)
Local $aTorList[0][2]
Local $aGeoIP[0][2]
Local $aGeoIPv6[0][2]
Local $aPath
Local $aTorVersion[0]
Local $aGeoFileDate[0]
For $sFile In $aFiles
$aPath = _PathSplit($sFile, $vFolders, $vFolders, $vFolders, $vFolders) ; $vFolders is just used as a dummy here
Switch $aPath[3]
Case "tor"
$aTorVersion = _Tor_CheckVersion($sFile)
If Not @error Then _ArrayAdd($aTorList, $aTorVersion[$TOR_VERSION_NUMBER] & '|' & $sFile)
Case "geoip", "geoip6"
$aGeoFileDate = StringRegExp(FileReadLine($sFile), '([A-Z][a-z]*) ([\d]{1,2}) (\d{4})', $STR_REGEXPARRAYMATCH)
If Not @error Then
Switch $aPath[3]
Case "geoip"
_ArrayAdd($aGeoIP, _ArrayToString($aGeoFileDate, ' ') & '|' & $sFile)
Case "geoip6"
_ArrayAdd($aGeoIPv6, _ArrayToString($aGeoFileDate, ' ') & '|' & $sFile)
EndSwitch
EndIf
EndSwitch
Next
Local $aList[3] = [$aTorList, $aGeoIP, $aGeoIPv6]
Return $aList
EndFunc
; #FUNCTION# ====================================================================================================================
; Name ..........: _Tor_GenHash
; Description ...: Generate a hash for use with Tor
; Syntax ........: _Tor_GenHash($sString)
; Parameters ....: $sString - The string for which will the hash be calculated.
; Return values .: Success: $aHash (See Remarks)
; Failure: False and @error is set to:
; $TOR_ERROR_PROCESS - If Tor didn't launch or run successfully
; $TOR_ERROR_GENERIC - If the hash was not found in the output
; Author ........: Damon Harris (TheDcoder)
; Remarks .......: $aHash is an array with 3 elements:
; $aHash[0] - Contains the full hash (16:660537E3E1CD49996044A3BF558097A981F539FEA2F9DA662B4626C1C2)
; $aHash[1] - Contains the salt of the hash (660537E3E1CD4999)
; $aHash[2] - Contains the salted hash (44A3BF558097A981F539FEA2F9DA662B4626C1C2)
; Example .......: No
; ===============================================================================================================================
Func _Tor_GenHash($sString)
Local $sOutput = _Process_RunCommand($PROCESS_RUNWAIT, $g__sTorPath & ' --hash-password "' & $sString & '"')
If @error Then Return SetError($TOR_ERROR_PROCESS, @error, False)
Local $aHash = StringRegExp($sOutput, '16:([A-Z0-9]{16})60([A-Z0-9]{40})', $STR_REGEXPARRAYFULLMATCH)
If @error Then Return SetError($TOR_ERROR_GENERIC, @error, False)
Return $aHash
EndFunc
; #FUNCTION# ====================================================================================================================
; Name ..........: _Tor_SetPath
; Description ...: Sets Tor.exe's path, it will be used by the UDF in the rest of the functions.
; Syntax ........: _Tor_SetPath($sTorPath[, $bVerify = True])
; Parameters ....: $sTorPath - Path of Tor.exe, can be relative or short. See Remarks.
; $bVerify - [optional] If set to False, no checkes are performed. Default is True.
; Return values .: Success: $aTorVersion from _Tor_CheckVersion or True if $bVerify is False.
; Failure: False and @error set to:
; $TOR_ERROR_GENERIC - If $sTorPath does not exist
; $TOR_ERROR_VERSION - If _Tor_CheckVersion failed to check Tor's version, @extended is set to _Tor_CheckVersion's @error.
; Author ........: Damon Harris (TheDcoder)
; Remarks .......: 1. The $sTorPath will always be converted to a long and absolute path before getting assinged.
; 2. The existing path assigned to Tor.exe will not change if _Tor_SetPath fails.
; 3. Set $bVerify to False to skip the version check, you will never get failure if you use this method.
; Example .......: No
; ===============================================================================================================================
Func _Tor_SetPath($sTorPath, $bVerify = True)
If Not $bVerify Then
$g__sTorPath = $sTorPath
Return True
EndIf
If Not FileExists($sTorPath) Then Return SetError($TOR_ERROR_GENERIC, 0, False)
Local $sOldTorPath = $g__sTorPath
$g__sTorPath = $sTorPath
Local $aTorVersion = _Tor_CheckVersion()
If @error Then
$g__sTorPath = $sOldTorPath
Return SetError($TOR_ERROR_VERSION, @error, False)
EndIf
Return $aTorVersion
EndFunc
; #FUNCTION# ====================================================================================================================
; Name ..........: _Tor_Start
; Description ...: Starts Tor
; Syntax ........: _Tor_Start($sConfig)
; Parameters ....: $sConfig - Path to the config/torrc file.
; Return values .: Success: $aTorProcess, See Remarks.
; Failure: $sCommand used to execute Tor and @error set to:
; $TOR_ERROR_PROCESS - If there was a problem starting the process
; $TOR_ERROR_CONFIG - If there was a problem during verification of the $sConfig
; Author ........: Damon Harris (TheDcoder)
; Remarks .......: $aTorProcess's Format:
; $aTorProcess[$TOR_PROCESS_HANDLE] - Contains the process handle of tor.exe
; $aTorProcess[$TOR_PROCESS_PID] - Contains the PID of tor.exe
; $aTorProcess[$TOR_PROCESS_SOCKET] - Reserved for the TCP socket, used by _Tor_Controller functions
; Example .......: No
; ===============================================================================================================================
Func _Tor_Start($sConfig)
_Tor_VerifyConfig($sConfig)
If @error Then Return SetError($TOR_ERROR_CONFIG, @error, False)
Local $aTorProcess[3]
Local $sCommand = '"' & $g__sTorPath & '" --allow-missing-torrc --defaults-torrc "" -f "' & $sConfig & '"'
$aTorProcess[$TOR_PROCESS_HANDLE] = _Process_RunCommand($PROCESS_RUN, $sCommand, @ScriptDir)
If @error Then Return SetError($TOR_ERROR_PROCESS, @error, $sCommand)
$aTorProcess[$TOR_PROCESS_PID] = @extended
Return $aTorProcess
EndFunc
; #FUNCTION# ====================================================================================================================
; Name ..........: _Tor_Stop
; Description ...: Stops Tor
; Syntax ........: _Tor_Stop(Byref $aTorProcess)
; Parameters ....: $aTorProcess - [in/out] $aTorProcess from _Tor_Start.
; Return values .: Success: True and $aTorProcess is modified, See Remarks.
; Failure: False, @error set to:
; $TOR_ERROR_GENERIC - If $aTorProcess is invalid (does not contain 3 elements).
; $TOR_ERROR_PROCESS - If ProcessClose fails, @extended is set to ProcessClose's @error
; Author ........: Damon Harris (TheDcoder)
; Remarks .......: Tor is sent the shutdown signal first (using TCP) and if it fails, it is closed forcibly by ProcessClose
; $aTorProcess[$TOR_PROCESS_PID] and $aTorProcess[$TOR_PROCESS_HANDLE] are set to 0 which help avoid conflict
; Related .......: _Tor_Start
; Example .......: No
; ===============================================================================================================================
Func _Tor_Stop(ByRef $aTorProcess)
If UBound($aTorProcess) <> 3 Then Return SetError($TOR_ERROR_GENERIC, 0, False)
_Tor_Controller_SendRaw($aTorProcess, 'SIGNAL SHUTDOWN')
If Not @error Then
Local $sResponse = _Tor_Controller_WaitForMsg($aTorProcess)
If Not @error Then
_Tor_Controller_CheckReplyForError($sResponse)
If Not @error Then Return
EndIf
Else
ProcessClose($aTorProcess[$TOR_PROCESS_PID]) ; Force closure
If @error Then Return SetError($TOR_ERROR_PROCESS, @error, False)
EndIf
$aTorProcess[$TOR_PROCESS_PID] = 0
_Process_CloseHandle($aTorProcess[$TOR_PROCESS_HANDLE])
$aTorProcess[$TOR_PROCESS_HANDLE] = 0
Return True
EndFunc
; #FUNCTION# ====================================================================================================================
; Name ..........: _Tor_SwitchCircuit
; Description ...: Switch Tor to clean circuits so new application requests don't share any circuits with old ones
; Syntax ........: _Tor_SwitchCircuit(Byref $aTorProcess)
; Parameters ....: $aTorProcess - [in/out] $aTorProcess from _Tor_Start.
; Return values .: Success: True
; Failure: False, @error set to:
; $TOR_ERROR_GENERIC - If controller sent a reply indicating an error and @extended is
; set to _Tor_Controller_CheckReplyForError's @extended
; $TOR_ERROR_NETWORK - If a network error occurs, @extended is set to TCPSend/TCPRecv's @error
; Author ........: Damon Harris (TheDcoder)
; Remarks .......: Tor may rate-limit this action so use it responsibly
; Example .......: No
; ===============================================================================================================================
Func _Tor_SwitchCircuit(ByRef $aTorProcess)
_Tor_Controller_SendRaw($aTorProcess, 'SIGNAL NEWNYM')
If @error Then Return SetError($TOR_ERROR_NETWORK, @extended, False)
Local $sReply = _Tor_Controller_WaitForMsg($aTorProcess)
If @error Then Return SetError($TOR_ERROR_NETWORK, @extended, False)
_Tor_Controller_CheckReplyForError($sReply)
If @error Then Return SetError($TOR_ERROR_GENERIC, @extended, False)
Return True
EndFunc
; #FUNCTION# ====================================================================================================================
; Name ..........: _Tor_VerifyConfig
; Description ...: Check if the configuration is valid.
; Syntax ........: _Tor_VerifyConfig($sConfig)
; Parameters ....: $sConfig - a Path to the config/torrc file.
; Return values .: Success: True
; Failure: False and @error set to $TOR_ERROR_CONFIG
; Author ........: Damon Harris (TheDcoder)
; Remarks .......: This function just perfroms a bare-minimum check
; Example .......: No
; ===============================================================================================================================
Func _Tor_VerifyConfig($sConfig)
Local $sOutput = _Process_RunCommand($PROCESS_RUNWAIT, '"' & $g__sTorPath & '" --verify-config --allow-missing-torrc --defaults-torrc "" -f "' & $sConfig & '"', @ScriptDir)
If @error Then Return SetError($TOR_ERROR_PROCESS, @error, False)
Local $aOutput = StringSplit(StringStripWS($sOutput, $STR_STRIPTRAILING), @CRLF, $STR_ENTIRESPLIT)
If $aOutput[$aOutput[0]] = "Configuration was valid" Then Return True
Return SetError($TOR_ERROR_CONFIG, 0, False)
EndFunc
Func __Tor_OnExitTCPShutdown()
TCPShutdown()
EndFunc
| AutoIt | 5 | IHA114/ProxAllium | Tor.au3 | [
"MIT"
] |
require("rubinius/debugger")
class Rubinius Debugger {
forwards_unary_ruby_methods
metaclass forwards_unary_ruby_methods
}
class Rubinius Debugger Command SetBreakPoint {
def match_method: method_identifier {
match method_identifier {
case /##/ ->
class_name, method_name = method_identifier split: "##"
method_identifier = "#{class_name}::#{method_name message_name}"
case /#/ ->
class_name, method_name = method_identifier split: "#"
method_identifier = "#{class_name}##{method_name message_name}"
}
/([A-Z]\w*(?:::[A-Z]\w*)*)([.#]|::)([a-zA-Z0-9_\[\]:]+[!?=]?)(?:[:](\d+))?/ match: method_identifier
}
alias_method('match_method, 'match_method:)
}
class Rubinius Location {
forwards_unary_ruby_methods
}
class Rubinius Debugger Frame {
forwards_unary_ruby_methods
def describe {
arg_str = ""
recv = nil
loc = @location
if: (loc is_block) then: {
if: (method required_args == 0) then: {
recv = "{ } in #{loc describe_receiver}#{loc name}"
} else: {
block_args = method local_names join: ", "
recv = "|#{block_args}| { } in #{loc describe_receiver}#{loc name}"
}
} else: {
recv = loc describe
}
recv = recv replace: "#:" with: "#"
recv = recv replace: ".:" with: "##"
recv = recv replace: "." with: "##"
str = "#{recv} at #{loc method active_path}:#{loc line} (#{loc ip})"
{ str << " (+#{loc ip})" } if: $ @debugger variables['show_ip]
str
}
alias_method('describe, ':describe)
def run: code {
Fancy eval: (code to_s) binding: binding
}
alias_method('run, 'run:)
}
Rubinius Debugger start
| Fancy | 3 | bakkdoor/fancy | lib/rbx/debugger.fy | [
"BSD-3-Clause"
] |
var A = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"];
for i in 1..100 {
var sum = + reduce A;
assert(sum == "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz");
}
| Chapel | 1 | jhh67/chapel | test/users/ferguson/string_reduce.chpl | [
"ECL-2.0",
"Apache-2.0"
] |
int main() {
print_wrapper (Config.x);
return return_code ();
}
| Vala | 1 | kira78/meson | test cases/vala/8 generated sources/src/test.vala | [
"Apache-2.0"
] |
GET /api/v1/transactions?operation=TRANSFER&asset_id=4957744b3ac54434b8270f2c854cc1040228c82ea4e72d66d2887a4d3e30b317 HTTP/1.1
Host: example.com
| HTTP | 2 | jaromil/bigchaindb | docs/root/source/installation/api/http-samples/get-tx-by-asset-request.http | [
"Apache-2.0"
] |
[[using.running-your-application]]
== Running Your Application
One of the biggest advantages of packaging your application as a jar and using an embedded HTTP server is that you can run your application as you would any other.
The sample applies to debugging Spring Boot applications.
You do not need any special IDE plugins or extensions.
NOTE: This section only covers jar-based packaging.
If you choose to package your application as a war file, see your server and IDE documentation.
[[using.running-your-application.from-an-ide]]
=== Running from an IDE
You can run a Spring Boot application from your IDE as a Java application.
However, you first need to import your project.
Import steps vary depending on your IDE and build system.
Most IDEs can import Maven projects directly.
For example, Eclipse users can select `Import...` -> `Existing Maven Projects` from the `File` menu.
If you cannot directly import your project into your IDE, you may be able to generate IDE metadata by using a build plugin.
Maven includes plugins for https://maven.apache.org/plugins/maven-eclipse-plugin/[Eclipse] and https://maven.apache.org/plugins/maven-idea-plugin/[IDEA].
Gradle offers plugins for {gradle-docs}/userguide.html[various IDEs].
TIP: If you accidentally run a web application twice, you see a "`Port already in use`" error.
Spring Tools users can use the `Relaunch` button rather than the `Run` button to ensure that any existing instance is closed.
[[using.running-your-application.as-a-packaged-application]]
=== Running as a Packaged Application
If you use the Spring Boot Maven or Gradle plugins to create an executable jar, you can run your application using `java -jar`, as shown in the following example:
[source,shell,indent=0,subs="verbatim"]
----
$ java -jar target/myapplication-0.0.1-SNAPSHOT.jar
----
It is also possible to run a packaged application with remote debugging support enabled.
Doing so lets you attach a debugger to your packaged application, as shown in the following example:
[source,shell,indent=0,subs="verbatim"]
----
$ java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n \
-jar target/myapplication-0.0.1-SNAPSHOT.jar
----
[[using.running-your-application.with-the-maven-plugin]]
=== Using the Maven Plugin
The Spring Boot Maven plugin includes a `run` goal that can be used to quickly compile and run your application.
Applications run in an exploded form, as they do in your IDE.
The following example shows a typical Maven command to run a Spring Boot application:
[source,shell,indent=0,subs="verbatim"]
----
$ mvn spring-boot:run
----
You might also want to use the `MAVEN_OPTS` operating system environment variable, as shown in the following example:
[source,shell,indent=0,subs="verbatim"]
----
$ export MAVEN_OPTS=-Xmx1024m
----
[[using.running-your-application.with-the-gradle-plugin]]
=== Using the Gradle Plugin
The Spring Boot Gradle plugin also includes a `bootRun` task that can be used to run your application in an exploded form.
The `bootRun` task is added whenever you apply the `org.springframework.boot` and `java` plugins and is shown in the following example:
[indent=0,subs="verbatim"]
----
$ gradle bootRun
----
You might also want to use the `JAVA_OPTS` operating system environment variable, as shown in the following example:
[indent=0,subs="verbatim"]
----
$ export JAVA_OPTS=-Xmx1024m
----
[[using.running-your-application.hot-swapping]]
=== Hot Swapping
Since Spring Boot applications are plain Java applications, JVM hot-swapping should work out of the box.
JVM hot swapping is somewhat limited with the bytecode that it can replace.
For a more complete solution, https://www.jrebel.com/products/jrebel[JRebel] can be used.
The `spring-boot-devtools` module also includes support for quick application restarts.
See the <<howto#howto.hotswapping, Hot swapping "`How-to`">> for details.
| AsciiDoc | 4 | techAi007/spring-boot | spring-boot-project/spring-boot-docs/src/docs/asciidoc/using/running-your-application.adoc | [
"Apache-2.0"
] |
# Copied with little modifications from: https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/nbody-yarv-2.html
SOLAR_MASS = 4 * Math::PI**2
DAYS_PER_YEAR = 365.24
class Planet
property x : Float64
property y : Float64
property z : Float64
property vx : Float64
property vy : Float64
property vz : Float64
property mass : Float64
def initialize(@x, @y, @z, vx, vy, vz, mass)
@vx, @vy, @vz = vx * DAYS_PER_YEAR, vy * DAYS_PER_YEAR, vz * DAYS_PER_YEAR
@mass = mass * SOLAR_MASS
end
def move_from_i(bodies, nbodies, dt, i)
while i < nbodies
b2 = bodies[i]
dx = @x - b2.x
dy = @y - b2.y
dz = @z - b2.z
distance = Math.sqrt(dx * dx + dy * dy + dz * dz)
mag = dt / (distance * distance * distance)
b_mass_mag, b2_mass_mag = @mass * mag, b2.mass * mag
@vx -= dx * b2_mass_mag
@vy -= dy * b2_mass_mag
@vz -= dz * b2_mass_mag
b2.vx += dx * b_mass_mag
b2.vy += dy * b_mass_mag
b2.vz += dz * b_mass_mag
i += 1
end
@x += dt * @vx
@y += dt * @vy
@z += dt * @vz
end
end
def energy(bodies)
e = 0.0
nbodies = bodies.size
0.upto(nbodies - 1) do |i|
b = bodies[i]
e += 0.5 * b.mass * (b.vx * b.vx + b.vy * b.vy + b.vz * b.vz)
(i + 1).upto(nbodies - 1) do |j|
b2 = bodies[j]
dx = b.x - b2.x
dy = b.y - b2.y
dz = b.z - b2.z
distance = Math.sqrt(dx * dx + dy * dy + dz * dz)
e -= (b.mass * b2.mass) / distance
end
end
e
end
def offset_momentum(bodies)
px, py, pz = 0.0, 0.0, 0.0
bodies.each do |b|
m = b.mass
px += b.vx * m
py += b.vy * m
pz += b.vz * m
end
b = bodies[0]
b.vx = -px / SOLAR_MASS
b.vy = -py / SOLAR_MASS
b.vz = -pz / SOLAR_MASS
end
BODIES = [
# sun
Planet.new(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0),
# jupiter
Planet.new(
4.84143144246472090e+00,
-1.16032004402742839e+00,
-1.03622044471123109e-01,
1.66007664274403694e-03,
7.69901118419740425e-03,
-6.90460016972063023e-05,
9.54791938424326609e-04),
# saturn
Planet.new(
8.34336671824457987e+00,
4.12479856412430479e+00,
-4.03523417114321381e-01,
-2.76742510726862411e-03,
4.99852801234917238e-03,
2.30417297573763929e-05,
2.85885980666130812e-04),
# uranus
Planet.new(
1.28943695621391310e+01,
-1.51111514016986312e+01,
-2.23307578892655734e-01,
2.96460137564761618e-03,
2.37847173959480950e-03,
-2.96589568540237556e-05,
4.36624404335156298e-05),
# neptune
Planet.new(
1.53796971148509165e+01,
-2.59193146099879641e+01,
1.79258772950371181e-01,
2.68067772490389322e-03,
1.62824170038242295e-03,
-9.51592254519715870e-05,
5.15138902046611451e-05),
]
if ARGV.size != 1
abort "Usage: nbodies n"
end
n = ARGV[0].to_i
offset_momentum(BODIES)
puts energy(BODIES)
nbodies = BODIES.size
dt = 0.01
n.times do
i = 0
while i < nbodies
b = BODIES[i]
b.move_from_i(BODIES, nbodies, dt, i + 1)
i += 1
end
end
puts energy(BODIES)
| Crystal | 4 | mgomes/crystal | samples/nbodies.cr | [
"Apache-2.0"
] |
NAME
VTK::Filters
LIBRARY_NAME
vtkFilters
DESCRIPTION
Common filters and algorithms
| Kit | 0 | txwhhny/vtk | Filters/Core/vtk.kit | [
"BSD-3-Clause"
] |
#import "content/nw/src/api/base/base_mac.h"
#import <objc/runtime.h>
@interface CppWrapper : NSObject {
void* _obj;
}
+ (id) createFromCppObject:(void*) obj;
- (id) initWithCppObject:(void*) obj;
- (void*) obj;
@end
@implementation CppWrapper
+ (id) createFromCppObject:(void*) obj {
return [[CppWrapper alloc] initWithCppObject:obj];
}
- (id) initWithCppObject:(void*) obj {
_obj = obj;
return self;
}
- (void*) obj {
return _obj;
}
@end
@implementation NSObject (AssociatedObject)
@dynamic associatedObject;
- (void)setAssociatedObject:(void*)object {
objc_setAssociatedObject(self, @selector(associatedObject), [CppWrapper createFromCppObject:object], OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
- (void*)associatedObject {
CppWrapper* wrapper = objc_getAssociatedObject(self, @selector(associatedObject));
return wrapper == nil ? nil : [wrapper obj];
}
@end | Objective-C++ | 4 | frank-dspeed/nw.js | src/api/base/base_mac.mm | [
"MIT"
] |
REBOL [Title: "Basic TEXT test"]
do %gfx-pre.r3
find-file: funct [
dir [file!]
file [file!]
][
foreach f read dir [
fn: dir/:f
either dir? fn [
if fn: find-file fn file [
return fn
]
][
if file = f [
return to string! fn
]
]
]
return none
]
find-font: funct [
"Simple way how to find specific font file on Linux"
font-name [string! file!]
][
font-dirs: copy []
fonts-cfg: to-string read %/etc/fonts/fonts.conf
parse/all fonts-cfg [
some [
thru {<dir>} copy dir to {</dir>} (append font-dirs dirize to-file dir)
]
]
foreach font-dir probe font-dirs [
if all [
exists? font-dir
f: find-file font-dir font-name
][
return f
]
]
return none
]
fnt-uni: make system/standard/font [
size: 28
]
switch system/version/4 [
3 [ ; Windows
fnt-uni/name: "Arial Unicode MS"
]
4 [ ; Linux
fnt-uni/name: find-font %FreeSans.ttf
]
]
draw-block: to-draw [
text [
anti-alias
font fnt-uni
size 28
underline
bold
"Unicode text works in HostKit!"
drop 2
newline
size 11
"You need 'Arial Unicode MS' truetype font for this demo or some other font with wide range of unicode support"
newline
drop 1
underline off
bold off
navy
"Arabic - ضطفقحڭڦڞ۞"
newline
"Armenian - ՅՌՎՑՓ"
newline
"Bengali - তঃঊঋঐকতোতৢ"
newline
"Chinese - ㌇㌌㌚㌫㍀㍌㍖"
newline
"Czech - ěščřžýáíéňď"
newline
"Greek - αβγδεζ"
newline
"German - äßÖöü"
newline
"Hebrew - סאבגדהוט"
newline
"Hiragana - ばぬぢぽみゆあ"
newline
"Katakana - ゼヂネポヸダジ"
newline
"Panjabi - ੨ਫ਼ਓਔੴ"
newline
"Russian - ДφψЗлйжҒ"
newline
"Thai - ฑญฆญจบฟ"
newline
"Tibetan - གྷཆ༰༯༲༬༣༇༈༊ང྆ཀྵ"
]
] copy []
print "Generating TEXT graphics.."
img: make image! [420x640 164.200.255]
write %text.png encode 'png draw img draw-block
print "Output has been succesfully written to text.png file."
halt
| Rebol | 5 | Pointillistic/rebol-lang | tests/text-test.r3 | [
"Apache-2.0"
] |
// Implement pow(x, n).
public class PowerOfXToTheN {
public double myPow(double x, int n) {
if(n == 0) {
return 1;
}
if(Double.isInfinite(x)) {
return 0;
}
if(n < 0) {
n = -n;
x = 1 / x;
}
return n % 2 == 0 ? myPow(x * x, n / 2) : x * myPow(x * x, n / 2);
}
}
| Java | 4 | ChickenMomos/interviews | leetcode/binary-search/PowerOfXToTheN.java | [
"MIT"
] |
/******************************************************************************
* Copyright 2018 The Apollo Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************/
#include "modules/perception/fusion/base/sensor_data_manager.h"
#include "gtest/gtest.h"
#include "modules/perception/common/sensor_manager/sensor_manager.h"
namespace apollo {
namespace perception {
namespace fusion {
TEST(SensorDataManagerTest, test) {
FLAGS_work_root = "/apollo/modules/perception/testdata/fusion/base";
FLAGS_obs_sensor_meta_path = "./data/sensor_meta.pt";
FLAGS_obs_sensor_intrinsic_path =
"/apollo/modules/perception/testdata/"
"fusion/base/params";
SensorDataManager* sensor_data_manager = SensorDataManager::Instance();
base::SensorInfo sensor_info_1;
sensor_info_1.name = "velodyne64";
sensor_info_1.type = base::SensorType::VELODYNE_64;
double timestamp = 7012;
Eigen::Affine3d sensor2world_pose = Eigen::Affine3d::Identity();
base::ObjectPtr base_object_1(new base::Object());
base::FramePtr base_frame_1(new base::Frame());
base_frame_1->sensor_info = sensor_info_1;
base_frame_1->timestamp = timestamp;
base_frame_1->sensor2world_pose = sensor2world_pose;
base_frame_1->objects.emplace_back(base_object_1);
base::ObjectPtr base_object_2(new base::Object());
base::FramePtr base_frame_2(new base::Frame());
base_frame_2->sensor_info = sensor_info_1;
timestamp = 9012;
base_frame_2->timestamp = timestamp;
base_frame_2->sensor2world_pose = sensor2world_pose;
base_frame_2->objects.emplace_back(base_object_2);
sensor_data_manager->AddSensorMeasurements(base_frame_1);
EXPECT_EQ(sensor_data_manager->sensors_.size(), 1);
sensor_data_manager->AddSensorMeasurements(base_frame_2);
EXPECT_EQ(sensor_data_manager->sensors_.size(), 1);
base::SensorInfo sensor_info_2;
sensor_info_2.name = "camera_smartereye";
sensor_info_2.type = base::SensorType::STEREO_CAMERA;
base::ObjectPtr base_object_3(new base::Object());
base::FramePtr base_frame_3(new base::Frame());
base_frame_3->sensor_info = sensor_info_2;
timestamp = 9014;
base_frame_3->timestamp = timestamp;
base_frame_3->sensor2world_pose = sensor2world_pose;
base_frame_3->objects.emplace_back(base_object_3);
sensor_data_manager->AddSensorMeasurements(base_frame_3);
EXPECT_EQ(sensor_data_manager->sensors_.size(), 2);
base::SensorInfo error_info;
error_info.name = "error";
base::FramePtr error_frame(new base::Frame());
error_frame->sensor_info = error_info;
sensor_data_manager->AddSensorMeasurements(error_frame);
EXPECT_EQ(sensor_data_manager->sensors_.size(), 2);
double query_timestamp = 9015;
std::vector<SensorFramePtr> frame_vec;
sensor_data_manager->GetLatestSensorFrames(query_timestamp, "velodyne64",
nullptr);
EXPECT_EQ(frame_vec.size(), 0);
sensor_data_manager->GetLatestSensorFrames(query_timestamp, "ultrasonic",
&frame_vec);
EXPECT_EQ(frame_vec.size(), 0);
sensor_data_manager->GetLatestSensorFrames(query_timestamp, "velodyne64",
&frame_vec);
EXPECT_EQ(frame_vec.size(), 2);
frame_vec.clear();
query_timestamp = 8000;
sensor_data_manager->sensors_["velodyne64"]->SetLatestQueryTimestamp(0.0);
sensor_data_manager->GetLatestFrames(query_timestamp, nullptr);
EXPECT_EQ(frame_vec.size(), 0);
sensor_data_manager->GetLatestFrames(query_timestamp, &frame_vec);
EXPECT_EQ(frame_vec.size(), 1);
query_timestamp = 9015;
sensor_data_manager->GetLatestFrames(query_timestamp, &frame_vec);
EXPECT_EQ(frame_vec.size(), 2);
query_timestamp = 9018;
sensor_data_manager->GetLatestFrames(query_timestamp, &frame_vec);
EXPECT_EQ(frame_vec.size(), 0);
Eigen::Affine3d pose;
query_timestamp = 7012;
EXPECT_FALSE(
sensor_data_manager->GetPose("velodyne64", query_timestamp, nullptr));
EXPECT_FALSE(
sensor_data_manager->GetPose("ultrasonic", query_timestamp, &pose));
EXPECT_TRUE(
sensor_data_manager->GetPose("velodyne64", query_timestamp, &pose));
EXPECT_EQ((pose.matrix() - sensor2world_pose.matrix()).trace(), 0.0);
EXPECT_EQ(sensor_data_manager->GetCameraIntrinsic("velodyne64"), nullptr);
EXPECT_NE(sensor_data_manager->GetCameraIntrinsic("camera_smartereye"),
nullptr);
}
} // namespace fusion
} // namespace perception
} // namespace apollo
| C++ | 4 | jzjonah/apollo | modules/perception/fusion/base/sensor_data_manager_test.cc | [
"Apache-2.0"
] |
.pre-process-selector {
color: red;
}
| CSS | 1 | ardyno/nuxt.js | test/fixtures/with-config/assets/pre-process.css | [
"MIT"
] |
module ciena-waveserver-ptp {
namespace "urn:ciena:params:xml:ns:yang:ciena-ws:ciena-waveserver-ptp";
prefix ptp;
import ciena-waveserver-typedefs {
prefix cienawstypes;
}
import ciena-waveserver-xcvr {
prefix xcvr;
}
organization
"Ciena Corporation";
contact
"Web URL: http://www.ciena.com/
Postal: 7035 Ridge Road
Hanover, Maryland 21076
U.S.A.
Phone: +1 800-921-1144
Fax: +1 410-694-5750";
description
"Physical Termination Point. This module models the physical characteristics of the signal. This base module contains generic definitions for all PTPs. Specific characteristics of PTPs can augment this model to provide more detail. PTPs are automatically provisioned by the system.";
revision 2017-11-27 {
description
"Added conditional 'when' statements to line-specific and client-specific leafs.";
reference "Waveserver Ai user's guide.";
}
revision 2017-08-10 {
description
"Waveserver Platform Data Model
Migrated from Waveserver Classic R1.4 YANG model.
Updated namespace to 'ciena-waveserver'.
Changed 'ptps' list key from 'ptp-index' (integer type) to 'ptp-id' (string type) to accommodate '<slot>-<port>' format.
Changed 'parent-index' to 'parent-id' (this is the parent xcvr-id) and type to leafref.
Changed 'rate' enum to 'nominal-bit-rate' string type, in Gbps units.
Renamed 'channels' container to 'lanes'.
Removed 'diagnostics' container.
Added 'lower-level-down' operational state value.
Wavelength is operational (config false) now. Also moved 'actual' wavelength attribute to per-lane attributes.
Moved ptp-pluggable operational attributes (tx loss-of-signal, loss-of-lock) into this common module. The pluggable-only attributes will be omitted from the display of line-side/modem PTP queries.
Added 'spli-management' support.";
reference "Waveserver Ai user's guide.";
}
typedef ptp-op-enum {
type enumeration {
enum "up" {
description
"The PTP is enabled/operational and capable of carrying traffic.";
}
enum "down" {
description
"The PTP is disabled.";
}
enum "tuning" {
description
"Wavelength or CDR tuning in progress.";
}
enum "fault" {
description
"There is an active alarm associated with the PTP.";
}
enum "lower-layer-down" {
description
"The PTP is enabled, but a parent object is faulted.";
}
}
description
"PTP operational state.";
}
container waveserver-ptps {
description
"Waveserver Physical Termination Point (PTP) configuration and operational data.";
list ptps {
key "ptp-id";
description
"List of PTP objects.";
leaf ptp-id {
type cienawstypes:name-string;
mandatory true;
description
"Unique, access identifier string of the PTP (e.g., '1-1'). Key value for the PTP list. Read-only attribute.";
}
container id {
config false;
description
"Identification information of this PTP instance.";
leaf name {
type cienawstypes:name-string;
config false;
description
"Name of the PTP instance. Read only attribute.";
}
}
container state {
description
"State information of this PTP instance.";
leaf admin-state {
type cienawstypes:enabled-disabled-enum;
description
"Administrative state (enabled or disabled) of the PTP. If Admin State is set to enabled, majority of the PTP fields will no longer be modifiable. When PTP Transmitter State is Disabled, PTP Admin State cannot be changed from Disabled to Enabled.";
}
leaf operational-state {
type ptp-op-enum;
config false;
description
"Operational state of the PTP. Read-only attribute.";
}
leaf spli-management {
when "../../properties/xcvr-type = 'WaveLogic Ai'" {
description
"SPLI management supported on line-side PTPs only.";
}
type cienawstypes:enabled-disabled-enum;
description
"Whether or not SPLI management is enabled for this PTP.";
}
}
container properties {
description
"All the configurable and operational data of this PTP instance.";
leaf xcvr-type {
type cienawstypes:xcvr-type;
description
"Transceiver type of the XCVR that's associated with this PTP. Type depends on what is physically plugged in. Read only attribute.";
}
leaf parent-id {
type leafref {
path "/xcvr:waveserver-xcvrs/xcvr:xcvrs/xcvr:xcvr-id";
}
config false;
description
"Reference to the name of the transceiver (XCVR) associated with the PTP. Read-only attribute.";
}
leaf nominal-bit-rate {
type cienawstypes:string-maxl-16;
units "Gbps";
config false;
description
"Bit rate, nominal, in Gbps.";
}
container transmitter {
description
"PTP transmitter related config and operational data fields.";
leaf state {
type cienawstypes:enabled-disabled-na-enum;
description
"Transmitter state (enabled or disabled) of the PTP. PTP Admin State cannot be changed to enabled unless the transmitter state is enabled.";
}
container wavelength {
config false;
description
"PTP tx wavelength related operational data fields.";
leaf value {
type cienawstypes:decimal-2-dig;
units "nm";
config false;
description
"Wavelength value setting of the PTP, in nm. Read-only attribute.";
}
leaf min-value {
when "../../../xcvr-type = 'WaveLogic Ai'" {
description
"XCVR min-value supported on line-side PTPs only.";
}
type cienawstypes:decimal-2-dig-small;
units "nm";
config false;
description
"The minimum wavelength supported by the XCVR. Supported on line-side ports only.";
}
leaf max-value {
when "../../../xcvr-type = 'WaveLogic Ai'" {
description
"XCVR max-value supported on line-side PTPs only.";
}
type cienawstypes:decimal-2-dig-small;
units "nm";
config false;
description
"The maximum wavelength supported by the XCVR. Supported on line-side ports only.";
}
}
}
container lanes {
config false;
description
"PTP lanes related operational data fields.";
leaf number-of-lanes {
type cienawstypes:lanes-number;
config false;
description
"Number of lanes this PTP has.";
}
list lane {
key "lane-number";
config false;
max-elements "4";
description
"Operational data of a specific PTP lane.";
leaf lane-number {
type cienawstypes:lanes-number;
config false;
description
"Lane number of the PTP being queried.";
}
leaf actual-wavelength {
type cienawstypes:decimal-2-dig;
units "nm";
config false;
description
"Actual wavelength value for the lane, in nm.";
}
container rx {
description
"Lane Rx attributes.";
container power {
description
"Lane Rx Power operational attributes (actual power, min/max recorded power, etc.).";
uses xcvr:optical-power-group;
}
container status {
description
"Lane Rx Power high/low alarm/warning status/thresholds, where applicable for the XCVR type.";
uses xcvr:optical-power-status-group;
uses xcvr:optical-power-threshold-group;
leaf loss-of-signal {
type boolean;
config false;
description
"Rx Loss of Signal.";
}
leaf loss-of-lock {
when "../../../../../xcvr-type = 'QSFP28'" {
description
"Returned for on pluggables only.";
}
type boolean;
config false;
description
"Rx Loss of Lock.";
}
}
}
container tx {
description
"Lane Tx attributes.";
container power {
description
"Lane Tx Power operational attributes (actual power, min/max recorded power, etc.).";
uses xcvr:optical-power-group;
}
container status {
description
"Lane Tx Power high/low alarm/warning status/thresholds, where applicable for the XCVR type.";
uses xcvr:optical-power-status-group;
uses xcvr:optical-power-threshold-group;
leaf loss-of-signal {
when "../../../../../xcvr-type = 'QSFP28'" {
description
"Returned for on pluggables only.";
}
type boolean;
config false;
description
"Tx Loss of Signal.";
}
leaf loss-of-lock {
when "../../../../../xcvr-type = 'QSFP28'" {
description
"Returned for on pluggables only.";
}
type boolean;
config false;
description
"Tx Loss of Lock.";
}
}
}
}
}
}
}
}
}
| YANG | 5 | meodaiduoi/onos | models/ciena/waveserverai/src/main/yang/ciena-waveserver-ptp@2017-11-27.yang | [
"Apache-2.0"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.