conda create -n project_name python=3.10
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
from selenium import webdriver | |
from datetime import datetime | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.common.keys import Keys | |
from selenium.common.exceptions import NoSuchElementException | |
from time import time | |
from time import sleep | |
import pandas as pd |
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
FROM ethereum/client-go:v1.10.17 | |
ARG ACCOUNT_PASSWORD | |
ENTRYPOINT sleep infinity |
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
config :tracker, Tracker.PromEx, | |
manual_metrics_start_delay: :no_delay, | |
drop_metrics_groups: [], | |
grafana: [ | |
host: System.get_env("GRAFANA_HOST", "http://localhost:3000"), | |
auth_token: "eyJrIjoienZWWURQYnJVOG5xS1RCdGFmdHdsQ3Q0YUVKVXQ0NVciLCJuIjoidHJhY2tlcl9hcHAiLCJpZCI6MX0=", | |
upload_dashboard_on_start: true, | |
folder_name: "tracer_dashboard", | |
annotate_app_lifecycle: true | |
] |
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
# my global config | |
global: | |
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. | |
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. | |
# scrape_timeout is set to the global default (10s). | |
# Alertmanager configuration | |
alerting: | |
alertmanagers: | |
- static_configs: |
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
defmodule Sender.Application do | |
# See https://hexdocs.pm/elixir/Application.html | |
# for more information on OTP Applications | |
@moduledoc false | |
use Application | |
@impl true | |
def start(_type, _args) do | |
children = [ |
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
... | |
def second_event(delay) do | |
OpenTelemetry.Tracer.start_span("second_event_span") | |
# again mimicing the same stuff | |
Process.sleep(delay) | |
# use set_attributes api to add the attributes during the span | |
OpenTelemetry.Span.set_attributes([{"delay_data", delay}]) | |
OpenTelemetry.Tracer.end_span() |
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
defmodule ZipkinRandom do | |
... | |
def hello do | |
OpenTelemetry.Tracer.start_span("span_name_1") | |
Process.sleep(100) | |
second_event(200) |
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
defmodule ZipkinRandom.Application do | |
# See https://hexdocs.pm/elixir/Application.html | |
# for more information on OTP Applications | |
@moduledoc false | |
use Application | |
def start(_type, _args) do | |
# register your tracer so that opentelemtry knows that | |
# it needs to start tracing the events |
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
defmodule ExChain.Blockchain do | |
@moduledoc """ | |
This module contains the blockchain related functions | |
""" | |
alias __MODULE__ | |
alias ExChain.Blockchain.Block | |
... | |
@spec valid_chain?(Blockchain.t()) :: boolean() |
NewerOlder