This file contains hidden or 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 compare_batch(self, proxy_image_b64: str, candidate_images_b64: List[str]) -> List[Optional[int]]: | |
| """ | |
| Compare proxy to multiple candidates in one API call. | |
| Returns list of scores corresponding to candidate_images_b64. | |
| """ | |
| num_candidates = len(candidate_images_b64) | |
| prompt = f"""You are comparing Magic: The Gathering card artwork. I will show you: | |
| 1. First image: The PROXY card (reference) | |
| 2. Next {num_candidates} images: CANDIDATE printings (numbered 1-{num_candidates}) |
This file contains hidden or 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
| # your Kubernetes cluster name here | |
| cluster_name = "k8s-caas-iav" | |
| az_list = ["nogpu"] | |
| dns_nameservers = ["8.8.8.8"] | |
| # SSH key to use for access to nodes | |
| public_key_path = "/Users/basov/Cryptostore/Passwords/mirantis/k8s-workshop-public" | |
| # image to use for bastion, masters, standalone etcd instances, and nodes | |
| image = "ubuntu-xenial-0918" |
This file contains hidden or 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
| # Kubernetes configuration dirs and system namespace. | |
| # Those are where all the additional config stuff goes | |
| # the kubernetes normally puts in /srv/kubernetes. | |
| # This puts them in a sane location and namespace. | |
| # Editing those values will almost surely break something. | |
| kube_config_dir: /etc/kubernetes | |
| kube_script_dir: "{{ bin_dir }}/kubernetes-scripts" | |
| kube_manifest_dir: "{{ kube_config_dir }}/manifests" | |
| # This is where all the cert scripts and certs will be located |
This file contains hidden or 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
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6cHg1SvsxWp5tD0Ee7nl4pyW9cLO/ZQYYxUYa2zSn/RWFm9BFuy1VwkJiYCIvk0lTXfKQMiO10mKm2xFC3VT0vpTSGIYDh4oxDu0FpIaTmXX3ULVdLNwWvrkHoPkIbPy1nUYlJQ+9PEh6KWkbxeYXFxVPoouWkDwshF63GrRA7Pyg2CuVn/FEA+ldSeq7mp/kkOWvlKXpJzvKXt4A/6odOCUiCnX//CWreHCnfCV3KsteyBc+UP2ql6wpEXmIIYdrOF0O3ofqRPTx6ivIOGGDuYB6e/XDivoEBPWNcLYcr9d5HKOTgRE6xF2Q1ElzpbvAY4AS+kggEjIgImiB3TxX |
This file contains hidden or 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
| KRPC basics | |
| import readline | |
| import rlcompleter | |
| if 'libedit' in readline.__doc__: | |
| readline.parse_and_bind("bind ^I rl_complete") | |
| else: | |
| readline.parse_and_bind("tab: complete") | |
| import krpc, time, math |
This file contains hidden or 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
| KRPC basics | |
| import readline | |
| import rlcompleter | |
| if 'libedit' in readline.__doc__: | |
| readline.parse_and_bind("bind ^I rl_complete") | |
| else: | |
| readline.parse_and_bind("tab: complete") | |
| import krpc, time, math |
This file contains hidden or 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 requests | |
| import keystoneclient | |
| import json | |
| keystoneauth={"auth":{"passwordCredentials":{"username": "admin", "password": "admin"},"tenantName": "admin"}} | |
| token = requests.post('http://localhost:5000/v2.0/tokens', headers={'Content-Type': 'application/json'}, data=json.dumps(keystoneauth)) | |
| token = json.loads(token.text)['access']['token']['id'] | |
| nodes = requests.get('http://localhost:8000/api/nodes', headers={'X-Auth-Token': token}) | |
| nodes = json.loads(nodes.text) | |
| for node in nodes: |
This file contains hidden or 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
| http://db.tt/NwJ7bako |
This file contains hidden or 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 requests | |
| r = requests.session() | |
| empinfo = {'color':'#000000','usr_id':'0', | |
| 'login':'placeholder','password':'passw','password1':'passw', | |
| 'sname':'surname','fname':'firstname','pname':'middlename', | |
| 'bdate_dd':'01','bdate_mm':'01','bdate_yy':'1970', | |
| 'ref_id':'0','dept':'','tasks':'', | |
| 'phone_i':'','phone_e':'','email_e':'', | |
| 'ho_text':'','sh_text':'', |