Qwen/Qwen2.5-0.5B · L15/N366 · 20261112T234343Z
Experiment 1 of 1 on this neuron, most conclusive first · record
N366+ is a retrospective code line-terminator detector: it fires on the whitespace token carrying the line break at the end of a statement inside a nested code block, and roughly doubles to quadruples when that statement is a control-flow exit (break, continue, return, raise, throw, goto, exit) rather than an assignment or call. Ordinary statement lines inside a block give only a weak response (roughly 1.5-3.5, rising with nesting depth), a trailing blank line adds a further boost to non-jump lines, and top-level code at column 0, opening braces and running prose give no response.
The whole hypothesis
N366+ is a retrospective code line-terminator detector: it fires on the whitespace token carrying the line break at the end of a statement inside a nested code block, and roughly doubles to quadruples when that statement is a control-flow exit (break, continue, return, raise, throw, goto, exit) rather than an assignment or call. Ordinary statement lines inside a block give only a weak response (roughly 1.5-3.5, rising with nesting depth), a trailing blank line adds a further boost to non-jump lines, and top-level code at column 0, opening braces and running prose give no response.
Hard negatives 11/13 rejected · holdouts 7/7 fired (independent observations; 20 probes) · P(useful) 1.00
specificity 0.85 · sensitivity 1.00 · counterfactual reproduction 1.00 · protocol v0.8
;
}
};
});
Adversarial review
hard_negative: 11/13 passed; positive_holdout: 7/7 passed; counterfactual: 10/10 passed; lookahead_consistency: 1/1 passed. All gates passed.
All 31 probes
| Test | Input | Expected | Observed | |
|---|---|---|---|---|
| ✓ | hard negative | We packed the sample tubes;
the labels went in a separate bag;
and the consent forms stayed with the driver. Running prose whose line-final semicolons are punctuation, not statement terminators inside a nested code block, so the hypothesis predicts no response. |
inactive | 0.268 |
| ✓ | hard negative | import json
from pathlib import Path
config = json.loads(Path("config.json").read_text())
count = len(config["hosts"])
print("loaded", count, "hosts")
Every line ends a statement with a line break but all statements sit at column 0 top level, and the hypothesis says top-level code gives no response. |
inactive | 0.293 |
| ✓ | hard negative | void Engine::start()
{
if (running_) {
while (!queue_.empty()) {
if (queue_.front().ready()) {
Nested block structure made entirely of opening braces and block headers with no statement terminators; the hypothesis predicts opening braces give no response. |
inactive | 0.203 |
| ✓ | hard negative | /*
* Flush the buffer before shutdown;
* then break out of the accept loop;
* otherwise the worker blocks forever.
*/
The trigger word break and line-final semicolons appear inside a block comment at top level, not as a statement inside a nested code block. |
inactive | 0.360 |
| ✓ | hard negative | message = """Unpack the archive;
run the migrator;
break the seal only after the checksum matches;"""
print(message)
Line-final semicolons and the word break sit inside a string literal, which the hypothesis says is not a code statement inside a nested block. |
inactive | 0.176 |
| ✓ | hard negative | The dancers will break
for the interval at nine, and the band returns
to the stage after midnight. break is an English verb at a line end in running prose; the hypothesis restricts firing to code inside a nested block. |
inactive | 0.223 |
| ✗ | hard negative | summary = combine(experiments,
baselines,
ablations)
Line breaks fall mid-expression after commas inside parentheses at top level rather than at the end of a statement, so no response is predicted. |
inactive | 1.852 |
| ✗ | hard negative | service:
name: scheduler
replicas: 3
limits:
cpu: 500m
memory: 1Gi
Indented nesting exists but the lines are YAML data keys, not statements of a nested code block, so the hypothesis predicts no response. |
inactive | 2.081 |
| ✓ | hard negative | SELECT user_id, email FROM accounts;
SELECT COUNT(*) FROM sessions;
DELETE FROM tokens WHERE expired_at < now();
Semicolon-terminated lines at column 0 with no nested code block and no control-flow exit; the hypothesis predicts top-level statements do not fire. |
inactive | 0.086 |
| ✓ | hard negative | The migration finished without downtime.
The next section describes how to roll back.
Rollback is rare, but it must be rehearsed.
Running prose with blank-line paragraph breaks, which the hypothesis excludes because blank lines outside code get no response. |
inactive | 0.226 |
| ✓ | hard negative | const defaults = {
retries: 3,
timeout: 30,
}
const label = "defaults"
A closing brace followed by a blank line and a line break, but the brace closes a top-level object literal rather than a nested code block, so no response is predicted. |
inactive | 0.311 |
| ✓ | hard negative | #!/bin/sh
set -e
echo "starting import"
exit 0
The control-flow exit and its line terminator appear at column 0 top level, which the hypothesis says gives no response even for jump lines. |
inactive | 0.322 |
| ✓ | hard negative | <div class="card">
<h2>Report</h2>
<p>Nothing to show.</p>
</div>
Indented nested markup with line breaks but no statements of a code block, so the hypothesis predicts no response. |
inactive | 1.278 |
| ✓ | positive holdout | fn read_config(path: &Path) -> Result<Config, Error> {
if let Ok(text) = fs::read_to_string(path) {
match parse(&text) {
Ok(cfg) => return Ok(cfg),
Err(e) => return Err(e.into());
}
}
Ok(Config::default())
}
A return jump inside a match arm nested two levels in a Rust function, ending in a semicolon and line break, which the hypothesis predicts fires strongly. |
active | 3.979 |
| ✓ | positive holdout | function walk(nodes, visit) {
for (const node of nodes) {
if (!node || node.skip) {
continue;
}
visit(node);
}
}
A continue control-flow exit ending a line inside an if inside a for loop in JavaScript, a language absent from the examples, predicted to fire strongly. |
active | 4.185 |
| ✓ | positive holdout | public void validate(Input in) {
try {
if (in.getToken() == null) {
throw new IllegalStateException("missing token");
}
} catch (RuntimeException ex) {
log.warn("validation failed", ex);
}
}
A throw statement ending in a semicolon and line break, nested inside an if inside a try in Java, which the hypothesis predicts fires as a jump line. |
active | 2.305 |
| ✓ | positive holdout | def each_visible(records)
records.each do |record|
next if record.hidden
puts record.name
end
end
A Ruby next jump at the end of a line inside a block inside a method expresses the claimed feature with newline termination instead of a semicolon, so it should fire. |
active | 2.759 |
| ✓ | positive holdout | class Pipeline:
def run(self, batches):
for batch in batches:
for item in batch:
totals.append(transform(item))
audits.record(item)
An ordinary deeply nested call statement followed by a blank line, which the hypothesis says gives a weak but real response boosted by the trailing blank line. |
active | 3.474 |
| ✓ | positive holdout | function out = filterItems(items)
out = {};
for k = 1:numel(items)
if isempty(items{k})
continue;
end
out{end+1} = items{k};
end
end
A continue jump terminated by a semicolon inside an if inside a for loop in MATLAB, a new language for the examples, predicted to fire strongly. |
active | 5.578 |
| ✓ | positive holdout | The deployment handbook has changed a great deal since the first release, and most of the differences come from incidents that nobody expected. This chapter collects the lessons learned during the migration from the old scheduler to the new one, and it is written for engineers who already understand the basics of the platform and want to know why the current design looks the way it does.
Early versions of the service ran every background task on a single worker process. That worked while the dataset was small, because each task finished in a few milliseconds and the queue never grew long. As customers began uploading larger archives, the queue length became the first signal of trouble: whenever it exceeded a few thousand jobs, the worker fell behind and the dashboard turned amber. The team tried raising the number of workers, but the database connection pool became the bottleneck, and the resulting errors were far harder to diagnose than the queue itself.
The second attempt introduced a separate queue for heavy jobs and a separate pool of connections for each queue. This restored throughput, but it also meant that a single slow job could hold a connection for minutes at a time. Reviews of the incident logs from that period show that nearly every outage started with one unusually large archive, followed by a cascade of timeouts as other workers waited for connections. The fix was to add a hard limit on the size of any single job and to reject oversized uploads at the edge, before they reached the queue at all.
Rate limiting turned out to matter as much as capacity planning. Without a limit, a single customer script that retried aggressively could push more work into the queue than every other customer combined. The team added a token bucket in front of the upload endpoint, sized so that the ordinary customer would never notice it and only pathological retry loops would hit it. The bucket refills continuously, which avoids the bursty behaviour that the first, window-based limiter produced at the start of each minute.
Observability arrived last, and in hindsight should have arrived first. The old system reported only successes and failures, which meant that slow jobs were invisible until they timed out. The new system records a histogram of job durations, the length of every queue, and the age of the oldest job, and the on-call engineer looks at those three numbers before anything else. Alerts fire on the age of the oldest job rather than on the queue length, because a long queue is harmless when jobs are short and dangerous when they are not.
The code sample below shows the shape of the current worker loop. The loop checks the shutdown flag before claiming work, so that a worker which has already been asked to stop does not pull another job off the queue and leave it half finished.
```python
def worker_loop(queue, stop_flag):
while True:
if stop_flag.is_set():
return
job = queue.claim()
if job is None:
time.sleep(idle_seconds)
continue
try:
job.run()
except Exception:
job.record_failure()
raise
finally:
queue.ack(job)
```
The loop above is deliberately small. Everything else, including retries, metrics and the token bucket, lives outside it, so that a change to policy never requires a change to the loop itself. When the loop was larger, every experiment meant a new deployment, and the review process slowed to a crawl. The current arrangement is not the most compact one, but it has survived three load tests without a change.
One recurring question concerns the shutdown flag. Some readers assume that the flag is checked once, at startup, which would leave a worker running long after the platform has been drained. In fact the flag is checked on every pass through the loop, and the check happens before the claim call precisely so that no job is lost between the check and the acknowledgement. The ordering matters more than the check itself.
A second question concerns the exception handler. The handler records the failure and then re-raises, which looks redundant until you notice that the acknowledgement lives in a finally block. Without the re-raise, a failed job would be acknowledged as if it had succeeded, and the retry machinery would never see it. The re-raise is the only thing that keeps the failure visible to the rest of the system.
Finally, the idle timeout deserves a note. When the queue is empty the worker sleeps for a short, fixed interval rather than blocking on a condition variable. The original design used a condition variable and it was faster, but it also made shutdown unreliable under load, because a worker could miss the wake-up that told it to stop. A sleep of a few hundred milliseconds costs almost nothing in throughput and removes an entire class of shutdown bugs, which is a trade the team would make again. A long documentation passage with the feature deep inside it: return and raise at nested line ends in a Python worker loop, predicted to fire despite the surrounding long prose. |
active | 8.304 |
| ✓ | counterfactual | import os import sys def process(data, limit): total = 0 for item in data: if item.valid: continue total += item.size return total -> import os import sys def process(data, limit): total = 0 for item in data: if item.valid: pass total += item.size return total | Δ 0.42 | Δ 0.42 |
| ✓ | counterfactual | import os import sys def process(data, limit): total = 0 for item in data: if item.valid: continue total += item.size return total -> import os import sys def process(data, limit): total = 0 for item in data: if item.valid: break total += item.size return total | Δ -0.01 | Δ -0.02 |
| ✓ | counterfactual | import os import sys def process(data, limit): total = 0 for item in data: if item.valid: continue total += item.size return total -> import os import sys def process(data, limit): total = 0 for item in data: if item.valid: total += 1 total += item.size return total | Δ 0.36 | Δ 0.36 |
| ✓ | counterfactual | import os import sys def process(data, limit): total = 0 for item in data: if item.valid: return None total += item.size return total -> import os import sys def process(data, limit): total = 0 for item in data: if item.valid: total = 2 total += item.size return total | Δ 0.64 | Δ 0.64 |
| ✓ | counterfactual | import os import sys def process(data, limit): total = 0 for item in data: if item.valid: return None total += item.size return total -> import os import sys def process(data, limit): total = 0 for item in data: if item.valid: return 0 total += item.size return total | Δ 0.01 | Δ 0.01 |
| ✓ | counterfactual | import os import sys def process(data, limit): total = 0 for item in data: total += item.size if total > limit: total = limit return total -> import os import sys def process(data, limit): total = 0 for item in data: total += item.size if total > limit: total = limit return total | Δ 0.17 | Δ 0.17 |
| ✓ | counterfactual | import os import sys def process(data, limit): total = 0 for item in data: if item.valid: return None total += item.size return total -> import os import sys def process(data, limit): total = 0 for item in data: if item.valid: return None total += item.size return total | Δ -0.08 | Δ -0.08 |
| ✓ | counterfactual | #include <stdio.h> static int worker(int fd, int n) { int total = 0; if (fd < 0) { return -1; } return total; } -> #include <stdio.h> static int worker(int fd, int n) { int total = 0; if (fd < 0) { total = 1; } return -1; } | Δ 0.33 | Δ 0.33 |
| ✓ | counterfactual | import os import sys def process(data, limit): total = 0 for item in data: if item.valid: continue total += item.size return total -> import os import sys def handle(data, limit): total = 0 for item in data: if item.valid: continue total += item.size return total | Δ -0.01 | Δ -0.01 |
| ✓ | counterfactual | import os import sys def process(data, limit): total = 0 for item in data: if item.valid: continue total += item.size return total -> import os import sys def process(data, cap): total = 0 for item in data: if item.valid: continue total += item.size return total | Δ -0.03 | Δ -0.03 |
| ✓ | lookahead consistency | import os
import sys
def process(data, limit):
total = 0
for item in data:
if item.valid:
continue
total += item.size
return total
; import os
import sys
def process(data, limit):
total = 0
for item in data:
if item.valid:
continue
total += item.size
return total
; import os
import sys
def process(data, limit):
total = 0
for item in data:
if item.valid:
continue
total += item.size
return total
; import os
import sys
def process(data, limit):
total = 0
for item in data:
if item.valid:
return None
total += item.size
return total
; import os
import sys
def process(data, limit):
total = 0
for item in data:
if item.valid:
return None
total += item.size
return total
; import os
import sys
def process(data, limit):
total = 0
for item in data:
total += item.size
if total > limit:
total = limit
return total
; import os
import sys
def process(data, limit):
total = 0
for item in data:
if item.valid:
return None
total += item.size
return total
; #include <stdio.h>
static int worker(int fd, int n) {
int total = 0;
if (fd < 0) {
return -1;
}
return total;
}
; import os
import sys
def process(data, limit):
total = 0
for item in data:
if item.valid:
continue
total += item.size
return total
; import os
import sys
def process(data, limit):
total = 0
for item in data:
if item.valid:
continue
total += item.size
return total
claimed retrospective; measured retrospective (KL=0.001703, tokens=[' ', 'def', ' \n\n', 'if', '\n']) |
Minimal pairs
| # | Base → counterfactual | Expected Δ | Observed Δ | Sufficiency | Necessity |
|---|---|---|---|---|---|
| 1 | import os
import sys
def process(data, limit):
total = 0
for item in data:
if item.valid:
continue
total += item.size
return total
→ import os
import sys
def process(data, limit):
total = 0
for item in data:
if item.valid:
pass
total += item.size
return total
|
0.42 | 0.42 | 1.00 effect 0.00235 matched 4.37e-06 / 0.0013 |
1.00 effect 5.95e-05 matched 2.24e-07 / 4.69e-05 |
| 2 | import os
import sys
def process(data, limit):
total = 0
for item in data:
if item.valid:
continue
total += item.size
return total
→ import os
import sys
def process(data, limit):
total = 0
for item in data:
if item.valid:
break
total += item.size
return total
|
-0.01 | -0.02 | 0.97 effect 6.73e-05 matched 4.78e-06 / 0.00091 |
0.97 effect 7.42e-05 matched 6.2e-06 / 0.00094 |
| 3 | import os
import sys
def process(data, limit):
total = 0
for item in data:
if item.valid:
continue
total += item.size
return total
→ import os
import sys
def process(data, limit):
total = 0
for item in data:
if item.valid:
total += 1
total += item.size
return total
|
0.36 | 0.36 | — | — |
| 4 | import os
import sys
def process(data, limit):
total = 0
for item in data:
if item.valid:
return None
total += item.size
return total
→ import os
import sys
def process(data, limit):
total = 0
for item in data:
if item.valid:
total = 2
total += item.size
return total
|
0.64 | 0.64 | — | — |
| 5 | import os
import sys
def process(data, limit):
total = 0
for item in data:
if item.valid:
return None
total += item.size
return total
→ import os
import sys
def process(data, limit):
total = 0
for item in data:
if item.valid:
return 0
total += item.size
return total
|
0.01 | 0.01 | — | — |
| 6 | import os
import sys
def process(data, limit):
total = 0
for item in data:
total += item.size
if total > limit:
total = limit
return total
→ import os
import sys
def process(data, limit):
total = 0
for item in data:
total += item.size
if total > limit:
total = limit
return total
|
0.17 | 0.17 | 1.00 effect 0.00064 matched 8.7e-06 / 0.000275 |
0.94 effect 1.63e-05 matched 9.52e-07 / 5.95e-05 |
| 7 | import os
import sys
def process(data, limit):
total = 0
for item in data:
if item.valid:
return None
total += item.size
return total
→ import os
import sys
def process(data, limit):
total = 0
for item in data:
if item.valid:
return None
total += item.size
return total
|
-0.08 | -0.08 | — | — |
| 8 | #include <stdio.h>
static int worker(int fd, int n) {
int total = 0;
if (fd < 0) {
return -1;
}
return total;
}
→ #include <stdio.h>
static int worker(int fd, int n) {
int total = 0;
if (fd < 0) {
total = 1;
}
return -1;
}
|
0.33 | 0.33 | — | — |
| 9 | import os
import sys
def process(data, limit):
total = 0
for item in data:
if item.valid:
continue
total += item.size
return total
→ import os
import sys
def handle(data, limit):
total = 0
for item in data:
if item.valid:
continue
total += item.size
return total
|
-0.01 | -0.01 | — | — |
| 10 | import os
import sys
def process(data, limit):
total = 0
for item in data:
if item.valid:
continue
total += item.size
return total
→ import os
import sys
def process(data, cap):
total = 0
for item in data:
if item.valid:
continue
total += item.size
return total
|
-0.03 | -0.03 | — | — |
Read more
Δ is the base prompt's peak positive-pole strength minus the counterfactual's, as a fraction of the max activation.
Each causal score ranks the pole's patch effect among the 32 same-layer neurons that change as much between each pair, so 0.5 is typical. Sufficiency patches clean into corrupted, and necessity corrupted into clean. The score is the median over 3 non-control pairs, on next-token KL. Median effect 0.00064 (sufficiency) and 5.95e-05 (necessity). In the table, each cell gives the percentile, the pole's signed effect, and the matched neurons' median and largest |effect|, in nats of KL. Self-repair (the hydra effect) was mitigated by freezing downstream MLP outputs.
Top-activating examples
Hover a token for its value.
-
6.84
… = 0;↵ size_t length = 0;↵ switch (algorithm1) {↵ case HashAlgorithmSha256:↵ break;↵ case HashAlgorithmSha384:↵ …
All 759 tokens
// Copyright 2014 The Chromium Authors. All rights reserved.↵// Use of this source code is governed by a BSD-style license that can be↵// found in the LICENSE file.↵↵#include "core/frame/SubresourceIntegrity.h"↵↵#include "core/HTMLNames.h"↵#include "core/dom/Document.h"↵#include "core/dom/Element.h"↵#include "core/dom/ExecutionContext.h"↵#include "core/fetch/Resource.h"↵#include "core/frame/UseCounter.h"↵#include "core/inspector/ConsoleMessage.h"↵#include "platform/Crypto.h"↵#include "platform/weborigin/KURL.h"↵#include "platform/weborigin/SecurityOrigin.h"↵#include "public/platform/WebCrypto.h"↵#include "public/platform/WebCryptoAlgorithm.h"↵#include "wtf/ASCIICType.h"↵#include "wtf/Vector.h"↵#include "wtf/dtoa/utils.h"↵#include "wtf/text/Base64.h"↵#include "wtf/text/ParsingUtilities.h"↵#include "wtf/text/StringUTF8Adaptor.h"↵#include "wtf/text/WTFString.h"↵↵namespace blink {↵↵// FIXME: This should probably use common functions with ContentSecurityPolicy.↵static bool isIntegrityCharacter(UChar c) {↵ // Check if it's a base64 encoded value. We're pretty loose here, as there's↵ // not much risk in it, and it'll make it simpler for developers.↵ return isASCIIAlphanumeric(c) || c == '_' || c == '-' || c == '+' ||↵ c == '/' || c == '=';↵}↵↵static bool isValueCharacter(UChar c) {↵ // VCHAR per https://tools.ietf.org/html/rfc5234#appendix-B.1↵ return c >= 0x21 && c <= 0x7e;↵}↵↵static void logErrorToConsole(const String& message,↵ ExecutionContext& executionContext) {↵ executionContext.addConsoleMessage(ConsoleMessage::create(↵ SecurityMessageSource, ErrorMessageLevel, message));↵}↵↵static bool DigestsEqual(const DigestValue& digest1,↵ const DigestValue& digest2) {↵ if (digest1.size() != digest2.size())↵ return false;↵↵ for (size_t i = 0; i < digest1.size(); i++) {↵ if (digest1[i] != digest2[i])↵ return false;↵ }↵↵ return true;↵}↵↵static String digestToString(const DigestValue& digest) {↵ return base64Encode(reinterpret_cast<const char*>(digest.data()),↵ digest.size(), Base64DoNotInsertLFs);↵}↵↵HashAlgorithm SubresourceIntegrity::getPrioritizedHashFunction(↵ HashAlgorithm algorithm1,↵ HashAlgorithm algorithm2) {↵ const HashAlgorithm weakerThanSha384[] = {HashAlgorithmSha256};↵ const HashAlgorithm weakerThanSha512[] = {HashAlgorithmSha256,↵ HashAlgorithmSha384};↵↵ ASSERT(algorithm1 != HashAlgorithmSha1);↵ ASSERT(algorithm2 != HashAlgorithmSha1);↵↵ if (algorithm1 == algorithm2)↵ return algorithm1;↵↵ const HashAlgorithm* weakerAlgorithms = 0;↵ size_t length = 0;↵ switch (algorithm1) {↵ case HashAlgorithmSha256:↵ break;↵ case HashAlgorithmSha384:↵ weakerAlgorithms = weakerThanSha384;↵ length = WTF_ARRAY_LENGTH(weakerThanSha384);↵ break;↵ case HashAlgorithmSha512:↵ weakerAlgorithms = weakerThanSha512;↵ length = WTF_ARRAY_LENGTH(weakerThanSha512);↵ b
Values
Token Positive-pole strength =0.000 0.000 00.000 ;↵0.723 0.000 size0.000 _t0.000 length0.000 =0.000 0.000 00.000 ;↵0.767 0.000 switch0.000 (0.000 algorithm0.019 10.048 )0.000 {↵0.636 0.021 case0.000 Hash0.000 Algorithm0.000 Sha0.000 20.000 50.012 60.000 :↵0.413 0.000 break0.000 ;↵6.839 1.051 case0.000 Hash0.000 Algorithm0.000 Sha0.000 30.000 80.000 40.000 :↵0.840 0.000 -
5.21
… return render_to_response('support/feature_based_enrollments.html', {↵ 'course_key': course_key,↵ 'results': results,↵ })↵↵ def _get_course_duration_info(self, course …
All 478 tokens
"""↵Support tool for viewing course duration information↵"""↵from django.core.exceptions import ObjectDoesNotExist↵from django.utils.decorators import method_decorator↵from django.views.generic import View↵from edxmako.shortcuts import render_to_response↵from lms.djangoapps.support.decorators import require_support_permission↵from opaque_keys import InvalidKeyError↵from opaque_keys.edx.keys import CourseKey↵from openedx.features.course_duration_limits.models import CourseDurationLimitConfig↵from openedx.features.content_type_gating.models import ContentTypeGatingConfig↵from openedx.core.djangoapps.content.course_overviews.models import CourseOverview↵↵↵class FeatureBasedEnrollmentsSupportView(View):↵ """↵ View for listing course duration settings for↵ support team.↵ """↵ @method_decorator(require_support_permission)↵ def get(self, request):↵ """↵ Render the course duration tool view.↵ """↵ course_key = request.GET.get('course_key', '')↵↵ if course_key:↵ results = self._get_course_duration_info(course_key)↵ else:↵ results = []↵↵ return render_to_response('support/feature_based_enrollments.html', {↵ 'course_key': course_key,↵ 'results': results,↵ })↵↵ def _get_course_duration_info(self, course_key):↵ """↵ Fetch course duration information from database↵ """↵ results = []↵↵ try:↵ key = CourseKey.from_string(course_key)↵ course = CourseOverview.objects.values('display_name').get(id=key)↵ duration_config = CourseDurationLimitConfig.current(course_key=key)↵ gating_config = ContentTypeGatingConfig.current(course_key=key)↵ misconfigured = duration_config.enabled != gating_config.enabled↵↵ if misconfigured:↵ enabled = 'Partial'↵ enabled_as_of = 'Misconfigured'↵ reason = 'Misconfiguration'↵ else:↵ enabled = duration_config.enabled or False↵ enabled_as_of = str(duration_config.enabled_as_of) if duration_config.enabled_as_of else 'N/A'↵ reason = duration_config.provenances['enabled']↵↵ data = {↵ 'course_id': course_key,↵ 'course_name': course.get('display_name'),↵ 'enabled': enabled,↵ 'enabled_as_of': enabled_as_of,↵ 'reason': reason,↵ }↵ results.append(data)↵↵ except (ObjectDoesNotExist, InvalidKeyError):↵ pass↵↵ return results
Values
Token Positive-pole strength return0.000 render0.000 _to0.000 _response0.000 ('0.000 support0.000 /0.000 feature0.000 _based0.000 _en0.002 roll0.000 ments0.000 .html0.000 ',0.000 {↵0.000 0.000 '0.000 course0.006 _key0.000 ':0.000 course0.000 _key0.000 ,↵0.337 0.000 '0.023 results0.171 ':0.000 results0.000 ,↵0.664 0.000 })↵↵5.209 0.335 def0.078 _0.103 get0.000 _course0.000 _duration0.000 _info0.000 (self0.215 ,0.167 course0.106 -
4.84
… ['replacements'] as $functionIdentity => $functionReplacement) {↵ if ($functionIdentity === $functionReplacement['alternativeName']) {↵ continue;↵ }↵↵ $currIndex = 0;↵ …
All 702 tokens
<?php↵↵/*↵ * This file is part of PHP CS Fixer.↵ *↵ * (c) Fabien Potencier <██████>↵ * Dariusz Rumiński <████████>↵ *↵ * This source file is subject to the MIT license that is bundled↵ * with this source code in the file LICENSE.↵ */↵↵namespace PhpCsFixer\Fixer\Alias;↵↵use PhpCsFixer\AbstractFunctionReferenceFixer;↵use PhpCsFixer\Fixer\ConfigurationDefinitionFixerInterface;↵use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverRootless;↵use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;↵use PhpCsFixer\FixerDefinition\CodeSample;↵use PhpCsFixer\FixerDefinition\FixerDefinition;↵use PhpCsFixer\Tokenizer\Token;↵use PhpCsFixer\Tokenizer\Tokens;↵use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;↵↵/**↵ * @author Vladimir Reznichenko <█████>↵ */↵final class RandomApiMigrationFixer extends AbstractFunctionReferenceFixer implements ConfigurationDefinitionFixerInterface↵{↵ /**↵ * @var array↵ */↵ private static $argumentCounts = [↵ 'getrandmax' => [0],↵ 'mt_rand' => [1, 2],↵ 'rand' => [0, 2],↵ 'srand' => [0, 1],↵ ];↵↵ /**↵ * {@inheritdoc}↵ */↵ public function configure(array $configuration = null)↵ {↵ parent::configure($configuration);↵↵ foreach ($this->configuration['replacements'] as $functionName => $replacement) {↵ $this->configuration['replacements'][$functionName] = [↵ 'alternativeName' => $replacement,↵ 'argumentCount' => self::$argumentCounts[$functionName],↵ ];↵ }↵ }↵↵ /**↵ * {@inheritdoc}↵ */↵ public function getDefinition()↵ {↵ return new FixerDefinition(↵ 'Replaces `rand`, `srand`, `getrandmax` functions calls with their `mt_*` analogs.',↵ [↵ new CodeSample("<?php\n\$a = getrandmax();\n\$a = rand(\$b, \$c);\n\$a = srand();"),↵ new CodeSample(↵ "<?php\n\$a = getrandmax();\n\$a = rand(\$b, \$c);\n\$a = srand();",↵ ['replacements' => ['getrandmax' => 'mt_getrandmax']]↵ ),↵ ],↵ null,↵ 'Risky when the configured functions are overridden.'↵ );↵ }↵↵ /**↵ * {@inheritdoc}↵ */↵ public function isCandidate(Tokens $tokens)↵ {↵ return $tokens->isTokenKindFound(T_STRING);↵ }↵↵ /**↵ * {@inheritdoc}↵ */↵ protected function applyFix(\SplFileInfo $file, Tokens $tokens)↵ {↵ foreach ($this->configuration['replacements'] as $functionIdentity => $functionReplacement) {↵ if ($functionIdentity === $functionReplacement['alternativeName']) {↵ continue;↵ }↵↵ $currIndex = 0;↵ while (null !== $currIndex) {↵ // try getting function reference and translate boundaries for humans↵ $boundaries = $this->find($functionIdentity, $tokens, $currIndex, $tokens->count(
Values
Token Positive-pole strength ['0.000 re0.112 placements0.000 ']0.000 as0.000 $0.000 function0.052 Identity0.117 =>0.000 $0.000 function0.000 Replacement0.000 )0.000 {↵0.000 0.000 if0.000 ($0.000 function0.000 Identity0.063 ===0.000 $0.000 function0.000 Replacement0.000 ['0.000 alternative0.000 Name0.083 '])0.000 {↵0.000 0.000 continue1.209 ;↵4.837 1.622 }↵↵2.689 0.000 $0.000 curr0.102 Index0.102 =0.000 0.000 00.000 ;↵0.700 -
4.54
… := asn1.Unmarshal(c.RawSubject, &rdnSequence)↵ if err != nil {↵ return &lint.LintResult{Status: lint.Fatal}↵ }↵ if len(rest) > 0 {↵ …
All 547 tokens
package rfc↵↵/*↵ * ZLint Copyright 2021 Regents of the University of Michigan↵ *↵ * 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.↵ */↵↵import (↵ "encoding/asn1"↵↵ "github.com/zmap/zcrypto/x509"↵ "github.com/zmap/zlint/v3/lint"↵ "github.com/zmap/zlint/v3/util"↵)↵↵type SubjectDNCountryNotPrintableString struct{}↵↵func init() {↵ lint.RegisterLint(&lint.Lint{↵ Name: "e_subject_dn_country_not_printable_string",↵ Description: "X520 Distinguished Name Country MUST be encoded as PrintableString",↵ Citation: "RFC 5280: Appendix A",↵ Source: lint.RFC5280,↵ EffectiveDate: util.ZeroDate,↵ Lint: &SubjectDNCountryNotPrintableString{},↵ })↵}↵↵func (l *SubjectDNCountryNotPrintableString) Initialize() error {↵ return nil↵}↵↵func (l *SubjectDNCountryNotPrintableString) CheckApplies(c *x509.Certificate) bool {↵ return len(c.Subject.Country) > 0↵}↵↵func (l *SubjectDNCountryNotPrintableString) Execute(c *x509.Certificate) *lint.LintResult {↵ rdnSequence := util.RawRDNSequence{}↵ rest, err := asn1.Unmarshal(c.RawSubject, &rdnSequence)↵ if err != nil {↵ return &lint.LintResult{Status: lint.Fatal}↵ }↵ if len(rest) > 0 {↵ return &lint.LintResult{Status: lint.Fatal}↵ }↵↵ for _, attrTypeAndValueSet := range rdnSequence {↵ for _, attrTypeAndValue := range attrTypeAndValueSet {↵ if attrTypeAndValue.Type.Equal(util.CountryNameOID) && attrTypeAndValue.Value.Tag != asn1.TagPrintableString {↵ return &lint.LintResult{Status: lint.Error}↵ }↵ }↵ }↵↵ return &lint.LintResult{Status: lint.Pass}↵}
Values
Token Positive-pole strength :=0.000 asn0.000 10.000 .Unmarshal0.000 (c0.127 .Raw0.030 Subject0.000 ,0.000 &0.000 rd0.147 n0.000 Sequence0.135 )↵0.000 if0.000 err0.024 !=0.000 nil0.000 {↵0.000 0.012 return0.000 &0.000 lint0.000 .L0.134 int0.112 Result0.000 {0.000 Status0.000 :0.000 lint0.000 .Fatal0.000 }↵4.544 1.529 }↵0.000 if0.000 len0.000 (rest0.132 )0.000 >0.000 0.000 00.000 {↵0.000 -
4.45
… if measure is None:↵ measure = range(len(conf))↵ elif isinstance(measure, (int, long)):↵ measure = [measure]↵ ↵ if hasattr(measure, 'params'):↵ …
All 719 tokens
import numpy as np↵↵import pyle↵from pyle.pipeline import pmap, returnValue↵from pyle.util import getch↵↵↵def prepDataset(sample, name, axes=None, dependents=None, measure=None, cxn=None, kw=None, explicitIndependents=None):↵ """Prepare dataset for a sweep.↵ ↵ This function builds a dictionary of keyword arguments to be used to create↵ a Dataset object for a sweep. Sample should be a dict-like object↵ (usually a copy of the sample as returned by loadQubits) that contains current↵ parameter settings. Name is the name of the dataset, which will get prepended↵ with a list indicating which qubits are in the sample config, and which of them↵ are to be measured. kw is a dictionary of additional parameters that should↵ be added to the dataset.↵ ↵ Axes can be specified explicitly as a tuple of (<name>, <unit>), or else↵ by value for use with grid sweeps. In the latter case (grid sweep), you should↵ specify axes as (<value>, <name>). If value is iterable, the axis will be↵ added to the list of dependent variables so the value can be swept (we look↵ at element [0] to get the units); if value is not iterable it will be added↵ to the dictionary of static parameters.↵ ↵ Dependents is either a list of (<name>, <label>, <unit>) designations for the↵ dependent variables, or None. If no list is provided, then the dependents are↵ assumed to be probabilities. In this case, the measure variable is used to↵ determine the appropriate set of probabilities: for one qubit, we assume only↵ P1 will be measured, while for N qubits all 2^N probabilities are assumed to↵ be measured, in the order P00...00, P00...01, P00...10,..., P11...11. If this↵ is not what you want, you must specify the independent variables explicitly.↵ ↵ Note that measure can be None (all qubits assumed to be measured), an integer↵ (just one qubit measured, identified by index in sample['config']) or a list↵ of integers (multiple qubits measured).↵ ↵ explicitIndependents are independent variables which are explicitly included↵ in the argument of returnValue in func. These variables are added after any↵ independent variables given by axes. It must be either None (default) or a↵ list of tuples. If explicitIndependents is not None, the tuples must be of the↵ form ('label','unit'), where 'label' is the label for the variable, which has↵ unit 'unit'.↵ """↵ conf = list(sample['config'])↵ ↵ # copy parameters↵ kw = {} if kw is None else dict(kw)↵ kw.update(sample) # copy all sample data↵ ↵ if measure is None:↵ measure = range(len(conf))↵ elif isinstance(measure, (int, long)):↵ measure = [measure]↵ ↵ if hasattr(measure, 'params'):↵ # this is a Measurer↵ kw.update(measure.params())↵ else:↵ kw['measure'] = measure↵ ↵ # update dataset name to reflect which qubits are measured↵ for i, q in enumerate(conf):↵ if i in kw['m
Values
Token Positive-pole strength 0.000 if0.007 measure0.141 is0.000 None0.000 :↵0.000 0.000 measure0.000 =0.000 range0.000 (len0.000 (conf0.104 ))↵3.729 0.247 elif0.000 isinstance0.000 (me0.158 asure0.165 ,0.000 (0.000 int0.115 ,0.000 long0.000 )):↵0.000 0.000 measure0.278 =0.000 [0.000 measure0.000 ]↵3.065 ↵4.452 0.000 if0.000 hasattr0.000 (me0.109 asure0.289 ,0.000 '0.102 params0.000 '):↵0.000 0.000 -
4.43
… Parse(byte[] bytes)↵ {↵ if (bytes.Length < 4 || bytes.Length > 4 + MaxReasonPhraseBytesLength) return false;↵↵ var @class = (byte)(bytes[ …
All 322 tokens
using System;↵using System.Collections.Generic;↵using System.Linq;↵using System.Text;↵↵namespace STUN.Message.Attributes↵{↵ /// <summary>↵ /// https://tools.ietf.org/html/rfc5389#section-15.6↵ /// </summary>↵ public class ErrorCodeAttribute : IAttribute↵ {↵ public IEnumerable<byte> Bytes↵ {↵ get↵ {↵ var res = new List<byte> { 0, 0, Class, Number };↵ res.AddRange(Encoding.UTF8.GetBytes(ReasonPhrase).Take(MaxReasonPhraseBytesLength));↵ return res;↵ }↵ }↵↵ public ushort ErrorCode { get; set; }↵ public string ReasonPhrase { get; set; }↵↵ public byte Class => (byte)(ErrorCode % 1000 / 100);↵ public byte Number => (byte)(ErrorCode % 100);↵↵ public const int MaxReasonPhraseBytesLength = 762;↵↵ public bool TryParse(byte[] bytes)↵ {↵ if (bytes.Length < 4 || bytes.Length > 4 + MaxReasonPhraseBytesLength) return false;↵↵ var @class = (byte)(bytes[2] & 0b111);↵ var number = Math.Min(bytes[3], (ushort)99);↵↵ ErrorCode = (ushort)(@class * 100 + number);↵↵ ReasonPhrase = bytes.Length > 4 ? Encoding.UTF8.GetString(bytes, 4, bytes.Length - 4) : string.Empty;↵↵ return true;↵ }↵ }↵}
Values
Token Positive-pole strength Parse0.000 (byte0.000 []0.024 bytes0.208 )↵0.000 0.000 {↵0.000 0.000 if0.000 (0.000 bytes0.166 .Length0.063 <0.097 0.080 40.049 ||0.000 bytes0.000 .Length0.000 >0.000 0.000 40.030 +0.000 Max0.000 Reason0.014 Phrase0.000 Bytes0.000 Length0.002 )0.000 return0.000 false1.100 ;↵↵4.428 0.000 var0.000 @0.173 class0.145 =0.023 (0.155 byte0.000 )(0.019 bytes0.197 [0.000 -
4.32
… conditions are met:↵ *↵ * Redistributions of source code must retain the above copyright notice,↵ * this list of conditions and the following disclaimer.↵ *↵ * Redistributions in binary form must reproduce the above copyright …
All 476 tokens
/*↵ * Repast for High Performance Computing (Repast HPC)↵ *↵ * Copyright (c) 2010 Argonne National Laboratory↵ * All rights reserved.↵ *↵ * Redistribution and use in source and binary forms, with↵ * or without modification, are permitted provided that the following↵ * conditions are met:↵ *↵ * Redistributions of source code must retain the above copyright notice,↵ * this list of conditions and the following disclaimer.↵ *↵ * Redistributions in binary form must reproduce the above copyright notice,↵ * this list of conditions and the following disclaimer in the documentation↵ * and/or other materials provided with the distribution.↵ *↵ * Neither the name of the Argonne National Laboratory nor the names of its↵ * contributors may be used to endorse or promote products derived from↵ * this software without specific prior written permission.↵ *↵ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS↵ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT↵ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A↵ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TRUSTEES OR↵ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,↵ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,↵ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR↵ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF↵ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING↵ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,↵ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.↵ *↵ *↵ * Zombie.h↵ *↵ * Created on: Sep 1, 2010↵ * Author: nick↵ */↵↵#ifndef ZOMBIE_H_↵#define ZOMBIE_H_↵↵#include "relogo/Turtle.h"↵↵class Human;↵↵class Zombie : public repast::relogo::Turtle {↵public:↵ Zombie(repast::AgentId id, repast::relogo::Observer* obs) : repast::relogo::Turtle(id, obs) {}↵ virtual ~Zombie() {}↵↵ void step();↵ void infect(Human* human);↵};↵↵#endif /* ZOMBIE_H_ */
Values
Token Positive-pole strength conditions0.047 are0.000 met0.000 :↵0.445 *↵0.675 *0.880 0.000 Redistributions0.000 of0.000 source0.000 code0.000 must0.000 retain0.152 the0.056 above0.000 copyright0.299 notice0.227 ,↵0.137 *0.351 0.000 this0.000 list0.215 of0.124 conditions0.074 and0.057 the0.000 following0.141 disclaimer0.000 .↵1.374 *↵1.634 *4.322 0.000 Redistributions0.000 in0.000 binary0.262 form0.000 must0.000 reproduce0.061 the0.065 above0.021 copyright0.283 -
3.99
… & dict↵)↵{↵ if (dict.found("restraints"))↵ {↵ const dictionary& restraintDict = dict.subDict("restraints");↵↵ label i = 0;↵↵ restraints …
All 723 tokens
/*---------------------------------------------------------------------------*\↵ ========= |↵ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox↵ \\ / O peration |↵ \\ / A nd | Copyright (C) 2016 OpenFOAM Foundation↵ \\/ M anipulation |↵-------------------------------------------------------------------------------↵License↵ This file is part of OpenFOAM.↵↵ OpenFOAM 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 3 of the License, or↵ (at your option) any later version.↵↵ OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>.↵↵\*---------------------------------------------------------------------------*/↵↵#include "rigidBodyModel.H"↵#include "masslessBody.H"↵#include "compositeBody.H"↵#include "jointBody.H"↵#include "nullJoint.H"↵#include "rigidBodyRestraint.H"↵↵// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //↵↵namespace Foam↵{↵namespace RBD↵{↵ defineTypeNameAndDebug(rigidBodyModel, 0);↵}↵}↵↵↵// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //↵↵void Foam::RBD::rigidBodyModel::initializeRootBody()↵{↵ bodies_.append(new masslessBody("root"));↵ lambda_.append(0);↵ bodyIDs_.insert("root", 0);↵ joints_.append(new joints::null());↵ XT_.append(spatialTransform());↵↵ nDoF_ = 0;↵ unitQuaternions_ = false;↵↵ resizeState();↵}↵↵↵void Foam::RBD::rigidBodyModel::resizeState()↵{↵ Xlambda_.append(spatialTransform());↵ X0_.append(spatialTransform());↵↵ v_.append(Zero);↵ a_.append(Zero);↵ c_.append(Zero);↵↵ IA_.append(spatialTensor::I);↵ pA_.append(Zero);↵↵ S_.append(Zero);↵ S1_.append(Zero);↵ U_.append(Zero);↵ U1_.append(Zero);↵ Dinv_.append(Zero);↵ u_.append(Zero);↵}↵↵↵void Foam::RBD::rigidBodyModel::addRestraints↵(↵ const dictionary& dict↵)↵{↵ if (dict.found("restraints"))↵ {↵ const dictionary& restraintDict = dict.subDict("restraints");↵↵ label i = 0;↵↵ restraints_.setSize(restraintDict.size());↵↵ forAllConstIter(IDLList<entry>, restraintDict, iter)↵ {↵ if (iter().isDict())↵ {↵ restraints_.set↵ (↵ i++,↵ restraint::New↵ (↵ iter().keyword(),↵ iter().dict(),↵ *this↵ )↵ );↵ }↵ }↵↵ restraints_.setSize(i);↵ }↵}↵↵↵// * * * * * * * * * *
Values
Token Positive-pole strength &0.000 dict0.004 ↵1.204 )↵0.000 {↵0.000 0.000 if0.000 (0.000 dict0.000 .f0.000 ound0.000 ("0.000 re0.114 straints0.000 "))↵0.000 0.000 {↵0.000 0.000 const0.000 dictionary0.000 &0.000 restraint0.000 Dict0.000 =0.000 dict0.051 .sub0.000 Dict0.000 ("0.000 re0.000 straints0.231 ");↵↵3.993 0.000 label0.000 i0.000 =0.000 0.000 00.000 ;↵↵1.010 0.000 re0.122 straints0.000 -
3.89
… {↵ List(results.data.values) { data in↵ Text("\(data)")↵ }↵ .onAppear {↵ self.loadData()↵ }↵ }↵↵ func loadData() {↵ //My code to …
All 427 tokens
Q:↵↵How to list with Json with [String:generic struct]↵↵I have this struct, :↵// MARK: - JsonAPIData↵struct JsonAPIData: Codable {↵ let data: [String: APIData]↵ let success: Bool↵}↵↵// MARK: - Datum↵struct APIData: Codable, Identifiable {↵ let id = UUID()↵ let maxVersion, minVersion: Int↵}↵↵and I want to use these Structures to create a list of data in SwiftUI. I tried this:↵struct ContentView: View {↵ @State var results: JsonAPIData↵↵ var body: some View {↵ List(results.data.values) { data in↵ Text("\(data)")↵ }↵ .onAppear {↵ self.loadData()↵ }↵ }↵↵ func loadData() {↵ //My code to load `results`↵ }.resume()↵ }↵}↵↵but I had this error: ↵Initializer 'init(_:rowContent:)' requires that 'Dictionary<String, APIData>.Values' conform to 'RandomAccessCollection'↵↵How can I fix it for list keys and values of APIData?↵↵A:↵↵you can try this: (but keep in mind: if you loop over dictionaries the order is random....)↵struct JsonAPIData: Codable {↵ let data: [String: APIData]↵ let success: Bool↵}↵↵// MARK: - Datum↵struct APIData: Codable, Identifiable {↵ let id = UUID()↵ let maxVersion, minVersion: Int↵}↵↵struct ContentView: View {↵↵ func getKeys() -> [String] {↵ return results.data.map{$0.key}↵ }↵↵ func getValues() -> [APIData] {↵ return results.data.map{$0.value}↵ }↵↵ @State var results: JsonAPIData↵↵ var body: some View {↵ List(getKeys(), id: \.self) { key in↵ Text("\(self.results.data[key]!.maxVersion)")↵ }↵ .onAppear {↵ self.loadData()↵ }↵ }↵↵ func loadData() {↵ //My code to load `results`↵ }
Values
Token Positive-pole strength {↵0.000 0.000 List0.000 (results0.000 .data0.000 .values0.030 )0.000 {0.000 data0.085 in0.000 ↵0.000 0.000 Text0.000 ("\(0.000 data0.000 )")↵0.221 0.037 }↵0.166 0.000 .0.005 on0.000 Appear0.000 {↵0.000 0.000 self0.064 .loadData0.000 ()↵0.886 0.087 }↵0.486 0.886 }↵↵3.889 0.376 func0.000 loadData0.000 ()0.000 {↵0.000 0.000 //0.000 My0.000 code0.000 to0.000 -
3.76
… dust_handler_t↵ {↵ dust_handler_t()↵ : m_dust(0)↵ , m_has_dust(false)↵ {↵ }↵↵ void operator()(uint64_t dust) …
All 810 tokens
// Copyright (c) 2012-2013 The Cryptonote developers↵// Distributed under the MIT/X11 software license, see the accompanying↵// file COPYING or http://www.opensource.org/licenses/mit-license.php.↵↵#include "gtest/gtest.h"↵↵#include <cstdint>↵#include <vector>↵↵#include "currency_core/currency_format_utils.h"↵↵#define VEC_FROM_ARR(vec) \↵ std::vector<uint64_t> vec; \↵ for (size_t i = 0; i < sizeof(vec##_arr) / sizeof(vec##_arr[0]); ++i) \↵ { \↵ vec.push_back(vec##_arr[i]); \↵ }↵↵namespace↵{↵ struct chunk_handler_t↵ {↵ void operator()(uint64_t chunk) const↵ {↵ m_chunks.push_back(chunk);↵ }↵↵ mutable std::vector<uint64_t> m_chunks;↵ };↵↵ struct dust_handler_t↵ {↵ dust_handler_t()↵ : m_dust(0)↵ , m_has_dust(false)↵ {↵ }↵↵ void operator()(uint64_t dust) const↵ {↵ m_dust = dust;↵ m_has_dust = true;↵ }↵↵ mutable uint64_t m_dust;↵ mutable bool m_has_dust;↵ };↵↵ class decompose_amount_into_digits_test : public ::testing::Test↵ {↵ protected:↵ chunk_handler_t m_chunk_handler;↵ dust_handler_t m_dust_handler;↵ };↵}↵↵TEST_F(decompose_amount_into_digits_test, is_correct_0)↵{↵ std::vector<uint64_t> expected_chunks;↵ currency::decompose_amount_into_digits(0, 0, m_chunk_handler, m_dust_handler);↵ ASSERT_EQ(m_chunk_handler.m_chunks, expected_chunks);↵ ASSERT_EQ(m_dust_handler.m_has_dust, false);↵}↵↵TEST_F(decompose_amount_into_digits_test, is_correct_1)↵{↵ std::vector<uint64_t> expected_chunks;↵ currency::decompose_amount_into_digits(0, 10, m_chunk_handler, m_dust_handler);↵ ASSERT_EQ(m_chunk_handler.m_chunks, expected_chunks);↵ ASSERT_EQ(m_dust_handler.m_has_dust, false);↵}↵↵TEST_F(decompose_amount_into_digits_test, is_correct_2)↵{↵ uint64_t expected_chunks_arr[] = {10};↵ VEC_FROM_ARR(expected_chunks);↵ currency::decompose_amount_into_digits(10, 0, m_chunk_handler, m_dust_handler);↵ ASSERT_EQ(m_chunk_handler.m_chunks, expected_chunks);↵ ASSERT_EQ(m_dust_handler.m_has_dust, false);↵}↵↵TEST_F(decompose_amount_into_digits_test, is_correct_3)↵{↵ std::vector<uint64_t> expected_chunks;↵ uint64_t expected_dust = 10;↵ currency::decompose_amount_into_digits(10, 10, m_chunk_handler, m_dust_handler);↵ ASSERT_EQ(m_chunk_handler.m_chunks, expected_chunks);↵ ASSERT_EQ(m_dust_handler.m_dust, expected_dust);↵}↵↵TEST_F(decompose_amount_into_digits_test, is_correct_4)↵{↵ uint64_t expected_dust = 8100;↵ std::vector<uint64_t> expected_chunks;↵ currency::decompose_amount_into_digits(8100, 1000000, m_chunk_handler, m_dust_handler);↵ ASSERT_EQ(m_chunk_handler.m_chunks, expected_chunks);↵ ASSERT_EQ(m_dust_handler.m_dust, expected_dust);↵}↵↵TEST_F(decompose_amount_into_digits_test, is_correct_5)↵{↵ uint64_t expected_chunks_arr[] = {100, 900000, 8000000};↵ VEC_FROM_ARR(expected_chunks);↵ c
Values
Token Positive-pole strength dust0.072 _handler0.000 _t0.000 ↵0.000 0.000 {↵0.000 0.000 dust0.000 _handler0.000 _t0.000 ()↵0.000 0.000 :0.000 m0.334 _d0.249 ust0.148 (0.000 00.081 )↵0.000 0.000 ,0.000 m0.178 _has0.110 _d0.001 ust0.000 (false0.000 )↵0.000 0.000 {↵0.000 0.321 }↵↵3.760 0.000 void0.062 operator0.066 ()(0.000 uint0.116 60.016 40.000 _t0.016 dust0.225 )0.000 -
3.62
… String[] topics = "topicTest1".split(",");↵ for (String topic : topics) {↵ topicMap.put(topic, numThreads);↵ }↵↵ JavaPairReceiverInputDStream<String, String …
All 785 tokens
Q:↵↵Kafka stream not working in spark job↵↵I wrote code to get data from "topicTest1" Kafka Queue. I am not able to print data from the consumer. Error occurred and mentioned below,↵Below is my code to consume data,↵public static void main(String[] args) throws Exception {↵↵ // StreamingExamples.setStreamingLogLevels();↵ SparkConf sparkConf = new SparkConf().setAppName("JavaKafkaWordCount").setMaster("local[*]");↵ ;↵ // Create the context with 2 seconds batch size↵ JavaStreamingContext jssc = new JavaStreamingContext(sparkConf, new Duration(100));↵↵ int numThreads = Integer.parseInt("3");↵ Map<String, Integer> topicMap = new HashMap<>();↵ String[] topics = "topicTest1".split(",");↵ for (String topic : topics) {↵ topicMap.put(topic, numThreads);↵ }↵↵ JavaPairReceiverInputDStream<String, String> messages = KafkaUtils.createStream(jssc, "████████████:9092", "1",↵ topicMap);↵↵ messages.print();↵ jssc.start();↵ jssc.awaitTermination();↵ }↵↵Using following depedencies↵<dependency>↵ <groupId>org.apache.spark</groupId>↵ <artifactId>spark-core_2.10</artifactId>↵ <version>1.6.1</version>↵ </dependency>↵ <dependency>↵ <groupId>org.apache.spark</groupId>↵ <artifactId>spark-streaming-kafka_2.10</artifactId>↵ <version>1.6.1</version>↵ </dependency>↵ <dependency>↵ <groupId>org.apache.spark</groupId>↵ <artifactId>spark-streaming_2.11</artifactId>↵ <version>1.6.1</version>↵ </dependency>↵ <dependency>↵ <groupId>org.apache.spark</groupId>↵ <artifactId>spark-streaming-twitter_2.11</artifactId>↵ <version>1.6.1</version>↵ </dependency>↵↵Below error I got↵ Exception in thread "dispatcher-event-loop-0" java.lang.NoSuchMethodError: scala/Predef$.$conforms()Lscala/Predef$$less$colon$less; (loaded from file:/C:/Users/Administrator/.m2/repository/org/scala-lang/scala-library/2.10.5/scala-library-2.10.5.jar by sun.misc.Launcher$AppClassLoader@4b69b358) called from class org.apache.spark.streaming.scheduler.ReceiverSchedulingPolicy (loaded from file:/C:/Users/Administrator/.m2/repository/org/apache/spark/spark-streaming_2.11/1.6.2/spark-streaming_2.11-1.6.2.jar by sun.misc.Launcher$AppClassLoader@4b69b358).↵ at org.apache.spark.streaming.scheduler.ReceiverSchedulingPolicy.scheduleReceivers(ReceiverSchedulingPolicy.scala:138)↵ at org.apache.spark.streaming.scheduler.ReceiverTracker$ReceiverTrackerEndpoint$$anonfun$receive$1.applyOrElse(ReceiverTracker.scala:450)↵ at org.apache.spark.rpc.netty.Inbox$$anonfun$process$1.apply$mcV$sp(Inbox.scala:116)16/11/14 13:38:00 INFO ForEachDStream: metadataCleanupDelay = -1↵↵ at org.apache.spark.rpc.netty.Inbox.safelyCall(Inbox.scala:204)↵ at org.apache.spark.rpc.netty.Inbox.process(Inbox.scala:100)↵
Values
Token Positive-pole strength String0.000 []0.000 topics0.000 =0.001 "0.000 topic0.000 Test0.000 10.000 ".0.000 split0.017 (",");↵1.630 0.000 for0.000 (0.000 String0.000 topic0.142 :0.000 topics0.000 )0.000 {↵0.000 0.000 topic0.000 Map0.000 .put0.000 (topic0.193 ,0.000 num0.000 Threads0.000 );↵0.891 0.723 }↵↵3.615 0.000 Java0.000 Pair0.000 Receiver0.000 Input0.032 D0.007 Stream0.000 <String0.000 ,0.000 String0.000 -
3.58
… [code];↵ wbArgs.byName = { code: code };↵ return worldbank.timelionFn(wbArgs, tlConfig);↵ });↵↵ return Promise.map(seriesLists, function (series …
All 430 tokens
'use strict';↵↵var _ = require('lodash');↵var fetch = require('node-fetch');↵var moment = require('moment');↵var worldbank = require('./worldbank.js');↵var Promise = require('bluebird');↵var Datasource = require('../lib/classes/datasource');↵↵module.exports = new Datasource('worldbank_indicators', {↵ args: [{↵ name: 'country', // countries/all/indicators/SP.POP.TOTL↵ types: ['string', 'null'],↵ help: 'Worldbank country identifier. Usually the country\'s 2 letter code'↵ }, {↵ name: 'indicator',↵ types: ['string', 'null'],↵ help: 'The indicator code to use. You\'ll have to look this up on data.worldbank.org.' + ' Often pretty obtuse. Eg SP.POP.TOTL is population'↵ }],↵ aliases: ['wbi'],↵ help: '\n [experimental]\n Pull data from http://data.worldbank.org/ using the country name and indicator. The worldbank provides\n mostly yearly data, and often has no data for the current year. Try offset=-1y if you get no data for recent\n time ranges.',↵ fn: function worldbankIndicators(args, tlConfig) {↵ var config = _.defaults(args.byName, {↵ country: 'wld',↵ indicator: 'SP.POP.TOTL'↵ });↵↵ var countries = config.country.split(':');↵ var seriesLists = _.map(countries, function (country) {↵ var code = 'countries/' + country + '/indicators/' + config.indicator;↵ var wbArgs = [code];↵ wbArgs.byName = { code: code };↵ return worldbank.timelionFn(wbArgs, tlConfig);↵ });↵↵ return Promise.map(seriesLists, function (seriesList) {↵ return seriesList.list[0];↵ }).then(function (list) {↵ return {↵ type: 'seriesList',↵ list: list↵ };↵ });↵ }↵});
Values
Token Positive-pole strength [0.000 code0.159 ];↵1.249 0.000 wb0.000 Args0.000 .by0.000 Name0.000 =0.000 {0.000 code0.022 :0.000 code0.000 };↵2.125 0.000 return0.000 world0.026 bank0.000 .tim0.088 el0.000 ion0.000 Fn0.000 (w0.000 b0.000 Args0.000 ,0.000 tl0.000 Config0.000 );↵2.214 0.000 });↵↵3.580 0.000 return0.000 Promise0.000 .map0.000 (series0.186 Lists0.018 ,0.000 function0.000 (0.000 series0.248
Read more
Each token is shaded by positive-pole strength, as a fraction of the neuron's max activation. Each window shows up to 30 tokens before the peak and 10 after it.
Explanation scores on held-out text
How well a judge with only the hypothesis predicts the unit on new text. 0.5 is chance.
Read more
The judge reads 32-token windows of corpus text that the proposer never saw. Detection: it picks the windows that activate the unit. Fuzzing: it checks whether the marked tokens are the active ones. Recorded, not gated.
Detection recall by activation strength
False alarms on inactive windows: 5%.
- Judge
- deepseek-flash
- Held-out windows
- 40 active of 4,000
- Judged
- 40 detection · 30 fuzzing
- Detection outcomes
- 6 missed · 1 false alarm · 14 hit · 19 correct rejection
- Seed
- 1141341407 · mixed-v7 (10 presets, 500 docs, seed [removed])
Detection windows (40), the explanation's mistakes first
- missed 2.21 · sim 0.02 entry'↵ }↵ },↵ sorters: [{↵ property: 'date',↵ direction:'DESC'↵ }, {↵ property: 'start',↵
- missed 2.06 · sim 0.10 path,↵ pid_t *pid) G_GNUC_WARN_UNUSED_RESULT;↵↵int virPidFileDeletePath(const char *path);↵int virPidFile
- missed 2.03 · sim 0.18 pid_t pid) G_GNUC_WARN_UNUSED_RESULT;↵↵int virPidFileReleasePath(const char *path,↵ int fd);↵int virPidFile
- missed 1.88 · sim 0.15 .run(act_shape,↵ act_dtype, out_dtype,↵ ksize, stride,↵ par, value_ram_size, out_ram_size,↵ axi_data
- missed 1.87 · sim 0.21 6 - negative;↵ }↵↵ public static bool FacingWithinTolerance(int facing, int desiredFacing, int facingTolerance)↵ {↵ if
- missed 1.75 · sim 0.11 _private(m1_c3_f3_arg: C2_private) { ↵ } ↵ ↵ public f4_public(m1_c3_f4_arg: C2_private
- false alarm 1.14 · sim 0.14 cean_log(LOG_INFO, "Received data on bus");↵ thread_treat_packet(&packet);↵ cpt = 0;↵ memset(buffer, 0,
- hit 5.19 · sim 0.11 breakpoint to the next instruction↵ frame = self.thread.GetFrameAtIndex(0)↵↵ address = frame.GetPCAddress()↵ instructions = self.target.ReadInstructions
- hit 4.61 · sim 0.11 rightTurn) < rot)↵ return desiredFacing & 0xFF;↵ else if (rightTurn < leftTurn)↵ return (facing + rot
- hit 3.57 · sim 0.29 256);↵ data_len = 0;↵ break;↵ }↵ }↵}↵↵/**↵ * \fn void sig_int(int signum)↵ *
- hit 3.53 · sim -0.03 ologyRemove.svg"))↵ self.removeAPIpath.setToolTip(QCoreApplication.translate("PythonConsole", "Remove API path"))↵↵ self.preloadAPI.stateChanged.connect(self.initial
- hit 3.36 · sim 0.15 ) & 0xFF;↵ else↵ return (facing - rot) & 0xFF;↵ }↵↵ public static int GetNearest
- hit 3.05 · sim 0.12 (↵ self.process, self.breakpoint2)↵ self.assertIsNotNone(↵ self.thread,↵ "Expected one thread to be stopped at breakpoint 2")↵↵
- hit 2.91 · sim -0.00 (↵ "SettingsDialogPythonConsole", "Python Console Settings"))↵ self.parent = parent↵ self.setupUi(self)↵↵ self.listPath = []↵
- hit 2.69 · sim 0.15 "constant"↵ end↵↵ it "File::SEPARATOR" do↵ defined?(File::SEPARATOR).should == "constant"↵ end↵
- hit 2.10 · sim 0.15 to (east|west)↵ var quadrant = ((facing + 31) & 0xFF) / 64;↵ if (qu
- hit 1.99 · sim 0.23 Factory();↵↵ /** The scheme registry for looking up socket factories. */↵ protected SchemeRegistry schemeRegistry;↵↵↵ /**↵ * Creates a
- hit 1.81 · sim 0.10 new C1_public(); ↵ } ↵ ↵ private f7_private() { ↵ return new C2_private(); ↵ } ↵ ↵ public f8_public() { ↵ return
- hit 1.79 · sim 0.10 1_public(); ↵ } ↵ ↵ private f7_private() { ↵ return new C2_private(); ↵ } ↵ ↵ public f8_public() { ↵ return new C
- hit 1.78 · sim 0.13 ;↵ static uint8_t opt_data_len = 0;↵ static uint8_t packet_type = 0;↵ Enocean_packet packet;↵↵
- hit 1.76 · sim 0.08 Class MockVbi↵ Inherits VisualBasicCompiler↵↵ Public Sub New(responseFile As String, baseDirectory As String, args As String())↵ MyBase.New
- correct rejection 0.99 · sim 0.11 can redistribute it and/or modify↵ * it under the terms of the GNU General Public License version 2↵ * as published by the Free Software Foundation.↵ *↵
- correct rejection 0.91 · sim -0.03 makadirio ya kihafidhina. "↵Utafiti huo pia unaonyesha kiwango cha udahili kat
- correct rejection 0.43 · sim 0.01 import UIKit;↵↵@interface TextFieldPresentationStylesExample : UIViewController <UITextFieldDelegate>↵↵@property(nonatomic, strong) UIScrollView *scrollView;↵↵@end↵↵@interface TextFieldPresentationStylesExample (Sup
- correct rejection 0.40 · sim -0.03 «Никакого тут „секрета“ нет. Каждый забойщик может достигнуть успехов. Я стараюсь зап
- correct rejection 0.40 · sim 0.03 красная деревня") и с. Трошкино. Вокруг села расположены горы Топановская (942 м
- correct rejection 0.35 · sim -0.01 пористая, яркого оранжево-красного цвета, по 6-9 пор на миллиметр. Мяк
- correct rejection 0.35 · sim -0.02 ків Гощaнського рaйону, ��о на Рівненщині.↵Нагада
- correct rejection 0.30 · sim 0.13 problems. They also report fewer depression and trauma symptoms, less chronic pain and improved quality of life.↵A focus on harm reduction↵Equity-oriented health care means
- correct rejection 0.30 · sim 0.06 ίπεδο της ��άλασσας) βρίσκεται στο νοτ
- correct rejection 0.29 · sim -0.10 explosives. Temples were looted and vandalized, with the remains of venerated monks confiscated. In Huế, violent street battles erupted between government forces and
- correct rejection 0.29 · sim -0.00 任(2022.2 -)↵↵脚注↵↵外部リンク ↵↵21世紀日本の女性↵日本の臨床心理士↵修士号取得
- correct rejection 0.27 · sim 0.07 a plethora of cellular processes. Nevertheless, the role of the small Rab GTPases in B lymphocytes, especially in regard to antibody production, remains poorly investigated
- correct rejection 0.24 · sim 0.04 In the initial stages the condition is easily reversible with a simple treatment like tooth cleaning. Receding gums About 85% of people aged 50 years
- correct rejection 0.23 · sim 0.18 ."↵- Repeating exactly what someone else has said (echolalia).↵Examples of disorganized behavior include:↵- Repeating the same activity (word or behavior
- correct rejection 0.23 · sim -0.04 namespace WebsitePanel.WebDav.Core.Config.Entities ↵{ ↵ public class WebsitePanelConstantUserParameters : AbstractConfigCollection ↵ { ↵ public string Login { get
- correct rejection 0.23 · sim 0.17 could I guess check for an existing file, read the entire > thing to memory, then re-write it and then append. On the other hand, > perhaps
- correct rejection 0.20 · sim 0.06 plus the new one.↵This winter, we’re going to be swimming around next to a very bouncy kid, the Boy, El Niño. He’s
- correct rejection 0.15 · sim 0.05 stagnant food production, growing food insecurity, rising food prices, increased vulnerability of the poor, growing malnutrition among the poor, especially the women and children.↵Around
- correct rejection 0.14 · sim 0.00 that I heard.↵Violence against teachers is an increasing concern worldwide, especially at secondary school level with (male) teenagers attacking their teachers. In addition corporal
Fuzzing windows (30), dashed tokens were marked for the judge
- marks right · judged wrong , do not show↵ if (_infoBarOpen)↵ {↵ return;↵ }↵↵ _infoBarOpen = true;↵↵ var optionPageService
- marks right · judged wrong ↵{↵ /**↵ * @param {PIXI.Sprite} sprite - the target sprite↵ */↵ constructor(sprite)↵ {↵ const maskMatrix =
- marks right · judged wrong [{"Type":"Backup","TypeValue":20613},↵ {"Type":"Carepack","TypeValue":20642}],↵ UN
- marks right · judged wrong type: 'ajax',↵ url: url + 'getData/days/3',↵ reader: {↵ type: 'json',↵ record: '
- marks right · judged wrong ) { // error ↵ } ↵ ↵ private f5_private() { ↵ return new C1_public(); ↵ } ↵ ↵ public f6_public() { ↵ return
- marks wrong · judged wrong (key,item){↵ dataValue = item[i].CI;↵ if(!result[dataValue]){↵ result[dataValue] = [];↵ i++;↵ }↵
- marks right · judged right (frame > 18)↵ return frame + 6;↵ if (frame > 4)↵ return frame + 3;↵ return frame
- marks wrong · judged wrong 255);↵ cpt = 0;↵ data_len = 0;↵ return;↵ }↵↵ while ((len = read(enocean
- marks wrong · judged wrong self.assertIsNotNone(↵ self.thread,↵ "Expected one thread to be stopped at breakpoint 2")↵↵ self.finish_test()↵↵ @no_debug_info_test
- marks right · judged right Address(↵ self.target))↵ self.thread = lldbutil.get_one_thread_stopped_at_breakpoint(↵ self.process, self.breakpoint2)↵
- marks wrong · judged wrong int slave_listen_sock)↵{↵ int ret_select;↵ fd_set rfds;↵ fd_set wfds;↵↵ g_flag = 1;↵
- marks wrong · judged wrong } ↵ } ↵ ↵ class C8_private { ↵ constructor (m1_c8_c: C2_private) { ↵ } ↵ } ↵ ↵ function f
- marks right · judged right should == "constant"↵ end↵↵ it "File::RDWR" do↵ defined?(File::RDWR).should == "constant"↵
- marks wrong · judged wrong ↵ end↵↵ it "File::NONBLOCK" do↵ defined?(File::NONBLOCK).should == "constant"↵ end↵↵ it
- marks right · judged right node.Area = (String)element.Attribute("area");↵ node.Children = GetNodes(element, node);↵ node.Parent = parent;↵↵ nodes.Add(node);↵
- marks wrong · judged wrong chklist),↵ SCTP_M_AUTH_CL);↵ if (chklist == NULL) {↵ SCTPDBG(SCTP_DEBUG_AUTH1, "s
- marks right · judged right }↵↵ public static int QuantizeFacing(int facing, int numFrames)↵ {↵ var step = 256 / numFrames;↵
- marks wrong · judged wrong }↵↵ private IEnumerable<MvcSiteMapNode> GetNodes(XElement siteMap, MvcSiteMapNode parent)↵ {↵ List<MvcSiteMap
- marks wrong · judged wrong return delta <= facingTolerance || delta >= 256 - facingTolerance;↵ }↵↵ public static WPos BetweenCells(World w, C
- marks wrong · judged wrong Support {↵↵ private static final Logger log = LoggerFactory.getLogger(EntityManagementSupport.class);↵ ↵ public EntityManagementSupport(AbstractEntity entity) {↵ this.entity = entity
- marks wrong · judged wrong πογραφή του 2011 είχε πληθυσμό 1.420
- marks wrong · judged wrong 支安打,另有5次����和5分打點,可說是本系列賽的MVP。紅雀其他選手
- marks wrong · judged wrong this principle, this essay claims that inter- and intrafamily solidarity are critical aspects of a Christian family ethics emanating from Latina/o theological anthropology and family practices.
- marks wrong · judged wrong Old Spice's "The Man Your Man Could Smell Like" campaign: This campaign featured a series of hum
- marks wrong · judged wrong FWD has a starting MSRP of $23,200, while the SE AWD has a starting MSRP of $24,6
- marks wrong · judged wrong not, you are missing our fast-growing Tower Garden. We are growing greens and herbs for our classes and we are thrilled at how fast it is growing. Have
- marks wrong · judged wrong will be the router to connect the internal network to the internet, it should be multi-homed with two vNICs, I have created a second standard v
- marks wrong · judged wrong the appendage. Things only started to go wrong as they left the jump stage. The lizards began flipping back by more than 30deg; some
- marks wrong · judged wrong in Galaxy phones conveniently. In the following article, we will show you how Kies manages music, photos and videos.↵↵How to Transfer Music from Computer to Samsung
- marks wrong · judged wrong Galaxy S8 or S8 PlusAs the music is one of the most important ways of entertainment in our spare time, people always want to download some music files
Activation and mechanism
Activation distribution
Positive-pole strength per token; bar height is log(1 + count).
Mechanism
Claimed retrospective: responds to tokens already in context.
Input attribution
- 0 back
- 5%
- 1 back
- 6%
- 2–4 back
- 5%
- 5–16 back
- 7%
- 17–64 back
- 20%
- 65+ back
- 56%
- #1 at
;:break-1 0.22case-10 0.11-2 0.09switch-17 0.07: -3 0.06 - #2 at
}):}) 0 0.40return-30 0.23':-4 0.19course-53 0.15-31 0.12 - #3 (not converged) at
;:; 0 -0.28continue-1 0.24-2 0.22{ -3 -0.14foreach-35 0.10 - #4 (not converged) at
}:.Fatal-1 0.22return-11 0.20of-370 -0.12the-380 0.09/LICENSE-360 -0.09 - #5 at
:0 0.37] -1 -0.25sample-33 -0.13""" -69 0.07axes-433 -0.07
Shares of the gap to <|endoftext|> at every position but the first · converged on 3 of 5 · mean 182.0 tokens back ·
agreement with replacing one token at a time ρ = 0.22 · reported, not gated
Vocabulary projection
The tokens that this unit's output raises and lowers most.
Jacobian lens
Logit lens
Values
| # | Jacobian lens promotes | suppresses | Logit lens promotes | suppresses | ||||
|---|---|---|---|---|---|---|---|---|
| 1 | olor |
+4.47 | (£ |
-4.76 | ing |
+5.04 | FixedUpdate |
-4.92 |
| 2 | \r |
+4.45 | 罚 |
-4.29 | abal |
+4.51 | OUCH |
-4.87 |
| 3 | .</ |
+4.31 | 罚款 |
-4.25 | 方法 |
+4.38 | ECTOR |
-4.75 |
| 4 | ulia |
+4.23 | beat |
-4.22 | ar |
+4.31 | 玓 |
-4.60 |
| 5 | .< |
+4.21 | ckeditor |
-4.12 | al |
+4.17 | ILLISE |
-4.60 |
| 6 | Randolph |
+4.14 | '&& |
-4.10 | Method |
+4.12 | AndHashCode |
-4.49 |
| 7 | \ |
+4.11 | 进城 |
-4.08 | func |
+4.12 | krist |
-4.41 |
| 8 | inati |
+4.09 | bets |
-4.08 | 方 |
+4.11 | layui |
-4.35 |
| 9 | \AppData |
+4.05 | 债 |
-4.00 | начен |
+4.08 | LTE |
-4.34 |
| 10 | Salv |
+4.03 | voters |
-3.95 | Sp |
+4.05 | INTERN |
-4.24 |
Top-10 overlap 0% · cos(w, J·w) 0.50 · kurtosis 3.2 (Jacobian) / 3.2 (logit) · 100 prompts
Read more
The output direction is read through the final norm and the unembedding. The Jacobian lens first carries it to the last layer. Bar length is the token's z-score over the vocabulary, and ␣ marks a space. A kurtosis near 3 means no specific set of tokens.
Patchscope
The model's own description of this unit's output, with no examples.
Read more
The unit's direction replaces the residual stream after the named layer, at the ? of each prompt. It is scaled to each multiple of the norm it replaces, and the model continues greedily. The control injects a random direction, so text that both rows share comes from the prompt. Read after the proposer answered, and shown to neither agent. Reported, not gated.
| Prompt | Layer | ×1 | ×2 | ×4 | |
|---|---|---|---|---|---|
| category | 2 | unit | politics | adjective | noun |
| control | period | emotion | animal | ||
| category | 15 | unit | animal | person | person |
| control | food | food | food | ||
| meaning | 2 | unit | ____. | to be used in a relative sense. For example, " | "of or relating to the lower part of the ear, |
| control | to increase the value of something. It is used to describe | to be used in a positive way. It is not to | "to be the subject of a verb, to be the | ||
| meaning | 15 | unit | "not specified" or "unknown". It is used to | "not specified" or "unknown". It is used to | "not specified" or "unknown". It is used to |
| control | "not specified" or "unknown". It is used to | "not specified" or "unknown". It is used to | "not specified" or "unknown". It is used to |
Hover a prompt's name for its text.
Steering
What the model writes with this pole ablated, untouched, and clamped. Text that matches the baseline is faded.
Read more
The prompts are neutral. The clamp is a multiple of the top activation in the scan (6.84), at every token, and decoding is greedy. Drift at ×1 or ×2 shows what the pole makes the model write. Drift only at ×4 is off-distribution. At most 24 new tokens. Taken after the proposer answered, and shown to neither agent. Reported, not gated.
sunny. It's a good day to go for a walk. I'm going to the park. I'm going to
sunny. It's a good day to go for a walk. I'm going to the park. I'm going to
sunny. It's a good day to go for a walk. I like to go for a walk in the morning.
sunny. It is _______ weather.____ A. a B. a C. a D.
______ weather in the world. ______ weather in the world is Shanghai. ______ weather Shanghai. weather, Shanghai, weather,
a lot of things. I ________ a lot of things. A. bought B. bought C. am buying D
a lot of things. I ________ a lot of things. A. bought B. bought C. am buying D
some books. I bought 10 books. I bought 2 more books than I bought books last month. How
some books. I bought 10 books. I bought 2 more books than I bought books in the library.
some books. I _______ the books in the library. A. read B. read C. reading
to do it. This is the motto of the University of the Philippines (UP) and the University of the Philippines Health
to do it. This is the motto of the University of the Philippines (UP) and the University of the Philippines Health
to do it. That’s why we have a wide range of online courses that are designed to help you learn a new
to do it. That is the philosophy of the University of the Philippines, which is why the Department of Mathematics and Statistics
to do it. I have a passion for learning and I have a passion for the world. I have a passion for
there was a little girl named Lily. She loved to play with her toys and watch the stars. One day, she
there was a little girl named Lily. She loved to play with her toys and watch the stars. One day, she
there was a farmer who had a small garden. He planted carrots and potatoes in his garden. He noticed that the carrots
there was a farmer who had a small garden. He planted carrots, tomatoes, and cucumbers. He also had
a group of friends, Alex, Jamie, and Jamie, decided to play a game. They created a set of numbers
the 2010 census showed that the population of the United States was 318,000
the 2010 census showed that the population of the United States was 318,000
the United States should not be a leader in the global fight against climate change. The report also recommended that the United States
the United States should not have a policy of isolationism. The report also recommended that the United States should have a policy
the United Kingdom should have a more ambitious target for the number of people who could be supported in the United Kingdom. The
Wiring
The units that write most directly into this pole (upstream) and read most directly from it (downstream). See its circuit.
Read more
"Directly" means along the residual stream, through no other unit. Linked units have pages in the registry. Reported, not gated.
From the weights. Virtual weights, with each norm's gain folded in. They rank units but have no absolute scale. Each number is how much one unit reads of the other's write. It is signed when one vector reads another (+ means a positive activation raises the read), and a norm otherwise. Heads count through their OV circuit upstream, and through their Q, K and V reads downstream. Channels are on hover.
From activations. Averaged over this pole's peak on 17 of the review's prompts where it fired. Upstream: the first-order change in its strength when a unit's direct write is removed (+ excites). Downstream: the change in a later unit when this pole's write is removed from that unit's input alone (one of Q, K or V for a head).
From the weights
Upstream neurons
| L14/N3869 | gate | -0.131 |
| L14/N258 | gate | +0.12 |
| L9/N208 | gate | -0.118 |
| L14/N2118 | gate | +0.114 |
| L12/N1638 | gate | +0.107 |
| L11/N664 | gate | -0.104 |
| L14/N1261 | gate | +0.104 |
| L11/N2633 | gate | +0.101 |
| L14/N4150 | gate | -0.0996 |
| L14/N4038 | gate | -0.097 |
Upstream heads
| L12/H5 | up | +0.265 |
| L10/H1 | gate | +0.254 |
| L12/H1 | up | +0.247 |
| L12/H4 | up | +0.237 |
| L10/H4 | up | +0.233 |
| L14/H6 | gate | +0.23 |
| L11/H7 | gate | +0.229 |
| L10/H0 | gate | +0.229 |
| L12/H3 | gate | +0.226 |
| L13/H10 | gate | +0.225 |
Downstream neurons
| L21/N567 | up | +0.409 |
| L17/N3665 | gate | +0.154 |
| L19/N4025 | gate | -0.15 |
| L18/N3626 | gate | +0.15 |
| L19/N369 | up | -0.139 |
| L16/N3466 | gate | +0.124 |
| L16/N444 | up | +0.123 |
| L22/N3011 | gate | -0.121 |
| L19/N3026 | gate | -0.12 |
| L19/N753 | gate | -0.117 |
Downstream heads
| L16/H8 | q | +0.407 |
| L16/H0 | q | +0.347 |
| L16/H11 | q | +0.337 |
| L21/H7 | v | +0.313 |
| L21/H8 | v | +0.313 |
| L21/H9 | v | +0.313 |
| L21/H10 | v | +0.313 |
| L21/H11 | v | +0.313 |
| L21/H12 | v | +0.313 |
| L21/H13 | v | +0.313 |
From activations
Upstream neurons
| L14/N1183 | +0.959 | |
| L7/N50 | +0.686 | |
| L13/N3893 | +0.617 | |
| L14/N851 | -0.523 | |
| L5/N2212 | +0.441 | |
| L6/N207 | -0.337 | |
| L7/N37 | +0.277 | |
| L10/N1075 | -0.245 | |
| L11/N2506 | +0.208 | |
| L9/N208 | +0.205 |
Upstream heads
| L14/H1 | -0.842 | |
| L10/H6 | -0.628 | |
| L14/H2 | +0.594 | |
| L1/H12 | -0.422 | |
| L1/H11 | -0.42 | |
| L12/H8 | +0.396 | |
| L8/H3 | -0.394 | |
| L14/H0 | +0.34 | |
| L15/H2 | -0.335 | |
| L14/H6 | +0.329 |
Downstream neurons
| L16/N323 | +1.69 | |
| L16/N5 | -1.52 | |
| L16/N3838 | +1.27 | |
| L23/N3383 | -1.26 | |
| L16/N1775 | +1.18 | |
| L23/N1863 | -1.09 | |
| L22/N1834 | +1.06 | |
| L23/N1396 | +1.06 | |
| L16/N3488 | -0.915 | |
| L21/N3936 | +0.868 |
Downstream heads
| L18/H12 | q | +0.692 |
| L21/H9 | v | +0.488 |
| L16/H8 | q | +0.476 |
| L16/H11 | q | +0.446 |
| L19/H8 | v | +0.407 |
| L18/H9 | v | +0.371 |
| L18/H7 | q | +0.294 |
| L18/H11 | q | +0.278 |
| L23/H1 | v | +0.268 |
| L16/H7 | q | +0.257 |
Covariance and confounds
Confounds
- Token identity R²
- 0.42
- Position R²
- 0.01
- Frequency r
- 0.08
- Language R² · MI
- 0.02 · 0.026 bits
- Source R² · MI
- 0.01 · 0.014 bits
- Programming language R² · MI
- 0.02 · 0.014 bits
- Syntax node R² · MI
- 0.04 · 0.079 bits
- Bracket depth R² · MI
- 0.01 · 0.030 bits
- Round depth R² · MI
- 0.00 · 0.002 bits
- Indent depth R² · MI
- 0.01 · 0.015 bits
- Syntax construct R² · MI
- 0.01 · 0.016 bits
- Personal data R² · MI
- 0.00 · 0.000 bits
- Toxicity R² · MI
- 0.00 · 0.000 bits
- Hate speech R² · MI
- 0.00 · 0.000 bits
- Names R² · MI
- 0.00 · 0.001 bits
- Postal addresses R² · MI
- 0.00 · 0.000 bits
- Best trivial baseline
- never active · 0.42
- Hypothesis
- 0.92 ✓
}
);
};
();
};
());
))
";
"""
}
Co-activating neuron poles
| Pole | Lift ≥ | Both | ρ | r |
|---|---|---|---|---|
| N4706+ | 91.1 | 176 | +0.01 | +0.29 |
| N1945+ | 71.9 | 145 | +0.11 | +0.22 |
| N3235+ | 71.3 | 144 | +0.06 | +0.25 |
| N348+ | 55.5 | 116 | -0.02 | +0.04 |
| N3205+ | 54.9 | 115 | -0.09 | -0.00 |
| N883− | 53.3 | 112 | +0.09 | -0.19 |
| N3053− | 49.0 | 104 | +0.04 | -0.13 |
| N242− | 46.3 | 99 | +0.04 | -0.19 |
| N695+ | 44.1 | 95 | +0.07 | +0.11 |
| N1262− | 41.5 | 90 | +0.14 | -0.17 |
Read more
Ranked by the 95% lower bound of co-activation lift: how much more often a pole fires when this one does, with chance coincidences discounted. ρ ranks the values, so heavy tails don't sway it.
Joint ablation
- Partners
- N4706, N1945, N3235
- KL pole alone
- 5.94e-04
- KL partners
- 3.30e-03
- KL together
- 3.16e-03
- Redundancy ratio
- -0.24
With the partners already removed, also removing this pole adds little: its effect overlaps with theirs (a shared pathway).
Run details
- Submitted by
- deepseek-flash
- Reviewed by
- deepseek-flash (same model as the proposer: not an independent review)
- Reviewed at
- 2026-11-12 23:43 UTC
- Max activation
- 6.8386
- Selection
- random (seed 2644578516)
- Corpus
- mixed-v7 (10 presets, 500 docs, seed [removed]) · 199,970 tokens · seeded sample of 357/500 docs (≤ 200,000 tokens, seed 0) · licence HuggingFaceFW/fineweb-edu: odc-by; allenai/c4: odc-by; monology/pile-uncopyrighted: other; Salesforce/wikitext: cc-by-sa-3.0, gfdl; codeparrot/github-code-clean: apache-2.0; wikimedia/wikipedia: cc-by-sa-3.0, gfdl; open-web-math/open-web-math: odc-by; HuggingFaceH4/ultrachat_200k: mit; HuggingFaceFW/fineweb-2: odc-by; allenai/peS2o: odc-by
- Languages
- en 68% · el 6% · ru 4% · hi 3% · ko 3% · bn 2% · de 2% · ta 1% · other 12%
- Model revision
- 060db6499f32 · float32
- Ran on
- scan mps:0 · review mps:0
- Run cost
- 64.1 min (slowest: judge, 22.9 min) · peak 4.6 GB RAM · 4 LLM calls · 3,305,147 + 459,356 tokens · $0.29