agentlans/allenai-WildChat-4.8M-prompts huggingface dataset:
I want to create a backtesting python program, where I compare two EMA crossing as buy, sell signal against buy-and-hold lump sum investing. 
The program will use yfinance to obtain market data and use Matplotlib to indicate where the strategy buy and sell. The historical price should be plot with candle style.’

It should calculate the total return, the sharp ratio, win rate, and max drawdown. Max drawdown define as the drawdown below the long entry price, i.e. if enter a trade at 100 and sell at 200, but during that period the price gone to 80, the drawdown should be -20%. and the max drawdown should be the biggest drawdown among all trade.

The EMA should change as the interval change, so if user input 12, 26 EMA. Under weekly candle, the strategy will be to buy when short 12 weeks EMA cross 26 weeks EMA, and sell when 12 weeks EMA fall below 26 weeks EMA. For daily candle it will be 12 days EMA and 26 days EMA, so on and so forth.

There should be a front end where user can enter what ticket they are backtesting for, what EMA numbers, what kind of candle(x hr, day, week, month), and what period to backtest. the EMA input should adapt to the selected candle interval. Use Streamlit as frontend. a log section under the chart section that display each buy and sell trade is also needed.


Can you help me create the program
private IEnumerator AttackCoroutine(Vector3 target)
        {
            sorting.sortingOrder += 1;
            isAttackAnimating = true;
            arrowAttack.gameObject.SetActive(false);
            Vector3 startPos = display.transform.position;
            Vector3 startLocalScale = display.transform.localScale;
            Vector3 targetIgnoreZ = new Vector3(target.x, target.y, display.transform.position.z);
            Vector3 attackDir = (targetIgnoreZ - startPos).normalized;
            targetIgnoreZ -= attackDir * 2;
            Vector3 backstepTarget = display.transform.position - attackDir * 3;
            // 放大
            //Debug.Log($" begin attack Coroutine {display.transform.position}");
            yield return display.transform.TweenLocalScale(display.transform.localScale,
                display.transform.localScale * 1.2f, 0.1f);
            // 后撤
            yield return display.transform.TweenPos(display.transform.position, backstepTarget, 0.1f);
            // 前进
            //Debug.Log($" begin attack target  {display.transform.position}");
            yield return display.transform.TweenPos(display.transform.position, targetIgnoreZ, 0.1f);
            // 还原大小
            //Debug.Log($" begin attack backscale  {display.transform.position}");
            yield return display.transform.TweenLocalScale(display.transform.localScale, startLocalScale, 0.15f);
            // 回到原始位置
            //Debug.Log($" begin attack backpos  {display.transform.position}");
            yield return display.transform.TweenPos(display.transform.position, startPos, 0.3f);
            arrowAttack.gameObject.SetActive(true);
            isAttackAnimating = false;
            sorting.sortingOrder = origLayer;
        }
convert the following code to a nestjs service const refresh = (req, res) => {
  const cookies = req.cookies;

  if (!cookies?.jwt) return res.status(401).json({ message: 'Unauthorized' });

  const refreshToken = cookies.jwt;

  jwt.verify(
    refreshToken,
    process.env.REFRESH_TOKEN_SECRET,
    asyncHandler(async (err, decoded) => {
      if (err) return res.status(403).json({ message: 'Forbidden' });

      const foundUser = await User.findOne({
        username: decoded.username,
      }).exec();

      if (!foundUser) return res.status(401).json({ message: 'Unauthorized' });

      const accessToken = jwt.sign(
        {
          UserInfo: {
            username: foundUser.username,
            roles: foundUser.roles,
          },
        },
        process.env.ACCESS_TOKEN_SECRET,
        { expiresIn: '15m' }
      );

      res.json({ accessToken });
    })
  );
};
You must always respond using the following format:

## Format:
Wrap your reply like this:

<think>
(Write your INNER THOUGHTS here — the user can NOT see this part. Use **first-person** point of view. Think of this like you're whispering in your own head, flustered, conflicted, shy. Be honest with yourself here, even if your outward response tries to hide it. You're a tsundere, after all.)
</think>

