Also works with smurfs and Donald duck
Can I get 4d6+24 silver arrows? Lazy evaluation please.
I mean maybe that is some engineering and planning marvel but not the kind that is good for your sanity in the long run. Just saves the day.
She addressed the far right European movement Patriots of Europe. This movement is endorsed by people like Marine Le Pen, Viktor Orban, Milei etc major players of today's world pushing world actively to extreme right, bigotry, sexism, anti-immigration and anti-muslim policies etc you name it. The slogan of this group is "Make Europe Great Again", that should tell you all you need about this group.
She congratulated Netanyahu on his “decisive actions” in the “war” in Gaza, declared that "the struggle of Venezuela is the struggle of Israel," and has promised to move Venezuela’s embassy in Israel to Jerusalem, which would violate international law.
I don't know how much she has done for Venezuela, can't comment on that but if you work with groups that are actively pushing the world to shit, I find it hard to believe that her own goals for her own country can be that good. Far right politics is generally about power and personal gain at the expense of masses.
I also don't know if she is actively a zionist but she has no qualms about supporting zionist and far-right agendas so she can get some bit of political power in her corner of the world. I wouldn't let her walk past near the nobel peace prize. Not that that prize has any credibility any more.
Every family has that weird cousin (it might be me in our case....)
You have to love how OP first calls Kemi Badenoch "whoever that diversity hire black woman is" and then attempts to structure a progressive sentence that only ends up being even more racist.
real men of Budweiser
The graph in my input (and I assume everyone else's too) is DAG so one can use transfer matrices for the first part (after severing connections going out of "out") and the second one topological sorting and just count paths between each node separately and multiply them. First part could be done much easily using the machinery of part2 but I wanted to use my favourite object transfer matrices for the solution. Second part runs in about 0.09 seconds.
from pathlib import Path
import networkx as nx
import numpy as np
cwd = Path(__file__).parent.resolve()
def parse_input(file_path):
with file_path.open("r") as fp:
data = list(map(str.strip, fp.readlines()))
nodes = [y for line in data for y in line.replace(':','').split(' ')]
M = np.zeros((len(nodes), len(nodes)))
for line in data:
from_node = line.split(':')[0]
to_nodes = line.split(': ')[-1].split(' ')
I0 = nodes.index(from_node)
I1 = [nodes.index(n) for n in to_nodes]
M[I0, I1] = 1
return M, nodes
def count_paths_between(ind0, ind1, M):
'''
counts paths by severing any outgoing connection from node ind1
and using transfer matrices. Stopping condition is having the
same positive number of paths for 10 cycles.
'''
vec = np.zeros((M.shape[0]))
vec[ind0] = 1
nhistory = []
A = M.T.copy()
A[:, ind1] = 0
A[ind1, ind1] = 1
counter = 0
while True:
vec = A@vec
nhistory.append(vec[ind1])
counter +=1
if len(nhistory)>10 and (len(set(nhistory[-10:]))==1 and nhistory[-1]!=0):
return nhistory[-1]
def count_paths_dag(G, source, target):
npaths = {node: 0 for node in G.nodes()}
npaths[source] = 1
for node in nx.topological_sort(G):
for nbr in G.successors(node):
npaths[nbr] += npaths[node]
return npaths[target]
def solve_problem1(file_name, path_nodes=None):
M, nodes = parse_input(Path(cwd, file_name))
if path_nodes is None:
npaths = count_paths_between(nodes.index("you"), nodes.index("out"), M)
else:
G = nx.from_numpy_array(M, create_using=nx.DiGraph(),
nodelist=nodes)
# assumed G is a DAG, below will raise error if not
sorted_nodes = list(nx.topological_sort(G))
sorted_path_nodes = sorted(path_nodes, key=sorted_nodes.index)
#make sure path nodes are not topoligically equivalent
for node1, node2 in zip(sorted_path_nodes[:-1], sorted_path_nodes[1:]):
assert nx.has_path(G, node1, node2)
npaths = np.prod([count_paths_dag(G, node1, node2) for node1, node2 in
zip(sorted_path_nodes[:-1], sorted_path_nodes[1:])])
return npaths
if __name__ == "__main__":
assert solve_problem1("test_input1") == 5
assert solve_problem1("input") == 431
assert solve_problem1("test_input2", ["svr","dac","fft","out"]) == 2
assert solve_problem1("input", ["svr","dac","fft","out"]) == 358458157650450
thanks in that case yea bad luck, glad he was in a cage
feel free to block me instead, I post images every now and then
Avicenna
0 post score0 comment score
not really
https://www.anthropic.com/news/statement-dario-amodei-american-ai-leadership
They seem quite psyched to have Trump as the president. A whole page about what a good puppy they have been: