Skip to content

Commit ca839ec

Browse files
committed
Remove various
1 parent 676948d commit ca839ec

File tree

8 files changed

+430
-110
lines changed

8 files changed

+430
-110
lines changed

custom.scss

Lines changed: 71 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,75 @@ $primary: #034e79;
2929
min-height: fit-content !important;
3030
}
3131

32+
.title {
33+
display: none;
34+
}
35+
3236
/*-- scss:rules --*/
33-
// h1, h2, h3, h4, h5, h6 {
34-
// text-shadow: -1px -1px 0 rgba(0, 0, 0, .3);
35-
// }
37+
h1 {
38+
letter-spacing: .1em;
39+
}
40+
41+
h2 {
42+
letter-spacing: .08em;
43+
}
44+
45+
h3 {
46+
letter-spacing: .06em;
47+
}
48+
49+
h4 {
50+
letter-spacing: .04em;
51+
}
52+
53+
h5 {
54+
letter-spacing: .02em;
55+
}
56+
57+
h6 {
58+
letter-spacing: .01em;
59+
}
60+
61+
.publi {
62+
font-family: Arial, Helvetica, sans-serif;
63+
font-size: 1em;
64+
65+
}
66+
67+
// Remove link styling from article titles and section titles
68+
.card-title a,
69+
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
70+
text-decoration: none !important;
71+
color: inherit !important;
72+
73+
&:hover {
74+
text-decoration: none !important;
75+
color: inherit !important;
76+
}
77+
78+
&:focus {
79+
text-decoration: none !important;
80+
color: inherit !important;
81+
}
82+
83+
&:visited {
84+
color: inherit !important;
85+
}
86+
}
87+
88+
// Specifically for publication titles
89+
.year-section .card-title a {
90+
color: inherit !important;
91+
text-decoration: none !important;
92+
93+
&:hover {
94+
color: $primary !important;
95+
text-decoration: none !important;
96+
}
97+
}
98+
99+
// Override year section titles to use normal text color instead of primary
100+
.year-section h2,
101+
h2.text-primary {
102+
color: inherit !important;
103+
}

getcomputo-pub.fsx

Lines changed: 95 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ open System.IO
1212
open DotNetEnv
1313
open FSharp.Data
1414
open DrBiber
15+
open System.Threading.Tasks
1516

17+
// exit if QUARTO_PROJECT_RENDER_ALL is set in the environment
18+
if System.Environment.GetEnvironmentVariable("QUARTO_PROJECT_RENDER_ALL") = null then
19+
printfn "QUARTO_PROJECT_RENDER_ALL is not set, exiting."
20+
exit 0
1621
// Load environment variables from .env file
1722
Env.Load(".env-secret")
1823

@@ -60,9 +65,19 @@ let getAuthors (d: Dictionary<obj, obj>) =
6065
| last :: list -> (String.concat ", " (list |> Seq.ofList |> Seq.rev)) + " and " + last
6166
| [] -> ""
6267

68+
69+
type RepoBaseError = Repo of string
70+
71+
type RepoError =
72+
| NoQmdFound of RepoBaseError
73+
| NoContentFound of RepoBaseError
74+
| NoFrontMatterFound of RepoBaseError
75+
| BogusFrontMatter of RepoBaseError
76+
6377
let redirectStringRe = Regex(@"URL='(.*)'")
6478

6579
let getAbstract (page: string) =
80+
6681
let htmlFirst = HtmlDocument.Load(page)
6782

6883
let html =
@@ -77,7 +92,9 @@ let getAbstract (page: string) =
7792
|> fun a -> a.Value()
7893
|> redirectStringRe.Match
7994
|> fun m -> m.Groups[1].Value
80-
|> fun p -> HtmlDocument.Load(page + p))
95+
|> fun p ->
96+
printfn "new url to fetch %s" (page + p)
97+
HtmlDocument.Load(page + p))
8198
|> Option.defaultValue htmlFirst
8299

83100
try
@@ -142,14 +159,16 @@ let extractCitation (d: Dictionary<obj, obj>) =
142159
abstract' = d |> getAbstractFromDict
143160
repo = d |> getSomeString "repo"
144161
pdf = d |> getAnotherThing "citation" |> getSomeString "pdf-url"
145-
url = d |> getAnotherThing "citation" |> getSomeString "url" |}
162+
url = d |> getAnotherThing "citation" |> getSomeString "url"
163+
draft = d |> getSomeString "draft" |}
146164

147165
let getPublishedRepoContent (repo: Repository) =
148166
task {
149167
let repoName = repo.Name
150168
let owner = repo.Owner.Login
151169
// get the list of files in the repo
152-
let! repoContents = client.Repository.Content.GetAllContents(owner, repoName, "/")
170+
let! (repoContents: IReadOnlyList<RepositoryContent>) =
171+
client.Repository.Content.GetAllContents(owner, repoName, "/")
153172

154173
let fileQmd =
155174
repoContents
@@ -158,11 +177,25 @@ let getPublishedRepoContent (repo: Repository) =
158177
&& f.Path.EndsWith(".qmd")
159178
&& not (f.Path.Contains("-supp")))
160179
|> Seq.tryHead
161-
|> Option.map (fun f -> f.Path)
180+
|> Option.map _.Path
162181
|> function
163182
| Some path -> Ok path
164183
| None -> Error "No .qmd file found"
165184

185+
let fileQuartoYML =
186+
repoContents
187+
|> Seq.filter (fun f -> f.Type.Value.ToString() = ContentType.File.ToString() && f.Path = "_quarto.yml")
188+
|> Seq.tryHead
189+
|> Option.map _.Path
190+
191+
let! quartoYMLMatch =
192+
match fileQuartoYML with
193+
| Some path -> client.Repository.Content.GetAllContents(owner, repoName, path)
194+
| _ -> Task.FromResult([])
195+
196+
let mainQuartoYML =
197+
quartoYMLMatch |> Seq.tryHead |> Option.map _.Content |> Option.defaultValue ""
198+
166199
match fileQmd with
167200
| Ok path ->
168201
let! content = client.Repository.Content.GetAllContents(owner, repoName, path)
@@ -175,7 +208,8 @@ let getPublishedRepoContent (repo: Repository) =
175208
| _ -> Result.Error "No content found"
176209
|> Result.map (_.Content >> _.Split("---\n"))
177210
|> Result.bind (function
178-
| f when Array.length f > 1 -> Ok f[1]
211+
| f when Array.length f > 1 -> Ok(mainQuartoYML + "\n" + f[1])
212+
| _ when mainQuartoYML.Length > 0 -> Ok mainQuartoYML
179213
| _ -> Error $"No front matter found for repo {repoName}")
180214
|> Result.bind (fun f ->
181215
try
@@ -188,35 +222,76 @@ let getPublishedRepoContent (repo: Repository) =
188222
| Error e -> return Error e
189223
}
190224

191-
let publishedFrontMatters =
225+
let getReposContents filter repos =
192226
repos
193227
|> List.ofSeq
194-
|> List.filter (fun (r: Repository) -> r.Name |> publishedRe.IsMatch)
228+
|> List.filter filter
195229
|> List.map (getPublishedRepoContent >> Async.AwaitTask)
196230
|> Async.Parallel
197231
|> Async.RunSynchronously
198232
|> Array.toList
199233

200-
let serializer = SerializerBuilder().Build()
201234

