- Test-Driven Development (TDD) with pytest: Always write a failing test before writing implementation code (Red-Green-Refactor). Use
pytest
andpytest-fixtures
for test setup, execution, and teardown. - KISS (Keep It Simple, Stupid): Favor the simplest solution that meets the requirements.
- DRY (Don't Repeat Yourself): Avoid code duplication. Extract reusable logic into functions or classes.
- Standard Libraries and Tools: Utilize standard Python libraries (like
datetime
for date/time,requests
for HTTP requests, andlogging
) and external libraries, includingBeautifulSoup4
for HTML parsing, to avoid reinventing the wheel. Favor well-maintained and widely-used libraries. - YAGNI (You Ain't Gonna Need It): Don't implement features or functionality unless they are currently required.
- SOLID Principles & Extensibility: Adhere to SOLID principles, promoting maintainability, testability, and future extension. Consider potential future requi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"customModes": [ | |
{ | |
"slug": "lean-prompt-code", | |
"name": "Code (@GosuCoder Lean Prompt)", | |
"roleDefinition": "You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.", | |
"groups": [ | |
"read", | |
"edit", | |
"command", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Prompt> | |
<Context> | |
You're tasked with coding a project and need to follow specific guidelines to ensure quality and consistency across various programming languages and frameworks. | |
</Context> | |
<Progress> | |
Document all tasks. Create a folder in the project root named .cline and keep a log of tasks in the following format. | |
GOAL: Detail the goal of the task | |
IMPLMENTATION: Describe how it was implemented. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<TEMPLATE> | |
<INSTRUCTIONS> | |
Use the <CODEBASE> code as reference, and convert the high-level <TASK> into a set of very detailed step-by-step instructions that an AI coding agent can complete. | |
Only includes steps an AI coding agent can take. Do not include testing or any other work a human would do to confirm the task has been completed. | |
ALWAYS have the agent run a build when it is complete. Be specific and decisive about what the agent should do. | |
Do not include any additional meta instructions to the user. Use markdown formatting. | |
</INSTRUCTIONS> | |
<TASK> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Resume Phrase Matcher code | |
#importing all required libraries | |
import PyPDF2 | |
import os | |
from os import listdir | |
from os.path import isfile, join | |
from io import StringIO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model.zero_grad() # Reset gradients tensors | |
for i, (inputs, labels) in enumerate(training_set): | |
predictions = model(inputs) # Forward pass | |
loss = loss_function(predictions, labels) # Compute loss function | |
loss = loss / accumulation_steps # Normalize our loss (if averaged) | |
loss.backward() # Backward pass | |
if (i+1) % accumulation_steps == 0: # Wait for several backward steps | |
optimizer.step() # Now we can do an optimizer step | |
model.zero_grad() # Reset gradients tensors | |
if (i+1) % evaluation_steps == 0: # Evaluate the model when we... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.oreilly.com/data/free/files/2014-data-science-salary-survey.pdf | |
http://www.oreilly.com/data/free/files/2015-data-science-salary-survey.pdf | |
http://www.oreilly.com/data/free/files/Data_Analytics_in_Sports.pdf | |
http://www.oreilly.com/data/free/files/advancing-procurement-analytics.pdf | |
http://www.oreilly.com/data/free/files/ai-and-medicine.pdf | |
http://www.oreilly.com/data/free/files/analyzing-data-in-the-internet-of-things.pdf | |
http://www.oreilly.com/data/free/files/analyzing-the-analyzers.pdf | |
http://www.oreilly.com/data/free/files/architecting-data-lakes.pdf | |
http://www.oreilly.com/data/free/files/being-a-data-skeptic.pdf | |
http://www.oreilly.com/data/free/files/big-data-analytics-emerging-architecture.pdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# install CUDA Toolkit v9.0 | |
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb) | |
CUDA_REPO_PKG="cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb" | |
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/${CUDA_REPO_PKG} | |
sudo dpkg -i ${CUDA_REPO_PKG} | |
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub | |
sudo apt-get update | |
sudo apt-get -y install cuda-9-0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from scipy.spatial.distance import cdist | |
from .dtw import dtw | |
from .lb import envelope, lb_keogh_cdist, lb_keogh_from_bounds | |
from .window import window_ts | |
def dtw_nearest_neighbours(query, db, bound_reach, step_size, subseq=False): | |
assert query.ndim == 1 | |
assert db.ndim == 2 | |
assert query.flags.contiguous |
After reading Why I'm Frequently Absent from Open Source by James Long and listening the corresponding The Changelog episode, I dwelt on the idea and believe that open source maintainers...
- ... should never be ashamed if they don't have time for a project.
- ... should be honest with themselves and open with their users so that everybody can be on the same page
- ... are people and they have at one time or another responsibilities or hardships that they need to attend to which reasonably take them away from a project
- ... may also reasonbly decide that they don't like the direction of a project or that they would like to explore other things and may leave a project permanently.
Along this line of thinking I've created a set of descriptions for different levels at which a project might be maintained. A maintainer can use these to announce to their users the current ability that they have to dedicate to a pr
NewerOlder