Skip to content

amrrs/chatgpt-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

chatgpt-code

import re

text = '[p]1littlecoder is amazing[/p]'

# Use a regular expression to match the text you want to extract
match = re.search(r'\[p\](.*?)\[/p\]', text)

# If a match was found, extract the text
if match:
  extracted_text = match.group(1)
  print(extracted_text)
from transformers import pipeline

# Initialize the summarization pipeline
summarizer = pipeline("summarization")

# Provide the text you want to summarize as input
input_text = "Replace this with the text you want to summarize"

# Use the summarize method to generate the summary
summary = summarizer(input_text, max_length=100, min_length=30)

# Print the generated summary
print(summary[0]['summary_text'])
import re

text = "0s11 0s12 0s33 my name is 0sgfh 0s1 0s22 0s87"

pattern = r"(0s\w+(?:\s+0s\w+)*)"

matches = re.findall(pattern, text)

# matches will be a list of strings, each containing a matched sequence
print(matches)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published