neuron-explorer
Qwen3.5‑4B 전용 조향형 뉴런 탐색기, 모든 MLP 뉴런을 밀어 결과를 보관·탐색
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
ResizeArrayT is an F# extension and module library for ResizeArray ( = Collection.Generic.List).
It provides all the functions from the Array module in FSharp.Core for ResizeArray.
And more.
It also works in Javascript and Typescript with Fable.
This library was designed for use with F# scripting.
Functions and methods never return null.
When a function fails on invalid input it will throw a descriptive exception.
Functions starting with try... will return an F# option.README 전문 보기 ↗ResizeArrayT is an F# extension and module library for ResizeArray<'T> ( = System.Collections.Generic.List<'T>).
It provides all the functions from the Array module in FSharp.Core for ResizeArray.
And more.
It also works in Javascript and Typescript with Fable.
This library was designed for use with F# scripting.
Functions and methods never return null.
When ResizeArrayT rejects invalid input, it throws a descriptive exception such as ResizeArrayTArgumentException, ResizeArrayTArgumentNullException, or ResizeArrayTKeyNotFoundException.
Each type inherits from its corresponding .NET exception type, so existing .NET exception handlers still work. Index errors use IndexOutOfRangeException directly because that type is sealed.
Functions starting with try... will return an F# option.
I was always annoyed that an IndexOutOfRangeException does not include the actual bad index nor the actual size of the array.
This library fixes that in the resizeArray.Get, resizeArray.Set, resizeArray.SliceIdx and similar instance methods for item access.
I made a similar library for array<'T>: https://github.com/goswinr/ArrayT/ .
Yes, F#'s array and list modules can do these kind of operations on collections too. But ResizeArray, being mutable, still offers the best performance for collections that can expand & shrink and need random access via an index. In fact FSharp.Core uses a very similar module internally.
A ResizeArray module that has all functions from Array module from FSharp.Core reimplemented.
Including a Parallel sub module with all functions from Array.Parallel, like map, choose, reduce, sum, groupBy and sort.
A Computational Expressions resizeArray that can be used like existing ones for seq.
Support for F# slicing operator and indexing from the end. e.g: items.[ 1 .. ^1].
(Indexing from the end with ^ still needs <LangVersion>preview</LangVersion> in your project, or dotnet fsi --langversion:preview.)
Extension members on ResizeArray like .Get .Set .First .Last .SecondLast and more.
With nicer IndexOutOfRangeException messages that include the bad index and the actual size.
All Tests from FSharp.Core's Array module ported and adapted to run in both javascript and dotnet.
The main namespace is ResizeArrayT.
It was renamed from ResizeArray to ResizeArrayT in release 0.23. When used in scripting this helps avoid name collisions with the
module inside of the same name. Reference Issue
Older versions of the library will still work with the old namespace ResizeArray.
And can be found on nuget.org with the name ResizeArray.
Just open the namespace
open ResizeArrayT
this namespace contains:
ResizeArrayresizeArrayResizeArray<'T>then you can do:
let evenNumbers =
resizeArray { // a Computational Expression like seq
for i = 0 to 99 do
if i % 2 = 0 then
i
}
let oddNumbers = evenNumbers |> ResizeArray.map (fun x -> x + 1) // ResizeArray module
let ninetyNine = oddNumbers.Last // Extension member to access the last item in the list
The resizeArray { ... } builder supports for, while, yield, yield!, try/with, try/finally, and use:
// Yield individual items and sequences
let mixed =
resizeArray {
1
2
yield! [3; 4; 5] // yield from any seq
for i in 6..10 do
i
}
// Filter inside the builder
let primes =
resizeArray {
for n = 2 to 50 do
let mutable isPrime = true
for d = 2 to int (sqrt (float n)) do
if n % d = 0 then isPrime <- false
if isPrime then n
}
Access items with descriptive error messages that include the bad index and the collection size:
let items = ResizeArray([| "a"; "b"; "c"; "d"; "e" |])
items.First // "a"
items.Second // "b"
items.Last // "e"
items.SecondLast // "d"
items.LastIndex // 4
// Negative indexing (Python-style: -1 is last item)
items.GetNeg(-1) // "e"
items.GetNeg(-2) // "d"
// Looped indexing (wraps around)
items.GetLooped(7) // "c" (index 7 wraps to index 2)
// Status checks
items.IsEmpty // false
items.IsNotEmpty // true
items.HasItems // true
items.IsSingleton // false
F# slicing notation is fully supported, including indexing from the end with ^.
Just like for F# arrays, out-of-range indices are clamped when getting a slice.
Indexing from the end still needs <LangVersion>preview</LangVersion> in your project, or dotnet fsi --langversion:preview in scripts.
let nums = ResizeArray([| 10; 20; 30; 40; 50 |])
nums.[1..3] // ResizeArray [20; 30; 40]
nums.[..2] // ResizeArray [10; 20; 30]
nums.[2..] // ResizeArray [30; 40; 50]
nums.[1..^1] // ResizeArray [20; 30; 40] (from index 1 to second-last)
nums.[^0] // 50 (last item)
nums.[3..9] // ResizeArray [40; 50] (clamped)
To get an exception for out-of-range indices instead, use SliceNeg or SliceIdx. SliceLooped wraps any index around with modulo. They all include the end index:
nums.SliceNeg(1, -2) // ResizeArray [20; 30; 40] (negative indices allowed, -1 is the last item)
nums.SliceIdx(1, 3) // ResizeArray [20; 30; 40] (throws on negative indices)
nums.SliceLooped(-2, -1) // ResizeArray [40; 50] (any index wraps around with modulo)
nums.SliceLooped(5, 6) // ResizeArray [10; 20] (5 wraps to 0, 6 to 1)
// Module functions
nums |> ResizeArray.sliceNeg 1 -2
nums |> ResizeArray.sliceIdx 1 3
nums |> ResizeArray.sliceLooped -2 -1
These work the same in ArrayT and Str.
Don't confuse them with the built-in nums.Slice(start, count) method of .NET, which takes a count instead of an end index.
For a start index and a count, you can also use ResizeArray.sub.
let xs = ResizeArray([| 1; 2; 3; 4; 5 |])
let last = xs.Pop() // returns 5, xs is now [1; 2; 3; 4]
let second = xs.Pop(1) // returns 2, xs is now [1; 3; 4]
xs.InsertAtStart(0) // xs is now [0; 1; 3; 4]
let copy = xs.Clone() // shallow copy, same as xs.Copy()
All functions from FSharp.Core's Array module are available, plus many extras:
let items = ResizeArray [ 1 .. 100 ]
// Standard functional operations
let doubled = items |> ResizeArray.map (fun x -> x * 2)
let evens = items |> ResizeArray.filter (fun x -> x % 2 = 0)
let total = items |> ResizeArray.sum
// Positional access
let first = items |> ResizeArray.first
let last = items |> ResizeArray.last
let secLast = items |> ResizeArray.secondLast
// Grouping and counting
let grouped = items |> ResizeArray.groupBy (fun x -> x % 3)
let counts = items |> ResizeArray.countBy (fun x -> x % 3)
// Finding duplicates
let dupes = items |> ResizeArray.duplicates
let dupesBy = items |> ResizeArray.duplicatesBy (fun x -> x % 10)
// Partitioning into multiple groups
let trueOnes, falseOnes = items |> ResizeArray.partition (fun x -> x > 3)
let small, medium, large =
items |> ResizeArray.partition3
(fun x -> x < 10)
(fun x -> x < 50)
// Windowed iteration (useful for geometry/polyline processing)
items |> ResizeArray.windowed2 |> Seq.iter (fun (a, b) -> printfn "%A -> %A" a b)
items |> ResizeArray.prevThisNext |> Seq.iter (fun (prev, this', next) -> printfn "%A %A %A" prev this' next)
ResizeArray.groupByDict uses F# structural equality for grouping and dictionary lookups on both .NET and Fable, like Array.groupByDict in ArrayT.
Keys must support equality ('Key : equality); null and None keys are rejected. Elements within each group keep their input order.
let groups = ResizeArray [1; 2; 3; 4; 5] |> ResizeArray.groupByDict (fun x -> [|x % 2|])
groups.[[|1|]] // ResizeArray [1; 3; 5], looked up using a fresh, structurally equal array key
let empty = ResizeArray.empty<int>
let single = ResizeArray.singleton 42
let filled = ResizeArray.create 10 0 // 10 zeros
let inited = ResizeArray.init 5 (fun i -> i * i) // [0; 1; 4; 9; 16]
// From other collections
let fromList = ResizeArray.ofList [1; 2; 3]
let fromArray = ResizeArray.ofArray [|1; 2; 3|]
let fromSeq = ResizeArray.ofSeq (seq { 1..10 })
// To other collections
let asArray = items |> ResizeArray.toArray
let asList = items |> ResizeArray.toList
let asSeq = items |> ResizeArray.toSeq
When an index is out of range, you get a descriptive exception including the bad index and the collection content:
System.IndexOutOfRangeException:
ResizeArray.Get: Can't get index 5 from:
ResizeArray<String> with 3 items:
0: a
1: b
2: c
Open the Operators module to combine collections with ++ and +++:
open ResizeArrayT.Operators
let combined = xs ++ ys // from two ICollection<'T>, preallocates capacity
let combined' = xs +++ ys // from two seq<'T>
A sub module for parallel operations (on .NET only):
let results = items |> ResizeArray.Parallel.map (fun x -> expensiveComputation x)
let chosen = items |> ResizeArray.Parallel.choose (fun x -> tryProcess x)
All core functions are written by hand to ensure performance and correctness. However, AI tools have been used for code review, typo and grammar checking in documentation and to generate not all but many of the tests.
goswinr.github.io/ResizeArrayT
All Tests run in both javascript and dotnet, except the ones for the .NET only Parallel module.
Successful Fable compilation to typescript is verified too.
Go to the tests folder:
cd Tests
The tests use Scriptorium (Scriptorium.Quill as test runner and Scriptorium.Nib for assertions). The same test suite runs unchanged on .NET and in JS via Fable.
For testing with .NET:
dotnet run
for JS testing (Fable compiles the tests and runs them with Node.js) and TS verification:
npm test
see CHANGELOG.md