Snippets Collections
from langchain.schema import Document

[Document(page_content='Parable of the Sower is a science fiction novel by Octavia Butler, published in 1993. It follows the story of Lauren Olamina, a young woman living in a dystopian future where society has collapsed due to environmental disasters, poverty, and violence.', metadata={'score': 0.8897120952606201, 'uuid': 'f99ecec3-f778-4bfd-8bb7-c3c00ae919c0', 'created_at': '2023-10-17T22:53:08.664849Z', 'updated_at': '0001-01-01T00:00:00Z', 'role': 'ai', 'metadata': {'system': {'entities': [{'Label': 'GPE', 'Matches': [{'End': 20, 'Start': 15, 'Text': 'Sower'}], 'Name': 'Sower'}, {'Label': 'PERSON', 'Matches': [{'End': 65, 'Start': 51, 'Text': 'Octavia Butler'}], 'Name': 'Octavia Butler'}, {'Label': 'DATE', 'Matches': [{'End': 84, 'Start': 80, 'Text': '1993'}], 'Name': '1993'}, {'Label': 'PERSON', 'Matches': [{'End': 124, 'Start': 110, 'Text': 'Lauren Olamina'}], 'Name': 'Lauren Olamina'}]}}, 'token_count': 56}),
     Document(page_content="Write a short synopsis of Butler's book, Parable of the Sower. What is it about?", metadata={'score': 0.8857351541519165, 'uuid': 'f6aba470-f15f-4b22-84ef-1c0d315a31de', 'created_at': '2023-10-17T22:53:08.642659Z', 'updated_at': '0001-01-01T00:00:00Z', 'role': 'human', 'metadata': {'system': {'entities': [{'Label': 'ORG', 'Matches': [{'End': 32, 'Start': 26, 'Text': 'Butler'}], 'Name': 'Butler'}, {'Label': 'WORK_OF_ART', 'Matches': [{'End': 61, 'Start': 41, 'Text': 'Parable of the Sower'}], 'Name': 'Parable of the Sower'}]}}, 'token_count': 23}),
     Document(page_content='Who was Octavia Butler?', metadata={'score': 0.7759560942649841, 'uuid': '26aab7b5-34b1-4aff-9be0-7834a7702be4', 'created_at': '2023-10-17T22:53:08.585297Z', 'updated_at': '0001-01-01T00:00:00Z', 'role': 'human', 'metadata': {'system': {'entities': [{'Label': 'PERSON', 'Matches': [{'End': 22, 'Start': 8, 'Text': 'Octavia Butler'}], 'Name': 'Octavia Butler'}], 'intent': 'The subject is asking for information about Octavia Butler, a specific person.'}}, 'token_count': 8}),
     Document(page_content="Octavia Butler's contemporaries included Ursula K. Le Guin, Samuel R. Delany, and Joanna Russ.", metadata={'score': 0.7602507472038269, 'uuid': 'ee4aa8e9-9913-4e69-a2a5-77a85294d24e', 'created_at': '2023-10-17T22:53:08.611466Z', 'updated_at': '0001-01-01T00:00:00Z', 'role': 'ai', 'metadata': {'system': {'entities': [{'Label': 'PERSON', 'Matches': [{'End': 16, 'Start': 0, 'Text': "Octavia Butler's"}], 'Name': "Octavia Butler's"}, {'Label': 'ORG', 'Matches': [{'End': 58, 'Start': 41, 'Text': 'Ursula K. Le Guin'}], 'Name': 'Ursula K. Le Guin'}, {'Label': 'PERSON', 'Matches': [{'End': 76, 'Start': 60, 'Text': 'Samuel R. Delany'}], 'Name': 'Samuel R. Delany'}, {'Label': 'PERSON', 'Matches': [{'End': 93, 'Start': 82, 'Text': 'Joanna Russ'}], 'Name': 'Joanna Russ'}], 'intent': "The subject is stating a fact about Octavia Butler's contemporaries, including Ursula K. Le Guin, Samuel R. Delany, and Joanna Russ."}}, 'token_count': 27}),
     Document(page_content='You might want to read Ursula K. Le Guin or Joanna Russ.', metadata={'score': 0.7595934867858887, 'uuid': '9fa630e6-0b17-4d77-80b0-ba99249850c0', 'created_at': '2023-10-17T22:53:08.630731Z', 'updated_at': '0001-01-01T00:00:00Z', 'role': 'ai', 'metadata': {'system': {'entities': [{'Label': 'ORG', 'Matches': [{'End': 40, 'Start': 23, 'Text': 'Ursula K. Le Guin'}], 'Name': 'Ursula K. Le Guin'}, {'Label': 'PERSON', 'Matches': [{'End': 55, 'Start': 44, 'Text': 'Joanna Russ'}], 'Name': 'Joanna Russ'}]}}, 'token_count': 18})]
