- Introduction
- Creational Patterns
- Factory Method
- Abstract Factory
- Builder
- Prototype
- Singleton
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory = $true)] | |
[string]$sourceISO, | |
[Parameter(Mandatory = $true)] | |
[string]$outputVHDX, | |
[Parameter(Mandatory = $true)] | |
[string]$os | |
) |
import numpy as np | |
import pandas as pd | |
from sklearn.decomposition import PCA | |
from sklearn.manifold import TSNE | |
from sklearn.cluster import KMeans | |
import matplotlib.pyplot as plt | |
from matplotlib.colors import ListedColormap | |
from transformers import BertTokenizer, BertModel | |
import torch | |
from adjustText import adjust_text |
# Classic Flex License Manager (lmgrd) | |
Gory details can be read in | |
Book Name: License Administration Guide | |
Part Number: FNP-111411-LAG00 | |
Product Release Date: March 2017 | |
## Daemons | |
Clearing away the obfuscation around the license manager is fairly simple. | |
This license management has a vendor independent and vendor provided |
#!powershell | |
# | |
# powershell -ExecutionPolicy Bypass -File .\scripts\build_windows.ps1 | |
# | |
# gcloud auth application-default login | |
$ErrorActionPreference = "Stop" | |
function checkEnv() { | |
if ($null -ne $env:ARCH ) { |
INSTALL_DIR=/usr/local/flexlm/licenses | |
#get hostname from license file | |
licensed_hostname=$(shell cat license.dat | grep ^SERVER | awk '{print $$2}') | |
licensed_macaddr=$(shell cat license.dat | grep ^SERVER | awk '{print $$3}' | sed -e 's/../\0:/g' -e 's/:$$//' ) | |
help: | |
# Usage: | |
# make install # install license server | |
# make uninstall # uninstall license server |
#!/usr/bin/env python2 | |
# The script to parse a lmgrd log and give some license usage metrics | |
# | |
# Copyright (c) 2014 Grigory Rechistov <[email protected]> | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# | |
# 1. Redistributions of source code must retain the above copyright notice, |
# Dump schema from table | |
""" | |
Credit to Wilfredo Sánchez Vega who posted this answer | |
on stackoverflow | |
https://stackoverflow.com/questions/11996394/is-there-a-way-to-get-a-schema-of-a-database-from-within-python | |
""" | |
import sqlite3 | |
import re | |
import os | |
from pathlib import Path |
import sqlite3 | |
from utils import log | |
db_path = 'model.sqlite' | |
conn = sqlite3.connect(db_path) | |
class Model(object): | |
fields = [ |
# Use it like this: | |
# | |
# structlog.configure( | |
# processors=[ | |
# structlog.processors.JSONRenderer(), | |
# LogToSqlite("/tmp/logs.db") | |
# ] | |
# ) | |
# log = structlog.get_logger() | |
# log.msg("say-hello", whom="world", num=[random.randint(1,55)]) |