This file contains 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
> Task :react-native-gradle-plugin:compileKotlin FAILED | |
1 actionable task: 1 executed | |
FAILURE: Build failed with an exception. | |
* What went wrong: | |
Execution failed for task ':react-native-gradle-plugin:compileKotlin'. | |
> java.io.IOException: Unable to delete directory '/Users/kelyn_njeri/Desktop/Work/promo-customer/node_modules/react-native-gradle-plugin/build/classes/kotlin/main' | |
Failed to delete some children. This might happen because a process has files open or has its working directory set in the target directory. | |
- /Users/kelyn_njeri/Desktop/Work/promo-customer/node_modules/react-native-gradle-plugin/build/classes/kotlin/main/META-INF/react-native-gradle-plugin.kotlin_module |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/wait.h> | |
#include <string.h> | |
#include <errno.h> | |
#define BUFFER_SIZE 256 | |
#define MAX_COMMAND_LENGTH 100 |
This file contains 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
class BellmanFord { | |
// Graph represented as an adjacency list | |
graph: Record<string, Record<string, number>>; | |
constructor(graph: Record<string, Record<string, number>>) { | |
this.graph = graph; | |
} | |
bellmanFord(source: string) { | |
// Initialize distances and predecessors |
This file contains 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
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func bellmanFord(graph map[string]map[string]float64, source string) (map[string]float64, map[string]string) { | |
distances := make(map[string]float64) | |
predecessors := make(map[string]string) |
This file contains 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 bellman_ford(graph, source): | |
# Initialize distances and predecessors | |
distances = {vertex: float('infinity') for vertex in graph} | |
predecessors = {vertex: None for vertex in graph} | |
distances[source] = 0 | |
# Relax edges repeatedly | |
for _ in range(len(graph) - 1): | |
for vertex in graph: | |
for neighbor in graph[vertex]: |
This file contains 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
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
type Edge struct { | |
to int | |
cap int |
This file contains 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
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func hungarianAlgorithm(costMatrix [][]int) ([]int, int) { | |
rows := len(costMatrix) | |
cols := len(costMatrix[0]) |
This file contains 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
import numpy as np | |
from scipy.optimize import linear_sum_assignment | |
def hungarian_method(cost_matrix): | |
row_indices, col_indices = linear_sum_assignment(cost_matrix) | |
return list(zip(row_indices, col_indices)) | |
# Example usage: | |
cost_matrix = np.array([ | |
[3, 2, 7], |
This file contains 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
package main | |
import ( | |
"fmt" | |
) | |
type HopcroftKarp struct { | |
graph map[string][]string | |
matching map[string]string | |
visited map[string]bool |
NewerOlder