The answer is "maybe." Agreements restricting competition are treated differently in different states, and sometimes even in different judicial districts within a state. Someone would have to be familiar with the laws of your state to give you a more complete answer.
Generally, non-compete agreements are disfavored by the courts and are scrutinized closely. However, the end result in any particular case turns upon a close examination of the specific facts relating to that employee and employer.
If the facts show that you had little or no exposure to sensitive information during the 6 weeks of your employment, a court might find that the employer has no protectible interest in enforcing the non-compete. If you had full access to the company's source code for 6 weeks and the employer felt you just weren't working out, the fact that they didn't hold your skills in high esteem doesn't mean that you can take your knowledge to a competitor.
If you really think that you don't pose a competitive risk to your former employer, often the best course is to ask the former employer to waive the non-compete agreement.