202-
publishedFrontMatters
203-
|> List.map (function
204-
| Ok d -> Result.Ok d
205-
| Error e -> Error $"Error getting front matter: {e}")
206-
|> List.map (
207-
Result.bind (fun d ->
235+
let publishedFrontMatters: Result<Dictionary<obj, obj>, string> list =
236+
repos |> getReposContents (fun r -> r.Name |> publishedRe.IsMatch)
237+
238+
let getCitationStructure (d: Result<Dictionary<obj, obj>, string>) =
239+
d
240+
|> Result.mapError (fun e -> $"Error getting citation structure: {e}")
241+
|> Result.bind (fun d ->
208242
try
209-
d |> extractCitation |> Result.Ok
243+
d |> extractCitation |> Ok
210244
with e ->
211245
let repoName = d["repo"] :?> string
212-
Result.Error $"Error getting citation structure for {repoName} : {e.Message}")
213-
)
246+
Error $"Error getting citation structure for {repoName} : {e.Message}")
247+
248+
let serializer = SerializerBuilder().Build()
249+
250+
let publishedYML =
251+
publishedFrontMatters
252+
|> List.map getCitationStructure
253+
|> List.choose (function
254+
| Ok d -> Some d
255+
| Error e ->
256+
printfn "Error: %s" e
257+
None)
258+
|> List.sortBy _.date
259+
|> List.rev
260+
|> List.partition (fun d -> d.draft = "true")
261+
262+
publishedYML
263+
|> snd
264+
|> serializer.Serialize
265+
|> (fun n -> File.WriteAllText(Path.Combine(__SOURCE_DIRECTORY__, "site", "published.yml"), n))
266+
267+
publishedYML
268+
|> fst
269+
|> serializer.Serialize
270+
|> (fun n -> File.WriteAllText(Path.Combine(__SOURCE_DIRECTORY__, "site", "pipeline.yml"), n))
271+
272+
repos
273+
|> getReposContents (fun r -> r.Name.StartsWith("published-paper"))
274+
|> List.map getCitationStructure
214275
|> List.choose (function
215276
| Ok d -> Some d
216277
| Error e ->
217278
printfn "Error: %s" e
218279
None)
219-
|> List.sortBy _.date
220-
|> List.rev
221280
|> serializer.Serialize
222-
|> (fun n -> File.WriteAllText(Path.Combine(__SOURCE_DIRECTORY__, "site", "published.yml"), n))
281+
|> (fun n -> File.WriteAllText(Path.Combine(__SOURCE_DIRECTORY__, "site", "mock-papers.yml"), n))
282+
283+
// let mockpapers =
284+
// repos
285+
// |> getReposContents (fun r -> r.Name.StartsWith("published-paper"))
286+
287+
// mockpapers
288+
// |> Seq.last
289+
// |> function | Ok d -> getAbstractFromDict d |> printfn "%A" | Error e -> printfn "Error: %s" e
290+
// // |> List.map getCitationStructure
291+
// // |> List.choose (function
292+
// // | Ok d -> Some d
293+
// // | Error e ->
294+
// // printfn "Error: %s" e
295+
// // None)
296+
// // |> serializer.Serialize
297+
// // |> (fun n -> File.WriteAllText(Path.Combine(__SOURCE_DIRECTORY__, "site", "mock-papers.yml"), n))

