Skip to content

Commit

Permalink
updates for atl dev con
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-milan-pollock committed Sep 9, 2023
1 parent 3af6ae4 commit a798841
Show file tree
Hide file tree
Showing 15 changed files with 127 additions and 57 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Jonathan Milan Pollock, MS

I’m one of the lucky ones, to have an over 20-year career that’s also a passion. How many can say they honestly love their day jobs? With both the excitement and reward of building new and refining older enterprise solutions, it’s like playing with Legos for adults! This enjoyment has led me to obtaining my master’s at the University of Michigan in Computer Information Science with a specialization in Data Engineering, avid reading and learning new skills, and the overall opportunity to help and teach others. I’m fortunate to architect, lead, develop and deploy cloud projects, having my kind of fun!
I’m one of the lucky ones, to have an over 20-year career that’s also a passion. With both the excitement and reward of building new and refining older enterprise solutions, it’s like playing with Legos for adults! This enjoyment has led to avid reading, learning new skills, and the overall opportunity to help and teach others. I’m fortunate to architect, lead, develop and deploy cloud-based projects, having my kind of fun!

---

Expand Down
6 changes: 5 additions & 1 deletion github_copilot/index_1.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# q: how's the lunch and learn going?
# q: how's the demo going?







Expand Down
4 changes: 2 additions & 2 deletions github_copilot/index_10.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const token = process.env["TWITTER_TOKEN"]
import d3 from "d3"

const fetchTweets =
const drawScatterplot
6 changes: 4 additions & 2 deletions github_copilot/index_11.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import d3 from "d3"
const https = require('https');
const parseString = require('xml2js').parseString;
const apiKey = process.env["GOODREADS_API_KEY"]

const drawScatterplot
const getRatingFromGoodreads =
32 changes: 4 additions & 28 deletions github_copilot/index_12.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,4 @@
const https = require('https');
const parseString = require('xml2js').parseString;
const apiKey = process.env["GOODREADS_API_KEY"]

const getRatingFromGoodreads = (bookTitle) => {
return new Promise((resolve, reject) => {
const url = `https://www.goodreads.com/book/title.xml?key=${apiKey}&title=${encodeURIComponent(bookTitle)}`;
https.get(url, (res) => {
if (res.statusCode !== 200) {
reject(new Error(`Status code: ${res.statusCode}`));
} else {
let body = '';
res.on('data', (chunk) => { body += chunk; });
res.on('end', () => {
parseString(body, (err, result) => {
if (err) {
reject(err);
} else {
resolve(result.GoodreadsResponse.book[0].average_rating[0]);
}
});
});
}
}).on('error', (err) => {
reject(err);
});
});
}
const v = new Vector([1, 2, 3]);
v.clear();
console.log(v.size());
console.log(v.empty());
2 changes: 1 addition & 1 deletion github_copilot/index_2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'''
Function to find area of a triangle
'''
#def
#def
6 changes: 4 additions & 2 deletions github_copilot/index_3.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
'''
API Wrapper MethodView blueprint with body for the Flask smorest API
given I post a book
when the API returns an invalid response
then API wrapper should return an error
'''
class
#def
8 changes: 4 additions & 4 deletions github_copilot/index_4.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from github_copilot.index_2 import APIWrapper

'''
Test the APIWrapper class
1. Function to create 100 random users using faker library
2. Each user should have between 1 and 5 posts
3. The user and the post should be sent to the API via a post request
'''
#def tes
#def
7 changes: 2 additions & 5 deletions github_copilot/index_5.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
'''
given I put an image
when The Post ID is invalid
then API wrapper should return an error
'''
def max_sum_slice(xs):
pass
7 changes: 2 additions & 5 deletions github_copilot/index_6.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
'''
1. Function to create 100 random users using faker library
2. Each user should have between 1 and 5 posts
3. The user and the post should be sent to the API via a post request
'''
def get_code_field():
pass
14 changes: 12 additions & 2 deletions github_copilot/index_7.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
def max_sum_slice(xs):
pass
import re

e_regex = r'^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$'
p_regex = r'^[0-9]{3}-[0-9]{3}-[0-9]{4}$'
s_regex = r'^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$'
s2_regex = r'^[0-9]{3}-[0-9]{2}-[0-9]{4}$'

def check_valid(text, regex):
if re.search(regex, text):
print("Valid")
else:
print("Invalid")
1 change: 1 addition & 0 deletions github_copilot/index_9.cs → github_copilot/index_8.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
namespace dotnet_copilot.Data;

// create a speaker class with id, name, and bio

4 changes: 0 additions & 4 deletions github_copilot/index_8.py

This file was deleted.

3 changes: 3 additions & 0 deletions github_copilot/index_9.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const token = process.env["TWITTER_TOKEN"]

const fetchTweets =
82 changes: 82 additions & 0 deletions github_copilot/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# 1. Specify the version of the AzureRM Provider to use
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "=3.0.1"
}
}
}

provider "azurerm" {
features {}
}

# Create a resource group
resource "azurerm_resource_group" "terraformRG" {
name = "terraformRG"
location = "eastus"
}

# Create a virtual network in the resource group
resource "azurerm_virtual_network" "terraformVNet" {
name = "terraformVNet"
address_space = ["10.0.0.0/16"]
location = azurerm_resource_group.terraformRG.location
resource_group_name = azurerm_resource_group.terraformRG.name
}

# Create a subnet in the virtual network
resource "azurerm_subnet" "terraformSubnet" {
name = "internal"
resource_group_name = azurerm_resource_group.terraformRG.name
virtual_network_name = azurerm_virtual_network.terraformVNet.name
address_prefixes = ["10.0.2.0/24"]
}

# Create a network interface card (nic) for the virtual machine
resource "azurerm_network_interface" "terraformNIC" {
name = "terraformNIC"
location = azurerm_resource_group.terraformRG.location
resource_group_name = azurerm_resource_group.terraformRG.name

ip_configuration {
name = "internal"
subnet_id = azurerm_subnet.terraformSubnet.id
private_ip_address_allocation = "Dynamic"
}
}

# Create virtual machine
resource "azurerm_windows_virtual_machine" "terraformVM" {
name = "terraformVM"
resource_group_name = azurerm_resource_group.terraformRG.name
location = azurerm_resource_group.terraformRG.location
size = "Standard_DS1_v2"
admin_username = "adminuser"
admin_password = "P@$$w0rd1234!"
network_interface_ids = [
azurerm_network_interface.terraformNIC.id,
]

os_disk {
caching = "ReadWrite"
storage_account_type = "Standard_LRS"
}

source_image_reference {
publisher = "MicrosoftWindowsServer"
offer = "WindowsServer"
sku = "2016-Datacenter"
version = "latest"
}
}

# Can access data that was accessed somewhere else
data "azurerm_resource_group" "terraformRG" {
name = "terraformRG"
}

output "id" {
value = data.azurerm_resource_group.terraformRG.id
}

0 comments on commit a798841

Please sign in to comment.