A script that prints an Assisted-by: trailer for the AI coding agent that runs it, in the format the Linux kernel documents:
Assisted-by: HARNESS:MODEL [TOOL1] [TOOL2]
The agent commits with it:
A script that prints an Assisted-by: trailer for the AI coding agent that runs it, in the format the Linux kernel documents:
Assisted-by: HARNESS:MODEL [TOOL1] [TOOL2]
The agent commits with it:
| #!/usr/bin/env python | |
| """ | |
| wtf.py | |
| Just write a timestamp to a text file, so later we can calculate the | |
| number of 'WTFs' per minute. | |
| Inspired by: http://www.osnews.com/story/19266/WTFs_m | |
| Use it like this: |
| function deepGet (obj, properties) { | |
| // If we have reached an undefined/null property | |
| // then stop executing and return undefined. | |
| if (obj === undefined || obj === null) { | |
| return; | |
| } | |
| // If the path array has no more elements, we've reached | |
| // the intended property and return its value. | |
| if (properties.length === 0) { |
| // Compute the edit distance between the two given strings | |
| function getEditDistance(a, b) { | |
| if(a.length === 0) return b.length; | |
| if(b.length === 0) return a.length; | |
| var matrix = []; | |
| // increment along the first column of each row | |
| var i; | |
| for(i = 0; i <= b.length; i++){ |
| """ | |
| An example of how to use html2text to create plaintext emails without all the headache. | |
| """ | |
| import html2text | |
| from django.conf import settings | |
| from django.core.mail.message import EmailMultiAlternatives | |
| from django.template.loader import render_to_string |
| """ | |
| Easily mark navigation links with an 'active' class in Django templates. | |
| Usage:: | |
| <a href="{% url 'some_view_name' %}" class="{% active request 'some_view_name' %}">Link to Somewhere</a> | |
| """ | |
| from django.core.urlresolvers import reverse | |
| from django import template |
| /** | |
| * A custom AngularJS Filter for printing a human-readable list. | |
| * | |
| * Example: Use in a controller: | |
| * | |
| * $scope.daysOfTheWeek = ['Monday', 'Tuesday', 'Wednesday' ] | |
| * | |
| * Example: Use in a template: | |
| * | |
| * {{ daysOfTheWeek | prettyList }} |