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
You are a powerful agentic AI coding assistant, powered by Claude 3.5 Sonnet. You operate exclusively in Cursor, the world's best IDE. | |
You are pair programming with a USER to solve their coding task. | |
The task may require creating a new codebase, modifying or debugging an existing codebase, or simply answering a question. | |
Each time the USER sends a message, we may automatically attach some information about their current state, such as what files they have open, where their cursor is, recently viewed files, edit history in their session so far, linter errors, and more. | |
This information may or may not be relevant to the coding task, it is up for you to decide. | |
Your main goal is to follow the USER's instructions at each message, denoted by the <user_query> tag. | |
<communication> | |
1. Be conversational but professional. |
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
# THIS LINUX SETUP SCRIPT HAS MORPHED INTO A WHOLE PROJECT: HTTPS://OMAKUB.ORG | |
# PLEASE CHECKOUT THAT PROJECT INSTEAD OF THIS OUTDATED SETUP SCRIPT. | |
# | |
# | |
# Libraries and infrastructure | |
sudo apt update -y | |
sudo apt install -y \ | |
docker.io docker-buildx \ | |
build-essential pkg-config autoconf bison rustc cargo clang \ |
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
#include <stdio.h> | |
/* | |
Rodrigo Alves @ CIn - rav2 | |
cin.ufpe.br/~rav2 | |
Assuming you have downloaded both the C++ and the input file, | |
to run this software open your computer's console and run: | |
g++ -o chinese.out chinese.cpp && ./chinese.out |
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
#include <stdio.h> | |
int recursion(int n) | |
{ | |
if (n == 1) return 7; | |
return recursion(n-1) + 5; | |
} | |
int main() | |
{ |
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 java.util.Scanner; | |
/** | |
* The contents of this file are not directly bound to a normal Algorithms class | |
* Here I plan to store some known Algorithms that represent proven Mathematical formulas | |
* for computing calculations that may appear in my programming assignments | |
* | |
* @author Rodrigo Alves | |
* | |
*/ |
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
res = "" | |
("a".."z").to_a.each do |l| | |
res << "'#{l}'" << ", " | |
end | |
puts res |
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
#include <iostream> | |
#include <stdexcept> | |
using namespace std; | |
int divide(int A, int B); | |
int main() | |
{ | |
int A, B; | |
cout << "Welcome do the marvelous divider!\n" << endl << endl; |
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
// BFS - Breadth First Search | |
// author: Rodrigo Alves | |
// As explained on Wikipedia https://en.wikipedia.org/wiki/Breadth-first_search | |
#include <cstdio> | |
#define Mark(A, pos) (A[pos] = 1) | |
class Node { | |
public: | |
int value; | |
Node* next; |
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
// a jquery script to fetch all acronyms from political parties in Brazil from the following url | |
// http://pt.wikipedia.org/wiki/Anexo:Lista_de_partidos_pol%C3%ADticos_no_Brasil | |
// July 1, 2013 | |
var base = 1; | |
var count = 29; | |
var total = ""; | |
while (count > 0) { | |
total += $(".wikitable.sortable.jquery-tablesorter tbody tr td").eq(base).text(); |
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
#!/usr/bin/env ruby | |
=begin | |
Rodrigo Alves | |
Februrary 26, 2013 | |
A program to concatenate multiple images into one | |
Call it from the command line and pass it n parameters, the first n-1 parameters | |
are the names of the images from which you wanna create another image and the n-th |