This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > library(ellmer) | |
| 1/4 packages newly attached/loaded, see sessionInfo() for details. | |
| > ch = chat_ollama(model="qwen3-coder:30b") | |
| > ch$chat("Discuss how to evaluate the integral of the Gaussian density function over the whole real line.") | |
| # Evaluating the Gaussian Integral over the Entire Real Line | |
| The integral of the Gaussian density function over the whole real line is a fundamental result in mathematics and | |
| statistics: | |
| $$\int_{-\infty}^{\infty} e^{-x^2/2} dx = \sqrt{2\pi}$$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(littleDeep) | |
| library(processx) | |
| tf = tempfile() | |
| fstr = paste0(">>", tf) | |
| #file.create(tf) | |
| basecmd = sprintf("/Users/vincentcarey/INSTRUMENTATION/macmon/target/release/macmon") | |
| pp = process$new(basecmd, c("pipe"), stdout=fstr) | |
| suppress_keras_warnings() | |
| r1 = run_cifar100(nEpochs=3) | |
| pp$kill() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #> dput(dev) | |
| alogit = function(x) exp(x)/(1+exp(x)) | |
| dev = function (y, x) | |
| function(b) { | |
| phat = alogit(x %*% b) | |
| -2 * sum(y * log(phat) + (1 - y) * (log(1 - phat))) | |
| } | |
| Y = 1*(iris$Species == "virginica") | |
| X = data.matrix(cbind(1., iris[,1:4])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| available_sdio produces: | |
| > reticulate::py_last_error() | |
| ── Python Exception Message ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── | |
| Traceback (most recent call last): | |
| File "C:\Users\stvjc\AppData\Local\R\win-library\4.6\reticulate\python\rpytools\loader.py", line 122, in _find_and_load_hook | |
| return _run_hook(name, _hook) | |
| ^^^^^^^^^^^^^^^^^^^^^^ | |
| File "C:\Users\stvjc\AppData\Local\R\win-library\4.6\reticulate\python\rpytools\loader.py", line 96, in _run_hook | |
| module = hook() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(GenomicState) | |
| library(RSQLite) | |
| library(txdbmaker) | |
| hgenc49 = gencode_txdb( | |
| version = "49", | |
| genome = c("hg38"), | |
| chrs = paste0("chr", c(seq_len(22), "X", "Y", "M")) | |
| ) | |
| hgenc49$conn # 'path' is empty | |
| md = dbGetQuery(hgenc49$conn, "select * from metadata") # lacks 'Resource URL' record in metadata |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 8/51 [install-miniconda] | |
| trying URL 'https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh' | |
| Content type 'application/octet-stream' length 105158150 bytes (100.3 MB) | |
| ================================================== | |
| downloaded 100.3 MB | |
| PREFIX=/root/.local/share/r-miniconda | |
| Unpacking bootstrapper... | |
| Unpacking payload... | |
| Extracting _libgcc_mutex-0.1-conda_forge.tar.bz2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > query(ah, c("GENCODE", "human")) | |
| AnnotationHub with 87 records | |
| # snapshotDate(): 2025-10-29 | |
| # $dataprovider: GENCODE, Gencode, BroadInstitute, ENCODE | |
| # $species: Homo sapiens | |
| # $rdataclass: GRanges, list, TxDb, SQLiteConnection | |
| # additional mcols(): taxonomyid, genome, description, | |
| # coordinate_1_based, maintainer, rdatadateadded, preparerclass, tags, | |
| # rdatapath, sourceurl, sourcetype | |
| # retrieve records with, e.g., 'object[["AH49010"]]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(DelayedArray) | |
| setClass("plBedSeed", | |
| contains="Array", | |
| slots = c( | |
| dim = "integer", | |
| bedreaderRef = "ANY", | |
| dimnames = "list" | |
| ) | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| make1zip = function(pname, target="zips322") { | |
| if (!dir.exists(target)) dir.create(target) | |
| target = file.path(getwd(), target) | |
| ins = try(BiocManager::install(pname, ask=FALSE, update=FALSE, type="binary", | |
| dependencies=TRUE, force=TRUE)) # acquire dependencies as needed | |
| if (inherits(ins, "try-error")) stop(sprintf("can't install %s with BiocManager", pname)) | |
| #real_inst = try(install.packages(pname, type="source", repos=NULL)) # this uses native windows build tools from Rtools | |
| bpath = pkgbuild::build(pname) | |
| if (inherits(bpath, "try-error")) stop(sprintf("can't build %s from source", pname)) | |
| install.packages(bpath, type="source", repos=NULL) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(BiocPkgTools) | |
| all322 = biocPkgList(version="3.22", repo="BioCsoft")$Package | |
| library(BiocBuildTools) # from github vjcitn | |
| set322=PackageSet(all322, biocversion="3.22", branchname="RELEASE_3_22") | |
| dir.create("srcs_322") | |
| populate_local_gits(set322, gitspath="srcs_322") |
NewerOlder