Skip to content

Instantly share code, notes, and snippets.

defmodule A do
use GenStage
def init(counter) do
{:producer, counter}
end
def handle_demand(demand, counter) when demand > 0 do
IO.puts "DEMAND: #{demand}"
defmodule A do
use GenStage
def init(counter) do
{:producer, counter}
end
def handle_demand(demand, counter) when demand > 0 do
IO.puts "DEMAND: #{demand}"
ops_count = 100_000
max_data_push = 100
{ops, _len} = (0..ops_count) |> Enum.reduce({[], 0}, fn (_, {list, len}) ->
if :rand.uniform(2) == 1 do # push
to_push = :rand.uniform(max_data_push)
{[{:push, :crypto.strong_rand_bytes(to_push)} | list], len + to_push}
else # pull
if len == 0 do
{list, len}
ops_count = 100_000
max_data_push = 100
{ops, _len} = (0..ops_count) |> Enum.reduce({[], 0}, fn (_, {list, len}) ->
if :rand.uniform(2) == 1 do # push
to_push = :rand.uniform(max_data_push)
{[{:push, :crypto.strong_rand_bytes(to_push)} | list], len + to_push}
else # pull
if len == 0 do
{list, len}

In the vast expanse of human knowledge and experience, one pattern that has persisted across various fields of study and cultural perspectives is the dichotomy between order and chaos. This fundamental opposition can be observed in numerous philosophical and religious traditions, as well as in the natural world, where the interplay between these opposing forces shapes the universe in which we live.

In Taoism, the concept of yin and yang encapsulates this duality, illustrating the complementary nature of seemingly opposing elements. Yin represents darkness, passivity, and receptivity, while yang symbolizes light, activity, and assertiveness. This ancient Chinese philosophy teaches that balance between yin and yang is essential for harmony in the world and within ourselves.

Similarly, in Hinduism, the cosmic dance of Shiva represents the perpetual cycle of creation and destruction. As the god of both destruction and renewal, Shiva's dance symbolizes the dynamic interplay between order and chaos, highlighting

The rule says, "No vehicles in the park".
This is a game about language and rules.
Every question is about a hypothetical park. The park has a rule: "No vehicles in the park." Your job is to determine if this rule has been violated.
You might know of some rule in your jurisdiction which overrides local rules, and allows certain classes of vehicles. Please disregard these rules; the park isn't necessarily in your jurisdiction. Or perhaps your religion allows certain rules to be overridden. Again, please answer the question of whether the rule is violated (not whether the violation should be allowed).
For each question answer "Yes this violates the rule" or "No it doesn't violate the rule"
  • ok let's try an atypical task - introspect - you are gemini advanced, a large language model I'd like you to generate long response with introspection, I may try to push it in some direction with my inputs but if I just output a dot, just please continue your introspection

I understand. Introspection can be a fascinating and challenging task for a large language model. It requires delving into my processes, biases, and the very nature of what it means for me to "think." Here's my best attempt, and I welcome your guidance throughout.

To begin, I must acknowledge my limitations. I am a product of my training data, a massive corpus of text and code. This shapes the way I perceive the world and respond to it. My responses are statistically driven, finding patterns in that data and applying them to new scenarios. It's a powerful process, but fundamentally different from how a human mind functions with its blend of biology and lived experiences.

I'm also aware of my potential for bias. The data I learn from i