Skip to content

Instantly share code, notes, and snippets.

@NomiJ
Created May 17, 2023 07:20
Show Gist options
  • Save NomiJ/951c229bf349f927c07a486c7d2c69c5 to your computer and use it in GitHub Desktop.
Save NomiJ/951c229bf349f927c07a486c7d2c69c5 to your computer and use it in GitHub Desktop.
OpenAi Demo
<!DOCTYPE html>
<html>
<head>
<title>Tailored Resume</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
</head>
<body>
<!-- Header -->
<header class="bg-primary text-white text-left py-3 mb-4">
<h1>Welcome to Tailored Resume</h1>
</header>
<!-- Main Content -->
<div class="container">
<form id="form-group">
<div class="row">
<div class="col-md-4 form-group">
<label for="textarea1">Job Post Text:</label>
<textarea class="form-control" id="textarea1" rows="20" name="textarea1"></textarea>
</div>
<div class="col-md-4 form-group">
<label for="textarea2">Your Resume:</label>
<textarea class="form-control" id="textarea2" rows="20" name="textarea2"></textarea>
</div>
<div class="col-md-4 form-group">
<label for="textarea2">Output:</label>
<textarea class="form-control" id="textarea3" rows="20" name="textarea3"></textarea>
</div>
</div>
<button type="submit" class="btn btn-primary">Generate Tailored Resume</button>
</form>
</div>
<!-- Footer -->
<footer class="bg-primary text-white text-center py-3 mt-4">
<p>Copyright &copy; 2023 Tailored Resume</p>
</footer>
<!-- Bootstrap JS and jQuery -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>
<script>
$(document).ready(function() {
var jobpost = `About the business and the role
finao (failure is not an option) is a digital agency specialising in providing a range of web based solutions to a range of clients such as Sydney Water, TfNSW, Bidfood, Broadcast Australia, Defect Manager and Linbeck.
We digitise paper based forms, processes and workflow into efficient and user-friendly online systems with automatically generated notifications, predetermined automated workflow and real time reporting. All of this customised to our clients specific business requirements.
We are an innovative team and pride ourselves on the delivery of custom solutions that meet and exceed our clients expectations. We are based in North Sydney and embrace the new WFH philosophy (although you are expected to attend the office at some time during the sprint!).
Job tasks and responsibilities
PHP Full-Stack Developer (Mid-Level) required to join an agile team
Enjoy the benefits of a relaxed, casual environment, using agile development methodology on challenging and varied projects using the latest technologies and tools
As a member of the web team, you will develop new features, new components and optimise performance across a range of platforms and devices
This is a great opportunity for a talented web developer to be part of a skilled and innovative team working on challenging projects.
Skills and experience
Commercial PHP Development Experience using Laravel
Experience with LINUX (Ubuntu, Centos, Federa or RHEL)
Experience with web architecture
An understanding of Agile development methodology
Design Patterns (MVC, IoC ...)
MySql experience (SQL queries data modelling)
Knowledge of Javascript / CSS / Jquery / Vue.js / Angular.js (v1)
Knowledge of SPA
Knowledge of a version control system such as GIT / SVN
English written and verbal communication skills
Nice to have / experience with:
Software: JIRA, BitBucket/Github, Jenkins, Rollbar (or similar)
Containers/container orchestration (eg. Kubernetes, Docker Swarm)
AWS
CI / CD
This role encourages WFH but you will be expected to attend the office during the sprint. Applicants will be required to attend an ‘in person’ interview at our North Sydney office. No overseas companies, no outsourcing and no recruiters please.
Employer questions
Your application will include the following questions:
Which of the following statements best describes your right to work in Australia?
Which of the following programming languages are you experienced in?
Which of the following front end development libraries and frameworks are you proficient in?
Have you worked in a role which requires PHP development experience?
Which of the following Relational Database Management Systems (RDBMS) are you experienced with?
How many years' experience do you have as a developer?`;
var resume = `John Doe
123 Any Street, Your City, Your State, ZIP
Phone: (123) 456-7890
Email: john.doe@example.com
LinkedIn: linkedin.com/in/johndoe
Objective:
Motivated PHP Developer with over 5 years of experience in developing robust and scalable web applications. Proficient in PHP, MySQL, and modern web development technologies. Seeking a challenging position to utilize my skills and knowledge, and contribute to a team that values growth, learning, and dedication.
Skills:
- Proficient in PHP, JavaScript, HTML, CSS
- Experience with MVC frameworks (Laravel, Symfony)
- Strong knowledge of MySQL and database design
- Familiarity with front-end libraries (React, Vue.js)
- Experience with version control systems (Git)
- Strong problem-solving skills and attention to detail
Experience:
Senior PHP Developer | ABC Company | Your City, State | June 2019 - Present
- Lead a team of 3 developers in creating and maintaining robust web applications
- Implemented RESTful APIs used by over 10,000 users daily
- Worked closely with front-end developers to integrate back-end functionality
PHP Developer | XYZ Company | Your City, State | June 2017 - June 2019
- Developed and maintained a high-traffic e-commerce website
- Optimized database queries, reducing page load times by 30%
- Collaborated with cross-functional teams to define, design, and implement new features
Education:
Bachelor of Science in Computer Science | Your University | Your City, State | 2013 - 2017
Certifications:
Zend Certified PHP Engineer | 2018
References:
Available upon request
`;
$("#textarea1").val(jobpost);
$("#textarea2").val(resume);
document.getElementById('form-group').addEventListener('submit', function(event) {
event.preventDefault();
var jobpost = document.getElementById('textarea1').value;
var resume = document.getElementById('textarea2').value;
var combined_text = "Create a resume looking at job post and resume below:\nJob post: " + jobpost + "\nResume: " + resume;
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer 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");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"temperature": 0.6,
"model": "text-davinci-003",
"prompt": combined_text,
"max_tokens": 500
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.openai.com/v1/completions", requestOptions)
.then(response => response.json())
.then(data => {
console.log(data);
var tailored_resume = data.choices[0].text;
$("#textarea3").val(tailored_resume);
})
.catch(error => console.log('error', error));
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment