Skip to content

Commit

Permalink
replaced http links with https
Browse files Browse the repository at this point in the history
  • Loading branch information
Orbiter committed Jul 21, 2024
1 parent fd45ccf commit 910a496
Show file tree
Hide file tree
Showing 291 changed files with 1,461 additions and 1,419 deletions.
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# ==========================================
# This Software is Copyrighted
# (C) by Michael Peter Christen; [email protected]
# first published on http://yacy.net
# first published on https://yacy.net
# Frankfurt, Germany, 2005-2009
#
# This program is free software; you can redistribute it and/or modify
Expand Down
4 changes: 2 additions & 2 deletions defaults/oaiListFriendsSource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment>Sources for OAI ListFriends entries. The Key is the URL to the ListFriends Source, the Value is the Path to the local file where the ListFriends file is stored</comment>
<entry key="http://roar.eprints.org/cgi/roar_search/advanced/export_roar_ROAR::ListFriends.xml?_action_export=1&amp;output=ROAR%3A%3AListFriends">DATA/DICTIONARIES/harvesting/export_roar_ROAR_ListFriends.xml</entry>
<entry key="http://www.openarchives.org/Register/ListFriends">DATA/DICTIONARIES/harvesting/ListFriends.xml</entry>
<entry key="https://roar.eprints.org/cgi/roar_search/advanced/export_roar_ROAR::ListFriends.xml?_action_export=1&amp;output=ROAR%3A%3AListFriends">DATA/DICTIONARIES/harvesting/export_roar_ROAR_ListFriends.xml</entry>
<entry key="https://www.openarchives.org/Register/ListFriends">DATA/DICTIONARIES/harvesting/ListFriends.xml</entry>
</properties>
8 changes: 4 additions & 4 deletions defaults/yacy.init
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ proxyIndexingLocalMedia=true
# proxy usage only for .yacy-Domains for autoconfig
proxyYacyOnly=false

# enable proxy via url (/proxy.html?url=http://yacy.net)
# enable proxy via url (/proxy.html?url=https://yacy.net)
proxyURL=false
proxyURL.access=127.0.0.1,0:0:0:0:0:0:0:1
# which urls to rewrite to /proxy.html?url=x (values: all, domainlist)
Expand Down Expand Up @@ -1288,8 +1288,8 @@ content.phpbb3.dumpfile =

# search engine teaser: an about box in search results
# this is only shown, if the about.body is filled
about.headline=
about.body=
about.headline=Please Help Us
about.body=<iframe src="/env/donate.html" style="border:none;"></iframe>

donation.iframesource=https://yacy.net/include/donate.html
donation.iframetarget=env/donate.html
Expand Down Expand Up @@ -1405,7 +1405,7 @@ postprocessing.partialUpdate = true
# To use this user agent option, you must define completely different names and strings
# and remove the given example here, which will be ignored by default.
crawler.userAgent.name = yacybot
crawler.userAgent.string = yacybot ($$SYSTEM$$) http://yacy.net/bot.html
crawler.userAgent.string = yacybot ($$SYSTEM$$) https://yacy.net/bot.html
crawler.userAgent.minimumdelta = 500
crawler.userAgent.clienttimeout = 10000

Expand Down
2 changes: 1 addition & 1 deletion examples/SimpleSearchClient/src/YaCySearchClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* YaCySearchClient
* an interface for Adaptive Replacement Caches
* Copyright 2010 by Michael Peter Christen, [email protected], Frankfurt a. M., Germany
* First released 20.09.2010 at http://yacy.net
* First released 20.09.2010 at https://yacy.net
*
* $LastChangedDate$
* $LastChangedRevision$
Expand Down
2 changes: 1 addition & 1 deletion htroot/api/yacydoc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ this is a xml file with embedded dublin core properties
you can validate it with http://www.stg.brown.edu/service/xmlvalid/
-->

<metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:yacy="http://yacy.net/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:yacy="https://yacy.net/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#">
<record>
<dc:title LANG="#[dc_language]#">#[dc_title]#</dc:title>
<dc:creator>#[dc_creator]#</dc:creator>
Expand Down
41 changes: 41 additions & 0 deletions htroot/env/grafics/donate.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<html>
<head></head>
<body>
<table border="0" cellpadding="0" cellspacing="0">

Please support our work on YaCy!

