repo stringclasses 1k
values | file_url stringlengths 96 373 | file_path stringlengths 11 294 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 6
values | commit_sha stringclasses 1k
values | retrieved_at stringdate 2026-01-04 14:45:56 2026-01-04 18:30:23 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/test/java/io/jare/tk/TkRelayTest.java | src/test/java/io/jare/tk/TkRelayTest.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.tk;
import io.jare.fake.FkBase;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URLEncoder;
import java.util.Arrays;
import org.hamcrest.MatcherAssert;
import org.... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/test/java/io/jare/tk/package-info.java | src/test/java/io/jare/tk/package-info.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
/**
* Takes, tests.
*
* @since 1.0
*/
package io.jare.tk;
| java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/test/java/io/jare/tk/TkInvalidateITCase.java | src/test/java/io/jare/tk/TkInvalidateITCase.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.tk;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Ignore;
import org.junit.Test;
import org.takes.Response;
import org.takes.rq.RqFake;
/**
* Integration case ... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/test/java/io/jare/tk/RqUserTest.java | src/test/java/io/jare/tk/RqUserTest.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.tk;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Test;
import org.takes.facets.auth.RqWithAuth;
/**
* Test case for {@link RqUser}.
* @since 0.2
*/
public f... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/test/java/io/jare/tk/PingingTest.java | src/test/java/io/jare/tk/PingingTest.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.tk;
import io.jare.fake.FkBase;
import java.net.HttpURLConnection;
import java.util.Arrays;
import java.util.Collection;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/test/java/io/jare/tk/TkIndexTest.java | src/test/java/io/jare/tk/TkIndexTest.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.tk;
import com.jcabi.matchers.XhtmlMatchers;
import io.jare.fake.FkBase;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
import org.takes.Take;
import org.takes.rq.RqFake;
import org.take... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/test/java/io/jare/tk/TkAppTest.java | src/test/java/io/jare/tk/TkAppTest.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.tk;
import com.jcabi.http.request.JdkRequest;
import com.jcabi.http.response.RestResponse;
import com.jcabi.http.response.XmlResponse;
import com.jcabi.http.wire.VerboseWire;
import com.jcabi.match... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/test/java/io/jare/cached/CdUsageTest.java | src/test/java/io/jare/cached/CdUsageTest.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.cached;
import io.jare.fake.FkBase;
import io.jare.model.Usage;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Test;
/**
* Test case for {@link CdUsage}.
* @si... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/test/java/io/jare/cached/package-info.java | src/test/java/io/jare/cached/package-info.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
/**
* Cached, tests.
*
* @since 0.7
*/
package io.jare.cached;
| java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/test/java/io/jare/smarts/SafeUserTest.java | src/test/java/io/jare/smarts/SafeUserTest.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.smarts;
import io.jare.fake.FkUser;
import io.jare.model.User;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Assert;
import org.junit.Test;
/**
* Test case for... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/test/java/io/jare/smarts/package-info.java | src/test/java/io/jare/smarts/package-info.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
/**
* Smarts, tests.
*
* @since 1.0
*/
package io.jare.smarts;
| java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/Entrance.java | src/main/java/io/jare/Entrance.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare;
import com.jcabi.manifests.Manifests;
import com.jcabi.s3.Region;
import io.jare.cached.CdBase;
import io.jare.dynamo.DyBase;
import io.jare.model.Base;
import io.jare.tk.TkApp;
import io.sentry.S... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/package-info.java | src/main/java/io/jare/package-info.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
/**
* Jare.
*
* @since 1.0
*/
package io.jare;
| java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/Logs.java | src/main/java/io/jare/Logs.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare;
import com.jcabi.aspects.ScheduleWithFixedDelay;
import com.jcabi.log.Logger;
import com.jcabi.s3.Bucket;
import com.jcabi.s3.Ocket;
import io.jare.model.Base;
import io.jare.model.Domain;
import ... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/model/Domain.java | src/main/java/io/jare/model/Domain.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.model;
import java.io.IOException;
/**
* Domain.
*
* @since 1.0
*/
public interface Domain {
/**
* Owner of it.
* @return The owner's GitHub handle
* @throws IOException If... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/model/package-info.java | src/main/java/io/jare/model/package-info.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
/**
* The model.
*
* @since 0.1
*/
package io.jare.model;
| java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/model/Usage.java | src/main/java/io/jare/model/Usage.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.model;
import java.io.IOException;
import java.util.Date;
import java.util.SortedMap;
/**
* Usage.
*
* @since 0.7
*/
public interface Usage {
/**
* Add more usage in bytes.
* @p... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/model/User.java | src/main/java/io/jare/model/User.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.model;
import java.io.IOException;
/**
* User.
*
* @since 1.0
*/
public interface User {
/**
* All my domains.
* @return All domains
*/
Iterable<Domain> mine();
/*... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/model/Base.java | src/main/java/io/jare/model/Base.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.model;
/**
* Base.
*
* @since 1.0
*/
public interface Base {
/**
* Get user by GitHub handle.
* @param name GitHub name of the user
* @return The user
*/
User user(... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/dynamo/DyUser.java | src/main/java/io/jare/dynamo/DyUser.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.dynamo;
import com.amazonaws.services.dynamodbv2.model.Select;
import com.jcabi.dynamo.Attributes;
import com.jcabi.dynamo.Conditions;
import com.jcabi.dynamo.QueryValve;
import com.jcabi.dynamo.Re... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/dynamo/package-info.java | src/main/java/io/jare/dynamo/package-info.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
/**
* Dynamo.
*
* @since 1.0
*/
package io.jare.dynamo;
| java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/dynamo/Dynamo.java | src/main/java/io/jare/dynamo/Dynamo.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.dynamo;
import com.amazonaws.services.dynamodbv2.AmazonDynamoDB;
import com.jcabi.dynamo.Credentials;
import com.jcabi.dynamo.Region;
import com.jcabi.dynamo.Table;
import com.jcabi.dynamo.retry.Re... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/dynamo/DyBase.java | src/main/java/io/jare/dynamo/DyBase.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.dynamo;
import com.amazonaws.services.dynamodbv2.model.Select;
import com.jcabi.dynamo.Conditions;
import com.jcabi.dynamo.QueryValve;
import com.jcabi.dynamo.Region;
import com.jcabi.dynamo.ScanVa... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/dynamo/DyUsage.java | src/main/java/io/jare/dynamo/DyUsage.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.dynamo;
import com.amazonaws.services.dynamodbv2.model.AttributeAction;
import com.amazonaws.services.dynamodbv2.model.AttributeValue;
import com.amazonaws.services.dynamodbv2.model.AttributeValueU... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/dynamo/DyDomain.java | src/main/java/io/jare/dynamo/DyDomain.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.dynamo;
import com.jcabi.dynamo.Attributes;
import com.jcabi.dynamo.Item;
import io.jare.model.Domain;
import io.jare.model.Usage;
import java.io.IOException;
import lombok.EqualsAndHashCode;
impor... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/tk/TkAppFallback.java | src/main/java/io/jare/tk/TkAppFallback.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.tk;
import com.jcabi.manifests.Manifests;
import io.sentry.Sentry;
import java.io.IOException;
import java.net.HttpURLConnection;
import org.apache.commons.lang3.exception.ExceptionUtils;
import or... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/tk/RsPage.java | src/main/java/io/jare/tk/RsPage.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.tk;
import com.jcabi.manifests.Manifests;
import java.io.IOException;
import java.util.Arrays;
import lombok.EqualsAndHashCode;
import org.takes.Request;
import org.takes.Response;
import org.takes... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/tk/TkIndex.java | src/main/java/io/jare/tk/TkIndex.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.tk;
import io.jare.model.Base;
import io.jare.model.Domain;
import java.io.IOException;
import org.takes.Request;
import org.takes.Response;
import org.takes.Take;
import org.takes.rs.xe.XeAppend;
... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/tk/TkAppAuth.java | src/main/java/io/jare/tk/TkAppAuth.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.tk;
import com.jcabi.manifests.Manifests;
import java.util.regex.Pattern;
import org.takes.Take;
import org.takes.facets.auth.PsByFlag;
import org.takes.facets.auth.PsChain;
import org.takes.facets... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/tk/TkApp.java | src/main/java/io/jare/tk/TkApp.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.tk;
import com.jcabi.manifests.Manifests;
import io.jare.model.Base;
import java.io.IOException;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.takes.facets.auth.TkSecure;
imp... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/tk/TkDelete.java | src/main/java/io/jare/tk/TkDelete.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.tk;
import io.jare.model.Base;
import io.jare.model.Domain;
import java.io.IOException;
import java.util.Iterator;
import org.takes.Request;
import org.takes.Response;
import org.takes.Take;
import... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/tk/package-info.java | src/main/java/io/jare/tk/package-info.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
/**
* Takes.
*
* @since 1.0
*/
package io.jare.tk;
| java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/tk/TkRelay.java | src/main/java/io/jare/tk/TkRelay.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.tk;
import io.jare.model.Base;
import io.jare.model.Domain;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URI;
import java.util.Collecti... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/tk/TkRefresh.java | src/main/java/io/jare/tk/TkRefresh.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.tk;
import com.jcabi.log.VerboseProcess;
import java.io.File;
import java.io.IOException;
import org.takes.facets.fork.FkFixed;
import org.takes.facets.fork.FkHitRefresh;
import org.takes.facets.fo... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/tk/TkDomains.java | src/main/java/io/jare/tk/TkDomains.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.tk;
import io.jare.model.Base;
import io.jare.model.Domain;
import io.jare.model.Usage;
import java.io.IOException;
import org.takes.Request;
import org.takes.Response;
import org.takes.Take;
impor... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/tk/TkInvalidate.java | src/main/java/io/jare/tk/TkInvalidate.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.tk;
import com.amazonaws.auth.AWSStaticCredentialsProvider;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.services.cloudfront.AmazonCloudFront;
import com.amazonaws.services.c... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/tk/Destination.java | src/main/java/io/jare/tk/Destination.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.tk;
import java.net.HttpURLConnection;
import java.net.URI;
import org.takes.HttpException;
/**
* Destination for relay.
*
* @since 0.4
*/
final class Destination {
/**
* Destination... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/tk/RqUser.java | src/main/java/io/jare/tk/RqUser.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.tk;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.takes.Request;
import org.takes.facets.auth.Identity;
import org.takes.facets.auth.RqAuth;... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/tk/TkAdd.java | src/main/java/io/jare/tk/TkAdd.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.tk;
import io.jare.model.Base;
import io.jare.smarts.SafeUser;
import java.io.IOException;
import org.takes.Request;
import org.takes.Response;
import org.takes.Take;
import org.takes.facets.flash.... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/cached/package-info.java | src/main/java/io/jare/cached/package-info.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
/**
* Cached.
*
* @since 0.7
*/
package io.jare.cached;
| java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/cached/CdUsage.java | src/main/java/io/jare/cached/CdUsage.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.cached;
import com.jcabi.aspects.Cacheable;
import io.jare.model.Usage;
import java.io.IOException;
import java.util.Date;
import java.util.SortedMap;
import java.util.concurrent.TimeUnit;
import l... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/cached/CdBase.java | src/main/java/io/jare/cached/CdBase.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.cached;
import com.jcabi.aspects.Cacheable;
import io.jare.model.Base;
import io.jare.model.Domain;
import io.jare.model.User;
import java.util.concurrent.TimeUnit;
import lombok.EqualsAndHashCode;... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/cached/CdDomain.java | src/main/java/io/jare/cached/CdDomain.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.cached;
import com.jcabi.aspects.Cacheable;
import io.jare.model.Domain;
import io.jare.model.Usage;
import java.io.IOException;
import lombok.EqualsAndHashCode;
import lombok.ToString;
/**
* Cac... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/smarts/SafeUser.java | src/main/java/io/jare/smarts/SafeUser.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.smarts;
import io.jare.model.Domain;
import io.jare.model.User;
import java.io.IOException;
import java.util.regex.Pattern;
/**
* Safe user.
*
* @since 1.0
*/
public final class SafeUser imple... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/smarts/package-info.java | src/main/java/io/jare/smarts/package-info.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
/**
* Smarts.
*
* @since 1.0
*/
package io.jare.smarts;
| java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/fake/FkUsage.java | src/main/java/io/jare/fake/FkUsage.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.fake;
import com.jcabi.log.Logger;
import io.jare.model.Usage;
import java.util.Date;
import java.util.SortedMap;
import java.util.TreeMap;
/**
* Fake usage.
*
* @since 0.7
*/
public final cla... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/fake/package-info.java | src/main/java/io/jare/fake/package-info.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
/**
* Fakes.
*
* @since 1.0
*/
package io.jare.fake;
| java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/fake/FkDomain.java | src/main/java/io/jare/fake/FkDomain.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.fake;
import io.jare.model.Domain;
import io.jare.model.Usage;
import java.io.IOException;
/**
* Fake domain.
*
* @since 1.0
*/
public final class FkDomain implements Domain {
@Override
... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/fake/FkBase.java | src/main/java/io/jare/fake/FkBase.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.fake;
import io.jare.model.Base;
import io.jare.model.Domain;
import io.jare.model.User;
import java.util.Collections;
/**
* Fake Base.
*
* @since 1.0
*/
public final class FkBase implements B... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
yegor256/jare | https://github.com/yegor256/jare/blob/cd1ff3db8016f4b1b025626255095e7df9d7a4a5/src/main/java/io/jare/fake/FkUser.java | src/main/java/io/jare/fake/FkUser.java | /*
* SPDX-FileCopyrightText: Copyright (c) 2016-2026 Yegor Bugayenko
* SPDX-License-Identifier: MIT
*/
package io.jare.fake;
import io.jare.model.Domain;
import io.jare.model.User;
import java.util.Collections;
/**
* Fake user.
*
* @since 1.0
*/
public final class FkUser implements User {
@Override
pu... | java | MIT | cd1ff3db8016f4b1b025626255095e7df9d7a4a5 | 2026-01-05T02:30:22.737718Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/util/RandomGenerator.java | Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/util/RandomGenerator.java | package DLWJ.util;
import java.util.Random;
public final class RandomGenerator {
public static double uniform(double min, double max, Random rng) {
return rng.nextDouble() * (max - min) + min;
}
public static int binomial(int n, double p, Random rng) {
if(p < 0 || p > 1) return 0;
... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/util/ActivationFunction.java | Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/util/ActivationFunction.java | package DLWJ.util;
public final class ActivationFunction {
public static int step(double x) {
if (x >= 0) {
return 1;
} else {
return -1;
}
}
public static double sigmoid(double x) {
return 1. / (1. + Math.pow(Math.E, -x));
}
public static... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/util/GaussianDistribution.java | Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/util/GaussianDistribution.java | package DLWJ.util;
import java.util.Random;
public final class GaussianDistribution {
private final double mean;
private final double var;
private final Random rng;
public GaussianDistribution(double mean, double var, Random rng) {
if (var < 0.0) {
throw new IllegalArgumentExcep... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/MultiLayerNeuralNetworks/HiddenLayer.java | Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/MultiLayerNeuralNetworks/HiddenLayer.java | package DLWJ.MultiLayerNeuralNetworks;
import java.util.Random;
import java.util.function.DoubleFunction;
import static DLWJ.util.ActivationFunction.*;
import static DLWJ.util.RandomGenerator.*;
public class HiddenLayer {
public int nIn;
public int nOut;
public double[][] W;
public double[] b;
p... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/MultiLayerNeuralNetworks/MultiLayerPerceptrons.java | Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/MultiLayerNeuralNetworks/MultiLayerPerceptrons.java | package DLWJ.MultiLayerNeuralNetworks;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import DLWJ.SingleLayerNeuralNetworks.LogisticRegression;
public class MultiLayerPerceptrons {
public int nIn;
public int nHidden;
pub... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/SingleLayerNeuralNetworks/LogisticRegressionXOR.java | Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/SingleLayerNeuralNetworks/LogisticRegressionXOR.java | package DLWJ.SingleLayerNeuralNetworks;
import java.util.*;
public class LogisticRegressionXOR {
public static void main(String[] args) {
final Random rng = new Random(1234); // seed random
//
// Declare variables and constants
//
final int patterns = 2; // number of c... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/SingleLayerNeuralNetworks/Perceptrons.java | Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/SingleLayerNeuralNetworks/Perceptrons.java | package DLWJ.SingleLayerNeuralNetworks;
import java.util.Random;
import DLWJ.util.GaussianDistribution;
import static DLWJ.util.ActivationFunction.step;
public class Perceptrons {
public int nIn; // dimensions of input data
public double[] w; // weight vector of perceptrons
public Perceptrons(i... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/SingleLayerNeuralNetworks/LogisticRegression.java | Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/SingleLayerNeuralNetworks/LogisticRegression.java | package DLWJ.SingleLayerNeuralNetworks;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import DLWJ.util.GaussianDistribution;
import static DLWJ.util.ActivationFunction.softmax;
public class LogisticRegression {
public int nIn;
... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/DeepNeuralNetworks/DenoisingAutoencoders.java | Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/DeepNeuralNetworks/DenoisingAutoencoders.java | package DLWJ.DeepNeuralNetworks;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import static DLWJ.util.ActivationFunction.sigmoid;
import static DLWJ.util.RandomGenerator.*;
public class DenoisingAutoencoders {
public int nVisi... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/DeepNeuralNetworks/DeepBeliefNets.java | Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/DeepNeuralNetworks/DeepBeliefNets.java | package DLWJ.DeepNeuralNetworks;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import DLWJ.MultiLayerNeuralNetworks.HiddenLayer;
import DLWJ.SingleLayerNeuralNetworks.LogisticRegression;
import static DLWJ.util.RandomGenerator.binomia... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/DeepNeuralNetworks/RestrictedBoltzmannMachines.java | Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/DeepNeuralNetworks/RestrictedBoltzmannMachines.java | package DLWJ.DeepNeuralNetworks;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import static DLWJ.util.ActivationFunction.sigmoid;
import static DLWJ.util.RandomGenerator.*;
public class RestrictedBoltzmannMachines {
public int... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/DeepNeuralNetworks/StackedDenoisingAutoencoders.java | Chapter 3/Codes/DLWJ.Chapter-3-Snanpshot/DeepNeuralNetworks/StackedDenoisingAutoencoders.java | package DLWJ.DeepNeuralNetworks;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import DLWJ.MultiLayerNeuralNetworks.HiddenLayer;
import DLWJ.SingleLayerNeuralNetworks.LogisticRegression;
import static DLWJ.util.RandomGenerator.binomia... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/util/RandomGenerator.java | Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/util/RandomGenerator.java | package DLWJ.util;
import java.util.Random;
public final class RandomGenerator {
public static double uniform(double min, double max, Random rng) {
return rng.nextDouble() * (max - min) + min;
}
public static int binomial(int n, double p, Random rng) {
if(p < 0 || p > 1) return 0;
... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/util/ActivationFunction.java | Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/util/ActivationFunction.java | package DLWJ.util;
public final class ActivationFunction {
public static int step(double x) {
if (x >= 0) {
return 1;
} else {
return -1;
}
}
public static double sigmoid(double x) {
return 1. / (1. + Math.pow(Math.E, -x));
}
public static... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/util/GaussianDistribution.java | Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/util/GaussianDistribution.java | package DLWJ.util;
import java.util.Random;
public final class GaussianDistribution {
private final double mean;
private final double var;
private final Random rng;
public GaussianDistribution(double mean, double var, Random rng) {
if (var < 0.0) {
throw new IllegalArgumentExcep... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/MultiLayerNeuralNetworks/HiddenLayer.java | Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/MultiLayerNeuralNetworks/HiddenLayer.java | package DLWJ.MultiLayerNeuralNetworks;
import java.util.Random;
import java.util.function.DoubleFunction;
import static DLWJ.util.ActivationFunction.*;
import static DLWJ.util.RandomGenerator.*;
public class HiddenLayer {
public int nIn;
public int nOut;
public double[][] W;
public double[] b;
p... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/MultiLayerNeuralNetworks/MultiLayerPerceptrons.java | Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/MultiLayerNeuralNetworks/MultiLayerPerceptrons.java | package DLWJ.MultiLayerNeuralNetworks;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import DLWJ.SingleLayerNeuralNetworks.LogisticRegression;
public class MultiLayerPerceptrons {
public int nIn;
public int nHidden;
pub... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/examples/ND4J/Perceptrons.java | Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/examples/ND4J/Perceptrons.java | package DLWJ.examples.ND4J;
import java.util.Random;
import DLWJ.util.GaussianDistribution;
import static DLWJ.util.ActivationFunction.step;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.factory.Nd4j;
public class Perceptrons {
public int nIn; // dimensions of input data
public I... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/SingleLayerNeuralNetworks/LogisticRegressionXOR.java | Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/SingleLayerNeuralNetworks/LogisticRegressionXOR.java | package DLWJ.SingleLayerNeuralNetworks;
import java.util.*;
public class LogisticRegressionXOR {
public static void main(String[] args) {
final Random rng = new Random(1234); // seed random
//
// Declare variables and constants
//
final int patterns = 2; // number of c... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/SingleLayerNeuralNetworks/Perceptrons.java | Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/SingleLayerNeuralNetworks/Perceptrons.java | package DLWJ.SingleLayerNeuralNetworks;
import java.util.Random;
import DLWJ.util.GaussianDistribution;
import static DLWJ.util.ActivationFunction.step;
public class Perceptrons {
public int nIn; // dimensions of input data
public double[] w; // weight vector of perceptrons
public Perceptrons(i... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/SingleLayerNeuralNetworks/LogisticRegression.java | Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/SingleLayerNeuralNetworks/LogisticRegression.java | package DLWJ.SingleLayerNeuralNetworks;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import DLWJ.util.GaussianDistribution;
import static DLWJ.util.ActivationFunction.softmax;
public class LogisticRegression {
public int nIn;
... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/DeepNeuralNetworks/DenoisingAutoencoders.java | Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/DeepNeuralNetworks/DenoisingAutoencoders.java | package DLWJ.DeepNeuralNetworks;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import static DLWJ.util.ActivationFunction.sigmoid;
import static DLWJ.util.RandomGenerator.*;
public class DenoisingAutoencoders {
public int nVisi... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/DeepNeuralNetworks/Dropout.java | Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/DeepNeuralNetworks/Dropout.java | package DLWJ.DeepNeuralNetworks;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import DLWJ.MultiLayerNeuralNetworks.HiddenLayer;
import DLWJ.SingleLayerNeuralNetworks.LogisticRegression;
import static DLWJ.util.RandomGenerator.binomia... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/DeepNeuralNetworks/DeepBeliefNets.java | Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/DeepNeuralNetworks/DeepBeliefNets.java | package DLWJ.DeepNeuralNetworks;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import DLWJ.MultiLayerNeuralNetworks.HiddenLayer;
import DLWJ.SingleLayerNeuralNetworks.LogisticRegression;
import static DLWJ.util.RandomGenerator.binomia... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/DeepNeuralNetworks/ConvolutionPoolingLayer.java | Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/DeepNeuralNetworks/ConvolutionPoolingLayer.java | package DLWJ.DeepNeuralNetworks;
import java.util.Random;
import java.util.function.DoubleFunction;
import static DLWJ.util.ActivationFunction.*;
import static DLWJ.util.RandomGenerator.*;
public class ConvolutionPoolingLayer {
public int[] imageSize;
public int channel;
public int nKernel;
public i... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/DeepNeuralNetworks/RestrictedBoltzmannMachines.java | Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/DeepNeuralNetworks/RestrictedBoltzmannMachines.java | package DLWJ.DeepNeuralNetworks;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import static DLWJ.util.ActivationFunction.sigmoid;
import static DLWJ.util.RandomGenerator.*;
public class RestrictedBoltzmannMachines {
public int... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/DeepNeuralNetworks/StackedDenoisingAutoencoders.java | Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/DeepNeuralNetworks/StackedDenoisingAutoencoders.java | package DLWJ.DeepNeuralNetworks;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import DLWJ.MultiLayerNeuralNetworks.HiddenLayer;
import DLWJ.SingleLayerNeuralNetworks.LogisticRegression;
import static DLWJ.util.RandomGenerator.binomia... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/DeepNeuralNetworks/ConvolutionalNeuralNetworks.java | Chapter 5/DLWJ.chapter-5.snapshot/src/main/java/DLWJ/DeepNeuralNetworks/ConvolutionalNeuralNetworks.java | package DLWJ.DeepNeuralNetworks;
import java.util.*;
import DLWJ.MultiLayerNeuralNetworks.HiddenLayer;
import DLWJ.SingleLayerNeuralNetworks.LogisticRegression;
import static DLWJ.util.RandomGenerator.binomial;
public class ConvolutionalNeuralNetworks {
public int[] nKernels;
public int[][] kernelSizes;
... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 2/DLWJ.LogisticRegression/util/ActivationFunction.java | Chapter 2/DLWJ.LogisticRegression/util/ActivationFunction.java | package DLWJ.util;
public final class ActivationFunction {
public static int step(double x) {
if (x >= 0) {
return 1;
} else {
return -1;
}
}
public static double sigmoid(double x) {
return 1. / (1. + Math.pow(Math.E, -x));
}
public static... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 2/DLWJ.LogisticRegression/util/GaussianDistribution.java | Chapter 2/DLWJ.LogisticRegression/util/GaussianDistribution.java | package DLWJ.util;
import java.util.Random;
public final class GaussianDistribution {
private final double mean;
private final double var;
private final Random rng;
public GaussianDistribution(double mean, double var, Random rng) {
if (var < 0.0) {
throw new IllegalArgumentExcep... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 2/DLWJ.LogisticRegression/SingleLayerNeuralNetworks/LogisticRegressionXOR.java | Chapter 2/DLWJ.LogisticRegression/SingleLayerNeuralNetworks/LogisticRegressionXOR.java | package DLWJ.SingleLayerNeuralNetworks;
import java.util.*;
public class LogisticRegressionXOR {
public static void main(String[] args) {
final Random rng = new Random(1234); // seed random
//
// Declare variables and constants
//
final int patterns = 2; // number of c... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 2/DLWJ.LogisticRegression/SingleLayerNeuralNetworks/Perceptrons.java | Chapter 2/DLWJ.LogisticRegression/SingleLayerNeuralNetworks/Perceptrons.java | package DNN.SingleLayerNeuralNetworks;
import java.util.Random;
import DNN.util.GaussianDistribution;
import static DNN.util.ActivationFunction.step;
public class Perceptrons {
public int nIn; // dimensions of input data
public double[] w; // weight vector of perceptrons
public Perceptrons(int ... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 2/DLWJ.LogisticRegression/SingleLayerNeuralNetworks/LogisticRegression.java | Chapter 2/DLWJ.LogisticRegression/SingleLayerNeuralNetworks/LogisticRegression.java | package DLWJ.SingleLayerNeuralNetworks;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import DLWJ.util.GaussianDistribution;
import static DLWJ.util.ActivationFunction.softmax;
public class LogisticRegression {
public int nIn;
... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 2/DLWJ.Perceptrons/util/ActivationFunction.java | Chapter 2/DLWJ.Perceptrons/util/ActivationFunction.java | package DLWJ.util;
public final class ActivationFunction {
public static int step(double x) {
if (x >= 0) {
return 1;
} else {
return -1;
}
}
}
| java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 2/DLWJ.Perceptrons/util/GaussianDistribution.java | Chapter 2/DLWJ.Perceptrons/util/GaussianDistribution.java | package DLWJ.util;
import java.util.Random;
public final class GaussianDistribution {
private final double mean;
private final double var;
private final Random rng;
public GaussianDistribution(double mean, double var, Random rng) {
if (var < 0.0) {
throw new IllegalArgumentExcep... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 2/DLWJ.Perceptrons/SingleLayerNeuralNetworks/Perceptrons.java | Chapter 2/DLWJ.Perceptrons/SingleLayerNeuralNetworks/Perceptrons.java | package DNN.SingleLayerNeuralNetworks;
import java.util.Random;
import DNN.util.GaussianDistribution;
import static DNN.util.ActivationFunction.step;
public class Perceptrons {
public int nIn; // dimensions of input data
public double[] w; // weight vector of perceptrons
public Perceptrons(int ... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 2/DLWJ.MultiLayerPerceptrons/util/RandomGenerator.java | Chapter 2/DLWJ.MultiLayerPerceptrons/util/RandomGenerator.java | package DLWJ.util;
import java.util.Random;
public final class RandomGenerator {
public static double uniform(double min, double max, Random rng) {
return rng.nextDouble() * (max - min) + min;
}
}
| java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 2/DLWJ.MultiLayerPerceptrons/util/ActivationFunction.java | Chapter 2/DLWJ.MultiLayerPerceptrons/util/ActivationFunction.java | package DLWJ.util;
public final class ActivationFunction {
public static int step(double x) {
if (x >= 0) {
return 1;
} else {
return -1;
}
}
public static double sigmoid(double x) {
return 1. / (1. + Math.pow(Math.E, -x));
}
public static... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 2/DLWJ.MultiLayerPerceptrons/util/GaussianDistribution.java | Chapter 2/DLWJ.MultiLayerPerceptrons/util/GaussianDistribution.java | package DLWJ.util;
import java.util.Random;
public final class GaussianDistribution {
private final double mean;
private final double var;
private final Random rng;
public GaussianDistribution(double mean, double var, Random rng) {
if (var < 0.0) {
throw new IllegalArgumentExcep... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 2/DLWJ.MultiLayerPerceptrons/MultiLayerNeuralNetworks/HiddenLayer.java | Chapter 2/DLWJ.MultiLayerPerceptrons/MultiLayerNeuralNetworks/HiddenLayer.java | package DLWJ.MultiLayerNeuralNetworks;
import java.util.Random;
import java.util.function.DoubleFunction;
import static DLWJ.util.ActivationFunction.*;
import static DLWJ.util.RandomGenerator.uniform;
public class HiddenLayer {
public int nIn;
public int nOut;
public double[][] W;
public double[] b;... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 2/DLWJ.MultiLayerPerceptrons/MultiLayerNeuralNetworks/MultiLayerPerceptrons.java | Chapter 2/DLWJ.MultiLayerPerceptrons/MultiLayerNeuralNetworks/MultiLayerPerceptrons.java | package DLWJ.MultiLayerNeuralNetworks;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import DLWJ.SingleLayerNeuralNetworks.LogisticRegression;
public class MultiLayerPerceptrons {
public int nIn;
public int nHidden;
pub... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 2/DLWJ.MultiLayerPerceptrons/SingleLayerNeuralNetworks/LogisticRegressionXOR.java | Chapter 2/DLWJ.MultiLayerPerceptrons/SingleLayerNeuralNetworks/LogisticRegressionXOR.java | package DLWJ.SingleLayerNeuralNetworks;
import java.util.*;
public class LogisticRegressionXOR {
public static void main(String[] args) {
final Random rng = new Random(1234); // seed random
//
// Declare variables and constants
//
final int patterns = 2; // number of c... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 2/DLWJ.MultiLayerPerceptrons/SingleLayerNeuralNetworks/Perceptrons.java | Chapter 2/DLWJ.MultiLayerPerceptrons/SingleLayerNeuralNetworks/Perceptrons.java | package DNN.SingleLayerNeuralNetworks;
import java.util.Random;
import DNN.util.GaussianDistribution;
import static DNN.util.ActivationFunction.step;
public class Perceptrons {
public int nIn; // dimensions of input data
public double[] w; // weight vector of perceptrons
public Perceptrons(int ... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 2/DLWJ.MultiLayerPerceptrons/SingleLayerNeuralNetworks/LogisticRegression.java | Chapter 2/DLWJ.MultiLayerPerceptrons/SingleLayerNeuralNetworks/LogisticRegression.java | package DLWJ.SingleLayerNeuralNetworks;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import DLWJ.util.GaussianDistribution;
import static DLWJ.util.ActivationFunction.softmax;
public class LogisticRegression {
public int nIn;
... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 7/DLWL.chapter-7.snapshot/src/main/java/DLWJ/util/RandomGenerator.java | Chapter 7/DLWL.chapter-7.snapshot/src/main/java/DLWJ/util/RandomGenerator.java | package DLWJ.util;
import java.util.Random;
public final class RandomGenerator {
public static double uniform(double min, double max, Random rng) {
return rng.nextDouble() * (max - min) + min;
}
public static int binomial(int n, double p, Random rng) {
if(p < 0 || p > 1) return 0;
... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 7/DLWL.chapter-7.snapshot/src/main/java/DLWJ/util/ActivationFunction.java | Chapter 7/DLWL.chapter-7.snapshot/src/main/java/DLWJ/util/ActivationFunction.java | package DLWJ.util;
public final class ActivationFunction {
public static int step(double x) {
if (x >= 0) {
return 1;
} else {
return -1;
}
}
public static double sigmoid(double x) {
return 1. / (1. + Math.pow(Math.E, -x));
}
public static... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 7/DLWL.chapter-7.snapshot/src/main/java/DLWJ/util/GaussianDistribution.java | Chapter 7/DLWL.chapter-7.snapshot/src/main/java/DLWJ/util/GaussianDistribution.java | package DLWJ.util;
import java.util.Random;
public final class GaussianDistribution {
private final double mean;
private final double var;
private final Random rng;
public GaussianDistribution(double mean, double var, Random rng) {
if (var < 0.0) {
throw new IllegalArgumentExcep... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 7/DLWL.chapter-7.snapshot/src/main/java/DLWJ/MultiLayerNeuralNetworks/HiddenLayer.java | Chapter 7/DLWL.chapter-7.snapshot/src/main/java/DLWJ/MultiLayerNeuralNetworks/HiddenLayer.java | package DLWJ.MultiLayerNeuralNetworks;
import java.util.Random;
import java.util.function.DoubleFunction;
import static DLWJ.util.ActivationFunction.*;
import static DLWJ.util.RandomGenerator.*;
public class HiddenLayer {
public int nIn;
public int nOut;
public double[][] W;
public double[] b;
p... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 7/DLWL.chapter-7.snapshot/src/main/java/DLWJ/MultiLayerNeuralNetworks/MultiLayerPerceptrons.java | Chapter 7/DLWL.chapter-7.snapshot/src/main/java/DLWJ/MultiLayerNeuralNetworks/MultiLayerPerceptrons.java | package DLWJ.MultiLayerNeuralNetworks;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import DLWJ.SingleLayerNeuralNetworks.LogisticRegression;
public class MultiLayerPerceptrons {
public int nIn;
public int nHidden;
pub... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
PacktPublishing/Java-Deep-Learning-Essentials | https://github.com/PacktPublishing/Java-Deep-Learning-Essentials/blob/eb314e72f694a8ffb130f99ea2d566c4cb94d6c8/Chapter 7/DLWL.chapter-7.snapshot/src/main/java/DLWJ/examples/ND4J/Perceptrons.java | Chapter 7/DLWL.chapter-7.snapshot/src/main/java/DLWJ/examples/ND4J/Perceptrons.java | package DLWJ.examples.ND4J;
import java.util.Random;
import DLWJ.util.GaussianDistribution;
import static DLWJ.util.ActivationFunction.step;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.factory.Nd4j;
public class Perceptrons {
public int nIn; // dimensions of input data
public I... | java | MIT | eb314e72f694a8ffb130f99ea2d566c4cb94d6c8 | 2026-01-05T02:30:39.040194Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.