def run_all_misc_clustering(
        rad,
        date_range,
        boxcox=False,
        norm=True,
        params=["bmnum", "slist", "elv", "time_index", "v", "w_l"],
        methods=["bang", "clique"]):
    """
    Invoke all misc clustering algorithm
    rad: Radar code
    date_range: Date range
    """
    fd = FetchData(rad, date_range)
    beams, _ = fd.fetch_data(
        v_params=["elv", "v", "w_l", "gflg", "p_l", "slist", "v_e"])
    rec = fd.convert_to_pandas(beams)
    rec["time_index"] = utils.time_days_to_index(
        [x.to_pydatetime() for x in rec["time"].tolist()])
    if boxcox: rec = utils.boxcox_tx(rec)
    if norm: rec = utils.normalize(rec, params)
    print("\n", rec.head())
    for method in methods:
        print("\n >> Running {c} clustering".format(c=method))
        model = Misc(method, rec[params].values)
        model.setup()
        model.run()

        print("\n Estimating model skills.")
        skill = Skills(model.data, model.obj.labels_)
    return
Example #2
0
def invoke_checklocaladminaccess(target_computername,
                                 domain,
                                 user,
                                 password=str(),
                                 lmhash=str(),
                                 nthash=str()):
    misc = Misc(target_computername, domain, user, password, lmhash, nthash)
    return misc.invoke_checklocaladminaccess()
Example #3
0
def compose_publication(zipped_publication):
    grouped_publication = group_publication(zipped_publication)
    authors = Author.parse_authors(grouped_publication.get("T_AUTHOR"))
    source = Source(grouped_publication.get("T_JOURNAL"))
    misc = Misc(grouped_publication.get("T_LOCATION"),
                grouped_publication.get("T_PUBLISHER"),
                grouped_publication.get("T_YEAR"),
                grouped_publication.get("T_VOLUME"),
                grouped_publication.get("T_PAGES"))
    return Publication(grouped_publication.get("T_TITLE"), authors, source,
                       misc)
 def __init__(self):
     self.profile = Profile()
     self.option = Option()
     self.kmatrix = Profile()
     self.chanprof = Chanprof()
     self.emissivity = Emissivity()
     self.reflectance = Reflectance()
     self.misc = Misc()
     self.scaled = False
     self.scalecoef = 1.0
     self.scaledfirst = True
Example #5
0
 def trim_msa(self, options):
     """ Trim an untrimmed archaea or bacterial MSA file."""
     if options.reference_mask in ['bac', 'arc']:
         mask_type = "reference"
         mask_id = options.reference_mask
     else:
         mask_type = "file"
         mask_id = options.mask_file
     misc = Misc()
     misc.trim_msa(options.untrimmed_msa, mask_type, mask_id,
                   options.output)
     self.logger.info('Done.')
Example #6
0
    def read(self, filename):
        f = h5py.File(filename, 'r')

        # get the Dataset
        h5 = f['/RADIANCE/']
        self.loadh5(h5)

        # Load
        self.loadh5(h5)

        h5 = f['/MISC/']
        self.misc = Misc()
        self.misc.loadh5(h5)
        f.close()
Example #7
0
 def check_install(self):
     """ Verify all GTDB-Tk data files are present."""
     self.logger.warning("Running install verification")
     misc = Misc()
     misc.check_install()
     self.logger.info('Done.')
Example #8
0
    def export_msa(self, options):
        """Export the untrimmed archaeal or bacterial MSA file."""
        misc = Misc()
        misc.export_msa(options.domain, options.output)

        self.logger.info('Done.')
Example #9
0
	def __init__(self, title=None, author=None, source=None, misc=None):
		self.title = title if title else ""
		self.source = source if source else Source()
		self.misc = misc if misc else Misc()
		self.author = author if author else [Author()]
Example #10
0
from graph import Graph
from misc import Misc
from algo import Algo

WINDOW_SIZE = (1200,800)
BACKGROUND = (255,255,255)


#Create the screen
screen = pygame.display.set_mode(WINDOW_SIZE)

#title and icon
pygame.display.set_caption("Demo")

#misc functions
misc = Misc(screen)


def play(data,thief,police,goals):
    #init graph
    graph = Graph(screen,data,thief,police,goals)

    #init algo
    algo = Algo(data[2])

    #main loop
    running = True
    #limit for num of turns
    limit=20
    #gameover var
    gameover = False
Example #11
0
        elif (key == 51):
            reportes.scoreBoard_report(scoreBoard)
            misc.imprimir("Score Board report generated successfully!")
        elif (key == 52):
            reportes.users_report(usuarios)
            misc.imprimir("Users Report generated successfully!")
    misc.clear_scr()


stdscr = curses.initscr()  #initialize console
window = curses.newwin(max_x, max_y, 0, 0)  #create a new curses window
window.keypad(True)  #enable Keypad mode
curses.noecho()  #prevent input from displaying in the screen
curses.curs_set(0)  #cursor invisible (0)
paint_menu(window)
misc = Misc(window, max_x, max_y)
true_game = snake_game(None, max_x, max_y, window, usuario)
true_snake = true_game.get_new_snake()
pausa = False
keystroke = -1
while (keystroke == -1):
    keystroke = window.getch()  #get current key being pressed
    if (keystroke == 49):  #1
        misc.clear_scr()
        paint_title(window, ' PLAY ')
        if (usuario is None):
            misc.clear_scr()
            misc.print_title("Creacion de Usuario:")
            newUser = misc.getString()
            usuarios.agregar(newUser)
            usuario = newUser
Example #12
0
from secret import Secrets  # Used to get Discord API key
import discord  # Used to easily interact with discord API
import os  # Used to get path of execution

# Gets current directory
d = os.path.abspath(os.path.dirname(__file__))

# Gets Discord API key, sets discord client
getSecret = Secrets()
TOKEN = getSecret.discord()
client = discord.Client()

# Classes for events
hb = HexBot()
sp = Misc()
yt = YouTubeApi()
sh = Search()


# Used to concatenate a string together using commas
async def hexbot_multi_value_split(msg_list):
    values = ''
    for i in range(len(msg_list) - 2):
        values += msg_list[i+2].lstrip('#') + ','
        if i == 24:  # Limit to the amount of colours used
            break
    return values[:-1]


# Used for requesting multiple values for a sort type, saves and returns file names and folder directory
Example #13
0
import mouse
""" 
	Python-Macro for fortnite
	Features: Fast-Mining, Accuracy Recoil Control
	Author: fdnflm ex FadinFlame ex YourPollution
"""
""" BINDS """
key_grenade = "five"  # *throwable weapon, this is really important
key_pickaxe = "f"
key_fastfarm = "alt"
key_recoil_activation = 0x71  # F2, Set your own if you want. Like: 0x + key. Virtual key codes - https://api.farmanager.com/ru/winapi/virtualkeycodes.html
key_recoil = "]"
recoil_method = 1  # 1 - stable, 2 - unstable

script_version = "1.4"
misc = Misc()
scripts = Scripts()


def logo():
    print("""\
  ____                  __  __                      
 |  _ \ _   _          |  \/  | __ _  ___ _ __ ___  
 | |_) | | | |  _____  | |\/| |/ _` |/ __| '__/ _ \ 
 |  __/| |_| | |_____| | |  | | (_| | (__| | | (_) |
 |_|    \__, |         |_|  |_|\__,_|\___|_|  \___/ 
	|___/                                       
					""")


def general():