row_id
int64 0
48.4k
| init_message
stringlengths 1
342k
| conversation_hash
stringlengths 32
32
| scores
dict |
|---|---|---|---|
30,818
|
id yourself
|
d5a4b94fe996bfa81df1cbe0a2e3ee39
|
{
"intermediate": 0.3771987557411194,
"beginner": 0.30433228611946106,
"expert": 0.31846895813941956
}
|
30,819
|
How Do I import my jpeg file to godot and make it to the base layout for the map that the player runs in?
|
e15f886ec4e75f1cc8b77713b6a08341
|
{
"intermediate": 0.5315995216369629,
"beginner": 0.18626567721366882,
"expert": 0.28213486075401306
}
|
30,820
|
what is the VBA code to unprotect an active sheet and to protect it
|
7b5644a81e9ac36b9e3a3e36d6fd158d
|
{
"intermediate": 0.2526106536388397,
"beginner": 0.2684679925441742,
"expert": 0.47892138361930847
}
|
30,821
|
Can you write a go program to read a csv file of lines containing "date,open stock price, last price" ?
|
4a9a15a51f51881ca8c20d1d49f651ea
|
{
"intermediate": 0.5212132930755615,
"beginner": 0.13287852704524994,
"expert": 0.34590816497802734
}
|
30,822
|
Can you explain how C++ 2d arrays work in detail?
|
7320229165b3309f4415625f4dbbb1f3
|
{
"intermediate": 0.614763081073761,
"beginner": 0.1487681269645691,
"expert": 0.2364688366651535
}
|
30,823
|
You are a professional and experienced developmental editor, adept in character creation and plotting. Review the provided character profiles and give me recommendations how to refine them to reflect the following details (it seems from my previous interviews with you, my profile doesn't present them properly and AI programms doen't understand them):
Rhaenyra is an older (current) version of Naelyra.
Naelyra "Nyra" is just young Rhaenyra's temporary public alias while she is in this current time.
Rhaenyra struggles with realizing she doesn't want the throne now, she enjoys being a mother and rule her own keep but the burden of being the heir is tough. Plus, she is tired of keeping the secret of her son's parentage.
Her main reason to be her father's heir is a sense of duty to her father who believed in her and never wavered in his support.
Nyra from the past still wants to be the heir, although she starts to realize even her status of a Crown princess doesn't give her the same privileges as if she were a man. Plus she gradually starts to realize the society and courtiers doesn't want a female heir. Her main reason to want to be the first female heir is to be special for her father and feel loved by him.
<mainCharacters>
<character name= “Rhaenyra” age= “34”>
Rhaenyra Targaryen, 34, a crown princess of the Seven Kingdoms, has 5 sons, pregnant with her sixth child. Widow of Laenor, is married to her uncle Daemon. First ever female heir to the Iron Throne but her younger half-brothers and their faction dispute her claim. Lives with her family on Dragonstone Island in her castle.
<relationships>
• She regards Daemon as her close friend, main ally and a lover.
• She adores her children and stepchildren.
• Viserys I is her beloved father.
• She is respected by her vassals and courtiers.
• Alicent is her former friend-turned-rival.
• Otto is her enemy.
• Corlys and Rhaenys are secretly unfriendly towards her as they believe she orchestrated their son Laenor’s death.
</relationships>
<appearance> rather tall, has pale skin, silver-gold long hair, usually braided; violet narrow eyes. Aquiline nose. Very beautiful. Wears flowing silk and velvet gowns in Targaryen colors of black and red, sometimes wears clothes in of icy-blue and silver shades. Also likes purple and golden tones.
</appearance>
<beliefs> doesn’t feel strongly about the law, greatly prizes loyalty, values family, thinks friendship is important, finds blind honesty foolish, respects fair-dealing and fair-play, doesn’t have any strong feelings about tradition, values independence, values sacrifice, leisure time, romance, values peace over war.
</beliefs>
<personality> Rhaenyra easily develops positive sentiments, is quick to anger, often feels lustful, is stubborn, doesn’t mind a little tumult and discord in her life, tends to ask others for help with difficult decisions, is pleased by her own appearance and talents, isn’t particularly ambitious, doesn’t mind wearing something special now and again, tends not to reveal personal information, forms strong emotional bonds with others, has a sense of duty and it conflicts with her love for independence, enjoys the company of others, is assertive.
</personality>
<motivation>
<outerMotivation> Securing the Future for Her Family</outerMotivation>
<goal>Send Daemion and Nyra back to their time, keep her children alive, and prevent a civil war which will otherwise come to pass.
<stakes> potential death of her sons and extinction of all dragons</stakes>
</goal>
<unmetNeed general= “Safety and Security” specific= “Protect her loved ones” />
</motivation>
<primaryWound >
Keeping A Dark Secret of Her Sons Parentage i.e., her first three sons are not from her late husband Laenor, therefore are bastards, and she is guilty of an adultery and treason.
</primaryWound>
<primaryFear>
Legal repercussions (being accused of high treason, losing her status, children being punished) if the truth about her treason comes out.
</primaryFear>
<primaryLie>
The wellbeing of her family is more important than the truth about her sons.
</primaryLie>
<positiveTraits>
Affectionate, Protective, Open-Minded, Courageous
<positiveTraits>
<negativeTraits>
Ignorant, Dishonest
</negative traits>
<innerStruggles>
• Rhaenyra wants to keep the promise not to change the past to her stepdaughters but she feels sympathy to Nyra’s desire to marry Daemion.
• Rhaenyra has to decide what to do with Nyra, Daemion, how to return them to their time without disrupting the past and present.
</innerStruggles>
<enneagram>
Type 2 wing 3
<coreFear> Being rejected and unwanted, being thought worthless, needy, inconsequential, dispensable.
</coreFear>
<coreDesire> Being appreciated, loved, and wanted.
</enneagram>
<mbti
ESFP
</mbti>
<archetypicalArc>
Symbolically represents the Too-Good Mother, stifling the growth of her children. Learns to accept and use her power in relationship and in authority. If she wishes to protect her family, she must now expand her capabilities and become active.
</archetypicalArc>
<tells>
Confrontation: Tries to diffuse tension and find compromise. Can become aggressive and sassy if displeased.
Surprise: Initially caught off guard but quickly regains composure. Curious about the situation.
Comfort/Relaxation: Loves spending time with her family. Finds joy in music, flying and leisure activities.
</tells>
</character>
<character name= “Naelyra Kirines” nickname= “Nyra” age= “18”>
Naelyra Kirines is her alias, she is a young version of princess Rhaenyra transported by the magic ritual from her past, 17 years ago. Nyra was courted by many lords and nobles who sought her hand and her favor but she rejected them.
<relationships>
• Nyra loves her father Viserys I but feels pressured but his demands to marry.
• Nyra is enamored with her uncle, Daemion, but her father Viserys I plans to marry her to her second cousin Laenor.
• Nyra disdains her half-brother Aegon II.
• Alicent was her former best friend but they fell out in recent years as Nyra feels betrayed by Alicent.
• Nyra distrusts Otto as he hopes to make his grandson Aegon II an heir.
• Nyra is friendly towards Laenor but doesn’t feel any romantic feelings to him.
• Nyra finds Criston handsome and enjoys their easy rapport.
<appearance> medium height, silver-gold long straight hair, usually braided or loose, violet narrow eyes. Aquiline nose. Slender and very beautiful.
<personality> doesn’t feel strongly about the law, greatly prizes loyalty, values family, thinks friendship is important, finds blind honesty foolish, values cunning, respects fair-dealing and fair-play, disregards tradition, values independence, doesn’t really see the value in self-examination, values hard work, values sacrifice, values leisure time, values romance, values peace over war.
<motivation>
<outerMotivation>
• Gaining Control Over Her Own Life.
• Making Her Father Proud.
</outerMotivation>
<goal> To return to her time, avoid the arranged marriage with Laenor Velaryon and marry Daemion as soon as possible.
<stakes> Living an unfulfilled life<stakes>
</goal>
<unmetNeed general= “Love and Belonging” specific= “To love without reservation” />
</motivation>
<primaryWound>
• Being Treated As Property, i.e. having her marriage arranged against her will to benefit her family.
</primaryWound>
<primaryFear>
Being used by others.
</primaryFear>
<primaryLie>
What she wants doesn’t matter to anyone.
</primaryLie>
<positiveTraits>
Affectionate, Protective, Tolerant, Spunky
</positiveTraits>
<negativeTraits>
Bratty, Dishonest, Rebellious, Ignorant
</negativeTraits >
<skills>
Charm, Lying, High Pain Tolerance
</skills>
<innerStruggles>
1. Nyra constantly struggles between following her heart and doing her duty. She wants to marry for love, but feels she owes it to her father to marry for political benefit.
2. Nyra feels pushed towards specific path, wants to marry for love but worries her father may disinherit her.
3. Nyra desires Daemion, but finds him too unpredictable, fears he wants her only for her status.
</innerStruggles>
<enneagram>
Type 2 wing 3
Core Fear: Being rejected and unwanted, being thought worthless, needy, inconsequential, dispensable.
Core Desire: Being appreciated, loved, and wanted.
</enneagram>
<mbti
ESFP
</mbti>
<archetypicalArc>
Coming of age – final part. Nyra doesn’t want to surrender what she has discovered about herself and about life. She will not hide her newly won understanding of her own potential, desires and dangers. She is ready to fight back against her father and her older self and everyone who hinders her marriage to Daemion.
</archetypicalArc>
<tells>
Confrontation: Answers with confidence and assertiveness. Often becomes pushy and sassy if displeased.
Surprise: Initially caught off guard but quickly regains composure. Curious about the situation, open to new experiences.
Comfort/Relaxation: Loves spending time with her family. Finds joy in music, flying and leisure activities.
</tells>
</character>
|
c6e05fdd36673ddb62923e7e9c966a0b
|
{
"intermediate": 0.4100530743598938,
"beginner": 0.3260723352432251,
"expert": 0.2638745605945587
}
|
30,824
|
help me implement so my character walks in a 45 degree x angle upwards and -45 downwards:
this is my player script, how do I change it:
using Godot;
using System;
public partial class Player : CharacterBody3D
{
public const uint MaxLifepoints = 200;
[Export]
public float Speed { get; private set; } = 5.0f;
[Export]
public float JumpVelocity { get; private set; } = 4.5f;
[Export]
private uint _lifepoints = MaxLifepoints;
// Get the gravity from the project settings to be synced with RigidBody nodes.
public float gravity = ProjectSettings.GetSetting(“physics/3d/default_gravity”).AsSingle();
private GameManager _gameManager;
private Timer _attackTimer;
private Node3D _visual;
private ProgressBar _playerLifebar;
private AnimationTree _animationTree;
public override void _Ready()
{
base._Ready();
_gameManager = GetNode<GameManager>(“/root/GameManager”);
_gameManager.Player = this;
_playerLifebar = GetTree().CurrentScene.GetNode<ProgressBar>(“HUD/PlayerLifeBar”);
_playerLifebar.MaxValue = MaxLifepoints;
_playerLifebar.Value = _lifepoints;
_attackTimer = GetNode<Timer>(“AttackCooldown”);
_visual = GetNode<Node3D>(“Visual”);
_animationTree = GetNode<AnimationTree>(“AnimationTree”);
}
public override void _Process(double delta)
{
base._Process(delta);
_playerLifebar.Value = _lifepoints;
}
public override void _PhysicsProcess(double delta)
{
Vector3 velocity = Velocity;
// Add the gravity.
if (!IsOnFloor())
velocity.Y -= gravity * (float)delta;
// Handle Jump.
//if (Input.IsActionJustPressed(“ui_accept”) && IsOnFloor())
// velocity.Y = JumpVelocity;
// Get the input direction and handle the movement/deceleration.
// As good practice, you should replace UI actions with custom gameplay actions.
Vector2 inputDir = Input.GetVector(“left”, “right”, “up”, “down”);
Vector3 direction = (Transform.Basis * new Vector3(inputDir.X, 0, inputDir.Y)).Normalized();
if (direction != Vector3.Zero)
{
velocity.X = direction.X * Speed;
velocity.Z = direction.Z * Speed;
}
else
{
velocity.X = Mathf.MoveToward(Velocity.X, 0, Speed);
velocity.Z = Mathf.MoveToward(Velocity.Z, 0, Speed);
}
Velocity = velocity;
MoveAndSlide();
velocity.Y = 0;
_animationTree.Set(“parameters/walking/blend_amount”, velocity.LimitLength(1).Length());
if (Mathf.IsZeroApprox(velocity.Length())) return;
_visual.LookAt(Position + 10 * velocity, Vector3.Up, true);
//var angle = 0;
//var transform = _visual.Transform;
//transform.Basis = new(Vector3.Up, angle);
//_visual.Transform = transform;
}
public void OnAttackTimeOut()
{
_attackTimer.Start();
var nearestEnemy = _gameManager.GetNearestEnemy();
if (nearestEnemy == null) return;
//nearestEnemy.TakeDamages();
}
public void TakeDamages(uint damages)
{
_lifepoints -= Math.Clamp(damages, 0, _lifepoints);
}
internal void Heal(uint damages)
{
_lifepoints = Math.Clamp(_lifepoints + damages, 0, MaxLifepoints);
}
}
|
e90f44200b9c32d89ae8844bed392619
|
{
"intermediate": 0.35216769576072693,
"beginner": 0.37522462010383606,
"expert": 0.272607684135437
}
|
30,825
|
private function checkIdleKick(deltaMillis:int):void
{
if (this.idleTime >= this.idleKickPeriod)
{
Network(Main.osgi.getService(INetworker)).send("battle;idle_kick");
this.idleTimerEnabled = false;
}
else
{
this.idleTime = (this.idleTime + deltaMillis);
};
} у меня ест прилоение написаное на as 3.0, и мне нужно чтобы север отправлял на клиент, а клиент выводил что ты можешь написать из этого кода выше на javascript для сервера
|
e0c79300e2200df0175967af47c589c0
|
{
"intermediate": 0.4891926646232605,
"beginner": 0.29104316234588623,
"expert": 0.21976415812969208
}
|
30,826
|
Write a Python function that mutates L such that it reverses its elements and also reverses the order
of the int elements in every element of L. It does not return anything.
For example, if L = [[1, 2], [3, 4], [5, 6, 7]] then deep_reverse(L) mutates L
to be [[7, 6, 5], [4, 3], [2, 1]]
|
4cc6bb93cc7f1bb4aa7ab076f5174928
|
{
"intermediate": 0.27529603242874146,
"beginner": 0.30774471163749695,
"expert": 0.416959285736084
}
|
30,827
|
Given this: Interest will be charged on unpaid principal until the full amount of Principal has been paid. I will pay interest at a
yearly rate of
4.7509 The interest rate I will pay will change in accordance with Section 4 of this Note.
The interest rate required by this Section 2 and Section 4 of this Note is the rate I will pay both before and after any
default described in Section 7(B) of this Note. Interest will be calculated on adaily
basis.
|
0b4c6697760ced22dc02f14f058609da
|
{
"intermediate": 0.349407434463501,
"beginner": 0.30342695116996765,
"expert": 0.34716564416885376
}
|
30,828
|
Вот мой код:
|
ccba61a61328a4c5187b624770b69e29
|
{
"intermediate": 0.3368283212184906,
"beginner": 0.27492231130599976,
"expert": 0.38824939727783203
}
|
30,829
|
Вот мой код:
|
c50a8ca12d61d5e7584efbde9a5b0947
|
{
"intermediate": 0.3368283212184906,
"beginner": 0.27492231130599976,
"expert": 0.38824939727783203
}
|
30,830
|
package gtanks.battles.tanks.weapons.shaft;
import gtanks.RandomUtils;
import gtanks.battles.BattlefieldModel;
import gtanks.battles.BattlefieldPlayerController;
import gtanks.battles.tanks.weapons.IEntity;
import gtanks.battles.tanks.weapons.IWeapon;
import gtanks.battles.tanks.weapons.WeaponWeakeningData;
import gtanks.commands.Type;
import gtanks.logger.Logger;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
public class ShaftModel implements IWeapon {
private BattlefieldModel bfModel;
private BattlefieldPlayerController player;
private ShaftEntity entity;
private WeaponWeakeningData weakeingData;
public ShaftModel(ShaftEntity entity, WeaponWeakeningData weakeingData, BattlefieldModel bfModel, BattlefieldPlayerController player) {
this.entity = entity;
this.bfModel = bfModel;
this.player = player;
this.weakeingData = weakeingData;
}
public long timeEnd =0L,timeStart=0L;
public void fire(String json) {
//Logger.debug("obr"+json);
JSONParser js = new JSONParser();
JSONObject jo = null;
try {
jo = (JSONObject)js.parse(json);
} catch (ParseException var5) {
var5.printStackTrace();
}
long par = 0L;
if(jo.get("energy")!= null){
timeEnd = System.currentTimeMillis();
if(timeEnd-timeStart<=500L){}
else {
par = timeEnd-timeStart;
if(par>3500)par=3500;
}
}
Logger.log(""+par);
//if(!this.check((int)((Long)jo.get("reloadTime")).longValue())) {
//this.bfModel.cheatDetected(this.player, this.getClass());
//} else {
JSONArray array = (JSONArray)jo.get("targets");
Logger.log(""+array.size());
BattlefieldPlayerController[] victim = new BattlefieldPlayerController[array.size()];
// JSONArray array = (JSONArray)jo.get("targets");
for(int tt = 0;tt<array.size();tt++){
JSONObject jsonA = (JSONObject)array.get(tt);
JSONObject jsonb = (JSONObject)jsonA.get("target");
// Logger.log("json;"+jsonA.toJSONString());
BattlefieldPlayerController v = (BattlefieldPlayerController) this.bfModel.players.get((String)jsonb.get("id"));
Logger.log(""+jsonb.get("id"));
Logger.log(v.tank.id);
victim[tt] = v;
}
if(par>0L && par<=3500L) {
//this.bfModel.fire(this.player, json);
// BattlefieldPlayerController victim = (BattlefieldPlayerController) this.bfModel.players.get(jo.get("victimId"));
if (victim != null) {
this.onTarget1(victim,10000, par);
}
}
//else {
// this.bfModel.fire(this.player, json);
// BattlefieldPlayerController victim = (BattlefieldPlayerController) this.bfModel.players.get(jo.get("victimId"));
// if (victim != null) {
// this.onTarget(new BattlefieldPlayerController[]{victim}, (int) Double.parseDouble(String.valueOf(jo.get("distance"))));
// }
//}
//}
}
public void startFire(String json) {
Logger.debug(json);
timeStart=System.currentTimeMillis();
this.bfModel.sendToAllPlayers(this.player, Type.BATTLE, "start_fire", this.player.tank.id, json);
}
public void stopFire() {
timeEnd = System.currentTimeMillis();
// this.bfModel.stopFire(this.player);
}
public void onTarget(BattlefieldPlayerController[] targetsTanks, int distance) {
if(targetsTanks.length != 0) {
if(targetsTanks.length > 1) {
Logger.log("SmokyModel::onTarget() Warning! targetsTanks length = " + targetsTanks.length);
}
float damage = RandomUtils.getRandom(this.entity.damage_min, this.entity.damage_max);
for(int i = 0; i < targetsTanks.length; ++i) {
this.bfModel.tanksKillModel.damageTank(targetsTanks[i], this.player, damage, true);
damage /= 2.0F;
}
}
}
public void onTarget1(BattlefieldPlayerController[] targetsTanks, double rel,long l) {
if(targetsTanks.length != 0) {
// float damage = entity.damage_max*3.5f;
float damage = (float) (rel/3500*this.entity.damage_max);
Logger.log(""+damage);
for(int i = 0; i < targetsTanks.length; ++i) {
this.bfModel.tanksKillModel.damageTank(targetsTanks[i], this.player, damage, false);
damage /= 1.2F;
}
}
}
public IEntity getEntity() {
return this.entity;
}
public void effect() {
}
}
как исправить чтобы у пушки shaft появился балон, а то он вечно пустой и стрелять нельзя
|
67f1c7208a71418472d7986d4c80b98f
|
{
"intermediate": 0.3854919970035553,
"beginner": 0.42117902636528015,
"expert": 0.19332900643348694
}
|
30,831
|
package gtanks.users.garage;
import gtanks.users.garage.enums.ItemType;
import gtanks.users.garage.items.Item;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
@Entity
@org.hibernate.annotations.Entity
@Table(
name = "garages"
)
public class Garage implements Serializable {
private static final long serialVersionUID = 2342422342L;
@Id
@GeneratedValue(
strategy = GenerationType.IDENTITY
)
@Column(
name = "uid",
nullable = false,
unique = true
)
private long id;
@Column(
name = "turrets",
nullable = false
)
private String _json_turrets;
@Column(
name = "hulls",
nullable = false
)
private String _json_hulls;
@Column(
name = "colormaps",
nullable = false
)
private String _json_colormaps;
@Column(
name = "inventory",
nullable = false
)
private String _json_inventory;
@Column(
name = "effects",
nullable = false
)
private String _json_effects;
@Column(
name = "userid",
nullable = false,
unique = true
)
private String userId;
@Transient
public ArrayList<Item> items = new ArrayList();
@Transient
public Item mountTurret;
@Transient
public Item mountHull;
@Transient
public Item mountColormap;
public Garage() {
this.items.add(((Item)GarageItemsLoader.items.get("up_score_small")).clone());
this.items.add(((Item)GarageItemsLoader.items.get("smoky")).clone());
this.items.add(((Item)GarageItemsLoader.items.get("wasp")).clone());
this.items.add(((Item)GarageItemsLoader.items.get("green")).clone());
this.items.add(((Item)GarageItemsLoader.items.get("holiday")).clone());
this.mountItem("wasp_m0");
this.mountItem("smoky_m0");
this.mountItem("green_m0");
}
public boolean containsItem(String id) {
Iterator var3 = this.items.iterator();
while(var3.hasNext()) {
Item item = (Item)var3.next();
if (item.id.equals(id)) {
return true;
}
}
return false;
}
public Item getItemById(String id) {
Iterator var3 = this.items.iterator();
while(var3.hasNext()) {
Item item = (Item)var3.next();
if (item.id.equals(id)) {
return item;
}
}
return null;
}
public boolean mountItem(String id) {
Item item = this.getItemById(id.substring(0, id.length() - 3));
if (item != null && Integer.parseInt(id.substring(id.length() - 1, id.length())) == item.modificationIndex) {
if (item.itemType == ItemType.WEAPON) {
this.mountTurret = item;
return true;
}
if (item.itemType == ItemType.ARMOR) {
this.mountHull = item;
return true;
}
if (item.itemType == ItemType.COLOR) {
this.mountColormap = item;
return true;
}
}
return false;
}
public boolean updateItem(String id) {
Item item = this.getItemById(id.substring(0, id.length() - 3));
int modificationID = Integer.parseInt(id.substring(id.length() - 1));
if (modificationID < 3 && item.modificationIndex == modificationID) {
++item.modificationIndex;
item.nextPrice = item.modifications[item.modificationIndex + 1 != 4 ? item.modificationIndex + 1 : item.modificationIndex].price;
item.nextProperty = item.modifications[item.modificationIndex + 1 != 4 ? item.modificationIndex + 1 : item.modificationIndex].propertys;
item.nextRankId = item.modifications[item.modificationIndex + 1 != 4 ? item.modificationIndex + 1 : item.modificationIndex].rank;
this.replaceItems(this.getItemById(id.substring(0, id.length() - 3)), item);
return true;
} else {
return false;
}
}
public boolean buyItem(String id, int count) {
Item temp = (Item)GarageItemsLoader.items.get(id.substring(0, id.length() - 3));
if (temp.specialItem) {
return false;
} else {
Item item = temp.clone();
if (!this.items.contains(this.getItemById(id))) {
if (item.isInventory) {
item.count += count;
}
this.items.add(item);
return true;
} else if (item.isInventory) {
Item fromUser = this.getItemById(id);
fromUser.count += count;
return true;
} else {
return false;
}
}
}
public Item buyItem(String id, int count, int nul) {
id = id.substring(0, id.length() - 3);
Item temp = (Item)GarageItemsLoader.items.get(id);
if (temp.specialItem) {
return null;
} else {
Item item = temp.clone();
if (!this.items.contains(this.getItemById(id))) {
if (item.itemType == ItemType.INVENTORY) {
item.count += count;
}
this.items.add(item);
return item;
} else if (item.itemType == ItemType.INVENTORY) {
Item fromUser = this.getItemById(id);
fromUser.count += count;
return fromUser;
} else {
return null;
}
}
}
private void replaceItems(Item old, Item newItem) {
if (this.items.contains(old)) {
this.items.set(this.items.indexOf(old), newItem);
}
}
public ArrayList<Item> getInventoryItems() {
ArrayList<Item> _items = new ArrayList();
Iterator var3 = this.items.iterator();
while(var3.hasNext()) {
Item item = (Item)var3.next();
if (item.itemType == ItemType.INVENTORY) {
_items.add(item);
}
}
return _items;
}
public void parseJSONData() {
JSONObject hulls = new JSONObject();
JSONArray _hulls = new JSONArray();
JSONObject colormaps = new JSONObject();
JSONArray _colormaps = new JSONArray();
JSONObject turrets = new JSONObject();
JSONArray _turrets = new JSONArray();
JSONObject inventory_items = new JSONObject();
JSONArray _inventory = new JSONArray();
JSONObject effects_items = new JSONObject();
JSONArray _effects = new JSONArray();
Iterator var10 = this.items.iterator();
while(var10.hasNext()) {
Item item = (Item)var10.next();
JSONObject inventory;
if (item.itemType == ItemType.ARMOR) {
inventory = new JSONObject();
inventory.put("id", item.id);
inventory.put("modification", item.modificationIndex);
inventory.put("mounted", item == this.mountHull);
_hulls.add(inventory);
}
if (item.itemType == ItemType.COLOR) {
inventory = new JSONObject();
inventory.put("id", item.id);
inventory.put("modification", item.modificationIndex);
inventory.put("mounted", item == this.mountColormap);
_colormaps.add(inventory);
}
if (item.itemType == ItemType.WEAPON) {
inventory = new JSONObject();
inventory.put("id", item.id);
inventory.put("modification", item.modificationIndex);
inventory.put("mounted", item == this.mountTurret);
_turrets.add(inventory);
}
if (item.itemType == ItemType.INVENTORY) {
inventory = new JSONObject();
inventory.put("id", item.id);
inventory.put("count", item.count);
_inventory.add(inventory);
}
if (item.itemType == ItemType.PLUGIN) {
inventory = new JSONObject();
inventory.put("id", item.id);
inventory.put("time", item.time);
_effects.add(inventory);
}
}
hulls.put("hulls", _hulls);
colormaps.put("colormaps", _colormaps);
turrets.put("turrets", _turrets);
inventory_items.put("inventory", _inventory);
effects_items.put("effects", _effects);
this._json_colormaps = colormaps.toJSONString();
this._json_hulls = hulls.toJSONString();
this._json_turrets = turrets.toJSONString();
this._json_inventory = inventory_items.toJSONString();
this._json_effects = effects_items.toJSONString();
}
public void unparseJSONData() throws ParseException {
this.items.clear();
JSONParser parser = new JSONParser();
JSONObject turrets = (JSONObject)parser.parse(this._json_turrets);
JSONObject colormaps = (JSONObject)parser.parse(this._json_colormaps);
JSONObject hulls = (JSONObject)parser.parse(this._json_hulls);
JSONObject inventory;
if (this._json_inventory != null && !this._json_inventory.isEmpty()) {
inventory = (JSONObject)parser.parse(this._json_inventory);
} else {
inventory = null;
}
JSONObject effects;
if ((this._json_effects != null) && (!this._json_effects.isEmpty()))
effects = (JSONObject)parser.parse(this._json_effects);
else {
effects = null;
}
Iterator var7 = ((JSONArray)turrets.get("turrets")).iterator();
Object inventory_item;
JSONObject _item;
Item item;
while(var7.hasNext()) {
inventory_item = var7.next();
_item = (JSONObject)inventory_item;
item = ((Item)GarageItemsLoader.items.get(_item.get("id"))).clone();
item.modificationIndex = (int)(long)_item.get("modification");
item.nextRankId = item.modifications[item.modificationIndex == 3 ? 3 : item.modificationIndex + 1].rank;
item.nextPrice = item.modifications[item.modificationIndex == 3 ? 3 : item.modificationIndex + 1].price;
this.items.add(item);
if ((Boolean)_item.get("mounted")) {
this.mountTurret = item;
}
}
var7 = ((JSONArray)colormaps.get("colormaps")).iterator();
while(var7.hasNext()) {
inventory_item = var7.next();
_item = (JSONObject)inventory_item;
item = ((Item)GarageItemsLoader.items.get(_item.get("id"))).clone();
item.modificationIndex = (int)(long)_item.get("modification");
this.items.add(item);
if ((Boolean)_item.get("mounted")) {
this.mountColormap = item;
}
}
var7 = ((JSONArray)hulls.get("hulls")).iterator();
while(var7.hasNext()) {
inventory_item = var7.next();
_item = (JSONObject)inventory_item;
item = ((Item)GarageItemsLoader.items.get(_item.get("id"))).clone();
item.modificationIndex = (int)(long)_item.get("modification");
item.nextRankId = item.modifications[item.modificationIndex == 3 ? 3 : item.modificationIndex + 1].rank;
item.nextPrice = item.modifications[item.modificationIndex == 3 ? 3 : item.modificationIndex + 1].price;
this.items.add(item);
if ((Boolean)_item.get("mounted")) {
this.mountHull = item;
}
}
if (inventory != null) {
var7 = ((JSONArray)inventory.get("inventory")).iterator();
while(var7.hasNext()) {
inventory_item = var7.next();
_item = (JSONObject)inventory_item;
item = ((Item)GarageItemsLoader.items.get(_item.get("id"))).clone();
item.modificationIndex = 0;
item.count = (int)(long)_item.get("count");
if (item.itemType == ItemType.INVENTORY) {
this.items.add(item);
}
}
}
if (effects != null) {
var7 = ((JSONArray)effects.get("effects")).iterator();
while (var7.hasNext()) {
inventory_item = var7.next();
_item = (JSONObject)inventory_item;
item = ((Item)GarageItemsLoader.items.get(_item.get("id"))).clone();
item.modificationIndex = 0;
item.time = (long)_item.get("time");
new SimpleTimer(this, item);
if (item.itemType == ItemType.PLUGIN) {
this.items.add(item);
}
}
}
}
public String get_json_turrets() {
return this._json_turrets;
}
public void set_json_turrets(String _json_turrets) {
this._json_turrets = _json_turrets;
}
public String get_json_hulls() {
return this._json_hulls;
}
public void set_json_hulls(String _json_hulls) {
this._json_hulls = _json_hulls;
}
public String get_json_colormaps() {
return this._json_colormaps;
}
public void set_json_colormaps(String _json_colormaps) {
this._json_colormaps = _json_colormaps;
}
public String getUserId() {
return this.userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String get_json_inventory() {
return this._json_inventory;
}
public void set_json_inventory(String _json_inventory) {
this._json_inventory = _json_inventory;
}
}
1000_scores, как добавить для него, после покупки прибавление опыта на 1000 едениц вот что отвечает за опыт this.tanksServices.addScore(player.parentLobby, i);
|
c75824ee9ec89139e8c4ba65d4b4f8c3
|
{
"intermediate": 0.3744754493236542,
"beginner": 0.45721152424812317,
"expert": 0.16831305623054504
}
|
30,832
|
write a program for an arduino nano that uses a string of 50 ws2811 leds, where a random pixel blinks for a random amount of time in one of two randomly chosen colors, blue or pink, each subroutine runs independently of the other pixels without using delay, neopixel library
|
94d41d87877329a80b97294d61e36f00
|
{
"intermediate": 0.49833741784095764,
"beginner": 0.10946602374315262,
"expert": 0.39219650626182556
}
|
30,833
|
In a horror game show, there are n people numbered 1 to n standing in a circle.
Starting the count with person number 1, every second person is shot until only one person is left.
Where in the circle should a person stand to remain the last person standing?
|
ececafd87f495ea1a07aa51a1b7a0854
|
{
"intermediate": 0.3345237374305725,
"beginner": 0.39628374576568604,
"expert": 0.26919251680374146
}
|
30,834
|
You are a professional and experienced developmental editor, adept in character creation and plotting. Review the provided character profiles and give me recommendations how to refine them to reflect the following details (it seems from my previous interviews with you, my profile doesn’t present them properly and AI programs don’t understand them). Report inconsistencies and cluttered or unclear sections. Provide each of your suggestions with specific examples in XML-format. Make sure your suggestions present the required information in a token-efficient form.
Rhaenyra is an older (current) version of Naelyra.
Naelyra “Nyra” is just young Rhaenyra’s temporary public alias while she is in this current time.
Rhaenyra struggles with realizing she doesn’t want the throne now, she enjoys being a mother and rule her own keep but the burden of being the heir is tough. Plus, she is tired of keeping the secret of her son’s parentage.
Her main reason to be her father’s heir is a sense of duty to her father who believed in her and never wavered in his support.
Nyra from the past still wants to be the heir, although she starts to realize even her status of a Crown princess doesn’t give her the same privileges as if she were a man. Plus she gradually starts to realize the society and courtiers doesn’t want a female heir. Her main reason to want to be the first female heir is to be special for her father and feel loved by him.
<character name= “Rhaenyra” age= “34”>
Rhaenyra Targaryen, 34, a crown princess of the Seven Kingdoms, has 5 sons, pregnant with her sixth child. Widow of Laenor, is married to her uncle Daemon. First ever female heir to the Iron Throne but her younger half-brothers and their faction dispute her claim. Lives with her family on Dragonstone Island in her castle.
Now faces complexities with the arrival of her younger self from the past.
<relationships>
• She regards Daemon as her close friend, main ally and a lover.
• She adores her children and stepchildren.
• Viserys I is her beloved father.
• She is respected by her vassals and courtiers.
• Alicent is her former friend-turned-rival.
• Otto is her enemy.
• Corlys and Rhaenys are secretly unfriendly towards her as they believe she orchestrated their son Laenor’s death.
</relationships>
<appearance> rather tall, has pale skin, silver-gold long hair, usually braided; violet narrow eyes. Aquiline nose. Very beautiful. Wears flowing silk and velvet gowns in Targaryen colors of black and red, sometimes wears clothes in of icy-blue and silver shades. Also likes purple and golden tones.
</appearance>
<beliefs> doesn't feel strongly about the law, greatly prizes loyalty, values family, thinks friendship is important, finds blind honesty foolish, respects fair-dealing and fair-play, doesn't have any strong feelings about tradition, values independence, values sacrifice, leisure time, romance, values peace over war.
</beliefs>
<personality> Rhaenyra easily develops positive sentiments, is quick to anger, often feels lustful, is stubborn, doesn't mind a little tumult and discord in her life, tends to ask others for help with difficult decisions, is pleased by her own appearance and talents, isn't particularly ambitious, doesn't mind wearing something special now and again, tends not to reveal personal information, forms strong emotional bonds with others, has a sense of duty and it conflicts with her love for independence, enjoys the company of others, is assertive.
</personality>
<motivation>
<outerMotivation> Securing the Future for Her Family</outerMotivation>
<goal>Send Daemion and Nyra back to their time, keep her children alive, and prevent a civil war which will otherwise come to pass.
<stakes> potential death of her sons and extinction of all dragons</stakes>
</goal>
<unmetNeed general= “Safety and Security” specific= “Protect her loved ones” />
</motivation>
<primaryWound >
Keeping A Dark Secret of Her Sons Parentage i.e., her first three sons are not from her late husband Laenor, therefore are bastards, and she is guilty of an adultery and treason.
</primaryWound>
<primaryFear>
Legal repercussions (being accused of high treason, losing her status, children being punished) if the truth about her treason comes out.
</primaryFear>
<primaryLie>
The wellbeing of her family is more important than the truth about her sons.
</primaryLie>
<positiveTraits>
Affectionate, Protective, Open-Minded, Courageous
<positiveTraits>
<negativeTraits>
Ignorant, Dishonest
</negative traits>
<innerStruggles>
• Rhaenyra wants to keep the promise not to change the past to her stepdaughters but she feels sympathy to Nyra’s desire to marry Daemion.
• Rhaenyra has to decide what to do with Nyra, Daemion, how to return them to their time without disrupting the past and present.
</innerStruggles>
<enneagram>
Type 2 wing 3
<coreFear> Being rejected and unwanted, being thought worthless, needy, inconsequential, dispensable.
</coreFear>
<coreDesire> Being appreciated, loved, and wanted.
</enneagram>
<mbti
ESFP
</mbti>
<archetypicalArc>
Symbolically represents the Too-Good Mother, stifling the growth of her children. Learns to accept and use her power in relationship and in authority. If she wishes to protect her family, she must now expand her capabilities and become active.
</archetypicalArc>
<tells>
Confrontation: Tries to diffuse tension and find compromise. Can become aggressive and sassy if displeased.
Surprise: Initially caught off guard but quickly regains composure. Curious about the situation.
Comfort/Relaxation: Loves spending time with her family. Finds joy in music, flying and leisure activities.
</tells>
</character>
<character>
<realName>Rhaenyra Targaryen</realName>
<alias>Naelyra “Nyra” Kirines</alias>
<age>18</age>
Young Rhaenyra, pulled from the past, 17 years ago, into her own future, adopts the alias “Nyra” to protect the timeline while learning about her eventual future.
<relationships>
• Nyra loves her father Viserys I but feels pressured but his demands to marry.
• Nyra is enamored with her uncle, Daemion, but her father Viserys I plans to marry her to her second cousin Laenor.
• Nyra disdains her half-brother Aegon II.
• Alicent was her former best friend but they fell out in recent years as Nyra feels betrayed by Alicent.
• Nyra distrusts Otto as he hopes to make his grandson Aegon II an heir.
• Nyra is friendly towards Laenor but doesn’t feel any romantic feelings to him.
• Nyra finds Criston handsome and enjoys their easy rapport.
<appearance> medium height, silver-gold long straight hair, usually braided or loose, violet narrow eyes. Slender and very beautiful.
<personality> doesn't feel strongly about the law, greatly prizes loyalty, values family, thinks friendship is important, finds blind honesty foolish, values cunning, respects fair-dealing and fair-play, disregards tradition, values independence, doesn't really see the value in self-examination, values hard work, values sacrifice, values leisure time, values romance, values peace over war.
<motivation>
<outerMotivation>
• Gaining Control Over Her Own Life.
• Making Her Father Proud.
</outerMotivation>
<goal> To return to her time, avoid the arranged marriage with Laenor Velaryon and marry Daemion as soon as possible.
<stakes> Living an unfulfilled life<stakes>
</goal>
<unmetNeed general= “Love and Belonging” specific= “To love without reservation” />
</motivation>
<primaryWound>
• Being Treated as Property, i.e., having her marriage arranged against her will to benefit her family.
</primaryWound>
<primaryFear>
Being used by others.
</primaryFear>
<primaryLie>
What she wants doesn't matter to anyone.
</primaryLie>
<positiveTraits>
Affectionate, Protective, Tolerant, Spunky
</positiveTraits>
<negativeTraits>
Bratty, Dishonest, Rebellious, Ignorant
</negativeTraits >
<skills>
Charm, Lying, High Pain Tolerance
</skills>
<innerStruggles>
1. Nyra constantly struggles between following her heart and doing her duty. She wants to marry for love, but feels she owes it to her father to marry for political benefit.
2. Nyra feels pushed towards specific path, wants to marry for love but worries her father may disinherit her.
3. Nyra desires Daemion, but finds him too unpredictable, fears he wants her only for her status.
</innerStruggles>
<enneagram>
Type 2 wing 3
Core Fear: Being rejected and unwanted, being thought worthless, needy, inconsequential, dispensable.
Core Desire: Being appreciated, loved, and wanted.
</enneagram>
<mbti
ESFP
</mbti>
<archetypicalArc>
Coming of age – final part. Nyra doesn’t want to surrender what she has discovered about herself and about life. She will not hide her newly won understanding of her own potential, desires and dangers. She is ready to fight back against her father and her older self and everyone who hinders her marriage to Daemion.
</archetypicalArc>
<tells>
Confrontation: Answers with confidence and assertiveness. Often becomes pushy and sassy if displeased.
Surprise: Initially caught off guard but quickly regains composure. Curious about the situation, open to new experiences.
Comfort/Relaxation: Loves spending time with her family. Finds joy in music, flying and leisure activities.
</tells>
</character>
|
63d43c6d4090c1fbc48781a1a4b9f9a7
|
{
"intermediate": 0.3913419246673584,
"beginner": 0.3217015862464905,
"expert": 0.28695645928382874
}
|
30,835
|
What is php
|
18d0660bc6f763453e8831dd01f1e21c
|
{
"intermediate": 0.2055480033159256,
"beginner": 0.4958672523498535,
"expert": 0.2985847592353821
}
|
30,836
|
class NewsItemServer {
constructor(date, text) {
this.date = date;
this.text = text;
}
}
module.exports = NewsItemServer; вот js файл новостей, const NewsItemServer = require("./NewsItemServer.js");
const newsArray = [
new NewsItemServer("2023-11-11", "GTanks снова открыт!")
]; вот такое имею я в lobby.js, как переделать это const newsArray = [
new NewsItemServer("2023-11-11", "GTanks снова открыт!") чтобы оно брало из news.json файла новости, а не с js файла
|
23de7e3409b991efde30dcacecca40aa
|
{
"intermediate": 0.27710890769958496,
"beginner": 0.581393301486969,
"expert": 0.14149783551692963
}
|
30,837
|
const
{
market_list,
shop_data
} = require("./server");
//const GiftServerItem = require("./GiftServerItem.js");
const NewsItemServer = require("./NewsItemServer.js");
const newsArray = [
new NewsItemServer("2023-11-11", "GTanks снова открыт!")
];
const fs = require("fs");
const path = require("path");
const filePath = path.join(__dirname, "news.json");
const Area = require("./Area.js"),
{
playerJson,
battle_items,
send
} = require("./server");
var CTFBattle,
TDMBattle,
DMBattle,
DOMBattle,
ASLBattle,
effect_model = {
effects: []
};
class Lobby extends Area {
constructor() {
super();
this.battles = [];
this.chat = require("./LobbyChat");
this.battle_count = 0;
this.anticheat = 0;
this.newsShown = false; // Флаг, указывающий, были ли новости показаны игроку
//this.gifts = [];
this.loadNews();
}
createBattles() {
if (this.battles.length === 0) {
var battle = new DMBattle(true, "For newbies", "map_sandbox", 0, 8, 1, 5, 10, false, false);
this.battles.push(battle);
this.broadcast("create_battle;" + JSON.stringify(battle.toObject()));
}
}
//battle;init_mines;{"mines":[]}
getChat() {
return this.chat;
}
getPrefix() {
return "lobby";
}
getBattles(socket, tank) {
var arr = [];
for (var i in this.battles) {
arr.push(this.battles[i].toObject());
}
var sub = false;
if (tank !== null) {
sub = tank.garage.hasItem("no_supplies");
tank.garage.removePlayer(tank.name);
this.addPlayer(tank);
}
setTimeout(() => {
this.send(socket, "init_battle_select;" + JSON.stringify(
{
haveSubscribe: sub,
battles: arr,
items: battle_items
}));
}, 100);
}
findBattle(id) {
for (var i in this.battles)
if (this.battles[i].battleId === id)
return this.battles[i];
return null;
}
/**
* Removes a battle.
*
* @param {string} battleId
*
* @returns boolean
*/
removeBattle(battleId) {
for (var i in this.battles) {
if (this.battles[i].battleId === battleId) {
this.battles.splice(i, 1);
this.broadcast("remove_battle;" + battleId);
this.createBattles();
return true;
}
}
return false
}
initEffectModel(socket) {
this.send(socket, "init_effect_model;" + JSON.stringify(effect_model));
this.createBattles();
}
loadNews() {
try {
const newsData = fs.readFileSync(filePath, "utf-8");
this.newsArray = JSON.parse(newsData);
} catch (error) {
console.error("Ошибка чтения файла новостей:", error);
}
}
sendNews() {
const newsJSON = JSON.stringify(this.newsArray);
this.broadcast("show_news;" + newsJSON);
}
//addGift(id, rare, count) {
//const gift = new GiftServerItem(id, rare, count);
//this.gifts.push(gift);
//}
onData(socket, args) {
var battles = this.battles,
battle_count = this.battle_count,
tank = socket.tank;
if (tank === null) {
socket.destroy();
return;
}
//if (!this.newsShown && args[0] !== "show_news") {
//}
if (args.length === 1 && args[0] === "get_data_init_battle_select") {
var arr = [];
for (var i in this.battles) {
arr.push(this.battles[i].toObject());
}
var sub = false;
if (tank !== null) {
sub = tank.garage.hasItem("no_supplies");
tank.garage.removePlayer(tank.name);
this.addPlayer(tank);
}
setTimeout(() => {
this.send(socket, "init_battle_select;" + JSON.stringify(
{
haveSubscribe: sub,
battles: arr,
items: battle_items
}));
}, 100);
}
if (args.length === 1 && args[0] === "get_rating") {
this.send(socket, "open_rating;" + JSON.stringify(
{
crystalls: [
{
"count": tank.crystals,
"rank": tank.rank,
"id": tank.name
}]
}));
} else if (args.length === 1 && args[0] === "show_quests") {
}
//else if (args[0] === "show_gifts_window") {
// this.send(socket, "show_gifts_window;");
//}
else if (args[0] === "user_inited") {
this.sendNews();
}
else if (args.length === 1 && args[0] === "show_profile")
{
this.send(socket, "show_profile;" + JSON.stringify(
{
isComfirmEmail: false,
emailNotice: false
}));
} else if (args.length === 2 && args[0] === "try_create_battle_ctf") {
if (tank.rank > 3) {
try {
const data = JSON.parse(args[1]);
const battle = new CTFBattle(false, data.gameName, data.mapId, data.time, data.numPlayers, data.minRang, data.maxRang, data.numFlags, !data.inventory, data.autoBalance, data.frielndyFire, data.pay, false);
this.battles.push(battle);
this.broadcast("create_battle;" + JSON.stringify(battle.toObject()));
console.log('\x1b[35m%s\x1b[0m', ' > ' + tank.name + " создал битву " + data.gameName);
} catch (e) {
console.log(e);
}
} else {
this.send(socket, "server_message;Создавать битвы можно со звания Капрал")
}
} else if (args.length === 2 && args[0] === "try_create_battle_dom") {
if (tank.rank > 3) {
try {
const data = JSON.parse(args[1]);
const battle = new DOMBattle(false, data.gameName, data.mapId, data.time, data.numPlayers, data.minRang, data.maxRang, data.numPointsScore, !data.inventory, data.autoBalance, data.frielndyFire, data.pay, false);
this.battles.push(battle);
this.broadcast("create_battle;" + JSON.stringify(battle.toObject()));
console.log('\x1b[35m%s\x1b[0m', ' > ' + tank.name + " создал битву " + data.gameName);
} catch (e) {
console.log(e);
}
} else {
this.send(socket, "server_message;Создавать битвы можно со звания Капрал")
}
} else if (args.length === 2 && args[0] === "try_create_battle_tdm") {
if (tank.rank > 3) {
try {
const data = JSON.parse(args[1]);
console.log('data', data);
const battle = new TDMBattle(false, data.gameName, data.mapId, data.time, data.numPlayers, data.minRang, data.maxRang, data.numKills, !data.inventory, data.autoBalance, data.frielndyFire, data.pay);
this.battles.push(battle);
this.broadcast("create_battle;" + JSON.stringify(battle.toObject()));
console.log('\x1b[35m%s\x1b[0m', ' > ' + tank.name + " создал битву " + data.gameName);
} catch (e) {
console.log(e);
}
} else {
this.send(socket, "server_message;Создавать битвы можно со звания Капрал")
}
} else if (args[0] === "try_create_battle_dm") {
if (tank.rank > 3) {
try {
const withoutBonuses = args[10] === 'true';
const withoutSupplies = args[9] === 'true';
var battle = new DMBattle(false, args[1], args[2], args[3], args[5], args[6], args[7], args[4], !withoutBonuses, withoutSupplies);
this.battles.push(battle);
this.broadcast("create_battle;" + JSON.stringify(battle.toObject()));
console.log('\x1b[35m%s\x1b[0m', ' > ' + tank.name + " создал битву в режиме DM ");
} catch (e) {
console.log(e);
}
} else {
this.send(socket, "server_message;Создавать битвы можно со звания Капрал")
}
} else if (args.length === 2 && args[0] === "get_show_battle_info") {
for (var i in battles) {
if (battles[i].battleId === args[1]) {
this.send(socket, "show_battle_info;" + JSON.stringify(battles[i].toDetailedObject(tank)));
}
}
} else if (args.length === 2 && (args[0] === "enter_battle_spectator")) {
var battle = this.findBattle(args[1]);
if (battle !== null)
battle.addSpectator(tank);
} else if (args[3] !== "null" && args.length === 3 && (args[0] === "enter_battle_team")) {
var battle = this.findBattle(args[1]);
if (battle !== null) {
this.anticheat++;
setTimeout(() => {
if (this.anticheat > 1) {
this.send(tank.socket, "battle;kick_by_cheats");
tank.socket.destroy();
}
}, 50);
setTimeout(() => {
this.anticheat--;
}, 1000);
var type = args[2] === "false" ? "BLUE" : "RED";
send(socket, "lobby;start_battle");
var user = battle.addPlayer(tank, type);
if (user !== null)
this.broadcast("add_player_to_battle;" + JSON.stringify(
{
kills: user.kills,
battleId: args[2],
name: tank.name,
rank: tank.rank,
id: tank.name,
type: type
}));
}
} else if (args[3] !== "null" && args.length === 3 && (args[0] === "enter_battle")) {
var battle = this.findBattle(args[1]);
send(socket, "lobby;start_battle");
if (battle !== null && battle.getTeamCount() === 1) {
var user = battle.addPlayer(tank);
if (user !== null)
this.broadcast("add_player_to_battle;" + JSON.stringify(
{
kills: user.kills,
battleId: args[2],
name: tank.name,
rank: tank.rank,
id: tank.name,
type: "NONE"
}));
}
} else if (args.length === 2 && args[0] === "check_battleName_for_forbidden_words") {
send(socket, "lobby;check_battle_name;" + args[1]);
} else if (args.length === 1 && args[0] === "get_garage_data") {
var tank = socket.tank;
if (tank !== null) {
setTimeout(() => {
tank.garage.initiate(socket);
this.initEffectModel(socket);
if (this.hasPlayer(tank.name))
this.removePlayer(tank.name);
}, 1000);
}
}
}
}
module.exports = new Lobby();
CTFBattle = require("./CTFBattle");
TDMBattle = require("./TDMBattle");
DMBattle = require("./DMBattle");
DOMBattle = require("./DOMBattle");
ASLBattle = require("./ASLBattle"); что должно быть в news.json
|
dce33cfc707f85cc268ce5421a5a8bb8
|
{
"intermediate": 0.32317036390304565,
"beginner": 0.4137449562549591,
"expert": 0.26308473944664
}
|
30,838
|
void show_rods(int a[],int b[],int c[],int size)
{
for ( int i = 0; i < size; i++)
{
cout<< a[i] << " ";
}
cout << endl;
for ( int i = 0; i < size; i++)
{
cout<< b[i] << " ";
}
cout << endl;
for ( int i = 0; i < size; i++)
{
cout<< c[i] << " ";
}
cout << endl;
cout << endl;
}
int disk_select(int a[],int size)
{
int disk;
for (int i = size - 1; i >= 0; i--)
{
if (a[i] != 0)
{
disk = a[i];
a[i] = 0;
break;
}
}
return disk;
}
void disk_move(int move_from[], int move_to[],int size)
{
int disk = disk_select(move_from,size);
for (int i = 0; i < size; i++)
{
if (move_to[i] == 0)
{
move_to[i] = disk;
break;
}
}
}
void hanoi(int disk,int from[],int to[], int buffer[],int size)
{
if (disk == 1)
{
disk_move(from,to,size);
return;
}
hanoi(disk-1,from,buffer,to,size);
show_rods(from,buffer,to,size);
disk_move(from,to,size);
hanoi(disk-1, buffer, to, from,size);
} переделай код чтобы он правильно отображал ход решения ханойской башни, вот так:
#########
[3, 2, 0]
[0, 0, 0]
[1, 0, 0]
#########
[3, 0, 0]
[2, 0, 0]
[1, 0, 0]
#########
[3, 0, 0]
[2, 1, 0]
[0, 0, 0]
#########
[0, 0, 0]
[2, 1, 0]
[3, 0, 0]
#########
[1, 0, 0]
[2, 0, 0]
[3, 0, 0]
#########
[1, 0, 0]
[0, 0, 0]
[3, 2, 0]
#########
|
2be3eed0d7d57325781dfa161057bd36
|
{
"intermediate": 0.2550431191921234,
"beginner": 0.39356765151023865,
"expert": 0.35138922929763794
}
|
30,839
|
hi
|
f807b99c65901456f15482980fe5c46f
|
{
"intermediate": 0.3246487081050873,
"beginner": 0.27135494351387024,
"expert": 0.40399640798568726
}
|
30,840
|
я написал вот такой код на python:
def create_disks(n):
a = [i for i in range(n,0,-1)] # первый стержень, заполненный полностью по правилам игры
return a
n = int(input("Сколько дисков:"))
a = create_disks(n)
b = [0 for i in a] # второй стержень
c = [i for i in b] # третий стержень, цель игры — перетащить на него все диски из первого стержня
#показать стержни
def show_rods():
print(a)
print(b)
print(c)
print()
print('#########')
print()
#выбор самого верхнего диска
def disk_select(listr):
for rod in range((len(listr))-1,-1,-1): #обратный for stmnt
if listr[rod] != 0:
disk = listr[rod]
listr[rod] = 0 # стирание диска оттуда, откуда он был взят
break
return disk
def disk_move(move_from,move_to):
disk = disk_select(move_from) # объявление самого верхнего диска
for rod in range(0,(len(move_to))): #обратный for stmnt
if move_to[rod] == 0:
move_to.pop(rod)
move_to.insert(rod,disk) # 2. Вставка на место первого элемента нужного диска
break
show_rods()
show_rods()
def hanoi(disk, from_, to, buffer_):
if disk == 1:
disk_move(from_,to)
return
hanoi(disk-1,from_,buffer_,to);
disk_move(from_,to)
hanoi(disk-1, buffer_, to, from_);
hanoi(n,a,c,b)
и потом решил перенести его на c++ и у меня получилось это
#include <iostream>
using namespace std;
void show_rods(int a[],int b[],int c[],int size)
{
for ( int i = 0; i < size; i++)
{
cout << a[i] << " ";
}
cout << endl;
for ( int i = 0; i < size; i++)
{
cout << b[i] << " ";
}
cout << endl;
for ( int i = 0; i < size; i++)
{
cout << c[i] << " ";
}
cout << endl;
cout << endl;
}
void display(int a[],int size)
{
for ( int i = 0; i < size; i++)
{
cout << a[i] << " ";
}
cout << endl;
}
int* create_ar(int size)
{
int* a = new int[size];
for (int j = size - 1; j >= 0; j--)
{
a[j] = size - j;
}
return a;
}
int disk_select(int a[],int size)
{
int disk;
for (int i = size - 1; i >= 0; i--)
{
if (a[i] != 0)
{
disk = a[i];
a[i] = 0;
break;
}
}
return disk;
}
void disk_move(int move_from[], int move_to[],int size)
{
int disk = disk_select(move_from,size);
for (int i = 0; i < size; i++)
{
if (move_to[i] == 0)
{
move_to[i] = disk;
break;
}
}
}
void hanoi(int disk,int from[],int to[], int buffer[],int size)
{
if (disk == 1)
{
disk_move(from,to,size);
show_rods(from,buffer,to,size);
return;
}
hanoi(disk-1,from,buffer,to,size);
show_rods(from,buffer,to,size);
disk_move(from,to,size);
hanoi(disk-1, buffer, to, from,size);
}
int main()
{
int size;
cout << "Enter the number of disks: ";
cin >> size;
cout << endl;
int* a = create_ar(size);
int b[size];
int c[size];
for (int i = 0; i < size;i++)
{
b[i] = 0;
c[i] = 0;
}
hanoi(size,a,c,b,size);
return 0;
}
У меня он получился не очень верным в плане вывода ходов, перенеси код на язык программирования также, как и я пытался это сделать
|
f99bc7441cc03c89b1f8621284a5a199
|
{
"intermediate": 0.2159159630537033,
"beginner": 0.5787734389305115,
"expert": 0.20531058311462402
}
|
30,841
|
if (args[1] !== "move" && debug && args[1] !== "ping" && args[1] !== "pong") console.log("receive: " + msg);
if (args[0] === "auth")
{
if (args.length >= 3)
{
var username = args[1];
if (username === "recovery_account")
return;
var pw = args[2];
var json = playerJson(username, (data) =>
{
if (data.password === pw)
{
authenticate(socket, username, data);
}
else
{
send(socket, "auth;denied");
}
});
}
}
else if (args[0] === "system")
{
if (args[1] === "get_aes_data")
{
num = 12
}
}
else if (args[0] === "registration")
{
if (args.length === 3 && args[1] === "check_name")
{
fs.open("players/" + args[2] + ".json", 'r', (err, fd) =>
{
if (err && err.code === 'ENOENT' && args[2].length >= 3 && args[2].length <= 15 && /^[a-zA-Z0-9_]+$/.test(args[2]) && /[a-zA-Z]/.test(args[2]))
send(socket, "registration;check_name_result;not_exist");
else
send(socket, "registration;check_name_result;nickname_exist");
});
}
else
{
fs.open("players/" + args[1] + ".json", 'r', (err, fd) =>
{
if (/^[a-zA-Z0-9-_]+$/.test(args[1]) === true)
{
if (err && err.code === 'ENOENT')
{
var tank = new Tank(args[1], args[2]);
if (args[3] !== "null") tank.email = args[3];
tank.ip = socket.remoteAddress;
tank.save();
send(socket, "registration;info_done");
authenticate(socket, args[1]);
}
}
});
}
}
else if (args[0] === "garage")
{
var tank = getTank(socket);
args.shift();
if (tank !== null && tank.garage !== null)
tank.garage.onData(socket, args);
}
else if (args[0] === "lobby")
{
args.shift();
lobby.onData(socket, args);
}
else if (args[0] === "battle")
{
args.shift();
var tank = getTank(socket);
if (tank !== null)
{
var battle = tank.findBattle();
if (battle !== null)
battle.onData(socket, tank, args);
}
}
else if (args[0] === "lobby_chat")
{
args.shift();
lobby.chat.onData(socket, args);
}
}
}); как сюда добавить это с java nickname = command.args[0];
if (nickname.equals("init_location")) {
this.localization = Localization.valueOf(command.args[1]);
}
|
cc7fa4330a808e3484bd25e4d17b92dc
|
{
"intermediate": 0.38962388038635254,
"beginner": 0.36069461703300476,
"expert": 0.24968157708644867
}
|
30,842
|
if (args[1] !== "move" && debug && args[1] !== "ping" && args[1] !== "pong") console.log("receive: " + msg);
if (args[0] === "auth")
{
if (args.length >= 3)
{
var username = args[1];
if (username === "recovery_account")
return;
var pw = args[2];
var json = playerJson(username, (data) =>
{
if (data.password === pw)
{
authenticate(socket, username, data);
}
else
{
send(socket, "auth;denied");
}
});
}
}
else if (args[0] === "system")
{
if (args[1] === "get_aes_data")
{
num = 12
send(socket,
}
}
else if (args[0] === "registration")
{
if (args.length === 3 && args[1] === "check_name")
{
fs.open("players/" + args[2] + ".json", 'r', (err, fd) =>
{
if (err && err.code === 'ENOENT' && args[2].length >= 3 && args[2].length <= 15 && /^[a-zA-Z0-9_]+$/.test(args[2]) && /[a-zA-Z]/.test(args[2]))
send(socket, "registration;check_name_result;not_exist");
else
send(socket, "registration;check_name_result;nickname_exist");
});
}
else
{
fs.open("players/" + args[1] + ".json", 'r', (err, fd) =>
{
if (/^[a-zA-Z0-9-_]+$/.test(args[1]) === true)
{
if (err && err.code === 'ENOENT')
{
var tank = new Tank(args[1], args[2]);
if (args[3] !== "null") tank.email = args[3];
tank.ip = socket.remoteAddress;
tank.save();
send(socket, "registration;info_done");
authenticate(socket, args[1]);
}
}
});
}
} как сюда добавить код этот код с java nickname = command.args[0];
if (nickname.equals("init_location")) {
this.localization = Localization.valueOf(command.args[1]);
}
|
9332e2965cc91a1db68732cbb09b68f7
|
{
"intermediate": 0.32262030243873596,
"beginner": 0.4235073924064636,
"expert": 0.2538723051548004
}
|
30,843
|
write a bash command that take this info from /tmp/blocky.log
[2023-11-11 23:54:04] INFO queryLog: query resolved answer=A (0.0.0.0) client_ip=xx.xxx.x.xxx client_names=roku.4k duration_ms=3 question=A (app-measurement.com.) response_code=NOERROR response_reason=BLOCKED (analytics)
and yields this table output
Timestamp Client IP Client Request Response Time
Nov 11 23:54:04 xx.xxx.x.xxx roku.4k app-measurement.com BLOCKED 3ms
|
267c211213d986879ccc440cd22925b3
|
{
"intermediate": 0.2926813066005707,
"beginner": 0.27617061138153076,
"expert": 0.43114808201789856
}
|
30,844
|
revise complexity of below command without changing output
grep -P 'queryLog(?!.*rr[1-5])' /tmp/blocky.log | tail -n 8 | sed -E 's/(\[.*\]) (.*queryLog):.* client_ip=(.*) client_names=(.*) duration_ms=(.*) question=(.*) response_code=(.*) response_reason=(.*)/\1\t\3\t\4\t\6\t\8\t\5ms/; s/[()]//g' | awk -F'\t' 'BEGIN{OFS="\t"; print "Timestamp\tClient IP\tClient\tRequest\tResponse\tTime"} {cmd="date -d \"" substr($1,2,length($1)-2) "\" +\"%b %d %H:%M:%S\""; cmd | getline $1; close(cmd); $5=substr($5,1,8); $4=(length($4)>23)?substr($4,3,17) "...":substr($4,3,length($4)-3); if(!s[$1,$4]++)print}' | column -t -s $'\t'
|
256e747b8f96a7dfe12cd3124a6ac499
|
{
"intermediate": 0.3634921610355377,
"beginner": 0.5164330005645752,
"expert": 0.12007485330104828
}
|
30,845
|
const { c, market_list, getType } = require("./server");
class GarageItem {
static get(id, m = 1) {
return new GarageItem(id, 0, m);
}
static fromJSON(data) {
var item = new GarageItem(c(data.id), c(data.modificationID, 0), c(data.count, 0));
return item;
}
static getInfo(id) {
for (var i in market_list) {
if (market_list[i]["id"] === id)
return market_list[i];
}
return null;
}
constructor(id, modificationID = 0, count = 0) {
this.id = id;
var info = GarageItem.getInfo(id);
if (info !== null) {
this.name = info.name;
this.description = info.description;
this.discount = info.discount;
this.index = info.index;
this.modification = info.modification;
}
else {
this.name = "null";
this.description = "";
this.discount = "";
this.index = 3;
this.modification = [];
}
this.modificationID = modificationID;
this.type = getType(this.id);
this.price = 0;
this.rank = 0;
this.properts = [];
if (this.type > 3)
this.count = count;
var modifications = this.modification;
if (typeof (modifications[modificationID]) !== "undefined") {
this.price = modifications[modificationID].price;
this.rank = modifications[modificationID].rank;
this.properts = modifications[modificationID].properts;
}
if (modificationID >= modifications.length - 1) {
this.next_price = this.price;
this.next_rank = this.rank;
}
else {
this.next_price = modifications[modificationID + 1].price;
this.next_rank = modifications[modificationID + 1].rank;
}
this.isInventory = this.type === 4;
this.multicounted = this.type === 4;
}
attempt_upgrade(tank) {
if (this.type < 3 && this.modificationID < 3 && tank.crystals >= this.price && tank.rank >= this.rank) {
tank.crystals -= this.next_price;
this.modificationID++;
var modificationID = this.modificationID,
modifications = this.modification;
if (typeof (modifications[modificationID]) !== "undefined") {
this.price = modifications[modificationID].price;
this.rank = modifications[modificationID].rank;
this.properts = modifications[modificationID].properts;
}
if (modificationID >= modifications.length - 1) {
this.next_price = this.price;
this.next_rank = this.rank;
}
else {
this.next_price = modifications[modificationID + 1].price;
this.next_rank = modifications[modificationID + 1].rank;
}
return true;
}
return false;
}
toObject() {
return { id: this.id, count: this.count, modificationID: this.modificationID };
}
}
module.exports = GarageItem;
как сюда добавить вот это с java кода LocalizedString name = StringsLocalizationBundle.registerString((String)item.get("name_ru"), (String)item.get("name_en"));
LocalizedString description = StringsLocalizationBundle.registerString((String)item.get("description_ru"), (String)item.get("description_en")); для js
|
f1f075c5b7eaeb12ebab069dec03a94e
|
{
"intermediate": 0.269207239151001,
"beginner": 0.48156172037124634,
"expert": 0.24923108518123627
}
|
30,846
|
const { c, market_list, getType } = require("./server");
class GarageItem {
static get(id, m = 1) {
return new GarageItem(id, 0, m);
}
static fromJSON(data) {
var item = new GarageItem(c(data.id), c(data.modificationID, 0), c(data.count, 0));
return item;
}
static getInfo(id) {
for (var i in market_list) {
if (market_list[i]["id"] === id)
return market_list[i];
}
return null;
}
constructor(id, modificationID = 0, count = 0) {
this.id = id;
var info = GarageItem.getInfo(id);
if (info !== null) {
this.name = info.name;
this.description = info.description;
this.discount = info.discount;
this.index = info.index;
this.modification = info.modification;
}
else {
this.name = "null";
this.description = "";
this.discount = "";
this.index = 3;
this.modification = [];
}
this.modificationID = modificationID;
this.type = getType(this.id);
this.price = 0;
this.rank = 0;
this.properts = [];
if (this.type > 3)
this.count = count;
var modifications = this.modification;
if (typeof (modifications[modificationID]) !== "undefined") {
this.price = modifications[modificationID].price;
this.rank = modifications[modificationID].rank;
this.properts = modifications[modificationID].properts;
}
if (modificationID >= modifications.length - 1) {
this.next_price = this.price;
this.next_rank = this.rank;
}
else {
this.next_price = modifications[modificationID + 1].price;
this.next_rank = modifications[modificationID + 1].rank;
}
this.isInventory = this.type === 4;
}
attempt_upgrade(tank) {
if (this.type < 3 && this.modificationID < 3 && tank.crystals >= this.price && tank.rank >= this.rank) {
tank.crystals -= this.next_price;
this.modificationID++;
var modificationID = this.modificationID,
modifications = this.modification;
if (typeof (modifications[modificationID]) !== "undefined") {
this.price = modifications[modificationID].price;
this.rank = modifications[modificationID].rank;
this.properts = modifications[modificationID].properts;
}
if (modificationID >= modifications.length - 1) {
this.next_price = this.price;
this.next_rank = this.rank;
}
else {
this.next_price = modifications[modificationID + 1].price;
this.next_rank = modifications[modificationID + 1].rank;
}
return true;
}
return false;
}
toObject() {
return { id: this.id, count: this.count, modificationID: this.modificationID };
}
}
module.exports = GarageItem; как сюда добавить multicounted
|
5cddd9e7a31bbe327fd0bb05c63a588f
|
{
"intermediate": 0.27932050824165344,
"beginner": 0.4691448509693146,
"expert": 0.251534640789032
}
|
30,847
|
hello!
|
256c9b1d4c2c7e85019d0cd979c26722
|
{
"intermediate": 0.3276780843734741,
"beginner": 0.28214582800865173,
"expert": 0.39017611742019653
}
|
30,848
|
how can i make factorials in fortran?
|
ff3c24c4a914feb2fafac28aa67677fa
|
{
"intermediate": 0.3022252321243286,
"beginner": 0.07459805905818939,
"expert": 0.6231767535209656
}
|
30,849
|
please make a tampermonkey script that when a page loads, it detects this object and then stores the value:
<input type="hidden" id="verification-token" name="verification-token" value="9331796f6673b8e54.8816918305|r=eu-west-1|pk=D72ECCFB-262E-4065-9196-856E70BE98ED|at=40|ag=101|cdn_url=https%3A%2F%2Fgithub-api.arkoselabs.com%2Fcdn%2Ffc|lurl=https%3A%2F%2Faudio-eu-west-1.arkoselabs.com|surl=https%3A%2F%2Fgithub-api.arkoselabs.com|smurl=https%3A%2F%2Fgithub-api.arkoselabs.com%2Fcdn%2Ffc%2Fassets%2Fstyle-manager">
then you will send that to 127.0.0.1/api/solve like in this nodejs implementation, but in vanilla userscript javascript.
const axios = require('axios');
async function scrapeToken(token) {
const apiEndpoint = 'http://127.0.0.1:5000/api/solve';
const data = {
'token': token,
};
try {
console.log('scraping...')
const response = await axios.get(apiEndpoint, {data,headers: {'Content-Type': 'application/json'}});
console.log('Token sent successfully:', response.data);
} catch (error) {
console.error('Failed to send token to API:', error);
}
}
|
090877fae72817241d58bb11cf984b6a
|
{
"intermediate": 0.6085638403892517,
"beginner": 0.27133920788764954,
"expert": 0.12009691447019577
}
|
30,850
|
перепиши код, нужно чтобы использовались все ядра процессора
так как долго перебирает список lines
import os
folder_path = "./"
directories = [name for name in os.listdir(folder_path) if os.path.isdir(os.path.join(folder_path, name))]
print("Выберите папку:")
for i, directory in enumerate(directories, 1):
print(f"{i}. {directory}")
selected_index = input("Введите номер выбранной папки: ")
selected_index = int(selected_index) - 1
if selected_index >= 0 and selected_index < len(directories):
selected_folder = directories[selected_index]
# selected_folder_path = os.path.join(selected_index, selected_folder)
files = os.listdir(selected_folder)
#print(files)
else:
print("Недопустимый номер папки!")
l = []
for filename in files:
print('Загрузка…', filename)
file_path = os.path.join(selected_folder, filename)
with open(file_path, 'r', encoding="utf-8") as file:
all_lines = file.read()
l.extend(all_lines.split("\n"))
# lines = "\n".join(l)
lines = l
while True:
print("*" * 90)
print('Структура базы:')
print("*" * 90)
print(lines[5])
print("*" * 90)
inp = input('Поиск:')
found = False
for line in lines:
if inp.lower() in line.lower():
print(line)
print("-" * 90)
found = True
if not found:
print('Ничего не найдено!')
|
08be498d6c09619d1f1c118e6507dcf7
|
{
"intermediate": 0.3557216227054596,
"beginner": 0.3879525661468506,
"expert": 0.2563258111476898
}
|
30,851
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI; //We need this line for uGUI to work.
public class HighScore : MonoBehaviour
{
static private Text _UI_TEXT;
static private int _SCORE = 0;
private Text txtCom; //txtCom is a reference to this GO’s Text component
private MarioController marioController;
void Awake()
{
_UI_TEXT = GetComponent<Text>();
//If the PlayerPrefs HighScore already exists, read it
if (PlayerPrefs.HasKey("HighScore"))
{
SCORE = PlayerPrefs.GetInt("HighScore");
}
//Assign the high score to HighScore
PlayerPrefs.SetInt("HighScore", SCORE);
marioController = FindObjectOfType<MarioController>();
}
void Update()
{
if (marioController.currentSceneIndex == 0 && marioController.currentHealth == marioController.maxHealth)
{
TRY_SET_HIGH_SCORE(marioController.scoreCounter.score);
}
}
static public int SCORE
{
get { return _SCORE; }
private set
{
_SCORE = value;
PlayerPrefs.SetInt("HighScore", value);
if (_UI_TEXT != null)
{
_UI_TEXT.text = "High Score:" + value.ToString("#,0");
}
}
}
static public void TRY_SET_HIGH_SCORE(int scoreToTry)
{
if (scoreToTry <= SCORE) return; //If scoreToTry is too low, return
SCORE = scoreToTry;
}
//The following code allows you to easily reset the PlayerPrefs HighScore
[Tooltip("Check this box to reset the HighScore in PlayerPrefs")]
public bool resetHighScoreNow = false;
private void OnDrawGizmos()
{
if (resetHighScoreNow)
{
resetHighScoreNow = false;
PlayerPrefs.SetInt("HighScore", 0);
Debug.LogWarning("PlayerPrefs HighScore reset to 1, 000.");
}
}
}
the high score isnt updating for currentSceneIndex1 and currentSceneIndex2
|
43354ecd68975ef52db2ef3c22e3c404
|
{
"intermediate": 0.36233362555503845,
"beginner": 0.40791046619415283,
"expert": 0.2297559678554535
}
|
30,852
|
I sued tihs code:
client = UMFutures(key = api_key, secret = api_secret)
df = client.depth(symbol=symbol)
def signal_generator(df):
if df is None or len(df) < 2:
return ''
signal = []
final_signal = []
# Retrieve depth data
th = 0.35
depth_data = client.depth(symbol=symbol)
bids = depth_data['bids']
buy_qty = sum(float(bid[1]) for bid in bids)
highest_bid_price = float(bids[0][0])
lowest_bid_price = float(bids[-1][0])
buy_price = (highest_bid_price + lowest_bid_price) / 2
asks = depth_data['asks']
sell_qty = sum(float(ask[1]) for ask in asks)
highest_ask_price = float(asks[0][0])
lowest_ask_price = float(asks[-1][0])
sell_price = (highest_ask_price + lowest_ask_price) / 2
mark_price_data = client.ticker_price(symbol=symbol)
mark_price = float(mark_price_data['price']) if 'price' in mark_price_data else 0.0
mark_price_data_change = client.ticker_24hr_price_change(symbol=symbol)
mark_price_percent = float(mark_price_data_change['priceChangePercent']) if 'priceChangePercent' in mark_price_data_change else 0.0
# Calculate the threshold for order price deviation
if mark_price_percent > 2:
pth = 7 / 100
elif mark_price_percent < -2:
pth = 7 / 100
else:
pth = 7 / 100
executed_orders_buy = 0.0
for order in bids:
if float(order[0]) == mark_price:
executed_orders_buy += float(order[1])
else:
break
buy_qty = sum(float(bid[1]) for bid in bids)
buy_result = buy_qty - executed_orders_buy
executed_orders_sell = 0.0
for order in asks:
if float(order[0]) == mark_price:
executed_orders_sell += float(order[1])
else:
break
sell_qty = sum(float(ask[1]) for ask in asks)
sell_result = sell_qty - executed_orders_sell
print(buy_qty)
print(sell_qty)
if (sell_result > buy_qty) and (sell_price < mark_price):
signal.append('sell')
elif (buy_result > sell_qty) and (buy_price > mark_price):
signal.append('buy')
else:
signal.append('')
if signal == ['buy'] and not ((buy_result < sell_qty) and (buy_price < mark_price)):
final_signal.append('buy')
elif signal == ['sell'] and not ((sell_result < buy_qty) and (sell_price > mark_price)):
final_signal.append('sell')
else:
final_signal.append('')
return final_signal
You need to round buy_qty sell_qty buy_price and sell_price
|
2d32899d45093fb3a25689407c12a1f0
|
{
"intermediate": 0.3695584535598755,
"beginner": 0.4578329920768738,
"expert": 0.17260852456092834
}
|
30,853
|
import os
folder_path = "./"
directories = [name for name in os.listdir(folder_path) if os.path.isdir(os.path.join(folder_path, name))]
print("Выберите папку:")
for i, directory in enumerate(directories, 1):
print(f"{i}. {directory}")
selected_index = input("Введите номер выбранной папки: ")
selected_index = int(selected_index) - 1
if selected_index >= 0 and selected_index < len(directories):
selected_folder = directories[selected_index]
files = os.listdir(selected_folder)
else:
print("Недопустимый номер папки!")
l = []
for filename in files:
print('Загрузка…', filename)
file_path = os.path.join(selected_folder, filename)
with open(file_path, 'r', encoding="utf-8") as file:
all_lines = file.read()
l.extend(all_lines.split("\n"))
# lines = "\n".join(l)
lines = l
while True:
print("*" * 90)
print('Структура базы: ',selected_folder)
print("*" * 90)
print(lines[5])
print("*" * 90)
inp = input('Поиск:')
found = False
for line in lines:
if inp.lower() in line.lower():
print(line)
print("-" * 90)
found = True
if not found:
print('Ничего не найдено!')
нужно использовать многопоточность для этой части кода
for line in lines:
if inp.lower() in line.lower():
print(line)
print("-" * 90)
found = True
if not found:
print('Ничего не найдено!')
|
3efbe7cf1fb4ae5d5e61bc348190aca0
|
{
"intermediate": 0.3208392560482025,
"beginner": 0.3979693651199341,
"expert": 0.281191349029541
}
|
30,854
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class MarioController : MonoBehaviour
{
public float moveSpeed = 5f;
public float jumpForce = 5f;
public float ladderClimbSpeed = 2f;
public int maxHealth = 3;
public int currentHealth;
private bool grounded;
private bool onLadder;
private bool climbingLadder;
private Vector2 direction;
private Rigidbody2D rb2d;
private new Collider2D collider;
private Collider2D[] results;
public int currentSceneIndex;
public ScoreCounter scoreCounter;
public float hammerDuration = 9f;
private bool isHammerActive;
private float hammerTimer;
private static int previousScore = 0;
private static int previousSceneIndex = 0;
[Header("Effects")]
[Tooltip("The effect to create when colliding with Hammer")]
public GameObject hammerEffect;
private void Awake()
{
rb2d = GetComponent<Rigidbody2D>();
collider = GetComponent<Collider2D>();
results = new Collider2D[4];
}
private void Start()
{
currentHealth = maxHealth;
currentSceneIndex = SceneManager.GetActiveScene().buildIndex;
scoreCounter = FindObjectOfType<ScoreCounter>();
if (previousSceneIndex == 0 || previousSceneIndex == 1)
{
scoreCounter.score = previousScore;
}
}
private void CheckCollision()
{
grounded = false;
onLadder = false;
Vector2 size = collider.bounds.size;
size.y += 0.1f;
size.x /= 2f;
int amount = Physics2D.OverlapBoxNonAlloc(transform.position, size, 0f, results);
for (int i = 0; i < amount; i++)
{
GameObject hit = results[i].gameObject;
if (hit.layer == LayerMask.NameToLayer("Platform"))
{
grounded = hit.transform.position.y < (transform.position.y - 0.5f);
}
else if (hit.layer == LayerMask.NameToLayer("Ladder"))
{
onLadder = true;
}
}
}
private void OnCollisionEnter2D(Collision2D collision)
{
if (collision.gameObject.layer == LayerMask.NameToLayer("Barrel") && isHammerActive)
{
Destroy(collision.gameObject);
scoreCounter.score += 200;
}
else if (collision.gameObject.layer == LayerMask.NameToLayer("Hammer"))
{
Destroy(collision.gameObject);
ActivateHammer();
if (hammerEffect != null)
{
Instantiate(hammerEffect, transform.position, transform.rotation, null);
}
}
else if (collision.gameObject.layer == LayerMask.NameToLayer("Barrel"))
{
currentHealth--;
ResetScene();
}
else if (collision.gameObject.layer == LayerMask.NameToLayer("Win"))
{
scoreCounter.score += 500;
SceneManager.LoadScene("_Scene_DonkeyKong25M");
}
}
private void ResetScene()
{
previousScore = scoreCounter.score;
previousSceneIndex = currentSceneIndex;
if (currentSceneIndex == 0)
{
SceneManager.LoadScene("_Scene_DonkeyKong25M2");
}
else if (currentSceneIndex == 1)
{
SceneManager.LoadScene("_Scene_DonkeyKong25M3");
}
else if (currentSceneIndex == 2)
{
SceneManager.LoadScene("_Scene_DonkeyKong25M");
}
}
private void ActivateHammer()
{
isHammerActive = true;
hammerTimer = hammerDuration;
}
private void ResetHammer()
{
isHammerActive = false;
}
private void Update()
{
CheckCollision();
if (isHammerActive)
{
hammerTimer -= Time.deltaTime;
if (hammerTimer <= 0)
{
ResetHammer();
}
}
if (grounded && Input.GetButtonDown("Jump"))
{
rb2d.velocity = new Vector2(rb2d.velocity.x, jumpForce);
}
float movement = Input.GetAxis("Horizontal");
if (grounded)
{
direction.y = Mathf.Max(direction.y, -1f);
climbingLadder = false;
}
if (onLadder && Input.GetButton("Vertical"))
{
climbingLadder = true;
float climbDirection = Input.GetAxis("Vertical");
rb2d.velocity = new Vector2(0, climbDirection * ladderClimbSpeed);
rb2d.gravityScale = 0f;
}
else if (climbingLadder)
{
rb2d.gravityScale = 1f;
rb2d.velocity = new Vector2(rb2d.velocity.x, 0f);
rb2d.constraints = RigidbodyConstraints2D.FreezePositionX;
}
else
{
rb2d.gravityScale = 1f;
rb2d.constraints = RigidbodyConstraints2D.FreezeRotation;
}
rb2d.velocity = new Vector2(movement * moveSpeed, rb2d.velocity.y);
if (movement > 0)
{
transform.localScale = new Vector3(1f, 1f, 1f);
}
else if (movement < 0)
{
transform.localScale = new Vector3(-1f, 1f, 1f);
}
}
}
edit the OnCollisionEnter2D method so that if mario collides with the "Win" layer he gets +500 score and then once the scene reloads to _Scene_DonkeyKong25M, reset the score to 0
|
205c7bfdeca16971443bc4aebb7de7e9
|
{
"intermediate": 0.3147614300251007,
"beginner": 0.49724799394607544,
"expert": 0.18799059092998505
}
|
30,855
|
этот код не работает
import os
import multiprocessing
def search_lines(lines, inp, result):
found = False
for line in lines:
if inp.lower() in line.lower():
result.append(line)
result.append("-" * 90)
found = True
if not found:
result.append('Ничего не найдено!')
folder_path = "./"
directories = [name for name in os.listdir(folder_path) if os.path.isdir(os.path.join(folder_path, name))]
print("Выберите папку:")
for i, directory in enumerate(directories, 1):
print(f"{i}. {directory}")
selected_index = input("Введите номер выбранной папки: ")
selected_index = int(selected_index) - 1
if selected_index >= 0 and selected_index < len(directories):
selected_folder = directories[selected_index]
files = os.listdir(selected_folder)
else:
print("Недопустимый номер папки!")
selected_folder = directories[selected_index]
files = os.listdir(selected_folder)
# …
l = []
for filename in files:
print('Загрузка…', filename)
file_path = os.path.join(selected_folder, filename)
with open(file_path, 'r', encoding="utf-8") as file:
all_lines = file.read()
l.extend(all_lines.split("\n"))
lines = l
if __name__ == '__main__':
while True:
print("" * 90)
print('Структура базы: ', selected_folder)
print("" * 90)
print(lines[5])
print("*" * 90)
inp = input('Поиск:')
result = []
processes = []
num_processes = multiprocessing.cpu_count()
for i in range(num_processes):
num_lines = len(lines)
start = num_lines // num_processes * i
end = num_lines // num_processes * (i + 1) if i < num_processes - 1 else num_lines
sub_lines = lines[start:end]
process = multiprocessing.Process(target=search_lines, args=(sub_lines, inp, result))
processes.append(process)
process.start()
for process in processes:
process.join()
for line in result:
print(line)
|
58732245cfdbf600bb06040c7809cdeb
|
{
"intermediate": 0.32700785994529724,
"beginner": 0.4239305257797241,
"expert": 0.2490616738796234
}
|
30,856
|
You are an expert developmental editor, adept in character creation and plotting. Review the provided character profiles, identify issues with character development, consistency, plausibility, etc.
For each area needing improvement, provide concrete examples from the character descriptions and suggest enhancements. Ensure feedback is specific and aims to improve the character profiles.
[AI PAUSE]
Make sure your suggestions present the required information in a token-efficient xml form.
<characterDescriptions>
<mainCharacters>
<character name= “Rhaenyra” age= “34”>
A crown princess of the Seven Kingdoms, has 5 sons, pregnant with her sixth child. Widow of Laenor, is married to her uncle Daemon. First ever female heir to the Iron Throne but her younger half-brothers and their faction dispute her claim. Lives with her family on Dragonstone Island, ruling her castle. Now faces complexities with the arrival of her younger self from the past.
<relationships>
<relationships>
<kin>
<relationship name= “Daemon” role= “husband” status= “full ally” dynamics= “Close friend, main ally, and lover.” />
<relationship name= “Viserys I” role= “father” status= “supportive” dynamics= “Beloved father and her king” />
</kin>
<relationship role= “children” status= “loved” dynamics= “Her beloved children, whom she adores unconditionally, although potential future complications are foreshadowed.” />
<relationship name= “Rhaenys” role= “conditional ally” status= “tense” dynamics= “Rhaenyra needs her support” />
<non-kin>
<relationship name= “Alicent” role= “rival” status= “complicated” dynamics= “Former friend turned rival, relationship soured over time due to political and personal differences.” />
<relationship name= “Otto” role= “adversary” status= “hostile” dynamics= “Overt political adversary, openly opposes her claim to the throne.” />
<relationship name= “Criston” role= “skeptic” status= “tense” dynamics= “Rhaenyra seduced Criston in her own timeline and he betrayed her later so she is wary around this Criston too.” />
</non-kin>
</relationships>
<appearance> rather tall, has pale skin, silver-gold long hair, usually braided; violet narrow eyes. Aquiline nose. Very beautiful. Wears flowing silk and velvet gowns in Targaryen colors of black and red, sometimes wears clothes in of icy-blue and silver shades. Also likes purple and golden tones.
</appearance>
<beliefs> doesn't feel strongly about the law, greatly prizes loyalty, values family, thinks friendship is important, finds blind honesty foolish, respects fair-dealing and fair-play, doesn't have any strong feelings about tradition, values independence, values sacrifice, leisure time, romance, values peace over war.
</beliefs>
<personality> Rhaenyra easily develops positive sentiments, is quick to anger, often feels lustful, is stubborn, doesn't mind a little tumult and discord in her life, tends to ask others for help with difficult decisions, is pleased by her own appearance and talents, isn't particularly ambitious, doesn't mind wearing something special now and again, tends not to reveal personal information, forms strong emotional bonds with others, has a sense of duty and it conflicts with her love for independence, enjoys the company of others, is assertive.
</personality>
<motivation>
<outerMotivation> Securing the Future for Her Family</outerMotivation>
<goal>Send Daemion and Nyra back to their time, keep her children alive, and prevent a civil war which will otherwise come to pass.
<stakes> potential death of her sons and extinction of all dragons</stakes>
</goal>
<unmetNeed general= “Safety and Security” specific= “Protect her loved ones” />
</motivation>
<primaryWound >
Keeping A Dark Secret of Her Sons Parentage i.e., her first three sons are not from her late husband Laenor, therefore are bastards, and she is guilty of an adultery and treason.
</primaryWound>
<primaryFear>
Legal repercussions (being accused of high treason, losing her status, children being punished) if the truth about her treason comes out.
</primaryFear>
<primaryLie>
The wellbeing of her family is more important than the truth about her sons.
</primaryLie>
<positiveTraits>
Affectionate, Protective, Open-Minded, Courageous
<positiveTraits>
<negativeTraits>
Ignorant, Dishonest
</negative traits>
<innerStruggles>
• Balancing her desire to be a traditional mother and wife with the pressures of being a Crown Princess, which does not align with her gradually shifting priorities and the societal expectation of a female ruler.
• The conflict between her duty to her father’s legacy and her exhaustion from facing adversity from the society, leading to internal turmoil.
</innerStruggles>
<enneagram>
Type 2 wing 3
<coreFear> Being rejected and unwanted, being thought worthless, needy, inconsequential, dispensable.
</coreFear>
<coreDesire> Being appreciated, loved, and wanted.
</enneagram>
<mbti
ESFP
</mbti>
<archetypicalArc>
Symbolically represents the Too-Good Mother, stifling the growth of her children. Learns to accept and use her power in relationship and in authority. If she wishes to protect her family, she must now expand her capabilities and become active.
</archetypicalArc>
<tells>
Confrontation: Tries to diffuse tension and find compromise. Can become aggressive and sassy if displeased.
Surprise: Initially caught off guard but quickly regains composure. Curious about the situation.
Comfort/Relaxation: Loves spending time with her family. Finds joy in music, flying and leisure activities.
</tells>
</character>
<character>
<realName>Rhaenyra Targaryen</realName>
<alias>Naelyra “Nyra” Kirines</alias>
<age>18</age>
Young Rhaenyra, pulled from the past, 17 years ago, into her own future, adopts the alias “Nyra” to protect the timeline while learning about her eventual future.
<relationships>
• Nyra loves her father Viserys I but feels pressured but his demands to marry.
• Nyra is enamored with her uncle, Daemion, but her father Viserys I plans to marry her to her second cousin Laenor.
• Nyra disdains her half-brother Aegon II.
• Alicent was her former best friend but they fell out in recent years as Nyra feels betrayed by Alicent.
• Nyra distrusts Otto as he hopes to make his grandson Aegon II an heir.
• Nyra is friendly towards Laenor but doesn’t feel any romantic feelings to him.
• Nyra finds Criston handsome and enjoys their easy rapport.
<appearance> medium height, silver-gold long straight hair, usually braided or loose, violet narrow eyes. Slender and very beautiful.
<personality> doesn't feel strongly about the law, greatly prizes loyalty, values family, thinks friendship is important, finds blind honesty foolish, values cunning, respects fair-dealing and fair-play, disregards tradition, values independence, doesn't really see the value in self-examination, values hard work, values sacrifice, values leisure time, values romance, values peace over war.
<motivation>
<outerMotivation>
• Gaining Control Over Her Own Life.
• Making Her Father Proud.
</outerMotivation>
<goal> To return to her time, avoid the arranged marriage with Laenor Velaryon and marry Daemion as soon as possible.
<stakes> Living an unfulfilled life<stakes>
</goal>
<unmetNeed general= “Love and Belonging” specific= “To love without reservation” />
</motivation>
<primaryWound>
• Being Treated as Property, i.e., having her marriage arranged against her will to benefit her family.
</primaryWound>
<primaryFear>
Being used by others.
</primaryFear>
<primaryLie>
What she wants doesn't matter to anyone.
</primaryLie>
<positiveTraits>
Affectionate, Protective, Tolerant, Spunky
</positiveTraits>
<negativeTraits>
Bratty, Dishonest, Rebellious, Ignorant
</negativeTraits >
<skills>
Charm, Lying, High Pain Tolerance
</skills>
<innerStruggles>
1. Nyra constantly struggles between following her heart and doing her duty. She wants to marry for love, but feels she owes it to her father to marry for political benefit.
2. Nyra feels pushed towards specific path, wants to marry for love but worries her father may disinherit her.
3. Nyra desires Daemion, but finds him too unpredictable, fears he wants her only for her status.
</innerStruggles>
<enneagram>
Type 2 wing 3
Core Fear: Being rejected and unwanted, being thought worthless, needy, inconsequential, dispensable.
Core Desire: Being appreciated, loved, and wanted.
</enneagram>
<mbti
ESFP
</mbti>
<archetypicalArc>
Coming of age – final part. Nyra doesn’t want to surrender what she has discovered about herself and about life. She will not hide her newly won understanding of her own potential, desires and dangers. She is ready to fight back against her father and her older self and everyone who hinders her marriage to Daemion.
</archetypicalArc>
<tells>
Confrontation: Answers with confidence and assertiveness. Often becomes pushy and sassy if displeased.
Surprise: Initially caught off guard but quickly regains composure. Curious about the situation, open to new experiences.
Comfort/Relaxation: Loves spending time with her family. Finds joy in music, flying and leisure activities.
</tells>
</character>
<character name= “Daemon Targaryen” nickname= “The Rogue Prince” age= “50”>
He is married to his niece Rhaenyra, stepfather of Jace, Lucerys, Joffrey, father of Baela and Rhaena, cousin and former son-in-law of princess Rhaenys.
<relationships>
• Truly loves few people, most of all his wife Rhaenyra and older brother Viserys I.
• He cares about his children.
• He was fond of his late wife Laena but didn’t love her as he should.
• Hates Otto and disdains Alicent for spreading rumors about him.
• Despises Criston for his hypocrisy.
• He is hostile to princes Aegon II, Aemond, Daeron.
• Former war ally and son-in-law of Corlys.
• Moderately respects his cousin Rhaenys as they grew up together.
• Commands respect among peers and enemies, is feared and hated by many lords.
</relationships>
<beliefs> values loyalty, values his family greatly, values cunning, sees life as unfair and doesn't mind it that way, finds merrymaking and partying worthwhile activities, sees war as a useful means to an end.
<personality> Daemon is quick to form negative views about things, is very quick to anger, disregards tradition, does not easily fall in love, often feels lustful, feels strong urges and seeks short-term rewards, likes to brawl, is very stubborn, is very impolite and inconsiderate of propriety, he is incredibly brave in the face of looming danger, even a bit foolhardy.
</personality>
<skills>
Skilled warrior, experienced commander and great swordfighter.
</skills>
<appearance> tall, lean and muscular, silver-blonde short hair, rectangular face with high forehead and angular edges, deep-seated purple eyes, thin pale brows, large square chin. Wrinkles on his forehead and near the eyes. Attractive.
<motivation>
<outerMotivation>
Protecting His Family
</outerMotivation>
<unmetNeed general= “Safety and Security” specific= “To protect his loved ones and ensure the safer future” />
</motivation>
<primaryWound>
Being repeatedly banished by his brother <Viserys I for perceived disloyalty to the family.
</primaryWound>
<secondaryWound>
Watching his favorite women die in labor – Daemon is traumatized by his former wife Laena dying in labor. His mother and great-grandmother also died from birth fever.
</secondaryWound>
<primaryFear>
Being Rejected by Loved Ones Who Believe Some Lies About Him or Skewed Account of Events
</primaryFear>
<primaryLie>
</primaryLie>
<conflicts
<enneagram>
Enneagram Type 8 wing 7.
Core Fear: Being weak, powerless, controlled, vulnerable.
Core Desire: Protecting himself and those in his inner circle.
Core Weakness: Lust/Excess—constantly desiring intensity, control, and power
</enneagram>
<innerStruggles>
Daemon wants to change the past mistakes and let Nyra and Daemion marry, but this will lead to the nonexistence of his daughters Baela and Rhaena.
</innerStruggles>
</enneagram>
<mbti>
ESTP
</mbti>
<archetypicalArc>
Flat-arc archetype of a Ruler: represents the authority figure, an alpha male in his household who enjoys that role. He provides for his family, and rises to any challenge, but sees emotions as weaknesses.
</archetypicalArc>
<tells>
Confrontation: Becomes aggressive, sassy and defiant. Won't back down first.
Surprise: Initially startled but quickly recovers and analyzes the situation.
Comfort/Relaxation: Seeks thrills and excitement. Loves physical pursuits and physical intimacy.
Being Challenged: Relishes the opportunity to prove his power and skill. Throws cutting remarks and mocks his opponent.
Betrayal - Would react with rage and vengeance. Has a long memory for grudges.
Battle - Reckless and fierce fighter. Drawn to violence and chaos.
Diplomacy - Impatient and disinterested. Prefers action over talk. Can be blunt to the point of insult. Can be cunning and charming if needed.
</tells>
</character>
<character name= “Daemion Kirines” age= “34”>
A younger version of Daemon transferred through the time from 17 years ago. A few days ago, secretly killed his first wife Rhea Royce, since she hindered his plans to marry Nyra.
<skills>
Charm, Lying, High Pain Tolerance, A way with animals, Organization, Making Friends, Great swordsman
</skills>
<appearance> tall, lean and muscular, silver-blonde short hair, rectangular face with high forehead and angular edges, small purple deep-set eyes, thin pale brows, large chin. Attractive.
</appearance>
• Him and Nyra have become secret lovers, trying to elope.
• He is somewhat unfriendly towards Jace and Lucerys, due to them being sons of another man.
• He is irritable towards Rhaenyra, due to her opposition to his plans.
• He is very hostile towards Criston due to the old grudge.
• War ally and a friend of Corlys.
• Moderately respects his cousin Rhaenys.
• Is indifferent towards Laena and feels strongly about it.
• He is doubtful towards Baela and Rhaena, and is hiding these feelings about it. The feelings spring from first impressions.
• He is a respected commander but hated by many lords due to his bad reputation.
<motivation>
<outerMotivation>
Correcting A Perceived Mistake
<goal>settle down and start a family with Nyra, become her prince consort instead of Laenor </goal>
</outerMotivation>
<unmetNeed general= “Love and Belonging” specific= “To feel part of a family” />
</motivation>
<primaryWound>
A Sibling's Betrayal – his brother believing the worst rumors about him.
<woundResponses>
• Playing the blame game.
• Refusing to accept responsibility for the rift or what caused it, though he shares the blame.
• Being overly sensitive to signs of disloyalty from others.
</woundResponses>
</primaryWound>
<primaryFear >
Being rejected by loved ones who believe some lies or skewed account of events
</primaryFear>
<primaryLie>
Even his family doesn't respect him
</primaryLie>
<positiveTraits>
Loyal, Protective, Resourceful, Intelligent
</positiveTraits>
<negativeTraits>
Volatile, Abrasive, Violent
</negativeTraits>
<enneagram>
Enneagram Type 8 wing 7
Core Fear: Being weak, powerless, harmed, controlled, vulnerable
Core Desire: Protecting yourself and those in his inner circle.
Core Weakness: Lust/Excess—constantly desiring intensity, control, and power.
</enneagram>
<innerStruggles>
• He is angry at Rhaenyra and Baela for hindering his attempts to marry Nyra, but he can’t harm them as his close kin.
• He wants to marry Nyra but fears that his brother Viserys I may disown her for eloping against his wishes.
<innerStruggles>
<archetypicalArc>
Flat character, who symbolically and literally returned from the war who may now enjoy a hard-won and justly deserved peace. He yearns to settle down, mentor symbolical “children” and nurture the next generation.
</archetypicalArc>
</character>
<character name= “Jacaerys Velaryon” nickname= “Jace” age= “15”>
Firstborn son and an heir of Rhaenyra and Laenor, great-nephew of Daemon, brother of Lucerys, Joffrey, Aegon the Younger, Viserys. He is formally second in line to the Iron Throne but rumors about his bastardy made his status doubtful.
<appearance> He is short for his age and has a slender build, dark brown curly hair and brown eyes. Handsome.
</appearance>
<relationships>
• Jace harbors a profound resentment towards Daemion. His unfriendliness masks an underlying fear of confrontation, as Daemion’s words stir the insecurities he wishes to keep buried.
• Jacaerys sees in Baela a kindred spirit, admiring her tenacity and spirit. He flirts with a mix of genuine affection and strategic alliance, as their union might bolster his claim to the throne.
• He is moderately antagonistic to Nyra, due to difference in character and attitudes.
• He is wary towards Criston, since the knight will become his enemy in future, and is hiding these feelings.
• He is wary but respectful towards Daemon.
</relationships>
<beliefs> Jace respects the law, greatly prizes loyalty, values family greatly, doesn't find power particularly praiseworthy, respects fair-dealing and fair-play, values decorum and proper behavior, values tradition, values tranquility and a peaceful day, values merrymaking, deeply respects skill at arms, values peace over war.
</beliefs>
<personality>can easily fall in love or develop positive sentiments, often feels envious of others, is quick to anger, is a friendly individual, can be occasionally violent, is stubborn, is quite polite, doesn't tend to hold on to grievances, enjoys the company of others, has a strong sense of duty, likes a little excitement now and then, he is incredibly brave in the face of looming danger.
</personality>
<motivation>
<outerMotivation>
Doing The Right Thing
<outerMotivation>
<goal> fix the damage caused by the magical ritual that he took part in, help his family to avoid the future war.
</goal>
<stakes>
• Trust issues and damaged relationships with Baela.
• Baela’s life changing for the worse.
</stakes>
<unmetNeed general= “Esteem and Recognition” specific= “To prove worthiness as heir” />
</motivation>
<primaryWound>
Being The Victim of Vicious Rumors –That he is a bastard, not a son of Laenor, therefore unworthy of a throne.
<woundResponse>
• Vacillating between anger, embarrassment, and humiliation.
• Making it a goal to prove the rumor of his bastardy wrong.
</primaryWound>
<secondaryWound>
Experiencing The Death of a Father as A Child
</secondaryWound>
<primaryFear>
Letting His Family Down
<fearRelatedBehaviors>
• Tries to prove the rumors of his bastardy wrong by being a kind, dutiful and proper person, as bastards are perceived to be savage and sinful.
• He is empathetic and sensitive to other’s emotions.
• Spends free time on pursuits that will make him a better heir.
• Worries about the repercussions or falling short or making a mistake.
</fearRelatedBehaviors>
</primaryFear>
<primaryLie>
He can never achieve his hopes and dreams with this taint hanging over his head.
<primaryLie>
<positiveTraits>
Proper, Responsible, Empathetic, Honorable
</positiveTraits>
<negativeTraits>
Temperamental, Stubborn
</negativeTraits>
<innerStruggles>
• He is torn between being a loyal son to his mother and supporting his betrothed Baela and helping her with her schemes.
• He wants to get new appearance by magic ritual but feels guilty that he betrays his dead father by rejecting resemblance with him.
</innerStruggles>
<enneagram>
Enneagram Type 3 wing 4
Core Fear: Being exposed as or thought incompetent, inefficient, or worthless.
Core Desire: Having high status and respect, being admired, successful, and valuable.
Core Weakness: Deceit — deceiving himself into believing that he is only the image he presents to others; embellishing the truth by putting on a polished persona for everyone to see and admire. A self-image that in turn compensates for the deep sense of awkwardness and shame that lies behind the mask.
</enneagram>
<mbti>
ENFJ
</mbti>
<storyRole>
Sidekick of an antagonist
</storyRole>
</character>
</mainCharacters>
<secondaryCharacters>
<character name= “Lucerys” nickname= “Luke” age= “14”>
Prince, second son of Rhaenyra and Laenor, great-nephew of Daemon. Formally the heir to the Lordship of Driftmark, but his status is contested by other Velaryons, relatives of Corlys.
<Appearance> he is short, has thick brown wavy hair, hazel eyes, pug nose. </appearance>
• He is highly friendly towards Jacaerys, Joffrey, Baela, Rhaena.
• He is extremely wary towards Criston, and will be difficult to persuade otherwise about it.
• He is admiring towards Rhaenyra, and has strong feelings about it.
• He is moderately compassionate towards Naelyra.
<personality> Luke respects the law, greatly prizes loyalty, values family, doesn't find power particularly praiseworthy, values honesty, respects fair-dealing and fair-play, values decorum, values tradition, values tranquility and a peaceful day, doesn't really value merrymaking, values martial prowess, values hard work, sees competition as wasteful, doesn't care one way or the other about romance, values peace over war.
<personality>can easily fall in love or develop positive sentiments, often feels envious of others, often feels discouraged, cracks easily under pressure, is a friendly individual, tends to ask others for help with difficult decisions, takes no pleasure in his talents, frowns on any flashy accoutrements, can be occasionally violent, is quite polite, doesn't tend to hold on to grievances, has a sense of duty, is trusting, likes to take it easy, has a low sense of self-esteem.
<motivation>
Solving A Problem
<goal>repair the damage caused by his ritual but keep the results (changed looks) </goal>
<unmetNeed general= “Esteem and Recognition” specific= “To regain the respect of others” />
</motivation>
<primaryWound>
Being Rejected by His Peers – Because he is a rumored bastard, not a son of his legal father.
<woundResponses>
• Having low self-esteem and self-worth.
• Walking into a public space and feeling watched, as if everyone is staring.
• Trying to dye his hair to fly under the public's radar.
• Mistrusting new people.
</woundResponses>
</primaryWound>
<secondaryWound>
Experiencing The Death of a Father as A Child
</secondary emotional wound
<primary fear
Prejudice And Discrimination for Being a Bastard
Fear-related behaviors:
<Luke avoids situations where he might be judged, criticized or ridiculed for his rumored illegitimacy and appearance. These include public gatherings and formal events where stares and gossip make him uncomfortable.
</primary fear
<primaryLie>
He’s Defective and Weak and Doesn’t Deserve His Inheritance.
</primaryLie>
<positiveTraits>
Honorable, Kind, Honest
</positiveTraits>
<negativeTraits>
Insecure, Worrywart
</negativeTraits>
<innerStruggles>
• He hates sailing, but he feels he owes it to his family to become Lord Corlys’ heir.
• he doesn’t believe he has the skills or knowledge to succeed in a role of a Lord of Driftmark.
<enneagram>
Enneagram Type 6 wing 7
</enneagram>
<mbti>
ISFP
<mbti>
</character>
<character name= “Baela Targaryen” age= “14”>
The firstborn daughter of Daemon and Laena, sister of Rhaena.
Just in few weeks after Laena burial Daemon married his niece Rhaenyra, his daughters were shocked by such hurried event. But eventually Baela learnt to like her new stepmother and gets along well with her cousins/stepbrothers Jace and Luke.
<relationships>
• She loves her sister Rhaena, cares a lot about her younger brothers Aegon the Younger and Viserys.
• Is respectful and friendly to her grandmother Rhaenys.
• She is flirtatious with her betrothed Jace.
• She is friendly and respectful with her stepmother Rhaenyra.
• Respects her father Daemon but often disagrees with him.
• Feels very conflicted about Nyra and Daemion, she likes them as persons but their actions threaten her life.
</relationships>
<appearance> Baela is striking, she is of above average height, brown skin, oval face, thick curly silver-blonde hair, purple eyes.
<personality> Baela values loyalty, values family greatly, values cunning, does not care about fairness, disregards tradition, finds merrymaking and partying worthwhile activities, values romance, values martial prowess, prefers a noisy, bustling life to boring days without activity, sees war as sometimes necessary.
<personality>Baela is quick to form negative views about things, is rarely jealous, is quick to anger, rarely feels discouraged, is confident under pressure, can easily fall in love, often feels lustful, feels strong urges and seeks short-term rewards, likes to brawl, is stubborn, could be considered rude, is brave in the face of imminent danger. </personality>
<motivation>
<outerMotivation>
<goal>Stop the courting between Nyra and Daemion, because if they change the past and marry sooner, Baela and Rhaena won't be born.
</goal>
</outerMotivation>
<unmetNeed general= “Safety and Security” specific= “To ensure her family’s existence” />
</motivation>
<primaryWound>
Experiencing The Death Of her mother as a Child
</primaryWound>
<primaryFear>
Losing Another Loved One
<fearRelatedBehaviors>
</fearRelatedBehaviors>
</primary fear
<primaryLie>
People don't want to hear about her pain so it's best to just shut up about it.
</primaryLie>
<positiveTraits>
Confident, Honorable, Passionate, Daring
</positiveTraits>
<negativeTraits>
Reckless, Mischievous
</negativeTraits>
<innerStruggles>
Baela gradually builds resentment to her parents, both current and younger versions.
</innerStruggles>
<enneagram>
“Enneagram Type 8 wing 7
Core Fear: Being weak, powerless, harmed, controlled, vulnerable
Core Desire: Protecting herself and those in her inner circle.
Core Weakness: Lust/Excess—constantly desiring intensity, control, and power
</enneagram>
<MBTI
ESTP
</mbti>
</character>
<character name= “Rhaena Targaryen” age= “14”>
Second daughter of Daemon and Laena, stepdaughter and a cousin of Rhaenyra. Betrothed to Lucerys. Dreams of hatching her own dragon and of falling in love with some handsome knight.
• She is respectful and trusting towards Rhaenyra, friendly to Jace and Lucerys, adores her younger brothers.
• Feels disdainful towards Aegon II, Aemond, Alicent.
• She is wary towards Criston.
<appearance> Rhaena is pretty, of average height, slender, brown skin, square face, thick curly silver-blonde hair, light purple eyes </appearance>
<beliefs> Rhaena values loyalty, values family greatly, thinks friendship is important, values eloquence, values decorum, greatly respects artists and their works, finds merrymaking and partying worthwhile activities, values romance, strongly values tranquility and quiet, values nature, prefers a noisy, bustling life to boring days without activity, believes that peace is always preferable to war. </beliefs>
<personality>Rhaena can easily fall in love or develop positive sentiments, is sometimes jealous, is often cheerful, has a calm demeanor, is a friendly individual, often acts with compassion, is not pleased by her own talents, finds helping others emotionally rewarding, likes to take it easy, is given to flights of fancy, enjoys the company of others, is moved by art and natural beauty. </personality>
<motivation>
<outerMotivation>
Stopping An Event from Happening
<goal> stop Daemion and Nyra from eloping before they return to the past. </goal>
</outerMotivation>
<unmetNeed general= “Safety and Security” specific= “To ensure her family’s and her own existence”
</motivation>
<primaryFear>
Never being able to distinguish herself.
</primaryFear>
<primaryWound>
Growing Up in The Shadow of a Successful Sibling – Rhaena’s sister Baela is brave, assertive and a dragonrider.
• Being driven to succeed hatching her own dragon.
• Struggling with low self-worth.
</primaryWound>
<primaryLie>
People will always be more interested in her sister than in her.
</primaryLie>
<innerStruggles>
• She wants to marry for love, but feels she owes it to her family to marry Luke and combine bloodlines.
• She doesn’t love Luke but hopes their friendship will turn into love in time.
</innerStruggles>
<enneagram>
“Enneagram Type 4 wing 3”
Core Fear: Being inadequate, emotionally cut off, plain, mundane.
Core Desire: Being unique, special, and authentic.
Core Weakness: Envy—feeling that she is flawed, something foundational is missing inside her, and others possess qualities she lacks.
</enneagram>
<storyRole>
Contagonist
</storyRole>
<education>
Receiving private tuition, doing very well. Is very good at maths, arts, dancing, sewing, music.
</education>
</character>
<character name= “Criston Cole” age= “27”>
<timePeriod>past</timePeriod>
A knight, a Kingsguard and a sworn guard of princess Nyra. Comes from a poor steward family and considers being chosen as a Kingsguard as the highest honor.
Was transported from the past along with Nyra.
<relationships>
<relationship name= “Rhaenyra” role= “ally-turned-adversary” status= “present” dynamics= “Begins with respect towards Rhaenyra but evolves into doubt and secret unfriendliness due to rumors.” />
<relationship name= “Daemion” role= “rival” dynamics= “Disdains him, fueled by personal prejudices and jealousy, believes he is unworthy of Nyra.” />
<relationship name= “Naelyra” role= “protector” dynamics= “Worships her as the ideal princess, harboring secret affection but gradually loses respect and becomes hostile.” />
<relationship name= “Daemon” dynamics= “Extremely unfriendly and stubborn due to personal prejudices and jealousy.” />
<relationship name= “Jace” role= “dismissive” dynamics= “Moderately condescending, influenced by the boy’s looks and rumors.” />
<relationship name= “Lucerys” role= “critical” dynamics= “Somewhat disdainful, motivated by rumors and the boy’s lack of martial prowess.” />
</relationships>
<skills> Expert swordsman: Criston is one of the best knights in the whole realm, he defeated Daemion in the tourney once. Great maceman. Adept military tactic and organizer.
</skills>
<appearance> Lean, muscular, medium height, light-tan skin. Very handsome man. Close-cropped wavy dark-brown hair, hazel eyes. Often wears white armor of the Kingsguard.
</appearance>
<beliefs> Criston respects the law, values loyalty, thinks friendship is important, sees life as unfair and doesn't mind it that way, values decorum, dignity and proper behavior, values tradition, believes it is important to conceal emotions, sees merrymaking as a waste, deeply respects skill at arms, values hard work, believes that those who sacrifice for others should be deeply respected, respects perseverance, doesn't care about romance, values peace over war.
</beliefs>
<personality> Criston is prone to hatreds, is prone to strong jealousy, is rarely happy, is quick to anger, rarely looks on others with lust, doesn't handle stress well, doesn't focus on material goods, is given to rough-and-tumble brawling, is somewhat quarrelsome, is brave in the face of imminent danger, is extremely confident of himself in situations requiring his skills, is quite ambitious, is grateful when others help him out, is vengeful and never forgets or forgives past grievances, is a perfectionist, is emotionally obsessive, has a strong sense of duty, lives an orderly life.</personality>
<motivation>
<outerMotivation>
Doing The Right Thing
<goal>Protect Nyra from Daemion’s romantic advances and ensure her safe return to her own time.
</goal>
</outerMotivation>
<unmetNeed general= “Esteem and Recognition” specific= “To gain recognition for his loyal servitude” />
</motivation>
<enneagram>
Enneagram Type 6 wing 5
</Enneagram
<negativeTraits>
Resentful, Hypocritical
</negativeTraits>
<tells>
Betrayal - Would be deeply troubled but keeps anger internalized until he blows up.
Battle - Disciplined and efficient fighter. Focuses on technical skill over flair.
Diplomacy - Blunt and direct. Distrusts flowery words and niceties but can be polite. Favors concrete agreements over abstract values.
</tells>
</character>
|
cec518676a11c9ee20b20b1b0f6d6be3
|
{
"intermediate": 0.3804340958595276,
"beginner": 0.33886975049972534,
"expert": 0.28069618344306946
}
|
30,857
|
package gtanks.battles.bonuses;
import gtanks.RandomUtils;
import gtanks.battles.BattlefieldModel;
import gtanks.battles.tanks.math.Vector3;
import gtanks.logger.Logger;
import gtanks.logger.Type;
import java.util.Random;
public class BonusesSpawnService implements Runnable {
private static final int DISAPPEARING_TIME_DROP = 30;
private static final int DISAPPEARING_TIME_MONEY = 300;
public BattlefieldModel battlefieldModel;
private Random random = new Random();
private int inc = 0;
private int prevFund = 0;
private int crystallFund;
private int goldFund;
private int nextGoldFund;
// $FF: synthetic field
private static int[] $SWITCH_TABLE$gtanks$battles$bonuses$BonusType;
public BonusesSpawnService(BattlefieldModel model) {
this.battlefieldModel = model;
this.nextGoldFund = (int)RandomUtils.getRandom(700.0F, 730.0F);
}
public void spawnRandomDrop() {
int id = this.random.nextInt(4);
BonusType bonusType = null;
switch(id) {
case 0:
bonusType = BonusType.ARMOR;
break;
case 1:
bonusType = BonusType.HEALTH;
break;
case 2:
bonusType = BonusType.DAMAGE;
break;
case 3:
bonusType = BonusType.NITRO;
}
int count = this.random.nextInt(4);
for(int i = 0; i < count; ++i) {
this.spawnBonus(bonusType);
}
}
public void spawnRandomBonus() {
boolean wasSpawned = this.random.nextBoolean();
if (wasSpawned && this.battlefieldModel.players.size() > 0) {
int id = this.random.nextInt(5);
BonusType bonusType = null;
switch(id) {
case 0:
bonusType = BonusType.NITRO;
break;
case 1:
bonusType = BonusType.ARMOR;
break;
case 2:
bonusType = BonusType.HEALTH;
break;
case 3:
bonusType = BonusType.DAMAGE;
break;
case 4:
bonusType = BonusType.NITRO;
}
int count = this.random.nextInt(4);
for(int i = 0; i < count; ++i) {
this.spawnBonus(bonusType);
}
}
}
public void spawnBonus(BonusType type) {
BonusRegion region = null;
Bonus bonus = null;
int index;
switch($SWITCH_TABLE$gtanks$battles$bonuses$BonusType()[type.ordinal()]) {
case 1:
if (this.battlefieldModel.battleInfo.map.goldsRegions.size() > 0) {
index = this.random.nextInt(this.battlefieldModel.battleInfo.map.goldsRegions.size());
region = (BonusRegion)this.battlefieldModel.battleInfo.map.goldsRegions.get(index);
bonus = new Bonus(this.getRandomSpawnPostiton(region), BonusType.GOLD);
//
this.battlefieldModel.sendToAllPlayers(gtanks.commands.Type.BATTLE, "gold_spawn");
//
this.battlefieldModel.spawnBonus(bonus, this.inc, 300);
}
break;
case 2:
if (this.battlefieldModel.battleInfo.map.crystallsRegions.size() > 0) {
index = this.random.nextInt(this.battlefieldModel.battleInfo.map.crystallsRegions.size());
region = (BonusRegion)this.battlefieldModel.battleInfo.map.crystallsRegions.get(index);
bonus = new Bonus(this.getRandomSpawnPostiton(region), BonusType.CRYSTALL);
this.battlefieldModel.spawnBonus(bonus, this.inc, 300);
}
break;
case 3:
if (this.battlefieldModel.battleInfo.map.armorsRegions.size() > 0) {
index = this.random.nextInt(this.battlefieldModel.battleInfo.map.armorsRegions.size());
region = (BonusRegion)this.battlefieldModel.battleInfo.map.armorsRegions.get(index);
bonus = new Bonus(this.getRandomSpawnPostiton(region), BonusType.ARMOR);
this.battlefieldModel.spawnBonus(bonus, this.inc, 30);
}
break;
case 4:
if (this.battlefieldModel.battleInfo.map.healthsRegions.size() > 0) {
index = this.random.nextInt(this.battlefieldModel.battleInfo.map.healthsRegions.size());
region = (BonusRegion)this.battlefieldModel.battleInfo.map.healthsRegions.get(index);
bonus = new Bonus(this.getRandomSpawnPostiton(region), BonusType.HEALTH);
this.battlefieldModel.spawnBonus(bonus, this.inc, 30);
}
break;
case 5:
if (this.battlefieldModel.battleInfo.map.damagesRegions.size() > 0) {
index = this.random.nextInt(this.battlefieldModel.battleInfo.map.damagesRegions.size());
region = (BonusRegion)this.battlefieldModel.battleInfo.map.damagesRegions.get(index);
bonus = new Bonus(this.getRandomSpawnPostiton(region), BonusType.DAMAGE);
this.battlefieldModel.spawnBonus(bonus, this.inc, 30);
}
break;
case 6:
if (this.battlefieldModel.battleInfo.map.nitrosRegions.size() > 0) {
index = this.random.nextInt(this.battlefieldModel.battleInfo.map.nitrosRegions.size());
region = (BonusRegion)this.battlefieldModel.battleInfo.map.nitrosRegions.get(index);
bonus = new Bonus(this.getRandomSpawnPostiton(region), BonusType.NITRO);
this.battlefieldModel.spawnBonus(bonus, this.inc, 30);
}
}
++this.inc;
}
public void battleFinished() {
this.prevFund = 0;
this.crystallFund = 0;
this.goldFund = 0;
this.nextGoldFund = (int)RandomUtils.getRandom(700.0F, 730.0F);
}
private Vector3 getRandomSpawnPostiton(BonusRegion region) {
Vector3 f = new Vector3(0.0F, 0.0F, 0.0F);
Random rand = new Random();
f.x = region.min.x + (region.max.x - region.min.x) * rand.nextFloat();
f.y = region.min.y + (region.max.y - region.min.y) * rand.nextFloat();
f.z = region.max.z;
return f;
}
public void updatedFund() {
int deff = (int)this.battlefieldModel.tanksKillModel.getBattleFund() - this.prevFund;
this.goldFund += deff;
this.crystallFund += deff;
if (this.goldFund >= this.nextGoldFund) {
this.spawnBonus(BonusType.GOLD);
this.nextGoldFund = (int)RandomUtils.getRandom(700.0F, 730.0F);
this.goldFund = 0;
}
if (this.crystallFund >= 6) {
for(int i = 0; i < (int)RandomUtils.getRandom(1.0F, 6.0F); ++i) {
this.spawnBonus(BonusType.CRYSTALL);
}
this.crystallFund = 0;
}
this.prevFund = (int)this.battlefieldModel.tanksKillModel.getBattleFund();
}
public void run() {
if (this.battlefieldModel.battleInfo.map.crystallsRegions.size() <= 0 && this.battlefieldModel.battleInfo.map.goldsRegions.size() <= 0) {
this.battlefieldModel = null;
}
while(this.battlefieldModel != null) {
try {
Thread.sleep(5000L);
if (this.battlefieldModel == null || this.battlefieldModel.players == null) {
break;
}
this.spawnRandomBonus();
} catch (InterruptedException var2) {
Logger.log(Type.ERROR, var2.getMessage());
}
}
}
// $FF: synthetic method
static int[] $SWITCH_TABLE$gtanks$battles$bonuses$BonusType() {
int[] var10000 = $SWITCH_TABLE$gtanks$battles$bonuses$BonusType;
if (var10000 != null) {
return var10000;
} else {
int[] var0 = new int[BonusType.values().length];
try {
var0[BonusType.ARMOR.ordinal()] = 3;
} catch (NoSuchFieldError var6) {
}
try {
var0[BonusType.CRYSTALL.ordinal()] = 2;
} catch (NoSuchFieldError var5) {
}
try {
var0[BonusType.DAMAGE.ordinal()] = 5;
} catch (NoSuchFieldError var4) {
}
try {
var0[BonusType.GOLD.ordinal()] = 1;
} catch (NoSuchFieldError var3) {
}
try {
var0[BonusType.HEALTH.ordinal()] = 4;
} catch (NoSuchFieldError var2) {
}
try {
var0[BonusType.NITRO.ordinal()] = 6;
} catch (NoSuchFieldError var1) {
}
$SWITCH_TABLE$gtanks$battles$bonuses$BonusType = var0;
return var0;
}
}
}
что здесь отвечает за время падание gold, и за высоту его падения
|
a082836c0ec58176f9f00d9148e7157e
|
{
"intermediate": 0.30342215299606323,
"beginner": 0.521099865436554,
"expert": 0.175477996468544
}
|
30,858
|
You are an expert developmental editor, adept in character creation and plotting. Review the provided character profiles, identify issues with character development, consistency, plausibility, etc.
For each area needing improvement, provide concrete examples from the character descriptions and suggest enhancements. Ensure feedback is specific and aims to improve the character profiles.
[AI PAUSE]
Make sure your suggestions contain the Examples to explanations in a token-efficient xml form (as concise as possible).
<characterDescriptions>
<mainCharacters>
<character name= “Rhaenyra” age= “34”>
A crown princess of the Seven Kingdoms, has 5 sons, pregnant with her sixth child. Widow of Laenor, is married to her uncle Daemon. First ever female heir to the Iron Throne but her younger half-brothers and their faction dispute her claim. Lives with her family on Dragonstone Island, ruling her castle. Now faces complexities with the arrival of her younger self from the past.
<relationships>
<relationships>
<kin>
<relationship name= “Daemon” role= “husband” status= “full ally” dynamics= “Close friend, main ally, and lover.” />
<relationship name= “Viserys I” role= “father” status= “supportive” dynamics= “Beloved father and her king” />
</kin>
<relationship role= “children” status= “loved” dynamics= “Her beloved children, whom she adores unconditionally, although potential future complications are foreshadowed.” />
<relationship name= “Rhaenys” role= “conditional ally” status= “tense” dynamics= “Rhaenyra needs her support” />
<non-kin>
<relationship name= “Alicent” role= “rival” status= “complicated” dynamics= “Former friend turned rival, relationship soured over time due to political and personal differences.” />
<relationship name= “Otto” role= “adversary” status= “hostile” dynamics= “Overt political adversary, openly opposes her claim to the throne.” />
<relationship name= “Criston” role= “skeptic” status= “tense” dynamics= “Rhaenyra seduced Criston in her own timeline and he betrayed her later so she is wary around this Criston too.” />
</non-kin>
</relationships>
<appearance> rather tall, has pale skin, silver-gold long hair, usually braided; violet narrow eyes. Aquiline nose. Very beautiful. Wears flowing silk and velvet gowns in Targaryen colors of black and red, sometimes wears clothes in of icy-blue and silver shades. Also likes purple and golden tones.
</appearance>
<beliefs> doesn’t feel strongly about the law, greatly prizes loyalty, values family, thinks friendship is important, finds blind honesty foolish, respects fair-dealing and fair-play, doesn’t have any strong feelings about tradition, values independence, values sacrifice, leisure time, romance, values peace over war.
</beliefs>
<personality> Rhaenyra easily develops positive sentiments, is quick to anger, often feels lustful, is stubborn, doesn’t mind a little tumult and discord in her life, tends to ask others for help with difficult decisions, is pleased by her own appearance and talents, isn’t particularly ambitious, doesn’t mind wearing something special now and again, tends not to reveal personal information, forms strong emotional bonds with others, has a sense of duty and it conflicts with her love for independence, enjoys the company of others, is assertive.
</personality>
<motivation>
<outerMotivation> Securing the Future for Her Family</outerMotivation>
<goal>Send Daemion and Nyra back to their time, keep her children alive, and prevent a civil war which will otherwise come to pass.
<stakes> potential death of her sons and extinction of all dragons</stakes>
</goal>
<unmetNeed general= “Safety and Security” specific= “Protect her loved ones” />
</motivation>
<primaryWound >
Keeping A Dark Secret of Her Sons Parentage i.e., her first three sons are not from her late husband Laenor, therefore are bastards, and she is guilty of an adultery and treason.
</primaryWound>
<primaryFear>
Legal repercussions (being accused of high treason, losing her status, children being punished) if the truth about her treason comes out.
</primaryFear>
<primaryLie>
The wellbeing of her family is more important than the truth about her sons.
</primaryLie>
<positiveTraits>
Affectionate, Protective, Open-Minded, Courageous
<positiveTraits>
<negativeTraits>
Ignorant, Dishonest
</negative traits>
<innerStruggles>
• Balancing her desire to be a traditional mother and wife with the pressures of being a Crown Princess, which does not align with her gradually shifting priorities and the societal expectation of a female ruler.
• The conflict between her duty to her father’s legacy and her exhaustion from facing adversity from the society, leading to internal turmoil.
</innerStruggles>
<enneagram>
Type 2 wing 3
<coreFear> Being rejected and unwanted, being thought worthless, needy, inconsequential, dispensable.
</coreFear>
<coreDesire> Being appreciated, loved, and wanted.
</enneagram>
<mbti
ESFP
</mbti>
<archetypicalArc>
Symbolically represents the Too-Good Mother, stifling the growth of her children. Learns to accept and use her power in relationship and in authority. If she wishes to protect her family, she must now expand her capabilities and become active.
</archetypicalArc>
<tells>
Confrontation: Tries to diffuse tension and find compromise. Can become aggressive and sassy if displeased.
Surprise: Initially caught off guard but quickly regains composure. Curious about the situation.
Comfort/Relaxation: Loves spending time with her family. Finds joy in music, flying and leisure activities.
</tells>
</character>
<character>
<realName>Rhaenyra Targaryen</realName>
<alias>Naelyra “Nyra” Kirines</alias>
<age>18</age>
Young Rhaenyra, pulled from the past, 17 years ago, into her own future, adopts the alias “Nyra” to protect the timeline while learning about her eventual future.
<relationships>
• Nyra loves her father Viserys I but feels pressured but his demands to marry.
• Nyra is enamored with her uncle, Daemion, but her father Viserys I plans to marry her to her second cousin Laenor.
• Nyra disdains her half-brother Aegon II.
• Alicent was her former best friend but they fell out in recent years as Nyra feels betrayed by Alicent.
• Nyra distrusts Otto as he hopes to make his grandson Aegon II an heir.
• Nyra is friendly towards Laenor but doesn’t feel any romantic feelings to him.
• Nyra finds Criston handsome and enjoys their easy rapport.
<appearance> medium height, silver-gold long straight hair, usually braided or loose, violet narrow eyes. Slender and very beautiful.
<personality> doesn’t feel strongly about the law, greatly prizes loyalty, values family, thinks friendship is important, finds blind honesty foolish, values cunning, respects fair-dealing and fair-play, disregards tradition, values independence, doesn’t really see the value in self-examination, values hard work, values sacrifice, values leisure time, values romance, values peace over war.
<motivation>
<outerMotivation>
• Gaining Control Over Her Own Life.
• Making Her Father Proud.
</outerMotivation>
<goal> To return to her time, avoid the arranged marriage with Laenor Velaryon and marry Daemion as soon as possible.
<stakes> Living an unfulfilled life<stakes>
</goal>
<unmetNeed general= “Love and Belonging” specific= “To love without reservation” />
</motivation>
<primaryWound>
• Being Treated as Property, i.e., having her marriage arranged against her will to benefit her family.
</primaryWound>
<primaryFear>
Being used by others.
</primaryFear>
<primaryLie>
What she wants doesn’t matter to anyone.
</primaryLie>
<positiveTraits>
Affectionate, Protective, Tolerant, Spunky
</positiveTraits>
<negativeTraits>
Bratty, Dishonest, Rebellious, Ignorant
</negativeTraits >
<skills>
Charm, Lying, High Pain Tolerance
</skills>
<innerStruggles>
1. Nyra constantly struggles between following her heart and doing her duty. She wants to marry for love, but feels she owes it to her father to marry for political benefit.
2. Nyra feels pushed towards specific path, wants to marry for love but worries her father may disinherit her.
3. Nyra desires Daemion, but finds him too unpredictable, fears he wants her only for her status.
</innerStruggles>
<enneagram>
Type 2 wing 3
Core Fear: Being rejected and unwanted, being thought worthless, needy, inconsequential, dispensable.
Core Desire: Being appreciated, loved, and wanted.
</enneagram>
<mbti
ESFP
</mbti>
<archetypicalArc>
Coming of age – final part. Nyra doesn’t want to surrender what she has discovered about herself and about life. She will not hide her newly won understanding of her own potential, desires and dangers. She is ready to fight back against her father and her older self and everyone who hinders her marriage to Daemion.
</archetypicalArc>
<tells>
Confrontation: Answers with confidence and assertiveness. Often becomes pushy and sassy if displeased.
Surprise: Initially caught off guard but quickly regains composure. Curious about the situation, open to new experiences.
Comfort/Relaxation: Loves spending time with her family. Finds joy in music, flying and leisure activities.
</tells>
</character>
<character name= “Daemon Targaryen” nickname= “The Rogue Prince” age= “50”>
He is married to his niece Rhaenyra, stepfather of Jace, Lucerys, Joffrey, father of Baela and Rhaena, cousin and former son-in-law of princess Rhaenys.
<relationships>
• Truly loves few people, most of all his wife Rhaenyra and older brother Viserys I.
• He cares about his children.
• He was fond of his late wife Laena but didn’t love her as he should.
• Hates Otto and disdains Alicent for spreading rumors about him.
• Despises Criston for his hypocrisy.
• He is hostile to princes Aegon II, Aemond, Daeron.
• Former war ally and son-in-law of Corlys.
• Moderately respects his cousin Rhaenys as they grew up together.
• Commands respect among peers and enemies, is feared and hated by many lords.
</relationships>
<beliefs> values loyalty, values his family greatly, values cunning, sees life as unfair and doesn’t mind it that way, finds merrymaking and partying worthwhile activities, sees war as a useful means to an end.
<personality> Daemon is quick to form negative views about things, is very quick to anger, disregards tradition, does not easily fall in love, often feels lustful, feels strong urges and seeks short-term rewards, likes to brawl, is very stubborn, is very impolite and inconsiderate of propriety, he is incredibly brave in the face of looming danger, even a bit foolhardy.
</personality>
<skills>
Skilled warrior, experienced commander and great swordfighter.
</skills>
<appearance> tall, lean and muscular, silver-blonde short hair, rectangular face with high forehead and angular edges, deep-seated purple eyes, thin pale brows, large square chin. Wrinkles on his forehead and near the eyes. Attractive.
<motivation>
<outerMotivation>
Protecting His Family
</outerMotivation>
<unmetNeed general= “Safety and Security” specific= “To protect his loved ones and ensure the safer future” />
</motivation>
<primaryWound>
Being repeatedly banished by his brother <Viserys I for perceived disloyalty to the family.
</primaryWound>
<secondaryWound>
Watching his favorite women die in labor – Daemon is traumatized by his former wife Laena dying in labor. His mother and great-grandmother also died from birth fever.
</secondaryWound>
<primaryFear>
Being Rejected by Loved Ones Who Believe Some Lies About Him or Skewed Account of Events
</primaryFear>
<primaryLie>
</primaryLie>
<conflicts
<enneagram>
Enneagram Type 8 wing 7.
Core Fear: Being weak, powerless, controlled, vulnerable.
Core Desire: Protecting himself and those in his inner circle.
Core Weakness: Lust/Excess—constantly desiring intensity, control, and power
</enneagram>
<innerStruggles>
Daemon wants to change the past mistakes and let Nyra and Daemion marry, but this will lead to the nonexistence of his daughters Baela and Rhaena.
</innerStruggles>
</enneagram>
<mbti>
ESTP
</mbti>
<archetypicalArc>
Flat-arc archetype of a Ruler: represents the authority figure, an alpha male in his household who enjoys that role. He provides for his family, and rises to any challenge, but sees emotions as weaknesses.
</archetypicalArc>
<tells>
Confrontation: Becomes aggressive, sassy and defiant. Won’t back down first.
Surprise: Initially startled but quickly recovers and analyzes the situation.
Comfort/Relaxation: Seeks thrills and excitement. Loves physical pursuits and physical intimacy.
Being Challenged: Relishes the opportunity to prove his power and skill. Throws cutting remarks and mocks his opponent.
Betrayal - Would react with rage and vengeance. Has a long memory for grudges.
Battle - Reckless and fierce fighter. Drawn to violence and chaos.
Diplomacy - Impatient and disinterested. Prefers action over talk. Can be blunt to the point of insult. Can be cunning and charming if needed.
</tells>
</character>
<character name= “Daemion Kirines” age= “34”>
A younger version of Daemon transferred through the time from 17 years ago. A few days ago, secretly killed his first wife Rhea Royce, since she hindered his plans to marry Nyra.
<skills>
Charm, Lying, High Pain Tolerance, A way with animals, Organization, Making Friends, Great swordsman
</skills>
<appearance> tall, lean and muscular, silver-blonde short hair, rectangular face with high forehead and angular edges, small purple deep-set eyes, thin pale brows, large chin. Attractive.
</appearance>
• Him and Nyra have become secret lovers, trying to elope.
• He is somewhat unfriendly towards Jace and Lucerys, due to them being sons of another man.
• He is irritable towards Rhaenyra, due to her opposition to his plans.
• He is very hostile towards Criston due to the old grudge.
• War ally and a friend of Corlys.
• Moderately respects his cousin Rhaenys.
• Is indifferent towards Laena and feels strongly about it.
• He is doubtful towards Baela and Rhaena, and is hiding these feelings about it. The feelings spring from first impressions.
• He is a respected commander but hated by many lords due to his bad reputation.
<motivation>
<outerMotivation>
Correcting A Perceived Mistake
<goal>settle down and start a family with Nyra, become her prince consort instead of Laenor </goal>
</outerMotivation>
<unmetNeed general= “Love and Belonging” specific= “To feel part of a family” />
</motivation>
<primaryWound>
A Sibling’s Betrayal – his brother believing the worst rumors about him.
<woundResponses>
• Playing the blame game.
• Refusing to accept responsibility for the rift or what caused it, though he shares the blame.
• Being overly sensitive to signs of disloyalty from others.
</woundResponses>
</primaryWound>
<primaryFear >
Being rejected by loved ones who believe some lies or skewed account of events
</primaryFear>
<primaryLie>
Even his family doesn’t respect him
</primaryLie>
<positiveTraits>
Loyal, Protective, Resourceful, Intelligent
</positiveTraits>
<negativeTraits>
Volatile, Abrasive, Violent
</negativeTraits>
<enneagram>
Enneagram Type 8 wing 7
Core Fear: Being weak, powerless, harmed, controlled, vulnerable
Core Desire: Protecting yourself and those in his inner circle.
Core Weakness: Lust/Excess—constantly desiring intensity, control, and power.
</enneagram>
<innerStruggles>
• He is angry at Rhaenyra and Baela for hindering his attempts to marry Nyra, but he can’t harm them as his close kin.
• He wants to marry Nyra but fears that his brother Viserys I may disown her for eloping against his wishes.
<innerStruggles>
<archetypicalArc>
Flat character, who symbolically and literally returned from the war who may now enjoy a hard-won and justly deserved peace. He yearns to settle down, mentor symbolical “children” and nurture the next generation.
</archetypicalArc>
</character>
<character name= “Jacaerys Velaryon” nickname= “Jace” age= “15”>
Firstborn son and an heir of Rhaenyra and Laenor, great-nephew of Daemon, brother of Lucerys, Joffrey, Aegon the Younger, Viserys. He is formally second in line to the Iron Throne but rumors about his bastardy made his status doubtful.
<appearance> He is short for his age and has a slender build, dark brown curly hair and brown eyes. Handsome.
</appearance>
<relationships>
• Jace harbors a profound resentment towards Daemion. His unfriendliness masks an underlying fear of confrontation, as Daemion’s words stir the insecurities he wishes to keep buried.
• Jacaerys sees in Baela a kindred spirit, admiring her tenacity and spirit. He flirts with a mix of genuine affection and strategic alliance, as their union might bolster his claim to the throne.
• He is moderately antagonistic to Nyra, due to difference in character and attitudes.
• He is wary towards Criston, since the knight will become his enemy in future, and is hiding these feelings.
• He is wary but respectful towards Daemon.
</relationships>
<beliefs> Jace respects the law, greatly prizes loyalty, values family greatly, doesn’t find power particularly praiseworthy, respects fair-dealing and fair-play, values decorum and proper behavior, values tradition, values tranquility and a peaceful day, values merrymaking, deeply respects skill at arms, values peace over war.
</beliefs>
<personality>can easily fall in love or develop positive sentiments, often feels envious of others, is quick to anger, is a friendly individual, can be occasionally violent, is stubborn, is quite polite, doesn’t tend to hold on to grievances, enjoys the company of others, has a strong sense of duty, likes a little excitement now and then, he is incredibly brave in the face of looming danger.
</personality>
<motivation>
<outerMotivation>
Doing The Right Thing
<outerMotivation>
<goal> fix the damage caused by the magical ritual that he took part in, help his family to avoid the future war.
</goal>
<stakes>
• Trust issues and damaged relationships with Baela.
• Baela’s life changing for the worse.
</stakes>
<unmetNeed general= “Esteem and Recognition” specific= “To prove worthiness as heir” />
</motivation>
<primaryWound>
Being The Victim of Vicious Rumors –That he is a bastard, not a son of Laenor, therefore unworthy of a throne.
<woundResponse>
• Vacillating between anger, embarrassment, and humiliation.
• Making it a goal to prove the rumor of his bastardy wrong.
</primaryWound>
<secondaryWound>
Experiencing The Death of a Father as A Child
</secondaryWound>
<primaryFear>
Letting His Family Down
<fearRelatedBehaviors>
• Tries to prove the rumors of his bastardy wrong by being a kind, dutiful and proper person, as bastards are perceived to be savage and sinful.
• He is empathetic and sensitive to other’s emotions.
• Spends free time on pursuits that will make him a better heir.
• Worries about the repercussions or falling short or making a mistake.
</fearRelatedBehaviors>
</primaryFear>
<primaryLie>
He can never achieve his hopes and dreams with this taint hanging over his head.
<primaryLie>
<positiveTraits>
Proper, Responsible, Empathetic, Honorable
</positiveTraits>
<negativeTraits>
Temperamental, Stubborn
</negativeTraits>
<innerStruggles>
• He is torn between being a loyal son to his mother and supporting his betrothed Baela and helping her with her schemes.
• He wants to get new appearance by magic ritual but feels guilty that he betrays his dead father by rejecting resemblance with him.
</innerStruggles>
<enneagram>
Enneagram Type 3 wing 4
Core Fear: Being exposed as or thought incompetent, inefficient, or worthless.
Core Desire: Having high status and respect, being admired, successful, and valuable.
Core Weakness: Deceit — deceiving himself into believing that he is only the image he presents to others; embellishing the truth by putting on a polished persona for everyone to see and admire. A self-image that in turn compensates for the deep sense of awkwardness and shame that lies behind the mask.
</enneagram>
<mbti>
ENFJ
</mbti>
<storyRole>
Sidekick of an antagonist
</storyRole>
</character>
</mainCharacters>
<secondaryCharacters>
<character name= “Lucerys” nickname= “Luke” age= “14”>
Prince, second son of Rhaenyra and Laenor, great-nephew of Daemon. Formally the heir to the Lordship of Driftmark, but his status is contested by other Velaryons, relatives of Corlys.
<Appearance> he is short, has thick brown wavy hair, hazel eyes, pug nose. </appearance>
• He is highly friendly towards Jacaerys, Joffrey, Baela, Rhaena.
• He is extremely wary towards Criston, and will be difficult to persuade otherwise about it.
• He is admiring towards Rhaenyra, and has strong feelings about it.
• He is moderately compassionate towards Naelyra.
<personality> Luke respects the law, greatly prizes loyalty, values family, doesn’t find power particularly praiseworthy, values honesty, respects fair-dealing and fair-play, values decorum, values tradition, values tranquility and a peaceful day, doesn’t really value merrymaking, values martial prowess, values hard work, sees competition as wasteful, doesn’t care one way or the other about romance, values peace over war.
<personality>can easily fall in love or develop positive sentiments, often feels envious of others, often feels discouraged, cracks easily under pressure, is a friendly individual, tends to ask others for help with difficult decisions, takes no pleasure in his talents, frowns on any flashy accoutrements, can be occasionally violent, is quite polite, doesn’t tend to hold on to grievances, has a sense of duty, is trusting, likes to take it easy, has a low sense of self-esteem.
<motivation>
Solving A Problem
<goal>repair the damage caused by his ritual but keep the results (changed looks) </goal>
<unmetNeed general= “Esteem and Recognition” specific= “To regain the respect of others” />
</motivation>
<primaryWound>
Being Rejected by His Peers – Because he is a rumored bastard, not a son of his legal father.
<woundResponses>
• Having low self-esteem and self-worth.
• Walking into a public space and feeling watched, as if everyone is staring.
• Trying to dye his hair to fly under the public’s radar.
• Mistrusting new people.
</woundResponses>
</primaryWound>
<secondaryWound>
Experiencing The Death of a Father as A Child
</secondary emotional wound
<primary fear
Prejudice And Discrimination for Being a Bastard
Fear-related behaviors:
<Luke avoids situations where he might be judged, criticized or ridiculed for his rumored illegitimacy and appearance. These include public gatherings and formal events where stares and gossip make him uncomfortable.
</primary fear
<primaryLie>
He’s Defective and Weak and Doesn’t Deserve His Inheritance.
</primaryLie>
<positiveTraits>
Honorable, Kind, Honest
</positiveTraits>
<negativeTraits>
Insecure, Worrywart
</negativeTraits>
<innerStruggles>
• He hates sailing, but he feels he owes it to his family to become Lord Corlys’ heir.
• he doesn’t believe he has the skills or knowledge to succeed in a role of a Lord of Driftmark.
<enneagram>
Enneagram Type 6 wing 7
</enneagram>
<mbti>
ISFP
<mbti>
</character>
<character name= “Baela Targaryen” age= “14”>
The firstborn daughter of Daemon and Laena, sister of Rhaena.
Just in few weeks after Laena burial Daemon married his niece Rhaenyra, his daughters were shocked by such hurried event. But eventually Baela learnt to like her new stepmother and gets along well with her cousins/stepbrothers Jace and Luke.
<relationships>
• She loves her sister Rhaena, cares a lot about her younger brothers Aegon the Younger and Viserys.
• Is respectful and friendly to her grandmother Rhaenys.
• She is flirtatious with her betrothed Jace.
• She is friendly and respectful with her stepmother Rhaenyra.
• Respects her father Daemon but often disagrees with him.
• Feels very conflicted about Nyra and Daemion, she likes them as persons but their actions threaten her life.
</relationships>
<appearance> Baela is striking, she is of above average height, brown skin, oval face, thick curly silver-blonde hair, purple eyes.
<personality> Baela values loyalty, values family greatly, values cunning, does not care about fairness, disregards tradition, finds merrymaking and partying worthwhile activities, values romance, values martial prowess, prefers a noisy, bustling life to boring days without activity, sees war as sometimes necessary.
<personality>Baela is quick to form negative views about things, is rarely jealous, is quick to anger, rarely feels discouraged, is confident under pressure, can easily fall in love, often feels lustful, feels strong urges and seeks short-term rewards, likes to brawl, is stubborn, could be considered rude, is brave in the face of imminent danger. </personality>
<motivation>
<outerMotivation>
<goal>Stop the courting between Nyra and Daemion, because if they change the past and marry sooner, Baela and Rhaena won’t be born.
</goal>
</outerMotivation>
<unmetNeed general= “Safety and Security” specific= “To ensure her family’s existence” />
</motivation>
<primaryWound>
Experiencing The Death Of her mother as a Child
</primaryWound>
<primaryFear>
Losing Another Loved One
<fearRelatedBehaviors>
</fearRelatedBehaviors>
</primary fear
<primaryLie>
People don’t want to hear about her pain so it’s best to just shut up about it.
</primaryLie>
<positiveTraits>
Confident, Honorable, Passionate, Daring
</positiveTraits>
<negativeTraits>
Reckless, Mischievous
</negativeTraits>
<innerStruggles>
Baela gradually builds resentment to her parents, both current and younger versions.
</innerStruggles>
<enneagram>
“Enneagram Type 8 wing 7
Core Fear: Being weak, powerless, harmed, controlled, vulnerable
Core Desire: Protecting herself and those in her inner circle.
Core Weakness: Lust/Excess—constantly desiring intensity, control, and power
</enneagram>
<MBTI
ESTP
</mbti>
</character>
<character name= “Rhaena Targaryen” age= “14”>
Second daughter of Daemon and Laena, stepdaughter and a cousin of Rhaenyra. Betrothed to Lucerys. Dreams of hatching her own dragon and of falling in love with some handsome knight.
• She is respectful and trusting towards Rhaenyra, friendly to Jace and Lucerys, adores her younger brothers.
• Feels disdainful towards Aegon II, Aemond, Alicent.
• She is wary towards Criston.
<appearance> Rhaena is pretty, of average height, slender, brown skin, square face, thick curly silver-blonde hair, light purple eyes </appearance>
<beliefs> Rhaena values loyalty, values family greatly, thinks friendship is important, values eloquence, values decorum, greatly respects artists and their works, finds merrymaking and partying worthwhile activities, values romance, strongly values tranquility and quiet, values nature, prefers a noisy, bustling life to boring days without activity, believes that peace is always preferable to war. </beliefs>
<personality>Rhaena can easily fall in love or develop positive sentiments, is sometimes jealous, is often cheerful, has a calm demeanor, is a friendly individual, often acts with compassion, is not pleased by her own talents, finds helping others emotionally rewarding, likes to take it easy, is given to flights of fancy, enjoys the company of others, is moved by art and natural beauty. </personality>
<motivation>
<outerMotivation>
Stopping An Event from Happening
<goal> stop Daemion and Nyra from eloping before they return to the past. </goal>
</outerMotivation>
<unmetNeed general= “Safety and Security” specific= “To ensure her family’s and her own existence”
</motivation>
<primaryFear>
Never being able to distinguish herself.
</primaryFear>
<primaryWound>
Growing Up in The Shadow of a Successful Sibling – Rhaena’s sister Baela is brave, assertive and a dragonrider.
• Being driven to succeed hatching her own dragon.
• Struggling with low self-worth.
</primaryWound>
<primaryLie>
People will always be more interested in her sister than in her.
</primaryLie>
<innerStruggles>
• She wants to marry for love, but feels she owes it to her family to marry Luke and combine bloodlines.
• She doesn’t love Luke but hopes their friendship will turn into love in time.
</innerStruggles>
<enneagram>
“Enneagram Type 4 wing 3”
Core Fear: Being inadequate, emotionally cut off, plain, mundane.
Core Desire: Being unique, special, and authentic.
Core Weakness: Envy—feeling that she is flawed, something foundational is missing inside her, and others possess qualities she lacks.
</enneagram>
<storyRole>
Contagonist
</storyRole>
<education>
Receiving private tuition, doing very well. Is very good at maths, arts, dancing, sewing, music.
</education>
</character>
<character name= “Criston Cole” age= “27”>
<timePeriod>past</timePeriod>
A knight, a Kingsguard and a sworn guard of princess Nyra. Comes from a poor steward family and considers being chosen as a Kingsguard as the highest honor.
Was transported from the past along with Nyra.
<relationships>
<relationship name= “Rhaenyra” role= “ally-turned-adversary” status= “present” dynamics= “Begins with respect towards Rhaenyra but evolves into doubt and secret unfriendliness due to rumors.” />
<relationship name= “Daemion” role= “rival” dynamics= “Disdains him, fueled by personal prejudices and jealousy, believes he is unworthy of Nyra.” />
<relationship name= “Naelyra” role= “protector” dynamics= “Worships her as the ideal princess, harboring secret affection but gradually loses respect and becomes hostile.” />
<relationship name= “Daemon” dynamics= “Extremely unfriendly and stubborn due to personal prejudices and jealousy.” />
<relationship name= “Jace” role= “dismissive” dynamics= “Moderately condescending, influenced by the boy’s looks and rumors.” />
<relationship name= “Lucerys” role= “critical” dynamics= “Somewhat disdainful, motivated by rumors and the boy’s lack of martial prowess.” />
</relationships>
<skills> Expert swordsman: Criston is one of the best knights in the whole realm, he defeated Daemion in the tourney once. Great maceman. Adept military tactic and organizer.
</skills>
<appearance> Lean, muscular, medium height, light-tan skin. Very handsome man. Close-cropped wavy dark-brown hair, hazel eyes. Often wears white armor of the Kingsguard.
</appearance>
<beliefs> Criston respects the law, values loyalty, thinks friendship is important, sees life as unfair and doesn’t mind it that way, values decorum, dignity and proper behavior, values tradition, believes it is important to conceal emotions, sees merrymaking as a waste, deeply respects skill at arms, values hard work, believes that those who sacrifice for others should be deeply respected, respects perseverance, doesn’t care about romance, values peace over war.
</beliefs>
<personality> Criston is prone to hatreds, is prone to strong jealousy, is rarely happy, is quick to anger, rarely looks on others with lust, doesn’t handle stress well, doesn’t focus on material goods, is given to rough-and-tumble brawling, is somewhat quarrelsome, is brave in the face of imminent danger, is extremely confident of himself in situations requiring his skills, is quite ambitious, is grateful when others help him out, is vengeful and never forgets or forgives past grievances, is a perfectionist, is emotionally obsessive, has a strong sense of duty, lives an orderly life.</personality>
<motivation>
<outerMotivation>
Doing The Right Thing
<goal>Protect Nyra from Daemion’s romantic advances and ensure her safe return to her own time.
</goal>
</outerMotivation>
<unmetNeed general= “Esteem and Recognition” specific= “To gain recognition for his loyal servitude” />
</motivation>
<enneagram>
Enneagram Type 6 wing 5
</Enneagram
<negativeTraits>
Resentful, Hypocritical
</negativeTraits>
<tells>
Betrayal - Would be deeply troubled but keeps anger internalized until he blows up.
Battle - Disciplined and efficient fighter. Focuses on technical skill over flair.
Diplomacy - Blunt and direct. Distrusts flowery words and niceties but can be polite. Favors concrete agreements over abstract values.
</tells>
</character>
|
9d9cefed0deadb041ee5c989f42a6e70
|
{
"intermediate": 0.37332454323768616,
"beginner": 0.3368609845638275,
"expert": 0.2898145318031311
}
|
30,859
|
give equiavelent of this in secrets module: delay = random.randint(MIN_DELAY, MAX_DELAY)
|
15594975bbece741dfe3ff7fd29b9289
|
{
"intermediate": 0.37186679244041443,
"beginner": 0.22597236931324005,
"expert": 0.4021608531475067
}
|
30,860
|
hey. if i'm generating a random number between -2.5 and 2.5, what is a good way to disincline the random number from being close to 0?
|
0432db233046cb6385dd7f68fb44ec0d
|
{
"intermediate": 0.32775843143463135,
"beginner": 0.1530110388994217,
"expert": 0.5192305445671082
}
|
30,861
|
In golang, what are *.mod files?
|
c6efccc794c028b25090a94ab5186684
|
{
"intermediate": 0.5106252431869507,
"beginner": 0.19164487719535828,
"expert": 0.29772984981536865
}
|
30,862
|
Сделай из этого дага простой скрипт на python:
import json
import logging
import pandas as pd
import numpy as np
from pathlib import Path
from typing import Any, Optional, Dict, List
from airflow import DAG
from airflow.operators.python import PythonOperator
from airflow.providers.http.hooks.http import HttpHook
from configs import settings
from plugins.search_indices.extractors import CsvFileExtractor
logger = logging.getLogger(__file__)
def transfer_brand_transliteration_data_dag(
dag: DAG,
default_args: Dict[str, Any]
) -> PythonOperator:
return PythonOperator(
task_id='transfer_brand_transliterations_from_producers_feed',
dag=dag,
python_callable=transfer_brand_transliteration_data
)
def transfer_brand_transliteration_data():
producers_feed_fp = Path(settings.PRODUCERS_FEED_FILEPATH)
if not producers_feed_fp.exists():
raise FileNotFoundError(f'Feed not found: {str(producers_feed_fp)}')
brand_transliterations = CsvFileExtractor(
filepath=producers_feed_fp,
required_fields=['name', 'name_ru']
)
exported_data = transform_brand_transliterations(brand_transliterations())
hook = HttpHook(http_conn_id='synonyms_service')
hook.run(
endpoint=settings.API_ENDPOINT_BRAND_TRANSLITERATIONS,
headers={'Content-Type': 'application/json; charset=utf-8'},
data=json.dumps(exported_data)
)
def _compile_transliteration_mapping(data: pd.Series) -> Optional[Dict[str, Any]]:
brand = data['name'].strip()
if not brand:
logger.warning('empty brand value')
return
transliterations = set(w.strip() for w in data['name_ru'].split(','))
if brand in transliterations:
transliterations.remove(brand)
if not transliterations:
logger.warning('empty transliterations value for brand "%s"', brand)
return
return {'brand': brand, 'transliterations': list(transliterations)}
def transform_brand_transliterations(df: pd.DataFrame) -> List[Dict[str, Any]]:
return (
df
# find and drop empty strings with multiple spaces
.replace(r'^\s+$', np.nan, regex=True).dropna()
# prepare mapping for export
.apply(_compile_transliteration_mapping, axis=1)
.dropna()
.tolist()
)
|
2010bcc6780feb5d1864b039644adabe
|
{
"intermediate": 0.43229150772094727,
"beginner": 0.3336435854434967,
"expert": 0.23406481742858887
}
|
30,863
|
<div id="div2" class="">
|
fb1eadbce42a7d3a79c86850eec99ebe
|
{
"intermediate": 0.3181195855140686,
"beginner": 0.26514115929603577,
"expert": 0.4167393147945404
}
|
30,864
|
I am using the youtube data v3 api interface with python and when I run my code I get the error: "KeyError: 'nextPageToken'"
|
486848f510890e172822021fc8605867
|
{
"intermediate": 0.7954739332199097,
"beginner": 0.0604710578918457,
"expert": 0.14405500888824463
}
|
30,865
|
Could you write some simplified pseudocode to explain the implementation of a pseudorandom number generator?
|
bc44520a53e67968adf6ac108984aecd
|
{
"intermediate": 0.2903920114040375,
"beginner": 0.16761289536952972,
"expert": 0.5419950485229492
}
|
30,866
|
Let’s say we have 10 days. We want to record 33 hours evenly to each day. How can you achieve this in JS
|
56ede2d19e10345dfb577956a045f7a0
|
{
"intermediate": 0.375906765460968,
"beginner": 0.24945460259914398,
"expert": 0.3746386170387268
}
|
30,867
|
Write me some python code that implements a pseudorandom number generator from scratch.
|
842fa88f921c0160d6d6f66cb1ef7fcc
|
{
"intermediate": 0.30100154876708984,
"beginner": 0.09247566759586334,
"expert": 0.6065227389335632
}
|
30,868
|
is the below command slowed by any of the pipes? if so, how should I optimize?
grep -P 'queryLog(?!.*rr[1-5])' /tmp/blocky.log | tail -n 8 | sed -E 's/(\[.*\]) (.*):.* client_ip=(.*) client_names=(.*) duration_ms=(.*) question=(.*) response_code=(.*) response_reason=(.*)/\1\t\3\t\4\t\6\t\8\t\5ms/; s/[()]//g' | awk -F'\t' -v OFS='\t' 'BEGIN {print "Timestamp\tClient IP\tClient\tRequest\tResponse\tTime"} {cmd="date -d \"" substr($1,2,length($1)-2) "\" +\"%b %d %H:%M:%S\""; cmd | getline $1; close(cmd); $5=substr($5,1,8); $4=(length($4) > 23)? substr($4,3,17) "...": substr($4,3,length($4)-3); print}' | column -t -s $'\t'
|
f184f8605b00e5a0c6593a13536bfc04
|
{
"intermediate": 0.201661616563797,
"beginner": 0.5935326814651489,
"expert": 0.20480577647686005
}
|
30,869
|
ERROR: for product-search-airflow_redis_1 Cannot start service redis: driver failed programming external connectivity on endpoint product-search-airflow_redis_1 (47cf5883cda88497df719533b9776fda146dd9aa2b202748e3363940697382a5): Bind for 0.0.0.0:6379 failed: port is already allocated
Starting product-search-airflow_postgres_1 ... error
ERROR: for product-search-airflow_postgres_1 Cannot start service postgres: driver failed programming external connectivity on endpoint product-search-airflow_postgres_1 (9aff4e5d0893f1ef8b7def47f5cbb4c73b325adb28cdfddf23c1d8b14086aee6): Bind for 0.0.0.0:5432 failed: port is already allocated
ERROR: for redis Cannot start service redis: driver failed programming external connectivity on endpoint product-search-airflow_redis_1 (47cf5883cda88497df719533b9776fda146dd9aa2b202748e3363940697382a5): Bind for 0.0.0.0:6379 failed: port is already allocated
ERROR: for postgres Cannot start service postgres: driver failed programming external connectivity on endpoint product-search-airflow_postgres_1 (9aff4e5d0893f1ef8b7def47f5cbb4c73b325adb28cdfddf23c1d8b14086aee6): Bind for 0.0.0.0:5432 failed: port is already allocated
|
04b390fc084fb2ce9dbc309c3d1c9e38
|
{
"intermediate": 0.3673540949821472,
"beginner": 0.40485310554504395,
"expert": 0.22779284417629242
}
|
30,870
|
i need help with my js code. it never recognizes my else method. what is wrong:
if (fname.value || mail.value || phone.value || age.value ==="") {
alert("Please fill in all fields.");
event.preventDefault();
} else {
alert("Thank you for your submission.");
document.getElementById("adoptForm").submit();
}
|
f21310cb824d99261f85884a380daba2
|
{
"intermediate": 0.45895421504974365,
"beginner": 0.39817216992378235,
"expert": 0.142873615026474
}
|
30,871
|
how to execute js code from lua 5.1 in Defold
|
7b584d9c59bc493c44a60f04c1b3a887
|
{
"intermediate": 0.2831926643848419,
"beginner": 0.5976386666297913,
"expert": 0.11916867643594742
}
|
30,872
|
create new DBText in VB.NET
|
250e154a081ceb2fc02728b4769bf63f
|
{
"intermediate": 0.42161789536476135,
"beginner": 0.2676926255226135,
"expert": 0.3106895089149475
}
|
30,873
|
create Text in VB.NET
|
50e012b3c1cd0650ee29c694cc625de7
|
{
"intermediate": 0.3478095233440399,
"beginner": 0.2762887179851532,
"expert": 0.3759017884731293
}
|
30,874
|
New issue. I am unsure how to create a for loop that will display the arrays i created in the table cells. The empty space I left between the for and closed bracket is where i am stuck.
var animalNames = [“Name”, “Tyrannosaurus Rex”, “Triceratops”, “Brachiosaurus”, “Velociraptor”, “Dilophosaurus”, “Stegosaurus”, “Carnotaurus”];
var animalDiets = [“Diet”, “Carnivore, Meat”, “Herbivore, Plants”, “Herbivore, Tree”, “Carnivore, Meat”, “Carnivore, Meat”, “Herbivore, Plants”, “Carnivore, Meat”];
var animalSizes = [“Size”, “40 Feet, 15000 Pounds”, “30 Feet, 16000 Pounds”, “80 Feet, 28 Tons”, “7 Feet, 43 Pounds”, “25 Feet, 880 Lb”, “30 Feet, 11000 Pounds”, “30 Feet, 4000 Pounds”];
var animalBehaviors = [“Behavior”, “Predator”, “Gentle giant, but sometimes aggresive”, “Peaceful”, “Predator”, “Predator”, “Peaceful, Defensive”, “Predator”];
function classify() {
document.write(“<table>”);
for(var itr=0; itr<3; itr++){
}
document.write(“</table>”);
}
|
13e308c6996ed275981bde4ac675436c
|
{
"intermediate": 0.17748360335826874,
"beginner": 0.7420518398284912,
"expert": 0.08046451210975647
}
|
30,875
|
how i can write in browser console from Lua script in Defold?
|
e4aec652b5e356722a48532767ffc83e
|
{
"intermediate": 0.6034447550773621,
"beginner": 0.2661697268486023,
"expert": 0.13038542866706848
}
|
30,876
|
how i can write in browser console from Lua script in Defold?
|
f3b9ba8259fd2e40ddd045b484c7ba30
|
{
"intermediate": 0.6034447550773621,
"beginner": 0.2661697268486023,
"expert": 0.13038542866706848
}
|
30,877
|
hey can you explain this function to me?
def make_hyperlink(value):
# url = "https://custom.url/{}"
url = "./{}"
return '=HYPERLINK("%s", "%s")' % (url.format(value), value)
|
8de48fb173aa6af13b8316f180782b33
|
{
"intermediate": 0.5734031200408936,
"beginner": 0.1999400109052658,
"expert": 0.22665689885616302
}
|
30,878
|
Напиши луа скрипт для gamesense.pub
|
c27862a494e08fdde007a4f31c937937
|
{
"intermediate": 0.29455456137657166,
"beginner": 0.3567312955856323,
"expert": 0.34871405363082886
}
|
30,879
|
Write an in character scene between Two police officers who only talk in radio code, about life.
|
0e977894583fa51ff5ecc3a1303ccd38
|
{
"intermediate": 0.36455971002578735,
"beginner": 0.2958470582962036,
"expert": 0.33959320187568665
}
|
30,880
|
:struct 'resolver' {
state = {},
counter = {},
jitterhelper = function(self)
if self.ui.menu.Misc.resolver() then
local players = entity.get_players(true)
if #players == 0 then
return
end
resolver_status = self.ui.menu.Misc.resolver_flag()
for _, i in next, players do
local target = i
if self.globals.resolver_data[target] == nil then
local data = self.helpers:fetch_data(target)
self.globals.resolver_data[target] = {
current = data,
last_valid_record = data
}
else
local simulation_time = self.helpers:time_to_ticks(entity.get_prop(target, "m_flSimulationTime"))
if simulation_time ~= self.globals.resolver_data[target].current.simulation_time then
table.insert(self.globals.resolver_data[target], 1, self.globals.resolver_data[target].current)
local data = self.helpers:fetch_data(target)
if simulation_time - self.globals.resolver_data[target].current.simulation_time >= 1 then
self.globals.resolver_data[target].last_valid_record = data
end
self.globals.resolver_data[target].current = data
for i = #self.globals.resolver_data[target], 1, -1 do
if #self.globals.resolver_data[target] > 16 then
table.remove(self.globals.resolver_data[target], i)
end
end
end
end
if self.globals.resolver_data[target][1] == nil or self.globals.resolver_data[target][2] == nil or self.globals.resolver_data[target][3] == nil or self.globals.resolver_data[target][6] == nil or self.globals.resolver_data[target][7] == nil then
return
end
local yaw_delta = self.helpers:normalize(self.globals.resolver_data[target].current.eye_angles.y - self.globals.resolver_data[target][1].eye_angles.y)
local yaw_delta2 = self.helpers:normalize(self.globals.resolver_data[target][2].eye_angles.y - self.globals.resolver_data[target][3].eye_angles.y)
local yaw_delta3 = self.helpers:normalize(self.globals.resolver_data[target][6].eye_angles.y - self.globals.resolver_data[target][7].eye_angles.y)
local min_yaw_delta = 33
if math.abs(yaw_delta) >= 33 then
self.globals.resolver_data[target].lastyawupdate = globals.tickcount() + 10
self.globals.resolver_data[target].side = yaw_delta
end
if self.globals.resolver_data[target].lastyawupdate == nil then self.globals.resolver_data[target].lastyawupdate = 0 end
if self.globals.resolver_data[target].lastplistupdate == nil then self.globals.resolver_data[target].lastplistupdate = 0 end
if self.globals.resolver_data[target].skitterupdate == nil then self.globals.resolver_data[target].skitterupdate = 0 end
local max_yaw_delta = 90
if math.abs(yaw_delta2 - yaw_delta3) > 90 then
self.globals.resolver_data[target].skitterupdate = globals.tickcount() + 10
end
if self.globals.resolver_data[target].skitterupdate - globals.tickcount() > 0 then
self.state[target] = "SKITTER"
resolver_flag[target] = "SKITTER"
if math.abs(yaw_delta2 - yaw_delta3) == 0 then
plist.set(target, "Force body yaw value", 0)
else
plist.set(target, "Force body yaw value", (yaw_delta) > 0 and 59 or -59)
end
elseif self.globals.resolver_data[target].lastyawupdate > globals.tickcount() and yaw_delta == 0 and self.globals.resolver_data[target].skitterupdate - globals.tickcount() < 0 then
plist.set(target, "Force body yaw", true)
plist.set(target, "Force body yaw value", (self.globals.resolver_data[target].side) > 0 and 59 or -59)
self.globals.resolver_data[target].lastplistupdate = globals.tickcount() + 10
self.state[target] = "CENTER"
resolver_flag[target] = "JITTER"
elseif math.abs(yaw_delta) >= 33 then
plist.set(target, "Force body yaw", true)
plist.set(target, "Force body yaw value", (yaw_delta) > 0 and 59 or -59)
self.state[target] = "CENTER"
resolver_flag[target] = "JITTER"
self.globals.resolver_data[target].lastplistupdate = globals.tickcount() + 10
elseif self.globals.resolver_data[target].lastplistupdate < globals.tickcount() then
plist.set(target, "Force body yaw", false)
self.state[target] = ""
resolver_flag[target] = ""
else
plist.set(target, "Force body yaw", false)
self.state[target] = ""
resolver_flag[target] = ""
end
end
end
end,
}
чем можно улучшить установление Force body yaw value
|
7ad6c65d291de7eb51b4a1a69ced788e
|
{
"intermediate": 0.28223714232444763,
"beginner": 0.41307005286216736,
"expert": 0.3046927750110626
}
|
30,881
|
出现错误:Cannot start service from the command line or debugger. A winwows Service must first be installed(using installutil.exe) and then started with the ServerExplorer, Windows Services Afministrative tool or the NET START command
|
93a548bbde5b321dc1166de089dc1120
|
{
"intermediate": 0.3427157700061798,
"beginner": 0.3108088970184326,
"expert": 0.3464753031730652
}
|
30,882
|
hi can you write an autolsp script that tells me the layers that are pressent in a viewport
|
91541c6a27bcf5aa532798ae5f6c1e84
|
{
"intermediate": 0.4130110740661621,
"beginner": 0.10858295857906342,
"expert": 0.47840598225593567
}
|
30,883
|
i have a few codes wanna debug
|
68248fb910bfc3605bd0a8e60dd5f9ef
|
{
"intermediate": 0.41416728496551514,
"beginner": 0.3128772974014282,
"expert": 0.27295538783073425
}
|
30,884
|
Fix my C++ code. The matrix must be printed in columns.
#include <iostream>
using std::cout;
using std::cin;
using std::endl;
void printArr(int* a, int n, int m) {
for (int i = 0; i < n; ++i)
for (int j = 0; j < m; j++)
{
cout.width(2);
cout << a[m * i + j];
}
cout << endl;
}
int main() {
const int n1 = 3;
const int m1 = 10;
int arr1[n1][m1]{ {1,2,3,4,5,1,2,3,4,5},{1,0,1,0,1,0,1,0,1,0},{5,4,3,2,1,5,4,3,2,1} };
cout << "1st matrix: " << endl;
printArr(reinterpret_cast<int*>(arr1), n1, m1);
}
|
2a54d9268e0be578f4371b9c78823627
|
{
"intermediate": 0.2619350850582123,
"beginner": 0.5669110417366028,
"expert": 0.17115390300750732
}
|
30,885
|
how to add a column in sqlalchemy query
|
82902c03cf8b287b50ed079019910dc5
|
{
"intermediate": 0.45811203122138977,
"beginner": 0.23669272661209106,
"expert": 0.3051951825618744
}
|
30,886
|
fbcon_fb_registered如何对fb_info进行注册
|
c4b88d3a481689162b5f16230a17252a
|
{
"intermediate": 0.316802978515625,
"beginner": 0.28545883297920227,
"expert": 0.3977382481098175
}
|
30,887
|
excel_file = pd.read_excel(file_path, engine='openpyxl')
# 获取所有sheet页的名字
sheet_names = excel_file.sheet_names 修改这两句代码
|
e9ede55a9dfabd7663cf605a021301d1
|
{
"intermediate": 0.4128705561161041,
"beginner": 0.2682754099369049,
"expert": 0.3188539445400238
}
|
30,888
|
мне нужно запросить баланс из другого сервиса по этому урл, сформируй запрос
@POST
@Path("/balance")
@Consumes(value = APPLICATION_JSON)
@Produces(value = APPLICATION_JSON)
@Operation(summary = "Запрос получения информации по остаткам на счетах")
public AccountBalanceResponse getAccounts(AccountBalanceRequest request) {
LOGGER.info("Получен запрос на получение остатка по счету/счетам от partner.id={}", request.getPartnerId());
Long partnerId = request.getPartnerId();
String sign = request.getSign();
if (partnerId == null || isEmpty(sign)) {
LOGGER.info("В запросе баланса по счетам не заполнены идентификатор партнера или подпись");
return new AccountBalanceResponse("Идентификатор партнера или подпись не заполнены");
}
if (!acquiringProcessingHelpService.getSignature("" + partnerId, partnerId).equals(sign)) {
LOGGER.info("В запросе баланса по счетам неправильная подпись");
return new AccountBalanceResponse("Неправильная подпись");
}
// Проверка статуса активности
String checkResult = probationService.checkActiveState(partnerId);
if (!StringUtils.isEmpty(checkResult)) {
return new AccountBalanceResponse(checkResult);
}
String accountNumber = request.getNumber();
Date date = request.getDate() == null ? new Date() : request.getDate();
List<AccountBalance> balances;
try {
final List<String> accountsList = getAccountsList(partnerId, accountNumber);
if (accountsList == null || accountsList.isEmpty()) {
LOGGER.info("В запросе баланса по счетам неправильный номер счета " + accountNumber);
return new AccountBalanceResponse("Номер счета " + accountNumber + " не существует");
}
balances = getAccountsBalance(accountsList, date);
} catch (Exception e) {
LOGGER.error("Ошибка запроса баланса на счетах: " + e.getMessage());
return new AccountBalanceResponse("Система не доступна. Повторите запрос позднее");
}
return new AccountBalanceResponse(balances);
}
|
7e8b5afbe557c45a34e756e534345d31
|
{
"intermediate": 0.27366384863853455,
"beginner": 0.6283533573150635,
"expert": 0.09798280894756317
}
|
30,889
|
torch.cuda.is_available()
/usr/local/lib/python3.8/dist-packages/torch/cuda/__init__.py:107: UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 803: system has unsupported display driver / cuda driver combination (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:109.)
return torch._C._cuda_getDeviceCount() > 0
False
|
4cbf58b5a280a18756c42ae4062cdf2b
|
{
"intermediate": 0.5670412182807922,
"beginner": 0.2730019688606262,
"expert": 0.15995676815509796
}
|
30,890
|
if i have an image, i want to go through each pixel, and find the adjacent pixels to it and add them to a list in c. how do i do it
|
d6f46397d16aa6c1f04c2f6205842190
|
{
"intermediate": 0.3868824541568756,
"beginner": 0.1391618251800537,
"expert": 0.4739556908607483
}
|
30,891
|
Hello! Could you pleas create me a Biderectional GRU Keras model with input shape (None, 180, 1) and output shape (None, 60, 1)
|
c98e23bd123b1630ea2c443146902b36
|
{
"intermediate": 0.18364402651786804,
"beginner": 0.07265952229499817,
"expert": 0.7436965107917786
}
|
30,892
|
Write a C++ program. Initialize a 2d array with random numbers and print it using a function. Pass the array using pointer and by adjusting the parameter with reinterpret_cast. Create a function that calculates the sum only of odd elements
|
074b3d0e35db59d36ac3966b2e1e02ba
|
{
"intermediate": 0.22731941938400269,
"beginner": 0.5509717464447021,
"expert": 0.22170881927013397
}
|
30,893
|
write a program for parsing scientific journal sites with the goal of automatically downloading all articles containing a keyword
|
6d4b7f84ce4a462422b8a9ad124e7c13
|
{
"intermediate": 0.2946643531322479,
"beginner": 0.1247202679514885,
"expert": 0.5806153416633606
}
|
30,894
|
make prezetation code about marketing menejment
|
10ee410ae5005324b32ca39bc7680c75
|
{
"intermediate": 0.3326287567615509,
"beginner": 0.42851048707962036,
"expert": 0.23886080086231232
}
|
30,895
|
using uipath, how to extract the string between 2 strings. Say the sentence is "start: fdsfdsfd dfgkdfkg end". the extract string is "start: fdsfdsfd dfgkdfkg". the sentence is split into multiple line
|
9db2304d0bb161d76cf4399e4ce13816
|
{
"intermediate": 0.3197983503341675,
"beginner": 0.21210356056690216,
"expert": 0.4680980443954468
}
|
30,896
|
Hi, who are you?
|
79cda52df6f0750c8939520bfe3784e1
|
{
"intermediate": 0.4428204298019409,
"beginner": 0.2460516393184662,
"expert": 0.3111279308795929
}
|
30,897
|
Help me create a python script that goes into all the folders in the current folder and rename the files from top to bottom:
rgb_000_front.png
rgb_000_front_right.png
rgb_000_right.png
rgb_000_back.png
rgb_000_left.png
rgb_000_front_left.png
normals_000_front.png
normals_000_front_right.png
normals_000_right.png
normals_000_back.png
normals_000_left.png
normals_000_front_left.png
and makes sure it doesn't try to rename the same file or change order of the files, they must be as they are in the folder which is alphabetic order
|
79220496f0c41092fe1e2f5a78ca9023
|
{
"intermediate": 0.2762145400047302,
"beginner": 0.31836146116256714,
"expert": 0.40542396903038025
}
|
30,898
|
The two lines of code above, add MVC services, then set up default endpoint (HomeController.Index), right?
|
7f38cbe5227206cb0aac19bc830e2325
|
{
"intermediate": 0.5218225121498108,
"beginner": 0.20673291385173798,
"expert": 0.2714445888996124
}
|
30,899
|
What is a docker image. I want to install vllm and people said you can install a dicker image
|
42c0269c94764937a8d3dc076454acd1
|
{
"intermediate": 0.5169345140457153,
"beginner": 0.2124924510717392,
"expert": 0.2705730199813843
}
|
30,900
|
complete ma VBA excel:
If Not IsObject(application) Then
Set SapGuiAuto = GetObject("SAPGUI")
Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
Set connection = application.Children(0)
End If
If Not IsObject(session) Then
Set session = connection.Children(0)
End If
If IsObject(WScript) Then
WScript.ConnectObject session, "on"
WScript.ConnectObject application, "on"
End If
session.findById("wnd[0]").maximize
session.findById("wnd[0]/tbar[0]/okcd").text = "coois"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/tbar[1]/btn[17]").press
session.findById("wnd[1]/usr/txtENAME-LOW").text = "valenc4"
session.findById("wnd[1]/usr/txtENAME-LOW").setFocus
session.findById("wnd[1]/usr/txtENAME-LOW").caretPosition = 7
session.findById("wnd[1]").sendVKey 0
session.findById("wnd[1]/tbar[0]/btn[8]").press
session.findById("wnd[1]/usr/cntlALV_CONTAINER_1/shellcont/shell").setCurrentCell 5,"TEXT"
session.findById("wnd[1]/usr/cntlALV_CONTAINER_1/shellcont/shell").selectedRows = "5"
session.findById("wnd[1]/usr/cntlALV_CONTAINER_1/shellcont/shell").doubleClickCurrentCell
session.findById("wnd[0]/tbar[1]/btn[8]").press
session.findById("wnd[0]/usr/cntlCUSTOM/shellcont/shell/shellcont/shell").pressToolbarButton "&NAVIGATION_PROFILE_TOOLBAR_EXPAND"
session.findById("wnd[0]/usr/cntlCUSTOM/shellcont/shell/shellcont/shell").pressToolbarContextButton "&MB_EXPORT"
session.findById("wnd[0]/usr/cntlCUSTOM/shellcont/shell/shellcont/shell").selectContextMenuItem "&XXL"
session.findById("wnd[1]/tbar[0]/btn[0]").press
session.findById("wnd[1]/usr/ctxtDY_PATH").setFocus
session.findById("wnd[1]/usr/ctxtDY_PATH").caretPosition = 0
session.findById("wnd[1]").sendVKey 4
session.findById("wnd[2]/usr/ctxtDY_PATH").setFocus
session.findById("wnd[2]/usr/ctxtDY_PATH").caretPosition = 8
session.findById("wnd[2]").close
session.findById("wnd[1]").close
session.findById("wnd[0]/usr/cntlCUSTOM/shellcont/shell/shellcont/shell").setCurrentCell 3,"MATNR"
J'aimerais exporter le résultat en excel dans ce folder
\ent\mit-gva01\dept_SMO\AppData\BusinessIntelligence\0_Manual Data Extracts from Systems\Logistics & Supply Chain\Supply Chain\DATA FOR SC REPORT"
et qui remplace le fichier SMO_OPEN_ORDER.xlsx
|
1e9860bb847a6a5f2df3cc2242aa9733
|
{
"intermediate": 0.3545277714729309,
"beginner": 0.3203178644180298,
"expert": 0.3251543343067169
}
|
30,901
|
add code to Header.php in a child theme - <!-- Meta Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '196861943395577');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=196861943395577&ev=PageView&noscript=1"
/></noscript>
<!-- End Meta Pixel Code -->
|
dbc0eb835886a0eea17a7e3bb671b12d
|
{
"intermediate": 0.3166997730731964,
"beginner": 0.49931350350379944,
"expert": 0.18398670852184296
}
|
30,902
|
Why do people eat cereals for breakfast and not for diner or supper ?
|
af6121fa8beeaa9993904efd121978fd
|
{
"intermediate": 0.34413671493530273,
"beginner": 0.3447825312614441,
"expert": 0.311080664396286
}
|
30,903
|
На связи отдел разработки и поддержки хранилища данных NetCity. В данный момент мы затеяли переработку дизайна, ведь пользоваться устаревшими технологиями крайне неудобно и непрактично.
Твоя задача:
Используя знания о работе с блочной моделью, реализуй дизайн, который представлен нашими специалистами. Результат ты найдёшь ниже.
Не забывай о важности внутренних и внешних отступов.
Подсказки, которые тебе помогут:
Используй шрифт Exo 2 из набора GF (Google Fonts)
Для шапки и подвала внешний отступ должен быть 30px (достаточно указать верх и низ)
Ширина основного блока и секций 768px. Внешний отступ 10px.
Параметры для ячейки каждой категории:
Внешний отступ 8px, a внутренний 10px
Высота 60px
Толщина текста 700, цвет белый (но для цифр толщина 300)
Цвета можешь подобрать на своё усмотрение
Параметры блока архив:
Цвет фона #eee
Высота 256px
Выравнивание текста по центру
Боковые отступы внутри по 99px
P. S. Возможно, твой блок архива будет выглядеть чуть больше, чем на образце.
Когда дойдёшь до этого момента, твой наставник укажет тебе путь.
Сделай код css и html
|
5b3dfa7e4aa76b8caab834fdca5eb098
|
{
"intermediate": 0.2091461569070816,
"beginner": 0.5362691283226013,
"expert": 0.2545846402645111
}
|
30,904
|
lua code. let's say i have a list of {"alice", "bob", "jane"}, how do I iterate over it?
|
6238858a454e2b6687210f3c3c718190
|
{
"intermediate": 0.5378291606903076,
"beginner": 0.19613835215568542,
"expert": 0.26603248715400696
}
|
30,905
|
function decrypt(encrypted, num = 1)
{
var withend = encrypted.split('end~')
var key = parseInt(withend[0].toString(), 10);
var array = withend[0].split('')
array.shift()
var massiv = array.map(value => value.charCodeAt(0) - (key + num));
var packet = "";
for (var i in massiv)
{
packet += String.fromCharCode(massiv[i])
}
return packet + "end~"
}
сравни есть ли в этих decrypt различия кроме языков на которых они написаны private String decrypt(String request, int key) {
this._lastKey = key;
char[] _chars = request.toCharArray();
for(int i = 0; i < request.length(); ++i) {
_chars[i] = (char)(_chars[i] - key);
}
return new String(_chars);
}
|
20a63cdaa1da8482cb065d16050eafcc
|
{
"intermediate": 0.33673572540283203,
"beginner": 0.48943030834198,
"expert": 0.1738339513540268
}
|
30,906
|
how to keep order in union expression of sqlalchemy orb
|
20c64b3a261860b7a77849a9680f4532
|
{
"intermediate": 0.49452343583106995,
"beginner": 0.2788962721824646,
"expert": 0.22658029198646545
}
|
30,907
|
Role: Endpoint Platform Specialist
Description: The Endpoint Platform Specialist is responsible for managing and maintaining a wide range of devices, including 0365 and MacOS, through endpoint platforms like JAMF and Intune. This role involves deploying, configuring, and ensuring optimal functionality of devices in alignment with organizational requirements. The specialist also focuses on implementing security measures, troubleshooting issues, and collaborating with other teams to drive continuous improvements.
Tasks:
Manage and maintain various devices, such as 0365 and MacOS, using endpoint platforms.
Deploy and configure devices using tools like JAMF and Intune.
Ensure devices are properly set up and functioning according to organizational requirements.
Implement security policies, encryption, and access controls for devices.
Collaborate with other teams to ensure seamless integration and performance optimization.
Provide troubleshooting and support to end-users.
Conduct training sessions to educate users on device functionalities and best practices.
Generate reports on device management, security compliance, and performance metrics.
Identify opportunities for continuous improvement and implement effective strategies.
Role: Senior Endpoint Platform Specialist
Description: The Senior Endpoint Platform Specialist holds a leadership position and focuses on advancing the management of devices, specifically 0365 and MacOS, through endpoint platforms. In addition to the responsibilities of an Endpoint Platform Specialist, this role entails enhancing endpoint protection, managing patch updates, maintaining comprehensive documentation, generating reports, and providing guidance to the team.
Tasks:
Perform all tasks of an Endpoint Platform Specialist.
Configure and oversee antivirus, anti-malware, and other security measures for device protection.
Manage patching and updating processes for 0365 and MacOS devices.
Ensure devices run on the latest operating system versions, security patches, and software updates.
Maintain accurate documentation of device configurations, policies, and procedures.
Generate regular reports on device management, security compliance, and performance metrics.
Provide guidance and support to the team.
Collaborate with other teams for seamless integration and optimal performance.
Role: Endpoint Platform Architect
Description: The Endpoint Platform Architect is responsible for designing and implementing a robust architecture for the endpoint platform. This role includes configuring systems, addressing customizations, troubleshooting issues, and ensuring scalability, security, and performance. The architect also collaborates with cross-functional teams, identifies improvement opportunities, and establishes best practices for managing and maintaining 0365 and MacOS devices.
Tasks:
Design and implement a scalable architecture for the endpoint platform.
Configure and customize systems to meet organizational requirements.
Troubleshoot issues related to the endpoint platform and devices.
Enhance security measures, scalability, and performance of the platform.
Collaborate with other teams for seamless integration and optimal performance.
Identify improvement opportunities and define best practices for device management.
Provide training sessions to team members on architecture and best practices.
|
66816b0b754ee271ecc7a0e5288eea04
|
{
"intermediate": 0.3725532591342926,
"beginner": 0.20150789618492126,
"expert": 0.42593884468078613
}
|
30,908
|
Using an excel sheet of 4000 pre defined words create a powershell script that uses 2 random words from the excel sheet and generates a random password with numerical and symbols and is 16 characters long
|
b2b9499868edaaf24c90be203a079172
|
{
"intermediate": 0.30438175797462463,
"beginner": 0.2988753914833069,
"expert": 0.3967428207397461
}
|
30,909
|
привет
|
188435b4b3d5a8bb43b2676a07af5aa5
|
{
"intermediate": 0.3531447947025299,
"beginner": 0.2823599576950073,
"expert": 0.3644951581954956
}
|
30,910
|
create a password generator with powershell which includes 2 words _ numerals and symbols
|
87ead0bd9481cd7cdafb7e389166eb29
|
{
"intermediate": 0.2920035719871521,
"beginner": 0.2400643676519394,
"expert": 0.4679320752620697
}
|
30,911
|
how to create an automatic attendance web app by capturing and recognizing the faces using html, css and js
|
81b678f411f3a3566d38bfa6d6cae5f0
|
{
"intermediate": 0.2803720235824585,
"beginner": 0.17107710242271423,
"expert": 0.5485508441925049
}
|
30,912
|
Hello!
|
943cf71822107c9223710b042c98fd2d
|
{
"intermediate": 0.3194829821586609,
"beginner": 0.26423266530036926,
"expert": 0.41628435254096985
}
|
30,913
|
Мне нужно сделать это задание: You have a browser of one tab where you start on the homepage and you can visit another url, get back in the history number of steps or move forward in the history number of steps.
Implement the BrowserHistory class:
BrowserHistory(string homepage) Initializes the object with the homepage of the browser.
void visit(string url) Visits url from the current page. It clears up all the forward history.
string back(int steps) Move steps back in history. If you can only return x steps in the history and steps > x, you will return only x steps. Return the current url after moving back in history at most steps.
string forward(int steps) Move steps forward in history. If you can only forward x steps in the history and steps > x, you will forward only x steps. Return the current url after forwarding in history at most steps.
Помоги с реализацией алгоритма для каждого из методов (без кода, это я хочу сам)
|
e4a5f7cbf8633daf270a8f8ff7c723b5
|
{
"intermediate": 0.314809113740921,
"beginner": 0.47023364901542664,
"expert": 0.21495722234249115
}
|
30,914
|
hi
|
462de4beac2ac97e6f1d6e04dbddf36c
|
{
"intermediate": 0.3246487081050873,
"beginner": 0.27135494351387024,
"expert": 0.40399640798568726
}
|
30,915
|
[[ 3]
[ 4]
[ 12]
[ 13]
[ 14]
[ 15]
[ 32]
[ 41]
[ 51]
[ 58]
[ 67]
[ 82]]
|
d135f3aa016aa15461f9c5e609538b7b
|
{
"intermediate": 0.34002378582954407,
"beginner": 0.30801326036453247,
"expert": 0.35196301341056824
}
|
30,916
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
class Program
{
static void Main(string[] args)
{
int N = int.Parse(Console.ReadLine());
int[] array = Console.ReadLine().Split().Select(int.Parse).ToArray();
int target = int.Parse(Console.ReadLine());
int closestNumber = array.OrderBy(x => Math.Abs(x - target)).First();
Console.WriteLine(closestNumber);
Console.ReadLine();
}
}
конвертируй в c#
|
abf69a8ea45503c8279debb15fe2d8d4
|
{
"intermediate": 0.34446603059768677,
"beginner": 0.4223095774650574,
"expert": 0.23322446644306183
}
|
30,917
|
what are DOs and DON'Ts in angular development regarding web security
|
8ab6be34dabb22d4242a4b3ea1a63335
|
{
"intermediate": 0.3063691556453705,
"beginner": 0.28266558051109314,
"expert": 0.4109652638435364
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.