site/mock-papers.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
- abstract': >-
2+
We present a new technique called “t-SNE” that visualizes
3+
high-dimensional data by giving each datapoint a location in a two
4+
or three-dimensional map. The technique is a variation of Stochastic
5+
Neighbor Embedding {[}@hinton:stochastic{]} that is much easier to
6+
optimize, and produces significantly better visualizations by
7+
reducing the tendency to crowd points together in the center of the
8+
map. t-SNE is better than existing techniques at creating a single
9+
map that reveals structure at many different scales. This is
10+
particularly important for high-dimensional data that lie on several
11+
different, but related, low-dimensional manifolds, such as images of
12+
objects from multiple classes seen from multiple viewpoints. For
13+
visualizing the structure of very large data sets, we show how t-SNE
14+
can use random walks on neighborhood graphs to allow the implicit
15+
structure of all the data to influence the way in which a subset of
16+
the data is displayed. We illustrate the performance of t-SNE on a
17+
wide variety of data sets and compare it with many other
18+
non-parametric visualization techniques, including Sammon mapping,
19+
Isomap, and Locally Linear Embedding. The visualization produced by
20+
t-SNE are significantly better than those produced by other
21+
techniques on almost all of the data sets.
22+
authors: Laurens van der Maaten and Geoffrey Hinton
23+
date: 2008-08-11
24+
description: >
25+
This page is a reworking of the original t-SNE article using the Computo template. It aims to help authors submitting to the journal by using some advanced formatting features. We warmly thank the authors of t-SNE and the editor of JMLR for allowing us to use their work to illustrate the Computo spirit.
26+
draft: false
27+
journal: Computo
28+
pdf: ''
29+
repo: published-paper-tsne
30+
title: Visualizing Data using t-SNE (mock contributon)
31+
url: https://computo.sfds.asso.fr/published-paper-tsne
32+
year: 2008
33+
- abstract': >-
34+
We present a new technique called “t-SNE” that visualizes
35+
high-dimensional data by giving each datapoint a location in a two
36+
or three-dimensional map. The technique is a variation of Stochastic
37+
Neighbor Embeddi{[}@hinton:stochastic{]} that is much easier to
38+
optimize, and produces significantly better visualizations by
39+
reducing the tendency to crowd points together in the center of the
40+
map. t-SNE is better than existing techniques at creating a single
41+
map that reveals structure at many different scales. This is
42+
particularly important for high-dimensional data that lie on several
43+
different, but related, low-dimensional manifolds, such as images of
44+
objects from multiple classes seen from multiple viewpoints. For
45+
visualizing the structure of very large data sets, we show how t-SNE
46+
can use random walks on neighborhood graphs to allow the implicit
47+
structure of all the data to influence the way in which a subset of
48+
the data is displayed. We illustrate the performance of t-SNE on a
49+
wide variety of data sets and compare it with many other
50+
non-parametric visualization techniques, including Sammon mapping,
51+
Isomap, and Locally Linear Embedding. The visualization produced by
52+
t-SNE are significantly better than those produced by other
53+
techniques on almost all of the data sets.
54+
authors: Laurens van der Maaten and Geoffrey Hinton
55+
date: 2008-08-11
56+
description: >
57+
This page is a reworking of the original t-SNE article using the Computo template. It aims to help authors submitting to the journal by using some advanced formatting features. We warmly thank the authors of t-SNE and the editor of JMLR for allowing us to use their work to illustrate the Computo spirit.
58+
draft: false
59+
journal: Computo
60+
pdf: ''
61+
repo: published-paper-tsne-R
62+
title: Visualizing Data using t-SNE (mock contributon)
63+
url: https://computo.sfds.asso.fr/published-paper-tsne-R
64+
year: 2008

site/pipeline.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
- abstract': >-
2+
Reservoir Computing (RC) is a machine learning method
3+
based on neural networks that efficiently process information
4+
generated by dynamical systems. It has been successful in solving
5+
various tasks including time series forecasting, language processing
6+
or voice processing. RC is implemented in `Python` and `Julia` but
7+
not in `R`. This article introduces `reservoirnet`, an `R` package
8+
providing access to the `Python` API `ReservoirPy`, allowing `R`
9+
users to harness the power of reservoir computing. This article
10+
provides an introduction to the fundamentals of RC and showcases its
11+
real-world applicability through three distinct sections. First, we
12+
cover the foundational concepts of RC, setting the stage for
13+
understanding its capabilities. Next, we delve into the practical
14+
usage of `reservoirnet` through two illustrative examples. These
15+
examples demonstrate how it can be applied to real-world problems,
16+
specifically, regression of COVID-19 hospitalizations and
17+
classification of Japanese vowels. Finally, we present a
18+
comprehensive analysis of a real-world application of
19+
`reservoirnet`, where it was used to forecast COVID-19
20+
hospitalizations at Bordeaux University Hospital using public data
21+
and electronic health records.
22+
authors: Thomas Ferté, Kalidou Ba, Dan Dutartre, Pierrick Legrand, Vianney Jouhet, Rodolphe Thiébaut, Xavier Hinaut and Boris Hejblum
23+
date: 2025-06-03
24+
description: ''
25+
draft: true
26+
journal: Computo
27+
pdf: ''
28+
repo: thomasferte/reservoirnet_computo
29+
title: 'Reservoir Computing in R: a Tutorial for Using reservoirnet to Predict Complex Time-Series'
30+
url: https://computo.sfds.asso.fr/template-computo-quarto
31+
year: 2025

0 commit comments

Comments
 (0)