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
| # Setup and train the Doc2Vec model. | |
| self.model = Doc2Vec() | |
| # Get the vectors and indexes from the doc2vec model. | |
| self.word_vectors = self.model.wv.get_normed_vectors() | |
| self.word_indexes = self.model.wv.key_to_index | |
| self.vocab = list(self.model.wv.key_to_index.keys()) | |
| self.document_vectors = self.model.dv.get_normed_vectors() | |
| # Use UMAP to create 5D embeddings of the document vectors. |
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
| apiVersion: karpenter.k8s.aws/v1alpha1 | |
| kind: AWSNodeTemplate | |
| metadata: | |
| name: general-cpu | |
| spec: | |
| subnetSelector: | |
| karpenter.sh/discovery: cluster-name | |
| securityGroupSelector: | |
| karpenter.sh/discovery: cluster-name |
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
| # The default provisioner used by Karpenter. | |
| apiVersion: karpenter.sh/v1alpha5 | |
| kind: Provisioner | |
| metadata: | |
| name: general-cpu | |
| spec: | |
| # Terminate nodes x seconds after | |
| # the last pod is removed from it. | |
| ttlSecondsAfterEmpty: 30 |
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
| # Install the ECR Credential Helper that automatically authenticates with ECR. | |
| sudo yum install amazon-ecr-credential-helper -y | |
| # Configure Docker to use the credential helper. | |
| mkdir ~/.docker/ | |
| cat > ~/.docker/config.json << EOF | |
| { | |
| "credsStore": "ecr-login" | |
| } | |
| EOF |
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
| # Install the ECR Credential Helper that automatically authenticates with ECR. | |
| sudo yum install amazon-ecr-credential-helper -y | |
| # Configure Docker to use the credential helper. | |
| mkdir ~/.docker/ | |
| cat > ~/.docker/config.json << EOF | |
| { | |
| "credsStore": "ecr-login" | |
| } | |
| EOF |
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
| packer { | |
| required_plugins { | |
| amazon = { | |
| version = ">= 0.0.2" | |
| source = "github.com/hashicorp/amazon" | |
| } | |
| } | |
| } | |
| variable "IMAGE" { |
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
| apiVersion: actions.summerwind.dev/v1alpha1 | |
| kind: RunnerDeployment | |
| metadata: | |
| name: general-runner | |
| namespace: actions-runner-system | |
| spec: | |
| template: | |
| spec: | |
| metadata: | |
| labels: |
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
| Provider | Type | Cost ($/hr) | Compute | |
|---|---|---|---|---|
| Github Actions | NA | 0.48 | 2 CPUs & 7 GB | |
| AWS | On Demand | 0.101 | 2 CPUs & 8 GB (m5.large) | |
| AWS | Spot (cheap compute) | 0.0202 | 2 CPUs & 8 GB (m5.large) |
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
| {0: 'tench, Tinca tinca', | |
| 1: 'goldfish, Carassius auratus', | |
| 2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias', | |
| 3: 'tiger shark, Galeocerdo cuvieri', | |
| 4: 'hammerhead, hammerhead shark', | |
| 5: 'electric ray, crampfish, numbfish, torpedo', | |
| 6: 'stingray', | |
| 7: 'cock', | |
| 8: 'hen', | |
| 9: 'ostrich, Struthio camelus', |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <script id="jsbin-javascript"> |
NewerOlder