This document provides guidelines for maintaining high-quality Python code. These rules MUST be followed by all AI coding agents and contributors.
All code you write MUST be fully optimized.
"Fully optimized" includes:
At the end of this message, I will ask you to do something. Please follow the "Explore, Plan, Code, Test" workflow when you start.
First, use parallel subagents to find and read all files that may be useful for implementing the ticket, either as examples or as edit targets. The subagents should return relevant file paths, and any other info that may be useful.
Next, think hard and write up a detailed implementation plan. Don't forget to include tests, lookbook components, and documentation. Use your judgement as to what is necessary, given the standards of this repo.
If there are things you are not sure about, use parallel subagents to do some web research. They should only return useful information, no noise.
| import _ from "lodash" | |
| import React from "react" | |
| import moment from "moment" | |
| import { connect } from "react-redux" | |
| import API from "@Services/Api/profile" | |
| import { ApiManager } from "../../api/apiManager" | |
| import ParsedText from "react-native-parsed-text" | |
| import { NavigationEvents } from "react-navigation" | |
| import { DateToWordsFromNow } from "../../helpers/helper" | |
| import { ACTIVITY_NOTIFICATION } from "../../api/constants" |
| import _ from "lodash"; | |
| import React from 'react'; | |
| import moment from 'moment'; | |
| import { connect } from 'react-redux'; | |
| import API from '@Services/Api/profile'; | |
| import { ApiManager } from "../../api/apiManager"; | |
| import ParsedText from 'react-native-parsed-text'; | |
| import { NavigationEvents } from "react-navigation"; | |
| import { DateToWordsFromNow } from '../../helpers/helper'; | |
| import { ACTIVITY_NOTIFICATION } from "../../api/constants"; |
| USE AdventureWorks | |
| GO | |
| --============== Supporting function dbo.udfGetFullQualName | |
| IF OBJECT_ID('dbo.udfGetFullQualName') IS NOT NULL | |
| DROP FUNCTION dbo.udfGetFullQualName | |
| GO | |
| CREATE FUNCTION dbo.udfGetFullQualName ( @ObjectId INTEGER ) |
| stashgrep() { | |
| for i in `git stash list | awk -F ':' '{print $1}'`; do | |
| git stash show -p $i | grep -H --label="$i" "$1" | |
| done | |
| } |
I want to edit in one tab, run what I edit in the other. Typical multi-view stuff. I've used Terminal.app for the last few years. Lately, however, after not long enough, Terminal gets laggy when I switch between tabs.
The stutter between edit and run is annoying, an unnacceptable. One of the major reason I've chosen to work with character based UI is because it is snappy. There shouldn't be a lag while a screen of UTF-8 is rendered in a monospace font.
The lag gets progressively longer, chipping at my productivity with irritation. The only solution is to kill all my Terminals, which essentially kills my flow. Terminal.app won't remember where I was for me. I have to initialize ever tab.
| # http://henrik.nyh.se/2008/12/git-dirty-prompt | |
| # http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
| # username@Machine ~/dev/dir[master]$ # clean working directory | |
| # username@Machine ~/dev/dir[master*]$ # dirty working directory | |
| function parse_git_dirty { | |
| [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
| } | |
| function parse_git_branch { | |
| git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" |
| /** | |
| * This library defines a new style ES objects | |
| * which support delegation based mixins. A mixin | |
| * chain is stored in the internal [[Mixin]] property. | |
| * | |
| * Used features: Harmony (ES6) proxies. | |
| * | |
| * Tested in FF4 beta. | |
| * | |
| * @author Dmitry A. Soshnikov <dmitry.soshnikov@gmail.com> |