<｜begin▁of▁sentence｜>### Instruction:
Given the requirement to create a scale-free directed graph with parameters being: 100 nodes, alpha=0.41, beta=0.54, gamma=0.05, and a seed of 42, how do we generate this graph and access its nodes and edges using NetworkX?
### Response:
import networkx as nx

# Create a scale-free graph with 100 nodes
# Customize the scale-free network parameters
alpha = 0.41
beta = 0.54
gamma = 0.05  # Note that alpha + beta + gamma must equal 1
seed = 42

# Generate the graph
G = nx.scale_free_graph(100, alpha=alpha, beta=beta, gamma=gamma, seed=seed)

# Access nodes and edges
nodes = G.nodes()
edges = G.edges()

# Optionally, you can convert the graph to a directed graph, if it is not already
D = G.to_directed()

# Print information about the graph
print(f'Number of nodes: {len(nodes)}')
print(f'Number of edges: {len(edges)}')
<|EOT|>
