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
# Secure Coding Practices | |
## Input Validation | |
- Always validate user input on both client and server sides | |
- Never trust client-side validation alone | |
- Use validation libraries appropriate for your framework (e.g., Zod, Joi, Yup) | |
## Prevent SQL Injection |
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
[ | |
{ "title": "Pricing Component", "generationId": "rRBlufM", "author": "Steven Tey" }, | |
{ "title": "Health Charts", "generationId": "R3W5UMZB50j", "author": "shadcn" }, | |
{ "title": "Hero Section", "generationId": "0W13RkH", "author": "shadcn" }, | |
{ "title": "Weather App", "generationId": "bo2N7pU", "author": "Alice Johnson" }, | |
{ "title": "Login Screen", "generationId": "CZIY9QmU1We", "author": "Bob Brown" }, | |
{ "title": "Login Screen", "generationId": "yK24QpZ6ECp", "author": "Charlie Davis" }, | |
{ "title": "Course Video", "generationId": "Jg1C9YuOYKp", "author": "Diana Evans" } | |
] |
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
from pydantic import BaseModel | |
from typing import List, Optional | |
from openai import OpenAI | |
import json | |
from pydantic import BaseModel | |
from typing import List, Optional | |
from output_generators import generate_html, generate_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
'use client'; | |
import { Textarea } from "@/components/ui/textarea" | |
import { Button } from "@/components/ui/button" | |
import { useChat } from 'ai/react'; | |
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" | |
import Footer from "../footer"; | |
import { renderContent } from "../message-response/messageUtils"; | |
//for mocking to test the UI |
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 logging | |
import sys | |
import openai | |
logging.basicConfig(stream=sys.stdout, level=logging.INFO) | |
logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stdout)) | |
from llama_index.llms import OpenAI | |
from llama_index import ListIndex, NotionPageReader, ServiceContext | |
import os |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 is a comment | |
package main | |
import "fmt" | |
func main() { | |
fmt.Println("Hello World!") | |
} |
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
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity 0.8.0 <0.9.0; | |
contract SampleContractWallet{ | |
mapping(address => uint256) public balances; | |
address payable wallet; | |
constructor(address payable _wallet) { | |
wallet = _wallet; |
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
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity 0.8.0 <0.9.0; | |
contract MyContract{ | |
address owner; | |
string public mobileNo; | |
modifier onlyOwner(){ | |
require(msg.sender == owner); |
NewerOlder