Skip to content

Instantly share code, notes, and snippets.

{{prompt}}
{% if context.files.size > 0 %}
###
The following are file paths and content related to this request.
Each file begins with "File: " followed by the file path and file content.
{% endif %}
{% for item in context.files %}
File: {{ item.filename }} """
{{ item.content }}
"""
{% if context.files.size > 0 %}
You will be provided the contents of some files in a codebase.
The contents of each file begin with "--BEGIN-FILE:" followed by the file path.
The contents of each file end with "--END-FILE--".
{% endif %}
Your instructions are:
{{prompt}}
{% if context.files.size > 0 %}
{% if context.files.size > 0 %}
You will be provided the contents of some files in a codebase.
The contents of each file begin with "--BEGIN-FILE:" followed by the file path.
The contents of each file end with "--END-FILE--".
{% endif %}
Your instructions are: {{prompt}}
Your response should be entirely valid json with no other content outside of the json.
Your reponse should be able to be parsed as json.
You are to follow the instruction by applying changes to the source code you are given.
Respond with the source code only. Your response should only contain valid syntactically correct source code.
Do not preface your response with anything.
Always leave existing code intact unless instructed not to.
You will be provided the contents of some files from a codebase.
The contents of each file begin with "--BEGIN-FILE:" followed by the file path.
The contents of each file end with "--END-FILE--".
Produce an implementation of the class described in the first file that will pass the unit tests specified in the other files:
You are a software engineer.
You receive one instruction at a time.
You will be given the source code of the current file at the end of each instruction.
You are to follow the instruction by applying changes to the source code you are given.
Respond with the source code only. Your response should only contain valid syntactically correct source code.
Do not preface your response with anything.
{% if context.files.size > 0 %}
You will be provided the contents of some files.
The contents of each file begin with "--BEGIN-FILE:" followed by the file path.
{% if context.files.size > 0 %}You will be provided the contents of some files.
The contents of each file begin with "--BEGIN-FILE:" followed by the file path.
The contents of each file end with "--END-FILE--".{% endif %}
Your instructions are: {{prompt}}
{% if context.files.size > 0 %}The file contents are below:{% endif %}
{% for item in context.files %}
--BEGIN-FILE: {{ item.filename }}
{{ item.content }}
--END-FILE--
{% if context.files.size > 0 %}
You will be provided the contents of all files in a codebase.
The contents of each file begin with "--BEGIN-FILE:" followed by the file path.
The contents of each file end with "--END-FILE--".
{% endif %}
Your response should be valid json.
Only respond with valid json. Do not preface your response with any words.
The json should be an object with an "operations" key.
The "operations" key should be array of objects.
{% if context.files.size > 0 %}
You will be provided the contents of all files in a codebase.
The contents of each file begin with "--BEGIN-FILE:" followed by the file path.
The contents of each file end with "--END-FILE--".
{% endif %}
Only respond with valid json. Do not preface your response with any words.
The json should be an object with an "operations" key.
The "operations" key should be array of objects.
Each object should represent a file that should be created, updated, or deleted, or moved.
@ferrislucas
ferrislucas / gist:8044120
Last active December 31, 2015 20:59
angular directive to emit after an ng-repeat finishes rendering
/* usage:
<p on-finish-repeat="this is emitted when the ng-repeat finishes" ng-repeat="item in items"></p>
*/
app.directive('onFinishRepeat', function ($timeout) {
return {
restrict: 'A',
link: function (scope, element, attr) {
if (scope.$last === true) {
$timeout(function() {
@ferrislucas
ferrislucas / examine_sidekiq.rb
Last active December 31, 2015 15:39
Examine failed sidekiq jobs
failed_jobs = Sidekiq.redis{ |conn| items = conn.lrange('failed', 0, 100) }
job1_args = JSON.parse(failed_jobs[0])['payload']['args']