index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
5,372
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/static/graph.py
import tkinter as tk import matplotlib.pyplot as plt import numpy as np from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg from matplotlib.colors import rgb2hex from networkit.nxadapter import nk2nx from networkit.viztasks import drawGraph from networkx import spring_layout class GraphFrame(tk.Frame): ...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,373
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/temporal/wizard/rating_methods/o_rating.py
from BribeNet.graph.ratingMethod import RatingMethod from BribeNet.gui.apps.temporal.wizard.rating_methods.rating_method_frame import RatingMethodFrame class ORating(RatingMethodFrame): enum_value = RatingMethod.O_RATING name = 'o_rating'
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,374
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/temporal/wizard/wizard.py
import tkinter as tk import numpy as np from BribeNet.graph.ratingMethod import RatingMethod from BribeNet.gui.apps.temporal.wizard.bribers import TemporalBribers from BribeNet.gui.apps.temporal.wizard.generation import TemporalGeneration from BribeNet.gui.apps.temporal.wizard.rating_method import TemporalRatingMetho...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,375
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/temporal/wizard/rating_methods/weighted_median_p_rating.py
from BribeNet.graph.ratingMethod import RatingMethod from BribeNet.gui.apps.temporal.wizard.rating_methods.rating_method_frame import RatingMethodFrame class WeightedMedianPRating(RatingMethodFrame): enum_value = RatingMethod.WEIGHTED_MEDIAN_P_RATING name = 'weighted_median_p_rating'
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,376
RobMurray98/BribeNet
refs/heads/master
/test/BribeNet/graph/static/test_ratingGraphBuilder.py
from unittest import TestCase from BribeNet.bribery.static.influentialNodeBriber import InfluentialNodeBriber from BribeNet.bribery.static.mostInfluentialNodeBriber import MostInfluentialNodeBriber from BribeNet.bribery.static.nonBriber import NonBriber from BribeNet.bribery.static.oneMoveInfluentialNodeBriber import ...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,377
RobMurray98/BribeNet
refs/heads/master
/src/docker_main.py
from sys import exit from BribeNet.gui.main import GUI """ Due to a bug where app.mainloop() will not exit on closing of the root Tk instance if a Toplevel was at any stage instantiated, we use sys.exit(0) to 'hard exit' such that the Docker container does not hang after closing. """ def hard_exit(tk_app): tk_a...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,378
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/graph/temporal/action/actionType.py
import enum @enum.unique class ActionType(enum.Enum): NONE = 0 BRIBED = 1 SELECT = 2
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,379
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/graph/temporal/weighting/communityWeighting.py
import random # noinspection PyUnresolvedReferences from networkit import Graph # noinspection PyUnresolvedReferences from networkit.community import PLM def get_communities(graph: Graph) -> [[int]]: """ Gets the underlying communities of the graph, as sets of nodes. """ communities = PLM(graph, refi...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,380
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/graph/temporal/weighting/traverseWeighting.py
from random import gauss # noinspection PyUnresolvedReferences from networkit import Graph from numpy import mean as average def assign_traverse_averaged(graph: Graph, mean: float, std_dev: float = 0.2) -> [float]: """ Assign node 0 with the mean. Then assign all of its neighbours with a value close to t...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,381
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/classes/tooltip.py
import tkinter as tk # noinspection PyUnusedLocal class ToolTip(object): """ Show a tooltip from https://stackoverflow.com/a/56749167/5539184 """ def __init__(self, widget, text): self.widget = widget self.tip_window = None self.id = None self.x = self.y = 0 ...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,382
RobMurray98/BribeNet
refs/heads/master
/test/BribeNet/graph/static/test_multiBriberRatingGraph.py
from copy import deepcopy from unittest import TestCase from BribeNet.bribery.static.nonBriber import NonBriber from BribeNet.bribery.static.randomBriber import RandomBriber from BribeNet.graph.static.ratingGraph import StaticRatingGraph class TestMultiBriberRatingGraph(TestCase): def setUp(self) -> None: ...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,383
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/temporal/main.py
import tkinter as tk import os from networkit.nxadapter import nk2nx from networkx import spring_layout from BribeNet.bribery.temporal.budgetNodeBriber import BudgetNodeBriber from BribeNet.bribery.temporal.influentialNodeBriber import InfluentialNodeBriber from BribeNet.bribery.temporal.mostInfluentialNodeBriber imp...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,384
RobMurray98/BribeNet
refs/heads/master
/test/BribeNet/graph/temporal/action/test_customerAction.py
from unittest import TestCase from BribeNet.bribery.temporal.action.singleBriberyAction import SingleBriberyAction from BribeNet.graph.temporal.action.customerAction import CustomerAction, CustomerActionExecutedMultipleTimesException,\ CustomerActionTimeNotCorrectException from BribeNet.bribery.temporal.nonBriber i...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,385
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/bribery/temporal/randomBriber.py
import random from BribeNet.bribery.temporal.action.singleBriberyAction import SingleBriberyAction from BribeNet.bribery.temporal.briber import TemporalBriber DELTA = 0.001 # ensures total bribes do not exceed budget class RandomBriber(TemporalBriber): def _next_action(self) -> SingleBriberyAction: cu...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,386
RobMurray98/BribeNet
refs/heads/master
/test/BribeNet/graph/test_ratingGraph.py
from unittest import TestCase class TestRatingGraph(TestCase): """ See test/graph/static/test_singleBriberRatingGraph and test/graph/static/test_multiBriberRatingGraph """ pass
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,387
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/graph/generation/__init__.py
import enum from networkit.generators import WattsStrogatzGenerator, BarabasiAlbertGenerator from BribeNet.graph.generation.algo.compositeGenerator import CompositeGenerator from BribeNet.helpers.bribeNetException import BribeNetException class GraphGenerationAlgoNotDefinedException(BribeNetException): pass @...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,388
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/graph/generation/generator.py
import abc # noinspection PyUnresolvedReferences from networkit import Graph from BribeNet.graph.generation import GraphGeneratorAlgo, algo_to_constructor class GraphGenerator(abc.ABC): def __init__(self, a: GraphGeneratorAlgo, *args, **kwargs): """ Thin wrapper class for NetworKit graph genera...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,389
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/graph/generation/algo/compositeGenerator.py
from math import floor, log, ceil from random import gauss, sample, random import networkit as nk # noinspection PyUnresolvedReferences from networkit import Graph from networkit.generators import BarabasiAlbertGenerator, WattsStrogatzGenerator def _make_complete(n: int): g_ = Graph(n) for i in g_.iterNodes(...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,390
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/static/briber_wizard/frame.py
import tkinter as tk class StaticBriberWizardFrame(tk.Frame): """ Frame for pop-up wizard for adding a static briber """ pass
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,391
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/bribery/static/briber.py
from abc import ABC, abstractmethod from BribeNet.bribery.briber import Briber, BriberyGraphNotSetException from BribeNet.helpers.bribeNetException import BribeNetException class GraphNotSubclassOfStaticRatingGraphException(BribeNetException): pass class StaticBriber(Briber, ABC): """ Static bribers pe...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,392
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/classes/param_list_frame.py
import abc import os import tkinter as tk from PIL import ImageTk, Image from BribeNet.gui.classes.tooltip import ToolTip class ParamListFrame(tk.Frame, abc.ABC): name = "ABC" def __init__(self, parent): super().__init__(parent) self.parent = parent self.params = {} self.des...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,393
RobMurray98/BribeNet
refs/heads/master
/test/BribeNet/graph/temporal/test_multiBriberRatingGraph.py
from copy import deepcopy from unittest import TestCase from BribeNet.bribery.temporal.nonBriber import NonBriber from BribeNet.bribery.temporal.randomBriber import RandomBriber from BribeNet.graph.temporal.noCustomerActionGraph import NoCustomerActionGraph class TestMultiBriberRatingGraph(TestCase): def setUp(...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,394
RobMurray98/BribeNet
refs/heads/master
/test/BribeNet/bribery/static/test_randomBriber.py
from BribeNet.bribery.static.randomBriber import RandomBriber from BribeNet.graph.static.ratingGraph import StaticRatingGraph from test.BribeNet.bribery.static.briberTestCase import BriberTestCase class TestRandomBriber(BriberTestCase): def setUp(self) -> None: self.briber = RandomBriber(10) self...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,395
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/bribery/static/oneMoveRandomBriber.py
import random import numpy as np from BribeNet.bribery.static.briber import StaticBriber class OneMoveRandomBriber(StaticBriber): def _next_bribe(self): customers = self.get_graph().get_customers() # pick random customer from list c = random.choice(customers) max_rating = self.g...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,396
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/temporal/wizard/rating_methods/weighted_p_rating.py
from BribeNet.graph.ratingMethod import RatingMethod from BribeNet.gui.apps.temporal.wizard.rating_methods.rating_method_frame import RatingMethodFrame class WeightedPRating(RatingMethodFrame): enum_value = RatingMethod.WEIGHTED_P_RATING name = 'weighted_p_rating'
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,397
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/bribery/static/oneMoveInfluentialNodeBriber.py
from BribeNet.bribery.briber import BriberyGraphNotSetException from BribeNet.bribery.static.briber import StaticBriber from BribeNet.helpers.override import override class OneMoveInfluentialNodeBriber(StaticBriber): def __init__(self, u0, k=0.1): super().__init__(u0) self.influencers = [] ...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,398
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/temporal/results_wizard/results.py
class ResultsStore: """ Class for storing results during runs, identified by keys, seperated to xs and ys """ def __init__(self, xs, ys): self.xs = xs self.ys = ys self.data = {k: [] for k in (xs + ys)} def add(self, k, v): self.data[k].append(v) def get(self, ...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,399
RobMurray98/BribeNet
refs/heads/master
/test/BribeNet/bribery/temporal/test_budgetBriber.py
from BribeNet.bribery.temporal.budgetNodeBriber import BudgetNodeBriber from BribeNet.graph.temporal.noCustomerActionGraph import NoCustomerActionGraph from test.BribeNet.bribery.temporal.briberTestCase import BriberTestCase from unittest.mock import MagicMock class TestBudgetBriber(BriberTestCase): def setUp(se...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,400
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/temporal/wizard/generation.py
from BribeNet.gui.apps.static.wizard.generation import StaticGeneration class TemporalGeneration(StaticGeneration): pass
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,401
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/bribery/temporal/oneMoveEvenBriber.py
import random import numpy as np from BribeNet.bribery.temporal.action.singleBriberyAction import SingleBriberyAction from BribeNet.bribery.temporal.briber import TemporalBriber class OneMoveEvenBriber(TemporalBriber): def _next_action(self) -> SingleBriberyAction: customers = self.get_graph().get_cust...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,402
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/temporal/wizard/rating_methods/rating_method_frame.py
import abc from typing import Optional from BribeNet.graph.ratingMethod import RatingMethod from BribeNet.gui.classes.param_list_frame import ParamListFrame class RatingMethodFrame(ParamListFrame, abc.ABC): enum_value: Optional[RatingMethod] = None def __init__(self, parent): super().__init__(parent...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,403
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/bribery/temporal/action/singleBriberyAction.py
import sys from typing import Dict, Optional from BribeNet.bribery.temporal.action import BribeMustBeGreaterThanZeroException, NodeDoesNotExistException, \ BriberyActionExceedsAvailableUtilityException from BribeNet.bribery.temporal.action.briberyAction import BriberyAction class SingleBriberyAction(BriberyActio...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,404
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/graph/ratingMethod.py
import enum @enum.unique class RatingMethod(enum.Enum): O_RATING = 0 P_RATING = 1 MEDIAN_P_RATING = 2 SAMPLE_P_RATING = 3 P_GAMMA_RATING = 4 WEIGHTED_P_RATING = 5 WEIGHTED_MEDIAN_P_RATING = 6
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,405
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/main.py
import tkinter as tk class Main(tk.Frame): """ Frame for the main menu of the GUI """ def __init__(self, master, *args, **kwargs): tk.Frame.__init__(self, master=master, *args, **kwargs) title_text = tk.Label(self, text="Bribery Networks", font=("Calibri", 16, "bold"), pady=20) ...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,406
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/graph/temporal/ratingGraph.py
import abc import random from sys import maxsize from typing import Tuple, Union, Any, Optional, List import numpy as np from BribeNet.bribery.temporal.action.briberyAction import BriberyAction from BribeNet.bribery.temporal.action.multiBriberyAction import MultiBriberyAction from BribeNet.graph.ratingGraph import DE...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,407
RobMurray98/BribeNet
refs/heads/master
/setup.py
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="BribeNet", version="1.0.0", author="Robert Murray", author_email="R.Murray.1@warwick.ac.uk", description="Simulation of networks of bribers and consumers", long_description=long_descri...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,408
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/temporal/wizard/bribers.py
import tkinter as tk from BribeNet.gui.apps.temporal.briber_wizard.window import TemporalBriberWizardWindow from BribeNet.helpers.override import override class TemporalBribers(tk.Frame): def __init__(self, parent): super().__init__(parent) self.briber_wizard = None self.bribers_list = ...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,409
RobMurray98/BribeNet
refs/heads/master
/test/BribeNet/graph/temporal/test_ratingGraphBuilder.py
from unittest import TestCase class TestRatingGraphBuilder(TestCase): pass
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,410
RobMurray98/BribeNet
refs/heads/master
/test/BribeNet/bribery/static/briberTestCase.py
from abc import ABC, abstractmethod from unittest import TestCase from BribeNet.bribery.static.nonBriber import NonBriber from BribeNet.graph.static.ratingGraph import StaticRatingGraph class BriberTestCase(TestCase, ABC): @abstractmethod def setUp(self) -> None: self.briber = NonBriber(1) s...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,411
RobMurray98/BribeNet
refs/heads/master
/test/BribeNet/graph/generation/test_weightedGenerator.py
from unittest import TestCase from BribeNet.graph.generation.flatWeightGenerator import FlatWeightedGraphGenerator from BribeNet.graph.generation import GraphGeneratorAlgo class TestFlatWeightedGraphGenerator(TestCase): def test_generate_ws(self): graph_gen = FlatWeightedGraphGenerator(GraphGeneratorAlgo...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,412
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/static/wizard/algos/watts_strogatz.py
import tkinter as tk from BribeNet.gui.classes.param_list_frame import ParamListFrame class WattsStrogatz(ParamListFrame): name = "Watts-Strogatz" def __init__(self, parent): super().__init__(parent) self.params = { 'n_nodes': tk.IntVar(self, value=30), 'n_neighbours...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,413
RobMurray98/BribeNet
refs/heads/master
/test/BribeNet/graph/static/test_singleBriberRatingGraph.py
from copy import deepcopy from unittest import TestCase from BribeNet.bribery.static.nonBriber import NonBriber from BribeNet.graph.static.ratingGraph import StaticRatingGraph class TestSingleBriberRatingGraph(TestCase): def setUp(self) -> None: self.rg = StaticRatingGraph(NonBriber(0)) def tearDow...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,414
RobMurray98/BribeNet
refs/heads/master
/test/BribeNet/bribery/temporal/action/test_multiBriberyAction.py
from unittest import TestCase from BribeNet.bribery.temporal.action.multiBriberyAction import MultiBriberyAction, \ BriberyActionsAtDifferentTimesException, BriberyActionsOnDifferentGraphsException, \ NoActionsToFormMultiActionException from BribeNet.bribery.temporal.action import * from BribeNet.bribery.tempo...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,415
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/graph/temporal/action/customerAction.py
from typing import Dict, Any, Tuple, List import numpy as np from BribeNet.bribery.temporal.action.briberyAction import BriberyAction from BribeNet.bribery.temporal.briber import GraphNotSubclassOfTemporalRatingGraphException from BribeNet.graph.temporal.action.actionType import ActionType from BribeNet.helpers.bribe...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,416
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/temporal/wizard/rating_method.py
import tkinter as tk from BribeNet.graph.ratingMethod import RatingMethod from BribeNet.gui.apps.temporal.wizard.rating_methods.median_p_rating import MedianPRating from BribeNet.gui.apps.temporal.wizard.rating_methods.o_rating import ORating from BribeNet.gui.apps.temporal.wizard.rating_methods.p_gamma_rating import ...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,417
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/temporal/graph.py
import tkinter as tk import matplotlib.pyplot as plt import numpy as np from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg from matplotlib.colors import rgb2hex from networkit.viztasks import drawGraph from BribeNet.gui.apps.temporal.results_wizard.window import TemporalResultsWizardWindow class GraphF...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,418
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/bribery/briber.py
from abc import ABC from typing import Optional from BribeNet.helpers.bribeNetException import BribeNetException class BriberyGraphNotSetException(BribeNetException): pass class BriberyGraphAlreadySetException(BribeNetException): pass class BriberNotRegisteredOnGraphException(BribeNetException): pass...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,419
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/static/static.py
import tkinter as tk from BribeNet.bribery.static.oneMoveInfluentialNodeBriber import OneMoveInfluentialNodeBriber from BribeNet.bribery.static.oneMoveRandomBriber import OneMoveRandomBriber from BribeNet.graph.generation import GraphGeneratorAlgo from BribeNet.graph.generation.flatWeightGenerator import FlatWeightedG...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,420
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/bribery/static/randomBriber.py
import random from BribeNet.bribery.static.briber import StaticBriber DELTA = 0.001 # ensures total bribes do not exceed budget class RandomBriber(StaticBriber): def _next_bribe(self): customers = self.get_graph().get_customers() # array of random bribes bribes = [random.uniform(0.0, 1...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,421
RobMurray98/BribeNet
refs/heads/master
/test/BribeNet/bribery/test_briber.py
import random from test.BribeNet.bribery.static.briberTestCase import BriberTestCase from BribeNet.bribery.briber import BriberyGraphAlreadySetException, BriberyGraphNotSetException from BribeNet.bribery.static.nonBriber import NonBriber class TestBriber(BriberTestCase): def setUp(self) -> None: super()...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,422
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/temporal/results_wizard/window.py
import tkinter as tk from BribeNet.gui.apps.temporal.results_wizard.frame import TemporalResultsWizardFrame class TemporalResultsWizardWindow(tk.Toplevel): """ Window for pop-up wizard for selecting results displayed """ def __init__(self, controller, results): super().__init__(controller) ...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,423
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/static/briber_wizard/window.py
import tkinter as tk class StaticBriberWizardWindow(tk.Toplevel): """ Window for pop-up wizard for adding a static briber """ pass
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,424
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/graph/generation/unweightedGenerator.py
from BribeNet.graph.generation import GraphGeneratorAlgo from BribeNet.graph.generation.generator import GraphGenerator class UnweightedGraphGenerator(GraphGenerator): def __init__(self, a: GraphGeneratorAlgo, *args, **kwargs): super().__init__(a, *args, **kwargs) def generate(self): return ...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,425
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/temporal/briber_wizard/frame.py
import tkinter as tk from BribeNet.gui.apps.temporal.briber_wizard.strategies.budget import BudgetFrame from BribeNet.gui.apps.temporal.briber_wizard.strategies.even import EvenFrame from BribeNet.gui.apps.temporal.briber_wizard.strategies.influential import InfluentialFrame from BribeNet.gui.apps.temporal.briber_wiza...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,426
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/graph/temporal/noCustomerActionGraph.py
from BribeNet.graph.ratingGraph import DEFAULT_GEN from BribeNet.graph.temporal.action.customerAction import CustomerAction from BribeNet.graph.temporal.ratingGraph import TemporalRatingGraph class NoCustomerActionGraph(TemporalRatingGraph): """ A temporal rating graph solely for testing purposes. """ ...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,427
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/temporal/results_wizard/frame.py
import tkinter as tk class TemporalResultsWizardFrame(tk.Frame): """ Frame for pop-up wizard for selecting results displayed """ def __init__(self, parent, results): super().__init__(parent) self.parent = parent self.x_string_var = tk.StringVar(self) self.y_string_var...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,428
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/static/wizard/algos/barabasi_albert.py
import tkinter as tk from BribeNet.gui.classes.param_list_frame import ParamListFrame class BarabasiAlbert(ParamListFrame): name = "Barabási-Albert" def __init__(self, parent): super().__init__(parent) self.params = { 'k': tk.DoubleVar(self, value=5), 'n_max': tk.Int...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,429
RobMurray98/BribeNet
refs/heads/master
/test/BribeNet/graph/temporal/test_thresholdGraph.py
from unittest import TestCase from BribeNet.bribery.temporal.nonBriber import NonBriber from BribeNet.graph.temporal.action.actionType import ActionType from BribeNet.graph.temporal.thresholdGraph import ThresholdGraph from unittest.mock import MagicMock class TestThresholdGraph(TestCase): def setUp(self) -> No...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,430
RobMurray98/BribeNet
refs/heads/master
/test/BribeNet/bribery/static/test_oneMoveInfluentialNodeBriber.py
from copy import deepcopy from BribeNet.bribery.static.oneMoveInfluentialNodeBriber import OneMoveInfluentialNodeBriber from BribeNet.graph.static.ratingGraph import StaticRatingGraph from test.BribeNet.bribery.static.briberTestCase import BriberTestCase class TestOneMoveInfluentialNodeBriber(BriberTestCase): d...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,431
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/bribery/static/influentialNodeBriber.py
from BribeNet.bribery.static.briber import StaticBriber from BribeNet.helpers.override import override class InfluentialNodeBriber(StaticBriber): def __init__(self, u0, k=0.1): super().__init__(u0) self._k = k # will be reassigned when graph set @override def _set_graph(self, g): ...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,432
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/bribery/temporal/pGreedyBriber.py
import sys import numpy as np from BribeNet.bribery.temporal.action.singleBriberyAction import SingleBriberyAction from BribeNet.bribery.temporal.briber import TemporalBriber """ IMPORTANT! This briber cheats and uses the direct influential node information. This is for testing whether trust is powerful enough to bea...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,433
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/static/wizard/algos/composite.py
import tkinter as tk from BribeNet.gui.classes.param_list_frame import ParamListFrame class Composite(ParamListFrame): name = "Composite" def __init__(self, parent): super().__init__(parent) self.params = { 'n_nodes': tk.IntVar(self, value=50), 'n_communities': tk.In...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,434
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/bribery/temporal/action/briberyAction.py
from abc import ABC, abstractmethod from typing import List from BribeNet.helpers.bribeNetException import BribeNetException class BriberyActionExecutedMultipleTimesException(BribeNetException): pass class BriberyActionTimeNotCorrectException(BribeNetException): pass class BriberyAction(ABC): def __...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,435
RobMurray98/BribeNet
refs/heads/master
/test/BribeNet/graph/generation/test_unweightedGenerator.py
from unittest import TestCase from BribeNet.graph.generation.unweightedGenerator import UnweightedGraphGenerator from BribeNet.graph.generation import GraphGeneratorAlgo class TestUnweightedGraphGenerator(TestCase): def test_generate_ws(self): graph_gen = UnweightedGraphGenerator(GraphGeneratorAlgo.WATTS...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,436
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/graph/static/ratingGraph.py
import random from typing import Tuple, Union, Any import numpy as np from BribeNet.graph.ratingGraph import RatingGraph, DEFAULT_GEN, BribersAreNotTupleException, NoBriberGivenException from BribeNet.helpers.bribeNetException import BribeNetException from BribeNet.helpers.override import override DEFAULT_NON_VOTER_...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,437
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/temporal/briber_wizard/strategies/p_greedy.py
import tkinter as tk from BribeNet.gui.classes.param_list_frame import ParamListFrame class PGreedyFrame(ParamListFrame): name = "P-Greedy" def __init__(self, parent): super().__init__(parent) self.params = { 'u_0': tk.DoubleVar(self, value=10), 'true_average': tk.Do...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,438
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/graph/temporal/thresholdGraph.py
import random from typing import List import numpy as np from BribeNet.graph.ratingGraph import DEFAULT_GEN from BribeNet.graph.temporal.action.actionType import ActionType from BribeNet.graph.temporal.action.customerAction import CustomerAction from BribeNet.graph.temporal.ratingGraph import TemporalRatingGraph, Bri...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,439
RobMurray98/BribeNet
refs/heads/master
/test/BribeNet/bribery/temporal/action/test_singleBriberyAction.py
from unittest import TestCase from BribeNet.bribery.temporal.action.singleBriberyAction import SingleBriberyAction from BribeNet.bribery.temporal.nonBriber import NonBriber from BribeNet.graph.temporal.noCustomerActionGraph import NoCustomerActionGraph from BribeNet.bribery.temporal.action import * class TestSingleB...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,440
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/temporal/briber_wizard/window.py
import tkinter as tk from BribeNet.gui.apps.temporal.briber_wizard.frame import TemporalBriberWizardFrame from BribeNet.helpers.override import override class TemporalBriberWizardWindow(tk.Toplevel): """ Window for pop-up wizard for adding a temporal briber """ def __init__(self, controller): ...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,441
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/static/wizard/wizard.py
import tkinter as tk class WizardFrame(tk.Frame): """ Frame for the wizard to construct a static model run """ def __init__(self, parent, controller): tk.Frame.__init__(self, parent) self.controller = controller gtype = tk.StringVar(parent) gtype.set("L") btyp...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,442
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/helpers/bribeNetException.py
class BribeNetException(Exception): pass
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,443
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/temporal/wizard/settings.py
import tkinter as tk from BribeNet.gui.classes.param_list_frame import ParamListFrame class TemporalSettings(ParamListFrame): name = 'Model Parameters' def __init__(self, parent): super().__init__(parent) self.descriptions = { 'non_voter_proportion': 'the proportion of customers...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,444
RobMurray98/BribeNet
refs/heads/master
/test/BribeNet/bribery/temporal/test_mostInfluentialBriber.py
from BribeNet.bribery.temporal.mostInfluentialNodeBriber import MostInfluentialNodeBriber from BribeNet.graph.temporal.noCustomerActionGraph import NoCustomerActionGraph from test.BribeNet.bribery.temporal.briberTestCase import BriberTestCase from unittest.mock import MagicMock TEST_I = 7 class TestMostInfluentialBr...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,445
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/prediction/parameterPrediction.py
# noinspection PyUnresolvedReferences from networkit.centrality import LocalClusteringCoefficient # noinspection PyUnresolvedReferences from networkit.distance import APSP from networkit.generators import WattsStrogatzGenerator from numpy import logspace from numpy import sum as np_sum TRIALS = 5 INFINITY = float("inf...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,446
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/bribery/temporal/briber.py
from abc import ABC, abstractmethod from BribeNet.bribery.briber import Briber, BriberyGraphNotSetException from BribeNet.bribery.temporal.action.singleBriberyAction import SingleBriberyAction from BribeNet.helpers.bribeNetException import BribeNetException class GraphNotSubclassOfTemporalRatingGraphException(BribeN...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,447
RobMurray98/BribeNet
refs/heads/master
/test/BribeNet/prediction/test_parameterPrediction.py
from unittest import TestCase from networkit.generators import WattsStrogatzGenerator from numpy import logspace from BribeNet.prediction.parameterPrediction import ParameterPrediction class TestParameterPrediction(TestCase): def setUp(self) -> None: self.generator = WattsStrogatzGenerator(50, 6, 0.1)...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,448
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/static/wizard/generation.py
import tkinter as tk from BribeNet.gui.apps.static.wizard.algos.barabasi_albert import BarabasiAlbert from BribeNet.gui.apps.static.wizard.algos.composite import Composite from BribeNet.gui.apps.static.wizard.algos.watts_strogatz import WattsStrogatz ALGO_SUBFRAMES = (BarabasiAlbert, Composite, WattsStrogatz) ALGO_DI...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,449
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/bribery/temporal/action/multiBriberyAction.py
import sys from typing import Dict, Optional, List from BribeNet.bribery.temporal.action import BribeMustBeGreaterThanZeroException, NodeDoesNotExistException, \ BriberDoesNotExistException, BriberyActionExceedsAvailableUtilityException from BribeNet.bribery.temporal.action.briberyAction import BriberyAction from ...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,450
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/bribery/temporal/mostInfluentialNodeBriber.py
import sys import numpy as np from BribeNet.bribery.temporal.action.singleBriberyAction import SingleBriberyAction from BribeNet.bribery.temporal.briber import TemporalBriber class MostInfluentialNodeBriber(TemporalBriber): def __init__(self, u0: float, k: float = 0.1, i: int = 7): """ Construct...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,451
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/graph/generation/flatWeightGenerator.py
import networkit as nk import networkit.nxadapter as adap from BribeNet.graph.generation import GraphGeneratorAlgo from BribeNet.graph.generation.weightedGenerator import WeightedGraphGenerator class FlatWeightedGraphGenerator(WeightedGraphGenerator): def __init__(self, a: GraphGeneratorAlgo, *args, **kwargs): ...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,452
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/temporal/wizard/rating_methods/median_p_rating.py
from BribeNet.graph.ratingMethod import RatingMethod from BribeNet.gui.apps.temporal.wizard.rating_methods.rating_method_frame import RatingMethodFrame class MedianPRating(RatingMethodFrame): enum_value = RatingMethod.MEDIAN_P_RATING name = 'median_p_rating'
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,453
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/temporal/wizard/rating_methods/p_gamma_rating.py
import tkinter as tk from BribeNet.graph.ratingMethod import RatingMethod from BribeNet.gui.apps.temporal.wizard.rating_methods.rating_method_frame import RatingMethodFrame class PGammaRating(RatingMethodFrame): enum_value = RatingMethod.P_GAMMA_RATING name = 'p_gamma_rating' def __init__(self, parent):...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,454
RobMurray98/BribeNet
refs/heads/master
/test/BribeNet/bribery/temporal/test_randomBriber.py
from BribeNet.bribery.temporal.randomBriber import RandomBriber from BribeNet.graph.temporal.noCustomerActionGraph import NoCustomerActionGraph from test.BribeNet.bribery.temporal.briberTestCase import BriberTestCase class TestRandomBriber(BriberTestCase): def setUp(self) -> None: self.briber = RandomBri...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,455
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/bribery/temporal/action/__init__.py
from BribeNet.helpers.bribeNetException import BribeNetException class BribeMustBeGreaterThanZeroException(BribeNetException): pass class NodeDoesNotExistException(BribeNetException): pass class BriberDoesNotExistException(BribeNetException): pass class BriberyActionExceedsAvailableUtilityException(...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,456
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/temporal/result.py
import tkinter as tk import matplotlib.pyplot as plt from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg from BribeNet.gui.apps.temporal.results_wizard.window import TemporalResultsWizardWindow class ResultsFrame(tk.Frame): def __init__(self, parent, controller): tk.Frame.__init__(self, pare...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,457
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/main.py
import tkinter as tk from BribeNet.gui.apps.main import Main from BribeNet.gui.apps.static.static import StaticGUI from BribeNet.gui.apps.temporal.main import TemporalGUI from BribeNet.helpers.override import override class GUI(tk.Tk): """ Main menu window for the GUI Self-withdraws when model wizard ope...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,458
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/graph/generation/weightedGenerator.py
import abc from BribeNet.graph.generation import GraphGeneratorAlgo from BribeNet.graph.generation.generator import GraphGenerator class WeightedGraphGenerator(GraphGenerator, abc.ABC): def __init__(self, a: GraphGeneratorAlgo, *args, **kwargs): """ Thin wrapper class for NetworKit graph generat...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,459
RobMurray98/BribeNet
refs/heads/master
/test/BribeNet/bribery/static/test_oneMoveRandomBriber.py
from copy import deepcopy from BribeNet.bribery.static.oneMoveRandomBriber import OneMoveRandomBriber from BribeNet.graph.static.ratingGraph import StaticRatingGraph from test.BribeNet.bribery.static.briberTestCase import BriberTestCase class TestOneMoveInfluentialNodeBriber(BriberTestCase): def setUp(self) -> ...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,460
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/static/result.py
import tkinter as tk import matplotlib.pyplot as plt from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg class ResultsFrame(tk.Frame): """ Frame for showing the current results of the static model being run """ def __init__(self, parent, controller): tk.Frame.__init__(self, paren...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,461
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/gui/apps/temporal/wizard/rating_methods/p_rating.py
from BribeNet.graph.ratingMethod import RatingMethod from BribeNet.gui.apps.temporal.wizard.rating_methods.rating_method_frame import RatingMethodFrame class PRating(RatingMethodFrame): enum_value = RatingMethod.P_RATING name = 'p_rating'
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,462
RobMurray98/BribeNet
refs/heads/master
/src/BribeNet/graph/static/ratingGraphBuilder.py
import enum import sys from typing import List from BribeNet.bribery.briber import Briber from BribeNet.bribery.static.influentialNodeBriber import InfluentialNodeBriber from BribeNet.bribery.static.mostInfluentialNodeBriber import MostInfluentialNodeBriber from BribeNet.bribery.static.nonBriber import NonBriber from ...
{"/test/BribeNet/bribery/temporal/test_oneMoveRandomBriber.py": ["/test/BribeNet/bribery/temporal/briberTestCase.py"], "/test/BribeNet/bribery/static/test_randomBriber.py": ["/test/BribeNet/bribery/static/briberTestCase.py"], "/test/BribeNet/bribery/temporal/test_budgetBriber.py": ["/test/BribeNet/bribery/temporal/brib...
5,466
AdamWlodarczyk/jobqueue_features
refs/heads/master
/jobqueue_features/functions.py
from .clusters_controller import clusters_controller_singleton from .clusters import ClusterType # noqa def set_default_cluster(cluster): # type: (ClusterType) -> None """Function sets default cluster type for clusters controller. This should be the right way of setting that.""" clusters_controller_s...
{"/jobqueue_features/functions.py": ["/jobqueue_features/clusters_controller.py"], "/examples/mpi_tasks_srun.py": ["/jobqueue_features/decorators.py", "/jobqueue_features/mpi_wrapper.py"], "/jobqueue_features/tests/test_cluster.py": ["/jobqueue_features/mpi_wrapper.py", "/jobqueue_features/clusters_controller.py"], "/e...
5,467
AdamWlodarczyk/jobqueue_features
refs/heads/master
/examples/mpi_tasks_srun.py
from __future__ import print_function import sys from jobqueue_features.clusters import CustomSLURMCluster from jobqueue_features.decorators import on_cluster, mpi_task from jobqueue_features.mpi_wrapper import SRUN # import logging # logging.basicConfig(format="%(levelname)s:%(message)s", level=logging.DEBUG) cust...
{"/jobqueue_features/functions.py": ["/jobqueue_features/clusters_controller.py"], "/examples/mpi_tasks_srun.py": ["/jobqueue_features/decorators.py", "/jobqueue_features/mpi_wrapper.py"], "/jobqueue_features/tests/test_cluster.py": ["/jobqueue_features/mpi_wrapper.py", "/jobqueue_features/clusters_controller.py"], "/e...
5,468
AdamWlodarczyk/jobqueue_features
refs/heads/master
/jobqueue_features/tests/test_cluster.py
from unittest import TestCase from dask.distributed import Client from jobqueue_features.clusters import get_cluster, SLURM from jobqueue_features.mpi_wrapper import SRUN from jobqueue_features.cli.mpi_dask_worker import MPI_DASK_WRAPPER_MODULE from jobqueue_features.clusters_controller import ( clusters_controlle...
{"/jobqueue_features/functions.py": ["/jobqueue_features/clusters_controller.py"], "/examples/mpi_tasks_srun.py": ["/jobqueue_features/decorators.py", "/jobqueue_features/mpi_wrapper.py"], "/jobqueue_features/tests/test_cluster.py": ["/jobqueue_features/mpi_wrapper.py", "/jobqueue_features/clusters_controller.py"], "/e...
5,469
AdamWlodarczyk/jobqueue_features
refs/heads/master
/jobqueue_features/tests/test_mpi_wrapper.py
from __future__ import print_function from unittest import TestCase import os from distributed import LocalCluster from jobqueue_features import ( mpi_wrap, MPIEXEC, SRUN, on_cluster, mpi_task, which, serialize_function_and_args, deserialize_and_execute, mpi_deserialize_and_execute...
{"/jobqueue_features/functions.py": ["/jobqueue_features/clusters_controller.py"], "/examples/mpi_tasks_srun.py": ["/jobqueue_features/decorators.py", "/jobqueue_features/mpi_wrapper.py"], "/jobqueue_features/tests/test_cluster.py": ["/jobqueue_features/mpi_wrapper.py", "/jobqueue_features/clusters_controller.py"], "/e...
5,470
AdamWlodarczyk/jobqueue_features
refs/heads/master
/examples/mpi_tasks_mpiexec.py
from __future__ import print_function import os from dask.distributed import LocalCluster from jobqueue_features.decorators import on_cluster, mpi_task from jobqueue_features.mpi_wrapper import mpi_wrap, MPIEXEC from jobqueue_features.functions import set_default_cluster # import logging # logging.basicConfig(format...
{"/jobqueue_features/functions.py": ["/jobqueue_features/clusters_controller.py"], "/examples/mpi_tasks_srun.py": ["/jobqueue_features/decorators.py", "/jobqueue_features/mpi_wrapper.py"], "/jobqueue_features/tests/test_cluster.py": ["/jobqueue_features/mpi_wrapper.py", "/jobqueue_features/clusters_controller.py"], "/e...
5,471
AdamWlodarczyk/jobqueue_features
refs/heads/master
/jobqueue_features/decorators.py
from __future__ import print_function from typing import Callable, List, Dict # noqa from functools import wraps from dask.distributed import LocalCluster, Client, Future # noqa from .clusters_controller import clusters_controller_singleton, ClusterType # noqa from .custom_exceptions import ClusterException from ...
{"/jobqueue_features/functions.py": ["/jobqueue_features/clusters_controller.py"], "/examples/mpi_tasks_srun.py": ["/jobqueue_features/decorators.py", "/jobqueue_features/mpi_wrapper.py"], "/jobqueue_features/tests/test_cluster.py": ["/jobqueue_features/mpi_wrapper.py", "/jobqueue_features/clusters_controller.py"], "/e...
5,472
AdamWlodarczyk/jobqueue_features
refs/heads/master
/jobqueue_features/mpi_wrapper.py
from distributed.protocol import serialize, deserialize import os import shlex import subprocess import sys from typing import Dict # noqa SRUN = "srun" MPIEXEC = "mpiexec" SUPPORTED_MPI_LAUNCHERS = [SRUN, MPIEXEC] def which(filename): result = None # Check we can immediately find the executable if os...
{"/jobqueue_features/functions.py": ["/jobqueue_features/clusters_controller.py"], "/examples/mpi_tasks_srun.py": ["/jobqueue_features/decorators.py", "/jobqueue_features/mpi_wrapper.py"], "/jobqueue_features/tests/test_cluster.py": ["/jobqueue_features/mpi_wrapper.py", "/jobqueue_features/clusters_controller.py"], "/e...
5,473
AdamWlodarczyk/jobqueue_features
refs/heads/master
/jobqueue_features/clusters_controller.py
from typing import Tuple, Dict, Callable # noqa import atexit from dask.distributed import Client, LocalCluster from .clusters import ClusterType # noqa from .custom_exceptions import ClusterException _DEFAULT = "default" class ClusterController(object): """Controller keeps collection of clusters and clients...
{"/jobqueue_features/functions.py": ["/jobqueue_features/clusters_controller.py"], "/examples/mpi_tasks_srun.py": ["/jobqueue_features/decorators.py", "/jobqueue_features/mpi_wrapper.py"], "/jobqueue_features/tests/test_cluster.py": ["/jobqueue_features/mpi_wrapper.py", "/jobqueue_features/clusters_controller.py"], "/e...
5,474
AdamWlodarczyk/jobqueue_features
refs/heads/master
/examples/forked_mpi_task_srun.py
from __future__ import print_function import os from dask.distributed import LocalCluster from jobqueue_features.clusters import CustomSLURMCluster from jobqueue_features.decorators import on_cluster, mpi_task from jobqueue_features.mpi_wrapper import mpi_wrap from jobqueue_features.functions import set_default_clust...
{"/jobqueue_features/functions.py": ["/jobqueue_features/clusters_controller.py"], "/examples/mpi_tasks_srun.py": ["/jobqueue_features/decorators.py", "/jobqueue_features/mpi_wrapper.py"], "/jobqueue_features/tests/test_cluster.py": ["/jobqueue_features/mpi_wrapper.py", "/jobqueue_features/clusters_controller.py"], "/e...