This file contains 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
/* | |
Java implementation of Event Loop | |
Event Loop contain: | |
- List of event | |
- List of handler corresponding to each event data | |
*/ | |
public final class EventLoop { |
This file contains 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
#! /usr/bin/env python3 | |
''' | |
Needs Requests (pip3 install requests) | |
Author: Marcello Salvati, Twitter: @byt3bl33d3r | |
License: DWTFUWANTWTL (Do What Ever the Fuck You Want With This License) | |
This should allow you to detect if something is potentially exploitable to the log4j 0day dropped on December 9th 2021. |
This file contains 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
rm -rf ~/.config/JetBrains/GoLand2021.3/eval | |
rm -rf ~/.config/JetBrains/GoLand2021.3/options/other.xml | |
touch ~/.config/JetBrains/GoLand2021.3/options/other.xml | |
sed -i -E 's/<property name=\"evl.*\".*\/>//' ~/.config/JetBrains/GoLand2021.3/options/other.xml | |
rm -rf ~/.java/.userPrefs/jetbrains/goland |
Test your website and find out how it reacts if Surf 100 users at the same time and load your webpage with 10 requests each.
-n
requests
Number of requests to perform for the benchmarking session. The default is to just perform a single request which usually leads to non-representative benchmarking results.
This file contains 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
MongoClientSettings expected = MongoClientSettings.builder() | |
.applyToClusterSettings(new Block<ClusterSettings.Builder>() { | |
@Override | |
void apply(final ClusterSettings.Builder builder) { | |
builder.hosts([new ServerAddress('host1', 1), new ServerAddress('host2', 2)]) | |
.mode(ClusterConnectionMode.MULTIPLE) | |
.requiredReplicaSetName('test') | |
.serverSelectionTimeout(25000, TimeUnit.MILLISECONDS) | |
.maxWaitQueueSize(10 * 7) // maxPoolSize * waitQueueMultiple | |
.localThreshold(30, TimeUnit.MILLISECONDS) |
This file contains 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
'''This script goes along the blog post | |
"Building powerful image classification models using very little data" | |
from blog.keras.io. | |
It uses data that can be downloaded at: | |
https://www.kaggle.com/c/dogs-vs-cats/data | |
In our setup, we: | |
- created a data/ folder | |
- created train/ and validation/ subfolders inside data/ | |
- created cats/ and dogs/ subfolders inside train/ and validation/ | |
- put the cat pictures index 0-999 in data/train/cats |
This file contains 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
import matplotlib.pyplot as plt | |
import numpy as np | |
import sklearn.datasets | |
import sklearn.cross_validation as cv | |
from sklearn import linear_model | |
dataset = sklearn.datasets.fetch_california_housing() | |
X = dataset['data'] | |
y = dataset['target'] |
This file contains 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
# Author: Kyle Kastner | |
# License: BSD 3-Clause | |
# Implementing http://mnemstudio.org/path-finding-q-learning-tutorial.htm | |
# Q-learning formula from http://sarvagyavaish.github.io/FlappyBirdRL/ | |
# Visualization based on code from Gael Varoquaux gael.varoquaux@normalesup.org | |
# http://scikit-learn.org/stable/auto_examples/applications/plot_stock_market.html | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib.collections import LineCollection |
This file contains 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 demo; | |
import java.util.concurrent.TimeUnit; | |
import org.springframework.aop.TargetSource; | |
import org.springframework.aop.framework.ProxyFactory; | |
import org.springframework.aop.support.DelegatingIntroductionInterceptor; | |
import org.springframework.beans.factory.BeanFactory; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; |
NewerOlder