<!-- Patreon -->
<tr height="24">
<td valign="top"></td>
<td valign="top"><a href="https://www.patreon.com/orbiterlab" target="_blank"><img src="/env/grafics/become_a_patron_button.png" width="162" height="38"></a></td>
</tr>

<!-- Github Sponsors -->
<tr height="32">
<td valign="top"><a href="https://github.com/users/Orbiter/sponsorship" target="_blank"><img src="/env/grafics/logo-mona-100.png" width="32" height="32"></a></a></td>
<td valign="top"><a href="https://github.com/users/Orbiter/sponsorship" target="_blank">Github Sponsors</a></td>
</tr>

<!-- Paypal -->
<tr height="40">
<td valign="top"><img src="/env/grafics/paypal_logo.gif" width="85" height="23"></td>
<td valign="top"><form target="_parent" action="https://www.paypal.com/cgi-bin/webscr" method="post" style="margin:0px; padding:0px;">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="on0" value="Your contribution is received as a taxable, legal payment.">
<select name="os0">
<option value="beneficial">beneficial: 5 &euro;</option>
<option value="generous">generous: 25 &euro;</option>
<option value="gracious">gracious: 50 &euro;</option>
</select>
<input type="hidden" name="currency_code" value="EUR">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIICQYJKoZIhvcNAQcEoIIH+jCCB/YCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBdIJiffS8lpYJW7VZL45wo42eipolZjzta5yacL4KCWGpmy6zMPwp6KK+BZXXB2rgx3V16svK7WPr5LQfmfz1JqCFxJVSNrl+uLSrO3YE1OyF+XAwm2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I1AFeCT2Gn9SN+TANBgkqhkiG9w0BAQEFAASBgHXTveleRZAuT5Upn3yzP7mI1aKx2LeWPINN3aZ0IFLj7rzrT26YZsQNfdYPHtLjuahN9bhvRjQjvMQQzManec3SoCEpg6MDcwqB4TJY+kZeUKO02gVWFHM3m4dCss7WoXuhlcnQese4ZpQ63rCRMXAhXk7xYHpyghlNpFmJgl0W-----END PKCS7-----
">
<input type="submit" name="submit" value="Donate!" style:"float:left;">
</form>
</td>
</tr>

</table>
</body>
</html>
4 changes: 2 additions & 2 deletions htroot/js/Crawler.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005 - 2014 Alexander Schier, Michael Peter Christen,
* and other YaCy developers (see http://yacy.net/en/Join.html)
* and other YaCy developers (see https://yacy.net/en/Join.html)
*
* This file is part of YaCy.
*
Expand All @@ -15,7 +15,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with YaCy. If not, see <http://www.gnu.org/licenses/>.
* along with YaCy. If not, see <https://www.gnu.org/licenses/>.
*/

DELETE_STRING="delete";
Expand Down
2 changes: 1 addition & 1 deletion htroot/portalsearch/yacy-portalsearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ $(document).ready(function() {
theme : 'start',
title : 'YaCy Search Widget',
logo : yconf.url + '/yacy/ui/img/yacy-logo.png',
link : 'http://yacy.net',
link : 'https://yacy.net',
width : 640,
height : 640,
position : [150,50],
Expand Down
2 changes: 1 addition & 1 deletion htroot/yacysearch.atom
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:yacy="http://www.yacy.net/"
>
<!-- YaCy Search Engine; http://yacy.net -->
<!-- YaCy Search Engine; https://yacy.net -->

<title>#[promoteSearchPageGreeting]#: #[rss_query]#</title>
<subtitle>Search for #[rss_query]#</subtitle>
Expand Down
2 changes: 1 addition & 1 deletion htroot/yacysearch.rss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
xmlns:ev="http://purl.org/rss/1.0/modules/event/"
>
<!-- YaCy Search Engine; http://yacy.net -->
<!-- YaCy Search Engine; https://yacy.net -->
<channel>
<title>#[promoteSearchPageGreeting]#: #[rss_query]#</title>
<description>Search for #[rss_query]#</description>
Expand Down
2 changes: 1 addition & 1 deletion htroot/yacysearch_location.rss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:yacy="http://www.yacy.net/"
xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
>
<!-- YaCy Search Engine; http://yacy.net -->
<!-- YaCy Search Engine; https://yacy.net -->
<channel>
<title>#[promoteSearchPageGreeting]#</title>
<description>Search for #[rss_query]#</description>
Expand Down
66 changes: 33 additions & 33 deletions source/net/yacy/ai/OllamaClient.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* OllamaClient
* Copyright 2024 by Michael Peter Christen
* First released 17.05.2024 at http://yacy.net
* First released 17.05.2024 at https://yacy.net
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -35,33 +35,33 @@
public class OllamaClient {

public static String OLLAMA_API_HOST = "http://localhost:11434";
private String hoststub;
public OllamaClient(String hoststub) {

private final String hoststub;

public OllamaClient(final String hoststub) {
this.hoststub = hoststub;
}

public LinkedHashMap<String, Long> listOllamaModels() {
LinkedHashMap<String, Long> sortedMap = new LinkedHashMap<>();
final LinkedHashMap<String, Long> sortedMap = new LinkedHashMap<>();
try {
String response = OpenAIClient.sendGetRequest(this.hoststub + "/api/tags");
JSONObject responseObject = new JSONObject(response);
JSONArray models = responseObject.getJSONArray("models");
List<Map.Entry<String, Long>> list = new ArrayList<>();
final String response = OpenAIClient.sendGetRequest(this.hoststub + "/api/tags");
final JSONObject responseObject = new JSONObject(response);
final JSONArray models = responseObject.getJSONArray("models");

final List<Map.Entry<String, Long>> list = new ArrayList<>();
for (int i = 0; i < models.length(); i++) {
JSONObject model = models.getJSONObject(i);
String name = model.optString("name", "");
long size = model.optLong("size", 0);
list.add(new AbstractMap.SimpleEntry<String, Long>(name, size));
final JSONObject model = models.getJSONObject(i);
final String name = model.optString("name", "");
final long size = model.optLong("size", 0);
list.add(new AbstractMap.SimpleEntry<>(name, size));
}

// Sort the list in descending order based on the values
list.sort((o1, o2) -> o2.getValue().compareTo(o1.getValue()));

// Create a new LinkedHashMap and add the sorted entries
for (Map.Entry<String, Long> entry : list) {
for (final Map.Entry<String, Long> entry : list) {
sortedMap.put(entry.getKey(), entry.getValue());
}
} catch (JSONException | URISyntaxException | IOException e) {
Expand All @@ -70,8 +70,8 @@ public LinkedHashMap<String, Long> listOllamaModels() {
return sortedMap;
}

public boolean ollamaModelExists(String name) {
JSONObject data = new JSONObject();
public boolean ollamaModelExists(final String name) {
final JSONObject data = new JSONObject();
try {
data.put("name", name);
OpenAIClient.sendPostRequest(this.hoststub + "/api/show", data);
Expand All @@ -81,37 +81,37 @@ public boolean ollamaModelExists(String name) {
}
}

public boolean pullOllamaModel(String name) {
JSONObject data = new JSONObject();
public boolean pullOllamaModel(final String name) {
final JSONObject data = new JSONObject();
try {
data.put("name", name);
data.put("stream", false);
String response = OpenAIClient.sendPostRequest(this.hoststub + "/api/pull", data);
final String response = OpenAIClient.sendPostRequest(this.hoststub + "/api/pull", data);
// this sends {"status": "success"} in case of success
JSONObject responseObject = new JSONObject(response);
String status = responseObject.optString("status", "");
final JSONObject responseObject = new JSONObject(response);
final String status = responseObject.optString("status", "");
return status.equals("success");
} catch (JSONException | URISyntaxException | IOException e) {
return false;
}
}
public static void main(String[] args) {
OllamaClient oc = new OllamaClient(OLLAMA_API_HOST);
LinkedHashMap<String, Long> models = oc.listOllamaModels();

public static void main(final String[] args) {
final OllamaClient oc = new OllamaClient(OLLAMA_API_HOST);

final LinkedHashMap<String, Long> models = oc.listOllamaModels();
System.out.println(models.toString());

// check if model exists
String model = "phi3:3.8b";
final String model = "phi3:3.8b";
if (oc.ollamaModelExists(model))
System.out.println("model " + model + " exists");
else
System.out.println("model " + model + " does not exist");

// pull a model
boolean success = oc.pullOllamaModel(model);
final boolean success = oc.pullOllamaModel(model);
System.out.println("pulled model + " + model + ": " + success);

}
}
Loading

0 comments on commit 910a496

Please sign in to comment.