/** select-text.js
 * Set selected text to the element passed to the function.
function selectText(el) {
	let sel, range;
	// Browser compatibility
	// older ie
	if (window.getSelection && document.createRange) {
		sel = window.getSelection();
		// creates range object
		// set range to elements range
		// remove window range
		// set window range
		window.setTimeout(function() {
			range = document.createRange();
		}, 1);
	} else if (document.selection) {
		sel = document.selection.createRange();
		// creates range object
		// set raselectnge
		// call  event listener
		if (sel.text == '') {
			range = document.body.createTextRange();
	} else {
		// do nothing
tonce: 1513746038205

echo -n '' | openssl dgst -sha256 -hmac "mpEFG56Nc9u5fUFjrg9mWoTEe8uk343X"
# output: b9d55b0c5385137611542f8b85178329e5cbec22cb0780f9d9c3ce07f778ba9f

# added header
X-SIGNATURE: b9d55b0c5385137611542f8b85178329e5cbec22cb0780f9d9c3ce07f778ba9f

One way to enforce this rule is to design your API in such a way that it requires users to supply an identifier for a SatelliteData entity rather than the entity itself. This way, the data access layer would be responsible for fetching the correct entity based on its identifier.

This could look something like this:

Copy code
public class SatelliteService {

    private final PersistenceLayer persistenceLayer;

    public SatelliteService(PersistenceLayer persistenceLayer) {
        this.persistenceLayer = persistenceLayer;

    public SatelliteDataDTO getSatelliteData(String satelliteId) {
        return persistenceLayer.fetchSatelliteDataById(satelliteId);

    public void updateSatelliteData(String satelliteId, SatelliteDataDTO satelliteData) {
        persistenceLayer.updateSatelliteData(satelliteId, satelliteData);

    // Other service methods...
In this way, the SatelliteService is responsible for calling the appropriate methods on the PersistenceLayer and it does not allow clients to supply their own SatelliteData entities. Instead, it requires them to provide an identifier, which it uses to fetch the appropriate entity from the database.

This approach requires that each SatelliteData entity has a unique identifier that can be used to retrieve it from the database. This is a common requirement in many domain models.

This approach not only ensures that entities remain attached to the Hibernate session, but it also encapsulates the data access code in the data access layer, keeping it separate from the rest of your application.
curl --request POST \
  --url '' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data grant_type=client_credentials \
  --data client_id=YOUR_CLIENT_ID \
  --data client_secret=YOUR_CLIENT_SECRET \
  --data audience=YOUR_API_IDENTIFIER
h1 {
  background: -webkit-linear-gradient(rgb(50,50,80), red);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
Set(varSplitText, (Concat(LastN(Split(TextBoxNew.Text, "=").Result, CountRows(Split("", "=").Result) -1),Result
If(IsBlank(LookUp('YouTube Resources', Title = TextBoxNew.Text)), "ADD", "UPDATE")
LookUp('YouTube Resources', Title = TextBoxNew.Text, Notes)
      - ./wp-content/themes:/var/www/html/wp-content/themes/
      - ./wp-content/plugins:/var/www/html/wp-content/plugins/
extension SendOfferVC : UITextViewDelegate {
    func textViewDidBeginEditing(_ textView: UITextView) {
        if textView.text == "Add a Description to your Offer" {
            textView.text = ""
            textView.textColor = UIColor.darkGray
    func textViewShouldEndEditing(_ textView: UITextView) -> Bool {
        if textView.text == "" {
            textView.text = "Add a Description to your Offer"
            textView.textColor = UIColor.lightGray
         return true
    func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool {
        if(text == "\n") {
                  return false
              return true
Content-Encoding: gzip
Cache-Control: no-store
Accept: text/html
Cookie: Version=1
h1 {
  background: linear-gradient(180deg, rgba(255,255,255,0) 65%, #FFD0AE 65%);
  display: inline; font-weight: normal;
// Easy Vertical Text //

@media only screen and (min-width: 640px) { em {
  width: auto !important;
  writing-mode: vertical-rl;
  text-orientation: sideways-right;
  font-style: normal !important;
  transform: rotate(180deg);

em {
  font-style: normal !important;
/* Text change detail */
h1 strong {
  font-family: aktiv-grotesk-extended !important;
  font-size: 3.1rem;
/* Text highlight underline. Only works for bolded h1 text */
h1 strong{
  background: linear-gradient(to bottom, #FFF 60%, #FFD84A 40%) !important;
  font-weight: normal !important;
#block-53c818fd6d3f39517aed {
background: #f0f0f0;
padding: 50px;
text-align: center;
* Gets parts of speech for a sentence
* @param {String} text The text to get parts of speech for.
* @returns {Promise.<Object>} Resolves into a list of parts of speech. (Or rejects with an error)
* @example 
* var parts_of_speech  = await parts_of_speech("Sometimes I just want to code in JavaScript all day.");
* // ⇒
* // {entities: Array(1), sentiments: Array(1), documentInfo: {…}, wordFreq: Array(4), taggedText: '<span class="tag ADV">Sometimes</span> <span class…>all</span> <span class="tag DURATION">day</span>'}
function parts_of_speech(text) {
function parts_of_speech(text) {
  return new Promise(async (resolve, reject) => {
    fetch("", {
      headers: {
        accept: "application/json",
        "content-type": "application/json",
      body: JSON.stringify({ sentence: text }),
      method: "POST",
      .then((res) => res.json())
@mixin text($font-size,$color,$bg-color) {

     // we pass the $font-size to font-size property
    font-size: $font-size;
    // we pass the $color to color property
    color: $color;
    // we pass the $bg-color to background property
    background: $bg-color;

.text1 {
          // ($font-size,$color,$bg-color)
    @include text(3rem,green , black)

.text2 {
          // ($font-size,$color,$bg-color)
    @include text(5em,red , transparent)
import re

text = 'this is a text'

    found ='is(.+?)text', text).group(1)
except AttributeError:
    # AAA, ZZZ not found in the original string
    found = '0 wtitle' # apply your error handling

=> a
/* This will come in the body at XML but the header will be text/plain, which is why  
all this is happening manually to get this read from the stream.  
var reqHeaders = request.headers;"CPSNS: reqHeaders content-type" + reqHeaders['content-type']);
if (reqHeaders['content-type'] == "text/plain; charset=UTF-8") {
    var stream = request.body.dataStream;
    var reader = new GlideTextReader(stream);
    var input = "";
    var ln = "";
    while ((ln = reader.readLine()) != null) {
        input += ln;
    }"CPSNS: SUB" + input);
} else {
    var body = {};
    var data =;"CPSNS: req.body data" + data);

.truncate {
  width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

Wed Dec 20 2023 18:25:56 GMT+0000 (Coordinated Universal Time)

#text #+js

Wed Nov 01 2023 03:05:25 GMT+0000 (Coordinated Universal Time)


Thu Jul 20 2023 03:14:07 GMT+0000 (Coordinated Universal Time)

#select #text #selection

Sun Jul 09 2023 17:02:52 GMT+0000 (Coordinated Universal Time)


Thu Jul 06 2023 07:42:07 GMT+0000 (Coordinated Universal Time)


Wed Jan 11 2023 08:51:55 GMT+0000 (Coordinated Universal Time)


Mon Dec 19 2022 22:02:19 GMT+0000 (Coordinated Universal Time)

#linear-gradient #text #h1

Wed Oct 19 2022 23:10:37 GMT+0000 (Coordinated Universal Time)


Sat Jul 23 2022 14:20:04 GMT+0000 (Coordinated Universal Time)

#powerapps #lookup #button #text #change

Sat Jul 23 2022 14:16:05 GMT+0000 (Coordinated Universal Time)

#powerapps #text #lookup

Mon Jul 18 2022 18:25:06 GMT+0000 (Coordinated Universal Time)


Mon May 30 2022 12:30:28 GMT+0000 (Coordinated Universal Time)

#ios #swift #textview #text

Wed May 18 2022 07:20:51 GMT+0000 (Coordinated Universal Time)


Wed May 18 2022 07:20:39 GMT+0000 (Coordinated Universal Time)


Mon Mar 21 2022 08:10:56 GMT+0000 (Coordinated Universal Time)

#highlight #low #text #header

Fri Feb 25 2022 06:13:17 GMT+0000 (Coordinated Universal Time)

#text #fonts

Thu Feb 17 2022 18:40:49 GMT+0000 (Coordinated Universal Time)

#text #fonts

Thu Feb 17 2022 18:39:51 GMT+0000 (Coordinated Universal Time)

#text #highlighter

Wed Feb 16 2022 13:55:09 GMT+0000 (Coordinated Universal Time)

#colour #background #text

Mon Jan 10 2022 17:02:49 GMT+0000 (Coordinated Universal Time)

#js #javascript #text #api

Sun Jan 09 2022 12:38:19 GMT+0000 (Coordinated Universal Time) undefined

#text #chat

Sat Jan 08 2022 02:23:05 GMT+0000 (Coordinated Universal Time)

#mixin #scss #text

Tue Jun 29 2021 16:20:27 GMT+0000 (Coordinated Universal Time)

#py #dataframe #pandas #text #exception

Mon Feb 01 2021 21:22:08 GMT+0000 (Coordinated Universal Time)

#servicenow #content #type #plain #text

Sun Jan 05 2020 18:59:56 GMT+0000 (Coordinated Universal Time)

#css #webdev #text

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension