This is a command I use to gather data from git logs for processing and visualization.
{ | |
"$help": "https://aka.ms/terminal-documentation", | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"actions": | |
[ | |
{ | |
"command": | |
{ | |
"action": "copy", | |
"singleLine": false |
from transformers import AutoModelForCausalLM, AutoTokenizer | |
import torch | |
model_name = "meta-llama/Llama-2-13b-chat-hf" | |
tokenizer = AutoTokenizer.from_pretrained(model_name) | |
model = AutoModelForCausalLM.from_pretrained( | |
model_name, | |
device_map="auto", | |
load_in_8bit=True, # Enable 8-bit quantization to save VRAM |
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"transient_prompt": { | |
"template": "\u2ce9 ", | |
"foreground": "#FEF5ED", | |
"background": "transparent" | |
}, | |
"console_title_template": "{{ .Folder }}", | |
"blocks": [ | |
{ |
OK so you just made a SQL database somewhere... A VM, in the cloud, whatever. Then you made an app server somewhere else and you want to make sure the app server vm can actually access the database. This little script tests the ability to connect, do some basic CRUD, then cleans up after itself.
This is helpful if you run into problems and you need to rule out connectivity to the database.
You need Python3 and pymssql to make it work.
This gist contains a few exmaples of how to export your VSI data. In particular, 12 months of enterprise summary data. You can export to either a CSV file or a JSON file allowing you to then import the data into any analytics tool you choose.
This is a RESTful API call, so you need to create a script that can make an HTTP POST request to https://vsi5.visualstorageintelligence.com/api/export/v1/enterprise_summary_12_months
. The payload you post should be in JSON format and should contain the following key value pairs:
output_format: "csv" or "json" request_user: the email address you use to login to VSI request_password: the password you use to login to VSI
This REST api call allows you to export your company's business unit forecast by data center. You need to send an HTTP POST to https://vsi5.visualstorageintelligence.com/api/export/v1/get_bu_forecasting
along with the folloing parameters in JSON format:
export_format : "json" or "csv" request_date : formatted as mm-dd-yyyy such as 11-04-2022 request_user : the email address you use to login to VSI request_password : the password you use to login to VSI
In this gist, we have a curl script, a PowerShell script, and a Python 3 script to help with automated retrieval.
import http.client | |
import json | |
conn = http.client.HTTPSConnection("vsi5.visualstorageintelligence.com") | |
payload = json.dumps({ | |
"export_format": "json", | |
"request_date": "10-31-2022", | |
"request_user": "your email here", | |
"request_password": "your password here" | |
}) |