Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.
[Brief description ]
- [more description]
- [more description]
- [more description]
# -------------------------------------------------------------- | |
# Customer Support Ticket Classification System | |
# -------------------------------------------------------------- | |
import instructor | |
from pydantic import BaseModel, Field | |
from openai import OpenAI | |
from enum import Enum | |
from typing import List |
// connect() is a function that injects Redux-related props into your component. | |
// You can inject data and callbacks that change that data by dispatching actions. | |
function connect(mapStateToProps, mapDispatchToProps) { | |
// It lets us inject component as the last step so people can use it as a decorator. | |
// Generally you don't need to worry about it. | |
return function (WrappedComponent) { | |
// It returns a component | |
return class extends React.Component { | |
render() { | |
return ( |
// Generate @font-face | |
// | |
// $font-base-path {String} - path to fonts directory relative to CSS location | |
// $font-family {String} - font-family (w/o spaces) | |
// $font-weight {Number} - font-weight | |
// $font-style {String} - font-style (default: normal) | |
// | |
// File path & file name are based on font props which we include. | |
// Examples of path mapping: | |
// @include font-face("../../fonts/", "open-sans", 300); => ../../fonts/open-sans/300/open-sans-300.* |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |