brew install gfortrancat << EOF > ./hello.f90| from itertools import product | |
| get_tiles = lambda min_x, min_y, max_x, max_y: [ x for x in product(range(min_x, max_x+1), range(min_y, max_y+1)) ] | |
| # get_tiles(*(2,2),*(4,4)) | |
| # [(2, 2), (2, 3), (2, 4), (3, 2), (3, 3), (3, 4), (4, 2), (4, 3), (4, 4)] | 
Example Prompts:
Example Prompts:
| // Prompt: | |
| // Write a node backend which accepts a .zip file from the JavaScript function in the following backticks: | |
| // (the code in backticks ``` was here: https://gist.github.com/classmember/72ab335223722623af9ed5346e5ed6eb ) | |
| const express = require('express'); | |
| const multer = require('multer'); | |
| const fs = require('fs'); | |
| const app = express(); | 
| // Prompt: | |
| // Write a frontend JavaScript function to upload a .zip file from a chrome extension in a browser to a node backend using express. The code must publish to a POST endpoint over HTTPS. | |
| // Response: | |
| // Note: This code assumes the use of jQuery for the AJAX request | |
| function uploadZipFile(file) { | |
| let formData = new FormData(); | |
| formData.append('file', file); | |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Detecting Key Input</title> | |
| <!-- http://www.openjs.com/scripts/events/keyboard_shortcuts/shortcut.js --> | |
| <script src="shortcut.js"></script> | 
| vector<string> split(const string &str) { | |
| vector<string> tokens; | |
| string::size_type start = 0; | |
| string::size_type end = 0; | |
| while ((end = str.find(" ", start)) != string::npos) { | |
| tokens.push_back(str.substr(start, end - start)); | |
| start = end + 1; | 
| /** | |
| * phoneBook.cpp: | |
| * Hashmaps in C++ - Kolby Heacock | |
| * | |
| * build: | |
| * clang++ -std=c++2a test.cpp -o phonebook | |
| * | |
| * run: | |
| * ./phonebook < input | |
| * | 
| // fraction.cpp, Kolby Heacock | |
| // Description: A simple fraction class. | |
| #include <iostream> | |
| #include <cmath> | |
| using namespace std; | |
| // Fraction | |
| // takes two integers as parameters during construction | 
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script type="text/javascript" src="https://unpkg.com/vue@next"></script> | |
| <script type="text/javascript" src="https://unpkg.com/[email protected]"></script> | |
| <script type="text/javascript" src="https://unpkg.com/[email protected]"></script> | |
| <title> Markdown </title> | |
| <style> | |
| html, |