Add 3 files
Browse files- README.md +33 -0
- codes.csv +44 -0
- codes.json +32 -0
README.md
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# DataNote Dataset
|
2 |
+
|
3 |
+
This dataset contains code snippets and programming examples for various languages.
|
4 |
+
|
5 |
+
## Dataset Structure
|
6 |
+
|
7 |
+
The dataset includes the following fields:
|
8 |
+
- **title**: Title or name of the code snippet
|
9 |
+
- **content**: The actual code content
|
10 |
+
- **language**: Programming language (javascript, python, html, css, sql, etc.)
|
11 |
+
- **description**: Brief description of what the code does
|
12 |
+
|
13 |
+
## Statistics
|
14 |
+
|
15 |
+
- Total records: 5
|
16 |
+
- Languages: javascript, python, html, css, sql
|
17 |
+
|
18 |
+
## Usage
|
19 |
+
|
20 |
+
This dataset can be used for:
|
21 |
+
- Code snippet management
|
22 |
+
- Programming language learning
|
23 |
+
- Code example collections
|
24 |
+
- Educational purposes
|
25 |
+
|
26 |
+
## Files
|
27 |
+
|
28 |
+
- `codes.json`: JSON format with all data
|
29 |
+
- `codes.csv`: CSV format for easy import/export
|
30 |
+
|
31 |
+
## License
|
32 |
+
|
33 |
+
This dataset is provided for educational and research purposes.
|
codes.csv
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
title,content,language,description
|
2 |
+
Hello World JavaScript,"console.log('Hello, World!');",javascript,A simple Hello World program in JavaScript
|
3 |
+
Python Data Analysis,"import pandas as pd
|
4 |
+
import numpy as np
|
5 |
+
|
6 |
+
# Load data
|
7 |
+
df = pd.read_csv('data.csv')
|
8 |
+
print(df.head())",python,Basic data analysis with pandas
|
9 |
+
HTML Template,"<!DOCTYPE html>
|
10 |
+
<html>
|
11 |
+
<head>
|
12 |
+
<title>My Page</title>
|
13 |
+
</head>
|
14 |
+
<body>
|
15 |
+
<h1>Welcome</h1>
|
16 |
+
<p>This is a sample HTML page.</p>
|
17 |
+
</body>
|
18 |
+
</html>",html,Basic HTML template
|
19 |
+
CSS Styling,"body {
|
20 |
+
font-family: Arial, sans-serif;
|
21 |
+
margin: 0;
|
22 |
+
padding: 20px;
|
23 |
+
background-color: #f5f5f5;
|
24 |
+
}
|
25 |
+
|
26 |
+
.container {
|
27 |
+
max-width: 800px;
|
28 |
+
margin: 0 auto;
|
29 |
+
background: white;
|
30 |
+
padding: 20px;
|
31 |
+
border-radius: 8px;
|
32 |
+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
33 |
+
}",css,Basic CSS styling for a webpage
|
34 |
+
SQL Query Example,"SELECT
|
35 |
+
users.name,
|
36 |
+
users.email,
|
37 |
+
COUNT(orders.id) as order_count,
|
38 |
+
SUM(orders.total) as total_spent
|
39 |
+
FROM users
|
40 |
+
LEFT JOIN orders ON users.id = orders.user_id
|
41 |
+
WHERE users.created_at >= '2024-01-01'
|
42 |
+
GROUP BY users.id
|
43 |
+
ORDER BY total_spent DESC
|
44 |
+
LIMIT 10;",sql,SQL query to get top customers by spending
|
codes.json
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
"title": "Hello World JavaScript",
|
4 |
+
"content": "console.log('Hello, World!');",
|
5 |
+
"language": "javascript",
|
6 |
+
"description": "A simple Hello World program in JavaScript"
|
7 |
+
},
|
8 |
+
{
|
9 |
+
"title": "Python Data Analysis",
|
10 |
+
"content": "import pandas as pd\nimport numpy as np\n\n# Load data\ndf = pd.read_csv('data.csv')\nprint(df.head())",
|
11 |
+
"language": "python",
|
12 |
+
"description": "Basic data analysis with pandas"
|
13 |
+
},
|
14 |
+
{
|
15 |
+
"title": "HTML Template",
|
16 |
+
"content": "<!DOCTYPE html>\n<html>\n<head>\n <title>My Page</title>\n</head>\n<body>\n <h1>Welcome</h1>\n <p>This is a sample HTML page.</p>\n</body>\n</html>",
|
17 |
+
"language": "html",
|
18 |
+
"description": "Basic HTML template"
|
19 |
+
},
|
20 |
+
{
|
21 |
+
"title": "CSS Styling",
|
22 |
+
"content": "body {\n font-family: Arial, sans-serif;\n margin: 0;\n padding: 20px;\n background-color: #f5f5f5;\n}\n\n.container {\n max-width: 800px;\n margin: 0 auto;\n background: white;\n padding: 20px;\n border-radius: 8px;\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n}",
|
23 |
+
"language": "css",
|
24 |
+
"description": "Basic CSS styling for a webpage"
|
25 |
+
},
|
26 |
+
{
|
27 |
+
"title": "SQL Query Example",
|
28 |
+
"content": "SELECT \n users.name,\n users.email,\n COUNT(orders.id) as order_count,\n SUM(orders.total) as total_spent\nFROM users\nLEFT JOIN orders ON users.id = orders.user_id\nWHERE users.created_at >= '2024-01-01'\nGROUP BY users.id\nORDER BY total_spent DESC\nLIMIT 10;",
|
29 |
+
"language": "sql",
|
30 |
+
"description": "SQL query to get top customers by spending"
|
31 |
+
}
|
32 |
+
]
|