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
FROM python | |
RUN apt-get update | |
RUN apt-get install -y openjdk-11-jdk | |
RUN python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org sklearn xgboost==1.0.0 sklearn2pmml ipython | |
RUN wget https://github.com/jpmml/jpmml-xgboost/releases/download/1.4.0/jpmml-xgboost-executable-1.4.0.jar | |
RUN python train.py | |
RUN java -jar jpmml-xgboost-executable-1.3.16.jar --model-input iris.model --fmap-input Audit.fmap --target-name Adjusted --pmml-output XGBoostAudit.pmml |
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 inspect | |
def is_subclass_of(superclass): | |
def curry(cls): | |
return inspect.isclass(cls) and cls is not superclass and issubclass(cls, superclass) | |
return curry | |
def all_attributes_from_module(module): | |
return [ getattr(module, i) for i in dir(module) ] |
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
openapi: 3.0.0 | |
info: | |
title: Vertex AI endpoint spec | |
version: "1.0.0" | |
servers: | |
- url: vertex ai endpoint | |
description: localhost | |
components: |
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 run(): | |
print('Hello world') |
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
from num2words import num2words | |
import random | |
def gen(): | |
num1 = random.randint(1, 99) | |
num2 = random.randint(1, 99) | |
if num2 >= 10: | |
u = "hundredths" | |
else: |
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
from random import randrange | |
from datetime import datetime, timedelta | |
def random_date_between(start_date, end_date): | |
time_between_dates = end_date - start_date | |
days_between_dates = time_between_dates.days | |
random_number_of_days = randrange(days_between_dates) | |
return start_date + timedelta(days=random_number_of_days) | |
def random_date_from(start_date, time_between_dates): |
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
name: Deployment | |
on: [push] | |
jobs: | |
Build-App: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: |
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: v1 | |
kind: Endpoints | |
metadata: | |
name: gpu-metrics | |
namespace: monitoring | |
labels: | |
app: gpu-metrics | |
release: prometheus | |
subsets: | |
- addresses: |
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
# Ref: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-access-tokens.html | |
cat <<EOT >> creds.json | |
{ | |
"username": "perryism", | |
"token": "my_access_token", | |
"serverType": "GITHUB", | |
"authType": "OAUTH", | |
"shouldOverwrite": true | |
}EOT |
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
FROM ruby:2.7.1-alpine3.12 | |
RUN apk add --no-cache build-base nodejs nodejs-npm yarn sqlite-dev tzdata && \ | |
gem install nokogiri && \ | |
gem install rails | |
WORKDIR /app | |
COPY Gemfile /app |