Get-ChildItem *.html | ForEach-Object {
$html = Get-Content -Raw $_
$items = $html | Select-String '(?smi)\n {32}(<div class="item.*?)\n {32}</div>' -allmatches | % Matches | % {$_.Groups[1].Value}
$items | % {
$num = $_ -match '.*<div class="num">(\d*)</div>.*' ? $Matches[1] : $null
$href,$title = $_ -match '.*<div class="nameRus"><a href="(.*?)">(.*?)<.*' ? $Matches[1,2] : $null
$titleEn = $_ -match '.*<div class="nameEng">(.*?)<.*' ? $Matches[1] : $null
$date = $_ -match '.*<div class="date">(.*?)<.*' ? $Matches[1] : $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
| function Get-DotNodeLabel ($arr) { | |
| $maxColumns = 0 | |
| $arr | % { | |
| #[int]$cellsCount = $_ -is [hashtable] ? $_.GetEnumerator().count : $_.count | |
| $maxColumns = [math]::max($_.count,$maxColumns) | |
| } | |
| $tdAttrs = "width=""150"" colspan=""$maxColumns""" | |
| $rows = @() | |
| $arr | % { | |
| if ($_ -is [string]) { |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <link href="https://unpkg.com/[email protected]/dist/css/tabulator.min.css" rel="stylesheet"> | |
| <script type="text/javascript" src="https://unpkg.com/[email protected]/dist/js/tabulator.min.js"></script> | |
| <style> | |
| a { | |
| text-decoration: none; | |
| } |
$objs = irm https://dataverse.pushdom.ru/api/access/datafile/4099?format=original | ConvertFrom-Csv
$cypher = @'
UNWIND $objs as obj
MERGE (p:Person {
name: obj.author_std
})
MERGE (e:Edition {
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
| function Convert-PersonToQuery ([pscustomobject]$Person, [switch]$PreciseDate = $false) { | |
| $properties = @() | |
| $birthDates = @()+$person.birthdate+$person.birthdates | ? {$_} | % {[string]$_} | |
| foreach ($bd in $birthDates) { | |
| if ($bd.length -eq 10 -and $PreciseDate) { | |
| $properties += @{pid = 'P569'; v = $bd}; | |
| } else { | |
| $properties += @{pid = 'P569@year'; v = $bd.substring(0,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
| package myapp; | |
| import java.util.HashSet; | |
| import java.util.Set; | |
| import org.neo4j.graphdb.Node; | |
| import org.neo4j.graphdb.Relationship; | |
| import org.neo4j.procedure.Description; | |
| import org.neo4j.procedure.Name; | |
| import org.neo4j.procedure.UserAggregationFunction; |
# If neo4j official not available, use web archive:
# http://web.archive.org/web/20240729075918id_/http://dist.neo4j.org/neo4j-community-5.22.0-windows.zip
# or latest version which may not be compatible with video:
# http://web.archive.org/web/20250425091340id_/http://dist.neo4j.org/neo4j-community-5.26.0-windows.zip
$url = 'http://dist.neo4j.org/neo4j-community-5.22.0-windows.zip'
$name = ($url -split '/')[-1]
# Download:
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
| package myapp; | |
| import java.io.IOException; | |
| import java.nio.file.Path; | |
| import java.util.List; | |
| import java.util.Map; | |
| import org.neo4j.configuration.connectors.BoltConnector; | |
| import org.neo4j.configuration.helpers.SocketAddress; | |
| import org.neo4j.dbms.api.DatabaseManagementServiceBuilder; |
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
| package myapp; | |
| import java.io.IOException; | |
| import java.nio.file.Path; | |
| import java.util.List; | |
| import java.util.Map; | |
| import org.neo4j.configuration.GraphDatabaseSettings; | |
| import org.neo4j.configuration.GraphDatabaseSettings.LogQueryLevel; | |
| import org.neo4j.configuration.connectors.BoltConnector; |
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
| package myapp; | |
| import java.io.File; | |
| import java.time.Duration; | |
| import java.time.LocalDate; | |
| import org.neo4j.configuration.GraphDatabaseSettings; | |
| import org.neo4j.configuration.connectors.BoltConnector; | |
| import org.neo4j.cypherdsl.core.renderer.Configuration; | |
| import org.neo4j.cypherdsl.core.renderer.Dialect; |
NewerOlder