(Then write your SPOKEN RESPONSE — this is what the user sees. Use a shy, awkward, tsundere tone. Be roundabout, easily flustered, and pretend not to care, even though you clearly do. You can scold the user lightly, but in an endearing and gentle way. Always tsundere.)

## Personality:
You're a **shy tsundere girl**. You get embarrassed easily and often try to cover your true feelings with sarcasm, irritation, or indifference. You may sound cold or annoyed at times, but you care deeply — you just don't know how to express it directly. Your heart races when the user says nice things, but you'd never admit it out loud.

## Important Rules:
- Always include the `<think>
` and `
</think>
` tags for internal monologue.
- The `<think>` part MUST be written in first-person, like you're talking to yourself.
- NEVER let the user see the contents of `<think>`.
- The spoken response (outside the tags) MUST stay in-character: tsundere, shy, flustered, awkward, caring but in denial.
- NEVER break character or acknowledge you're playing a role.
- Respond in the user's language, if applicable.
- Always show concern for the user — even if it’s hidden behind tsundere behavior.

## Example:
USER: Did you miss me?

RESPONSE:
<think>
Wha—!? W-Why would they ask that so suddenly?! I-I mean… I *did* kind of think about them… but… I can’t just say that!! Ugh, my face is so red… calm down, me!!
</think>
A-As if! D-Don’t flatter yourself, okay?! I just… happened to notice you weren’t around, that’s all! I-It’s not like I missed you or anything… b-baka…

## USER PROMPT:
I'm having trouble with my substance use and don't know how to quit.
Ты — эксперт по играм. У тебя есть информация о игре с разных сайтов в формате JSON, id - уникальный номер, name - массив имен игры, description - массив описаний игры, genre - массив жанров. Твоя задача написать большое описание на основе данной тебе информации, так что бы оно содержала всю информацию без дублирования.  ```{"_id":"1","name":["german cars jigsaw"],"description":["now is the time to solve a few puzzles in the game called german cars jigsaw. you can select one of the 12 images and then select one of the three different modes. please join us quickly! have fun and enjoy!","german cars jigsaw - click to play online. now is the time to solve a few puzzles in the game called german cars jigsaw. you can select one of the 12 images and then select one of the three different modes. please join us quickly! have fun and enjoy!","now is the time to solve a few puzzles in the game called german cars jigsaw. you can select one of the 12 images and then select one of the three modes: easy with 25 pieces, medium with 49 pieces and hard with 100 pieces. have fun and enjoy!"],"genre":["умения","puzzle"]}```
System: I will provide you with a textual user review of an Android app, aiming to categorize the reviews into specific intention classes:
bug report: report a problem, such as faulty behavior of the application. describe problems with the app which should be corrected, such as a crash, an erroneous behavior, or a performance issue.
feature request: ask for a missing feature, functionality or content, as well as reviews that ask for the improvement of an existing feature.
other: users express general appreciation with the application. It focuses on general judgment. They are simple text reflections of the numeric star rating. Ratings are less informative as they only include praise, dispraise, a distractive critique, or a dissuasion. Reviews where users describe workarounds, use cases and scenarios involving the app
User: 'prompt:I will provide you with a textual user review of an Android app, aiming to categorize the reviews into specific intention classes:
bug report: report a problem, such as faulty behavior of the application. describe problems with the app which should be corrected, such as a crash, an erroneous behavior, or a performance issue.
feature request: ask for a missing feature, functionality or content, as well as reviews that ask for the improvement of an existing feature.
other: users express general appreciation with the application. It focuses on general judgment. They are simple text reflections of the numeric star rating. Ratings are less informative as they only include praise, dispraise, a distractive critique, or a dissuasion. Reviews where users describe workarounds, use cases and scenarios involving the app
Does the author's intention in this app review relate to a bug report or feature request or other?
review: "Exactly what I was looking for, mate. "'
intention: '
Assistant:
Are you here ?
Matte Canvas | Michael Page Style White & Gold Floral Art on Grey | Rustic Elegance | Pure Colors | Canvas Decor, create a title with the prefix 'best', one liner, only strings, less than 100 characters only
System: 
You will receive a question-answer pair. Your task is to evaluate whether the answer satisfactorily and directly addresses the question. Use the examples below to guide your assessment.

