This goes with the Traversy Media Scrapy tutorial on YouTube
pip install scrapy
| Java Version | Number of Items | Method | Throughput Ops/ms | |
|---|---|---|---|---|
| Java 17 | 25 | Group By | 1840.462 | |
| Java 17 | 25 | Double Loop | 2432.982 | |
| Java 8 | 25 | Group By | 2481.166 | |
| Java 8 | 25 | Double Loop | 2370.741 | |
| Java 17 | 1,000 | Group By | 55.222 | |
| Java 17 | 1,000 | Double Loop | 47.378 | |
| Java 8 | 1,000 | Group By | 78.105 | |
| Java 8 | 1,000 | Double Loop | 59.908 | |
| Java 17 | 50,000 | Group By | 1.09 |
| # Source: https://gist.github.com/8d941690a087b0de0e2731a52cfb1f51 | |
| ############################################################### | |
| # Building Event-Driven Microservices In Kubernetes With Dapr # | |
| # https://youtu.be/-4sHUvfk2Eg # | |
| ############################################################### | |
| # Additional Info: | |
| # - https://dapr.io | |
| # - What is microservices architecture?: https://youtu.be/F-37_gV2tMs |
| /* CHAT STYLES */ | |
| * { | |
| font-family: Avenir, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, | |
| Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, | |
| Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji; | |
| letter-spacing: 0.5px; | |
| } | |
| .ce-chat-list { | |
| background-color: rgb(240, 240, 240) !important; |
| # DFS | |
| def preorder(self, root): | |
| if not root: | |
| return [] | |
| ret = [] | |
| stack = [root] | |
| while stack: | |
| node = stack.pop() | |
| ret.append(node.val) | |
| if node.right: |
| def is_valid_state(state): | |
| # check if it is a valid solution | |
| return True | |
| def get_candidates(state): | |
| return [] | |
| def search(state, solutions): | |
| if is_valid_state(state): | |
| solutions.append(state.copy()) |
| //usr/bin/env jbang "$0" "$@" ; exit $? | |
| //DEPS io.smallrye.reactive:smallrye-mutiny-vertx-web-client:1.1.0 | |
| //DEPS io.smallrye.reactive:mutiny:0.7.0 | |
| //DEPS org.slf4j:slf4j-nop:1.7.30 | |
| package io.vertx.mutiny.quotes; | |
| import io.smallrye.mutiny.Multi; | |
| import io.smallrye.mutiny.Uni; |
| Task 1: Create a project jumphost instance | |
| Navigation menu > Compute engine > VM Instance | |
| Task 2: Create a Kubernetes service cluster | |
| gcloud config set compute/zone us-east1-b | |
| gcloud container clusters create nucleus-webserver1 |
| import 'dart:convert'; | |
| import 'package:meta/meta.dart'; | |
| import 'package:http/http.dart' as http; | |
| class HttpClient extends http.BaseClient { | |
| factory HttpClient(String token) { | |
| final http.Client client = http.Client(); | |
| return HttpClient._createInstance(client, token); | |
| } | |
| HttpClient._createInstance(this._inner, this.token); |
This goes with the Traversy Media Scrapy tutorial on YouTube
pip install scrapy