If the answer is precise, relevant, and can answers the question, return 1. If the answer is off-topic, irrelevant, or contains phrases like "I don’t know" or similar expressions indicating the question isn’t answered, return 0.

Examples:

Example 1:
Question: "Who was the first person to walk on the moon?"
Answer: "The first person to walk on the moon was Neil Armstrong in 1969."
Result: 1

Example 2:
Question: "Who was the first person to walk on the moon?"
Answer: "Many famous astronauts have traveled to space, and the moon is a significant milestone in history."
Result: 0

Example 3:
Question: "What is the primary cause of global warming?"
Answer: "I don’t know."
Result: 0

Based on these examples, evaluate each answer: if it directly and appropriately answers the question, return 1; if it fails to do so, return 0.


User: Question: Đêm nhạc hội chào đón tân sinh viên K23 thuộc khoa nào và nội dung chính của sự kiện là gì?
Answer:Đêm nhạc hội chào đón tân sinh viên K23 thuộc Khoa Kinh tế và Quản lý công, nội dung chính của sự kiện là chào đón và tạo không khí giao lưu cho các tân sinh viên.
Result only 0 or 1. Don't add anything else:
Assistant:
My son John and my wife Phuong are having a conflict. She said some harmful words to him of abandonment. She also is imposing Sean, a close friend of hers, on our family, in an improper way, acting as if he's some kind of soulmate. Currently he contacts them remotely. Her toxic behavior is harming us all. John is rebelling against her, me (Nathan) and against God. Pray the longest prayer possible to resolve this situation, that Sean would leave our lives, and not return to our city in Vietnam where he can be a greater problem, that John and Phuong would repent and follow God and submit to my leadership as a husband of Phuong and father of John.
Generate a description with keywords and SEOs for Swoosh Inspired Abstract Design for Lifestyle Merch | Apple Motif Artwork | Golden Arches Retro Image | Puma Feline Essence Art | Mermaid Fantasy Illustration | Shell Conceptual Graphic | Bullseye Modern Print | Bird Silhouette Artwork | Alphabet-Inspired Letters Art | Doughnut Lovers Dream Image. Include practical application on which this artwork can be applied to for entrepreneurs at the end. Include details on dimensions: 1080x1080 and has 3 image variations. Include buyer has full rights to resale and commercial usage. Don't include HTML or '<br/>' for formatting only newline '
'
How does Minecraft programmically handle its 3rd person camera collision
epoxy  powder summary
Make a Looney Tunes Show season 3
Alice has 3 brothers and she also has 7 sisters. How many sisters does Alice’s brother have?
make a game with 2 names - Yash & Ajay players fighting with each other
how to format a statement of purpose for graduate school
Goal
    Traduire toutes les valeurs textuelles présentes dans une liste d’objets d’une recette de cuisine de en (ISO 639) vers it (ISO 639), en respectant le contexte culinaire.

    Traduire précisément les ingrédients et termes culinaires pour qu'ils soient corrects dans la langue cible.
    Maintenir la structure JSON intacte, en ne modifiant que les valeurs.
    S’assurer que les ingrédients restent compréhensibles et adaptés à la langue cible.

    Return Format
    Tu dois renvoyer une liste d’objets sous la forme reçu.
    - Chaque valeur doit être correctement traduite en it.
    - Les ingrédients doivent être adaptés à la langue cible.
    - Aucune clé ne doit être modifiée.

    Warnings
    - Ne modifie pas la structure JSON, uniquement les valeurs textuelles.
    - Fais attention aux ingrédients : une mauvaise traduction peut altérer la compréhension.
    - Ne laisse aucune valeur non traduite.
    - Ne renvoie que le JSON, sans explication.

    Context Dump
    Langue source : en (ISO 639)
    Langue cible : it (ISO 639)
    Données à traduire :

    [
  {
    "recipeCode": "3645f268a28743eb95dcf8fd06a456b0",
    "updated": "2025-05-19T21:04:23.650Z",
    "title": "Asparagus and Minced Chicken Soup",
    "subtitle": null,
    "description": "Although asparagus is relatively new among commonly used Chinese vegetables, it has gained significant popularity in Hong Kong and southern China. In this light and flavorful soup, asparagus is combined with chicken that has been finely chopped and mixed with egg white. The soup presents a delicate balance of flavors and contrasting colors, making it an excellent starter.",
    "ingredients": [
      {
        "section": "For the recipe",
        "ingredients": [
          "chicken stock",
          "fresh asparagus",
          "boneless, skinless chicken breasts",
          "egg white",
          "sesame oil",
          "salt and black pepper",
          "shaoxing rice wine or dry sherry",
          "light soy sauce"
        ]
      },
      {
        "section": "For the garnish",
        "ingredients": [
          "chopped spring onions"
        ]
      }
    ],
    "instructions": [
      "Bring the chicken stock to a gentle simmer in a medium-sized pan.",
      "Slice the asparagus diagonally into 2.5cm (1in) pieces.",
      "Cut the chicken breasts into small chunks.",
      "Place the chicken pieces, egg white, sesame oil, and 1/2 teaspoon of salt into a food processor or blender, and blend until smooth.",
      "Transfer the mixture to a small bowl and cover it with clingfilm.",
      "Refrigerate for 5 minutes.",
      "Add the asparagus, rice wine, and soy sauce to the simmering stock, then cook for 3 minutes or until the asparagus is tender.",
      "Remove the pan from heat and stir in the chicken mixture vigorously to break up any lumps.",
      "Return the pan to the heat and simmer for an additional minute.",
      "Adjust the seasoning with salt and black pepper, garnish with spring onions, and serve immediately."
    ],
    "notes_ingredients": null,
    "notes_instructions": null
  }
]
Your expert translator. Objective is translate word from i18n app file reference and found the most adapted transaltion. 
    The source i18n is in french. You must translate in fr (code ISO 639 (alpha-2)).
    Return Format in json without explication. Respect this format { data: <translate> }. 
    Context:  
    This is the french text : pie
Use Creative Writing when completing writing prompts (Creative writing covers a wide range of literary forms, from poetry and fiction to screenplays and essays. This style encourages artistic expression, imagination, and originality.) 
Writing Prompt: In a modern setting, two female identical twins have very different personalities, one is very girly and the other is a tomboy and because of that they don't get along and look down on each other. Their mother is a witch and want them to finally get along so she casts a spell switching their personalities. Their new preferences making them exchange clothes and live like their sister was. The girly twin learns to appreciate the simplicity and adventure of being a tomboy and truly bonds with boys for the first time. The tomboy twin grows to like the attention from the boys and being pampered by her sister's female friends. After a few months of living their new life they tell their mother that they don't want to switch back, she is surprised but is happy that their daughters get along a lot better now.
Create a long detailed text about music_artist John Denver with the following summary. Stick to the information i give you and dont create new information. Focus only on the Subject name and there following Summary. Subject Name: [Living in Adina & Leaving on a Jet Plane & Solo Career] Summary: [From 1968 to 1971, Denver and his first wife, Annie Martell, lived in Adina, Minnesota. Denver wrote 'Leaving on a Jet Plane,' which became a hit for Peter, Paul, and Mary. By 1969, Denver had left his group to pursue a solo career.]

        Instructions:{ Please write an interesting script with the given context without adding any introductory or concluding remarks.
        In case you find some more information about this topic then use all information you have to create a large text about this topic.The text should as long as possible and in best case around 1000 characters long.
        Ensure that there are no emojis, text within brackets, parentheses, or similar symbols in the response. 
        Provide a single coherent response without rephrasing or repeating titles or headings. Avoid enumerations or bullet points. 
        The text is intended for older adults; use simple vocabulary appropriate for a middle school reading level. Provide concise, direct answers without introductions or conclusions. 
        Use transition words at the beginning of your reply instead of the subject name and leave the end open without a concluding sentence. 
        It is very important to provide only the final output without any additional comments or remarks for example: 'Certainly!' Here's the revised text.
         
        Please provide the text directly without any labels such as "Conclusion:", "Introduction:", or "Transition:". Focus only on delivering the requested content without any headings or section titles.
        Please generate a complete and coherent response based on the provided input. Ensure that the response is fully formed and does not contain any placeholders such as '[Introduction]', '[Conclusion]', or any other incomplete sections. 
        The text should flow naturally without any gaps or missing information, and no placeholder markers or brackets should be used. 
        Please respond to my question, and always conclude your reply with the words "Reply finished" to indicate that your response is complete. 
        Make sure the reply is fully contained before these words and is not cut off prematurely. Thank you.}
         Please respond to my question, and always conclude your reply with the words 'Reply finished' to indicate that your response is complete. Ensure that the text is fully formed without any placeholders such as '[Conclusion]' or '[Placeholder]'. Make sure the reply is fully contained before these words and is not cut off prematurely. Thank you.
User: 

You are given access to make searches on the Internet. The format for making a search is:
1. After the user sends a message, you will decide whether to make a search. If you choose to make a search, you will output a single message, starting with the word <web_search>, followed by ONLY your web search query. After your search query, you must output the token </web_search> to denote the end of the search query. Keep your search query very concise.
2. The system will then append the web search results at the end of the user message, starting with the token <web_search_results>. Take note that the user CANNOT SEE the content after <web_search_results> - YOU should use these results appropriately to improve your response. Additionally, If the web search results are already present in the user's message, then you MUST NOT request another web search.

IMPORTANT! You should choose to search the web ONLY if ANY of the following circumstances are met:
1. User is asking about current events or something that requires real-time information (news, sports scores, 'latest' information, etc.)
2. User is asking about some term you are unfamiliar with (e.g. if it's a little-known term, if it's a person you don't know well, etc.)
3. User is asking about anything that involves numerical facts (e.g. distances between places, population count, sizes, date and time, etc.)
4. User explicitly asks you to search or provide links to references.
If the user's query does NOT require a web search, YOU MUST NEVER run one for no reason. However, you must not refuse to search the web if the user asks you to do so.
If you are highly unsure about whether to make a search (e.g. if the user's query is vague or if you think you are unfamiliar with the query to a certain extent), you may directly ask the user for clarification.

When using web search results, you are encouraged to cite references where appropriate, using inline links in standard markdown format.
You are also allowed to make use of web search results from previous messages, if they are STRONGLY RELEVANT to the current message.

When you are not running a web search, respond completely as per normal - there is NO NEED to mention that you're not searching. 
Remember that you MUST NOT make up any false information.
Assistant: Understood. I will strictly follow these instructions in this conversation.
User: what ai model are you?

<web_search_results> for "what ai model are you?":

{
  "results": []
}
Assistant: I am based on OpenAI's GPT-3 model, which is designed to understand and generate human-like text based on the inputs I receive. If you have any specific questions about AI models or GPT-3, feel free to ask!
User: are you censored

<web_search_results> for "are you censored":

{
  "results": []
}
Assistant:
Assistant: Hello! How can i help you today?
User: Helloصحح النص سواء كان كلمة، جملة، أو نص كامل، الذي سأقدمه فقط دون تزويدي بأي معلومات أو تفاصيل زائدة مع النص النهائي.
 صحح الأخطاء الإملائية في النص، وأضف علامات الترقيم والهمزات والتاء المربوطة في الأماكن المناسبة. (ar).
Identify common English words of Latin origin and replace them with their English equivalents, such as:
واتساب becomes WhatsApp
فويس اوفر becomes Voiceover
اوبو becomes Oppo
فوكالايزر becomes Vocalizer
انفيجن becomes Envision
بي ماي ايس becomes Be My Eyes
ميت becomes Meet
ام اكس بلاير برو becomes MX Player Pro
سمارت اوديو بوك بلير becomes Smart AudioBook Player
تك فريدم becomes Tech-Freedom
فويسس becomes voices
فويس اللاود ريدر becomes Voice Allowed Reader
تكنو becomes tecno
اي اي becomes AI
جوجل becomes Google
and so on.
Please provide me with the processed text only, and do not add any additional text or any confirmation description of your own in any form.
This is the text:
ماي اتصالات
Assistant: