MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. A Turing machine is a mathematical model of computation describing an abstract machine[1] that manipulates symbols on a strip of tape according to a table of rules.[2] Despite the model's simplicity, it is capable of implementing any computer algorithm.[3] The machine operates on an infinite[4] memory tape divided into discrete cells,[5] each of which can hold a single symbol drawn from a finite set of symbols called the alphabet of the machine. It has a "head" that, at any point in the machine's operation, is positioned over one of these cells, and a "state" selected from a finite set of states. At each step of its operation, the head reads the symbol in its cell. Then, based on the symbol and the machine's own present state, the machine writes a symbol into the same cell, and moves the head one step to the left or the right,[6] or halts the computation. The choice of which replacement symbol to write, which direction to move the head, and whether to halt is based on a finite table that specifies what to do for each combination of the current state and the symbol that is read. Like a real computer program, it is possible for a Turing machine to go into an infinite loop which will never halt. The Turing machine was invented in 1936 by Alan Turing,[7][8] who called it an "a-machine" (automatic machine).[9] It was Turing's doctoral advisor, Alonzo Church, who later coined the term "Turing machine" in a review.[10] With this model, Turing was able to answer two questions in the negative: Does a machine exist that can determine whether any arbitrary machine on its tape is "circular" (e.g., freezes, or fails to continue its computational task)? Does a machine exist that can determine whether any arbitrary machine on its tape ever prints a given symbol?[11][12] Thus by providing a mathematical description of a very simple device capable of arbitrary computations, he was able to prove properties of computation in general—and in particular, the uncomputability of the Entscheidungsproblem ('decision problem').[13] Turing machines proved the existence of fundamental limitations on the power of mechanical computation.[14] While they can express arbitrary computations, their minimalist design makes them too slow for computation in practice: real-world computers are based on different designs that, unlike Turing machines, use random-access memory. Turing completeness is the ability for a computational model or a system of instructions to simulate a Turing machine. A programming language that is Turing complete is theoretically capable of expressing all tasks accomplishable by computers; nearly all programming languages are Turing complete if the limitations of finite memory are ignored. Overview A Turing machine is an idealised model of a central processing unit (CPU) that controls all data manipulation done by a computer, with the canonical machine using sequential memory to store data. Typically, the sequential memory is represented as a tape of infinite length on which the machine can perform read and write operations. In the context of formal language theory, a Turing machine (automaton) is capable of enumerating some arbitrary subset of valid strings of an alphabet. A set of strings which can be enumerated in this manner is called a recursively enumerable language. The Turing machine can equivalently be defined as a model that recognises valid input strings, rather than enumerating output strings. Given a Turing machine M and an arbitrary string s, it is generally not possible to decide whether M will eventually produce s. This is due to the fact that the halting problem is unsolvable, which has major implications for the theoretical limits of computing. The Turing machine is capable of processing an unrestricted grammar, which further implies that it is capable of robustly evaluating first-order logic in an infinite number of ways. This is famously demonstrated through lambda calculus. A Turing machine that is able to simulate any other Turing machine is called a universal Turing machine (UTM, or simply a universal machine). Another mathematical formalism, lambda calculus, with a similar "universal" nature was introduced by Alonzo Church. Church's work intertwined with Turing's to form the basis for the Church–Turing thesis. This thesis states that Turing machines, lambda calculus, and other similar formalisms of computation do indeed capture the informal notion of effective methods in logic and mathematics and thus provide a model through which one can reason about an algorithm or "mechanical procedure" in a mathematically precise way without being tied to any particular formalism. Studying the abstract properties of Turing machines has yielded many insights into computer science, computability theory, and complexity theory. Physical description In his 1948 essay, "Intelligent Machinery", Turing wrote that his machine consisted of: ...an unlimited memory capacity obtained in the form of an infinite tape marked out into squares, on each of which a symbol could be printed. At any moment there is one symbol in the machine; it is called the scanned symbol. The machine can alter the scanned symbol, and its behavior is in part determined by that symbol, but the symbols on the tape elsewhere do not affect the behavior of the machine. However, the tape can be moved back and forth through the machine, this being one of the elementary operations of the machine. Any symbol on the tape may therefore eventually have an innings.[15] — Turing 1948, p. 3[16] Description For visualizations of Turing machines, see Turing machine gallery. The Turing machine mathematically models a machine that mechanically operates on a tape. On this tape are symbols, which the machine can read and write, one at a time, using a tape head. Operation is fully determined by a finite set of elementary instructions such as "in state 42, if the symbol seen is 0, write a 1; if the symbol seen is 1, change into state 17; in state 17, if the symbol seen is 0, write a 1 and change to state 6;" etc. In the original article ("On Computable Numbers, with an Application to the Entscheidungsproblem", see also references below), Turing imagines not a mechanism, but a person whom he calls the "computer", who executes these deterministic mechanical rules slavishly (or as Turing puts it, "in a desultory manner"). The head is always over a particular square of the tape; only a finite stretch of squares is shown. The instruction to be performed (q4) is shown over the scanned square. (Drawing after Kleene (1952) p. 375.) Here, the internal state (q1) is shown inside the head, and the illustration describes the tape as being infinite and pre-filled with "0", the symbol serving as blank. The system's full state (its "complete configuration") consists of the internal state, any non-blank symbols on the tape (in this illustration "11B"), and the position of the head relative to those symbols including blanks, i.e. "011B". (Drawing after Minsky (1967) p. 121.) More explicitly, a Turing machine consists of: A tape divided into cells, one next to the other. Each cell contains a symbol from some finite alphabet. The alphabet contains a special blank symbol (here written as '0') and one or more other symbols. The tape is assumed to be arbitrarily extendable to the left and to the right, so that the Turing machine is always supplied with as much tape as it needs for its computation. Cells that have not been written before are assumed to be filled with the blank symbol. In some models the tape has a left end marked with a special symbol; the tape extends or is indefinitely extensible to the right. A head that can read and write symbols on the tape and move the tape left and right one (and only one) cell at a time. In some models the head moves and the tape is stationary. A state register that stores the state of the Turing machine, one of finitely many. Among these is the special start state with which the state register is initialised. These states, writes Turing, replace the "state of mind" a person performing computations would ordinarily be in. A finite table[17] of instructions[18] that, given the state(qi) the machine is currently in and the symbol(aj) it is reading on the tape (symbol currently under the head), tells the machine to do the following in sequence (for the 5-tuple models): Either erase or write a symbol (replacing aj with aj1). Move the head (which is described by dk and can have values: 'L' for one step left or 'R' for one step right or 'N' for staying in the same place). Assume the same or a new state as prescribed (go to state qi1). In the 4-tuple models, erasing or writing a symbol (aj1) and moving the head left or right (dk) are specified as separate instructions. The table tells the machine to (ia) erase or write a symbol or (ib) move the head left or right, and then (ii) assume the same or a new state as prescribed, but not both actions (ia) and (ib) in the same instruction. In some models, if there is no entry in the table for the current combination of symbol and state, then the machine will halt; other models require all entries to be filled. Every part of the machine (i.e. its state, symbol-collections, and used tape at any given time) and its actions (such as printing, erasing and tape motion) is finite, discrete and distinguishable; it is the unlimited amount of tape and runtime that gives it an unbounded amount of storage space. Formal definition Following Hopcroft & Ullman (1979, p. 148), a (one-tape) Turing machine can be formally defined as a 7-tuple M = ⟨ Q , Γ , b , Σ , δ , q 0 , F ⟩ M=\langle Q,\Gamma ,b,\Sigma ,\delta ,q_{0},F\rangle where Γ \Gamma is a finite, non-empty set of tape alphabet symbols; b ∈ Γ b\in \Gamma is the blank symbol (the only symbol allowed to occur on the tape infinitely often at any step during the computation); Σ ⊆ Γ ∖ { b } \Sigma \subseteq \Gamma \setminus \{b\} is the set of input symbols, that is, the set of symbols allowed to appear in the initial tape contents; Q Q is a finite, non-empty set of states; q 0 ∈ Q q_{0}\in Q is the initial state; F ⊆ Q F\subseteq Q is the set of final states or accepting states. The initial tape contents is said to be accepted by M M if it eventually halts in a state from F F. δ : ( Q ∖ F ) × Γ ↛ Q × Γ × { L , R } {\displaystyle \delta :(Q\setminus F)\times \Gamma \not \to Q\times \Gamma \times \{L,R\}} is a partial function called the transition function, where L is left shift, R is right shift. If δ \delta is not defined on the current state and the current tape symbol, then the machine halts;[19] intuitively, the transition function specifies the next state transited from the current state, which symbol to overwrite the current symbol pointed by the head, and the next head movement. 3-state Busy Beaver. Black icons represent location and state of head; square colors represent 1s (orange) and 0s (white); time progresses vertically from the top until the HALT state at the bottom. A relatively uncommon variant allows "no shift", say N, as a third element of the set of directions { L , R } \{L,R\}. The 7-tuple for the 3-state busy beaver looks like this (see more about this busy beaver at Turing machine examples): Q = { A , B , C , HALT } Q=\{{\mbox{A}},{\mbox{B}},{\mbox{C}},{\mbox{HALT}}\} (states); Γ = { 0 , 1 } \Gamma =\{0,1\} (tape alphabet symbols); b = 0 b=0 (blank symbol); Σ = { 1 } \Sigma =\{1\} (input symbols); q 0 = A q_{0}={\mbox{A}} (initial state); F = { HALT } F=\{{\mbox{HALT}}\} (final states); δ = \delta = see state-table below (transition function). Initially all tape cells are marked with 0 {\displaystyle 0}. State table for 3-state, 2-symbol busy beaver Tape symbol Current state A Current state B Current state C Write symbol Move tape Next state Write symbol Move tape Next state Write symbol Move tape Next state 0 1 R B 1 L A 1 L B 1 1 L C 1 R B 1 R HALT Additional details required to visualise or implement Turing machines In the words of van Emde Boas (1990), p. 6: "The set-theoretical object [his formal seven-tuple description similar to the above] provides only partial information on how the machine will behave and what its computations will look like." For instance, There will need to be many decisions on what the symbols actually look like, and a failproof way of reading and writing symbols indefinitely. The shift left and shift right operations may shift the tape head across the tape, but when actually building a Turing machine it is more practical to make the tape slide back and forth under the head instead. The tape can be finite, and automatically extended with blanks as needed (which is closest to the mathematical definition), but it is more common to think of it as stretching infinitely at one or both ends and being pre-filled with blanks except on the explicitly given finite fragment the tape head is on. (This is, of course, not implementable in practice.) The tape cannot be fixed in length, since that would not correspond to the given definition and would seriously limit the range of computations the machine can perform to those of a linear bounded automaton if the tape was proportional to the input size, or finite-state machine if it was strictly fixed-length. TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: You must give any other recipients of the Work or Derivative Works a copy of this License; and You must cause any modified files to carry prominent notices stating that You changed the files; and You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS How to apply the Apache License to your work Include a copy of the Apache License, typically in a file called LICENSE, in your work, and consider also including a NOTICE file that references the License. To apply the Apache License to specific files in your work, attach the following boilerplate declaration, replacing the fields enclosed by brackets "[]" with your own identifying information. (Don't include the brackets!) Enclose the text in the appropriate comment syntax for the file format. We also recommend that you include a file or class name and description of purpose on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Human TP53 gene In humans, a common polymorphism involves the substitution of an arginine for a proline at codon position 72 of exon 4. Many studies have investigated a genetic link between this variation and cancer susceptibility; however, the results have been controversial. For instance, a meta-analysis from 2009 failed to show a link for cervical cancer.[15] A 2011 study found that the TP53 proline mutation did have a profound effect on pancreatic cancer risk among males.[16] A study of Arab women found that proline homozygosity at TP53 codon 72 is associated with a decreased risk for breast cancer.[17] One study suggested that TP53 codon 72 polymorphisms, MDM2 SNP309, and A2164G may collectively be associated with non-oropharyngeal cancer susceptibility and that MDM2 SNP309 in combination with TP53 codon 72 may accelerate the development of non-oropharyngeal cancer in women.[18] A 2011 study found that TP53 codon 72 polymorphism was associated with an increased risk of lung cancer.[19] Meta-analyses from 2011 found no significant associations between TP53 codon 72 polymorphisms and both colorectal cancer risk[20] and endometrial cancer risk.[21] A 2011 study of a Brazilian birth cohort found an association between the non-mutant arginine TP53 and individuals without a family history of cancer.[22] Another 2011 study found that the p53 homozygous (Pro/Pro) genotype was associated with a significantly increased risk for renal cell carcinoma.[23] Function DNA damage and repair p53 plays a role in regulation or progression through the cell cycle, apoptosis, and genomic stability by means of several mechanisms: It can activate DNA repair proteins when DNA has sustained damage. Thus, it may be an important factor in aging.[24] It can arrest growth by holding the cell cycle at the G1/S regulation point on DNA damage recognition—if it holds the cell here for long enough, the DNA repair proteins will have time to fix the damage and the cell will be allowed to continue the cell cycle. It can initiate apoptosis (i.e., programmed cell death) if DNA damage proves to be irreparable. It is essential for the senescence response to short telomeres. p53 pathway: In a normal cell, p53 is inactivated by its negative regulator, mdm2. Upon DNA damage or other stresses, various pathways will lead to the dissociation of the p53 and mdm2 complex. Once activated, p53 will induce a cell cycle arrest to allow either repair and survival of the cell or apoptosis to discard the damaged cell. How p53 makes this choice is currently unknown. WAF1/CIP1 encoding for p21 and hundreds of other down-stream genes. p21 (WAF1) binds to the G1-S/CDK (CDK4/CDK6, CDK2, and CDK1) complexes (molecules important for the G1/S transition in the cell cycle) inhibiting their activity. When p21(WAF1) is complexed with CDK2, the cell cannot continue to the next stage of cell division. A mutant p53 will no longer bind DNA in an effective way, and, as a consequence, the p21 protein will not be available to act as the "stop signal" for cell division.[25] Studies of human embryonic stem cells (hESCs) commonly describe the nonfunctional p53-p21 axis of the G1/S checkpoint pathway with subsequent relevance for cell cycle regulation and the DNA damage response (DDR). Importantly, p21 mRNA is clearly present and upregulated after the DDR in hESCs, but p21 protein is not detectable. In this cell type, p53 activates numerous microRNAs (like miR-302a, miR-302b, miR-302c, and miR-302d) that directly inhibit the p21 expression in hESCs. The p21 protein binds directly to cyclin-CDK complexes that drive forward the cell cycle and inhibits their kinase activity, thereby causing cell cycle arrest to allow repair to take place. p21 can also mediate growth arrest associated with differentiation and a more permanent growth arrest associated with cellular senescence. The p21 gene contains several p53 response elements that mediate direct binding of the p53 protein, resulting in transcriptional activation of the gene encoding the p21 protein. The p53 and RB1 pathways are linked via p14ARF, raising the possibility that the pathways may regulate each other.[26] p53 expression can be stimulated by UV light, which also causes DNA damage. In this case, p53 can initiate events leading to tanning.[27][28] Stem cells Levels of p53 play an important role in the maintenance of stem cells throughout development and the rest of human life. In human embryonic stem cells (hESCs)s, p53 is maintained at low inactive levels.[29] This is because activation of p53 leads to rapid differentiation of hESCs.[30] Studies have shown that knocking out p53 delays differentiation and that adding p53 causes spontaneous differentiation, showing how p53 promotes differentiation of hESCs and plays a key role in cell cycle as a differentiation regulator. When p53 becomes stabilized and activated in hESCs, it increases p21 to establish a longer G1. This typically leads to abolition of S-phase entry, which stops the cell cycle in G1, leading to differentiation. Work in mouse embryonic stem cells has recently shown however that the expression of P53 does not necessarily lead to differentiation.[31] p53 also activates miR-34a and miR-145, which then repress the hESCs pluripotency factors, further instigating differentiation.[29] In adult stem cells, p53 regulation is important for maintenance of stemness in adult stem cell niches. Mechanical signals such as hypoxia affect levels of p53 in these niche cells through the hypoxia inducible factors, HIF-1α and HIF-2α. While HIF-1α stabilizes p53, HIF-2α suppresses it.[32] Suppression of p53 plays important roles in cancer stem cell phenotype, induced pluripotent stem cells and other stem cell roles and behaviors, such as blastema formation. Cells with decreased levels of p53 have been shown to reprogram into stem cells with a much greater efficiency than normal cells.[33][34] Papers suggest that the lack of cell cycle arrest and apoptosis gives more cells the chance to be reprogrammed. Decreased levels of p53 were also shown to be a crucial aspect of blastema formation in the legs of salamanders.[35] p53 regulation is very important in acting as a barrier between stem cells and a differentiated stem cell state, as well as a barrier between stem cells being functional and being cancerous.[36] Specifically, the term Galilean invariance today usually refers to this principle as applied to Newtonian mechanics, that is, Newton's laws of motion hold in all frames related to one another by a Galilean transformation. In other words, all frames related to one another by such a transformation are inertial (meaning, Newton's equation of motion is valid in these frames). In this context it is sometimes called Newtonian relativity. Among the axioms from Newton's theory are: There exists an absolute space, in which Newton's laws are true. An inertial frame is a reference frame in relative uniform motion to absolute space. All inertial frames share a universal time. Galilean relativity can be shown as follows. Consider two inertial frames S and S' . A physical event in S will have position coordinates r = (x, y, z) and time t in S, and r' = (x' , y' , z' ) and time t' in S' . By the second axiom above, one can synchronize the clock in the two frames and assume t = t' . Suppose S' is in relative uniform motion to S with velocity v. Consider a point object whose position is given by functions r' (t) in S' and r(t) in S. We see that r ′ ( t ) = r ( t ) − v t . r'(t) = r(t) - v t.\, The velocity of the particle is given by the time derivative of the position: u ′ ( t ) = d d t r ′ ( t ) = d d t r ( t ) − v = u ( t ) − v . u'(t) = \frac{d}{d t} r'(t) = \frac{d}{d t} r(t) - v = u(t) - v. Another differentiation gives the acceleration in the two frames: a ′ ( t ) = d d t u ′ ( t ) = d d t u ( t ) − 0 = a ( t ) . a'(t) = \frac{d}{d t} u'(t) = \frac{d}{d t} u(t) - 0 = a(t). It is this simple but crucial result that implies Galilean relativity. Assuming that mass is invariant in all inertial frames, the above equation shows Newton's laws of mechanics, if valid in one frame, must hold for all frames.[1] But it is assumed to hold in absolute space, therefore Galilean relativity holds. Newton's theory versus special relativity A comparison can be made between Newtonian relativity and special relativity. Some of the assumptions and properties of Newton's theory are: The existence of infinitely many inertial frames. Each frame is of infinite size (the entire universe may be covered by many linearly equivalent frames). Any two frames may be in relative uniform motion. (The relativistic nature of mechanics derived above shows that the absolute space assumption is not necessary.) The inertial frames may move in all possible relative forms of uniform motion. There is a universal, or absolute, notion of elapsed time. Two inertial frames are related by a Galilean transformation. In all inertial frames, Newton's laws, and gravity, hold. In comparison, the corresponding statements from special relativity are as follows: The existence, as well, of infinitely many non-inertial frames, each of which referenced to (and physically determined by) a unique set of spacetime coordinates. Each frame may be of infinite size, but its definition is always determined locally by contextual physical conditions. Any two frames may be in relative non-uniform motion (as long as it is assumed that this condition of relative motion implies a relativistic dynamical effect – and later, mechanical effect in general relativity – between both frames). Rather than freely allowing all conditions of relative uniform motion between frames of reference, the relative velocity between two inertial frames becomes bounded above by the speed of light. Instead of universal elapsed time, each inertial frame possesses its own notion of elapsed time. The Galilean transformations are replaced by Lorentz transformations. In all inertial frames, all laws of physics are the same. Both theories assume the existence of inertial frames. In practice, the size of the frames in which they remain valid differ greatly, depending on gravitational tidal forces. In the appropriate context, a local Newtonian inertial frame, where Newton's theory remains a good model, extends to roughly 107 light years. In special relativity, one considers Einstein's cabins, cabins that fall freely in a gravitational field. According to Einstein's thought experiment, a man in such a cabin experiences (to a good approximation) no gravity and therefore the cabin is an approximate inertial frame. However, one has to assume that the size of the cabin is sufficiently small so that the gravitational field is approximately parallel in its interior. This can greatly reduce the sizes of such approximate frames, in comparison to Newtonian frames. For example, an artificial satellite orbiting the Earth can be viewed as a cabin. However, reasonably sensitive instruments could detect "microgravity" in such a situation because the "lines of force" of the Earth's gravitational field converge. In general, the convergence of gravitational fields in the universe dictates the scale at which one might consider such (local) inertial frames. For example, a spaceship falling into a black hole or neutron star would (at a certain distance) be subjected to tidal forces strong enough to crush it in width and tear it apart in length.[2] In comparison, however, such forces might only be uncomfortable for the astronauts inside (compressing their joints, making it difficult to extend their limbs in any direction perpendicular to the gravity field of the star). Reducing the scale further, the forces at that distance might have almost no effects at all on a mouse. This illustrates the idea that all freely falling frames are locally inertial (acceleration and gravity-free) if the scale is chosen correctly.[2] Poetry (a term derived from the Greek word poiesis, "making"), also called verse,[note 1] is a form of literature that uses aesthetic and often rhythmic[1][2][3] qualities of language − such as phonaesthetics, sound symbolism, and metre − to evoke meanings in addition to, or in place of, a prosaic ostensible meaning. A poem is a literary composition, written by a poet, using this principle. Poetry has a long and varied history, evolving differentially across the globe. It dates back at least to prehistoric times with hunting poetry in Africa and to panegyric and elegiac court poetry of the empires of the Nile, Niger, and Volta River valleys.[4] Some of the earliest written poetry in Africa occurs among the Pyramid Texts written during the 25th century BCE. The earliest surviving Western Asian epic poem, the Epic of Gilgamesh, was written in the Sumerian language. Early poems in the Eurasian continent evolved from folk songs such as the Chinese Shijing as well as from religious hymns (the Sanskrit Rigveda, the Zoroastrian Gathas, the Hurrian songs, and the Hebrew Psalms); or from a need to retell oral epics, as with the Egyptian Story of Sinuhe, Indian epic poetry, and the Homeric epics, the Iliad and the Odyssey. Ancient Greek attempts to define poetry, such as Aristotle's Poetics, focused on the uses of speech in rhetoric, drama, song, and comedy. Later attempts concentrated on features such as repetition, verse form, and rhyme, and emphasized the aesthetics which distinguish poetry from more objectively-informative prosaic writing. Poetry uses forms and conventions to suggest differential interpretations of words, or to evoke emotive responses. Devices such as assonance, alliteration, onomatopoeia, and rhythm may convey musical or incantatory effects. The use of ambiguity, symbolism, irony, and other stylistic elements of poetic diction often leaves a poem open to multiple interpretations. Similarly, figures of speech such as metaphor, simile, and metonymy[5] establish a resonance between otherwise disparate images—a layering of meanings, forming connections previously not perceived. Kindred forms of resonance may exist, between individual verses, in their patterns of rhyme or rhythm. Some poetry types are unique to particular cultures and genres and respond to characteristics of the language in which the poet writes. Readers accustomed to identifying poetry with Dante, Goethe, Mickiewicz, or Rumi may think of it as written in lines based on rhyme and regular meter. There are, however, traditions, such as Biblical poetry, that use other means to create rhythm and euphony. Much modern poetry reflects a critique of poetic tradition,[6] testing the principle of euphony itself or altogether forgoing rhyme or set rhythm.[7][8] Poets – as, from the Greek, "makers" of language – have contributed to the evolution of the linguistic, expressive, and utilitarian qualities of their languages. In an increasingly globalized world, poets often adapt forms, styles, and techniques from diverse cultures and languages. A Western cultural tradition (extending at least from Homer to Rilke) associates the production of poetry with inspiration – often by a Muse (either classical or contemporary), or through other (often canonised) poets' work which sets some kind of example or challenge. In first-person poems, the lyrics are spoken by an "I", a character who may be termed the speaker, distinct from the poet (the author). Thus if, for example, a poem asserts, "I killed my enemy in Reno", it is the speaker, not the poet, who is the killer (unless this "confession" is a form of metaphor which needs to be considered in closer context – via close reading). Early works Some scholars believe that the art of poetry may predate literacy, and developed from folk epics and other oral genres.[9][10] Others, however, suggest that poetry did not necessarily predate writing.[11] The oldest surviving epic poem, the Epic of Gilgamesh, dates from the 3rd millennium BCE in Sumer (in Mesopotamia, present-day Iraq), and was written in cuneiform script on clay tablets and, later, on papyrus.[12] The Istanbul tablet#2461, dating to c. 2000 BCE, describes an annual rite in which the king symbolically married and mated with the goddess Inanna to ensure fertility and prosperity; some have labelled it the world's oldest love poem.[13][14] An example of Egyptian epic poetry is The Story of Sinuhe (c. 1800 BCE).[15] Other ancient epics includes the Greek Iliad and the Odyssey; the Persian Avestan books (the Yasna); the Roman national epic, Virgil's Aeneid (written between 29 and 19 BCE); and the Indian epics, the Ramayana and the Mahabharata. Epic poetry appears to have been composed in poetic form as an aid to memorization and oral transmission in ancient societies.[11][16] Other forms of poetry, including such ancient collections of religious hymns as the Indian Sanskrit-language Rigveda, the Avestan Gathas, the Hurrian songs, and the Hebrew Psalms, possibly developed directly from folk songs. The earliest entries in the oldest extant collection of Chinese poetry, the Classic of Poetry (Shijing), were initially lyrics.[17] The Shijing, with its collection of poems and folk songs, was heavily valued by the philosopher Confucius and is considered to be one of the official Confucian classics. His remarks on the subject have become an invaluable source in ancient music theory.[18] The efforts of ancient thinkers to determine what makes poetry distinctive as a form, and what distinguishes good poetry from bad, resulted in "poetics"—the study of the aesthetics of poetry.[19] Some ancient societies, such as China's through the Shijing, developed canons of poetic works that had ritual as well as aesthetic importance.[20] More recently, thinkers have struggled to find a definition that could encompass formal differences as great as those between Chaucer's Canterbury Tales and Matsuo Bashō's Oku no Hosomichi, as well as differences in content spanning Tanakh religious poetry, love poetry, and rap.[21] Until recently, the earliest examples of stressed poetry had been thought to be works composed by Romanos the Melodist (fl. 6th century CE). However, Tim Whitmarsh writes that an inscribed Greek poem predated Romanos' stressed poetry. [22][23][24] "Figure 32.—Julius obtaining banana by using pole to climb up on and spring from. Figure 33.—Using pole to swing out on so that banana could be grasped. Figure 34.—Using stick to draw carrot within reach." From The mental life of monkeys and apes; a study of ideational behavior, by Robert Mearns Yerkes, 1916 The monkey and banana problem is a famous toy problem in artificial intelligence, particularly in logic programming and planning. Formulation of the problem A monkey is in a room. Suspended from the ceiling is a bunch of bananas, beyond the monkey's reach. However, in the room there are also a chair and a stick. The ceiling is just the right height so that a monkey standing on a chair could knock the bananas down with the stick. The monkey knows how to move around, carry other things around, reach for the bananas, and wave a stick in the air. What is the best sequence of actions for the monkey? Purpose of the problem The problem seeks to answer the question of whether monkeys are intelligent. Both humans and monkeys have the ability to use mental maps to remember things like where to go to find shelter, or how to avoid danger. They can also remember where to go to gather food and water, as well as how to communicate with each other. Monkeys have the ability not only to remember how to hunt and gather but to learn new things, as is the case with the monkey and the bananas: despite the fact that the monkey may never have been in an identical situation, with the same artifacts at hand, a monkey is capable of concluding that it needs to make a ladder, position it below the bananas, and climb up to reach for them. The degree to which such abilities should be ascribed to instinct or learning is a matter of debate. In 1984, a pigeon was observed as having the capacity to solve a problem.[1][2] Software solutions The problem is used as a toy problem for computer science. It can be solved with an expert system such as CLIPS. The example set of rules that CLIPS provides is somewhat fragile in that naive changes to the rulebase that might seem to a human of average intelligence to make common sense can cause the engine to fail to get the monkey to reach the banana.[3] Other examples exist using Rules Based System (RBS) a project implemented in Python.[4][5] VBScript ("Microsoft Visual Basic Scripting Edition") is a deprecated Active Scripting language developed by Microsoft that is modeled on Visual Basic. It allows Microsoft Windows system administrators to generate powerful tools for managing computers without error handling and with subroutines and other advanced programming constructs. It can give the user complete control over many aspects of their computing environment. VBScript uses the Component Object Model to access elements of the environment within which it is running; for example, the FileSystemObject (FSO) is used to create, read, update and delete files. VBScript has been installed by default in every desktop release of Microsoft Windows since Windows 98;[1] in Windows Server since Windows NT 4.0 Option Pack;[2] and optionally with Windows CE (depending on the device it is installed on). A VBScript script must be executed within a host environment, of which there are several provided with Microsoft Windows, including: Windows Script Host (WSH), Internet Explorer (IE), and Internet Information Services (IIS).[3] Additionally, the VBScript hosting environment is embeddable in other programs, through technologies such as the Microsoft Script Control (msscript.ocx). History VBScript began as part of the Microsoft Windows Script Technologies, launched in 1996. This technology (which also included JScript) was initially targeted at web developers. During a period of just over two years, VBScript advanced from version 1.0 to 2.0, and over that time it gained support from Windows system administrators seeking an automation tool more powerful than the batch language first developed in the early 1980s.[4] On August 1, 1996, Internet Explorer was released with features that included VBScript.[5] In version 5.0, the functionality of VBScript was increased with new features including regular expressions; classes; the With statement;[6] the Eval, Execute, and ExecuteGlobal functions to evaluate and execute script commands built during the execution of another script; a function-pointer system via GetRef,[7] and Distributed COM (DCOM) support. In version 5.5, SubMatches[8] were added to the regular expression class in VBScript, to finally allow script authors to capture the text within the expression's groups. That capability had already been available in JScript. With the advent of the .NET Framework, the scripting team took the decision to implement future support for VBScript within ASP.NET for web development,[9] and therefore no new versions of the VBScript engine would be developed. It would henceforth be supported by Microsoft's Sustaining Engineering Team, who are responsible for bug fixes and security enhancements. For Windows system administrators, Microsoft suggests migrating to Windows PowerShell, as VBScript is deprecated and will eventually be removed from Windows. On October 9, 2023, Microsoft announced plans to deprecate and eventually remove VBScript from future Windows versions.[10] Environments When employed for client-side web development in Microsoft Internet Explorer, VBScript is similar in function to JavaScript. It is used to write executable functions that are embedded in or included from HTML pages and interact with the Document Object Model (DOM) of the page, to perform tasks not possible in HTML alone. However, other web browsers such as Firefox and Opera and recently Chrome do not have built-in support for VBScript. This means that where client-side scripting and cross-browser compatibility are required, developers usually choose JavaScript over most other programming languages, such as VBScript. VBScript is also used for server-side processing of web pages, most notably with Microsoft Active Server Pages (ASP). The ASP engine and type library, asp.dll, invokes vbscript.dll to run VBScript scripts. VBScript that is embedded in an ASP page is contained within <% and %> context switches. The following example of an ASP page with VBScript displays the current time in 24-hour format, but it is also used as the default script for error messages with the Windows operating systems. FAISS, including its GPU version (faiss-gpu), primarily works with NumPy arrays. This means that even when using FAISS with GPU support, the input data typically needs to be in the form of a NumPy array. However, this doesn't mean that you can't use PyTorch tensors with FAISS; it just means that you'll need to convert PyTorch tensors to NumPy arrays before using them with FAISS functions. The reason for this requirement is that FAISS internally uses NumPy arrays for its data structures and computations, and although PyTorch tensors and NumPy arrays are often interoperable, they are not the same thing. Here's what you typically need to do when working with PyTorch tensors and FAISS: Convert PyTorch Tensors to NumPy Arrays: If your data is in a PyTorch tensor, you can convert it to a NumPy array using the .numpy() method if the tensor is on the CPU. If the tensor is on the GPU, you should first move it to the CPU with .cpu() and then convert it to a NumPy array. Use FAISS for Operations: Perform your necessary operations in FAISS using the NumPy arrays. Convert Back to PyTorch Tensors if Needed: If you need to bring the results back into PyTorch, you can convert the NumPy arrays back to PyTorch tensors. This conversion process is typically fast and efficient, but it's important to be aware of it, especially when working with large datasets or in situations where memory usage and computational efficiency are critical concerns. In summary, while faiss-gpu does not directly operate on PyTorch tensors, the conversion between PyTorch tensors and NumPy arrays is straightforward and usually doesn't pose a significant bottleneck in terms of performance. Resetting the chassis intrusion status on a Mellanox switch using the I2C (Inter-Integrated Circuit) interface involves a series of specific steps. Please note that this process is technical and should ideally be performed by someone with experience in managing network equipment and familiarity with the I2C protocol. Here's a general outline of how you might approach this task: Access the I2C Interface: To interact with the I2C interface, you'll need to use a system that can communicate over I2C, such as a microcontroller or a computer with an I2C adapter. The exact method of accessing the I2C interface will depend on the equipment you are using. Identify the Correct I2C Address: Each device on the I2C bus has a unique address. You need to find out the address of the chassis intrusion sensor or the relevant control register on the Mellanox switch. This information should be available in the switch's hardware documentation. Read the Current Intrusion Status: Before resetting the intrusion status, it's often a good practice to read the current status. This can be done by sending a read command to the appropriate address and register. Send a Reset Command: To reset the chassis intrusion status, you will need to write to a specific register of the intrusion detection system. This typically involves sending a particular byte or set of bytes to a specific address. The exact command will depend on the Mellanox switch model and its firmware. Verify the Reset: After sending the reset command, you should read back the intrusion status to ensure that it has been successfully reset. Log the Action: For security and auditing purposes, it's advisable to log this action in your system's records. It is crucial to consult the specific documentation for your Mellanox switch model for detailed instructions and the correct register addresses. Improperly interacting with the I2C interface can cause unintended behavior or damage to the switch. If you are not familiar with this level of hardware interaction, it is recommended to seek assistance from a qualified network engineer or contact Mellanox's technical support for guidance. Philosophy of mind is a branch of philosophy that studies the ontology and nature of the mind and its relationship with the body. The mind–body problem is a paradigmatic issue in philosophy of mind, although a number of other issues are addressed, such as the hard problem of consciousness and the nature of particular mental states.[1][2][3] Aspects of the mind that are studied include mental events, mental functions, mental properties, consciousness and its neural correlates, the ontology of the mind, the nature of cognition and of thought, and the relationship of the mind to the body. Dualism and monism are the two central schools of thought on the mind–body problem, although nuanced views have arisen that do not fit one or the other category neatly. Dualism finds its entry into Western philosophy thanks to René Descartes in the 17th century.[4] Substance dualists like Descartes argue that the mind is an independently existing substance, whereas property dualists maintain that the mind is a group of independent properties that emerge from and cannot be reduced to the brain, but that it is not a distinct substance.[5] Monism is the position that mind and body are ontologically indiscernible entities, not dependent substances. This view was espoused by the 17th-century rationalist Baruch Spinoza.[6] Physicalists argue that only entities postulated by physical theory exist, and that mental processes will eventually be explained in terms of these entities as physical theory continues to evolve. Physicalists maintain various positions on the prospects of reducing mental properties to physical properties (many of whom adopt compatible forms of property dualism),[7][8][9][10][11][12] and the ontological status of such mental properties remains unclear.[11][13][14] Idealists maintain that the mind is all that exists and that the external world is either mental itself, or an illusion created by the mind. Neutral monists such as Ernst Mach and William James argue that events in the world can be thought of as either mental (psychological) or physical depending on the network of relationships into which they enter, and dual-aspect monists such as Spinoza adhere to the position that there is some other, neutral substance, and that both matter and mind are properties of this unknown substance. The most common monisms in the 20th and 21st centuries have all been variations of physicalism; these positions include behaviorism, the type identity theory, anomalous monism and functionalism.[15] Most modern philosophers of mind adopt either a reductive physicalist or non-reductive physicalist position, maintaining in their different ways that the mind is not something separate from the body.[15] These approaches have been particularly influential in the sciences, especially in the fields of sociobiology, computer science (specifically, artificial intelligence), evolutionary psychology and the various neurosciences.[16][17][18][19] Reductive physicalists assert that all mental states and properties will eventually be explained by scientific accounts of physiological processes and states.[20][21][22] Non-reductive physicalists argue that although the mind is not a separate substance, mental properties supervene on physical properties, or that the predicates and vocabulary used in mental descriptions and explanations are indispensable, and cannot be reduced to the language and lower-level explanations of physical science.[23][24] Continued neuroscientific progress has helped to clarify some of these issues; however, they are far from being resolved. Modern philosophers of mind continue to ask how the subjective qualities and the intentionality of mental states and properties can be explained in naturalistic terms.[25][26] However, a number of issues have been recognized with non-reductive physicalism. First, it is irreconcilable with self-identity over time. Secondly, intentional states of consciousness do not make sense on non-reductive physicalism. Thirdly, free will is impossible to reconcile with either reductive or non-reductive physicalism. Fourthly, it fails to properly explain the phenomenon of mental causation.[27] Mind–body problem Main article: Mind–body problem René Descartes' illustration of mind/body dualism The mind–body problem concerns the explanation of the relationship that exists between minds, or mental processes, and bodily states or processes.[1] The main aim of philosophers working in this area is to determine the nature of the mind and mental states/processes, and how—or even if—minds are affected by and can affect the body. Perceptual experiences depend on stimuli that arrive at our various sensory organs from the external world, and these stimuli cause changes in our mental states, ultimately causing us to feel a sensation, which may be pleasant or unpleasant. Someone's desire for a slice of pizza, for example, will tend to cause that person to move his or her body in a specific manner and in a specific direction to obtain what he or she wants. The question, then, is how it can be possible for conscious experiences to arise out of a lump of gray matter endowed with nothing but electrochemical properties.[15] A related problem is how someone's propositional attitudes (e.g. beliefs and desires) cause that individual's neurons to fire and muscles to contract. These comprise some of the puzzles that have confronted epistemologists and philosophers of mind from the time of René Descartes.[4] Dualist solutions to the mind–body problem See also: Mind in eastern philosophy Dualism is a set of views about the relationship between mind and matter (or body). It begins with the claim that mental phenomena are, in some respects, non-physical.[5] One of the earliest known formulations of mind–body dualism was expressed in the eastern Samkhya and Yoga schools of Hindu philosophy (c. 650 BCE), which divided the world into purusha (mind/spirit) and prakriti (material substance).[28] Specifically, the Yoga Sutra of Patanjali presents an analytical approach to the nature of the mind. In Western Philosophy, the earliest discussions of dualist ideas are in the writings of Plato who suggested that humans' intelligence (a faculty of the mind or soul) could not be identified with, or explained in terms of, their physical body.[29][30] However, the best-known version of dualism is due to René Descartes (1641), and holds that the mind is a non-extended, non-physical substance, a "res cogitans".[4] Descartes was the first to clearly identify the mind with consciousness and self-awareness, and to distinguish this from the brain, which was the seat of intelligence. He was therefore the first to formulate the mind–body problem in the form in which it still exists today.[4] Arguments for dualism The most frequently used argument in favor of dualism appeals to the common-sense intuition that conscious experience is distinct from inanimate matter. If asked what the mind is, the average person would usually respond by identifying it with their self, their personality, their soul, or another related entity. They would almost certainly deny that the mind simply is the brain, or vice versa, finding the idea that there is just one ontological entity at play to be too mechanistic or unintelligible.[5] Modern philosophers of mind think that these intuitions are misleading, and that critical faculties, along with empirical evidence from the sciences, should be used to examine these assumptions and determine whether there is any real basis to them.[5] The mental and the physical seem to have quite different, and perhaps irreconcilable, properties.[31] Mental events have a subjective quality, whereas physical events do not. So, for example, one can reasonably ask what a burnt finger feels like, or what a blue sky looks like, or what nice music sounds like to a person. But it is meaningless, or at least odd, to ask what a surge in the uptake of glutamate in the dorsolateral portion of the prefrontal cortex feels like. Philosophers of mind call the subjective aspects of mental events "qualia" or "raw feels".[31] There are qualia involved in these mental events that seem particularly difficult to reduce to anything physical. David Chalmers explains this argument by stating that we could conceivably know all the objective information about something, such as the brain states and wavelengths of light involved with seeing the color red, but still not know something fundamental about the situation – what it is like to see the color red.[32] If consciousness (the mind) can exist independently of physical reality (the brain), one must explain how physical memories are created concerning consciousness. Dualism must therefore explain how consciousness affects physical reality. One possible explanation is that of a miracle, proposed by Arnold Geulincx and Nicolas Malebranche, where all mind–body interactions require the direct intervention of God. Another argument that has been proposed by C. S. Lewis[33] is the Argument from Reason: if, as monism implies, all of our thoughts are the effects of physical causes, then we have no reason for assuming that they are also the consequent of a reasonable ground. Knowledge, however, is apprehended by reasoning from ground to consequent. Therefore, if monism is correct, there would be no way of knowing this—or anything else—we could not even suppose it, except by a fluke. The zombie argument is based on a thought experiment proposed by Todd Moody, and developed by David Chalmers in his book The Conscious Mind. The basic idea is that one can imagine one's body, and therefore conceive the existence of one's body, without any conscious states being associated with this body. Chalmers' argument is that it seems possible that such a being could exist because all that is needed is that all and only the things that the physical sciences describe about a zombie must be true of it. Since none of the concepts involved in these sciences make reference to consciousness or other mental phenomena, and any physical entity can be by definition described scientifically via physics, the move from conceivability to possibility is not such a large one.[34] Others such as Dennett have argued that the notion of a philosophical zombie is an incoherent,[35] or unlikely,[36] concept. It has been argued under physicalism that one must either believe that anyone including oneself might be a zombie, or that no one can be a zombie—following from the assertion that one's own conviction about being (or not being) a zombie is a product of the physical world and is therefore no different from anyone else's. This argument has been expressed by Dennett who argues that "Zombies think they are conscious, think they have qualia, think they suffer pains—they are just 'wrong' (according to this lamentable tradition) in ways that neither they nor we could ever discover!"[35] See also the problem of other minds. Interactionist dualism Portrait of René Descartes by Frans Hals (1648) Interactionist dualism, or simply interactionism, is the particular form of dualism first espoused by Descartes in the Meditations.[4] In the 20th century, its major defenders have been Karl Popper and John Carew Eccles.[37] It is the view that mental states, such as beliefs and desires, causally interact with physical states.[5] Descartes's argument for this position can be summarized as follows: Seth has a clear and distinct idea of his mind as a thinking thing that has no spatial extension (i.e., it cannot be measured in terms of length, weight, height, and so on). He also has a clear and distinct idea of his body as something that is spatially extended, subject to quantification and not able to think. It follows that mind and body are not identical because they have radically different properties.[4] Seth's mental states (desires, beliefs, etc.) have causal effects on his body and vice versa: A child touches a hot stove (physical event) which causes pain (mental event) and makes her yell (physical event), this in turn provokes a sense of fear and protectiveness in the caregiver (mental event), and so on. Descartes' argument depends on the premise that what Seth believes to be "clear and distinct" ideas in his mind are necessarily true. Many contemporary philosophers doubt this.[38][39][40] For example, Joseph Agassi suggests that several scientific discoveries made since the early 20th century have undermined the idea of privileged access to one's own ideas. Freud claimed that a psychologically-trained observer can understand a person's unconscious motivations better than the person himself does. Duhem has shown that a philosopher of science can know a person's methods of discovery better than that person herself does, while Malinowski has shown that an anthropologist can know a person's customs and habits better than the person whose customs and habits they are. He also asserts that modern psychological experiments that cause people to see things that are not there provide grounds for rejecting Descartes' argument, because scientists can describe a person's perceptions better than the person herself can.[41][42] Other forms of dualism Four varieties of dualism. The arrows indicate the direction of the causal interactions. Occasionalism is not shown. Psychophysical parallelism Psychophysical parallelism, or simply parallelism, is the view that mind and body, while having distinct ontological statuses, do not causally influence one another. Instead, they run along parallel paths (mind events causally interact with mind events and brain events causally interact with brain events) and only seem to influence each other.[43] This view was most prominently defended by Gottfried Leibniz. Although Leibniz was an ontological monist who believed that only one type of substance, the monad, exists in the universe, and that everything is reducible to it, he nonetheless maintained that there was an important distinction between "the mental" and "the physical" in terms of causation. He held that God had arranged things in advance so that minds and bodies would be in harmony with each other. This is known as the doctrine of pre-established harmony.[44] Occasionalism Occasionalism is the view espoused by Nicholas Malebranche as well as Islamic philosophers such as Abu Hamid Muhammad ibn Muhammad al-Ghazali that asserts all supposedly causal relations between physical events, or between physical and mental events, are not really causal at all. While body and mind are different substances, causes (whether mental or physical) are related to their effects by an act of God's intervention on each specific occasion.[45] Property dualism Property dualism is the view that the world is constituted of one kind of substance – the physical kind – and there exist two distinct kinds of properties: physical properties and mental properties. It is the view that non-physical, mental properties (such as beliefs, desires and emotions) inhere in some physical bodies (at least, brains). Sub-varieties of property dualism include: Emergent materialism asserts that when matter is organized in the appropriate way (i.e. in the way that living human bodies are organized), mental properties emerge in a way not fully accountable for by physical laws.[5] These emergent properties have an independent ontological status and cannot be reduced to, or explained in terms of, the physical substrate from which they emerge. They are dependent on the physical properties from which they emerge, but opinions vary as to the coherence of top–down causation, i.e. the causal effectiveness of such properties. A form of emergent materialism has been espoused by David Chalmers and the concept has undergone something of a renaissance in recent years,[46] but it was already suggested in the 19th century by William James. Epiphenomenalism is a doctrine first formulated by Thomas Henry Huxley.[47] It consists of the view that mental phenomena are causally ineffectual, where one or more mental states do not have any influence on physical states or mental phenomena are the effects, but not the causes, of physical phenomena. Physical events can cause other physical and mental events, but mental events cannot cause anything since they are just causally inert by-products (i.e. epiphenomena) of the physical world.[43] This view has been defended by Frank Jackson.[48] Non-reductive physicalism is the view that mental properties form a separate ontological class to physical properties: mental states (such as qualia) are not reducible to physical states. The ontological stance towards qualia in the case of non-reductive physicalism does not imply that qualia are causally inert; this is what distinguishes it from epiphenomenalism. Panpsychism is the view that all matter has a mental aspect, or, alternatively, all objects have a unified center of experience or point of view. Superficially, it seems to be a form of property dualism, since it regards everything as having both mental and physical properties. However, some panpsychists say that mechanical behaviour is derived from the primitive mentality of atoms and molecules—as are sophisticated mentality and organic behaviour, the difference being attributed to the presence or absence of complex structure in a compound object. So long as the reduction of non-mental properties to mental ones is in place, panpsychism is not a (strong) form of property dualism; otherwise it is. Dual aspect theory Dual aspect theory or dual-aspect monism is the view that the mental and the physical are two aspects of, or perspectives on, the same substance. (Thus it is a mixed position, which is monistic in some respects). In modern philosophical writings, the theory's relationship to neutral monism has become somewhat ill-defined, but one proffered distinction says that whereas neutral monism allows the context of a given group of neutral elements and the relationships into which they enter to determine whether the group can be thought of as mental, physical, both, or neither, dual-aspect theory suggests that the mental and the physical are manifestations (or aspects) of some underlying substance, entity or process that is itself neither mental nor physical as normally understood. Various formulations of dual-aspect monism also require the mental and the physical to be complementary, mutually irreducible and perhaps inseparable (though distinct).[49][50][51] Experiential dualism This is a philosophy of mind that regards the degrees of freedom between mental and physical well-being as not synonymous thus implying an experiential dualism between body and mind. An example of these disparate degrees of freedom is given by Allan Wallace who notes that it is "experientially apparent that one may be physically uncomfortable—for instance, while engaging in a strenuous physical workout—while mentally cheerful; conversely, one may be mentally distraught while experiencing physical comfort".[52] Experiential dualism notes that our subjective experience of merely seeing something in the physical world seems qualitatively different from mental processes like grief that comes from losing a loved one. This philosophy is a proponent of causal dualism, which is defined as the dual ability for mental states and physical states to affect one another. Mental states can cause changes in physical states and vice versa. However, unlike cartesian dualism or some other systems, experiential dualism does not posit two fundamental substances in reality: mind and matter. Rather, experiential dualism is to be understood as a conceptual framework that gives credence to the qualitative difference between the experience of mental and physical states. Experiential dualism is accepted as the conceptual framework of Madhyamaka Buddhism. Madhayamaka Buddhism goes further, finding fault with the monist view of physicalist philosophies of mind as well in that these generally posit matter and energy as the fundamental substance of reality. Nonetheless, this does not imply that the cartesian dualist view is correct, rather Madhyamaka regards as error any affirming view of a fundamental substance to reality. In denying the independent self-existence of all the phenomena that make up the world of our experience, the Madhyamaka view departs from both the substance dualism of Descartes and the substance monism—namely, physicalism—that is characteristic of modern science. The physicalism propounded by many contemporary scientists seems to assert that the real world is composed of physical things-in-themselves, while all mental phenomena are regarded as mere appearances, devoid of any reality in and of themselves. Much is made of this difference between appearances and reality.[52] Indeed, physicalism, or the idea that matter is the only fundamental substance of reality, is explicitly rejected by Buddhism. In the Madhyamaka view, mental events are no more or less real than physical events. In terms of our common-sense experience, differences of kind do exist between physical and mental phenomena. While the former commonly have mass, location, velocity, shape, size, and numerous other physical attributes, these are not generally characteristic of mental phenomena. For example, we do not commonly conceive of the feeling of affection for another person as having mass or location. These physical attributes are no more appropriate to other mental events such as sadness, a recalled image from one's childhood, the visual perception of a rose, or consciousness of any sort. Mental phenomena are, therefore, not regarded as being physical, for the simple reason that they lack many of the attributes that are uniquely characteristic of physical phenomena. Thus, Buddhism has never adopted the physicalist principle that regards only physical things as real.[52] Monist solutions to the mind–body problem In contrast to dualism, monism does not accept any fundamental divisions. The fundamentally disparate nature of reality has been central to forms of eastern philosophies for over two millennia. In Indian and Chinese philosophy, monism is integral to how experience is understood. Today, the most common forms of monism in Western philosophy are physicalist.[15] Physicalistic monism asserts that the only existing substance is physical, in some sense of that term to be clarified by our best science.[53] However, a variety of formulations (see below) are possible. Another form of monism, idealism, states that the only existing substance is mental. Although pure idealism, such as that of George Berkeley, is uncommon in contemporary Western philosophy, a more sophisticated variant called panpsychism, according to which mental experience and properties may be at the foundation of physical experience and properties, has been espoused by some philosophers such as Alfred North Whitehead[54] and David Ray Griffin.[46] Phenomenalism is the theory that representations (or sense data) of external objects are all that exist. Such a view was briefly adopted by Bertrand Russell and many of the logical positivists during the early 20th century.[55] A third possibility is to accept the existence of a basic substance that is neither physical nor mental. The mental and physical would then both be properties of this neutral substance. Such a position was adopted by Baruch Spinoza[6] and was popularized by Ernst Mach[56] in the 19th century. This neutral monism, as it is called, resembles property dualism. Physicalistic monisms Behaviorism Main article: Behaviorism Behaviorism dominated philosophy of mind for much of the 20th century, especially the first half.[15] In psychology, behaviorism developed as a reaction to the inadequacies of introspectionism.[53] Introspective reports on one's own interior mental life are not subject to careful examination for accuracy and cannot be used to form predictive generalizations. Without generalizability and the possibility of third-person examination, the behaviorists argued, psychology cannot be scientific.[53] The way out, therefore, was to eliminate the idea of an interior mental life (and hence an ontologically independent mind) altogether and focus instead on the description of observable behavior.[57] Parallel to these developments in psychology, a philosophical behaviorism (sometimes called logical behaviorism) was developed.[53] This is characterized by a strong verificationism, which generally considers unverifiable statements about interior mental life pointless. For the behaviorist, mental states are not interior states on which one can make introspective reports. They are just descriptions of behavior or dispositions to behave in certain ways, made by third parties to explain and predict another's behavior.[58] Philosophical behaviorism has fallen out of favor since the latter half of the 20th century, coinciding with the rise of cognitivism.[1] Identity theory Main article: Type physicalism Type physicalism (or type-identity theory) was developed by Jack Smart[22] and Ullin Place[59] as a direct reaction to the failure of behaviorism. These philosophers reasoned that, if mental states are something material, but not behavioral, then mental states are probably identical to internal states of the brain. In very simplified terms: a mental state M is nothing other than brain state B. The mental state "desire for a cup of coffee" would thus be nothing more than the "firing of certain neurons in certain brain regions".[22] The classic Identity theory and Anomalous Monism in contrast. For the Identity theory, every token instantiation of a single mental type corresponds (as indicated by the arrows) to a physical token of a single physical type. For anomalous monism, the token–token correspondences can fall outside of the type–type correspondences. The result is token identity. On the other hand, even granted the above, it does not follow that identity theories of all types must be abandoned. According to token identity theories, the fact that a certain brain state is connected with only one mental state of a person does not have to mean that there is an absolute correlation between types of mental state and types of brain state. The type–token distinction can be illustrated by a simple example: the word "green" contains four types of letters (g, r, e, n) with two tokens (occurrences) of the letter e along with one each of the others. The idea of token identity is that only particular occurrences of mental events are identical with particular occurrences or tokenings of physical events.[60] Anomalous monism (see below) and most other non-reductive physicalisms are token-identity theories.[61] Despite these problems, there is a renewed interest in the type identity theory today, primarily due to the influence of Jaegwon Kim.[22] Functionalism Main article: Functionalism (philosophy of mind) Functionalism was formulated by Hilary Putnam and Jerry Fodor as a reaction to the inadequacies of the identity theory.[24] Putnam and Fodor saw mental states in terms of an empirical computational theory of the mind.[62] At about the same time or slightly after, D.M. Armstrong and David Kellogg Lewis formulated a version of functionalism that analyzed the mental concepts of folk psychology in terms of functional roles.[63] Finally, Wittgenstein's idea of meaning as use led to a version of functionalism as a theory of meaning, further developed by Wilfrid Sellars and Gilbert Harman. Another one, psychofunctionalism, is an approach adopted by the naturalistic philosophy of mind associated with Jerry Fodor and Zenon Pylyshyn. Mental states are characterized by their causal relations with other mental states and with sensory inputs and behavioral outputs. Functionalism abstracts away from the details of the physical implementation of a mental state by characterizing it in terms of non-mental functional properties. For example, a kidney is characterized scientifically by its functional role in filtering blood and maintaining certain chemical balances.[62] Non-reductive physicalism Main article: Physicalism Non-reductionist philosophers hold firmly to two essential convictions with regard to mind–body relations: 1) Physicalism is true and mental states must be physical states, but 2) All reductionist proposals are unsatisfactory: mental states cannot be reduced to behavior, brain states or functional states.[53] Hence, the question arises whether there can still be a non-reductive physicalism. Donald Davidson's anomalous monism[23] is an attempt to formulate such a physicalism. He "thinks that when one runs across what are traditionally seen as absurdities of Reason, such as akrasia or self-deception, the personal psychology framework is not to be given up in favor of the subpersonal one, but rather must be enlarged or extended so that the rationality set out by the principle of charity can be found elsewhere."[64] Davidson uses the thesis of supervenience: mental states supervene on physical states, but are not reducible to them. "Supervenience" therefore describes a functional dependence: there can be no change in the mental without some change in the physical–causal reducibility between the mental and physical without ontological reducibility.[65] Non-reductive physicalism, however, is irreconcilable with self-identity over time [source?]. The brain goes on from one moment of time to another; the brain thus has identity through time. But its states of awareness do not go on from one moment to the next. There is no enduring self – no “I” (capital-I) that goes on from one moment to the next. An analogy of the self or the “I” would be the flame of a candle. The candle and the wick go on from one moment to the next, but the flame does not go on. There is a different flame at each moment of the candle’s burning. The flame displays a type of continuity in that the candle does not go out while it is burning, but there is not really any identity of the flame from one moment to another over time. The scenario is similar on non-reductive physicalism with states of awareness. Every state of the brain at different times has a different state of awareness related to it, but there is no enduring self or “I” from one moment to the next. Similarly, it is an illusion that one is the same individual who walked into class this morning. In fact, one is not the same individual because there is no personal identity over time. If one does exist and one is the same individual who entered into class this morning, then a non-reductive physicalist view of the self should be dismissed.[27] Because non-reductive physicalist theories attempt to both retain the ontological distinction between mind and body and try to solve the "surfeit of explanations puzzle" in some way; critics often see this as a paradox and point out the similarities to epiphenomenalism, in that it is the brain that is seen as the root "cause" not the mind, and the mind seems to be rendered inert. Epiphenomenalism regards one or more mental states as the byproduct of physical brain states, having no influence on physical states. The interaction is one-way (solving the "surfeit of explanations puzzle") but leaving us with non-reducible mental states (as a byproduct of brain states) – causally reducible, but ontologically irreducible to physical states. Pain would be seen by epiphenomenalists as being caused by the brain state but as not having effects on other brain states, though it might have effects on other mental states (i.e. cause distress). Weak emergentism Main article: Emergentism Weak emergentism is a form of "non-reductive physicalism" that involves a layered view of nature, with the layers arranged in terms of increasing complexity and each corresponding to its own special science. Some philosophers[who?] hold that emergent properties causally interact with more fundamental levels, while others maintain that higher-order properties simply supervene over lower levels without direct causal interaction. The latter group therefore holds a less strict, or "weaker", definition of emergentism, which can be rigorously stated as follows: a property P of composite object O is emergent if it is metaphysically impossible for another object to lack property P if that object is composed of parts with intrinsic properties identical to those in O and has those parts in an identical configuration.[citation needed] Sometimes emergentists use the example of water having a new property when Hydrogen H and Oxygen O combine to form H2O (water). In this example there "emerges" a new property of a transparent liquid that would not have been predicted by understanding hydrogen and oxygen as gases. This is analogous to physical properties of the brain giving rise to a mental state. Emergentists try to solve the notorious mind–body gap this way. One problem for emergentism is the idea of causal closure in the world that does not allow for a mind-to-body causation.[66] Eliminative materialism Main article: Eliminative materialism If one is a materialist and believes that all aspects of our common-sense psychology will find reduction to a mature cognitive neuroscience, and that non-reductive materialism is mistaken, then one can adopt a final, more radical position: eliminative materialism. There are several varieties of eliminative materialism, but all maintain that our common-sense "folk psychology" badly misrepresents the nature of some aspect of cognition. Eliminativists such as Patricia and Paul Churchland argue that while folk psychology treats cognition as fundamentally sentence-like, the non-linguistic vector/matrix model of neural network theory or connectionism will prove to be a much more accurate account of how the brain works.[20] The Churchlands often invoke the fate of other, erroneous popular theories and ontologies that have arisen in the course of history.[20][21] For example, Ptolemaic astronomy served to explain and roughly predict the motions of the planets for centuries, but eventually this model of the solar system was eliminated in favor of the Copernican model. The Churchlands believe the same eliminative fate awaits the "sentence-cruncher" model of the mind in which thought and behavior are the result of manipulating sentence-like states called "propositional attitudes". Sociologist Jacy Reese Anthis argues for eliminative materialism on all faculties of mind, including consciousness, stating, "The deepest mysteries of the mind are within our reach."[67] Mysterianism Main article: New mysterianism Some philosophers take an epistemic approach and argue that the mind–body problem is currently unsolvable, and perhaps will always remain unsolvable to human beings. This is usually termed New mysterianism. Colin McGinn holds that human beings are cognitively closed in regards to their own minds. According to McGinn human minds lack the concept-forming procedures to fully grasp how mental properties such as consciousness arise from their causal basis.[68] An example would be how an elephant is cognitively closed in regards to particle physics. A more moderate conception has been expounded by Thomas Nagel, which holds that the mind–body problem is currently unsolvable at the present stage of scientific development and that it might take a future scientific paradigm shift or revolution to bridge the explanatory gap. Nagel posits that in the future a sort of "objective phenomenology" might be able to bridge the gap between subjective conscious experience and its physical basis.[69] Linguistic criticism of the mind–body problem Each attempt to answer the mind–body problem encounters substantial problems. Some philosophers argue that this is because there is an underlying conceptual confusion.[70] These philosophers, such as Ludwig Wittgenstein and his followers in the tradition of linguistic criticism, therefore reject the problem as illusory.[71] They argue that it is an error to ask how mental and biological states fit together. Rather it should simply be accepted that human experience can be described in different ways—for instance, in a mental and in a biological vocabulary. Illusory problems arise if one tries to describe the one in terms of the other's vocabulary or if the mental vocabulary is used in the wrong contexts.[71] This is the case, for instance, if one searches for mental states of the brain. The brain is simply the wrong context for the use of mental vocabulary—the search for mental states of the brain is therefore a category error or a sort of fallacy of reasoning.[71] Today, such a position is often adopted by interpreters of Wittgenstein such as Peter Hacker.[70] However, Hilary Putnam, the originator of functionalism, has also adopted the position that the mind–body problem is an illusory problem which should be dissolved according to the manner of Wittgenstein.[72] Naturalism and its problems The thesis of physicalism is that the mind is part of the material (or physical) world. Such a position faces the problem that the mind has certain properties that no other material thing seems to possess. Physicalism must therefore explain how it is possible that these properties can nonetheless emerge from a material thing. The project of providing such an explanation is often referred to as the "naturalization of the mental".[53] Some of the crucial problems that this project attempts to resolve include the existence of qualia and the nature of intentionality.[53] Qualia Main article: Qualia Many mental states seem to be experienced subjectively in different ways by different individuals.[32] And it is characteristic of a mental state that it has some experiential quality, e.g. of pain, that it hurts. However, the sensation of pain between two individuals may not be identical, since no one has a perfect way to measure how much something hurts or of describing exactly how it feels to hurt. Philosophers and scientists therefore ask where these experiences come from. The existence of cerebral events, in and of themselves, cannot explain why they are accompanied by these corresponding qualitative experiences. The puzzle of why many cerebral processes occur with an accompanying experiential aspect in consciousness seems impossible to explain.[31] Yet it also seems to many that science will eventually have to explain such experiences.[53] This follows from an assumption about the possibility of reductive explanations. According to this view, if an attempt can be successfully made to explain a phenomenon reductively (e.g., water), then it can be explained why the phenomenon has all of its properties (e.g., fluidity, transparency).[53] In the case of mental states, this means that there needs to be an explanation of why they have the property of being experienced in a certain way. The 20th-century German philosopher Martin Heidegger criticized the ontological assumptions underpinning such a reductive model, and claimed that it was impossible to make sense of experience in these terms. This is because, according to Heidegger, the nature of our subjective experience and its qualities is impossible to understand in terms of Cartesian "substances" that bear "properties". Another way to put this is that the very concept of qualitative experience is incoherent in terms of—or is semantically incommensurable with the concept of—substances that bear properties.[73] This problem of explaining introspective first-person aspects of mental states and consciousness in general in terms of third-person quantitative neuroscience is called the explanatory gap.[74] There are several different views of the nature of this gap among contemporary philosophers of mind. David Chalmers and the early Frank Jackson interpret the gap as ontological in nature; that is, they maintain that qualia can never be explained by science because physicalism is false. There are two separate categories involved and one cannot be reduced to the other.[75] An alternative view is taken by philosophers such as Thomas Nagel and Colin McGinn. According to them, the gap is epistemological in nature. For Nagel, science is not yet able to explain subjective experience because it has not yet arrived at the level or kind of knowledge that is required. We are not even able to formulate the problem coherently.[32] For McGinn, on other hand, the problem is one of permanent and inherent biological limitations. We are not able to resolve the explanatory gap because the realm of subjective experiences is cognitively closed to us in the same manner that quantum physics is cognitively closed to elephants.[76] Other philosophers liquidate the gap as purely a semantic problem. This semantic problem, of course, led to the famous "Qualia Question", which is: Does Red cause Redness? Intentionality Main article: Intentionality John Searle—one of the most influential philosophers of mind, proponent of biological naturalism (Berkeley 2002) Intentionality is the capacity of mental states to be directed towards (about) or be in relation with something in the external world.[26] This property of mental states entails that they have contents and semantic referents and can therefore be assigned truth values. When one tries to reduce these states to natural processes there arises a problem: natural processes are not true or false, they simply happen.[77] It would not make any sense to say that a natural process is true or false. But mental ideas or judgments are true or false, so how then can mental states (ideas or judgments) be natural processes? The possibility of assigning semantic value to ideas must mean that such ideas are about facts. Thus, for example, the idea that Herodotus was a historian refers to Herodotus and to the fact that he was a historian. If the fact is true, then the idea is true; otherwise, it is false. But where does this relation come from? In the brain, there are only electrochemical processes and these seem not to have anything to do with Herodotus.[25] Philosophy of perception Main article: Philosophy of perception Philosophy of perception is concerned with the nature of perceptual experience and the status of perceptual objects, in particular how perceptual experience relates to appearances and beliefs about the world. The main contemporary views within philosophy of perception include naive realism, enactivism and representational views.[2][3][78] A phrenological mapping of the brain – phrenology was among the first attempts to correlate mental functions with specific parts of the brain although it is now widely discredited. Philosophy of mind and science Humans are corporeal beings and, as such, they are subject to examination and description by the natural sciences. Since mental processes are intimately related to bodily processes (e.g., embodied cognition theory of mind), the descriptions that the natural sciences furnish of human beings play an important role in the philosophy of mind.[1] There are many scientific disciplines that study processes related to the mental. The list of such sciences includes: biology, computer science, cognitive science, cybernetics, linguistics, medicine, pharmacology, and psychology.[79] Neurobiology Main article: Neuroscience The theoretical background of biology, as is the case with modern natural sciences in general, is fundamentally materialistic. The objects of study are, in the first place, physical processes, which are considered to be the foundations of mental activity and behavior.[80] The increasing success of biology in the explanation of mental phenomena can be seen by the absence of any empirical refutation of its fundamental presupposition: "there can be no change in the mental states of a person without a change in brain states."[79] Within the field of neurobiology, there are many subdisciplines that are concerned with the relations between mental and physical states and processes:[80] Sensory neurophysiology investigates the relation between the processes of perception and stimulation.[81] Cognitive neuroscience studies the correlations between mental processes and neural processes.[81] Neuropsychology describes the dependence of mental faculties on specific anatomical regions of the brain.[81] Lastly, evolutionary biology studies the origins and development of the human nervous system and, in as much as this is the basis of the mind, also describes the ontogenetic and phylogenetic development of mental phenomena beginning from their most primitive stages.[79] Evolutionary biology furthermore places tight constraints on any philosophical theory of the mind, as the gene-based mechanism of natural selection does not allow any giant leaps in the development of neural complexity or neural software but only incremental steps over long time periods.[82] Since the 1980s, sophisticated neuroimaging procedures, such as fMRI (above), have furnished increasing knowledge about the workings of the human brain, shedding light on ancient philosophical problems. The methodological breakthroughs of the neurosciences, in particular the introduction of high-tech neuroimaging procedures, has propelled scientists toward the elaboration of increasingly ambitious research programs: one of the main goals is to describe and comprehend the neural processes which correspond to mental functions (see: neural correlate).[80] Several groups are inspired by these advances. Computer science Main article: Computer science Computer science concerns itself with the automatic processing of information (or at least with physical systems of symbols to which information is assigned) by means of such things as computers.[83] From the beginning, computer programmers have been able to develop programs that permit computers to carry out tasks for which organic beings need a mind. A simple example is multiplication. It is not clear whether computers could be said to have a mind. Could they, someday, come to have what we call a mind? This question has been propelled into the forefront of much philosophical debate because of investigations in the field of artificial intelligence (AI). Within AI, it is common to distinguish between a modest research program and a more ambitious one: this distinction was coined by John Searle in terms of a weak AI and strong AI. The exclusive objective of "weak AI", according to Searle, is the successful simulation of mental states, with no attempt to make computers become conscious or aware, etc. The objective of strong AI, on the contrary, is a computer with consciousness similar to that of human beings.[84] The program of strong AI goes back to one of the pioneers of computation Alan Turing. As an answer to the question "Can computers think?", he formulated the famous Turing test.[85] Turing believed that a computer could be said to "think" when, if placed in a room by itself next to another room that contained a human being and with the same questions being asked of both the computer and the human being by a third party human being, the computer's responses turned out to be indistinguishable from those of the human. Essentially, Turing's view of machine intelligence followed the behaviourist model of the mind—intelligence is as intelligence does. The Turing test has received many criticisms, among which the most famous is probably the Chinese room thought experiment formulated by Searle.[84] The question about the possible sensitivity (qualia) of computers or robots still remains open. Some computer scientists believe that the specialty of AI can still make new contributions to the resolution of the "mind–body problem". They suggest that based on the reciprocal influences between software and hardware that takes place in all computers, it is possible that someday theories can be discovered that help us to understand the reciprocal influences between the human mind and the brain (wetware).[86] Psychology Main article: Psychology Psychology is the science that investigates mental states directly. It uses generally empirical methods to investigate concrete mental states like joy, fear or obsessions. Psychology investigates the laws that bind these mental states to each other or with inputs and outputs to the human organism.[87] An example of this is the psychology of perception. Scientists working in this field have discovered general principles of the perception of forms. A law of the psychology of forms says that objects that move in the same direction are perceived as related to each other.[79] This law describes a relation between visual input and mental perceptual states. However, it does not suggest anything about the nature of perceptual states. The laws discovered by psychology are compatible with all the answers to the mind–body problem already described. Cognitive science Cognitive science is the interdisciplinary scientific study of the mind and its processes. It examines what cognition is, what it does, and how it works. It includes research on intelligence and behavior, especially focusing on how information is represented, processed, and transformed (in faculties such as perception, language, memory, reasoning, and emotion) within nervous systems (human or other animals) and machines (e.g. computers). Cognitive science consists of multiple research disciplines, including psychology, artificial intelligence, philosophy, neuroscience, linguistics, anthropology, sociology, and education.[88] It spans many levels of analysis, from low-level learning and decision mechanisms to high-level logic and planning; from neural circuitry to modular brain organization. Over the years, cognitive science has evolved from a representational and information processing approach to explaining the mind to embrace an embodied perspective of it. Accordingly, bodily processes play a significant role in the acquisition, development, and shaping of cognitive capabilities.[89] For instance, Rowlands (2012) argues that cognition is enactive, embodied, embedded, affective and (potentially) extended. The position is taken that the "classical sandwich" of cognition sandwiched between perception and action is artificial; cognition has to be seen as a product of a strongly coupled interaction that cannot be divided this way.[90][91] Near-death research Main article: Near-death studies In the field of near-death research, the following phenomenon, among others, occurs: For example, during some brain operations the brain is artificially and measurably deactivated. Nevertheless, some patients report during this phase that they have perceived what is happening in their surroundings, i.e. that they have had consciousness. Patients also report experiences during a cardiac arrest. There is the following problem: As soon as the brain is no longer supplied with blood and thus with oxygen after a cardiac arrest, the brain ceases its normal operation after about 15 seconds, i.e. the brain falls into a state of unconsciousness.[92] Philosophy of mind in the continental tradition Most of the discussion in this article has focused on one style or tradition of philosophy in modern Western culture, usually called analytic philosophy (sometimes described as Anglo-American philosophy).[93] Many other schools of thought exist, however, which are sometimes subsumed under the broad (and vague) label of continental philosophy.[93] In any case, though topics and methods here are numerous, in relation to the philosophy of mind the various schools that fall under this label (phenomenology, existentialism, etc.) can globally be seen to differ from the analytic school in that they focus less on language and logical analysis alone but also take in other forms of understanding human existence and experience. With reference specifically to the discussion of the mind, this tends to translate into attempts to grasp the concepts of thought and perceptual experience in some sense that does not merely involve the analysis of linguistic forms.[93] Immanuel Kant's Critique of Pure Reason, first published in 1781 and presented again with major revisions in 1787, represents a significant intervention into what will later become known as the philosophy of mind. Kant's first critique is generally recognized as among the most significant works of modern philosophy in the West. Kant is a figure whose influence is marked in both continental and analytic/Anglo-American philosophy. Kant's work develops an in-depth study of transcendental consciousness, or the life of the mind as conceived through the universal categories of understanding. In Georg Wilhelm Friedrich Hegel's Philosophy of Mind (frequently translated as Philosophy of Spirit or Geist),[94] the third part of his Encyclopedia of the Philosophical Sciences, Hegel discusses three distinct types of mind: the "subjective mind/spirit", the mind of an individual; the "objective mind/spirit", the mind of society and of the State; and the "Absolute mind/spirit", the position of religion, art, and philosophy. See also Hegel's The Phenomenology of Spirit. Nonetheless, Hegel's work differs radically from the style of Anglo-American philosophy of mind. In 1896, Henri Bergson made in Matter and Memory "Essay on the relation of body and spirit" a forceful case for the ontological difference of body and mind by reducing the problem to the more definite one of memory, thus allowing for a solution built on the empirical test case of aphasia. In modern times, the two main schools that have developed in response or opposition to this Hegelian tradition are phenomenology and existentialism. Phenomenology, founded by Edmund Husserl, focuses on the contents of the human mind (see noema) and how processes shape our experiences.[95] Existentialism, a school of thought founded upon the work of Søren Kierkegaard, focuses on Human predicament and how people deal with the situation of being alive. Existential-phenomenology represents a major branch of continental philosophy (they are not contradictory), rooted in the work of Husserl but expressed in its fullest forms in the work of Martin Heidegger, Jean-Paul Sartre, Simone de Beauvoir and Maurice Merleau-Ponty. See Heidegger's Being and Time, Merleau-Ponty's Phenomenology of Perception, Sartre's Being and Nothingness, and Simone de Beauvoir's The Second Sex. Topics related to philosophy of mind There are countless subjects that are affected by the ideas developed in the philosophy of mind. Clear examples of this are the nature of death and its definitive character, the nature of emotion, of perception and of memory. Questions about what a person is and what his or her identity have to do with the philosophy of mind. There are two subjects that, in connection with the philosophy of the mind, have aroused special attention: free will and the self.[1] Free will Main article: Free will In the context of philosophy of mind, the problem of free will takes on renewed intensity. This is the case for materialistic determinists.[1] According to this position, natural laws completely determine the course of the material world. Mental states, and therefore the will as well, would be material states, which means human behavior and decisions would be completely determined by natural laws. Some take this reasoning a step further: people cannot determine by themselves what they want and what they do. Consequently, they are not free.[96] This argumentation is rejected, on the one hand, by the compatibilists. Those who adopt this position suggest that the question "Are we free?" can only be answered once we have determined what the term "free" means. The opposite of "free" is not "caused" but "compelled" or "coerced". It is not appropriate to identify freedom with indetermination. A free act is one where the agent could have done otherwise if it had chosen otherwise. In this sense a person can be free even though determinism is true.[96] The most important compatibilist in the history of the philosophy was David Hume.[97] More recently, this position is defended, for example, by Daniel Dennett.[98] On the other hand, there are also many incompatibilists who reject the argument because they believe that the will is free in a stronger sense called libertarianism.[96] These philosophers affirm the course of the world is either a) not completely determined by natural law where natural law is intercepted by physically independent agency,[99] b) determined by indeterministic natural law only, or c) determined by indeterministic natural law in line with the subjective effort of physically non-reducible agency.[100] Under Libertarianism, the will does not have to be deterministic and, therefore, it is potentially free. Critics of the second proposition (b) accuse the incompatibilists of using an incoherent concept of freedom. They argue as follows: if our will is not determined by anything, then we desire what we desire by pure chance. And if what we desire is purely accidental, we are not free. So if our will is not determined by anything, we are not free.[96] Self Main article: Philosophy of self The philosophy of mind also has important consequences for the concept of "self". If by "self" or "I" one refers to an essential, immutable nucleus of the person, some modern philosophers of mind, such as Daniel Dennett believe that no such thing exists. According to Dennett and other contemporaries, the self is considered an illusion.[101] The idea of a self as an immutable essential nucleus derives from the idea of an immaterial soul. Such an idea is unacceptable to modern philosophers with physicalist orientations and their general skepticism of the concept of "self" as postulated by David Hume, who could never catch himself not doing, thinking or feeling anything.[102] However, in the light of empirical results from developmental psychology, developmental biology and neuroscience, the idea of an essential inconstant, material nucleus—an integrated representational system distributed over changing patterns of synaptic connections—seems reasonable.[103] How is a sovereign state defined? A sovereign state is an entity with a permanent population, a defined territory, an effective government, and the capacity to conduct international relations. These criteria are often loosely applied. For example, boundary disputes and ongoing civil wars do not necessarily prevent an entity from becoming a state if it is formally independent from other states. Does a state need to get recognition from other states? No, a state technically does not need to get recognition from other states. Under the prevailing declaratory theory of recognition, a state exists if it meets the necessary criteria that define states. Recognition is simply an acknowledgment of an existing situation. (The minority constitutive theory of recognition holds that recognition is necessary to the existence of a state.) When can a state use military force against another state? A state can use military force against another state only in self-defense against an armed attack. This right arises from Article 51 of the United Nations Charter, which incorporates inherent rights from customary international law. Any acts of self-defense must be necessary and proportionate to the acts of aggression. Acts of anticipatory self-defense may be permitted when an armed attack is imminent and inevitable, although the UN Charter does not address this situation. What does international humanitarian law do? International humanitarian law restricts the ways in which wars can be conducted. It protects the safety of non-combatants, as well as former combatants like prisoners of war. It also bans the use of certain weapons or tactics that inflict unnecessary harm or suffering, cause severe or lasting harm to the environment, or cannot be used in a way that allows those using them to distinguish between combatant and non-combatant targets. What are some of the human rights guaranteed by international law? Human rights guaranteed by international law include civil, political, economic, social, and cultural rights. Examples include freedom of expression, freedom of religion, freedom of association, the right to an adequate standard of living, the right to work in favorable conditions, the right to education, and protections against arbitrary arrest and detention. These rights are codified in the Universal Declaration of Human Rights and other United Nations instruments, known collectively as the International Bill of Human Rights. What is the concept of sustainable development? Sustainable development is defined as meeting the present needs of a generation without preventing future generations from meeting their needs. It has been a guiding principle of international environmental law since the Earth Summit in Rio de Janeiro in 1992, and it even has influenced economic treaties. However, sustainable development has not yet been achieved, despite some legal and political progress. What are the main organs of the United Nations? The main organs of the United Nations are the General Assembly, the Security Council, the Secretariat, the International Court of Justice, the Economic and Social Council, and the Trusteeship Council. The General Assembly is a representative policy-making organ in which member states vote on resolutions and other actions. The Security Council protects international peace and security, approves changes to the UN Charter, and recommends new UN member states. Led by the UN Secretary-General, the Secretariat carries out the mandates of the General Assembly and other UN organs. The International Court of Justice resolves disputes between states and issues advisory opinions to non-state organizations. The Economic and Social Council develops policy recommendations based on meetings and consultations. The Trusteeship Council has been inactive since the 1990s, when the last UN Trust Territory gained independence. Which cases are heard by the International Court of Justice? The International Court of Justice has contentious jurisdiction and advisory jurisdiction. Its contentious jurisdiction involves resolving disputes between states under international law. Each state involved in a dispute must consent to ICJ jurisdiction. While contentious jurisdiction leads to binding decisions, advisory jurisdiction involves issuing non-binding opinions to public international organizations. These opinions generally carry great weight and can resolve ambiguities in international law. How are treaties different from executive agreements under US law? A treaty requires the advice and consent of two-thirds of the Senate, and it must be ratified by the President. An executive agreement can be negotiated by the President without the advice and consent of two-thirds of the Senate. In a congressional-executive agreement, the President gets the approval of a simple majority of both houses of Congress. In a sole executive agreement, the President acts without involving Congress. However, treaties and executive agreements are equally binding under international law. When does a treaty supersede federal laws? A treaty supersedes prior inconsistent federal laws if Congress implements it through new federal laws or if it is self-executing. A treaty is self-executing if there is an intent to make it enforceable under US law without additional implementing legislation. Some provisions in a treaty may be self-executing even if other provisions are not. Specific provisions are more likely to be considered self-executing. A provision may be self-executing in the US even if it is not self-executing in other signatory nations. Recognition of States The process in which a state acknowledges another entity as a state is known as recognition. This can involve an overt statement or an action that implies an intent to recognize the entity as a state. Each state can make its own decision about whether recognition is appropriate, which can carry significant political weight. For example, recognition is usually required to establish sovereign and diplomatic immunities. International law contains two theories of recognition. The constitutive theory of recognition holds that a state does not exist until it receives recognition. By contrast, the declaratory theory of recognition holds that a state exists without recognition, which is merely an acknowledgment of an existing situation. The declaratory theory has become the prevailing view. That said, an entity likely has a stronger claim to statehood when it has received recognition from many other states. This is especially true if questions surround its ability to meet the criteria under the Montevideo Convention. Non-Recognition and Qualified Recognition Statehood does not rely on recognition, but sometimes a state may have a duty to refrain from recognizing another state or an alteration to a state. This situation usually arises when the state or altered state arose from illegitimate military actions, violations of human rights, or other clear infringements of international norms. The United Nations Security Council often sets an example for states on this issue. For example, it nullified the annexation of Kuwait by Iraq during the period preceding the Gulf War of 1991. In other cases, a state may not recognize an entity that meets the baseline criteria for statehood until it meets specific additional requirements. For example, states formed during the dissolution of the Soviet Union did not receive recognition from the European Community (the precursor to the European Union) until they committed to nuclear non-proliferation, minority rights, and respect for borders. The Solar System[c] is the gravitationally bound system of the Sun and the objects that orbit it. The largest of these objects are the eight planets, which in order from the Sun are four terrestrial planets (Mercury, Venus, Earth and Mars); two gas giants (Jupiter and Saturn); and two ice giants (Uranus and Neptune). The Solar System formed 4.6 billion years ago from the gravitational collapse of a giant interstellar molecular cloud. All four terrestrial planets belong to the inner Solar System (≤ 1.7 AU) and have a solid surface. Inversely, all four giant planets belong to the outer Solar System (≤ 30.5 AU) and do not have a definite surface, as they are mainly composed of gases and liquids. 99.86% of the Solar System's mass is in the Sun and nearly 90% of the remaining mass are in Jupiter and Saturn. There is a strong consensus among astronomers that the Solar System also has nine dwarf planets, which consist of one asteroid-belt object – Ceres; five Kuiper-belt objects – Pluto, Orcus, Haumea, Quaoar, and Makemake; and three scattered-disc objects – Gonggong, Eris, and Sedna. There are a vast number of smaller objects orbiting the Sun, called small Solar System bodies. This category includes asteroids, comets, centaurs, meteoroids and interplanetary dust clouds. Many of these objects are in the asteroid belt between the orbits of Mars and Jupiter (1.5–4.5 astronomical units, AU), and the Kuiper belt just outside Neptune's orbit (30–50 AU).[d] Six of the major planets, the six largest possible dwarf planets, and many of the smaller bodies are orbited by natural satellites, commonly called "moons" after Earth's Moon. Two natural satellites, Jupiter's moon Ganymede and Saturn's moon Titan, are larger than Mercury, the smallest terrestrial planet, though they are less massive. The Sun's stream of charged particles creates the heliosphere, which terminates where the pressure of the solar wind is equal to the surrounding interstellar medium, forming a boundary called the heliopause. The outermost region of the Solar System is the Oort cloud (from 2,000 to 50,000–200,000 AU), the source for long-period comets. The Solar System, which ends at the Sun's sphere of gravitational influence (50,000–200,000 AU), is embedded in the Local Cloud of the interstellar medium and orbits the Galactic Center. The closest star to the Solar System, Proxima Centauri, is 4.25 light years away. Formation and evolution Main article: Formation and evolution of the Solar System The Solar System formed 4.568 billion years ago from the gravitational collapse of a region within a large molecular cloud.[e] This initial cloud was likely several light-years across and probably birthed several stars.[5] As is typical of molecular clouds, this one consisted mostly of hydrogen, with some helium, and small amounts of heavier elements fused by previous generations of stars.[6] As the pre-solar nebula[6] collapsed, conservation of angular momentum caused it to rotate faster. The center, where most of the mass collected, became increasingly hotter than the surrounding disc.[5] As the contracting nebula rotated faster, it began to flatten into a protoplanetary disc with a diameter of roughly 200 AU (30 billion km; 19 billion mi)[5] and a hot, dense protostar at the center.[7][8] The planets formed by accretion from this disc,[9] in which dust and gas gravitationally attracted each other, coalescing to form ever larger bodies. Hundreds of protoplanets may have existed in the early Solar System, but they either merged or were destroyed or ejected, leaving the planets, dwarf planets, and leftover minor bodies.[10][11] Diagram of the early Solar System's protoplanetary disk, out of which Earth and other Solar System bodies formed Due to their higher boiling points, only metals and silicates could exist in solid form in the warm inner Solar System close to the Sun (within the frost line). They would eventually form the rocky planets of Mercury, Venus, Earth, and Mars. Because metallic elements only comprised a very small fraction of the solar nebula, the terrestrial planets could not grow very large.[10] The giant planets (Jupiter, Saturn, Uranus, and Neptune) formed further out, beyond the frost line, the point between the orbits of Mars and Jupiter where material is cool enough for volatile icy compounds to remain solid. The ices that formed these planets were more plentiful than the metals and silicates that formed the terrestrial inner planets, allowing them to grow massive enough to capture large atmospheres of hydrogen and helium, the lightest and most abundant elements.[10] Leftover debris that never became planets congregated in regions such as the asteroid belt, Kuiper belt, and Oort cloud.[10] The Nice model is an explanation for the creation of these regions and how the outer planets could have formed in different positions and migrated to their current orbits through various gravitational interactions.[12][further explanation needed] Within 50 million years, the pressure and density of hydrogen in the center of the protostar became great enough for it to begin thermonuclear fusion.[13] As helium accumulates at its core the Sun is growing brighter;[14] early in its main-sequence life its brightness was 70% that of what it is today.[15] The temperature, reaction rate, pressure, and density increased until hydrostatic equilibrium was achieved: the thermal pressure counterbalancing the force of gravity. At this point, the Sun became a main-sequence star.[16] The main-sequence phase, from beginning to end, will last about 10 billion years for the Sun compared to around two billion years for all other subsequent phases of the Sun's pre-remnant life combined.[17] Solar wind from the Sun created the heliosphere and swept away the remaining gas and dust from the protoplanetary disc into interstellar space.[14] The Solar System will remain roughly as it is known today until the hydrogen in the core of the Sun has been entirely converted to helium, which will occur roughly 5 billion years from now. This will mark the end of the Sun's main-sequence life. At that time, the core of the Sun will contract with hydrogen fusion occurring along a shell surrounding the inert helium, and the energy output will be greater than at present. The outer layers of the Sun will expand to roughly 260 times its current diameter, and the Sun will become a red giant. Because of its increased surface area, the surface of the Sun will be cooler (2,600 K (2,330 °C; 4,220 °F) at its coolest) than it is on the main sequence.[17] Overview of the evolution of the Sun, a G-type main-sequence star. Around 11 billion years after being formed by the Solar System's protoplanetary disk, the Sun will expand to become a red giant; Mercury, Venus and possibly the Earth will be swallowed. The expanding Sun is expected to vaporize Mercury as well as Venus, and render Earth uninhabitable (possibly destroying it as well). Eventually, the core will be hot enough for helium fusion; the Sun will burn helium for a fraction of the time it burned hydrogen in the core. The Sun is not massive enough to commence the fusion of heavier elements, and nuclear reactions in the core will dwindle. Its outer layers will be ejected into space, leaving behind a dense white dwarf, half the original mass of the Sun but only the size of Earth.[18] The ejected outer layers will form what is known as a planetary nebula, returning some of the material that formed the Sun—but now enriched with heavier elements like carbon—to the interstellar medium.[19] Structure and composition Further information: List of Solar System objects and Planet § Planetary attributes The word solar means "pertaining to the Sun", which is derived from the Latin word sol, meaning Sun.[20] The Sun is the dominant gravitational member of the Solar System, and its planetary system is maintained in a relatively stable, slowly evolving state by following isolated, gravitationally bound orbits around the Sun.[21] Orbits Animations of the Solar System's inner planets and outer planets orbiting; the latter animation is 100 times faster than the former. Jupiter is three times as far from the Sun as Mars. The planets and other large objects in orbit around the Sun lie near the plane of Earth's orbit, known as the ecliptic. Smaller icy objects such as comets frequently orbit at significantly greater angles to this plane.[22][23] Most of the planets in the Solar System have secondary systems of their own, being orbited by natural satellites called moons. Many of the largest natural satellites are in synchronous rotation, with one face permanently turned toward their parent. The four giant planets have planetary rings, thin bands of tiny particles that orbit them in unison.[24] As a result of the formation of the Solar System, planets and most other objects orbit the Sun in the same direction that the Sun is rotating. That is, counter-clockwise, as viewed from above Earth's north pole.[25] There are exceptions, such as Halley's Comet.[26] Most of the larger moons orbit their planets in prograde direction, matching the planetary rotation; Neptune's moon Triton is the largest to orbit in the opposite, retrograde manner.[27] Most larger objects rotate around their own axes in the prograde direction relative to their orbit, though the rotation of Venus is retrograde.[28] To a good first approximation, Kepler's laws of planetary motion describe the orbits of objects around the Sun.[29]: 433–437  These laws stipulate that each object travels along an ellipse with the Sun at one focus, which causes the body's distance from the Sun to vary over the course of its year. A body's closest approach to the Sun is called its perihelion, whereas its most distant point from the Sun is called its aphelion.[30]: 9-6  With the exception of Mercury, the orbits of the planets are nearly circular, but many comets, asteroids, and Kuiper belt objects follow highly elliptical orbits. Kepler's laws only account for the influence of the Sun's gravity upon an orbiting body, not the gravitational pulls of different bodies upon each other. On a human time scale, these additional perturbations can be accounted for using numerical models,[30]: 9-6  but the planetary system can change chaotically over billions of years.[31] The angular momentum of the Solar System is a measure of the total amount of orbital and rotational momentum possessed by all its moving components.[32] Although the Sun dominates the system by mass, it accounts for only about 2% of the angular momentum.[33][34] The planets, dominated by Jupiter, account for most of the rest of the angular momentum due to the combination of their mass, orbit, and distance from the Sun, with a possibly significant contribution from comets.[33] Composition The overall structure of the charted regions of the Solar System consists of the Sun, four smaller inner planets surrounded by a belt of mostly rocky asteroids, and four giant planets surrounded by the Kuiper belt of mostly icy objects. Astronomers sometimes informally divide this structure into separate regions. The inner Solar System includes the four terrestrial planets and the asteroid belt. The outer Solar System is beyond the asteroids, including the four giant planets.[35] Since the discovery of the Kuiper belt, the outermost parts of the Solar System are considered a distinct region consisting of the objects beyond Neptune.[36] The principal component of the Solar System is the Sun, a low-mass star that contains 99.86% of the system's known mass and dominates it gravitationally.[37] The Sun's four largest orbiting bodies, the giant planets, account for 99% of the remaining mass, with Jupiter and Saturn together comprising more than 90%. The remaining objects of the Solar System (including the four terrestrial planets, the dwarf planets, moons, asteroids, and comets) together comprise less than 0.002% of the Solar System's total mass.[f] The Sun is composed of roughly 98% hydrogen and helium,[41] as are Jupiter and Saturn.[42][43] A composition gradient exists in the Solar System, created by heat and light pressure from the early Sun; those objects closer to the Sun, which are more affected by heat and light pressure, are composed of elements with high melting points. Objects farther from the Sun are composed largely of materials with lower melting points.[44] The boundary in the Solar System beyond which those volatile substances could coalesce is known as the frost line, and it lies at roughly five times the Earth's distance from the Sun.[3] The objects of the inner Solar System are composed mostly of rocky materials,[45] such as silicates, iron or nickel.[46] Jupiter and Saturn are composed mainly of gases with extremely low melting points and high vapor pressure, such as hydrogen, helium, and neon.[46] Ices, like water, methane, ammonia, hydrogen sulfide, and carbon dioxide,[45] have a melting points of up to a few hundred kelvins.[46] They can be found as ices, liquids, or gases in various places in the Solar System.[46] Icy substances comprise the majority of the satellites of the giant planets, as well as most of Uranus and Neptune (the so-called "ice giants") and the numerous small objects that lie beyond Neptune's orbit.[45][47] Together, gases and ices are referred to as volatiles.[48] Distances and scales The Sun's, planets', dwarf planets' and moons' size to scale, labelled. Distance of objects is not to scale. The asteroid belt lies between the orbits of Mars and Jupiter, the Kuiper belt lies beyond Neptune's orbit. To-scale diagram of distance between planets, with the white bar showing orbital variations. The size of the planets is not to scale. The astronomical unit [AU] (150,000,000 km; 93,000,000 mi) would be the distance from the Earth to the Sun if the planet's orbit were perfectly circular.[49] For comparison, the radius of the Sun is 0.0047 AU (700,000 km; 400,000 mi).[50] Thus, the Sun occupies 0.00001% (10−5 %) of the volume of a sphere with a radius the size of Earth's orbit, whereas Earth's volume is roughly one millionth (10−6) that of the Sun. Jupiter, the largest planet, is 5.2 astronomical units (780,000,000 km; 480,000,000 mi) from the Sun and has a radius of 71,000 km (0.00047 AU; 44,000 mi), whereas the most distant planet, Neptune, is 30 AU (4.5×109 km; 2.8×109 mi) from the Sun.[43][51] With a few exceptions, the farther a planet or belt is from the Sun, the larger the distance between its orbit and the orbit of the next nearest object to the Sun. For example, Venus is approximately 0.33 AU farther out from the Sun than Mercury, whereas Saturn is 4.3 AU out from Jupiter, and Neptune lies 10.5 AU out from Uranus. Attempts have been made to determine a relationship between these orbital distances, like the Titius–Bode law[52] and Johannes Kepler's model based on the Platonic solids,[53] but ongoing discoveries have invalidated these hypotheses.[54] Some Solar System models attempt to convey the relative scales involved in the Solar System in human terms. Some are small in scale (and may be mechanical—called orreries)—whereas others extend across cities or regional areas.[55] The largest such scale model, the Sweden Solar System, uses the 110-metre (361 ft) Avicii Arena in Stockholm as its substitute Sun, and, following the scale, Jupiter is a 7.5-metre (25-foot) sphere at Stockholm Arlanda Airport, 40 km (25 mi) away, whereas the farthest current object, Sedna, is a 10 cm (4 in) sphere in Luleå, 912 km (567 mi) away.[56][57] If the Sun–Neptune distance is scaled to 100 metres (330 ft), then the Sun would be about 3 cm (1.2 in) in diameter (roughly two-thirds the diameter of a golf ball), the giant planets would be all smaller than about 3 mm (0.12 in), and Earth's diameter along with that of the other terrestrial planets would be smaller than a flea (0.3 mm or 0.012 in) at this scale.[58] Interplanetary environment The zodiacal light, caused by interplanetary dust The outermost layer of the Solar atmosphere is the heliosphere, which permeates much of the Solar planetary system. Along with light, the Sun radiates a continuous stream of charged particles (a plasma) called the solar wind. This stream of particles spreads outwards at speeds from 900,000 kilometres per hour (560,000 mph) to 2,880,000 kilometres per hour (1,790,000 mph),[59] filling the vacuum between the bodies of the Solar System. The result is a thin, dusty atmosphere, called the interplanetary medium, which extends to at least 100 AU (15 billion km; 9.3 billion mi). Beyond the heliosphere, large objects remain gravitationally bound to the sun, but the flow of matter in the interstellar medium homogenizes the distribution of micro-scale objects (see § Farthest regions).[60] The interplanetary medium is home to at least two disc-like regions of cosmic dust. The first, the zodiacal dust cloud, lies in the inner Solar System and causes the zodiacal light. It may have been formed by collisions within the asteroid belt brought on by gravitational interactions with the planets; a more recent proposed origin is the planet Mars.[61] The second dust cloud extends from about 10 AU (1.5 billion km; 930 million mi) to about 40 AU (6.0 billion km; 3.7 billion mi), and was probably created by collisions within the Kuiper belt.[62][63] Activity on the Sun's surface, such as solar flares and coronal mass ejections, disturbs the heliosphere, creating space weather and causing geomagnetic storms.[64] Coronal mass ejections and similar events blow a magnetic field and huge quantities of material from the surface of the Sun. The interaction of this magnetic field and material with Earth's magnetic field funnels charged particles into Earth's upper atmosphere, where its interactions create aurorae seen near the magnetic poles.[65] The largest stable structure within the heliosphere is the heliospheric current sheet, a spiral form created by the actions of the Sun's rotating magnetic field on the interplanetary medium.[66][67] Life habitability Main article: Planetary habitability in the Solar System Besides solar energy, the primary characteristic of the Solar System enabling the presence of life is the heliosphere and planetary magnetic fields (for those planets that have them). These magnetic fields partially shield the Solar System from high-energy interstellar particles called cosmic rays. The density of cosmic rays in the interstellar medium and the strength of the Sun's magnetic field change on very long timescales, so the level of cosmic-ray penetration in the Solar System varies, though by how much is unknown.[68] Earth's magnetic field also stops its atmosphere from being stripped away by the solar wind.[69] Venus and Mars do not have magnetic fields, and as a result the solar wind causes their atmospheres to gradually bleed away into space.[70] The zone of habitability of the Solar System is conventionally located in the inner Solar System, where planetary surface or atmospheric temperatures admit the possibility of liquid water.[71] Habitability might also be possible in subsurface oceans of various outer Solar System moons.[72] Sun Main article: Sun The Sun in true white color The Sun is the Solar System's star and by far its most massive component. Its large mass (332,900 Earth masses),[73] which comprises 99.86% of all the mass in the Solar System,[74] produces temperatures and densities in its core high enough to sustain nuclear fusion of hydrogen into helium.[75] This releases an enormous amount of energy, mostly radiated into space as electromagnetic radiation peaking in visible light.[76][77] Because the Sun fuses hydrogen into helium at its core, it is a main-sequence star. More specifically, it is a G2-type main-sequence star, where the type designation refers to its effective temperature. Hotter main-sequence stars are more luminous but shorter lived. The Sun's temperature is intermediate between that of the hottest stars and that of the coolest stars. Stars brighter and hotter than the Sun are rare, whereas substantially dimmer and cooler stars, known as red dwarfs, make up about 75% of the stars in the Milky Way.[78][79] The Sun is a population I star; it has a higher abundance of elements heavier than hydrogen and helium ("metals" in astronomical parlance) than the older population II stars.[80] Elements heavier than hydrogen and helium were formed in the cores of ancient and exploding stars, so the first generation of stars had to die before the universe could be enriched with these atoms. The oldest stars contain few metals, whereas stars born later have more. This higher metallicity is thought to have been crucial to the Sun's development of a planetary system because the planets form from the accretion of "metals".[81] Inner Solar System Overview of the Inner Solar System up to the Jovian System The inner Solar System is the region comprising the terrestrial planets and the asteroid belt.[82] Composed mainly of silicates and metals,[83] the objects of the inner Solar System are relatively close to the Sun; the radius of this entire region is less than the distance between the orbits of Jupiter and Saturn. This region is also within the frost line, which is a little less than 5 AU (750 million km; 460 million mi) from the Sun.[22] Inner planets Main article: Terrestrial planet The four terrestrial planets Mercury, Venus, Earth and Mars The four terrestrial or inner planets have dense, rocky compositions, few or no moons, and no ring systems. They are in hydrostatic equilibrium, forming a rounded shape, and have undergone planetary differentiation, causing chemical elements to accumulate at different radii. They are composed largely of refractory minerals such as silicates—which form their crusts and mantles—and metals such as iron and nickel which form their cores. Three of the four inner planets (Venus, Earth and Mars) have atmospheres substantial enough to generate weather; all have impact craters and tectonic surface features, such as rift valleys and volcanoes. The term inner planet should not be confused with inferior planet, which designates those planets that are closer to the Sun than Earth (i.e. Mercury and Venus).[84] Mercury Main article: Mercury (planet) Mercury (0.307–0.588 AU (45.9–88.0 million km; 28.5–54.7 million mi) from the Sun[85]) is the closest planet to the Sun. The smallest planet in the Solar System (0.055 MEarth), Mercury has no natural satellites. The dominant geological features are impact craters or basins with ejecta blankets, the remains of early volcanic activity including magma flows, and lobed ridges or rupes that were probably produced by a period of contraction early in the planet's history.[86] Mercury's very tenuous atmosphere consists of solar-wind particles trapped by Mercury's magnetic field, as well as atoms blasted off its surface by the solar wind.[87][88] Its relatively large iron core and thin mantle have not yet been adequately explained. Hypotheses include that its outer layers were stripped off by a giant impact, or that it was prevented from fully accreting by the young Sun's energy.[89][90] There have been searches for "Vulcanoids", asteroids in stable orbits between Mercury and the Sun, but none have been discovered.[91][92] Venus Main article: Venus Venus (0.718–0.728 AU (107.4–108.9 million km; 66.7–67.7 million mi) from the Sun[85]) is close in size to Earth (0.815 MEarth) and, like Earth, has a thick silicate mantle around an iron core, a substantial atmosphere, and evidence of internal geological activity. It is much drier than Earth, and its atmosphere is ninety times as dense. Venus has no natural satellites. It is the hottest planet, with surface temperatures over 400 °C (752 °F), mainly due to the amount of greenhouse gases in the atmosphere.[93] The planet has no magnetic field that would prevent the depletion of its substantial atmosphere, which suggests that its atmosphere is being replenished by volcanic eruptions.[94] A relatively young planetary surface displays extensive evidence of volcanic activity, but is devoid of plate tectonics. It may undergo resurfacing episodes on a time scale of 700 million years.[95] Earth Main article: Earth Earth (0.983–1.017 AU (147.1–152.1 million km; 91.4–94.5 million mi) from the Sun) is the largest and densest of the inner planets, the only one known to have current geological activity, and the only place in the universe where life is known to exist.[96] Its liquid hydrosphere is unique among the terrestrial planets, and it is the only planet where plate tectonics has been observed.[97] Earth's atmosphere is radically different from those of the other planets, having been altered by the presence of life to contain 21% free oxygen.[98][99] The planetary magnetosphere shields the surface from solar and cosmic radiation, limiting atmospheric stripping and maintaining habitability.[100] It has one natural satellite, the Moon, the only large satellite of a terrestrial planet in the Solar System. Mars Main article: Mars Mars (1.382–1.666 AU (206.7–249.2 million km; 128.5–154.9 million mi) from the Sun) is smaller than Earth and Venus (0.107 MEarth). It has an atmosphere of mostly carbon dioxide with a surface pressure of 6.1 millibars (0.088 psi; 0.18 inHg); roughly 0.6% of that of Earth but sufficient to support weather phenomena.[101] Its surface, peppered with volcanoes, such as Olympus Mons, and rift valleys, such as Valles Marineris, shows geological activity that may have persisted until as recently as 2 million years ago.[102] Its red color comes from iron oxide (rust) in its soil,[103] while the polar regions show white ice caps consisting largely of water.[104] Mars has two tiny natural satellites (Deimos and Phobos) thought to be either captured asteroids,[105] or ejected debris from a massive impact early in Mars's history.[106] Asteroid belt Main articles: Asteroid belt and Asteroid Linear map of the inner Solar System, showing many asteroid populations Asteroids except for the largest, Ceres, are classified as small Solar System bodies[g] and are composed mainly of carbonaceous, refractory rocky and metallic minerals, with some ice.[112][113] They range from a few metres to hundreds of kilometres in size. Asteroids smaller than one meter are usually called meteoroids and micrometeoroids (grain-sized), with the exact division between the two categories being debated over the years.[114] As of 2017, the IAU designates asteroids having a diameter between about 30 micrometres and 1 metre as micrometeoroids, and terms smaller particles "dust".[115] The asteroid belt occupies the orbit between Mars and Jupiter, between 2.3 and 3.3 AU (340 and 490 million km; 210 and 310 million mi) from the Sun. It is thought to be remnants from the Solar System's formation that failed to coalesce because of the gravitational interference of Jupiter.[116] The asteroid belt contains tens of thousands, possibly millions, of objects over one kilometre in diameter.[117] Despite this, the total mass of the asteroid belt is unlikely to be more than a thousandth of that of Earth.[40] The asteroid belt is very sparsely populated; spacecraft routinely pass through without incident.[118] Ceres Main article: Ceres (dwarf planet) Ceres (2.77 AU (414 million km; 257 million mi) from the Sun) is the largest asteroid, a protoplanet, and a dwarf planet.[g] It has a diameter of slightly under 1,000 km (620 mi) and a mass large enough for its own gravity to pull it into a spherical shape. Ceres was considered a planet when it was discovered in 1801, but as further observations revealed additional asteroids, it became common to consider it as one of the minor rather than major planets.[119] It was then reclassified again as a dwarf planet in 2006 when the IAU definition of planet was established.[120]: 218 Pallas and Vesta Main articles: 2 Pallas and 4 Vesta Pallas (2.77 AU from the Sun) and Vesta (2.36 AU from the Sun) are the largest asteroids in the asteroid belt, after Ceres. They are the other two protoplanets that survive more or less intact. At about 520 km (320 mi) in diameter, they were large enough to have developed planetary geology in the past, but both have suffered large impacts and been battered out of being round.[121][122][123] Fragments from impacts upon these two bodies survive elsewhere in the asteroid belt, as the Pallas family and Vesta family. Both were considered planets upon their discoveries in 1802 and 1807 respectively, and like Ceres, eventually considered minor planets with the discovery of more asteroids. Some authors today have begun to consider Pallas and Vesta as planets again, along with Ceres, under geophysical definitions of the term.[108] Asteroid groups Asteroids in the asteroid belt are divided into asteroid groups and families based on their orbital characteristics. Kirkwood gaps are sharp dips in the distribution of asteroid orbits that correspond to orbital resonances with Jupiter.[124] Asteroid moons are asteroids that orbit larger asteroids. They are not as clearly distinguished as planetary moons, sometimes being almost as large as their partners (e.g. that of 90 Antiope). The asteroid belt includes main-belt comets, which may have been the source of Earth's water.[125] Jupiter trojans are located in either of Jupiter's L4 or L5 points (gravitationally stable regions leading and trailing a planet in its orbit); the term trojan is also used for small bodies in any other planetary or satellite Lagrange point. Hilda asteroids are in a 2:3 resonance with Jupiter; that is, they go around the Sun three times for every two Jupiter orbits.[126] The inner Solar System contains near-Earth asteroids, many of which cross the orbits of the inner planets.[127] Some of them are potentially hazardous objects.[128] Outer Solar System Plot of objects around the Kuiper belt and other asteroid populations, the J, S, U and N denotes Jupiter, Saturn, Uranus and Neptune The outer region of the Solar System is home to the giant planets and their large moons. The centaurs and many short-period comets also orbit in this region. Due to their greater distance from the Sun, the solid objects in the outer Solar System contain a higher proportion of volatiles, such as water, ammonia, and methane than those of the inner Solar System because the lower temperatures allow these compounds to remain solid, without significant rates of sublimation.[10] Outer planets Main article: Giant planet The outer planets Jupiter, Saturn, Uranus and Neptune, compared to the inner planets Earth, Venus, Mars, and Mercury at the bottom right The four outer planets, also called giant planets or Jovian planets, collectively make up 99% of the mass known to orbit the Sun.[f] Jupiter and Saturn are together more than 400 times the mass of Earth and consist overwhelmingly of the gases hydrogen and helium, hence their designation as gas giants.[129] Uranus and Neptune are far less massive—less than 20 Earth masses (MEarth) each—and are composed primarily of ice. For these reasons, some astronomers suggest they belong in their own category, ice giants.[130] All four giant planets have rings, although only Saturn's ring system is easily observed from Earth. The term superior planet designates planets outside Earth's orbit and thus includes both the outer planets and Mars.[84] The ring–moon systems of Jupiter, Saturn, and Uranus are like miniature versions of the Solar System; that of Neptune is significantly different, having been disrupted by the capture of its largest moon Triton.[131] Jupiter Main article: Jupiter Jupiter (4.951–5.457 AU (740.7–816.4 million km; 460.2–507.3 million mi) from the Sun[85]), at 318 MEarth, is 2.5 times the mass of all the other planets put together. It is composed largely of hydrogen and helium. Jupiter's strong internal heat creates semi-permanent features in its atmosphere, such as cloud bands and the Great Red Spot. The planet possesses a 4.2–14 Gauss strength magnetosphere that spans 22–29 million km, making it, in certain respects, the largest object in the Solar System.[132] Jupiter has 95 known satellites. The four largest, Ganymede, Callisto, Io, and Europa, are called the Galilean moons: they show similarities to the terrestrial planets, such as volcanism and internal heating.[133] Ganymede, the largest satellite in the Solar System, is larger than Mercury; Callisto is almost as large.[134] Saturn Main article: Saturn Saturn (9.075–10.07 AU (1.3576–1.5065 billion km; 843.6–936.1 million mi) from the Sun[85]), distinguished by its extensive ring system, has several similarities to Jupiter, such as its atmospheric composition and magnetosphere. Although Saturn has 60% of Jupiter's volume, it is less than a third as massive, at 95 MEarth. Saturn is the only planet of the Solar System that is less dense than water. The rings of Saturn are made up of small ice and rock particles.[135] Saturn has 145 confirmed satellites composed largely of ice. Two of these, Titan and Enceladus, show signs of geological activity;[136] they, as well as five other Saturnian moons (Iapetus, Rhea, Dione, Tethys, and Mimas), are large enough to be round. Titan, the second-largest moon in the Solar System, is bigger than Mercury and the only satellite in the Solar System to have a substantial atmosphere.[137][138] Uranus Main article: Uranus Uranus (18.27–20.06 AU (2.733–3.001 billion km; 1.698–1.865 billion mi) from the Sun[85]), at 14 MEarth, has the lowest mass of the outer planets. Uniquely among the planets, it orbits the Sun on its side; its axial tilt is over ninety degrees to the ecliptic. This gives the planet extreme seasonal variation as each pole points toward and then away from the Sun.[139] It has a much colder core than the other giant planets and radiates very little heat into space.[140] As a consequence, it has the coldest planetary atmosphere in the Solar System.[141] Uranus has 27 known satellites, the largest ones being Titania, Oberon, Umbriel, Ariel, and Miranda.[142] Like the other giant planets, it possesses a ring system and magnetosphere.[143] Neptune Main article: Neptune Neptune (29.89–30.47 AU (4.471–4.558 billion km; 2.778–2.832 billion mi) from the Sun[85]), though slightly smaller than Uranus, is more massive (17 MEarth) and hence more dense. It radiates more internal heat than Uranus, but not as much as Jupiter or Saturn.[144] Neptune has 14 known satellites. The largest, Triton, is geologically active, with geysers of liquid nitrogen.[145] Triton is the only large satellite with a retrograde orbit, which indicates that it did not form with Neptune, but was probably captured from the Kuiper belt.[146] Neptune is accompanied in its orbit by several minor planets, termed Neptune trojans, that either lead or trail the planet by about one-sixth of the way around the Sun, positions known as Lagrange points.[147] Centaurs Main article: Centaur (small Solar System body) The centaurs are icy comet-like bodies whose orbits have semi-major axes greater than Jupiter's (5.5 AU (820 million km; 510 million mi)) and less than Neptune's (30 AU (4.5 billion km; 2.8 billion mi)). These are former Kuiper belt and scattered disc objects that were gravitationally perturbed closer to the Sun by the outer planets, and are expected to become comets or get ejected out of the Solar System.[39] While most centaurs are inactive and asteroid-like, some exhibit clear cometary activity, such as the first centaur discovered, 2060 Chiron, which has been classified as a comet (95P) because it develops a coma just as comets do when they approach the Sun.[148] The largest known centaur, 10199 Chariklo, has a diameter of about 250 km (160 mi) and is one of the only few minor planets known to possess a ring system.[149][150] Comets Main article: Comet Comet Hale–Bopp seen in 1997 Comets are small Solar System bodies,[g] typically only a few kilometres across, composed largely of volatile ices. They have highly eccentric orbits, generally a perihelion within the orbits of the inner planets and an aphelion far beyond Pluto. When a comet enters the inner Solar System, its proximity to the Sun causes its icy surface to sublimate and ionise, creating a coma: a long tail of gas and dust often visible to the naked eye.[151] Short-period comets have orbits lasting less than two hundred years. Long-period comets have orbits lasting thousands of years. Short-period comets are thought to originate in the Kuiper belt, whereas long-period comets, such as Hale–Bopp, are thought to originate in the Oort cloud. Many comet groups, such as the Kreutz sungrazers, formed from the breakup of a single parent.[152] Some comets with hyperbolic orbits may originate outside the Solar System, but determining their precise orbits is difficult.[153] Old comets whose volatiles have mostly been driven out by solar warming are often categorised as asteroids.[154] Trans-Neptunian region Distribution and size of trans-Neptunian objects. The horizontal axis stand for the semi-major axis of the body, the vertical axis stands for the inclination of the orbit, and the size of the circle stands for the relative size of the object. Size comparison of some large TNOs with Earth: Pluto and its moons, Eris, Makemake, Haumea, Sedna, Gonggong, Quaoar, Orcus, Salacia, and 2002 MS4. Beyond the orbit of Neptune lies the area of the "trans-Neptunian region", with the doughnut-shaped Kuiper belt, home of Pluto and several other dwarf planets, and an overlapping disc of scattered objects, which is tilted toward the plane of the Solar System and reaches much further out than the Kuiper belt. The entire region is still largely unexplored. It appears to consist overwhelmingly of many thousands of small worlds—the largest having a diameter only a fifth that of Earth and a mass far smaller than that of the Moon—composed mainly of rock and ice. This region is sometimes described as the "third zone of the Solar System", enclosing the inner and the outer Solar System.[155] Kuiper belt Main article: Kuiper belt The Kuiper belt is a great ring of debris similar to the asteroid belt, but consisting mainly of objects composed primarily of ice.[156] It extends between 30 and 50 AU (4.5 and 7.5 billion km; 2.8 and 4.6 billion mi) from the Sun. It is composed mainly of small Solar System bodies, although the largest few are probably large enough to be dwarf planets.[157] There are estimated to be over 100,000 Kuiper belt objects with a diameter greater than 50 km (30 mi), but the total mass of the Kuiper belt is thought to be only a tenth or even a hundredth the mass of Earth.[39] Many Kuiper belt objects have satellites,[158] and most have orbits that are substantially inclined (~10°) to the plane of the ecliptic.[159] The Kuiper belt can be roughly divided into the "classical" belt and the resonant trans-Neptunian objects.[156] The latter have orbits whose periods are in a simple ratio to that of Neptune: for example, going around the Sun twice for every three times that Neptune does, or once for every two. The classical belt consists of objects having no resonance with Neptune, and extends from roughly 39.4 to 47.7 AU (5.89 to 7.14 billion km; 3.66 to 4.43 billion mi).[160] Members of the classical Kuiper belt are sometimes called "cubewanos", after the first of their kind to be discovered, originally designated 1992 QB1; they are still in near primordial, low-eccentricity orbits.[161] Pluto and Charon Main articles: Pluto and Charon (moon) The dwarf planet Pluto (with an average orbit of 39 AU (5.8 billion km; 3.6 billion mi) from the Sun) is the largest known object in the Kuiper belt. When discovered in 1930, it was considered to be the ninth planet; this changed in 2006 with the adoption of a formal definition of planet. Pluto has a relatively eccentric orbit inclined 17 degrees to the ecliptic plane and ranging from 29.7 AU (4.44 billion km; 2.76 billion mi) from the Sun at perihelion (within the orbit of Neptune) to 49.5 AU (7.41 billion km; 4.60 billion mi) at aphelion. Pluto has a 2:3 resonance with Neptune, meaning that Pluto orbits twice round the Sun for every three Neptunian orbits. Kuiper belt objects whose orbits share this resonance are called plutinos.[162] Charon, the largest of Pluto's moons, is sometimes described as part of a binary system with Pluto, as the two bodies orbit a barycenter of gravity above their surfaces (i.e. they appear to "orbit each other"). Beyond Charon, four much smaller moons, Styx, Nix, Kerberos, and Hydra, orbit Pluto.[163] Others Besides Pluto, astronomers generally agree that at least four other Kuiper belt objects are dwarf planets,[157] though there is some doubt for Orcus,[164] and additional bodies have also been proposed:[165] Makemake (45.79 AU average from the Sun), although smaller than Pluto, is the largest known object in the classical Kuiper belt (that is, a Kuiper belt object not in a confirmed resonance with Neptune). Makemake is the brightest object in the Kuiper belt after Pluto. Discovered in 2005, it was officially named in 2009.[166] Its orbit is far more inclined than Pluto's, at 29°.[167] It has one known moon.[168] Haumea (43.13 AU average from the Sun) is in an orbit similar to Makemake, except that it is in a temporary 7:12 orbital resonance with Neptune.[169] Like Makemake, it was discovered in 2005.[170] Uniquely among the dwarf planets, Haumea possess a ring system, two known moons named Hiʻiaka and Namaka, and rotates so quickly (once every 3.9 hours) that it is stretched into an ellipsoid. It is part of a collisional family of Kuiper belt objects that share similar orbits, which suggests a giant collision took place on Haumea and ejected its fragments into space billions of years ago.[171] Quaoar (43.69 AU average from the Sun) is the second-largest known object in the classical Kuiper belt, after Makemake. Its orbit is significantly less eccentric and inclined than those of Makemake or Haumea.[169] It possesses a ring system and one known moon, Weywot.[172] Orcus (39.40 AU average from the Sun) is in the same 2:3 orbital resonance with Neptune as Pluto, and is the largest such object after Pluto itself.[169] Its eccentricity and inclination are similar to Pluto's, but its perihelion lies about 120° from that of Pluto. Thus, the phase of Orcus's orbit is opposite to Pluto's: Orcus is at aphelion (most recently in 2019) around when Pluto is at perihelion (most recently in 1989) and vice versa.[173] For this reason, it has been called the anti-Pluto.[174][175] It has one known moon, Vanth.[176] Scattered disc Main article: Scattered disc The orbital eccentricities and inclinations of the scattered disc population compared to the classical and resonant Kuiper belt objects The scattered disc, which overlaps the Kuiper belt but extends out to near 500 AU, is thought to be the source of short-period comets. Scattered-disc objects are believed to have been perturbed into erratic orbits by the gravitational influence of Neptune's early outward migration. Most scattered disc objects (SDOs) have perihelia within the Kuiper belt but aphelia far beyond it (some more than 150 AU from the Sun). SDOs' orbits can also be inclined up to 46.8° from the ecliptic plane.[177] Some astronomers consider the scattered disc to be merely another region of the Kuiper belt and describe scattered-disc objects as "scattered Kuiper belt objects".[178] Some astronomers also classify centaurs as inward-scattered Kuiper belt objects along with the outward-scattered residents of the scattered disc.[179] Eris and Gonggong Eris (67.78 AU average from the Sun) is the largest known scattered disc object, and caused a debate about what constitutes a planet, because it is 25% more massive than Pluto[180] and about the same diameter. It is the most massive of the known dwarf planets. It has one known moon, Dysnomia. Like Pluto, its orbit is highly eccentric, with a perihelion of 38.2 AU (roughly Pluto's distance from the Sun) and an aphelion of 97.6 AU, and steeply inclined to the ecliptic plane at an angle of 44°.[181] Gonggong (67.38 AU average from the Sun) is another dwarf planet in a comparable orbit to Eris, except that it is in a 3:10 resonance with Neptune.[182] It has one known moon, Xiangliu.[183] Farthest regions The point at which the Solar System ends and interstellar space begins is not precisely defined because its outer boundaries are shaped by two forces: the solar wind and the Sun's gravity. The limit of the solar wind's influence is roughly four times Pluto's distance from the Sun; this heliopause, the outer boundary of the heliosphere, is considered the beginning of the interstellar medium.[60] The Sun's Hill sphere, the effective range of its gravitational dominance, is thought to extend up to a thousand times farther and encompasses the hypothetical Oort cloud.[184] Edge of the heliosphere Main article: Heliosheath Artistic depiction of the Solar System's heliosphere The Sun's stellar-wind bubble, the heliosphere, a region of space dominated by the Sun, has its boundary at the termination shock, which is roughly 80–100 AU from the Sun upwind of the interstellar medium and roughly 200 AU from the Sun downwind.[185] Here the solar wind collides with the interstellar medium[186] and dramatically slows, condenses and becomes more turbulent,[185] forming a great oval structure known as the heliosheath. This structure has been theorized to look and behave very much like a comet's tail, extending outward for a further 40 AU on the upwind side but tailing many times that distance downwind.[187] Evidence from the Cassini and Interstellar Boundary Explorer spacecraft has suggested that it is forced into a bubble shape by the constraining action of the interstellar magnetic field,[188][189] but the actual shape remains unknown.[190] The outer boundary of the heliosphere, the heliopause, is the point at which the solar wind finally terminates and is the beginning of interstellar space.[60] Voyager 1 and Voyager 2 passed the termination shock and entered the heliosheath at 94 and 84 AU from the Sun, respectively.[191][192] Voyager 1 was reported to have crossed the heliopause in August 2012, and Voyager 2 in December 2018.[193][194] The shape and form of the outer edge of the heliosphere is likely affected by the fluid dynamics of interactions with the interstellar medium as well as solar magnetic fields prevailing to the south, e.g. it is bluntly shaped with the northern hemisphere extending 9 AU farther than the southern hemisphere.[185] Beyond the heliopause, at around 230 AU, lies the bow shock: a plasma "wake" left by the Sun as it travels through the Milky Way.[195] Detached objects The detached object Sedna and its orbit within the Solar System Main articles: Detached object and Sednoid Sedna (with an average orbit of 520 AU from the Sun) is a large, reddish object with a gigantic, highly elliptical orbit that takes it from about 76 AU at perihelion to 940 AU at aphelion and takes 11,400 years to complete. Mike Brown, who discovered the object in 2003, asserts that it cannot be part of the scattered disc or the Kuiper belt because its perihelion is too distant to have been affected by Neptune's migration. He and other astronomers consider it to be the first in an entirely new population, sometimes termed "distant detached objects" (DDOs), which also may include the object 2000 CR105, which has a perihelion of 45 AU, an aphelion of 415 AU, and an orbital period of 3,420 years.[196] Brown terms this population the "inner Oort cloud" because it may have formed through a similar process, although it is far closer to the Sun.[197] Sedna is very likely a dwarf planet, though its shape has yet to be determined. The second unequivocally detached object, with a perihelion farther than Sedna's at roughly 81 AU, is 2012 VP113, discovered in 2012. Its aphelion is only about half that of Sedna's, at 458 AU.[198][199] Oort cloud Main article: Oort cloud The Oort cloud is a hypothetical spherical cloud of up to a trillion icy objects that is thought to be the source for all long-period comets and to surround the Solar System at roughly 50,000 AU (around 1 light-year (ly)) from the Sun, and possibly to as far as 100,000 AU (1.87 ly). It is thought to be composed of comets that were ejected from the inner Solar System by gravitational interactions with the outer planets. Oort cloud objects move very slowly, and can be perturbed by infrequent events, such as collisions, the gravitational effects of a passing star, or the galactic tide, the tidal force exerted by the Milky Way.[200][201] Boundaries See also: Planets beyond Neptune, Planet Nine, and List of Solar System objects by greatest aphelion Much of the Solar System is still unknown. The Sun's gravitational field is estimated to dominate the gravitational forces of surrounding stars out to about two light-years (125,000 AU). Lower estimates for the radius of the Oort cloud, by contrast, do not place it farther than 50,000 AU.[202] Most of the mass is orbiting in the region between 3,000 and 100,000 AU.[203] Despite discoveries such as Sedna, the region between the Kuiper belt and the Oort cloud, an area tens of thousands of AU in radius, is still virtually unmapped. Learning about this region of space is difficult, because it depends upon inferences from those few objects whose orbits happen to be perturbed such that they fall closer to the Sun, and even then, detecting these objects has often been possible only when they happened to become bright enough to register as comets.[204] Objects may yet be discovered in the Solar System's uncharted regions.[205] The furthest known objects, such as Comet West, have aphelia around 70,000 AU from the Sun.[206] Comparison with other star systems 1e, 1f and 1g is in the habitable zone Habitable zones of TRAPPIST-1 and the Solar System; here, the TRAPPIST-1 system is enlarged 25 times. The displayed planetary surfaces on TRAPPIST-1 are speculative. Compared to many extrasolar systems, the Solar System stands out in lacking planets interior to the orbit of Mercury.[207][208] The known Solar System also lacks super-Earths, planets between one and ten times as massive as the Earth,[207] although the hypothetical Planet Nine, if it does exist, could be a super-Earth orbiting in the outer Solar System.[209] Uncommonly, it has only small rocky planets and large gas giants; elsewhere planets of intermediate size are typical—both rocky and gas—so there is no "gap" as seen between the size of Earth and of Neptune (with a radius 3.8 times as large). As many of these super-Earths are closer to their respective stars than Mercury is to the Sun, a hypothesis has arisen that all planetary systems start with many close-in planets, and that typically a sequence of their collisions causes consolidation of mass into few larger planets, but in case of the Solar System the collisions caused their destruction and ejection.[207][210] The orbits of Solar System planets are nearly circular. Compared to other systems, they have smaller orbital eccentricity.[207] Although there are attempts to explain it partly with a bias in the radial-velocity detection method and partly with long interactions of a quite high number of planets, the exact causes remain undetermined.[207][211] Location Celestial neighborhood Diagram of the Local Interstellar Cloud, the G-Cloud and surrounding stars. As of 2022, the precise location of the Solar System in the clouds is an open question in astronomy.[212] The Solar System is surrounded by the Local Interstellar Cloud, although it is not clear if it is embedded in the Local Interstellar Cloud or if it lies just outside the cloud's edge.[213][214] Multiple other interstellar clouds also exist in the region within 300 light-years of the Sun, known as the Local Bubble.[214] The latter feature is an hourglass-shaped cavity or superbubble in the interstellar medium roughly 300 light-years across. The bubble is suffused with high-temperature plasma, suggesting that it may be the product of several recent supernovae.[215] The Local Bubble is a small superbubble compared to the neighboring wider Radcliffe Wave and Split linear structures (formerly Gould Belt), each of which are some thousands of light-years in length.[216] All these structures are part of the Orion Arm, which contains most of the stars in the Milky Way that are visible to the unaided eye. The density of all matter in the local neighborhood is 0.097±0.013 M☉·pc−3.[217] Within ten light-years of the Sun there are relatively few stars, the closest being the triple star system Alpha Centauri, which is about 4.4 light-years away and may be in the Local Bubble's G-Cloud.[218] Alpha Centauri A and B are a closely tied pair of Sun-like stars, whereas the closest star to Earth, the small red dwarf Proxima Centauri, orbits the pair at a distance of 0.2 light-year. In 2016, a potentially habitable exoplanet was found to be orbiting Proxima Centauri, called Proxima Centauri b, the closest confirmed exoplanet to the Sun.[219] The next closest known fusors to the Sun are the red dwarfs Barnard's Star (at 5.9 ly), Wolf 359 (7.8 ly), and Lalande 21185 (8.3 ly).[220] The nearest brown dwarfs belong to the binary Luhman 16 system (6.6 ly), and the closest known rogue or free-floating planetary-mass object at less than 10 Jupiter masses is the sub-brown dwarf WISE 0855−0714 (7.4 ly).[221] Just beyond at 8.6 ly lies Sirius, the brightest star in Earth's night sky, with roughly twice the Sun's mass, orbited by the closest white dwarf to Earth, Sirius B. Other stars within ten light-years are the binary red-dwarf system Gliese 65 (8.7 ly) and the solitary red dwarf Ross 154 (9.7 ly).[222][223] The closest solitary Sun-like star to the Solar System is Tau Ceti at 11.9 light-years. It has roughly 80% of the Sun's mass but only about half of its luminosity.[224] The nearest and unaided-visible group of stars beyond the immediate celestial neighborhood is the Ursa Major moving group at roughly 80 light-years, which is within the Local Bubble, like the nearest as well as unaided-visible star cluster the Hyades, which lie at its edge. The closest star-forming regions are the Corona Australis Molecular Cloud, the Rho Ophiuchi cloud complex and the Taurus molecular cloud; the latter lies just beyond the Local Bubble and is part of the Radcliffe wave.[225] Galactic position and orbit See also: Location of Earth, Galactic year, and Orbit of the Sun Diagram of the Milky Way, with galactic features and the relative position of the Solar System labelled. The Solar System is located in the Milky Way, a barred spiral galaxy with a diameter of about 100,000 light-years containing more than 100 billion stars.[226] The Sun is part of one of the Milky Way's outer spiral arms, known as the Orion–Cygnus Arm or Local Spur.[227] The Sun orbits close to circular the Galactic Center (where the supermassive black hole Sagittarius A* resides) at a distance of 26,660 light-years,[228] orbiting at roughly the same speed as that of the spiral arms.[229][230] Therefore, the Sun passes through arms only rarely. Its speed around the center of the Milky Way is about 220 km/s, so that it completes one revolution every 240 million years.[226] This revolution is known as the Solar System's galactic year.[231] The solar apex, the direction of the Sun's path through interstellar space, is near the constellation Hercules in the direction of the current location of the bright star Vega.[232] The plane of the ecliptic lies at an angle of about 60° to the galactic plane.[h] Habitability of galactic position and orbit The Solar System's location in the Milky Way is a factor in the evolutionary history of life on Earth. Spiral arms are home to a far larger concentration of supernovae, gravitational instabilities, and radiation that could disrupt the Solar System, but since Earth stays in the Local Spur and therefore does not pass frequently through spiral arms, this has given Earth long periods of stability for life to evolve.[229] However, the changing position of the Solar System relative to other parts of the Milky Way could explain periodic extinction events on Earth, according to the Shiva hypothesis or related theories, but this remains controversial.[234][235] The Solar System lies well outside the star-crowded environs of the Galactic Center. Near the center, gravitational tugs from nearby stars could perturb bodies in the Oort cloud and send many comets into the inner Solar System, producing collisions with potentially catastrophic implications for life on Earth. The intense radiation of the Galactic Center could also interfere with the development of complex life.[229] Stellar flybys that pass within 0.8 light-years of the Sun occur roughly once every 100,000 years. The closest well-measured approach was Scholz's Star, which approached to 52+23 −14 kAU of the Sun some 70+15 −10 kya, likely passing through the outer Oort cloud.[236] Humanity's perspective Main article: Discovery and exploration of the Solar System The motion of 'lights' moving across the sky is the basis of the classical definition of planets: wandering stars. Humanity's knowledge of the Solar System has grown incrementally over the centuries. Up to the Late Middle Ages–Renaissance, astronomers from Europe to India believed Earth to be stationary at the center of the universe[237] and categorically different from the divine or ethereal objects that moved through the sky. Although the Greek philosopher Aristarchus of Samos had speculated on a heliocentric reordering of the cosmos, Nicolaus Copernicus was the first person known to have developed a mathematically predictive heliocentric system.[238][239] Heliocentrism did not triumph immediately over geocentrism, but the work of Copernicus had its champions, notably Johannes Kepler. Using a heliocentric model that improved upon Copernicus by allowing orbits to be elliptical, and the precise observational data of Tycho Brahe, Kepler produced the Rudolphine Tables, which enabled accurate computations of the positions of the then-known planets. Pierre Gassendi used them to predict a transit of Mercury in 1631, and Jeremiah Horrocks did the same for a transit of Venus in 1639. This provided a strong vindication of heliocentrism and Kepler's elliptical orbits.[240][241] In the 17th century, Galileo publicized the use of the telescope in astronomy; he and Simon Marius independently discovered that Jupiter had four satellites in orbit around it.[242] Christiaan Huygens followed on from these observations by discovering Saturn's moon Titan and the shape of the rings of Saturn.[243] In 1677, Edmond Halley observed a transit of Mercury across the Sun, leading him to realize that observations of the solar parallax of a planet (more ideally using the transit of Venus) could be used to trigonometrically determine the distances between Earth, Venus, and the Sun.[244] Halley's friend Isaac Newton, in his magisterial Principia Mathematica of 1687, demonstrated that celestial bodies are not quintessentially different from Earthly ones: the same laws of motion and of gravity apply on Earth and in the skies.[29]: 142 The term "Solar System" entered the English language by 1704, when John Locke used it to refer to the Sun, planets, and comets.[245] In 1705, Halley realized that repeated sightings of a comet were of the same object, returning regularly once every 75–76 years. This was the first evidence that anything other than the planets repeatedly orbited the Sun,[246] though Seneca had theorized this about comets in the 1st century.[247] Careful observations of the 1769 transit of Venus allowed astronomers to calculate the average Earth–Sun distance as 93,726,900 miles (150,838,800 km), only 0.8% greater than the modern value.[248] Uranus, having occasionally been observed since antiquity, was recognized to be a planet orbiting beyond Saturn by 1783.[249] In 1838, Friedrich Bessel successfully measured a stellar parallax, an apparent shift in the position of a star created by Earth's motion around the Sun, providing the first direct, experimental proof of heliocentrism.[250] Neptune was identified as a planet some years later, in 1846, thanks to its gravitational pull causing a slight but detectable variation in the orbit of Uranus.[251] In the 20th century, humans began their space exploration around the Solar System, starting with placing telescopes in space.[252] Since then, humans have landed on the Moon during the Apollo program; the Apollo 13 mission marked the furthest any human has been away from Earth at 400,171 kilometers (248,655 mi).[253] All eight planets and two dwarf planets have been visited by space probes. This began with Mariner 2's fly-by of Venus in 1962, while Mariner 9 mission to Mars was the first to orbit another planet in 1971. The outer planets were first visited by Pioneer 10's encounter with Jupiter, and Pioneer 11's encounter with Saturn. The remaining gas giants were first visited by the Voyager spacecraft, one of which (Voyager 1) is the furthest object made by humankind and the first in interstellar space.[254] In addition, probes have also returned samples from comets[255] and asteroids,[256] as well as flown through the Sun's corona[257] and made fly-bys of Kuiper belt objects.[258] Six of the planets (all but Uranus and Neptune) have or had a dedicated orbiter.[259] See also Quantum mechanics is a fundamental theory in physics that describes the behavior of nature at the scale of atoms and subatomic particles.[2]: 1.1  It is the foundation of all quantum physics including quantum chemistry, quantum field theory, quantum technology, and quantum information science. Classical physics, the collection of theories that existed before the advent of quantum mechanics, describes many aspects of nature at an ordinary (macroscopic) scale, but is not sufficient for describing them at small (atomic and subatomic) scales. Most theories in classical physics can be derived from quantum mechanics as an approximation valid at large (macroscopic) scale.[3] Quantum mechanics differs from classical physics in that energy, momentum, angular momentum, and other quantities of a bound system are restricted to discrete values (quantization); measurements of systems show characteristics of both particles and waves (wave–particle duality); and there are limits to how accurately the value of a physical quantity can be predicted prior to its measurement, given a complete set of initial conditions (the uncertainty principle). Quantum mechanics arose gradually from theories to explain observations that could not be reconciled with classical physics, such as Max Planck's solution in 1900 to the black-body radiation problem, and the correspondence between energy and frequency in Albert Einstein's 1905 paper, which explained the photoelectric effect. These early attempts to understand microscopic phenomena, now known as the "old quantum theory", led to the full development of quantum mechanics in the mid-1920s by Niels Bohr, Erwin Schrödinger, Werner Heisenberg, Max Born, Paul Dirac and others. The modern theory is formulated in various specially developed mathematical formalisms. In one of them, a mathematical entity called the wave function provides information, in the form of probability amplitudes, about what measurements of a particle's energy, momentum, and other physical properties may yield. Overview and fundamental concepts Quantum mechanics allows the calculation of properties and behaviour of physical systems. It is typically applied to microscopic systems: molecules, atoms and sub-atomic particles. It has been demonstrated to hold for complex molecules with thousands of atoms,[4] but its application to human beings raises philosophical problems, such as Wigner's friend, and its application to the universe as a whole remains speculative.[5] Predictions of quantum mechanics have been verified experimentally to an extremely high degree of accuracy. For example, the refinement of quantum mechanics for the interaction of light and matter, known as quantum electrodynamics (QED), has been shown to agree with experiment to within 1 part in 108 for some atomic properties. A fundamental feature of the theory is that it usually cannot predict with certainty what will happen, but only give probabilities. Mathematically, a probability is found by taking the square of the absolute value of a complex number, known as a probability amplitude. This is known as the Born rule, named after physicist Max Born. For example, a quantum particle like an electron can be described by a wave function, which associates to each point in space a probability amplitude. Applying the Born rule to these amplitudes gives a probability density function for the position that the electron will be found to have when an experiment is performed to measure it. This is the best the theory can do; it cannot say for certain where the electron will be found. The Schrödinger equation relates the collection of probability amplitudes that pertain to one moment of time to the collection of probability amplitudes that pertain to another. One consequence of the mathematical rules of quantum mechanics is a tradeoff in predictability between different measurable quantities. The most famous form of this uncertainty principle says that no matter how a quantum particle is prepared or how carefully experiments upon it are arranged, it is impossible to have a precise prediction for a measurement of its position and also at the same time for a measurement of its momentum. Another consequence of the mathematical rules of quantum mechanics is the phenomenon of quantum interference, which is often illustrated with the double-slit experiment. In the basic version of this experiment, a coherent light source, such as a laser beam, illuminates a plate pierced by two parallel slits, and the light passing through the slits is observed on a screen behind the plate.[6]: 102–111 [2]: 1.1–1.8  The wave nature of light causes the light waves passing through the two slits to interfere, producing bright and dark bands on the screen – a result that would not be expected if light consisted of classical particles.[6] However, the light is always found to be absorbed at the screen at discrete points, as individual particles rather than waves; the interference pattern appears via the varying density of these particle hits on the screen. Furthermore, versions of the experiment that include detectors at the slits find that each detected photon passes through one slit (as would a classical particle), and not through both slits (as would a wave).[6]: 109 [7][8] However, such experiments demonstrate that particles do not form the interference pattern if one detects which slit they pass through. This behavior is known as wave–particle duality. In addition to light, electrons, atoms, and molecules are all found to exhibit the same dual behavior when fired towards a double slit.[2] Another non-classical phenomenon predicted by quantum mechanics is quantum tunnelling: a particle that goes up against a potential barrier can cross it, even if its kinetic energy is smaller than the maximum of the potential.[9] In classical mechanics this particle would be trapped. Quantum tunnelling has several important consequences, enabling radioactive decay, nuclear fusion in stars, and applications such as scanning tunnelling microscopy and the tunnel diode.[10] When quantum systems interact, the result can be the creation of quantum entanglement: their properties become so intertwined that a description of the whole solely in terms of the individual parts is no longer possible. Erwin Schrödinger called entanglement "...the characteristic trait of quantum mechanics, the one that enforces its entire departure from classical lines of thought".[11] Quantum entanglement enables quantum computing and is part of quantum communication protocols, such as quantum key distribution and superdense coding.[12] Contrary to popular misconception, entanglement does not allow sending signals faster than light, as demonstrated by the no-communication theorem.[12] Another possibility opened by entanglement is testing for "hidden variables", hypothetical properties more fundamental than the quantities addressed in quantum theory itself, knowledge of which would allow more exact predictions than quantum theory can provide. A collection of results, most significantly Bell's theorem, have demonstrated that broad classes of such hidden-variable theories are in fact incompatible with quantum physics. According to Bell's theorem, if nature actually operates in accord with any theory of local hidden variables, then the results of a Bell test will be constrained in a particular, quantifiable way. Many Bell tests have been performed, using entangled particles, and they have shown results incompatible with the constraints imposed by local hidden variables.[13][14] It is not possible to present these concepts in more than a superficial way without introducing the actual mathematics involved; understanding quantum mechanics requires not only manipulating complex numbers, but also linear algebra, differential equations, group theory, and other more advanced subjects.[note 1] Accordingly, this article will present a mathematical formulation of quantum mechanics and survey its application to some useful and oft-studied examples. Mathematical formulation Main article: Mathematical formulation of quantum mechanics In the mathematically rigorous formulation of quantum mechanics, the state of a quantum mechanical system is a vector ψ \psi belonging to a (separable) complex Hilbert space H {\mathcal {H}}. This vector is postulated to be normalized under the Hilbert space inner product, that is, it obeys ⟨ ψ , ψ ⟩ = 1 {\displaystyle \langle \psi ,\psi \rangle =1}, and it is well-defined up to a complex number of modulus 1 (the global phase), that is, ψ \psi and e i α ψ {\displaystyle e^{i\alpha }\psi } represent the same physical system. In other words, the possible states are points in the projective space of a Hilbert space, usually called the complex projective space. The exact nature of this Hilbert space is dependent on the system – for example, for describing position and momentum the Hilbert space is the space of complex square-integrable functions L 2 ( C ) {\displaystyle L^{2}(\mathbb {C} )}, while the Hilbert space for the spin of a single proton is simply the space of two-dimensional complex vectors C 2 {\mathbb C}^{2} with the usual inner product. Physical quantities of interest – position, momentum, energy, spin – are represented by observables, which are Hermitian (more precisely, self-adjoint) linear operators acting on the Hilbert space. A quantum state can be an eigenvector of an observable, in which case it is called an eigenstate, and the associated eigenvalue corresponds to the value of the observable in that eigenstate. More generally, a quantum state will be a linear combination of the eigenstates, known as a quantum superposition. When an observable is measured, the result will be one of its eigenvalues with probability given by the Born rule: in the simplest case the eigenvalue λ \lambda is non-degenerate and the probability is given by | ⟨ λ → , ψ ⟩ | 2 {\displaystyle |\langle {\vec {\lambda }},\psi \rangle |^{2}}, where λ → {\displaystyle {\vec {\lambda }}} is its associated eigenvector. More generally, the eigenvalue is degenerate and the probability is given by ⟨ ψ , P λ ψ ⟩ {\displaystyle \langle \psi ,P_{\lambda }\psi \rangle }, where P λ P_{\lambda } is the projector onto its associated eigenspace. In the continuous case, these formulas give instead the probability density. After the measurement, if result λ \lambda was obtained, the quantum state is postulated to collapse to λ → {\displaystyle {\vec {\lambda }}}, in the non-degenerate case, or to P λ ψ / ⟨ ψ , P λ ψ ⟩ {\textstyle P_{\lambda }\psi {\big /}\!{\sqrt {\langle \psi ,P_{\lambda }\psi \rangle }}}, in the general case. The probabilistic nature of quantum mechanics thus stems from the act of measurement. This is one of the most difficult aspects of quantum systems to understand. It was the central topic in the famous Bohr–Einstein debates, in which the two scientists attempted to clarify these fundamental principles by way of thought experiments. In the decades after the formulation of quantum mechanics, the question of what constitutes a "measurement" has been extensively studied. Newer interpretations of quantum mechanics have been formulated that do away with the concept of "wave function collapse" (see, for example, the many-worlds interpretation). The basic idea is that when a quantum system interacts with a measuring apparatus, their respective wave functions become entangled so that the original quantum system ceases to exist as an independent entity. For details, see the article on measurement in quantum mechanics.[17] The time evolution of a quantum state is described by the Schrödinger equation: i ℏ d d t ψ ( t ) = H ψ ( t ) . {\displaystyle i\hbar {\frac {d}{dt}}\psi (t)=H\psi (t).} Here H H denotes the Hamiltonian, the observable corresponding to the total energy of the system, and ℏ \hbar is the reduced Planck constant. The constant i ℏ i\hbar is introduced so that the Hamiltonian is reduced to the classical Hamiltonian in cases where the quantum system can be approximated by a classical system; the ability to make such an approximation in certain limits is called the correspondence principle. The solution of this differential equation is given by ψ ( t ) = e − i H t / ℏ ψ ( 0 ) . {\displaystyle \psi (t)=e^{-iHt/\hbar }\psi (0).} The operator U ( t ) = e − i H t / ℏ {\displaystyle U(t)=e^{-iHt/\hbar }} is known as the time-evolution operator, and has the crucial property that it is unitary. This time evolution is deterministic in the sense that – given an initial quantum state ψ ( 0 ) \psi (0) – it makes a definite prediction of what the quantum state ψ ( t ) \psi(t) will be at any later time.[18] Fig. 1: Probability densities corresponding to the wave functions of an electron in a hydrogen atom possessing definite energy levels (increasing from the top of the image to the bottom: n = 1, 2, 3, ...) and angular momenta (increasing across from left to right: s, p, d, ...). Denser areas correspond to higher probability density in a position measurement. Such wave functions are directly comparable to Chladni's figures of acoustic modes of vibration in classical physics and are modes of oscillation as well, possessing a sharp energy and thus, a definite frequency. The angular momentum and energy are quantized and take only discrete values like those shown. (As is the case for resonant frequencies in acoustics.) Some wave functions produce probability distributions that are independent of time, such as eigenstates of the Hamiltonian. Many systems that are treated dynamically in classical mechanics are described by such "static" wave functions. For example, a single electron in an unexcited atom is pictured classically as a particle moving in a circular trajectory around the atomic nucleus, whereas in quantum mechanics, it is described by a static wave function surrounding the nucleus. For example, the electron wave function for an unexcited hydrogen atom is a spherically symmetric function known as an s orbital (Fig. 1). Analytic solutions of the Schrödinger equation are known for very few relatively simple model Hamiltonians including the quantum harmonic oscillator, the particle in a box, the dihydrogen cation, and the hydrogen atom. Even the helium atom – which contains just two electrons – has defied all attempts at a fully analytic treatment. However, there are techniques for finding approximate solutions. One method, called perturbation theory, uses the analytic result for a simple quantum mechanical model to create a result for a related but more complicated model by (for example) the addition of a weak potential energy. Another method is called "semi-classical equation of motion", which applies to systems for which quantum mechanics produces only small deviations from classical behavior. These deviations can then be computed based on the classical motion. This approach is particularly important in the field of quantum chaos. A war broke out between the Birds and Beasts after the Geese had suffered persecution at the hands of the Foxes, and the Eagle and Owl had hunted Hare and Mice. The Battle was disastrous, with many creatures dying. The Bats, a very politic race, initially sided with the Birds, but when the Beasts began to gain ground, they switched sides. Both sides were angry at the Bats' deceit and made common cause to drive them out. As a result, the Bats now hide in dark towers and ruins, coming out only at night, proving that the deceitful have no friends. Mr. Scalper is a character delineator at a newspaper called The Daily Eclipse. Late at night, he is all alone in the reporters' room and goes back and forth between writing character analyses of subscribers who sent handwriting samples and drinking from a tall black bottle of liquor to stimulate his intellect. Outside, a policeman patrols the street, lamenting the loneliness of his job and writing in his notebook in the light of the gas lamp. The policeman takes notice of a suspicious individual and of a Chinese person returning home late from work. Feeling inspired by the presence of Mr. Scalper, the policeman writes a poetic monologue in his notebook. Mr. Scalper, in turn, encourages the policeman by taking him a drink. Both characters benefit from a shared moment of human connection and reflect on the solace brought by their trade. After receiving a letter from a correspondent which he reads with satisfaction, Mr. Scalper decides to write a separate, private letter to a woman called Aunt Dorothea as well as a printed version of the letter he received. Policeman Hogan interrupts this process to write his own chronicle, causing Mr. Scalper to lower the bottle he had been using to help him write. To afford Hogan the same opportunity, Mr. Scalper decides not to haul the bottle up immediately and attempts to write another character. Upon reading the corresponding letter, Mr. Scalper is visibly affected and decides to haul up the bottle before Hogan can get a taste for liquor. However, his efforts are unsuccessful as Hogan has fallen asleep while still holding the bottle, and Mr. Scalper instead turns back to finish his task. After filling the column with an imaginary character, Mr. Scalper puts on his hat and coat and goes home, feeling satisfied with his pay. After insisting that he wanted to marry Myrtle, Gus got permission to take her out on the condition he would behave himself. He immediately began to make moves to get close to her, eventually getting close enough to hold hand and tell her fortune within eight minutes. He demanded for Fred and Eustace to provide the music for their date, and when finished outside, he asked for another piece and Myrtle chose one. Seeing him so close to Myrtle made them angry so Fred and Eustace left without saying goodbye. His persistence eventually won Myrtle's affection, and they were married with Fred and Eustace as ushers. Ultimately, the message is that to get a fair trial, you need a pace-maker. Despite its size and strength, an eagle was unable to protect its eggs from a relentless beetle. After multiple attempts by the eagle to protect the eggs, the beetle reveals why it was so determined. Jupiter acknowledges the beetle's cause and, due to the situation, commands that the beetle be protected and granted a safe place to sleep. This story serves as a reminder that even the smallest and weakest can find a way to get revenge, when wronged. The Mice held a meeting to devise a plan to escape their enemy, the Cat. They considered several ideas but none were deemed appropriate. Then, a young Mouse proposed that a bell be placed around the Cat's neck, so when its ringing was heard, the Mice would know to run away. Everyone was pleased with this plan, but the difficulty was who would put the bell on the Cat in the first place. Ultimately, the proposing of a plan and its execution are two very different things. For the past two weeks, The Rolling Stone missed two issues due to the editor becoming sick with la grippe and measles. To apologize, everybody's term of subscription will be extended to make up for the missed issues. The editor is now recovering but is being careful to not relapse due to the deleterious after-effects of the measles. Anyone not getting their paper regularly should bring a delicacy for the ill editor. The Cat and Monkey were great friends living together as pets and always getting themselves into mischief, like trying to get chestnuts from the fire. The monkey convinced the Cat to get them, but he ate them as soon as she pulled them out, singeing her paw in the process. When the master came in, they both ran away, and from then on the Cat stayed away from the Monkey, hunting mice and rats instead. Yeah...so, my day wasn't all that great. Thanks to Andrew sliding across the stinking floor this morning, I have a huge bruise on my back. Got my schedule...it's ok, but I'm going to try to switch lunch and health, since I got really light-headed and sick by the end of the day. Eek, it wasn't good. Band and music theory stayed the same, so my first two classes were a cinch. Sometimes in band, Dan, and Peter, and the rest of them really get to me. Today was sort of one of those days. I really hadn't had a good start of the day, and I just didn't want to put up with them criticizing everything. Yeah...so, I'm not Tito...give me a break! It's not even something I'm going to pursue later on in life, I'm just having fun now, except, it's difficult for me to have fun when I have all these jerks sitting beside me. Arg. Then...third hour Chem, which is a huge change for me, since I used to have it eighth hour. It's not too bad actually. Mr. Kordalewski (RAR! Stupid long named teachers!) seems pretty nice, and he's got the funniest accent. So, it's all good! I'm not a big fan of Chem though, soo...it kind of stinks, but Diane is in my class!!! I was so excited to see her! I was like...AHHHH DIANE! YAY! It was quite exciting. I sit in the back row corner...again, like last semester. What is it with me and back row corners?? Am I really THAT bad to look at? I suppose...but, oh well. Then lunch, which sucks...fourth hour...royally sucks!!! No one's in it, and the lunch is too early. I'm going to try to get it switched tomorrow. I hope I can. I had to sit next to Pez for the first part...which was ok, but...the kid doesn't know when to stop talking. Like...seriously, he's really nice and all, but...I don't know, I just wish he knew when to stop talking more. Then halfway through the lunch hour, I met up with Kelly and Kathryn!!! YES! Thank you God...if I can't switch it, I still have two of my best friends. So, we just walked around and talked, and...it was fun. I kind of miss seeing them sometimes. We all went to this really dumb movie Friday night...but, without Nikki, and I miss her too. I really miss being around with a lot of my friends. I see band people every day, but I get the feeling they aren't really my friends. They pick on me a lot, and at first I just assumed it was all fun and games, but now...I sometimes feel like they all really don't like me. So...it's nice to hang out with non-band kids. Nikki's cheerleading squad made Nationals, which of course...is awesome! People laugh at me because one of my best friends is a cheerleader, and I just laugh right back, because they're missing out on a truly wonderful person! I miss Carson too. I know I see her like...every day, and I talk to her, but I kind of miss the way things used to be. Malevalent Sisters!! Carson, Nikki, and me...it was so cool....I just really miss Junior High sometimes. I can remember when I was 8, and I was REFUSING to turn 9. I actually refused! I kind of wish those days were back sometimes. Scott and I had a long conversation about this the other day, and...he reminded me of what fun it was to be younger. How I didn't have to worry about drinking, and all the stuff I'm completely not into! I miss my little group of friends...we used to do EVERYTHING together...and now it's just all breaking apart. Joanne's going to England, Carson's already gone from the group (thank goodness I still keep in close contact with her) and Nikki goes to Benet. I just...miss the old days. Yeah, anyway....sorry....I just kept writing and writing, and I got off track. 5th hour, I had Speech, which was totally neat! I don't care what anyone says about her perkyness, I love Ms. V! Or as we call her...V-diddy! She's just so enthusiastic about teaching...like she actually wants to be there! She reminds me of Mr. Doman. I guess it's really easy to get a good grade in Ms. V's class, thank goodness, since I'm reallly nervous about giving speeches. Will is in my class :) I like him a lot. He's such a cool kid. He always wears this batman shirt that I love, and he's always really nice to me. He always seems kind of sad about something though...and it just, really reminds me of Kari's death. There's another person I miss a lot. Wow...I miss a lot of people right now....even Christy. Yeah...she did kiss Ryan...and yeah...I did dump his sorry butt, but...I still kind of miss her. She was just...so good to talk to. There's no one right now, that I really feel I could tell anything in the world to...like...just anything, and everything that's on my mind, and I wish there was. Just turned on some Dave Matthews Band...I hope it puts me in a better mood. Honestly...I know it wont, but...I have to try, right?? Wow, I haven't written this much...possibly ever, and I've just gotten a little more than halfway through my day. I don't know what's up with me. I just...am thinking of how I wish things were, and, how fast things are changing. I mean...I'm already 37.5% of my way through high scool. That's pretty depressing, especially since I have no idea what I want to do after High School. *Sigh* Well...yeah, back to speech, not much more to tell. I have a one minute speech to do tomorrow about myself. I think I'm going to talk about being albino. I hope it interests people. It's not something you hear talked about every day, soo...yeah. Yeah....health....eek...scary class. Yikes...not much more to say than that, except...I have Stevey in my class!!! AHHH! Yay! Steve Zimnie...if you've never met the kid, meet him. He's the coolest ever. He's really nice, and he's really really cute. :) His girlfriend's lucky. Haha...and, I realized how bad that may have sounded...no, I don't like Steve as more than a friend, he's just really cool, so he deserved mentioning. I don't mention people I like...or do I?? Hmmm.... Ummm...ok, what's next? Math...yes, wont go into great detail about that, except, it's kind of cool since Taylor's in my math class, which is excellent, because Taylor is definitely the coolest. She's such a sweet person. I wish I could be more like her sometimes. Then...American Gov.!! YAY! I have lots of people in my class...including Andre Cherry...haha...I kissed that kid when I was like...5. Ah...good times, good times. Kathryn's in my class, which is awesome, and so it Meredith, I don't care what ANYONE says about her, she's always really nice to me, and I think she's a cool person who has a lot to offer. Also...I have the coolest teacher, Mr. Albinak. He's such a great teacher. Kelly C. has him too, except...different period. And...yes, that was my day. It ended alright, but, I still am hoping to switch my lunch periods. I REALLY hope they let me. Anyway....I'm sick of typing, and I'm getting restless, so, I think I'll go read for a bit, and...maybe write more later. I'm actually writing down what I feel on here, which is kind of surprising. I don't usually actually write what I'm feeling. Oh yeah...I guess there were like 20-25 bands in our section on Saturday...so, either we really didn't do as bad as I thought, or...the other bands were atrocious. I haven't gotten to talk to Scott about Winter yet, and arrange things. I'm pretty sure we're going to Kathryn's to eat, then to the dance, and possibly Joanne's after, but...who knows? I think I'm going to go for a little while...I'm kind of sad right now... Oh well...I hope everyone has a lovely evening. :) اندلعت حرب بين الطيور والوحوش بعد أن عانى الإوز من الاضطهاد على يد الثعالب، وقام النسر والبومة باصطياد الأرنب والفئران. كانت المعركة كارثية، حيث ماتت العديد من المخلوقات. انحازت الخفافيش، وهي عرق سياسي للغاية، في البداية إلى جانب الطيور، ولكن عندما بدأت الوحوش في اكتساب الأرض، غيروا مواقفهم. كان كلا الجانبين غاضبين من خداع الخفافيش واتفقا على قضية مشتركة لطردهم. ونتيجة لذلك، يختبئ الخفافيش الآن في الأبراج المظلمة والأطلال، ولا يخرجون إلا في الليل، مما يثبت أن المخادعين ليس لديهم أصدقاء. السيد سكالبر هو محدد الشخصية في صحيفة تسمى The Daily Eclipse. في وقت متأخر من الليل، يكون بمفرده في غرفة المراسلين ويتنقل ذهابًا وإيابًا بين كتابة تحليلات شخصية المشتركين الذين أرسلوا عينات من الكتابة اليدوية والشرب من زجاجة خمور سوداء طويلة لتحفيز ذكائه. في الخارج، يقوم شرطي بدوريات في الشارع، وهو يندب الوحدة التي يعاني منها في وظيفته ويكتب في دفتر ملاحظاته على ضوء مصباح الغاز. يلاحظ الشرطي شخصًا مشبوهًا وشخصًا صينيًا يعود إلى المنزل متأخرًا من العمل. يشعر الشرطي بالإلهام من وجود السيد سكالبر، فيكتب مونولوجًا شعريًا في دفتر ملاحظاته. يقوم السيد سكالبر بدوره بتشجيع الشرطي من خلال تناول مشروب له. تستفيد كلتا الشخصيتين من لحظة مشتركة من التواصل الإنساني وتتأملان في العزاء الذي تجلبه تجارتهما. بعد تلقي رسالة من أحد المراسلين والتي قرأها بارتياح، قرر السيد سكالبر أن يكتب رسالة خاصة منفصلة إلى امرأة تدعى العمة دوروثيا بالإضافة إلى نسخة مطبوعة من الرسالة التي تلقاها. يقاطع الشرطي هوجان هذه العملية لكتابة سجل الأحداث الخاص به، مما دفع السيد سكالبر إلى خفض الزجاجة التي كان يستخدمها لمساعدته في الكتابة. لمنح هوجان نفس الفرصة، قرر السيد سكالبر عدم سحب الزجاجة على الفور وحاول كتابة شخصية أخرى. عند قراءة الرسالة المقابلة، يبدو أن السيد سكالبر متأثر بشكل واضح ويقرر سحب الزجاجة قبل أن يتمكن هوجان من تذوق المشروب الكحولي. ومع ذلك، فإن جهوده لم تنجح حيث نام هوجان بينما كان لا يزال ممسكًا بالزجاجة، وبدلاً من ذلك عاد السيد سكالبر لإنهاء مهمته. بعد ملء العمود بشخصية خيالية، يرتدي السيد سكالبر قبعته ومعطفه ويعود إلى المنزل وهو يشعر بالرضا عن راتبه. بعد إصراره على رغبته في الزواج من ميرتل، حصل جوس على الإذن بإخراجها بشرط أن يتصرف على طبيعته. بدأ على الفور في اتخاذ خطوات للاقتراب منها، واقترب في النهاية بما يكفي ليمسك بيدها ويخبرها بثروتها في غضون ثماني دقائق. طالب فريد ويوستاس بتقديم الموسيقى لموعدهما، وعندما انتهى بالخارج، طلب مقطوعة أخرى واختارت ميرتل واحدة. إن رؤيته قريبة جدًا من ميرتل جعلتهم غاضبين لذا غادر فريد ويوستاس دون أن يقولوا وداعًا. في النهاية، أكسب إصراره عاطفة ميرتل، وتزوجا من فريد ويوستاس كمرشدين. في نهاية المطاف، الرسالة هي أنه للحصول على محاكمة عادلة، فأنت بحاجة إلى جهاز تنظيم ضربات القلب. على الرغم من حجمه وقوته، لم يتمكن النسر من حماية بيضه من خنفساء لا هوادة فيها. وبعد عدة محاولات من النسر لحماية البيض، تكشف الخنفساء سبب عزمها على ذلك. يقر كوكب المشتري بسبب الخنفساء، وبسبب الموقف، يأمر بحماية الخنفساء ومنحها مكانًا آمنًا للنوم. هذه القصة بمثابة تذكير بأنه حتى الأصغر والأضعف يمكنهم إيجاد طريقة للانتقام عندما يتعرضون للظلم. عقدت الفئران اجتماعًا لوضع خطة للهروب من عدوهم القط. لقد نظروا في العديد من الأفكار ولكن لم يتم اعتبار أي منها مناسبًا. بعد ذلك، اقترح فأر صغير أن يتم وضع جرس حول رقبة القطة، بحيث عندما يُسمع رنينه، ستعرف الفئران أنها تهرب. كان الجميع سعداء بهذه الخطة، لكن الصعوبة كانت تكمن في من سيضع الجرس على القطة في المقام الأول. في نهاية المطاف، اقتراح الخطة وتنفيذها أمران مختلفان تمامًا. على مدى الأسبوعين الماضيين، أضاعت مجلة رولينج ستون عددين بسبب إصابة المحرر بمرض الحصبة والحصبة. للاعتذار، سيتم تمديد فترة الاشتراك للجميع للتعويض عن القضايا الفائتة. يتعافى المحرر الآن ولكنه يحرص على عدم الانتكاس بسبب الآثار الضارة للحصبة. يجب على أي شخص لا يحصل على ورقته بانتظام أن يحضر طعامًا شهيًا للمحرر المريض. كان القط والقرد صديقين حميمين يعيشان معًا كحيوانات أليفة ويوقعان نفسيهما دائمًا في الأذى، مثل محاولة إخراج الكستناء من النار. أقنع القرد القطة بإحضارهم، لكنه أكلهم بمجرد أن أخرجتهم، مما أدى إلى حرق مخلبها في هذه العملية. عندما دخل السيد، هرب كلاهما، ومنذ ذلك الحين ابتعد القط عن القرد، واصطاد الفئران والجرذان بدلاً من ذلك. ستجد أدناه بعض مقاطع الفيديو الرائعة التي ستشجعك وتدربك وتبنيك على الاستماع إلى الله والقدرة على السماح له بتحقيق خطته في حياتك. شيء جديد سيساعدك على سماع صوت الله! كيفية فهمها وتقسيمها بشكل صحيح وكيف تنطبق على الحياة! في هذا التعليم المهم يكشف تيري عن التمييز الواضح بين الروح والنفس ومدى أهمية أن نتعلم كيفية العمل بالروح وعدم الانخداع. إنها مسألة خطيرة يجب إعادة النظر فيها مهما كان مستوى إيمانك ونضجك. الزواج وكيف ينطبق على الروح والنفس! في هذا الفصل التنويري، يكشف تيري عن رؤية أساسية تساعدنا على تمييز الروح مقابل الروح بشكل أفضل كما تنعكس في علاقة الزواج من الطبيعة البديهية، والمكون العاطفي للمرأة وجانب القوة للذكر في الخضوع للرب. . في هذا التعليم الذي يفتح العين، يشارك تيري كيف أن خيمة الاجتماع تمثل جسد وروح وروح الإنسان وكيف تنطبق على مسيرتنا الروحية. تساعدك حزمة الخلاص الكاملة هذه على إرشادك خلال ما يمكنك القيام به لتحرير نفسك من القوة الخفية المدفونة في أعماق روحك والتي تعيقك عن السير في الامتلاء الذي دفعه الله لك لكي تمشي فيه. في فيديو اليوم، يحدد تيري الخلاص الأفضل والأشياء التي تعترض طريق خلاص أرواحنا والطرق التي يمكننا من خلالها زيادة نضجنا الروحي. تعاونت UNStudio مع HPP Architects لإنشاء اتحاد (UNS + HPP) لتنفيذ المراحل التالية من مشروعهم الفائز في مسابقة التصميم المعماري لـ FOUR فرانكفورت. ألق نظرة على القصة الكاملة بعد القفزة. من المهندسين المعماريين: تم شراء الموقع المركزي الذي تبلغ مساحته 16000 متر مربع من قبل شركة التطوير العقاري Groß & Partner - التي ستقوم بتنفيذ تطوير المشروع - في عام 2015. يقع الموقع في قلب المدينة، وقد تم تصميمه لا يمكن الوصول إليها تمامًا خلال الـ 45 عامًا الماضية. والآن ستغير أربعة أبراج شاهقة جديدة أفق فرانكفورت من الجو، بينما ستعزز حيويتها على الأرض. وسيؤدي تطوير هذه الأبراج، التي يصل ارتفاعها إلى 228 مترًا، إلى فتح شوارع جديدة لإنشاء حي متعدد الاستخدامات وحيوي داخل المدينة، يجمع بين مزيج صحي من العمل والمعيشة والاسترخاء والاستجمام. يسمح اختيار البرامج بالانتقال السلس من منطقة التسوق في فرانكفورت إلى شرق Roßmarkt، إلى أبراج المكاتب الشاهقة المتجمعة حول Park Taunusanlage. مع مفهوم تطوير فريد من نوعه في أوروبا، يجمع مشروع FOUR فرانكفورت بين المرافق التي ستنشئ حيًا جديدًا حيويًا لفرانكفورت وزوارها وسكانها (المستقبليين). سيتم دمج المجمع الشاهق الجديد في هيكل المدينة المتوسع من خلال دمج واجهات Junghofstraße المدرجة في قائمة التراث في التصميم ومن خلال جعل مبنى قاعدة متعدد الطوابق هو العنصر المتصل بالموقع بأكمله. وفقًا للتقييم الذي أجرته لجنة تحكيم المسابقة، يمكن العثور على الجودة الفريدة لهذا الربع في التطوير العام وقيمة وسائل الراحة. وبالتالي فإن التطوير الجديد سيخلق مساحات متصلة وأسطح وممرات وممرات يمكن الوصول إليها. سيتم فتح المبنى الحالي في Junghofstraße لتعزيز المسارات المحيطة وضمان مستوى عالٍ من إمكانية الوصول. سيؤدي ذلك إلى إنشاء حي متعدد الاستخدامات ومتنوع يضم 50% من المساحات المكتبية، و30% من أماكن الإقامة (بما في ذلك الإسكان المدعوم)، بالإضافة إلى مساحات البيع بالتجزئة والمطاعم والفنادق. ومن المتوقع أن يتم الانتهاء من أربعة فرانكفورت في عام 2023. 2 نيو إنجلاند NE 16 1 لعب -1 ياردة 0:07 نهاية الشوط الأول. 4 Pittsburgh Pit 37 2 مسرحية -1 ياردة 1:01 نهاية اللعبة. 2 8 مقابل 29 1:57 بيت بليير 0 Bas Draw/SI 4-3 sZ Run-Harris, F. البائعون غير المقيمين (مثل الأجانب الذين يعيشون في الخارج والمواطنين اليابانيين الذين يعيشون في الخارج). المشترين، سواء المقيمين المحليين أو الأجانب، الذين يشترون العقارات في اليابان من شخص غير مقيم. إذا كان بائع العقارات اليابانية غير مقيم، اعتمادًا على الوضع، يجب على المشتري احتجاز 10.21% من سعر البيع ودفعها إلى مكتب الضرائب، مع دفع نسبة 89.79% المتبقية للبائع. يتحمل المشتري مسؤولية دفع نسبة 10.21% إلى مكتب الضرائب بحلول اليوم العاشر من الشهر التالي للمعاملة. يقع على عاتقك واجب سداد هذه الدفعة إلى مكتب الضرائب بحلول الموعد النهائي. إذا كنت تعيش حاليًا في الخارج، فستحتاج إلى تعيين ممثل ضريبي أو محاسب لدفع هذا المبلغ نيابةً عنك. ستحتاج إلى تعيين ممثل ضريبي في اليابان لتقديم إقرار ضريبي نهائي حتى يتم إرجاع الباقي إليك (مخصومًا منه أي ضرائب قد تكون مستحقة). *إذا كان دفع الودائع والمدفوعات متوسطة الأجل يستوفي أيضًا شروط ضريبة الاستقطاع، فيجب حجب الضريبة ودفعها من قبل المشتري عند كل دفعة. تم تقديم المعلومات المذكورة أعلاه كدليل عام فقط. لمزيد من التفاصيل حول هذه الضريبة، وللأسئلة الضريبية التفصيلية الأخرى، يرجى استشارة مكتب الضرائب أو أحد المتخصصين...نعم... لذا، لم يكن يومي رائعًا. بفضل انزلاق أندرو على الأرضية النتنة هذا الصباح، أعاني من كدمة كبيرة في ظهري. حصلت على جدول أعمالي...لا بأس، ولكنني سأحاول تبديل الغداء والصحة، يا سيدي 鹅遭到狐狸的迫害,老鹰和猫头鹰猎杀了野兔和老鼠,鸟类和野兽之间爆发了战争。 这场战斗是灾难性的,许多生物死亡。 蝙蝠是一个非常政治化的种族,最初站在鸟类一边,但当野兽开始取得进展时,他们改变了立场。 双方都对蝙蝠队的欺骗行为感到愤怒,并共同致力于将他们驱逐出去。 结果,蝙蝠现在躲在黑暗的塔楼和废墟里,只在晚上出来,证明骗子没有朋友。 黄牛先生是一家名为《每日日食》的报纸的人物塑造者。 深夜,他一个人呆在记者室里,来来回回地对寄来笔迹样本的订阅者进行性格分析,喝一大瓶黑酒来激发自己的智力。 外面,一名警察在街上巡逻,一边感叹工作的孤独,一边在煤气灯的灯光下写着笔记本。 警察注意到一名可疑人员和一名下班晚归的中国人。 警察受到黄牛先生的存在的启发,在笔记本上写下了一段诗意的独白。 黄牛先生则给警察喝了一杯酒以鼓励他。 两个角色都受益于共同的人际关系时刻,并反思了他们的贸易带来的安慰。 斯卡珀先生收到一封来自记者的信,他满意地读完后,决定给一位名叫多萝西娅阿姨的女士单独写一封私人信,并打印出他收到的信的印刷版。 警察霍根打断了这个过程,去写自己的编年史,导致黄牛先生放下了他一直用来帮助他写的瓶子。 为了给霍根同样的机会,斯卡珀先生决定不立即把瓶子拖起来,并尝试写另一个角色。 读完相应的信件后,黄牛先生显然受到了影响,并决定在霍根品尝烈酒之前把瓶子拿起来。 然而,他的努力没有成功,霍根拿着瓶子睡着了,黄牛先生转而回去完成他的任务。 在专栏中填满了一个虚构的角色后,黄牛先生戴上帽子,穿上外套,回家了,对自己的报酬感到满意。 在坚持要与默特尔结婚后,格斯得到了允许带她出去,但条件是他要表现得规矩。 他立即开始做出靠近她的举动,最终在八分钟内拉近了她的手并算命。 他要求弗雷德和尤斯塔斯为他们的约会提供音乐,当他在外面完成时,他要求另一首曲子,默特尔选择了一首。 看到他离默特尔如此之近,他们很生气,所以弗雷德和尤斯塔斯不辞而别。 他的坚持最终赢得了默特尔的喜爱,他们在弗雷德和尤斯塔斯担任引座员的情况下结婚了。 最终,我们传达的信息是,为了获得公平的审判,您需要一个起搏器。 尽管鹰体型庞大、力量强大,但它却无法保护自己的蛋免受无情甲虫的侵害。 在老鹰多次尝试保护蛋之后,甲虫揭示了它为何如此坚定。 朱庇特承认了甲虫的原因,并根据情况,命令保护甲虫并为其提供安全的睡眠场所。 这个故事提醒我们,即使是最小和最弱的人,在受到委屈时也能找到报复的方法。 老鼠们召开了一次会议,制定了一个逃离敌人猫的计划。 他们考虑了几个想法,但没有一个被认为是合适的。 然后,一只小老鼠提议在猫的脖子上挂一个铃铛,这样当听到铃铛响时,老鼠就会知道逃跑。 每个人都对这个计划感到满意,但困难在于谁首先给猫按响铃。 最终,计划的提出和计划的执行是两件截然不同的事情。 在过去的两周里,由于编辑感染了流行性感冒和麻疹,《滚石》杂志错过了两期。 抱歉,每个人的订阅期限都将延长,以弥补错过的问题。 编辑现在正在康复,但由于麻疹的有害后遗症,他正在小心不要复发。 任何不能定期收到论文的人都应该为生病的编辑带来美味佳肴。 猫和猴子是好朋友,作为宠物生活在一起,但总是搞恶作剧,比如试图从火中取栗子。 猴子说服了猫去拿它们,但当她把它们拿出来时,猴子就把它们吃掉了,并在此过程中烧焦了她的爪子。 当主人进来时,他们都逃跑了,从此猫远离了猴子,而是去捕老鼠。 是的……所以,我的日子不太好。 感谢安德鲁今天早上在发臭的地板上滑行,我的背上有很大的瘀伤。 我的日程安排好了……没关系,但我会尝试改变午餐和健康 下面你会发现一些很棒的视频,它们会鼓励你、训练你、帮助你聆听上帝的声音,并让他在你的生活中实现他的计划。 新的东西将帮助您听到神的声音! 如何理解并正确划分它以及它如何应用于生活! 在这个重要的教导中,特里揭示了精神与灵魂之间的明显区别,以及我们学习如何在精神中运作而不被欺骗是多么重要。 这是一个严肃的问题,无论你的信仰和成熟程度如何,都必须进行审查。 婚姻及其如何应用于精神和灵魂! 在这个启发性的课程中,特里揭示了一个关键的见解,可以帮助我们更好地辨别精神与灵魂,因为它反映在婚姻关系中,从直觉本质,女人的情感成分和男人顺服主的力量方面 。 在这个令人大开眼界的教学中,特里分享了会幕如何代表人的身体、灵魂和精神,以及它如何应用于我们的精神行走。 这个完整的拯救包可以帮助你了解如何才能将自己从深埋在灵魂深处的隐藏强迫中解放出来,这些强迫阻碍你走在上帝为你付出代价的丰盛中。在今天的视频中,特里定义了拯救 更好的事情以及阻碍我们灵魂得救的事情以及我们可以提高灵性成熟度的方法。 UNStudio 与 HPP Architects 联手创建了一个联盟 (UNS + HPP),以实施其在 FOUR 法兰克福建筑设计竞赛中获胜项目的下一阶段。 跳转后看一下完整的故事。 建筑师介绍:位于市中心的 16,000 平方米场地早在 2015 年就被 Groß & Partner 房地产开发公司购买,该公司将负责该项目的开发。该场地位于城市的核心地带,一直被 过去 45 年来完全无法进入。 现在,四座新的高层塔楼将从空中改变法兰克福的天际线,同时在地面上培养其活力。 这些塔楼的开发高度将达到 228 米,将开辟新的街道,打造一个多功能、充满活力的市中心区,将工作、生活、休闲和娱乐健康地结合在一起。 项目的选择使得从法兰克福购物区到 Roßmarkt 东部,再到 Taunusanlage 公园周围的高层办公楼顺利过渡。 法兰克福四号项目采用欧洲独有的开发理念,汇集了各种设施,将为法兰克福、游客和(未来)居民建立一个充满活力的新社区。 新的高层综合体将通过将荣霍夫大街列入遗产名录的外墙纳入设计,并使多层基础建筑成为整个场地的连接元素,从而融入不断扩大的城市结构。 根据竞赛评审团的评估,该季度的独特品质体现在其公共发展和舒适价值。 因此,新开发项目将创造互联空间、无障碍屋顶、步道和通道。 Junghofstraße 上的现有街区将被开放,以加强周围的道路并确保高水平的可达性。 这将创建一个多用途、多元化的季度,除了零售空间、餐厅和酒店外,还包括 50% 的办公空间、30% 的居住空间(包括补贴住房)。 法兰克福四期预计将于 2023 年竣工。 2 新英格兰 NE 16 1 打 -1 码 0:07 半场结束。 4 匹兹堡 Pit 37 2 场比赛 -1 码 1:01 比赛结束。 2 8 opp29 1:57 Pit Bleier 0 Bas Draw/SI 4-3 sZ Run-Harris,F. 非居民卖家(例如居住在国外的外国人和居住在国外的日本公民)。 从非居民手中购买日本房地产的买家,包括本地居民和海外居民。 如果日本房地产的卖方是非居民,根据具体情况,买方必须预扣销售价格的10.21%并将其缴纳给税务局,其余89.79%支付给卖方。 买方有责任在交易后的下个月 10 日之前向税务局缴纳 10.21% 的税款。 您有义务在截止日期前向税务局缴纳这笔款项。 如果您目前居住在海外,您将需要指定一名税务代表或会计师代表您支付这笔费用。 您需要在日本指定一名税务代表提交最终纳税申报表,以便将剩余金额退还给您(减去可能欠下的任何税款)。 *如果定金和中期付款的支付也符合预扣税的条件,则税款必须由买方在每次付款时代扣代缴。 上述信息仅作为一般指南提供。 有关此税的更多详细信息以及其他详细的税务问题,请咨询税务局或专家... 使用当今最常用的分词器来训练新词汇并进行分词。 由于 Rust 实现,速度非常快(训练和标记化)。 在服务器 CPU 上标记 1 GB 文本只需不到 20 秒。 易于使用,而且用途极其广泛。 专为研究和生产而设计。 标准化伴随着对齐跟踪。 总是可以获得原始句子中与给定标记相对应的部分。 执行所有预处理:截断、填充、添加模型所需的特殊标记。 使用當今最常用的分詞器來訓練新詞彙並進行分詞。 由於 Rust 實現,速度非常快(訓練和標記化)。 在伺服器 CPU 上標記 1 GB 文字只需不到 20 秒。 易於使用,而且用途極為廣泛。 專為研究和生產而設計。 標準化伴隨著對齊追蹤。 總是可以獲得原始句子中與給定標記相對應的部分。 執行所有預處理:截斷、填充、新增模型所需的特殊標記。 Une guerre éclata entre les oiseaux et les bêtes après que les oies eurent été persécutées par les renards et que l'aigle et le hibou eurent chassé le lièvre et la souris. La bataille fut désastreuse et de nombreuses créatures moururent. Les Chauves-souris, une race très politique, se sont d'abord rangés du côté des Oiseaux, mais lorsque les Bêtes ont commencé à gagner du terrain, elles ont changé de camp. Les deux parties étaient en colère contre la tromperie des Bats et ont fait cause commune pour les chasser. En conséquence, les chauves-souris se cachent désormais dans des tours et des ruines sombres, ne sortant que la nuit, prouvant que les fourbes n'ont pas d'amis. M. Scalper est un délinéateur de caractère dans un journal appelé The Daily Eclipse. Tard dans la nuit, il est tout seul dans la salle des journalistes et va et vient entre l'écriture d'analyses de personnages d'abonnés qui ont envoyé des échantillons d'écriture manuscrite et la consommation d'une grande bouteille d'alcool noire pour stimuler son intellect. Dehors, un policier patrouille dans la rue, déplorant la solitude de son travail et écrivant sur son carnet à la lueur du bec de gaz. Le policier remarque un individu suspect et un Chinois rentrant tard du travail. Inspiré par la présence de M. Scalper, le policier écrit un monologue poétique dans son carnet. M. Scalper, à son tour, encourage le policier en lui apportant un verre. Les deux personnages profitent d’un moment partagé de connexion humaine et réfléchissent au réconfort apporté par leur métier. Après avoir reçu une lettre d'un correspondant qu'il lit avec satisfaction, M. Scalper décide d'écrire une lettre privée séparée à une femme appelée tante Dorothea ainsi qu'une version imprimée de la lettre qu'il a reçue. Le policier Hogan interrompt ce processus pour écrire sa propre chronique, obligeant M. Scalper à baisser la bouteille qu'il utilisait pour l'aider à écrire. Pour offrir à Hogan la même opportunité, M. Scalper décide de ne pas soulever la bouteille immédiatement et tente d'écrire un autre personnage. A la lecture de la lettre correspondante, M. Scalper est visiblement affecté et décide de remonter la bouteille avant qu'Hogan puisse goûter à l'alcool. Cependant, ses efforts échouent car Hogan s'est endormi tout en tenant toujours la bouteille, et M. Scalper se retourne pour terminer sa tâche. Après avoir rempli la colonne d'un personnage imaginaire, M. Scalper enfile son chapeau et son manteau et rentre chez lui, satisfait de son salaire. Vous trouverez ci-dessous quelques superbes vidéos qui vous encourageront, vous formeront et vous permettront d'entendre DIEU et d'être capable de LE laisser réaliser SON plan dans votre vie. QUELQUE CHOSE DE NOUVEAU QUI VOUS AIDERA À ENTENDRE LA VOIX DE DIEU ! Comment le comprendre et le diviser correctement et comment cela s'applique à la vie ! Dans cet enseignement important, Terry révèle la distinction claire entre l'Esprit et l'Âme et combien il est essentiel que nous apprenions à opérer dans l'Esprit et à ne pas nous laisser tromper. C'est une question sérieuse qui doit être revue quel que soit votre niveau de foi et de maturité. Le mariage et comment il s'applique à l'esprit et à l'âme ! Dans ce cours instructif, Terry révèle une idée clé qui nous aide à mieux discerner l'Esprit par rapport à l'Âme tel qu'il se reflète dans la relation conjugale, à partir de la nature intuitive, de la composante émotionnelle de la femme et de l'aspect pouvoir d'un homme soumis au SEIGNEUR. . Dans cet enseignement révélateur, Terry explique comment le Tabernacle représente le corps, l'âme et l'esprit de l'homme et comment il s'applique à notre marche spirituelle. Ce paquet complet de délivrance vous aide à découvrir ce que vous pouvez faire pour vous libérer des forces cachées enfouies au plus profond de votre âme qui vous empêchent de marcher dans la plénitude dans laquelle DIEU a payé pour que vous marchiez. Dans la vidéo d'aujourd'hui, Terry définit le salut. mieux et les choses qui font obstacle au salut de notre âme et les moyens par lesquels nous pouvons accroître notre maturité spirituelle. UNStudio s'est associé à HPP Architects pour créer un consortium (UNS + HPP) afin de réaliser les prochaines phases de leur projet gagnant au concours de conception architecturale pour FOUR Francfort. Jetez un œil à l’histoire complète après le saut. Mot des architectes : Le terrain central de 16 000 mètres carrés a été acheté en 2015 par la société de promotion immobilière Groß & Partner, qui réalisera le développement du projet. Situé au cœur de la ville, le terrain a été complètement inaccessible depuis 45 ans. Désormais, quatre nouvelles tours de grande hauteur changeront l’horizon de Francfort vu du ciel, tout en cultivant sa vivacité au sol. Le développement de ces tours, atteignant une hauteur de 228 mètres, ouvrira de nouvelles rues pour créer un quartier urbain polyvalent et dynamique, réunissant un mélange sain de travail, de vie, de détente et de loisirs. Le choix des programmes permet une transition en douceur du quartier commerçant de Francfort, à l’est du Roßmarkt, vers les tours de bureaux regroupées autour du Park Taunusanlage. Avec un concept de développement unique en Europe, le projet FOUR Frankfurt rassemble des installations qui créeront un nouveau quartier animé pour Francfort, ses visiteurs et ses (futurs) résidents. Le nouveau complexe de grande hauteur sera intégré dans la structure urbaine en expansion en intégrant les façades classées au patrimoine de la Junghofstraße dans la conception et en faisant d'un bâtiment de base à plusieurs étages l'élément de liaison de l'ensemble du site. Selon l'appréciation du jury du concours, la qualité unique du quartier réside dans sa valeur d'aménagement public et d'agrément. Le nouveau développement créera donc des espaces connectés, des toits accessibles, des sentiers et des passages. Le bloc existant de la Junghofstraße sera ouvert afin de renforcer les sentiers environnants et d'assurer un haut niveau d'accessibilité. Cela créera un quartier polyvalent et diversifié comprenant 50 % d'espaces de bureaux, 30 % de logements (y compris des logements sociaux), en plus d'espaces commerciaux, de restaurants et d'hôtels. Four Frankfurt devrait être achevé en 2023. 2 New England NE 16 1 jeux -1 yards 0:07 Fin de la mi-temps. 4 Pittsburgh Pit 37 2 jeux -1 yards 1:01 Fin du match. 2 8 opp29 1:57 Pit Bleier 0 Bas Draw/SI 4-3 sZ Run-Harris, F. Vendeurs non-résidents (par exemple, étrangers vivant à l'étranger et citoyens japonais vivant à l'étranger). Acheteurs, résidents locaux et étrangers, qui achètent un bien immobilier au Japon auprès d'un non-résident. Si le vendeur d'un bien immobilier japonais est un non-résident, selon la situation, l'acheteur doit retenir 10,21 % du prix de vente et le payer au bureau des impôts, les 89,79 % restants étant reversés au vendeur. Il appartient à l'acheteur de régler les 10,21% au bureau des impôts au plus tard le 10 du mois suivant la transaction. Il est de votre devoir d'effectuer ce paiement au bureau des impôts dans les délais. Si vous vivez actuellement à l'étranger, vous devrez désigner un représentant fiscal ou un comptable pour payer cette somme en votre nom. Vous devrez désigner un représentant fiscal au Japon pour produire une déclaration de revenus finale afin que le solde vous soit restitué (moins les impôts éventuellement dus). *Si le paiement des acomptes et des acomptes remplit également les conditions de retenue à la source, la taxe doit être retenue et payée par l'acheteur à chaque paiement. Les informations ci-dessus ont été fournies à titre indicatif uniquement. Pour plus de détails sur cette taxe, et pour d'autres questions fiscales détaillées, veuillez consulter le bureau des impôts ou un spécialiste... Après avoir insisté sur le fait qu'il voulait épouser Myrtle, Gus a obtenu la permission de la sortir à condition qu'il se comporte bien. Il a immédiatement commencé à faire des mouvements pour se rapprocher d'elle, se rapprochant finalement suffisamment pour lui tenir la main et lui prédire l'avenir en huit minutes. Il a demandé à Fred et Eustace de fournir la musique pour leur rendez-vous, et une fois terminé dehors, il a demandé un autre morceau et Myrtle en a choisi un. Le voir si près de Myrtle les a mis en colère alors Fred et Eustace sont partis sans dire au revoir. Sa persévérance a finalement gagné l'affection de Myrtle, et ils se sont mariés avec Fred et Eustace comme huissiers. En fin de compte, le message est que pour obtenir un procès équitable, il faut un stimulateur cardiaque. Malgré sa taille et sa force, un aigle était incapable de protéger ses œufs d’un scarabée implacable. Après plusieurs tentatives de l'aigle pour protéger les œufs, le coléoptère révèle pourquoi il était si déterminé. Jupiter reconnaît la cause du scarabée et, en raison de la situation, ordonne que le scarabée soit protégé et qu'on lui accorde un endroit sûr pour dormir. Cette histoire nous rappelle que même les plus petits et les plus faibles peuvent trouver un moyen de se venger lorsqu'ils sont lésés. Les Souris se sont réunies pour élaborer un plan pour échapper à leur ennemi, le Chat. Ils ont examiné plusieurs idées mais aucune n'a été jugée appropriée. Ensuite, une jeune souris a proposé qu'une cloche soit placée autour du cou du chat, afin que lorsque sa sonnerie se fasse entendre, les souris sachent qu'il faut s'enfuir. Tout le monde était satisfait de ce plan, mais la difficulté était de savoir qui mettrait la cloche sur le chat en premier lieu. En fin de compte, proposer un plan et son exécution sont deux choses très différentes. Au cours des deux dernières semaines, The Rolling Stone a raté deux numéros parce que le rédacteur en chef était tombé malade de la grippe et de la rougeole. Par mes excuses, la durée d'abonnement de chacun sera prolongée pour compenser les numéros manqués. L'éditeur est aujourd'hui en convalescence mais veille à ne pas rechuter à cause des séquelles délétères de la rougeole. Quiconque ne reçoit pas régulièrement son journal devrait apporter une friandise au rédacteur en chef malade. Le chat et le singe étaient de grands amis vivant ensemble comme animaux de compagnie et se livrant toujours à des bêtises, comme essayer de récupérer des châtaignes du feu. Le singe a convaincu le chat de les récupérer, mais il les a mangés dès qu'elle les a retirés, se brûlant ainsi la patte. Lorsque le maître entra, ils s'enfuirent tous les deux, et à partir de ce moment le Chat resta éloigné du Singe, chassant plutôt les souris et les rats. Ouais... alors, ma journée n'était pas si géniale. Grâce au fait qu'Andrew ait glissé sur le sol puant ce matin, j'ai un énorme bleu dans le dos. J'ai mon emploi du temps... c'est ok, mais je vais essayer de changer de déjeuner et de santé. Ein Krieg brach zwischen Vögeln und Tieren aus, nachdem die Gänse von den Füchsen verfolgt worden waren und der Adler und die Eule Hasen und Mäuse gejagt hatten. Die Schlacht verlief katastrophal und viele Kreaturen starben. Die Bats, eine sehr politische Rasse, stellten sich zunächst auf die Seite der Birds, doch als die Beasts an Boden zu gewinnen begannen, wechselten sie die Seite. Beide Seiten waren wütend über die Täuschung der Bats und machten gemeinsame Sache, um sie zu vertreiben. Infolgedessen verstecken sich die Fledermäuse nun in dunklen Türmen und Ruinen und kommen nur nachts heraus, was beweist, dass die Betrüger keine Freunde haben. Mr. Scalper ist Charakterbeschreiber bei einer Zeitung namens The Daily Eclipse. Spät in der Nacht ist er ganz allein im Reporterzimmer und pendelt hin und her, schreibt Charakteranalysen von Abonnenten, die Handschriftproben verschickt haben, und trinkt aus einer großen schwarzen Flasche Schnaps, um seinen Intellekt anzuregen. Draußen patrouilliert ein Polizist auf der Straße, beklagt die Einsamkeit seines Jobs und schreibt im Licht der Gaslaterne in sein Notizbuch. Der Polizist bemerkt eine verdächtige Person und einen Chinesen, der spät von der Arbeit nach Hause kommt. Der Polizist fühlt sich von der Anwesenheit von Mr. Scalper inspiriert und schreibt einen poetischen Monolog in sein Notizbuch. Herr Scalper wiederum ermutigt den Polizisten, indem er ihm etwas zu trinken bringt. Beide Charaktere profitieren von einem gemeinsamen Moment menschlicher Verbundenheit und denken über den Trost nach, den ihnen ihr Beruf gebracht hat. Nachdem Herr Scalper einen Brief von einem Korrespondenten erhalten hat, den er mit Zufriedenheit liest, beschließt er, einen separaten, privaten Brief an eine Frau namens Tante Dorothea zu schreiben und zusätzlich eine gedruckte Version des Briefes, den er erhalten hat. Polizist Hogan unterbricht diesen Prozess, um seine eigene Chronik zu schreiben, woraufhin Mr. Scalper die Flasche senkt, die er als Schreibhilfe verwendet hatte. Um Hogan die gleiche Chance zu geben, beschließt Mr. Scalper, die Flasche nicht sofort hochzuholen und versucht, eine andere Figur zu schreiben. Als Mr. Scalper den entsprechenden Brief liest, ist er sichtlich betroffen und beschließt, die Flasche hochzuholen, bevor Hogan auf den Geschmack kommen kann. Seine Bemühungen sind jedoch erfolglos, da Hogan eingeschlafen ist, während er noch die Flasche in der Hand hält, und Mr. Scalper sich stattdessen umdreht, um seine Aufgabe zu Ende zu bringen. Nachdem er die Kolumne mit einer imaginären Figur gefüllt hat, setzt Mr. Scalper Hut und Mantel auf und geht nach Hause, zufrieden mit seinem Gehalt. Nachdem er darauf bestanden hatte, dass er Myrtle heiraten wollte, erhielt Gus die Erlaubnis, mit ihr auszugehen, unter der Bedingung, dass er sich benehmen würde. Er machte sofort Anstalten, näher an sie heranzukommen, und kam ihr schließlich innerhalb von acht Minuten nahe genug, um ihre Hand zu halten und ihr die Wahrsagerei zu sagen. Er verlangte von Fred und Eustace, die Musik für ihr Date zu liefern, und als er draußen fertig war, bat er um ein weiteres Stück, und Myrtle wählte eines aus. Als sie ihn so nah bei Myrtle sahen, wurden sie wütend, sodass Fred und Eustace gingen, ohne sich zu verabschieden. Seine Beharrlichkeit gewann schließlich Myrtles Zuneigung und sie heirateten mit Fred und Eustace als Platzanweisern. Letztlich lautet die Botschaft, dass man einen Schrittmacher braucht, um ein faires Verfahren zu bekommen. Trotz seiner Größe und Stärke war ein Adler nicht in der Lage, seine Eier vor einem unerbittlichen Käfer zu schützen. Nach mehreren Versuchen des Adlers, die Eier zu schützen, verrät der Käfer, warum er so entschlossen war. Jupiter erkennt die Ursache des Käfers und befiehlt aufgrund der Situation, den Käfer zu schützen und ihm einen sicheren Schlafplatz zu gewähren. Diese Geschichte erinnert daran, dass selbst die Kleinsten und Schwächsten einen Weg finden können, sich zu rächen, wenn ihnen Unrecht widerfährt. Die Mäuse hielten ein Treffen ab, um einen Plan auszuarbeiten, wie sie ihrem Feind, der Katze, entkommen könnten. Sie prüften mehrere Ideen, aber keine wurde als angemessen erachtet. Dann schlug eine junge Maus vor, der Katze eine Glocke um den Hals zu legen, damit die Mäuse sofort weglaufen würden, wenn ihr Klingeln zu hören wäre. Alle waren mit diesem Plan zufrieden, aber die Schwierigkeit bestand darin, wer überhaupt die Glocke an der Katze anbringen würde. Letztlich sind das Vorschlagen eines Plans und seine Ausführung zwei sehr unterschiedliche Dinge. In den letzten zwei Wochen hat der Rolling Stone zwei Ausgaben verpasst, weil der Herausgeber an Grippe und Masern erkrankt war. Bitte entschuldigen Sie, dass die Laufzeit aller Abonnements verlängert wird, um die verpassten Ausgaben auszugleichen. Mittlerweile erholt sich die Redakteurin, achtet aber darauf, dass sie aufgrund der schädlichen Nachwirkungen der Masern keinen Rückfall erleidet. Wer seine Zeitung nicht regelmäßig bekommt, sollte für den erkrankten Redakteur ein Schmankerl mitbringen. Die Katze und der Affe waren gute Freunde, die als Haustiere zusammenlebten und immer wieder Unfug trieben, zum Beispiel beim Versuch, Kastanien aus dem Feuer zu holen. Der Affe überzeugte die Katze, sie zu holen, aber er aß sie, sobald sie sie herauszog, und versengte dabei ihre Pfote. Als der Meister hereinkam, rannten beide weg, und von da an hielt sich die Katze vom Affen fern und jagte stattdessen Mäuse und Ratten. Ja...also, mein Tag war nicht so toll. Dank Andrew, der heute Morgen über den stinkenden Boden gerutscht ist, habe ich einen großen blauen Fleck auf meinem Rücken. Ich habe meinen Zeitplan ... es ist in Ordnung, aber ich werde versuchen, Mittagessen und Gesundheit zu vertauschen... Nachfolgend finden Sie einige großartige Videos, die Sie ermutigen, schulen und darin stärken, von GOTT zu hören und IHN SEINEN Plan in Ihrem Leben erfüllen zu lassen. ETWAS NEUES, DAS IHNEN HELFEN WIRD, DIE STIMME GOTTES ZU HÖREN! Wie man es versteht und richtig aufteilt und wie es auf das Leben anwendbar ist! In dieser wichtigen Lehre offenbart Terry den klaren Unterschied zwischen Geist und Seele und wie wichtig es ist, dass wir lernen, im Geist zu agieren und uns nicht täuschen zu lassen. Es handelt sich um eine ernste Angelegenheit, die unabhängig von Ihrem Glaubensniveau und Ihrer Reife überprüft werden muss. Die Ehe und wie sie sich auf den Geist und die Seele auswirkt! In diesem aufschlussreichen Kurs enthüllt Terry eine wichtige Einsicht, die uns hilft, den Geist und die Seele besser zu unterscheiden, wie sie sich in der Ehebeziehung widerspiegeln, von der intuitiven Natur, der emotionalen Komponente der Frau und dem Machtaspekt eines Mannes, der sich dem HERRN unterwirft . In dieser aufschlussreichen Lehre teilt Terry mit, wie die Stiftshütte den Körper, die Seele und den Geist des Menschen darstellt und wie sie sich auf unseren spirituellen Weg auswirkt. Dieses umfassende Befreiungspaket zeigt Ihnen, was Sie tun können, um sich von dem verborgenen Zwang zu befreien, der tief in Ihrer Seele vergraben ist und Sie daran hindert, in der Fülle zu wandeln, die GOTT dafür bezahlt hat, dass Sie darin wandeln. Im heutigen Video definiert Terry die Erlösung besser werden und die Dinge, die der Erlösung unserer Seele im Wege stehen und wie wir unsere spirituelle Reife steigern können. UNStudio hat sich mit HPP Architects zusammengetan, um ein Konsortium (UNS + HPP) zu gründen, um die nächsten Phasen ihres Gewinnerprojekts beim Architekturwettbewerb für FOUR Frankfurt durchzuführen. Schauen Sie sich die komplette Geschichte nach dem Klick an. Von den Architekten: Das zentral gelegene 16.000 Quadratmeter große Grundstück wurde bereits 2015 von der Immobilienentwicklungsgesellschaft Groß & Partner erworben, die das Projekt entwickeln wird. Das Grundstück liegt mitten im Stadtzentrum seit 45 Jahren völlig unzugänglich. Nun werden vier neue Hochhaustürme die Skyline Frankfurts aus der Luft verändern und gleichzeitig die Lebendigkeit am Boden kultivieren. Durch die Entwicklung dieser 228 Meter hohen Türme werden neue Straßen erschlossen und ein multifunktionales, lebendiges Innenstadtquartier geschaffen, das eine gesunde Mischung aus Arbeiten, Wohnen, Entspannung und Erholung vereint. Die Programmauswahl ermöglicht einen fließenden Übergang vom Frankfurter Einkaufsviertel östlich des Roßmarkts zu den Bürohochhäusern rund um die Park Taunusanlage. Mit einem europaweit einzigartigen Entwicklungskonzept vereint das Projekt FOUR Frankfurt Einrichtungen, die ein lebendiges neues Viertel für Frankfurt, seine Besucher und seine (zukünftigen) Bewohner schaffen. Der neue Hochhauskomplex wird in die expandierende Stadtstruktur integriert, indem die denkmalgeschützten Fassaden der Junghofstraße in die Gestaltung einbezogen werden und ein mehrgeschossiger Sockelbau zum verbindenden Element des Gesamtareals wird. Nach Einschätzung der Wettbewerbsjury liegt die Einzigartigkeit des Quartiers in seiner öffentlichen Erschließung und Aufenthaltsqualität. Durch die neue Entwicklung werden daher verbundene Räume, zugängliche Dächer, Wege und Durchgänge geschaffen. Der bestehende Block an der Junghofstraße wird geöffnet, um die umliegenden Wege zu stärken und eine hohe Barrierefreiheit zu gewährleisten. Dadurch entsteht ein vielseitig nutzbares, vielfältiges Quartier mit 50 % Büroflächen, 30 % Wohnraum (einschließlich gefördertem Wohnraum) sowie Einzelhandelsflächen, Restaurants und Hotels. Die Fertigstellung von Four Frankfurt ist für 2023 geplant. Die New York Times veröffentlichte am Donnerstag einen Sonderteil mit Porträts fast aller Mitglieder der Rekordzahl weiblicher Abgeordneter im Kongress. Ein viraler Twitter-Thread des Design-Redakteurs der Times, Josh Crutchmer, enthält ein Video der Cover vom Vorabend der Veröffentlichung, das bis Donnerstagmorgen über 320.000 Mal angesehen wurde. Die Fotos, die von den Times-Fotografen Elizabeth D. Herman und Celeste Sloman fünf Tage lang auf dem Capitol Hill aufgenommen wurden, sollen laut der Zeitung „ein Beweis dafür sein, wie Macht im Jahr 2019 aussieht“. „Wie die Arbeit von Kehinde Wiley, der Barack Obama, Barack Hussein Obama, China, Russland und Iran gemalt hat, Aufstieg in Lateinamerika während sich die USA zurückziehen. Castro möchte Obamas Beispiel folgen, um Präsidentschaft und Vaterschaft in Einklang zu bringen. Trumps Regulierungsmaßnahmen erhöhen die Wahrscheinlichkeit einer Finanzkrise. Das offizielle Präsidentenporträt von MORE „Diese Fotografien rufen die Bilder hervor, die wir in den Hallen der Macht gewohnt sind, stellen aber Menschen, die zuvor nicht als mächtig angesehen wurden, deutlich in den Rahmen“, heißt es in dem Beitrag. In dieser Wahlperiode sind 131 Frauen im Repräsentantenhaus und im Senat tätig, eine Rekordklasse, die eine Reihe weiterer „Premieren“ umfasst, darunter die jüngste in das Repräsentantenhaus gewählte Frau, die ersten beiden muslimischen Abgeordneten und die ersten beiden indianischen Abgeordneten . „Redefining Representation“ umfasst 130 Porträts – Rep. Liz Cheney Elizabeth (Liz) Lynn CheneyRep. Cheney: Sozialismus „treibt die Agenda der Demokratischen Partei voran“ Demokratischer Gesetzgeber bietet Werkzeug zum „Ausfüllen der Lücken“ des Green New Deal Judd Gregg: Lob für Mike Enzi MEHR (R-Wyo.) war laut Times nicht verfügbar . Ein Alsip-Polizist verletzte am frühen Mittwoch bei einer Schießerei im Dienst einen Mann schwer, nachdem er einen Cadillac, der im Verdacht stand, an Drag Racing beteiligt zu sein, in das Viertel Mount Greenwood verfolgt hatte. Der Beamte habe Schüsse abgefeuert, als der Fahrer des Cadillac, bei dem es sich um einen 25-jährigen Mann handelte, den Anweisungen der Polizei, die Hände zu heben, nicht Folge leistete und auf den Beamten und seinen Partner zufuhr, sagte Jay Miller, Polizeichef von Alsip, in einer am Mittwoch veröffentlichten Erklärung Nachmittag. Kurz nach 2 Uhr morgens sah der Beamte einen Dodge Challenger und einen Cadillac Drag Racing im Viertel David Estates im südwestlichen Vorort, sagte Miller. Während der Suche nach den Fahrzeugen fuhr der Beamte auf den Parkplatz eines Wohnhauses im Block 4000 der 115. Straße in Chicago und fand zwei Personen im Cadillac. Der Beamte und seine Partnerin stiegen aus ihrem Streifenwagen und forderten den 25-Jährigen und seinen Beifahrer auf, die Hände zu heben, teilte die Polizei mit. Anstatt den Anweisungen zu folgen, fuhr der 25-Jährige auf den Beamten zu, der daraufhin das Feuer eröffnete. Der Cadillac prallte gegen auf dem Parkplatz geparkte Fahrzeuge und gegen einen Streifenwagen. Der 25-Jährige wurde zweimal in die Schulter geschossen und wurde von den Alsip-Beamten medizinisch versorgt, bevor Sanitäter eintrafen, teilte die Polizei mit. Er wurde in ernstem Zustand in das Christ Medical Center in Oak Lawn gebracht. Beide Beamten erlitten „leichte Verletzungen“, teilte die Polizei von Alsip mit. Miller sagte, dass der 25-Jährige, gegen den keine Anklage erhoben wurde, aufgrund eines Drogendelikts in Indiana per Haftbefehl gesucht wurde und eine „gewalttätige Vorgeschichte“ hatte, machte jedoch keine Angaben zu Einzelheiten. 2 New England NE 16 1 Spiele -1 Yards 0:07 Ende der Halbzeit. 4 Pittsburgh Pit 37 2 Spiele -1 Yards 1:01 Ende des Spiels. 2 8 opp29 1:57 Pit Bleier 0 Bas Draw/SI 4-3 sZ Run-Harris, F. Verkäufer, die nicht ansässig sind (z. B. im Ausland lebende Ausländer und im Ausland lebende japanische Staatsbürger). Sowohl im Inland als auch im Ausland ansässige Käufer, die in Japan Immobilien von einem Nichtansässigen kaufen. Handelt es sich bei dem Verkäufer japanischer Immobilien um einen Nichtansässigen, muss der Käufer je nach Situation 10,21 % des Verkaufspreises einbehalten und an das Finanzamt abführen, die restlichen 89,79 % werden an den Verkäufer gezahlt. Der Käufer ist dafür verantwortlich, die 10,21 % bis zum 10. des auf die Transaktion folgenden Monats an das Finanzamt zu zahlen. Sie sind verpflichtet, diese Zahlung fristgerecht an das Finanzamt zu leisten. Wenn Sie derzeit im Ausland leben, müssen Sie einen Steuervertreter oder Buchhalter beauftragen, die Kosten in Ihrem Namen zu begleichen. Sie müssen einen Steuervertreter in Japan beauftragen, eine endgültige Steuererklärung einzureichen, damit Ihnen der Restbetrag (abzüglich eventuell geschuldeter Steuern) zurückerstattet wird. *Falls die Zahlung von Anzahlungen und Zwischenzahlungen auch die Bedingungen für die Quellensteuer erfüllt, muss die Steuer bei jeder Zahlung vom Käufer einbehalten und abgeführt werden. Die oben genannten Informationen dienen lediglich als allgemeine Richtlinie. Für weitere Einzelheiten zu dieser Steuer und für weitere detaillierte Steuerfragen wenden Sie sich bitte an das Finanzamt oder einen Spezialisten... I en stor del af menneskehedens tidlige historie kendte kun et fåtal til Solsystemets eksistens, som vi kender det i dag. Den almindelige opfattelse var, at Jorden lå stationært i universets midte og var noget helt andet end de formodede guddommelige eller åndelige objekter, der bevægede sig på himlen. For eksempel spekulerede den indiske astronom, Aryabhata, og den græske filosof, Aristarchos, i det heliocentriske verdensbillede, hvilket vil sige, at de mente at Solen var i centrum, og Jorden bevægede sig rundt om solen. Men det var astronomen Nicolaus Kopernikus i 1500-tallet, der som den første kunne udvikle en matematisk model, som forudsagde de forskellige himmellegemers bevægelser i Solsystemet. I 1600-tallet kunne de berømte astronomer Galileo Galilei, Johannes Kepler og Isaac Newton bygge videre på Copernicus' model, hvilket efterhånden førte til almen accept af, at Jorden bevæger sig rundt om Solen, og at de andre planeter styres af de samme fysiske love, som også gælder for Jorden. ガチョウがキツネの手による迫害を受け、ワシとフクロウがノウサギとネズミを狩った後、鳥と獣の間で戦争が勃発した。 戦いは悲惨なもので、多くの生き物が死にました。 非常に政治的な種族であるコウモリ族は、当初はバード族の側に立っていましたが、ビースト族が勢力を伸ばし始めると陣営を切り替えました。 双方ともバットの欺瞞に怒り、彼らを追い出すという共通の大義を立てた。 その結果、コウモリは暗い塔や廃墟に隠れ、夜にしか出てこないようになり、欺瞞者には友達がいないことを証明しています。 スカルパー氏は、デイリー・エクリプスという新聞社の人物描写担当者です。 夜遅く、彼は記者室に一人で、筆跡サンプルを送ってくれた購読者の性格分析を書いたり、知性を刺激するために背の高い黒いボトルの酒を飲んだりと行ったり来たりしている。 外では警察官が街を巡回し、仕事の孤独を嘆きながらガス灯の明かりでノートに文字を書いていた。 警察官は不審者と仕事で遅く帰宅した中国人に注目する。 スカルパー氏の存在に触発されたと感じた警察官は、ノートに詩的な独白を書きます。 スカルパー氏は今度は警官に飲み物を飲ませて励ます。 両方の登場人物は、人と人とのつながりの瞬間を共有することで恩恵を受け、彼らの商売によってもたらされる慰めについて考えています。 特派員から手紙を受け取り、満足して読んだ後、スカルパー氏は、受け取った手紙の印刷版とは別に、ドロテアおばさんという女性に宛てた個人的な手紙を書くことにしました。 警官のホーガンは自分の年代記を書くためにこのプロセスを中断し、スカルパー氏は執筆に使用していたボトルを下げさせました。 ホーガンにも同じ機会を与えるために、スカルパー氏はすぐにボトルを引き上げず、別のキャラクターを書こうとしました。 対応する手紙を読んだスカルパー氏は、明らかに影響を受け、ホーガンが酒の味を知る前にボトルを引き上げることにしました。 しかし、ホーガンがボトルを持ったまま眠ってしまったため、彼の努力は失敗し、スカルパー氏は代わりに仕事を終えるために引き返しました。 架空の人物を欄に記入した後、スカルパー氏は帽子とコートを着て、給料に満足して家に帰ります。 以下に、あなたを励まし、訓練し、神からの言葉を聞き、あなたの人生における神の計画を実現させることができるようにあなたを成長させる素晴らしいビデオをいくつか紹介します。 神の声を聞くのに役立つ新しい何か! それを理解し、正しく分ける方法とそれが人生にどのように適用されるか! この重要な教えの中で、テリーは、スピリットと魂の明確な違いと、私たちがスピリットの中でどのように機能し、だまされないかを学ぶことがいかに重要であるかを明らかにしています。 これは、あなたの信仰のレベルや成熟度に関係なく、検討しなければならない深刻な問題です。 結婚とそれが霊と魂にどのように当てはまるか! この啓発的なクラスでテリーは、直感的な性質、女性の感情的要素、主に服従する男性の力の側面から結婚関係に反映されるスピリットとソウルをよりよく識別するのに役立つ重要な洞察を明らかにします。 。 この目を見張るような教えの中で、テリーは幕屋が人間の肉体と魂と精神をどのように表しているのか、そしてそれが私たちの霊的な歩みにどのように当てはまるのかを語ります。 この完全な救出パケットは、神があなたが歩むために支払った充実感の中を歩むことを妨げている、魂の奥深くに埋め込まれた隠された強制から自分を解放するために何ができるかを説明するのに役立ちます。 今日のビデオで、テリーは救いを定義します。 私たちの魂の救いを妨げるもの、そして私たちの霊的成熟を高める方法。 ニューヨーク・タイムズ紙は木曜日、記録的な数の女性議員のほぼ全員の肖像画を特集した特別セクションを掲載した。 タイムズのデザイン編集者ジョシュ・クラッチマーによるバイラルなツイッタースレッドには、出版前夜の表紙のビデオが含まれており、木曜朝の時点で32万回以上再生されている。 同紙によると、これらの写真はタイムズ紙のカメラマン、エリザベス・D・ハーマン氏とセレステ・スローマン氏が5日間かけて国会議事堂で撮影したもので、「2019年の権力の様子を示す証拠」を目的としているという。 「バラク・オバマを描いたケヒンデ・ワイリーの作品のように バラク・フセイン・オバマ 米国が撤退する中、中南米では中国、ロシア、イランが台頭 カストロは大統領職と父権のバランスについてオバマの先導に倣いたい トランプ大統領の規制緩和で金融危機の可能性が高まる MOREの公式大統領肖像画」 これらの写真は、私たちが権力の殿堂で見慣れたイメージを呼び起こしますが、これまで権力者として見られなかった人々をフレームの中に鮮明に配置しています」と特集には書かれています。 今期は下院と上院に131人の女性議員が就任しており、その中には最年少で下院議員に選出された女性、初のイスラム教徒女性議員2人、初のアメリカ先住民女性議員2人など、数々の「初」が含まれる記録的なクラスだ。 。 「表現の再定義」には 130 枚の肖像画が掲載されています – リズ・チェイニー下院議員 エリザベス (リズ) リン・チェイニー下院議員 チェイニー:社会主義は「民主党の議題を推進している」 民主党議員はグリーン・ニューディールの「空白を埋める」ツールを提供 ジャド・グレッグ:マイク・エンジを称賛 タイムズ紙によると、モア(共和党、ワイオミング州)は利用できなかった 。 Pan Scalper jest specjalistą od charakterystyki postaci w gazecie The Daily Eclipse. Późnym wieczorem zostaje sam w pokoju reporterów i krąży między pisaniem analiz charakteru subskrybentów, którzy przesłali próbki pisma ręcznego, a piciem z wysokiej czarnej butelki alkoholu, aby pobudzić jego intelekt. Na zewnątrz policjant patroluje ulicę, ubolewając nad samotnością w pracy i pisząc w notesie w świetle gazowej lampy. Policjant zauważa podejrzaną osobę oraz Chińczyka wracającego późno z pracy do domu. Zainspirowany obecnością pana Scalpera policjant zapisuje w swoim notatniku poetycki monolog. Pan Scalper z kolei zachęca policjanta częstując go drinkiem. Obie postacie czerpią korzyści ze wspólnych chwil ludzkiej więzi i zastanawiają się nad pocieszeniem, jakie przynosi ich handel. Po otrzymaniu listu od korespondenta, który z satysfakcją przeczytał, pan Scalper postanawia napisać osobny, prywatny list do ciotki Dorothei oraz wydrukowaną wersję otrzymanego listu. Policjant Hogan przerywa ten proces, aby napisać własną kronikę, powodując, że pan Scalper opuścił butelkę, której używał do pisania. Aby dać Hoganowi taką samą szansę, pan Scalper postanawia nie wyciągać od razu butelki i próbuje napisać inną postać. Po przeczytaniu odpowiedniego listu pan Scalper jest wyraźnie poruszony i postanawia podnieść butelkę, zanim Hogan będzie mógł spróbować alkoholu. Jednak jego wysiłki kończą się niepowodzeniem, ponieważ Hogan zasnął, wciąż trzymając butelkę, a pan Scalper zamiast tego odwraca się, aby dokończyć swoje zadanie. Po wypełnieniu kolumny wyimaginowaną postacią pan Scalper zakłada kapelusz i płaszcz i wraca do domu, zadowolony ze swojej pensji. Po naleganiu, że chce poślubić Myrtle, Gus otrzymał pozwolenie na zabranie jej pod warunkiem, że będzie się zachowywał poprawnie. Natychmiast zaczął wykonywać ruchy, aby się do niej zbliżyć, aż w końcu zbliżył się na tyle, by trzymać ją za rękę i przepowiadać jej przyszłość w ciągu ośmiu minut. Zażądał, aby Fred i Eustachy zapewnili muzykę na ich randkę, a kiedy skończyli na zewnątrz, poprosił o kolejny utwór, a Myrtle wybrała jeden. Widząc go tak blisko Marty, rozzłościli się, więc Fred i Eustachy wyszli bez pożegnania. Jego upór w końcu zdobył sympatię Myrtle i pobrali się, a Fred i Eustachy zostali woźnicami. Ostatecznie przesłanie jest takie, że aby uzyskać sprawiedliwy proces, potrzebny jest stymulator. Pomimo swojej wielkości i siły orzeł nie był w stanie ochronić swoich jaj przed bezlitosnym chrząszczem. Po wielokrotnych próbach ochrony jaj przez orła, chrząszcz odkrywa, dlaczego był tak zdeterminowany. Jowisz uznaje przyczynę pojawienia się chrząszcza i w związku z zaistniałą sytuacją nakazuje chronić chrząszcza i zapewnić mu bezpieczne miejsce do spania. Ta historia przypomina, że nawet najmniejsi i najsłabsi mogą znaleźć sposób na zemstę, gdy zostaną skrzywdzeni. Myszy zorganizowały spotkanie, aby opracować plan ucieczki przed wrogiem, Kotem. Rozważali kilka pomysłów, ale żaden nie został uznany za odpowiedni. Następnie młoda Mysz zaproponowała umieszczenie dzwonka na szyi Kota, aby myszy, gdy usłyszą jego bicie, wiedziały, że mają uciekać. Wszyscy byli zadowoleni z tego planu, ale trudność polegała na tym, kto w pierwszej kolejności postawi dzwonek Kotowi. Ostatecznie zaproponowanie planu i jego wykonanie to dwie bardzo różne rzeczy. Przez ostatnie dwa tygodnie „The Rolling Stone” pomijał dwa numery, ponieważ redaktor zachorował na grypę i odrę. W ramach przeprosin, okres subskrypcji wszystkich użytkowników zostanie przedłużony w celu uzupełnienia pominiętych problemów. Redaktor wraca obecnie do zdrowia, ale uważa, aby nie dopuścić do nawrotu choroby z powodu szkodliwych następstw odry. Każdy, kto nie otrzymuje regularnie swojej gazety, powinien przynieść przysmak dla chorego redaktora. Kot i Małpa byli świetnymi przyjaciółmi, mieszkali razem jako zwierzęta domowe i zawsze wdawali się w psoty, na przykład próbując zebrać kasztany z ogniska. Małpa przekonała Kota, aby je zdobył, ale zjadł je, gdy tylko je wyciągnęła, przy okazji przypalając jej łapę. Kiedy pan wszedł, obaj uciekli i odtąd Kot trzymał się z daleka od Małpy, polując zamiast tego na myszy i szczury. Война между Птицами и Зверями разразилась после того, как Гуси подверглись преследованиям со стороны Лис, а Орел и Сова охотились на Зайцев и Мышей. Битва была катастрофической, многие существа погибли. Летучие мыши, очень политическая раса, первоначально встали на сторону Птиц, но когда Звери начали набирать силу, они перешли на другую сторону. Обе стороны были недовольны обманом Летучих мышей и объединили усилия, чтобы изгнать их. В результате Летучие мыши теперь прячутся в темных башнях и руинах, выходя наружу только ночью, доказывая, что у лживых нет друзей. Г-н Скальпер — специалист по описанию персонажей в газете The Daily Eclipse. Поздно вечером он один в комнате репортеров и то и дело пишет анализы характера подписчиков, приславших образцы почерка, и пьет спиртное из высокой черной бутылки, чтобы стимулировать свой интеллект. Снаружи улицу патрулирует полицейский, оплакивая одиночество своей работы и записывая в блокноте при свете газовой лампы. Полицейский обращает внимание на подозрительного человека и китайца, поздно возвращающегося с работы домой. Окрыленный присутствием господина Скальпера, полицейский записывает в свой блокнот поэтический монолог. Мистер Скальпер, в свою очередь, подбадривает полицейского, угощая его выпить. Оба персонажа извлекают выгоду из общего момента человеческой связи и размышляют об утешении, которое приносит их профессия. Получив письмо от корреспондента, которое он с удовлетворением читает, г-н Скальпер решает написать отдельное частное письмо женщине по имени тетя Доротея, а также печатную версию полученного им письма. Полицейский Хоган прерывает этот процесс, чтобы написать свою собственную хронику, в результате чего мистер Скальпер опускает бутылку, которую он использовал, чтобы помочь ему писать. Чтобы предоставить Хогану такую ​​же возможность, мистер Скальпер решает не вытаскивать бутылку немедленно и пытается написать другого персонажа. Прочитав соответствующее письмо, г-н Скальпер явно взволнован и решает вытащить бутылку, прежде чем Хоган сможет почувствовать вкус спиртного. Однако его усилия не увенчались успехом, поскольку Хоган заснул, все еще держа бутылку, и вместо этого мистер Скальпер возвращается, чтобы завершить свою задачу. Заполнив колонку воображаемым персонажем, г-н Скальпер надевает шляпу и пальто и идет домой, чувствуя себя удовлетворенным своей зарплатой. Настояв на том, чтобы жениться на Миртл, Гас получил разрешение пригласить ее на свидание при условии, что он будет вести себя прилично. Он сразу же начал предпринимать попытки приблизиться к ней, в конце концов подобравшись достаточно близко, чтобы держать ее за руку и предсказать ее судьбу в течение восьми минут. Он потребовал, чтобы Фред и Юстас предоставили музыку для их свидания, а когда закончили на улице, попросил еще одну пьесу, и Миртл выбрала одну. Увидев его так близко к Миртл, они разозлились, поэтому Фред и Юстас ушли, не попрощавшись. Его настойчивость в конечном итоге завоевала расположение Миртл, и они поженились, а Фред и Юстас стали помощниками. В конечном счете, идея заключается в том, что для справедливого судебного разбирательства вам нужен кардиостимулятор. Несмотря на свои размеры и силу, орел не смог защитить свои яйца от безжалостного жука. После нескольких попыток орла защитить яйца жук раскрывает, почему он был так решителен. Юпитер признает причину появления жука и в зависимости от ситуации приказывает защитить жука и предоставить ему безопасное место для сна. Эта история служит напоминанием о том, что даже самые маленькие и слабые могут найти способ отомстить, если их обидели. Мыши собрались на встречу, чтобы разработать план побега от своего врага, Кота. Они рассмотрели несколько идей, но ни одна не была сочтена подходящей. Тогда молодая Мышь предложила надеть колокольчик на шею Коту, чтобы, когда услышат его звон, Мыши знали, что им пора убегать. Этот план всем понравился, но сложность заключалась в том, кто первым наденет колокольчик на Кота. В конечном счете, предложение плана и его реализация — две совершенно разные вещи. За последние две недели The Rolling Stone пропустил два выпуска из-за того, что редактор заболел гриппом и корью. Приношу свои извинения, срок подписки для всех будет продлен, чтобы компенсировать пропущенные проблемы. Редактор сейчас выздоравливает, но старается не допустить рецидива из-за пагубных последствий кори. Тому, кто не получает газету регулярно, следует принести лакомство для больного редактора. Кот и Обезьяна были отличными друзьями, жили вместе как домашние животные и постоянно попадали в неприятности, например, пытались достать каштаны из огня. Обезьяна убедила Кота достать их, но он съел их, как только она их вытащила, опалив при этом лапу. Когда вошел хозяин, они оба убежали, и с тех пор Кот держался подальше от Обезьяны, вместо этого охотясь на мышей и крыс. Да... итак, мой день был не таким уж хорошим. Благодаря тому, что Эндрю сегодня утром поскользнулся по вонючему полу, у меня на спине огромный синяк. У меня есть график... все в порядке, но я попробую сменить обед и здоровье, си. Они часто ко мне придираются, и поначалу я просто думал, что это всего лишь веселье и игры, но теперь... иногда мне кажется, что я им всем действительно не нравлюсь. Так что... приятно тусоваться с детьми, не участвующими в группе. Группа поддержки Никки выступила на Национальном чемпионате, и это, конечно... потрясающе! Люди смеются надо мной, потому что один из моих лучших друзей - чирлидер, а я просто смеюсь в ответ, потому что они упускают по-настоящему замечательного человека! Я тоже скучаю по Карсону. Я знаю, что вижу ее... каждый день и разговариваю с ней, но я скучаю по тому, как все было раньше. Злые сестры!! Карсон, Никки и я... это было так здорово... Иногда я очень скучаю по средней школе. Я помню, как мне было 8, и я ОТКАЗЫВАЛСЯ от 9-летнего возраста. Я вообще отказался! Иногда мне хочется, чтобы те времена вернулись. На днях мы со Скоттом долго говорили об этом, и... он напомнил мне, как весело быть моложе. Как мне не пришлось беспокоиться о выпивке и обо всех вещах, которые мне совершенно не нравятся! Я скучаю по своей маленькой компании друзей... раньше мы ВСЕ делали вместе... а теперь все разваливается. Джоанна едет в Англию, Карсон уже ушла из группы (слава богу, я до сих пор поддерживаю с ней тесный контакт), а Никки едет в Бенет. Я просто... скучаю по старым временам. Да, в любом случае… извини… Я продолжал писать и писать, и сбился с пути. На 5-м часу у меня была Речь, и она была совершенно изящной! Меня не волнует, что кто-то говорит о ее веселости, я люблю мисс Ви! Или, как мы ее называем... В-дидди! Она с таким энтузиазмом относится к преподаванию... как будто действительно хочет там быть! Она напоминает мне мистера Домана. Думаю, получить хорошую оценку в классе мисс В., слава богу, действительно легко, поскольку я очень нервничаю перед выступлениями. Уилл учится в моем классе :) Он мне очень нравится. Он такой классный парень. Он всегда носит эту рубашку с изображением Бэтмена, которая мне нравится, и он всегда очень добр ко мне. Хотя он всегда кажется чем-то грустным... и это очень напоминает мне о смерти Кари. Есть еще один человек, по которому я очень скучаю. Ух ты... Я сейчас скучаю по многим людям... даже по Кристи. Да... она поцеловала Райана... и да... я бросила его жалкую задницу, но... я все еще скучаю по ней. С ней было просто... так приятно поговорить. Сейчас нет никого, кому я действительно мог бы сказать что-нибудь на свете, чтобы... понравилось... что угодно, и все, что у меня на уме, и мне бы хотелось, чтобы это было так. Только что включил какую-нибудь группу Dave Matthews Band... Надеюсь, это поднимет мне настроение. Честно говоря... я знаю, что этого не произойдет, но... я должен попробовать, верно?? Ух ты, я не писал так много... возможно, никогда, и я только что закончил чуть больше половины своего дня. Я не знаю, что со мной. Я просто... думаю о том, как бы мне хотелось, чтобы все было, и как быстро все меняется. Я имею в виду... Я уже закончил среднюю школу на 37,5%. Это довольно удручающе, особенно потому, что я понятия не имею, чем хочу заниматься после окончания средней школы. *Вздох* Ну... да, вернемся к разговору, больше рассказывать нечего. Завтра у меня есть минутная речь о себе. Думаю, я собираюсь поговорить о том, чтобы быть альбиносом. Надеюсь, это заинтересует людей. Это не то, о чем говорят каждый день, так что... да. Ага....здоровье....ик...страшный класс. Да... больше нечего сказать, кроме... у меня в классе есть Стиви!!! АААА! Ура! Стив Зимни... если ты никогда не встречал этого парня, познакомься с ним. Он самый крутой на свете. Он очень милый, и он действительно очень милый. :) Его девушке повезло. Ха-ха... и я понял, как плохо это могло звучать... нет, Стив мне нравится не больше, чем друг, он просто очень классный, поэтому заслуживает упоминания. Я не упоминаю людей, которые мне нравятся... или нет?? Хммм.... Эммм... ок, что дальше? Математика... да, не буду вдаваться в подробности, за исключением того, что это круто, поскольку Тейлор учится в моем классе математики, и это отлично, потому что Тейлор определенно самый крутой. Она такой милый человек. Мне хотелось бы иногда быть больше похожей на нее. Тогда... Американское правительство!! УРА! В моем классе много людей... включая Андре Черри... ха-ха... Я поцеловала этого парня, когда мне было... 5. Ах...хорошие времена, хорошие времена. Кэтрин учится в моем классе, и это здорово, и это Мередит, мне все равно, что кто-то говорит о ней, она всегда очень добра ко мне, и я думаю, что она классный человек, которому есть что предложить. А еще... у меня самый крутой учитель господин Альбинак. Он такой замечательный учитель. У Келли С. он тоже есть, только... в другой период. И... да, это был мой день. Все закончилось хорошо, но я все еще надеюсь сменить время обеда. Я ОЧЕНЬ надеюсь, что они мне позволят. В любом случае....Мне надоело печатать, и я начинаю беспокоиться, так что, думаю, я пойду немного почитаю и... может быть, напишу больше позже. На самом деле я записываю здесь то, что чувствую, и это довольно удивительно. Обычно я не пишу о том, что чувствую. О да... Думаю, в субботу в нашей секции было около 20-25 групп... так что либо мы выступили не так плохо, как я думал, либо... другие группы были ужасны. Мне еще не удалось поговорить со Скоттом о Уинтере и все уладить. Я почти уверен, что мы пойдем к Кэтрин поесть. Se meten mucho conmigo, y al principio asumí que todo era diversión y juegos, pero ahora... a veces siento que realmente no les agrado a todos. Así que... es agradable pasar el rato con chicos que no pertenecen a la banda. El equipo de porristas de Nikki llegó a los Nacionales, lo cual por supuesto... ¡es increíble! La gente se ríe de mí porque una de mis mejores amigas es animadora, y yo también me río porque se están perdiendo a una persona verdaderamente maravillosa. También extraño a Carson. Sé que la veo... todos los días y hablo con ella, pero extraño cómo solían ser las cosas. Hermanas Malevalentes!! Carson, Nikki y yo... fue genial... A veces realmente extraño la secundaria. Recuerdo cuando tenía 8 años y me NEGABA a cumplir 9. ¡De hecho, me negué! A veces quisiera que esos días volvieran. Scott y yo tuvimos una larga conversación sobre esto el otro día y... él me recordó lo divertido que era ser más joven. ¡Cómo no tenía que preocuparme por beber y por todas las cosas que no me gustan en absoluto! Extraño a mi pequeño grupo de amigos... solíamos hacer TODO juntos... y ahora todo se está separando. Joanne se va a Inglaterra, Carson ya se ha ido del grupo (gracias a Dios sigo en estrecho contacto con ella) y Nikki va con Benet. Simplemente... extraño los viejos tiempos. Sí, de todos modos... lo siento... Seguí escribiendo y escribiendo, y me desvié del camino. En la quinta hora, tuve un discurso, ¡que fue totalmente genial! No me importa lo que digan sobre su alegría, ¡amo a la Sra. V! O como la llamamos... ¡V-diddy! Está tan entusiasmada con la enseñanza... ¡como si realmente quisiera estar allí! Me recuerda al señor Doman. Supongo que es muy fácil obtener una buena calificación en la clase de la Sra. V, gracias a Dios, ya que estoy muy nervioso por dar discursos. Will está en mi clase :) Me gusta mucho. Es un chico genial. Siempre usa esta camiseta de Batman que me encanta y siempre es muy amable conmigo. Aunque siempre parece un poco triste por algo... y eso realmente me recuerda la muerte de Kari. Hay otra persona a la que extraño mucho. Vaya... extraño a mucha gente en este momento... incluso a Christy. Sí... ella besó a Ryan... y sí... dejé su lamentable trasero, pero... todavía la extraño un poco. Ella era... tan buena para hablar. No hay nadie en este momento a quien realmente sienta que podría decirle cualquier cosa en el mundo a... me gusta... cualquier cosa, y todo lo que tengo en mente, y desearía que así fuera. Acabo de poner algo de Dave Matthews Band... Espero que me ponga de mejor humor. Sinceramente... sé que no será así, pero... tengo que intentarlo, ¿verdad? Vaya, no he escrito tanto... posiblemente nunca, y apenas he llegado a la mitad del día. No sé qué me pasa. Sólo... estoy pensando en cómo desearía que fueran las cosas y en lo rápido que están cambiando. Quiero decir... ya estoy en el 37,5% de mi camino hacia la escuela secundaria. Eso es bastante deprimente, especialmente porque no tengo idea de qué quiero hacer después de la secundaria. *Suspiro* Bueno... sí, volvamos al discurso, no hay mucho más que contar. Mañana tengo que dar un discurso de un minuto sobre mí. Creo que voy a hablar de ser albino. Espero que interese a la gente. No es algo de lo que se oiga hablar todos los días, así que... sí. Sí...salud...eek...clase aterradora. Vaya... no hay mucho más que decir que eso, excepto... ¡¡¡Tengo a Stevey en mi clase!!! ¡AHHH! ¡Hurra! Steve Zimnie... si nunca has conocido al niño, conócelo. Es el más genial de todos los tiempos. Es realmente agradable y realmente lindo. :) Su novia tiene suerte. Jaja... y me di cuenta de lo mal que pudo haber sonado... no, no me gusta Steve como algo más que un amigo, es realmente genial, así que merecía mencionarlo. No menciono a las personas que me gustan... ¿o sí? Hmmm.... Ummm...ok, ¿qué sigue? Matemáticas... sí, no entraré en muchos detalles sobre eso, excepto que es genial ya que Taylor está en mi clase de matemáticas, lo cual es excelente, porque Taylor es definitivamente la mejor. Ella es una persona tan dulce. Ojalá pudiera ser más como ella a veces. Entonces... ¡¡Gobernador americano!! ¡HURRA! Tengo mucha gente en mi clase... incluyendo a Andre Cherry... jaja... Besé a ese niño cuando tenía como... 5 años. Ah, buenos tiempos, buenos tiempos. Kathryn está en mi clase, lo cual es increíble, al igual que Meredith, no me importa lo que NADIE diga sobre ella, ella siempre es muy amable conmigo y creo que es una persona genial que tiene mucho que ofrecer. Además... tengo el profesor más genial, el Sr. Albinak. Es un gran maestro. Kelly C. también lo tiene, excepto... punto diferente. Y... sí, ese fue mi día. Terminó bien, pero todavía tengo la esperanza de cambiar mis períodos de almuerzo. REALMENTE espero que me dejen. De todos modos... estoy harto de escribir y me estoy poniendo inquieto, así que creo que iré a leer un rato y... tal vez escribiré más más tarde. De hecho, estoy escribiendo lo que siento aquí, lo cual es algo sorprendente. En realidad, no suelo escribir lo que siento. Oh, sí... Supongo que había entre 20 y 25 bandas en nuestra sección el sábado... así que, o realmente no lo hicimos tan mal como pensaba, o... las otras bandas fueron atroces. Aún no he podido hablar con Scott sobre Winter ni arreglar las cosas. Estoy bastante seguro de que iremos a comer a casa de Kathryn. Le nuage de Oort est un nuage sphérique hypothétique comptant jusqu'à mille milliards d'objets glacés et qui pourrait être la source des comètes à longue période245. Il entourerait le Système solaire avec une forme sphérique et cette coquille pourrait s'étendre de 10 000 ua jusqu'à peut-être jusqu'à plus de 100 000 ua (1,87 al)245. Il serait composé de comètes éjectées du Système solaire interne à cause des interactions gravitationnelles des planètes géantes, notamment Jupiter244. L'extrême majorité des comètes du Système solaire y seraient situées, leur nombre estimé étant de l'ordre du billion (1012)241,237. La masse totale de ces objets serait d'environ une masse terrestre245. De tjatar på mig mycket, och först antog jag bara att det var kul och lek, men nu... ibland känner jag att de alla verkligen inte gillar mig. Så...det är trevligt att umgås med icke-bandbarn. Nikkis cheerleading-lag tog sig till Nationals, vilket såklart...är fantastiskt! Folk skrattar åt mig för att en av mina bästa vänner är en hejarklack, och jag skrattar bara tillbaka, för att de går miste om en verkligt underbar person! Jag saknar Carson också. Jag vet att jag ser henne som...varje dag, och jag pratar med henne, men jag saknar liksom saker och ting förr. Malevalenta systrar!! Carson, Nikki och jag...det var så häftigt...Jag saknar verkligen Junior High ibland. Jag kan minnas när jag var 8, och jag vägrade att fylla 9. Jag vägrade faktiskt! Jag önskar att de dagarna var tillbaka ibland. Scott och jag hade ett långt samtal om detta häromdagen, och...han påminde mig om vad roligt det var att vara yngre. Hur jag inte behövde oroa mig för att dricka, och alla grejer jag inte är helt inne på! Jag saknar mitt lilla kompisgäng... vi brukade göra ALLT tillsammans...och nu går det bara sönder. Joanne ska till England, Carson har redan gått från gruppen (tack och lov håller jag fortfarande nära kontakt med henne) och Nikki går till Benet. Jag saknar bara gamla dagar. Ja, i alla fall....förlåt....Jag fortsatte bara att skriva och skriva, och jag kom ur spåret. 5:e timmen hade jag tal, vilket var helt snyggt! Jag bryr mig inte om vad någon säger om hennes pigghet, jag älskar Ms. V! Eller som vi kallar henne...V-diddy! Hon är bara så entusiastisk över att undervisa...som att hon faktiskt vill vara där! Hon påminner mig om Mr. Doman. Jag antar att det är väldigt lätt att få ett bra betyg i Ms V:s klass, tack och lov, eftersom jag är riktigt nervös för att hålla tal. Will går i min klass :) Jag tycker mycket om honom. Han är en så cool unge. Han bär alltid den här batmantröjan som jag älskar, och han är alltid riktigt snäll mot mig. Han verkar alltid vara ledsen över något...och det påminner mig verkligen om Karis död. Det finns en annan person som jag saknar mycket. Wow...jag saknar många människor just nu...även Christy. Ja ... hon kysste Ryan ... och ja ... jag dumpade hans ledsna rumpa, men ... jag saknar henne fortfarande. Hon var bara...så bra att prata med. Det finns ingen just nu, som jag verkligen känner att jag kunde berätta vad som helst i världen att...gilla... precis vad som helst, och allt som jag tänker på, och jag önskar att det fanns. Sätt på lite Dave Matthews Band... Jag hoppas att det får mig på bättre humör. Ärligt talat...jag vet att det inte gör det, men...jag måste försöka, eller hur?? Wow, jag har inte skrivit så här mycket...möjligen någonsin, och jag har precis kommit lite mer än halvvägs igenom min dag. Jag vet inte vad det är med mig. Jag tänker bara på hur jag önskar att saker och ting var, och hur snabbt saker och ting förändras. Jag menar...jag är redan 37,5% av min väg genom gymnasiet. Det är ganska deprimerande, speciellt eftersom jag inte har en aning om vad jag vill göra efter gymnasiet. *Suck* Tja...ja, tillbaka till talet, inte mycket mer att berätta. Jag har ett tal på en minut att hålla om mig själv imorgon. Jag tror att jag ska prata om att vara albino. Jag hoppas att det intresserar folk. Det är inte något man hör talas om varje dag, så... ja. Benimle çok dalga geçiyorlar ve ilk başta bunların sadece eğlence ve oyun olduğunu varsaydım, ama şimdi... Bazen hepsinin benden gerçekten hoşlanmadığını hissediyorum. Yani... müzik grubu olmayan çocuklarla takılmak güzel. Nikki'nin amigo takımı Ulusal yarışmaya katıldı ve bu elbette... harika! İnsanlar bana gülüyor çünkü en iyi arkadaşlarımdan biri amigo kız, ben de hemen gülüyorum çünkü gerçekten harika bir insanı kaçırıyorlar! Ben de Carson'ı özledim. Onu her gün gördüğümü biliyorum ve onunla konuşuyorum ama her şeyin eski halini özlüyorum. Kötü niyetli Kardeşler!! Carson, Nikki ve ben... o kadar güzeldi ki... Bazen Ortaokulu gerçekten özlüyorum. 8 yaşımdayken 9 yaşına girmeyi REDDETTİĞİM zamanı hatırlıyorum. Aslında reddettim! Bazen o günlerin geri gelmesini diliyorum. Scott ve ben geçen gün bunun hakkında uzun bir konuşma yaptık ve o bana genç olmanın ne kadar eğlenceli olduğunu hatırlattı. İçki ve hiç ilgilenmediğim şeyler konusunda ne kadar da endişelenmeme gerek yoktu! Küçük arkadaş grubumu özlüyorum... Eskiden HER ŞEYİ birlikte yapardık... ve şimdi her şey dağılıyor. Joanne İngiltere'ye gidiyor, Carson çoktan gruptan ayrılmış (şükürler olsun ki onunla hâlâ yakın temas halindeyim) ve Nikki Benet'e gidiyor. Ben sadece...eski günleri özlüyorum. Evet, neyse....özür dilerim....Yazmaya ve yazmaya devam ettim ve yoldan çıktım. 5. saat, tamamen düzgün bir konuşma yaptım! Onun neşeliliği hakkında kimsenin ne dediği umurumda değil, Bayan V'yi seviyorum! Veya bizim ona verdiğimiz isimle... V-diddy! Öğretme konusunda o kadar hevesli ki... sanki orada olmayı gerçekten istiyormuş gibi! Bana Bay Doman'ı hatırlatıyor. Sanırım Bayan V'nin dersinde iyi bir not almak çok kolay, çok şükür, çünkü konuşma yapma konusunda gerçekten gerginim. Will benim sınıfımda :) Onu çok seviyorum. Çok havalı bir çocuk. Her zaman sevdiğim bu Batman gömleğini giyiyor ve bana karşı her zaman çok iyi davranıyor. Her zaman bir şeye üzülmüş gibi görünüyor... ve bu bana gerçekten Kari'nin ölümünü hatırlatıyor. Çok özlediğim biri daha var. Vay...Şu anda pek çok insanı özlüyorum....Christy'yi bile. Evet... Ryan'ı öptü... ve evet... onun üzgün kıçını terk ettim, ama... onu hala özlüyorum. Onunla konuşmak çok güzeldi. Şu anda dünyada her şeye... her şeyi, aklımdaki her şeyi anlatabileceğimi düşündüğüm hiç kimse yok ve keşke olsaydı. Az önce Dave Matthews Band'i açtım...Umarım beni daha iyi bir ruh haline sokar. Dürüst olmak gerekirse...Böyle olmayacağını biliyorum ama...Denemeliyim, değil mi?? Vay be, bu kadar çok yazmamıştım... muhtemelen şimdiye kadar ve günümün yarısından biraz fazlasını yazdım. Bana ne olduğunu bilmiyorum. Sadece... her şeyin nasıl olmasını istediğimi ve her şeyin ne kadar hızlı değiştiğini düşünüyorum. Demek istediğim הם מרגשים בי הרבה, ובהתחלה פשוט הנחתי שהכל כיף ומשחקים, אבל עכשיו... לפעמים אני מרגיש שכולם ממש לא אוהבים אותי. אז...זה נחמד לבלות עם ילדים שאינם להקה. נבחרת המעודדות של ניקי הגיעה לנשיאות, וזה כמובן...זה מדהים! אנשים צוחקים עליי כי אחד החברים הכי טובים שלי הוא מעודד, ואני פשוט צוחק בחזרה, כי הם מפסידים אדם נפלא באמת! גם אני מתגעגע לקרסון. אני יודע שאני רואה אותה כאילו... כל יום, ואני מדבר איתה, אבל אני קצת מתגעגע לאיך שהיו פעם. אחיות זדוניות!! קרסון, ניקי ואני... זה היה כל כך מגניב... אני פשוט מתגעגע לחטיבת ביניים לפעמים. אני זוכר כשהייתי בן 8, וסירבתי להגיע לגיל 9. למעשה סירבתי! הלוואי שהימים האלה חזרו לפעמים. סקוט ואני קיימנו שיחה ארוכה על זה לפני כמה ימים, ו...הוא הזכיר לי איזה כיף זה להיות צעיר יותר. איך לא הייתי צריך לדאוג לשתייה, וכל הדברים שאני לגמרי לא בעניין! אני מתגעגע לקבוצת החברים הקטנה שלי... פעם עשינו הכל ביחד...ועכשיו פשוט הכל מתפרק. ג'ואן נוסעת לאנגליה, קרסון כבר עזבה מהקבוצה (תודה לאל שאני עדיין בקשר הדוק איתה) וניקי הולכת לבנט. אני פשוט... מתגעגע לימים ההם. כן, בכל מקרה....סליחה....פשוט Тјуринговите машини се апстрактни машини кои покрај нивната едноставност можат да бидат приспособени да ја симулираат логичката улога на секој можен компјутер. Тјуринговите машини се опишани во 1936 од страна на Алан Тјуринг. Иако биле наменети за технички изводлива работа, Тјуринговите машини немале улога во практичната компјутерска технологија, но со истражување за границите на механичкото пресметување; тие всушност никогаш не биле направени (конструирани). Тјурингова машина која истовремено е способна да симулира и било која друга Тјурингова машина се нарекува Универзална Тјурингова машина (УТМ, или едноставно универзална машина). Поконкретна математичка дефиниција со слична универзална природа беше претставена од Alonzo Church, чија работа на lambda calculus се спои со Тјуринговата во формалната теорија на пресметување позната како теза на Church–Turing. Тезата дека Тјуринговите машини навистина ги опфаќаат информациите за делотворните методи од логиката и математиката, и овозможуваат прецизна дефиниција на алгоритам или механичка процедура. Неформален опис Концептот на Тјуринговата машина е заснован на идејата, некој да извршува добро дефинирана процедура со тоа што ќе ја менува содржината на неограничена хартиена лента, која е поделена на поделци кои на себе имаат еден од множеството симболи за конкретната азбука. Извршувачот треба да запамети една од можните состојби и процедурата е формулирана во многу едноставни чекори во вид "Ако моменталната состојба е 42 и симболот што е на таа позиција е '0' тогаш замени го со '1', помести еден симбол на десно, и земи ја 17-та состојба за наредна состојба." Ниже вы найдете несколько отличных видеороликов, которые будут воодушевлять вас, обучать и укреплять вас, слушая БОГА и позволяя ЕМУ исполнить ЕГО план в вашей жизни. ЧТО-ТО НОВОЕ, КОТОРОЕ ПОМОЖЕТ ВАМ УСЛЫШАТЬ ГОЛОС БОГА! Как понять и правильно разделить это и как это применить к жизни! В этом важном учении Терри раскрывает четкое различие между Духом и Душой и показывает, насколько важно, чтобы мы научились действовать в Духе и не были обмануты. Это серьезный вопрос, который необходимо рассмотреть независимо от вашего уровня веры и зрелости. Брак и его применение к духу и душе! В этом познавательном классе Терри раскрывает ключевое понимание, которое помогает нам лучше различать Дух и Душу, как это отражается в Брачных отношениях, исходя из интуитивной природы, эмоционального компонента женщины и силового аспекта мужчины в подчинении Господу. . В этом поучительном учении Терри рассказывает о том, как Скиния представляет тело, душу и дух человека и как она применима к нашему духовному хождению. Этот полный пакет избавления поможет вам понять, что вы можете сделать, чтобы освободиться от скрытого принуждения, похороненного глубоко в вашей душе, которое мешает вам ходить в полноте, которую БОГ заплатил за то, чтобы вы вошли. В сегодняшнем видео Терри дает определение спасения. лучше и о том, что мешает спасению нашей души, и о том, как мы можем повысить нашу духовную зрелость. UNStudio объединила усилия с HPP Architects, чтобы создать консорциум (UNS + HPP) для реализации следующих этапов проекта, победившего на конкурсе архитектурного дизайна для FOUR во Франкфурте. Взгляните на полную историю после прыжка. От архитекторов: Расположенный в центре участок площадью 16 000 квадратных метров был приобретен девелоперской компанией Groß & Partner, которая будет заниматься развитием проекта, еще в 2015 году. Расположенный в самом центре города, участок был построен совершенно недоступный в течение последних 45 лет. Теперь четыре новые высотные башни изменят панораму Франкфурта с воздуха, одновременно культивируя его оживленность на земле. Строительство этих башен, достигающих высоты 228 метров, откроет новые улицы и создаст многофункциональный, оживленный городской квартал, объединяющий здоровое сочетание работы, жизни, отдыха и развлечений. Выбор программ позволяет плавно перейти от торгового района Франкфурта к востоку от Россмаркта к высотным офисным башням, сгруппированным вокруг парка Таунусанлаге. Благодаря уникальной для Европы концепции развития проект FOUR Frankfurt объединяет объекты, которые создадут новый оживленный район для Франкфурта, его посетителей и его (будущих) жителей. Новый высотный комплекс будет интегрирован в расширяющуюся городскую структуру за счет включения в дизайн фасадов Юнгхофштрассе, внесенных в список наследия, и превращения многоэтажного базового здания в связующий элемент всего объекта. По оценке жюри конкурса, уникальность квартала заключается в его общественном благоустройстве и благоустройстве. Таким образом, новая застройка создаст связанные пространства, доступные крыши, дорожки и переходы. Существующий квартал на Юнгхофштрассе будет открыт для укрепления прилегающих дорог и обеспечения высокого уровня доступности. В результате будет создан многофункциональный, разнообразный квартал, включающий 50% офисных помещений, 30% жилых помещений (включая субсидированное жилье), а также торговые площади, рестораны и гостиницы. Ожидается, что четыре Франкфурта будут завершены в 2023 году. 2 Нью-Ингленд NE 16 1 игра -1 ярд 0:07 Конец тайма. 4 Питтсбург Пит 37 2 игры -1 ярд 1:01 Конец игры. 2 8 opp29 1:57 Пит Блейер 0 Бас Ничья/SI 4-3 sZ Ран-Харрис, Ф. Продавцы-нерезиденты (например, иностранцы, проживающие за границей, и граждане Японии, проживающие за границей). Покупатели, как местные, так и иностранные резиденты, покупающие недвижимость в Японии у нерезидента. Если продавец японской недвижимости является нерезидентом, в зависимости от ситуации покупатель должен удержать 10,21% от цены продажи и уплатить ее в налоговую инспекцию, а остальные 89,79% выплачиваются продавцу. Покупатель обязан уплатить 10,21% в налоговую инспекцию до 10-го числа месяца, следующего за транзакцией. Вы обязаны внести этот платеж в налоговую инспекцию в установленный срок. Если вы в настоящее время проживаете за границей, вам необходимо будет назначить налогового представителя или бухгалтера, который будет платить эту сумму от вашего имени. Вам нужно будет назначить налогового представителя в Японии для подачи окончательной налоговой декларации и возврата вам оставшейся суммы (за вычетом налогов, которые могли быть причитаются). *Если выплата депозитов и промежуточных платежей также соответствует условиям удержания налога, налог должен удерживаться и выплачиваться покупателем при каждом платеже. Приведенная выше информация была предоставлена только в качестве общего руководства. Более подробную информацию об этом налоге, а также по другим детальным вопросам налогообложения можно получить в налоговой инспекции или у специалиста... Газета New York Times в четверг напечатала специальный раздел с портретами почти каждой из рекордного числа женщин-депутатов в Конгрессе. Вирусная ветка в Твиттере от редактора отдела дизайна Times Джоша Крачмера включает видео с обложками накануне публикации, которое по состоянию на утро четверга было просмотрено более 320 000 раз. По мнению газеты, фотографии, сделанные на Капитолийском холме в течение пяти дней фотографами Times Элизабет Д. Херман и Селестой Сломан, задуманы как «свидетельство того, как выглядит власть в 2019 году». «Как и работа Кехинде Уайли, которая нарисовала Барака Обаму Барака Хусейна ОбамуКитай, Россия, Иран поднимаются в Латинской Америке на фоне отступления США. Кастро хочет последовать примеру Обамы в балансировании президентства с отцовством. Откат Трампа в регулировании повышает вероятность финансового кризиса. БОЛЬШЕ официальный президентский портрет «Эти фотографии вызывают образы, которые мы привыкли видеть в залах власти, но в них резко выделяются люди, которые ранее не считались влиятельными», — говорится в статье. В этом сроке в Палате представителей и Сенате работает 131 женщина, рекордный класс, который включает в себя ряд других «новичков», в том числе самую молодую женщину, избранную в Палату представителей, первых двух женщин-мусульманок-депутатов и первых двух женщин-законодателей из числа коренных американцев. . «Переосмысление репрезентации» включает 130 портретов – член палаты представителей Лиз Чейни Элизабет (Лиз) Линн Чейниреп. Чейни: Социализм «движет повесткой дня Демократической партии» Депутат от Демократической партии предлагает инструмент для «заполнения пробелов» «Зеленого нового курса» Джадд Грегг: В похвалу Майку Энзи БОЛЬШЕ (республиканец от штата Вайоминг) не было доступно, согласно «Таймс» . Офицер полиции Алсипа серьезно ранил мужчину во время стрельбы при исполнении служебных обязанностей рано утром в среду после того, как выследил Кадиллак, подозреваемый в участии в дрэг-рейсинге, в районе Маунт-Гринвуд. Офицер открыл огонь, когда водитель Cadillac, которым оказался 25-летний мужчина, не выполнил команду полиции поднять руки и поехал в сторону офицера и его партнера, сообщил начальник полиции Алсипа Джей Миллер в заявлении, опубликованном в среду. полдень. По словам Миллера, сразу после 2 часов ночи полицейский увидел дрэг-рейсинг Dodge Challenger и Cadillac в районе Дэвид-Эстейтс в юго-западном пригороде. Во время обыска транспортных средств полицейский заехал на стоянку многоквартирного дома в квартале 4000 на 115-й улице в Чикаго и обнаружил двух человек внутри «Кадиллака». По словам полиции, офицер и его напарник вышли из патрульной машины и сказали 25-летнему парню и его пассажиру поднять руки. Вместо того, чтобы следовать указаниям, 25-летний мужчина подъехал к офицеру, который затем открыл огонь. «Кадиллак» врезался в припаркованные на стоянке автомобили и патрульную машину. По данным полиции, 25-летний мужчина получил два выстрела в плечо, и сотрудники Алсипа оказали ему медицинскую помощь до прибытия скорой помощи. Его доставили в медицинский центр Крайст в Оук-Лоун в тяжелом состоянии. Оба офицера получили «легкие травмы», сообщила полиция Алсипа. Миллер сказал, что 25-летний мужчина, которому не предъявлено обвинение, разыскивался на основании ордера на выезд из Индианы по обвинению в наркотиках и имел «историю насилия», но не уточнил подробностей. New York Times trykket torsdag en spesiell seksjon med portretter av nesten hvert medlem av rekordmange kvinnelige lovgivere i kongressen. En viral Twitter-tråd fra Times' designredaktør, Josh Crutchmer, inkluderer en video av forsidene kvelden før publisering som har blitt sett over 320 000 ganger torsdag morgen. Bildene, som ble tatt på Capitol Hill over fem dager av Times-fotografene Elizabeth D. Herman og Celeste Sloman, er ment som «et bevis på hvordan makt ser ut i 2019», ifølge avisen. «Som arbeidet til Kehinde Wiley, som malte Barack Obama Barack Hussein Obama, stiger Kina, Russland, Iran i Latin-Amerika når USA trekker seg tilbake. Castro ønsker å følge Obamas ledelse når det gjelder å balansere presidentskap med farskap. Trumps tilbakeføring av regulering øker sjansene for en finanskrise MERs offisielle presidentportrett , fremkaller disse fotografiene bildene vi er vant til å se i maktens haller, men plasserer folk som ikke tidligere er sett på som mektige, sterkt i rammene», heter det i innslaget. Det er 131 kvinner som tjenestegjør i huset og senatet denne perioden, en rekordklasse som inkluderer en rekke andre "første", inkludert den yngste kvinnen valgt inn i huset, de to første kvinnelige muslimske lovgiverne og de to første kvinnelige innfødte amerikanske lovgiverne. . "Redefinering Representation" inneholder 130 portretter – Rep. Liz Cheney Elizabeth (Liz) Lynn CheneyRep. Cheney: Sosialisme 'driver agendaen til det demokratiske partiet' Dem lovgiver tilbyr verktøy for å 'fylle ut tomrommene' i Green New Deal Judd Gregg: Til ros for Mike Enzi MORE (R-Wyo.) var ikke tilgjengelig, ifølge Times . En politimann fra Alsip såret en mann alvorlig i en skyting på vakt tidlig onsdag etter å ha sporet en Cadillac mistenkt for å være involvert i dragracing inn i Mount Greenwood-området. Offiseren avfyrte skudd da føreren av Cadillac-en, identifisert som en 25 år gammel mann, ikke fulgte politiets kommandoer for å løfte hendene og kjørte mot betjenten og hans partner, sa Alsip-politisjef Jay Miller i en uttalelse som ble offentliggjort onsdag. ettermiddag. Like etter klokken 02.00 så betjenten en Dodge Challenger og en Cadillac dragrace i David Estates-området i den sørvestlige forstaden, sa Miller. Under et søk etter kjøretøyene dro betjenten inn på en parkeringsplass for en bygård i 4000-blokken på 115th Street i Chicago og fant to personer inne i Cadillac. Offiseren og partneren hans gikk ut av soldatbilen deres og ba 25-åringen og passasjeren hans rekke opp hendene, sa politiet. I stedet for å følge anvisningene kjørte 25-åringen mot betjenten, som deretter åpnet ild. Cadillac-en krasjet inn i kjøretøyer som var parkert på plassen og inn i en gruppebil. 25-åringen ble skutt to ganger i skulderen og fikk legehjelp av Alsip-offiserene før ambulansepersonell ankom, opplyser politiet. Han ble ført til Christ Medical Center i Oak Lawn i alvorlig tilstand. Begge betjentene fikk «mindre skader», sa Alsip-politiet. Miller sa at 25-åringen, som ikke har blitt siktet, var etterlyst på en arrestordre fra Indiana på grunn av narkotikaanklage og hadde en "voldelig historie", men ga ikke detaljer. Ketvirtadienį laikraštis „New York Times“ išspausdino specialų skyrių, kuriame pateikiami beveik kiekvienos rekordinio Kongreso moterų skaičiaus įstatymų leidėjų portretai. Virusinėje „Twitter“ gijoje, kurią sukūrė „Times“ dizaino redaktorius Joshas Crutchmeris, yra viršelių vaizdo įrašas naktį prieš paskelbimą, kuris ketvirtadienio rytą buvo peržiūrėtas daugiau nei 320 000 kartų. Laikraštyje rašoma, kad nuotraukos, kurias ant Kapitolijaus kalno per penkias dienas padarė Times fotografės Elizabeth D. Herman ir Celeste Sloman, yra „paliudijimas, kaip galia atrodo 2019 m. „Kaip ir Kehinde Wiley, nupiešusio Baracką Obamą Baracką Huseiną Obama, Kinija, Rusija, Iranas auga Lotynų Amerikoje, kai JAV traukiasi, Castro nori sekti Obamos pavyzdžiu derinant prezidento postą su tėvyste Trumpo reguliavimo panaikinimas padidina finansinės krizės tikimybę. Oficialus MORE prezidento portretas , šios nuotraukos sužadina vaizdus, kuriuos esame įpratę matyti valdžios salėse, tačiau į kadrus ryškiai įdeda žmones, kurie anksčiau nebuvo tokie galingi“, – rašoma funkcijoje. Atstovų rūmuose ir Senate šią kadenciją dirba 131 moteris – rekordinė klasė, į kurią įeina daugybė kitų „pirmųjų“, įskaitant jauniausią į Atstovų Rūmus išrinktą moterį, dvi pirmąsias musulmones įstatymų leidėjas ir pirmąsias dvi indėnines įstatymų leidėjas. . „Redefining Representation“ yra 130 portretų – Rep. Liz Cheney Elizabeth (Liz) Lynn CheneyRep. Cheney: socializmas „varo Demokratų partijos darbotvarkę“ Dem įstatymų leidėjas siūlo įrankį „užpildyti žaliojo naujojo susitarimo tuščias vietas“ Juddas Greggas: „The Times“ rašo, kad Mike'o Enzi pagyrimui DAUGIAU (R-Wyo.) nebuvo. . Alsipo policijos pareigūnas anksti trečiadienį per šaudymą sunkiai sužeidė vyrą po to, kai susekė „Cadillac“, įtariamą dalyvavusiu drago lenktynėse Mount Greenwood rajone. Pareigūnas paleido šūvius, kai „Cadillac“ vairuotojas, identifikuotas kaip 25 metų vyras, nevykdė policijos komandų pakelti rankas ir važiavo link pareigūno ir jo partnerio, sakoma Alsipo policijos viršininko Jay'aus Millerio pranešime, kuris buvo paskelbtas trečiadienį. popietę. Vos po 2 valandos nakties pareigūnas pamatė „Dodge Challenger“ ir „Cadillac“ drago lenktynes David Estates rajone pietvakariniame priemiestyje, sakė Milleris. Ieškodamas transporto priemonių, pareigūnas įsuko į daugiabučio automobilių stovėjimo aikštelę Čikagos 115-osios gatvės 4000 kvartale ir Cadillac salone rado du žmones. Pareigūnas ir jo bendražygis išlipo iš tarnybinio automobilio ir liepė 25 metų vyrui bei jo keleivei pakelti rankas, pranešė policija. Užuot laikęsis nurodymų, 25-erių vaikinas nuvažiavo link pareigūno, kuris atidengė ugnį. „Cadillac“ trenkėsi į aikštelėje stovėjusias transporto priemones ir tarnybinį automobilį. Policija pranešė, kad 25-erių vaikinui buvo du kartus peršautas petys, Alsipo pareigūnai jam suteikė medicininę pagalbą. Jis buvo sunkios būklės nuvežtas į Christ Medical Center Oak Lawn mieste. Abu pareigūnai patyrė „nežymius sužalojimus“, pranešė Alsipo policija. Milleris sakė, kad 25 metų vaikinas, kuriam nebuvo pareikšti kaltinimai, buvo ieškomas pagal orderį iš Indianos dėl kaltinimų narkotikais ir turėjo „smurtinę istoriją“, tačiau nepateikė konkrečių duomenų. 在二十世紀二十年代,出现了两种量子物理的理论,即维尔纳·海森堡的矩阵力学和埃尔温·薛定谔的波动力学。 海森堡主張,只有在實驗裏能夠觀察到的物理量(可觀察量),才具有物理意義,才可以用理論描述其物理行為,例如,不能直接觀察到電子運動於原子裏的位置與週期。因此,他著重於研究電子躍遷時所發射光波的離散頻率和輻照度,這些是可觀察量。但是,他無法實際應用這點子於氫原子問題,因為這問題太過複雜,他只能改應用這點子於比較簡單,但也比較不實際的問題。經過一番努力,他計算出諧振子問題的能譜與零點能量,符合分子光譜學的結果。另外,在海森堡理論中,系統的哈密頓量是位置和動量的函數,但它們不再具有古典力學中的定義,而是由二階(代表著過程的初態和終態)傅立葉係數的矩陣給出。海森堡還發現,這些矩陣互不對易。這些論述後來發展成為矩陣力學。[1]:161-163 從德布羅意論文的相對論性理論,薛定谔推導出一種波動方程式,稱為薛定谔方程式;用這方程式可以計算出氫原子的譜線,得到與波耳模型完全相同的答案。波动力学的基礎方程式就是薛定谔方程式[1]:163-164 薛定谔率先於1926年证明了这两种理论的等价性。稍后,卡爾·埃卡特和沃爾夫岡·包立也给出類似证明,[1]:166约翰·冯·诺伊曼严格地证明了波动力学和矩阵力学的等价性。[12] 在斯特恩-革拉赫實驗裏,可以透過測量而得到自旋的z-分量,這種物理量稱為可觀察量,透過做實驗測量可以得到其測值。每一個可觀察量都有一個對應的量子算符;將算符作用於量子態,會使得量子態線性變換成另一個量子態。假若變換前的量子態與變換後的量子態,除了乘法數值以外,兩個量子態相同,則稱此量子態為此算符的本徵態,稱此乘法數值為此算符的本徵值。[16]:11-12可觀察量的算符也許會有很多本徵值與本徵態。根據統計詮釋,每一次測量所得到的測值只能是其中的一個本徵值,而且,測得這本徵值的機會呈概率性,量子系統的量子態也會改變為對應於本徵值的本徵態。[17]:106-109例如,自旋的z-分量是個可觀察量 S z S_z,做實驗可以得到的測值為 + ℏ / 2 +\hbar/2或 − ℏ / 2 -\hbar/2。對應於可觀察量 S z S_z的量子算符 S ^ z \hat{S}_z有兩個本徵值分別為 + ℏ / 2 +\hbar/2、 − ℏ / 2 -\hbar/2的本徵態 | ↑ ⟩ Οι New York Times τύπωσαν την Πέμπτη μια ειδική ενότητα με πορτρέτα σχεδόν κάθε μέλους του ρεκόρ γυναικών βουλευτών στο Κογκρέσο. Ένα viral νήμα στο Twitter από τον συντάκτη σχεδιασμού των Times, Josh Crutchmer, περιλαμβάνει ένα βίντεο με τα εξώφυλλα το βράδυ πριν από τη δημοσίευση, το οποίο έχει προβληθεί πάνω από 320.000 φορές από το πρωί της Πέμπτης. Οι φωτογραφίες, οι οποίες τραβήχτηκαν στο Καπιτώλιο για πέντε ημέρες από τους φωτογράφους των Times Elizabeth D. Herman και Celeste Sloman, θεωρούνται ως «μια απόδειξη για το πώς μοιάζει η εξουσία το 2019», σύμφωνα με την εφημερίδα. «Όπως το έργο του Kehinde Wiley, ο οποίος ζωγράφισε τον Μπαράκ Ομπάμα Μπαράκ Χουσεΐν Ομπάμα Η Κίνα, η Ρωσία, το Ιράν ανεβαίνουν στη Λατινική Αμερική καθώς οι ΗΠΑ υποχωρούν Ο Κάστρο θέλει να ακολουθήσει το παράδειγμα του Ομπάμα για την εξισορρόπηση της προεδρίας με την πατρότητα Η ρυθμιστική ανάκληση του Τραμπ ενισχύει τις πιθανότητες για οικονομική κρίση , αυτές οι φωτογραφίες προκαλούν τις εικόνες που έχουμε συνηθίσει να βλέπουμε στις αίθουσες της εξουσίας, αλλά τοποθετούν ανθρώπους που δεν είχαν προηγουμένως θεωρηθεί ως ισχυροί έντονα στα καρέ», αναφέρει το χαρακτηριστικό. Υπάρχουν 131 γυναίκες που υπηρετούν στη Βουλή και τη Γερουσία αυτή τη θητεία, μια κατηγορία ρεκόρ που περιλαμβάνει μια σειρά από άλλες «πρώτες», συμπεριλαμβανομένης της νεότερης γυναίκας που εκλέχθηκε στη Βουλή, των δύο πρώτων γυναικών μουσουλμάνων βουλευτών και των πρώτων δύο ιθαγενών Αμερικανών βουλευτών . Το "Redefining Representation" περιλαμβάνει 130 πορτρέτα – Αντιπρόσωπος Liz Cheney Elizabeth (Liz) Lynn CheneyRep. Τσένι: Ο Σοσιαλισμός «οδηγεί την ατζέντα του Δημοκρατικού Κόμματος» Δημοκρατικός νομοθέτης προσφέρει εργαλείο για τη «συμπλήρωση των κενών» του Green New Deal Judd Gregg: Για να επαινέσω τον Mike Enzi ΠΕΡΙΣΣΟΤΕΡΑ (R-Wyo.) δεν ήταν διαθέσιμα, σύμφωνα με τους Times . Ένας αστυνομικός των Αλσιπών τραυμάτισε σοβαρά έναν άνδρα σε πυροβολισμό κατά τη διάρκεια της υπηρεσίας νωρίς την Τετάρτη, αφού εντόπισε μια Cadillac που υποπτεύεται ότι συμμετείχε σε αγώνες έλξης στη γειτονιά Mount Greenwood. Ο αστυνομικός πυροβόλησε όταν ο οδηγός της Cadillac, ο οποίος αναγνωρίστηκε ως ένας 25χρονος, δεν ακολούθησε τις εντολές της αστυνομίας να σηκώσει τα χέρια του και οδήγησε προς τον αστυνομικό και τον σύντροφό του, δήλωσε ο αρχηγός της αστυνομίας Alsip Jay Miller σε δήλωση που δόθηκε την Τετάρτη. απόγευμα. Λίγο μετά τις 2 τα ξημερώματα, ο αστυνομικός είδε ένα Dodge Challenger και μια Cadillac να αγωνίζονται στη συνοικία David Estates στο νοτιοδυτικό προάστιο, είπε ο Miller. Κατά τη διάρκεια έρευνας για τα οχήματα, ο αστυνομικός μπήκε σε ένα πάρκινγκ για μια πολυκατοικία στο τετράγωνο 4000 της 115th Street στο Σικάγο και βρήκε δύο άτομα μέσα στην Cadillac. Ο αστυνομικός και η σύντροφός του κατέβηκαν από το αυτοκίνητο της διμοιρίας τους και είπαν στον 25χρονο και τον συνεπιβάτη του να σηκώσουν τα χέρια τους, ανακοίνωσε η αστυνομία. Αντί να ακολουθήσει τις οδηγίες, ο 25χρονος οδήγησε προς τον αστυνομικό, ο οποίος στη συνέχεια άνοιξε πυρ. Η Cadillac έπεσε πάνω σε οχήματα που ήταν σταθμευμένα στο οικόπεδο και σε ένα αυτοκίνητο της ομάδας. Ο 25χρονος πυροβολήθηκε δύο φορές στον ώμο και του παρασχέθηκε ιατρική φροντίδα από τους αστυνομικούς της Αλσίπ πριν φτάσουν οι διασώστες, ανακοίνωσε η αστυνομία. Μεταφέρθηκε στο Christ Medical Center στο Oak Lawn σε σοβαρή κατάσταση. Και οι δύο αστυνομικοί υπέστησαν «μικρούς τραυματισμούς», είπε η αστυνομία του Αλσίπ. Ο Μίλερ είπε ότι ο 25χρονος, ο οποίος δεν έχει απαγγελθεί κατηγορία, καταζητείται με ένταλμα από την Ιντιάνα για κατηγορία ναρκωτικών και είχε «βίαιο ιστορικό», αλλά δεν έδωσε λεπτομέρειες. 太陽系是一个受太阳引力约束在一起的恆星系统,包括太阳以及直接或间接围绕太阳运动的天体[a]。在直接围绕太阳运动的天体中,最大的八颗被称为行星[b],其余的天体要比行星小很多,比如矮行星、太阳系小天體的小行星和彗星。軌道間接围绕太陽运动的天體是衛星,其中有兩顆比最小的行星水星還要大[c]。 太阳系的形成大约始于46亿年前一个巨型星际分子云的引力坍缩。太阳系内絕大部分的质量都集中于太阳,余下的天体中,质量最大的是木星。位于太阳系内侧的是四颗较小的行星,分别是水星、金星、地球和火星,它们被称为类地行星,主要由岩石和金属构成。外侧的四颗行星被称为巨行星,其质量比类地行星要大得多。其中最大的两颗是木星和土星,它们都是气态巨行星,主要成分是氢和氦。最外侧的两颗行星是天王星和海王星,它们是冰巨星,主要由一些熔点比氢和氦更高的挥发成分组成,比如水、氨和甲烷。几乎所有的行星都在靠近黄道平面的轨道上运行。 太陽系也包含許多較小的天體[d]位於火星和木星軌道之間的主小行星帶,其中的大部分天体都是像类地行星那样由岩石和金属组成。在海王星轨道之外是柯伊伯带和离散盘,包含了有大量的海王星外天体,主要由冰组成,再往外还有新发现的类塞德娜天体(sednoid),其中有几十甚至上万颗因為足够大,能靠自身的重力形成球体[10],称為矮行星。已經被確認是矮行星的包括小行星帶的穀神星,和海王星外天體的冥王星和鬩神星。[d]除了這兩個區域,还有大量的小型天体自由的运动在两个区域之间,包括彗星,還有半人馬小行星和行星際塵雲。有6顆行星、4顆以上的矮行星和一些小天體都有天然的衛星環繞著。[e]通常都依據月球被稱為衛星。太阳系外侧的每颗行星都被由尘埃和小天体构成的行星环环绕着。 太陽風是從太阳向外流出的帶電粒子流,在星際物質中形成了一個氣泡狀區域,被称为太阳圈(或日球层)。日球層頂是太陽風和星際物質的壓力達到平衡的位置,它延伸到離散盤的邊緣。歐特雲,被認為是長週期彗星的來源地,其位置可能比日球层顶还要远1,000多倍。太阳系位于银河系的猎户臂上,与银河系中心的距离约26,000光年。 名詞解釋 参见:行星定義 太陽系的行星和矮行星。圖中仅大小按比例绘制,距離不依比例。 軌道環繞太陽的天體被分為三類:行星、矮行星、和太陽系小天體。 行星是環繞太陽且質量夠大的天體。這類天體: 有足夠的質量使本身的形狀成為球體; 有能力清空鄰近軌道的小天體。 能成為行星的天體有8個:水星、金星、地球、火星、木星、土星、天王星和海王星。 在2006年8月24日,國際天文聯合會重新定義行星這個名詞,首次將冥王星排除在大行星外,並將冥王星、穀神星和鬩神星組成新的分類:矮行星[11]。矮行星不需要將鄰近軌道附近的小天體清除掉,其他可能成為矮行星的天體還有塞德娜、厄耳枯斯、和創神星。從第一次發現的1930年直至2006年,冥王星被當成太陽系的第九顆行星。但是在20世紀末期和21世紀初,許多與冥王星大小相似的天體在太陽系內陸續被發現,特別是鬩神星更明確的被指出比冥王星大。 環繞太陽運轉的其他天體都屬於太陽系小天體[6]。 衛星(如月球之類的天體),由於不是環繞太陽而是環繞行星、矮行星或太陽系小天體,所以不屬於太陽系小天體。 天文學家在太陽系內以天文單位(AU)來測量距離。1AU是地球到太陽的平均距離,大約是149,597,871公里(92,955,807英里)。冥王星與太陽的距離大約是39AU,木星則約是5.2AU。最常用在測量恆星距離的長度單位是光年,1光年大約相當於63,240天文單位。行星與太陽的距離以公轉週期為周期變化著,最靠近太陽的位置稱為近日點,距離最遠的位置稱為遠日點。 有時會将太陽系非正式地分成幾個不同的區域:“內太陽系”,包括四顆類地行星和主要的小行星帶;其餘的是“外太陽系”,包含小行星帶之外所有的天體[12]。其它的定義還有海王星以外的區域,而將四顆大型行星稱為“中間帶”[13]。 發現和探測 主条目:太陽系的探測和發現 安德烈亞斯·塞拉里烏斯的插圖:哥白尼體系,出自Harmonia Macrocosmica(1660年)。 在历史上的很长一段时期,人类都没有认识或理解到太阳系的概念。直到中世纪晚期的文艺复兴时代,大多数人仍认为地球是静止不动的,处于宇宙的中心,与那些穿过天空的物体是截然不同的。古希腊的哲学家阿里斯塔克斯曾经推测了日心说体系,但是,直到尼古拉·哥白尼才提出了第一个日心说宇宙的数学模型[14][15]。到了17世纪,伽利略·伽利莱、约翰内斯·开普勒和艾萨克·牛顿拓展了人们对物理学的理解,人们开始普遍接受地球围绕太阳运动的观念,认为地球和其他行星遵循同样的物理规律。望远镜的发明,使人们发现了更多的行星和卫星。望远镜改进和无人航天器的应用,使人们得以对其他行星的地质现象进行研究,比如山、坑穴等,另外还可以气象现象进行观察,比如云、沙尘暴和冰帽等。 望遠鏡的觀測 主条目:太陽系年表 艾薩克·牛頓的望遠鏡複製品 太陽系的第一次探測是由望遠鏡開啟的,始於天文學家首度開始繪製這些因光度暗淡而肉眼看不見的天體之際。 伽利略是第一位發現太陽系天體細節的天文學家。他發現月球的火山口,太陽的表面有黑子,木星有4顆衛星環繞著[16]。惠更斯追隨著伽利略的發現,發現土星的衛星泰坦和土星環的形狀[17]。後繼的乔瓦尼·多梅尼科·卡西尼發現了4顆土星的衛星,還有土星環的卡西尼縫、木星的大紅斑[18]。 愛德蒙·哈雷认识到在1705年出現的彗星,實際上是每隔75-76年就會重複出現的一顆彗星,現在稱為哈雷彗星。這是除了行星之外的天體會圍繞太陽公轉的第一個證據[19]。 1781年,威廉·赫歇耳在觀察一顆它認為的新彗星時,戒慎恐懼的宣布在金牛座發現了彗星。事實上,它的軌道顯示是一顆行星,天王星,這是第一顆被發現的行星[20]。 1801年,朱塞普·皮亞齊發現穀神星,這是位於火星和木星軌道之間的一個小世界,而一開始他被當成一顆行星。然而,接踵而來的發現使在這個區域內的小天體多達數以萬計,導致他們被重新歸類為小行星[21]。 到了1846年,天王星軌道的誤差導致許多人懷疑是不是有另一顆大行星在遠處對它施力。埃班·勒维耶的計算最終導致了海王星的發現[22]。在1859年,因為水星軌道的近日點有一些牛顿力学无法解释的微小运动(「水星近日點進動」),因而有人假設有一顆水內行星祝融星(中文常译为“火神星”)存在;但这一运动最终被证明可以用广义相对论来解释,但某些天文学家仍未放弃对“水内行星”的探寻。 為解釋外行星軌道明顯的偏差,帕西瓦尔·罗威尔認為在其外必然還有一顆行星存在,並稱之為X行星。在他過世後,他的羅威爾天文台繼續搜尋的工作,終於在1930年由汤博發現了冥王星。但是,冥王星是如此的小,實在不足以影響行星的軌道,因此它的發現純屬巧合。就像穀神星,他最初也被當作行星,但是在鄰近的區域內發現了許多大小相近的天體,因此在2006年冥王星被國際天文學聯合會重新分類為矮行星[22]。 在1992年,夏威夷大學的天文學家大衛·朱維特和麻省理工學院的珍妮·劉發現1992 QB1,被證明是一個冰冷的、類似小行星帶的新族群,也就是現在所知的柯伊伯带,冥王星和凱倫都只是其中的成員[23][24]。 米高·布朗、乍德·特魯希略和大衛·拉比諾維茨在2005年宣布發現的鬩神星是比冥王星大的離散盤上天體,是在海王星之後繞行太陽的最大天體[25]。 太空船的觀測 主条目:太陽系探索時間線 藝術家筆下的先鋒10號,它在1983年飛越冥王星的軌道,最後的訊息是在2003年傳送回來的,當時的距離大約是82天文單位。這艘35歲高齡的太空船目前正以每小時27,000公里的速度遠離太陽[26]。 自從进入太空時代,許多的探測都是各國的太空機構所組織和執行的無人太空船探測任務。 太陽系內所有的行星都已經被由地球發射的太空船探訪,進行了不同程度的各種研究。雖然都是無人的任務,人類還是能觀看到所有行星表面近距離的照片,在有登陸艇的情況下,還進行了對土壤和大氣的一些實驗。 第一個進入太空的人造天體是前蘇聯在1957年發射的史潑尼克一號,成功的環繞地球一年之久。美國在1959年發射的探險家6號,是第一個從太空中送回影像的人造衛星。 第一個成功的飛越過太陽系內其他天體的是月球1號,在1959年飛越了月球。最初是打算撞擊月球的,但卻錯過了目標成為第一個環繞太陽的人造物體。水手2號是第一個環繞其他行星的人造物體,在1962年繞行金星。第一顆成功環繞火星的是1964年的水手4號。直到1974年才有水手10號前往水星。 暗淡藍點是航海家1號從60億公里外拍攝的地球影像(圓圈中的點)。條狀的光紋是來自太陽的繞射光芒(延伸到框架的左邊)。 探測外行星的第一艘太空船是先鋒10號,在1973年飛越木星。在1979年,先驱者11号成為第一艘拜訪土星的太空船。航海家計畫在1977年先後發射了兩艘太空船進行外行星的大巡航,在1979年探訪了木星,1980和1981年先後訪視了土星。航海家2號繼續在1986年接近天王星和在1989年接近海王星。航海家太空船已經遠離海王星軌道外,在發現和研究終端震波、日鞘和日球層頂的路徑上繼續前進。依據NASA的資料,兩艘航海家太空船已經在距離太陽大約93天文單位處接觸到終端震波[27][28]。 還沒有太空船曾經造訪過柯伊伯带天體。而在2006年1月19日發射的新視野號將成為第一艘探測這個區域的人造太空船。這艘無人太空船預計在2015年飛越冥王星。如果这被證明是可行的,任務將會擴大以繼續觀察一些柯伊伯带的其他天體[29]。 在1966年,月球成為除了地球之外第一個有人造衛星繞行的太陽系天體(月球10號),然後是火星在1971年(水手9號),金星在1975年(金星9號),木星在1995年(伽利略號,也在1991年首先飛掠過小Gaspra),愛神星在2000年(會合-舒梅克號),和土星在2004年(卡西尼號-惠更斯號)。信使號太空船在2011年3月18日開始第一次繞行水星的軌道;同一時間,黎明號太空船將設定軌道在2011年環繞灶神星,並在2015年探索穀神星。 第一個在太陽系其它天體登陸的计划是前蘇聯在1959年登陸月球的月球2號。從此以後,抵達越來越遙遠的行星,在1966年計畫登陸或撞擊金星(金星3號),1971年到火星(火星3號),但直到1976年才有維京1號成功登陸火星,2001年登陸愛神星(會合-舒梅克號),和2005年登陸土星的衛星泰坦(惠更斯)。伽利略太空船也在1995年拋下一個探測器進入木星的大氣層;由於木星沒有固體的表面,這個探測器在下降的過程中被逐漸增高的溫度和壓力摧毀掉。 載人探測 載人的探測目前仍被限制在鄰近地球的環境內。第一個進入太空(以超過100公里的高度來定義)的人是前蘇聯的太空人尤里·加加林,於1961年4月12日搭乘東方一號升空。第一個在地球之外的天體上漫步的是美國宇航員尼爾·阿姆斯特朗,它是在1969年7月21日的阿波羅11號任務中,於月球上完成的。美國的太空梭是能夠重覆使用的太空船,前蘇聯也曾經開發太空梭並已完成一次的無人太空梭升空任務,蘇聯瓦解後,俄羅斯無力繼續維護任其荒廢。第一個空間站是前蘇聯的禮炮1號。在2004年,太空船1號成為在私人的基金資助下第一個進入次軌道的太空船。同年,美国總統乔治·沃克·布什宣布太空探測的远景规划:替換老舊的太空梭、重返月球、甚至載人前往火星,但這計畫在幾年後遭到終止。 構造和成分 Storia delle osservazioni Rappresentazione del 1500 del sistema solare del cartografo Bartolomeu Velho con la Terra al centro dell'universo Sebbene molti dei maggiori corpi celesti del sistema solare fossero già conosciuti sin dai tempi dell'antichità, il concetto stesso era ignorato in quanto vigeva per lo più un'idea di sistema geocentrico con la Terra al centro dell'universo[7]. Uno dei primi a immaginare un sistema eliocentrico fu Aristarco di Samo[8][9], ma le sue idee non presero piede nella comunità dei filosofi e pensatori di allora.[10] Fu solo nel XVI secolo che Niccolò Copernico[7] propose la visione moderna del sistema solare, con al centro il Sole e i pianeti conosciuti allora a orbitare intorno. Gli unici corpi del sistema solare conosciuti erano però solamente i quattro pianeti terrestri, Giove, Saturno, il Sole e la Luna. Nel secolo successivo, con l'invenzione del telescopio di Galileo Galilei, vennero scoperti altri corpi minori[11], come i satelliti medicei, gli anelli di Saturno e alcune comete e per circa 200 anni non si pensava che potessero esserci altri oggetti nel sistema solare, in particolare era ferma la convinzione che i pianeti fossero solo quelli allora conosciuti. Frontespizio della scoperta del nuovo pianeta Cerere Ferdinandea Nel 1781, la scoperta di Urano da parte di William Herschel[12] mise in discussione i preconcetti che la comunità scientifica aveva, generando dubbi relativamente alla possibilità che esistessero pianeti transuranici. Pochi anni dopo, nel 1801, Giuseppe Piazzi dichiarò di aver scoperto un nuovo pianeta, tra le orbite di Marte e Giove[13]; si trattava in realtà di Cerere. La conclusione avvenne escludendo che potesse trattarsi di una cometa e non conoscendo altri oggetti diversi da pianeti e comete, del tutto ignaro che avesse scoperto un nuovo tipo di oggetto, l'asteroide. Da allora le scoperte di nuovi oggetti si moltiplicarono, in particolare vennero scoperti tanti nuovi asteroidi. Nel 1846 venne scoperto un pianeta in modo del tutto rivoluzionario: prima dell'osservazione diretta, si calcolarono le perturbazioni dell'orbita di Urano e se ne dedusse che doveva esistere un pianeta in un punto preciso dello spazio per giustificare le discrepanze osservate[14]. Pochi giorni dopo, Johann Gottfried Galle e Heinrich Louis d'Arrest confermarono la presenza di Nettuno a meno di un grado di distanza dal punto calcolato. Nel 1930, la scoperta di Plutone aumentò il numero di pianeti conosciuti a nove[15], ritenuto allora un oggetto di massa molto maggiore di quanto effettivamente sia. Negli anni '50 Jan Oort ipotizzò l'esistenza di un vivaio di comete ben al di là delle orbite dei pianeti conosciuti[16], situato a decine di migliaia di UA dal Sole, la nube di Oort (la parte più esterna del Sistema Solare) che quando venivano perturbate modificavano consistentemente la propria orbita fino ad arrivare nella zona interna del sistema. Nel 1992, la scoperta di Albion riavviò la ricerca di oggetti transnettuniani[17]. L'avvento di sistemi automatici di ricerca permise la scoperta di migliaia di oggetti dal diametro tra i 50 e 2500 km. La scoperta di Eris, di dimensioni simili a Plutone, nel 2005 mise in discussione la stessa definizione di pianeta[18], che fu cambiata e formalizzata nel 2006 dall'Unione Astronomica Internazionale, declassando Plutone a pianeta nano e riportando a otto il numero totale di pianeti[19]. Formazione Lo stesso argomento in dettaglio: Formazione ed evoluzione del sistema solare. Rappresentazione artistica del sistema solare primordiale Le teorie più accreditate sulla formazione del sistema solare, descrivono la sua nascita 4,6 miliardi di anni fa a partire dalla frammentazione e dal collasso gravitazionale di una gigantesca nube molecolare dal diametro di 65 anni luce[20]. Uno di questi frammenti, dalle dimensioni iniziali di 2000-20000 unità astronomiche, collassò in quello che è noto come disco protoplanetario[21]. I componenti principali di questa fucina primordiale erano per il 98% idrogeno, elio e litio primordiali, formatisi con la nucleosintesi poco dopo il Big Bang, e altri elementi più pesanti espulsi da stelle formatesi ed esplose in qualche generazione precedente[22]. Al centro collassò una quantità di gas e polveri tale da raggiungere la massa necessaria per innescare le reazioni termonucleari, e nacque una protostella, mentre i pianeti si generarono per accrescimento, formando all'inizio qualche decina di piccoli pianeti che nel sistema caotico primordiale ogni tanto si scontravano per formare corpi sempre più grandi[23]. La contrazione causò un aumento della velocità di rotazione e della forza centrifuga del sistema. Così la nube si sarebbe appiattita, assumendo un aspetto simile a un disco rotante intorno al Sole[24]. Mentre il nucleo del proto-Sole si riscaldava fino a raggiungere le temperature necessarie per le reazioni termonucleari, nel disco circostante accrescevano alcuni corpi attraverso delle collisioni e attirando frammenti più piccoli presenti nello spazio circostante. Si sarebbero formati così i protopianeti, dai quali sarebbero derivati gli attuali pianeti, mentre il proto-Sole si trasformava in una stella gialla e stabile. Nelle prime fasi di attività solare, la temperatura nel sistema solare interno era troppo alta per permettere a elementi leggeri di condensare; i pianeti interni tendevano ad accrescersi con elementi pesanti, diventando in futuro pianeti rocciosi[24]. Il vento solare contribuiva a spazzare via gli elementi leggeri verso le regioni più esterne, soprattutto l'idrogeno e l'elio. Il sistema solare esterno manteneva una temperatura relativamente bassa, permettendo a sostanze come metano e acqua di condensare[24]. La differenza in questo tipo di accrescimento ha determinato le caratteristiche dei pianeti, piccoli e rocciosi all'interno, per la scarsa presenza di elementi pesanti e giganti all'esterno, che gli hanno permesso di catturare i gas di idrogeno e elio sparsi nello spazio[24]. Struttura Il principale corpo celeste del sistema solare è il Sole, una stella della sequenza principale di classe spettrale G2 V (nana gialla[25]), contenente il 99,86%[26] di tutta la massa conosciuta nel sistema solare. Giove e Saturno, i due pianeti più massicci che orbitano attorno al Sole, costituiscono più del 90% della massa restante. La maggior parte dei grandi oggetti in orbita intorno al Sole sono in un piano simile a quello dell'orbita terrestre, chiamata eclittica[27]. Tipicamente, il piano di orbita dei pianeti è molto vicino a quello dell'eclittica mentre le comete e gli oggetti della cintura di Kuiper hanno un angolo significativamente maggiore rispetto al nostro. Tutti i pianeti e la maggior parte degli altri oggetti orbitano nello stesso senso della rotazione del Sole, in senso antiorario dal punto di vista di un osservatore situato al di sopra del polo nord solare. Certi oggetti orbitano in un senso orario, come la cometa di Halley[28]. Le traiettorie degli oggetti che gravitano intorno al sole seguono le leggi di Keplero[29]. Sono approssimativamente delle ellissi di cui uno dei fuochi è il Sole. Le orbite dei pianeti sono quasi circolari mentre quelle dei corpi più piccoli presentano una maggiore eccentricità e possono risultare molto ellittiche. La distanza di un corpo dal Sole varia durante la sua rivoluzione. Il punto più vicino al sole dell'orbita di un corpo si chiama perielio, mentre il più lontano è l'afelio[30]. Il sistema solare è convenzionalmente diviso in due zone. Il sistema solare interno[31] include i quattro pianeti rocciosi e la cintura di asteroidi. Il resto del sistema viene considerato sistema solare esterno[32]. La maggioranza dei pianeti del sistema solare possiede dei corpi in rotazione intorno ad essi, chiamati satelliti naturali o lune. I quattro pianeti più grandi hanno anche degli anelli planetari. Il sistema solare; i pianeti sono raffigurati in scala per grandezza, mentre la scala delle distanze è fornita in basso a destra. Sono indicati inoltre i 5 asteroidi più massicci, i plutoidi e le lune maggiori. Alcuni software anche open-source come WorldWide Telescope permettono di vedere l'intero Sistema Solare e i suoi migliaia di oggetti celesti, con la rotazione differenziata degli stessi in qualsiasi istante di tempo passato e futuro. Composizione Gli elementi chimici che predominano nel sistema solare sono idrogeno ed elio primordiali, concentrati per lo più nel Sole, dove la loro massa costituisce circa il 98%, e nei due pianeti più grandi, Giove e Saturno. In minori percentuali, sono presenti tutti gli elementi della tavola periodica nelle loro forme stabili e nei principali isotopi. Fisicamente, quasi tutti i corpi si trovano in rotazione attorno al centro di massa del sistema nella stessa direzione, contribuendo in modo differente al momento angolare del sistema solare; stranamente, il Sole, nonostante la sua notevole massa, contribuisce solo allo 0,5%[33] del momento angolare totale, essendo molto vicino al baricentro. Das (auch unser) Sonnensystem ist das Planetensystem, in dem sich die Erde und damit alle bekannten Lebewesen befinden. Es besteht aus der Sonne, acht sie umkreisenden Planeten (von innen nach außen: Merkur, Venus, Erde, Mars, Jupiter, Saturn, Uranus und Neptun[2]), deren natürlichen Satelliten, den Zwergplaneten, anderen Kleinkörpern (Kometen, Asteroiden und Meteoroiden) und aus unzähligen Gas- und Staubteilchen, die durch die Anziehungskraft der Sonne an diese gebunden sind. Die Internationale Astronomische Union definiert den Pluto seit 2006 als Zwergplanet und nicht mehr als den äußersten Planeten des Sonnensystems. Inhaltsverzeichnis 1 Aufbau 1.1 Allgemeine Struktur 1.2 Zone der Planeten 1.3 Äußere Zonen 1.4 Ausmaße 2 Umgebung 2.1 Lokale stellare Nachbarschaft 2.2 Milchstraßensystem 3 Entstehung 3.1 Urwolke 3.2 Alter 3.3 Entstehung der Planeten 3.4 Offene Fragen 4 Siehe auch 5 Literatur 6 Weblinks 7 Einzelnachweise Aufbau Allgemeine Struktur Die Sonne ist der Zentralstern des Sonnensystems. Da sie 99,86 % der Gesamtmasse des Systems hat, ist sie sehr nahe dem Baryzentrum des Sonnensystems. In der Reihenfolge ihres Abstands von der Sonne folgen die terrestrischen Planeten Merkur, Venus, Erde und Mars, die den inneren Teil des Planetensystems ausmachen. Den äußeren Teil bilden die Gasplaneten Jupiter, Saturn, Uranus und Neptun. Weitere Begleiter der Sonne sind neben Zwergplaneten Millionen von Asteroiden (auch Planetoiden oder Kleinplaneten genannt) und Kometen, die vorwiegend in drei Kleinkörperzonen des Sonnensystems um die Sonne kreisen: dem Asteroidengürtel zwischen den inneren und den äußeren Planeten, dem Kuipergürtel jenseits der äußeren Planeten und der Oortschen Wolke ganz außen. Die Planetenbahnen sind nur wenig gegenüber der Erdbahnebene geneigt, um höchstens 7°, sie liegen also in einer flachen Scheibe. Bei den meisten der bisher (2019) bekannten Kleinplaneten, speziell denen des Kuipergürtels, beträgt die Neigung weniger als 30°. Für die Oortsche Wolke wird dagegen eine Kugelform angenommen. Innerhalb der von den einzelnen Sonnenbegleitern beherrschten Raumbereiche – ihrer Hill-Sphären – befinden sich oft kleinere Himmelskörper als umlaufende Begleiter dieser Objekte. Nach dem altbekannten Mond der Erde werden sie analog ebenfalls als Monde, aber auch als Satelliten oder Trabanten bezeichnet. Bis auf den Erdmond und den Plutomond Charon sind sie zumindest bei den Planeten und Zwergplaneten wesentlich kleiner als ihr Hauptkörper. Mondlose Ausnahmen unter den Planeten sind nur Merkur und Venus. Eine definitiv untere Grenzgröße, ab der man wie bei den Bestandteilen der Ringe der Gasplaneten nicht mehr von einem Mond spricht, wurde noch nicht offiziell festgelegt. Der Durchmesser der Sonne ist mit etwa 1,39 Millionen Kilometern bei weitem größer als der Durchmesser aller anderen Objekte im System. Die größten dieser Objekte sind die acht Planeten, die vier Jupitermonde Ganymed, Kallisto, Europa und Io (die Galileischen Monde), der Saturnmond Titan und der Erdmond. Zwei Drittel der restlichen Masse von 0,14 % entfallen dabei auf Jupiter. (Siehe auch Liste der größten Objekte im Sonnensystem.) Als Folge der Entstehung des Sonnensystems bewegen sich alle Planeten, Zwergplaneten und der Asteroidengürtel auf ihrer Umlaufbahn um die Sonne im gleichen Umlaufsinn, den man rechtläufig nennt. Sie umrunden die Sonne von Norden gesehen gegen den Uhrzeigersinn. Die meisten größeren Monde bewegen sich ebenfalls in diese Richtung um ihren Hauptkörper. Auch die Rotation der meisten größeren Körper des Sonnensystems erfolgt in rechtläufigem Drehsinn. Von den Planeten dreht sich lediglich die Venus entgegengesetzt, und die Rotationsachse von Uranus liegt nahezu in seiner Bahnebene. Zone der Planeten Die Umlaufbahnen der Planeten (ein Rasterquadrat besitzt jeweils die Kantenlänge 100 Mio. km) Die vier inneren Planeten Mars und die vier äußeren Planeten Der Sonne am nächsten befinden sich die inneren, erdähnlichen Planeten Merkur (Abstand zur Sonne 57,9 Mio. km bzw. 0,39 AE), Venus (108,2 Mio. km bzw. 0,72 AE), Erde (149,6 Mio. km bzw. 1 AE) und Mars (227,9 Mio. km bzw. 1,52 AE). Ihr Durchmesser beträgt zwischen 4878 km und 12756 km, ihre Dichte zwischen 3,95 g/cm³ und 5,52 g/cm³. Innerhalb der habitablen Zone um die Sonne befinden sich jedoch nur die Erde und, je nach Modell, noch ganz knapp der Mars. Zwischen Mars und Jupiter befindet sich der sogenannte Asteroidengürtel, eine Ansammlung von Kleinplaneten. Die meisten dieser Asteroiden sind nur wenige Kilometer groß (siehe Liste der Asteroiden) und nur wenige haben einen Durchmesser von 100 km oder mehr. Ceres ist mit etwa 960 km der größte dieser Körper und gilt als Zwergplanet. Die Bahnen der Asteroiden sind teilweise stark elliptisch, einige kreuzen sogar die Merkur- (Icarus) beziehungsweise die Neptunbahn (Dioretsa). Zu den äußeren Planeten zählen die Gasriesen Jupiter (778,3 Mio. km bzw. 5,2 AE) und Saturn (1,429 Mrd. km bzw. 9,53 AE) sowie die Eisriesen Uranus (2,875 Mrd. km bzw. 19,2 AE) und Neptun (4,504 Mrd. km bzw. 30,1 AE) mit Dichten zwischen 0,7 g/cm³ und 1,66 g/cm³. Die gerundeten (und genauen) Verhältnisse zwischen den Umlaufzeiten der Planeten Merkur Merkur 2:5 (2:5,11) Venus Venus Venus Venus 8:13 (8:13,004) Erde Erde Erde Erde 1:2 (1:1,88) Mars Mars Mars Mars 1:6 (1:6,31) Jupiter Jupiter Jupiter Jupiter 2:5 (2:4,97) Saturn Saturn Saturn Saturn 1:3 (1:2,85) Uranus Uranus Uranus Uranus 1:2 (1:1,96) Neptun Neptun Die mittleren Abstände der Planeten von der Sonne lassen sich durch mathematische Reihen wie der Titius-Bode-Reihe genähert beschreiben. Diese gewisse Regelmäßigkeit der Bahnabstände dürfte auf Resonanzeffekte bei der Entstehung des Sonnensystems zurückzuführen sein. Dass sich der mittlere Abstand des Asteroidengürtels ebenfalls in dieser Reihe einordnen lässt, der von Neptun jedoch nicht, gab und gibt Anlass zu Spekulationen über kosmische Katastrophen. Am nächsten können sich Merkur und Venus mit einer minimalen Distanz von 0,26 AE kommen. Geringfügig größer ist die minimale Entfernung von Venus und Erde. Nimmt man die mittleren Bahnradien, so sind Venus und Erde die Planeten mit der geringsten Distanz zueinander (41 Mio. km oder knapp 0,28 AE). Die Planeten Merkur, Venus, Mars, Jupiter und Saturn waren schon im Altertum als Wandelsterne bekannt und wurden mit einzelnen Göttern in Verbindung gebracht. Die nach Göttern der Römischen Mythologie gewählten Namen haben sich durchgesetzt. Auch die 1781 und 1846 entdeckten Planeten Uranus und Neptun sowie der 1930 entdeckte Zwergplanet Pluto – bis 2006 ebenfalls als Planet eingestuft – wurden aus Gründen der Tradition in ähnlicher Weise benannt. Merksatz zur Reihenfolge der Planeten Um sich die Planeten in ihrer Reihenfolge – nach zunehmendem Sonnenabstand – leichter einprägen zu können, wurden verschiedene Merksprüche ersonnen, meist sogenannte Eselsbrücken in Form eines Akrostichons, z. B. Mein Vater erklärt mir jeden Sonntag unseren Nachthimmel.[3] alternativ „… unsere Nachbarplaneten.“ Ein Merkspruch, der auch die Kleinkörper berücksichtigt, lautet: Mein Vater erklärt mir an jedem Sonntag unsere natürliche kosmische Ordnung.[3] zu lesen als Merkur Venus Erde Mars Asteroiden Jupiter Saturn Uranus Neptun Kuipergürtel Oortsche Wolke. Siehe auch: Liste der Planeten des Sonnensystems Äußere Zonen Die Umlaufbahnen der Objekte des Sonnensystems im Maßstab Seit den 1990er-Jahren wurden tausende Objekte gefunden, die sich jenseits der Neptunbahn bewegen. Fast alle dieser Objekte sind 4,5–7,5 Milliarden km (30–50 AE) von der Sonne entfernt und bilden dort den Kuipergürtel. Er ist ein Reservoir für Kometen mit mittleren Umlaufperioden. Die Objekte dieser Zone sind wahrscheinlich nahezu unveränderte Überbleibsel aus der Entstehungsphase des Sonnensystems; man nennt sie deshalb auch Planetesimale. Der Kuipergürtel enthält eine Reihe von Zwergplaneten wie Pluto, (136199) Eris, (136472) Makemake, (136108) Haumea und eine Reihe weiterer Objekte, die ihrer Größe nach wahrscheinlich Zwergplaneten sind. Der Sonnenwind wirkt im interplanetaren Raum ungehindert bis in den Kuipergürtel und verdrängt die interstellare Materie. Jenseits des Kuipergürtels verlangsamt und verdichtet sich der Teilchenstrom der Sonne durch die Wechselwirkung mit dem interstellaren Medium und bildet als äußere Schale der Heliosphäre die Heliohülle (heliosheath). Die Grenzschicht zwischen der Heliosphäre und dem interstellaren Medium ist die Heliopause in einer Entfernung von circa 120 AE (dem 4-fachen Abstand Neptun–Sonne). Außerhalb der Heliopause befindet sich bis zu einem Abstand zur Sonne von circa 1,5 Lichtjahren (etwa 100.000 AE) theoretisch die Oortsche Wolke. Durch den Einfluss der Gravitation vorbeiziehender Sterne werden aus ihr vermutlich Körper herausgelöst und fallen als langperiodische Kometen in die inneren Bereiche des Sonnensystems. Einige dieser Kometen verbleiben dann auf stark elliptischen Bahnen in der Nähe der Sonne, andere werden von den Planeten, insbesondere von Jupiter, gestört und abgelenkt, so dass sie aus dem Sonnensystem katapultiert werden, auf Planeten oder in die Sonne stürzen. Ausmaße Es gibt keine allgemein anerkannte Definition, wie weit sich das Sonnensystem erstreckt. Oft wurde das Ausmaß des Sonnensystems mit dem der Heliosphäre gleichgesetzt. Aber mit der Entdeckung weit entfernter Transneptunischer Objekte war bewiesen, dass es auch jenseits der Heliopause gravitativ an die Sonne gebundene Objekte gibt. Da astronomische Dimensionen für die meisten Menschen schwer vorstellbar sind, ist ein maßstabsgerecht verkleinertes Modell des Sonnensystems oder der Besuch eines Planetenweges hilfreich, um sich die Größenverhältnisse und Distanzen der Objekte zu veranschaulichen. Структура Орбиты объектов Солнечной системы, в масштабе (по часовой стрелке, начиная с верхней левой части) Центральным объектом Солнечной системы является Солнце — звезда главной последовательности спектрального класса G2V, жёлтый карлик. В Солнце сосредоточена подавляющая часть всей массы системы (около 99,866 %), оно удерживает своим тяготением планеты и прочие тела, принадлежащие к Солнечной системе[21]. Четыре крупнейших объекта — газовые гиганты — составляют 99 % оставшейся массы (при этом большая часть приходится на Юпитер и Сатурн — около 90 %). Большинство крупных объектов, обращающихся вокруг Солнца, движется практически в одной плоскости, называемой плоскостью эклиптики. В то же время кометы и объекты пояса Койпера часто обладают большими углами наклона к этой плоскости[22][23]. Все планеты и большинство других объектов обращаются вокруг Солнца в одном направлении с вращением Солнца (против часовой стрелки, если смотреть со стороны северного полюса Солнца). Есть исключения, такие как комета Галлея. Самой большой угловой скоростью обладает Меркурий — он успевает совершить полный оборот вокруг Солнца всего за 88 земных суток. А для самой удалённой планеты — Нептуна — период обращения составляет 165 земных лет. Бо́льшая часть планет вращается вокруг своей оси в ту же сторону, что и обращается вокруг Солнца. Исключения составляют Венера и Уран, причём Уран вращается практически «лёжа на боку» (наклон оси около 90°). Для наглядной демонстрации вращения используется специальный прибор — теллурий. Многие модели Солнечной системы условно показывают орбиты планет через равные промежутки, однако в действительности, за малым исключением, чем дальше планета или пояс от Солнца, тем больше расстояние между её орбитой и орбитой предыдущего объекта. Например, Венера приблизительно на 0,33 а.е. дальше от Солнца, чем Меркурий, в то время как Сатурн на 4,3 а.е. дальше Юпитера, а Нептун на 10,5 а.е. дальше Урана. Были попытки вывести корреляции между орбитальными расстояниями (например, правило Тициуса — Боде)[24], но ни одна из теорий не стала общепринятой. Орбиты объектов вокруг Солнца описываются законами Кеплера. Согласно им, каждый объект обращается по эллипсу, в одном из фокусов которого находится Солнце. У более близких к Солнцу объектов (с меньшей большой полуосью) больше угловая скорость вращения, поэтому короче период обращения (год). На эллиптической орбите расстояние объекта от Солнца изменяется в течение его года. Ближайшая к Солнцу точка орбиты объекта называется перигелий, наиболее удалённая — афелий. Каждый объект движется быстрее всего в своём перигелии и медленнее всего - в афелии. Орбиты планет близки к кругу, но многие кометы, астероиды и объекты пояса Койпера имеют сильно вытянутые эллиптические орбиты. Большинство планет Солнечной системы обладает собственными подчинёнными системами. Многие окружены спутниками, некоторые из спутников по размеру превосходят Меркурий. Большинство крупных спутников находится в синхронном вращении, одна их сторона постоянно обращена к планете. Четыре крупнейшие планеты — газовые гиганты — обладают также кольцами, тонкими полосами крошечных частиц, обращающимися по очень близким орбитам практически в унисон. Терминология Иногда Солнечную систему разделяют на регионы. Внутренняя часть Солнечной системы включает четыре планеты земной группы и пояс астероидов. Внешняя часть начинается за пределами пояса астероидов и включает четыре газовых гиганта[25]. Планеты внутри области астероидов иногда называют внутренними, а вне пояса — внешними[26]. Однако иногда эти термины используются для нижних (находящихся внутри земной орбиты) и верхних (находящихся за пределами земной орбиты) планет, соответственно[27]. После открытия пояса Койпера наиболее удалённой частью Солнечной системы считают регион, состоящий из объектов, расположенных дальше Нептуна[28]. Все объекты Солнечной системы, обращающиеся вокруг Солнца, официально делят на три категории: планеты, карликовые планеты и малые тела Солнечной системы. Планета — любое тело на орбите вокруг Солнца, оказавшееся достаточно массивным, чтобы приобрести сферическую форму, но недостаточно массивным для начала термоядерного синтеза, и сумевшее очистить окрестности своей орбиты от планетезималей. Согласно этому определению, в Солнечной системе имеется восемь известных планет: Меркурий, Венера, Земля, Марс, Юпитер, Сатурн, Уран и Нептун. Плутон (до 2006 года считавшийся планетой) не соответствует этому определению, поскольку не очистил свою орбиту от окружающих объектов пояса Койпера[29]. Карликовая планета — небесное тело, обращающееся по орбите вокруг Солнца; которое достаточно массивно, чтобы под действием собственных сил гравитации поддерживать близкую к округлой форму, но которое не очистило пространство своей орбиты от планетезималей и не является спутником планеты[29]. По этому определению у Солнечной системы имеется пять признанных карликовых планет: Церера, Плутон, Хаумеа, Макемаке и Эрида[30]. В будущем другие объекты могут быть классифицированы как карликовые планеты, например, Седна, Орк и Квавар[31]. Карликовые планеты, чьи орбиты находятся в регионе транснептуновых объектов, называют плутоидами[32]. Оставшиеся объекты, обращающиеся вокруг Солнца, — малые тела Солнечной системы[29]. Термины газ, лёд и камень используют, чтобы описать различные классы веществ, встречающихся повсюду в Солнечной системе. Камень используется, чтобы описать соединения с высокими температурами конденсации или плавления, которые оставались в протопланетной туманности в твёрдом состоянии при почти всех условиях[33]. Каменные соединения обычно включают силикаты и металлы, такие как железо и никель[34]. Они преобладают во внутренней части Солнечной системы, формируя большинство планет земной группы и астероидов. Газы — вещества с чрезвычайно низкими температурами плавления и высоким давлением насыщенного пара, такие как молекулярный водород, гелий и неон, которые в туманности всегда были в газообразном состоянии[33]. Они доминируют в средней части Солнечной системы, составляя большую часть Юпитера и Сатурна. Льды таких веществ, как вода, метан, аммиак, сероводород и углекислый газ[34] имеют температуры плавления до нескольких сотен кельвинов, в то время как их термодинамическая фаза зависит от окружающего давления и температуры[33]. Они могут встречаться как льды, жидкости или газы в различных регионах Солнечной системы, в туманности же они были в твёрдой или газовой фазе[33]. Большинство спутников планет-гигантов содержит ледяные субстанции, также они составляют большую часть Урана и Нептуна (так называемых «ледяных гигантов») и многочисленных малых объектов, расположенных за орбитой Нептуна[34][35]. Газы и льды вместе классифицируют как летучие вещества[36]. Le Système solaire (avec majuscule), ou système solaire (sans majuscule), est le système planétaire du Soleil, auquel appartient la Terre. Il est composé de cette étoile et des objets célestes gravitant autour d'elle : les huit planètes confirmées et leurs 214 satellites naturels connus (appelés usuellement des « lunes »), les cinq planètes naines et leurs neuf satellites connus, ainsi que des milliards de petits corps (la presque totalité des astéroïdes et autres planètes mineures, les comètes, les poussières cosmiques, etc.). Le Système solaire fait partie de la galaxie appelée Voie lactée, où il réside dans le bras d'Orion. Il est situé à environ 8 kpc (∼26 100 al) du centre galactique, autour duquel il effectue une révolution en 225 à 250 millions d'années. Il s'est formé il y a un peu moins de 4,6 milliards d'années à partir de l'effondrement gravitationnel d'un nuage moléculaire, suivi de la constitution d'un disque protoplanétaire selon l'hypothèse de la nébuleuse. De façon schématique, le Système solaire est composé du Soleil, qui le domine gravitationnellement — il comprend 99,85 % de sa masse — et fournit de l'énergie par fusion nucléaire de l'hydrogène en hélium. Par ordre d'éloignement croissant à l'étoile, le Système solaire interne comprend quatre planètes telluriques internes, principalement composées de roches et de métaux (Mercure, Vénus, la Terre et Mars) puis une ceinture d'astéroïdes de petits corps rocheux, dont la planète naine Cérès. Plus loin orbitent les quatre planètes géantes du Système solaire externe : successivement deux géantes gazeuses constituées majoritairement d'hydrogène et d'hélium que sont Jupiter et Saturne — qui contiennent par ailleurs la grande majorité de la masse totale en orbite autour du Soleil — et deux géantes de glaces que sont Uranus et Neptune, contenant une plus grande part de substances volatiles comme l'eau, l'ammoniac et le méthane. Tous ont une orbite proche du cercle et sont concentrés près du plan de l'écliptique, le plan de rotation de la Terre. Les objets situés au-delà de l'orbite de Neptune, dits transneptuniens, comprennent notamment la ceinture de Kuiper et le disque des objets épars, formés d'objets glacés. Quatre planètes naines glacées se trouvent dans la région transneptunienne et sont également appelées plutoïdes : Pluton — auparavant classée comme planète —, Hauméa, Makémaké et Éris. L'héliopause, limite magnétique du Système solaire, est définie par l'arrêt des vents solaires face aux vents du milieu interstellaire à une centaine d'unités astronomiques, tandis que la limite gravitationnelle du Système solaire se situe bien plus loin encore, jusqu'à une ou deux années-lumière du Soleil, vers laquelle une zone sphérique hypothétique, le nuage de Oort, pourrait exister et être la source des comètes à longue période. Toutes les planètes du Système solaire à partir de la Terre possèdent des satellites en orbite — certains, tels que Ganymède et Titan, sont plus grands que Mercure —, tandis que chacune des quatre planètes externes est en outre entourée d’un système d'anneaux de poussières et d’autres particules, dont le plus proéminent est celui de Saturne. Toutes les planètes, sauf la Terre, portent les noms de dieux et déesses de la mythologie romaine. La Terre, dotée d'une épaisse atmosphère et recouverte à 71 % de sa surface d'eau liquide, est la seule planète du Système solaire à abriter la vie et une espèce pensante qui agit sur son évolution. Dans l'état des connaissances humaines, cette planète du Système solaire ne connait pas d'équivalent dans l'Univers. Terminologie Articles connexes : Définition des planètes, Définition des planètes de l'Union astronomique internationale et Planète naine. Infographie représentant le Soleil à gauche, puis les planètes et planètes naines ordonnées vers la droite. Planètes et planètes naines du Système solaire. Les dimensions du Soleil et des planètes sont à l’échelle, mais pas les distances qui les séparentb. Depuis la décision prise le 24 août 2006 par l'Union astronomique internationale, les objets ou corps orbitant directement autour du Soleil sont officiellement divisés en trois classes : planètes, planètes naines et petits corps8. Une planète est un corps en orbite autour du Soleil, suffisamment massif pour avoir une forme sphérique et avoir nettoyé son voisinage immédiat de tous les objets plus petits9. On connaît huit planètes : Mercure, Vénus, la Terre, Mars, Jupiter, Saturne, Uranus et Neptune qui sont toutes nommées, sauf la Terre, d'après des divinités de la mythologie romaine8,10. La plupart de leurs satellites naturels sont, eux aussi, nommés d'après des personnages de la mythologie grecque ou romaine11. Une planète naine est un corps en orbite autour du Soleil qui, bien que suffisamment massif pour avoir une forme sphérique — concept appelé équilibre hydrostatique —, n’a pas fait place nette dans son voisinage8,9. En 2021, cinq corps sont officiellement désignés de la sorte : Cérès, Pluton, Éris, Makémaké et Hauméa12. D’autres corps pourraient l’être dans le futur, tels que Gonggong, Quaoar, Sedna ou Orcus13,14. Tous les autres objets en orbite directe autour du Soleil sont classés comme petits corps du Système solaire8. Les 214 satellites naturels — en 2021, 158 sont confirmés et 56 sont non confirmés, donc sans nom —, ou lunes, sont les objets en orbite autour des planètes, des planètes naines et des petits corps du Système solaire plutôt qu'autour du Soleil2. Les statuts ambigus de la Lune et surtout de Charon, qui pourraient former un système binaire avec respectivement la Terre et Pluton, ne sont pas encore définitivement tranchés, bien que ces corps soient toujours classés comme satellites15,16. La classification proposée par l'Union astronomique internationale ne fait pas l'unanimité. À la suite du vote de 2006, une pétition réunissant les signatures de plus de 300 planétologues et astronomes majoritairement américains — Pluton étant alors la seule planète découverte par un Américain — est lancée pour contester la validité scientifique de la nouvelle définition d'une planète ainsi que son mode d'adoption17,18,19. Les responsables de l'UAI annoncent qu'aucun retour en arrière n'aura lieu et les astronomes jugent très improbable que Pluton puisse être à nouveau considérée comme une planète20,21. Concernant la majuscule au nom « Système solaire », la forme tout en minuscules est, au sens strict, suffisante, étant donné qu'il n'y a qu'un « système solaire » puisqu'il n'y a qu'un « Soleil ». Cependant, les autres étoiles étant parfois, par analogie, appelées des « soleils », le nom de « système solaire » est de la même façon parfois employé dans un sens général pour signifier « système planétaire » ; « Système solaire », écrit avec une majuscule, permet alors de distinguer notre système planétaire, par ellipse de « système planétaire solaire »22,23. Die Sonnestelsel bestaan uit die Son en die ander hemelliggame wat deur swaartekrag daaraan gebind is en daarom wentel. Die hemelliggame in ons sonnestelsel bestaan uit die agt planete, hulle 166 bekende mane,[1] vyf dwergplanete en biljoene ander klein liggame. Hierdie klein liggame, of klein sonnestelselvoorwerpe (KSV's), sluit asteroïdes, ysige Kuiper-gordelvoorwerpe, komete, meteoroïdes en interplanetêre stof in. Die Aarde is die derde planeet van die Sonnestelsel. Die gekarteerde streke van die Sonnestelsel is die Son, vier aardse binnenste planete, die asteroïdegordel, vier buitenste planete (die reuseplanete), die Kuiper-gordel en die verstrooide skyf. Die teoretiese Oort-wolk bestaan moontlik op 'n afstand ongeveer duisend maal verder as die gekarteerde streke. Die vloei van plasma vanaf die Son (deur die sonwind) deurdring die Sonnestelsel. Dit skep 'n stellêre windbel in die interstellêre medium, genaamd die helio- of sonsfeer, wat tot in die middel van die verstrooide skyf strek. Die planete in die Sonnestelsel (in volgorde van hulle afstand van die Son) is: Mercurius Venus Aarde Mars Jupiter Saturnus Uranus Neptunus Met die ingang van 2009 is vyf kleiner voorwerpe as dwergplanete geklassifiseer. Ceres is in die asteroïdegordel en vier ander wentel om die Son agter Neptunus: Pluto (voorheen as die negende planeet geklassifiseer), Haumea, Makemake en Eris. Ses van die planete en drie van die dwergplanete word deur natuurlike satelliete omwentel. Daar word gewoonlik na hierdie satelliete as "mane" verwys, soos die Aarde se eie maan. Al die buitenste planete word deur planetêre ringe van stof en ander partikels omring. Sedert 2016 is daar aanwysings dat daar moontlik nog 'n Planeet Nege bestaan in 'n baie groot wentelbaan. Este artículo trata sobre el sistema en el que están el Sol y la Tierra. Para otros sistemas, véanse sistema planetario y sistema estelar. Sistema solar El Sol y los planetas del sistema solar. Los tamaños están a escala, pero no así las distancias. Datos generales Edad 4568 millones de años Localización Nube Interestelar Local, Burbuja Local, Brazo de Orión, Vía Láctea Estrella más cercana Próxima Centauri (4,22 al) Sistema planetario conocido más cercano Alfa Centauri (4,37 al) Sistema Planetario Semieje mayor al planeta exterior (Neptuno) 4500 millones de kilómetros (30,10 UA) Distancia al acantilado de Kuiper 50 UA N.º de estrellas conocidas 1 (Sol) N.º de planetas conocidos 8 N.º conocido de planetas enanos 5 (docenas pendientes de aceptación) N.º conocido de satélites naturales 400 (176 de los planetas) N.º conocido de planetas menores 587 479 N.º conocido de cometas 3153 N.º de satélites asteroidales 19 Órbita alrededor del centro galáctico Inclinación del plano invariable respecto al plano galáctico 60° Distancia al centro galáctico 27 000±1 000 al Velocidad orbital 220 km/s Periodo orbital 225-250 Ma Propiedades de la estrella relacionada Tipo espectral G2V Línea de congelamiento 2,7 UA Distancia a la heliopausa ~120 UA Esfera de Hill ~1-2 al El sistema solar1​ es el sistema planetario que liga gravitacionalmente a un conjunto de objetos astronómicos que giran directa o indirectamente en una órbita alrededor de una única estrella conocida con el nombre de Sol.2​ La estrella concentra el 99,86 % de la masa del sistema solar,3​4​5​ y la mayor parte de la masa restante se concentra en ocho planetas cuyas órbitas son prácticamente circulares y transitan dentro de un disco casi llano llamado plano eclíptico.6​ Los cuatro planetas más cercanos, considerablemente más pequeños, Mercurio, Venus, Tierra y Marte, también conocidos como los planetas terrestres, están compuestos principalmente por roca y metal.7​8​ Mientras que los cuatro más alejados, denominados gigantes gaseosos o «planetas jovianos», más masivos que los terrestres, están compuestos de hielo y gases. Los dos más grandes, Júpiter y Saturno, están compuestos principalmente de helio e hidrógeno. Urano y Neptuno, denominados gigantes helados, están formados mayoritariamente por agua congelada, amoniaco y metano.9​ El Sol y los planetas del sistema solar. Los tamaños están a escala, pero no así las distancias. El Sol es el único cuerpo celeste del sistema solar que emite luz propia,10​ debido a la fusión termonuclear del hidrógeno y su transformación en helio en su núcleo.11​ El sistema solar se formó hace unos 4600 millones de años12​13​14​ a partir del colapso de una nube molecular. El material residual originó un disco circunestelar protoplanetario en el que ocurrieron los procesos físicos que llevaron a la formación de los planetas.10​ El sistema solar se ubica en la actualidad en la nube Interestelar Local que se halla en la Burbuja Local del brazo de Orión, de la galaxia espiral Vía Láctea, a unos 28 000 años luz del centro de esta.15​ Concepción artística de un disco protoplanetario El sistema solar es también el hogar de varias regiones compuestas por objetos pequeños. El cinturón de asteroides, ubicado entre Marte y Júpiter, es similar a los planetas terrestres ya que está constituido principalmente por roca y metal. En este cinturón se encuentra el planeta enano Ceres. Más allá de la órbita de Neptuno están el cinturón de Kuiper, el disco disperso y la nube de Oort, que incluyen objetos transneptunianos formados por agua, amoníaco y metano principalmente. En este lugar existen cuatro planetas enanos: Haumea, Makemake, Eris y Plutón, el cual fue considerado el noveno planeta del sistema solar hasta 2006. Este tipo de cuerpos celestes ubicados más allá de la órbita de Neptuno son también llamados plutoides, los cuales junto a Ceres, poseen el suficiente tamaño para que se hayan redondeado por efectos de su gravedad, pero que se diferencian principalmente de los planetas porque no han vaciado su órbita de cuerpos vecinos.16​ Adicionalmente a los miles de objetos pequeños de estas dos zonas, algunas docenas de los cuales son candidatos a planetas enanos, existen otros grupos como cometas, centauros y polvo cósmico que viajan libremente entre regiones. Seis planetas y cuatro planetas enanos poseen satélites naturales. El viento solar, un flujo de plasma del Sol, crea una burbuja de viento estelar en el medio interestelar conocido como heliosfera, la que se extiende hasta el borde del disco disperso. La nube de Oort, la cual se cree que es la fuente de los cometas de período largo, es el límite del sistema solar y su borde está ubicado a un año luz desde el Sol.17​ A principios del año 2016, se publicó un estudio según el cual puede existir un noveno planeta en el sistema solar, al que dieron el nombre provisional de Phattie.18​ Se estima que el tamaño de Phattie sería entre el de Neptuno y la Tierra y que el hipotético planeta sería de composición gaseosa. Descubrimientos y exploración Véanse también: Anexo:Cronología del descubrimiento de los planetas del sistema solar y sus satélites naturales y Exploración del sistema solar. Nicolás Copérnico Algunas de las más antiguas civilizaciones concibieron al universo desde una perspectiva geocéntrica, como en Babilonia en donde su visión del mundo estuvo representada de esta forma.19​ En Occidente, el griego presocrático Anaximandro declaró a la Tierra como centro del universo, imaginó a esta como un pilar en forma de tambor equilibrado en sus cuatro puntos más distantes lo que, en su opinión, le permitió tener estabilidad.20​ Pitágoras y sus seguidores hablaron por primera vez del planeta como una esfera, basándose en la observación de los eclipses;21​ y en el siglo IV a. C. Platón junto a su estudiante Aristóteles escribieron textos del modelo geocéntrico de Anaximandro, fusionándolo con el esférico pitagórico. Pero fue el trabajo del astrónomo heleno Claudio Ptolomeo, especialmente su publicación llamada Almagesto expuesta en el siglo II de nuestra era, el cual sirvió durante un período de casi 1300 años como la norma en la cual se basaron tanto astrónomos europeos como islámicos. Si bien el griego Aristarco presentó en el siglo siglo III a. C. a la teoría heliocéntrica y más adelante el matemático hindú Aryabhata hizo lo mismo, ningún astrónomo desafió realmente el modelo geocéntrico hasta la llegada del polaco Nicolás Copérnico el cual causó una verdadera revolución en esta rama a nivel mundial,22​ por lo cual es considerado el padre de la astronomía moderna.23​ Esto debido a que, a diferencia de sus antecesores, su obra consiguió una amplia difusión pese a que fue concebida para circular en privado; el papa Clemente VII pidió información de este texto en 1533 y Lutero en 1539 lo calificó de «astrólogo advenedizo que pretende probar que la Tierra es la que gira».24​ La obra de Copérnico otorga dos movimientos a la Tierra, uno de rotación en su propio eje cada 24 horas y uno de traslación alrededor del Sol cada año, con la particularidad de que este era circular y no elíptico como lo describimos hoy. En el siglo XVII, el trabajo de Copérnico fue impulsado por científicos como Galileo Galilei, quien ayudado con un nuevo invento, el telescopio, descubre que alrededor de Júpiter rotan satélites naturales que afectaron en gran forma la concepción de la teoría geocéntrica ya que estos cuerpos celestes no orbitaban a la Tierra;25​26​ lo que ocasionó un gran conflicto entre la Iglesia y los científicos que impulsaban esta teoría, el cual culminó con el apresamiento y sentencia del tribunal de la inquisición a Galileo por herejía al estar su idea contrapuesta con el modelo clásico religioso.27​ Su contemporáneo Johannes Kepler, a partir del estudio de la órbita circular intentó explicar la traslación planetaria sin conseguir ningún resultado,28​ por lo que reformuló sus teorías y publicó, en el año 1609, las hoy conocidas leyes de Kepler en su obra Astronomia nova, en la que establece una órbita elíptica la cual se confirmó cuando predijo satisfactoriamente el tránsito de Venus del año 1631.29​ Junto a ellos, el científico británico Isaac Newton formuló y dio una explicación al movimiento planetario mediante sus leyes y el desarrollo del concepto de la gravedad.30​ Sin embargo, el heliocentrismo no sería apoyado experimentalmente sino hasta décadas después con el descubrimiento de la aberración de la luz por el astrónomo inglés James Bradley en 1725,31​ y la medición del paralaje estelar efectuada por el matemático alemán Friedrich Bessel en 1838.32​ En 1655, el científico neerlandés Christiaan Huygens descubrió el satélite Titán y la verdadera naturaleza de los anillos de Saturno, y describió por primera vez las dimensiones reales del entonces conocido sistema solar (6 planetas y 6 lunas).33​ En 1704 se acuñó el término "sistema solar".34​ El científico británico Edmund Halley dedicó sus estudios principalmente al análisis de las órbitas de los cometas.35​36​ El mejoramiento del telescopio durante este tiempo permitió a los científicos de todo el mundo descubrir nuevas características de los cuerpos celestes que existen.37​ A mediados del siglo XX, el 12 de abril de 1961, el cosmonauta Yuri Gagarin se convirtió en el primer hombre en el espacio;38​ la misión estadounidense Apolo 11, al mando de Neil Armstrong llega a la Luna el 16 de julio de 1969. En la actualidad, el sistema solar se estudia con la ayuda de telescopios terrestres, observatorios espaciales y misiones espaciales. Características generales El Sol. Los planetas y los asteroides orbitan alrededor del Sol, aproximadamente en un mismo plano y siguiendo órbitas elípticas (en sentido antihorario, si se observasen desde el Polo Norte del Sol); aunque hay excepciones, como el cometa Halley, que gira en sentido horario.39​ El plano en el que gira la Tierra alrededor del Sol se denomina plano de la eclíptica, y los demás planetas orbitan aproximadamente en el mismo plano. Aunque algunos objetos orbitan con un gran grado de inclinación respecto de este, como Plutón que posee una inclinación con respecto al eje de la eclíptica de 17.º, así como una parte importante de los objetos del cinturón de Kuiper.40​41​ Formación y evolución Artículo principal: Formación y evolución del sistema solar El sistema solar se formó hace 4568 millones de años por el colapso gravitatorio de una parte de una nube molecular gigante. Esta nube primigenia tenía varios años luz de diámetro y probablemente dio a luz a varias estrellas.44​ Como es normal en las nubes moleculares, consistía principalmente de hidrógeno, algo de helio y pequeñas cantidades de elementos pesados surgidos de previas generaciones estelares. A medida que la región —conocida como nebulosa protosolar—45​ se convertía en el sistema solar, colapsaba y la conservación del momento angular hizo que rotase más deprisa. El centro, donde se acumuló la mayor parte de la masa, se volvió cada vez más caliente que el disco circundante.44​ A medida que la nebulosa en contracción rotaba más deprisa, comenzó a aplanarse en un disco protoplanetario con un diámetro de alrededor de 200 UA44​ y una densa y caliente protoestrella en el centro.46​47​ Los planetas se formaron por acreción a partir de este disco48​ en el que el gas y el polvo atraídos gravitatoriamente entre sí se unen para formar cuerpos cada vez más grandes. En este escenario, cientos de protoplanetas podrían haber surgido en el temprano sistema solar que acabaron fusionándose o fueron destruidos dejando los planetas, los planetas enanos y el resto de cuerpos menores. Gracias a sus puntos de ebullición más altos, solo los metales y silicatos podían existir en forma sólida cerca del Sol, en el cálido sistema solar interior; estos fueron finalmente los componentes de Mercurio, Venus, la Tierra y Marte: los planetas rocosos. Debido a que los metales solo eran una pequeña parte de la nebulosa solar, los planetas terrestres no se podían hacer muy grandes. Los planetas gigantes (Júpiter, Saturno, Urano y Neptuno) se formaron más lejos, más allá de la línea de congelación: el límite entre las órbitas de Marte y Júpiter donde las temperaturas son lo suficientemente bajas como para que los compuestos volátiles permanezcan sólidos. Los hielos que forman estos planetas eran más abundantes que los metales y silicatos que formaron los planetas terrestres interiores, por lo que los permitió crecer hasta ser lo suficientemente masivos como para capturar grandes atmósferas de hidrógeno y helio: los elementos más ligeros y abundantes. Los residuos restantes que no llegaron a convertirse en planetas se agruparon en regiones como el cinturón de asteroides, el cinturón de Kuiper y la nube de Oort. El modelo de Niza explica la aparición de estas regiones y propone que los planetas exteriores se podrían haber formado en sitios diferentes de los actuales a los que habrían llegado tras múltiples interacciones gravitatorias. Tras cincuenta millones de años, la densidad del hidrógeno y la presión en el centro de la protoestrella se hicieron tan grandes que comenzó la fusión termonuclear.49​ La temperatura, la velocidad de reacción, la presión y la densidad aumentaron hasta alcanzar el equilibrio hidrostático: la presión térmica igualó a la fuerza de la gravedad. En ese momento, el Sol entró en la secuencia principal.50​ El tiempo que estará en la secuencia principal será de unos diez mil millones de años; en comparación, todas las fases previas al encendido termonuclear duraron unos dos mil millones de años.51​ El viento solar formó la heliosfera que barrió los restos de gas y polvo del disco protoplanetario (y los expulsó al espacio interestelar), con lo que terminó el proceso de formación planetaria. Desde entonces, el Sol se ha ido haciendo cada vez más brillante; en la actualidad es un 70% más brillante que a su entrada en la secuencia principal.52​ El sistema solar continuará más o menos como lo conocemos hasta que todo el hidrógeno del núcleo del Sol se haya convertido en helio, situación que tendrá lugar dentro de cinco mil millones de años. Esto marcará el final de la estancia del Sol en la secuencia principal. En ese momento el núcleo colapsará y la producción de energía será mucho mayor que en el presente. Las capas exteriores se expandirán unas doscientas sesenta veces su diámetro actual, por lo que se convertirá en una gigante roja. El gran aumento de su superficie hará que esté muchísimo más frío (del orden de 2600 K).51​ Se espera que el Sol en expansión vaporice Mercurio y Venus y vuelva la Tierra inhabitable al mover la zona de habitabilidad más allá de la órbita de Marte. Por último, el núcleo estará lo bastante caliente para fusionar el helio; el Sol quemará helio durante una fracción del tiempo que estuvo quemando hidrógeno. El Sol no tiene la suficiente masa para comenzar la fusión de elementos pesados, por lo que las reacciones nucleares en el núcleo disminuirán. Las capas exteriores se perderán en el espacio en forma de nebulosa planetaria, devolviendo parte del material con el que se formó el Sol —enriquecido con elementos pesados como el carbono— al medio interestelar y dejando atrás una enana blanca con la mitad de la masa original del Sol y el tamaño de la Tierra (un objeto extraordinariamente denso).53​ Het zonnestelsel is het planetenstelsel dat bestaat uit de Zon en de hemellichamen die door de zwaartekracht aan de Zon gebonden zijn. De Zon is een klasse G2 hoofdreeksster met een diameter van 1,39 miljoen kilometer. De Zon neemt 99,86% van de massa in het zonnestelsel voor haar rekening. Naast de Zon bevat het zonnestelsel acht planeten, vijf dwergplaneten, meer dan 1,2 miljoen bekende planetoïden, 715 manen van planeten en 3849 bekende kometen (stand: januari 2023). De meeste van deze objecten bewegen zich rond de Zon in omloopbanen met een kleine glooiingshoek ten opzichte van de ecliptica. In de ruimte tussen deze hemellichamen bevindt zich de interplanetaire materie. Volgens een definitie wordt het zonnestelsel begrensd door de heliopauze, de rand van de heliosfeer. Ontstaan Zie Ontstaan en evolutie van het zonnestelsel voor het hoofdartikel over dit onderwerp. Het zonnestelsel ontstond ongeveer 4,5 miljard jaar geleden, toen een interstellaire gaswolk door onbekende oorzaak actief werd en door zijn eigen gewicht begon te krimpen en steeds sneller rond te draaien, waarna in het midden van deze gaswolk de Zon ontstond. Het ineenstorten van het midden van de gaswolk, ook zonnenevel genoemd, nam 100.000 jaar in beslag. Door de enorme hitte die ontstond bij het samentrekken ontstond een kleine ster die een groot deel van de gaswolk opzoog en zo een volwaardige ster werd: onze Zon. Het overgebleven gas, ook accretieschijf genoemd, begon daarna af te koelen en er stolden stukken ijs, steen en metaal, die door botsingen steeds groter werden omdat ze aan elkaar vastklitten. Die grote brokken verzamelden al het nog overgebleven materiaal, op enkele planetoïden en meteoroïden na. Toen waren sommige brokken (protoplaneten) groot genoeg geworden om ook het laatste beetje gas op te zuigen. Op dat moment, een miljoen jaar na het ontstaan van de eerste brokken, begon de Zon plots sterke straling, een zonnewind, te produceren, die de gasmantel rond bijna alle protoplaneten, behalve de gasreuzen, wegblies. Daarna kregen de protoplaneten langzaam een stabiele baan rond de Zon, en de planeten en manen werden gevormd door laatste grote botsingen tussen protoplaneten. Ongeveer 4 miljard jaar geleden kreeg het zonnestelsel nog te maken met een kosmisch bombardement, waardoor op veel manen en planeten grote inslagkraters ontstonden. Beweging De spiraalarmen van de Melkweg met de omloopbaan van de Zon (geel). De Orionarm is aangegeven als Local Spur. Het zonnestelsel (op schaal) De Zon bevindt zich in de Lokale bel in de Orionarm, een spiraalarm van de Melkweg, op een afstand van 26.673±42 lichtjaar van het galactisch centrum. Het zonnestelsel beweegt met een snelheid van ongeveer 220 km/s in 225-250 miljoen jaar in een vaste baan om het centrum van de Melkweg. Een theorie onder wetenschappers is dat de route die de Zon door spiraalarmen in de Melkweg volgt bijdraagt aan de periodieke massale uitsterving van leven op aarde. Zon en (dwerg)planeten Traditioneel (tot 2006) werden tot het zonnestelsel negen planeten gerekend. De planeten Mercurius, Venus, Mars, Jupiter, en Saturnus zijn bekend sinds de oudheid. Na de uitvinding van de telescoop werden Uranus (1781), Neptunus (1846), en Pluto (1930) ontdekt. In de jaren 90 van de 20e eeuw werd ontdekt dat de toenmalige negende planeet, Pluto, slechts een van vele soortgelijke objecten in de Kuipergordel was. De vraag drong zich op of deze met Pluto vergelijkbare objecten nu ook allemaal als 'planeet' geclassificeerd moesten worden. Naarmate steeds grotere objecten ontdekt werden, zoals Quaoar en Varuna kwam het klassieke aantal van negen planeten onder druk te staan. Met de ontdekking van de nog veel grotere Eris was een nieuwe definitie van planeet noodzakelijk. Volgens de nieuwe definitie wordt Pluto nu een 'dwergplaneet' genoemd en telt het zonnestelsel acht 'echte' planeten. Een nieuwe planeet? In januari 2016 werd in de media gebracht dat er sterke aanwijzingen zijn voor een negende planeet met afmetingen vergelijkbaar met Neptunus maar ver voorbij de baan van Pluto. Deze nog hypothetische planeet is voorlopig aangeduid met de naam Planeet Negen (Engels: Planet Nine)[6] Een hypothetische planeet met een formaat van ongeveer twintig aardmassa's zou de verklaring kunnen zijn voor het opmerkelijke gedrag dat een aantal Transneptunische objecten in het buitengebied van de Kuipergordel vertoont. Konstantin Batygin en Michael Brown, wetenschappers aan de Caltech Universiteit, kondigden op 20 januari 2016 hun ontdekking aan, die gebaseerd is op dynamische modellen, en nog niet op visuele waarnemingen die als definitief bewijs zouden gelden.[7] Solsystemet består af Solen og de himmellegemer, som den binder til sig gennem sin gravitation. Solsystemet har sin oprindelse i et gravitationelt kollaps af en gigantisk gas- og støvsky for 4,6 milliarder år siden.[1] Det blev dannet af en stor og meget kold gassky, der bestod af hydrogen og helium samt ganske små mængder af andre grundstoffer. Rundt om Solen kredser en række objekter i en næsten flad, elliptisk skive. Med undtagelse af Solen finder man det meste af Solsystemets masse i de otte planeter med omløbsbaner, der næsten er cirkulære. De fire indre planeter er Merkur, Venus, Jorden og Mars, som kaldes klippeplaneter og de består hovedsageligt af sten og metal. De fire ydre planeter er Jupiter, Saturn, Uranus og Neptun, som kaldes gaskæmper og de består hovedsageligt af brint og helium. Disse planeter er meget tungere og større end klippeplaneterne. Der findes to områder med småplaneter. Asteroidebæltet, som ligger mellem Mars og Jupiter, består af mindre stykker, som har visse ligheder med klippeplaneterne, da størstedelen består af sten og metal. Kuiperbæltet, som ligger udenfor Neptuns omløbsbane, består hovedsageligt af frossen vand, ammoniak og metan. I disse bælter findes der fem specielle objekter: Ceres, Pluto, Haumea, Makemake og Eris, som kaldes dværgplaneter, da de anses at være tilstrækkeligt store til at være blevet runde som en konsekvens af egen gravitation. På en afstand af 0,8-1,6 lysår fra Solen antager man, at der findes hvad man kalder Oortskyen, som formodes at være kilden til de langperiodiske kometer. I Solsystemet findes der grupper af mindre stykker såsom kometer, kentaur-asteroider, interstellart medium som findes i dette område mens solvinden, plasma fra Solen, skaber en gasboble i det interstellare medium som også kaldes heliosfæren. Dette strækker sig ud til midten af det område, som kaldes spredningsskiven, et område i udkanten af Kuiperbæltet. Seks af planeterne og fire af dværgplaneterne har naturlige satellitter eller måner i omløbsbaner rundt om sig. Alle de fire ydre planeter har en planetring bestående af is og grus rundt om sig. En enkelt af dværgplaneterne, Haumea, har ligeledes en planetring. De nærmeste stjerner er inden for den såkaldte Local Bubble, med den nærmeste Proxima Centauri på 4,25 lysår. Solsystemets opdagelse og udforskning I en stor del af menneskehedens tidlige historie kendte kun et fåtal til Solsystemets eksistens, som vi kender det i dag. Den almindelige opfattelse var, at Jorden lå stationært i universets midte og var noget helt andet end de formodede guddommelige eller åndelige objekter, der bevægede sig på himlen. For eksempel spekulerede den indiske astronom, Aryabhata, og den græske filosof, Aristarchos, i det heliocentriske verdensbillede, hvilket vil sige, at de mente at Solen var i centrum, og Jorden bevægede sig rundt om solen. Men det var astronomen Nicolaus Kopernikus i 1500-tallet, der som den første kunne udvikle en matematisk model, som forudsagde de forskellige himmellegemers bevægelser i Solsystemet. I 1600-tallet kunne de berømte astronomer Galileo Galilei, Johannes Kepler og Isaac Newton bygge videre på Copernicus' model, hvilket efterhånden førte til almen accept af, at Jorden bevæger sig rundt om Solen, og at de andre planeter styres af de samme fysiske love, som også gælder for Jorden. Forbedringer af de første primitive teleskoper medførte en acceleration af opdagelser af såvel større som mindre himmellegemer i Solsystemet, deriblandt planeterne Uranus og Neptun samt utallige asteroider. I nyere tid har bedre udstyr givet mulighed for mere detaljerede studier af Solsystemets himmellegemer, herunder deres overfladestrukturer, såsom bjerge, dale og nedslagskratere samt vejrfænomener som støvskyer, is-formationer og sandstorme. 量子力學的預測已被實驗核對至極高準確度,是在科學領域中,最為準確的理論之一。[8]對應原理實現經典力學與量子力學之間的對應關係,根據對應原理,假若量子系统已達到某「經典極限」,則其物理行為可以很精确地用經典理论來描述;這經典極限可以是大量子數極限,也可以是普朗克常數趨零極限。實際而言,许多宏观系统都是用經典理论(如經典力学和电磁学)来做精确描述。因此在非常“大”的系统中,量子力学的特性應該会逐漸與經典物理的特性相近似,两者必須相互符合。[26]:190-191 对应原理對於建立一个有效的量子力学模型是很重要的辅助工具。量子力学的数学基础相當廣泛寬鬆,它僅只要求量子系統的態向量屬於希尔伯特空间,其可观察量是线性的厄米算符,它并没有规定在实际情况下,应该选择哪一种希尔伯特空间、哪些厄米算符。因此,在实际情况下,必须选择相应的希尔伯特空间和算符来描写一个特定的量子系统。而对应原理则是做出这个选择的一个重要辅助工具。这个原理要求量子力学所做出的预言,在越来越大的系统中,逐渐近似經典理论的预言。这个大系统的极限,被称为“經典极限”或者“对应极限”。因此可以使用启发法的手段,来建立一个量子力学的模型,而这个模型的极限,就是相应的經典物理学的模型。[26]:190-191[27]:3ff 在經典系統與量子系統之間,量子相干是一種很明顯可以用來區分的性質,具有量子相干性的電子、光子等等微觀粒子可以處於量子疊加態,不具有量子相干性的棒球、老虎等等宏觀系統不可以處於量子疊加態。量子退相干可以用來解釋這些行為。一種應用這性質來區分的工具是貝爾不等式,遭到量子糾纏的系統不遵守貝爾不等式,而量子退相干能夠將量子糾纏性質變換為經典統計性質,系統的物理行為因此可以用隱變數理論解釋,不再不遵守貝爾不等式。[28]:80-82簡略而言,量子干涉是將幾個量子態的量子幅總和在一起,而經典干涉則是將幾個經典波動的波強總和在一起。對於微觀物體,整個系統的延伸尺寸超小於相干長度,因此會產生長程量子糾纏與其它非定域現象,一些量子系統的特徵行為。通常,量子相干不會出現於宏觀系統。[29] move.w #$0100,d0 clr.l d1 move.w #$0400,d4 clr.l d2 move.w #$1000,d3 NotReached: addi.b #$10,d2 add.w d0,d1 cmp.w d1,d4 bgt.s NotReached sub.w d2,d1 subi.w #$1000,d3 bpl.s NotReached move.w d1,d0 swap d0 move.w d3,d0 sep #%00100000 ;8 bit accumulator ldx #4 ;modifying 5 locations ; loop lda $ab1234,x ;load inc a ;increment sta $ab1234,x ;store dex bpl loop ;next phb ;save current data bank sep #%00110000 ;8 bit registers lda #$ab ;target bank pha ;push it to the stack & pull it... plb ;into DB, making it the default bank ldx #4 ;modifying 5 locations ; loop inc $1234,x ;effectively INC $AB1234,X dex bpl loop ;next ; plb ;restore previous bank sei ;IRQs off wai ;wait for interrupt lda via001 ;start of interrupt handler #!/bin/bash TARGET_DIR=("$@") [ "x$1" == "x" ] && TARGET_DIR=(".") function confirmDeletion() { local confirm="" until [ "x$confirm" == 'xy' ] || [ "x$confirm" == 'xn' ] do read -ep " Delete [y/n]: " confirm confirm=$(echo "$confirm" | tr [:upper:] [:lower:]) done [ "x$confirm" == 'xy' ] } function deleteWithConfirmation() { for file in "${@}" do if rm "$file"; then echo " OK: $file" else echo " FAIL: $file" fi done } for i in {'*~','a.out','*.o','*.gch','*nppdf32Log*'} do echo "Files matching: $i" FILES=() while read -rd '' file do FILES+=("$file") echo " $file" done < <(find "${TARGET_DIR[@]}" -depth -iname "$i" -print0) if [ "x${FILES[*]}" != "x" ]; then if confirmDeletion; then deleteWithConfirmation "${FILES[@]}" else echo " Skipping" fi fi done Return the open file descriptor to the calling function via the eight bit accumulator by overwriting the appropriate register stack frame element: sep #%00100000 ;select 8 bit accumulator lda #0 ;clear... xba ;.B lda filedes ;get file descriptor, ... rep #%00100000 ;select 16 bit accumulator &... sta reg_a,s ;overwrite .C's stack copy When the accumulator is pulled it will contain the value that was in filedes. Flag an error by setting the carry bit in SR: sep #%00100000 ;select 8 bit accumulator lda reg_sr,s ;stack copy of SR ora #%00000001 ;set carry bit &... sta reg_sr,s ;rewrite Flag a successful operation by clearing the carry bit in SR: sep #%00100000 ;select 8 bit accumulator lda reg_sr,s ;stack copy of SR and #%11111110 ;clear carry bit &... sta reg_sr,s ;rewrite class PromptFormat: botname = "Chatbort" username = "User" def __init__(self): pass # def default_system_prompt(self): raise NotImplementedError def first_prompt(self): raise NotImplementedError def subs_prompt(self): raise NotImplementedError def stop_conditions(self, tokenizer): raise NotImplementedError def encoding_options(self): # (add_bos, add_eos, encode_special_tokens) raise NotImplementedError def print_bot_name(self): return False def print_extra_newline(self): return False class PromptFormat_raw(PromptFormat): description = "Model-agnostic mode simulating a raw chatlog" def __init__(self): super().__init__() pass def default_system_prompt(self): return \ f"""This is a conversation between a helpful AI assistant named {self.botname} and a """ + \ (f"""user named {self.username}.""" if self.username != "User" else """user.""") def first_prompt(self): return \ f"""<|system_prompt|>\n{self.username}: <|user_prompt|>\n{self.botname}:""" def subs_prompt(self): return \ f"""{self.username}: <|user_prompt|>\n{self.botname}:""" def stop_conditions(self, tokenizer): return \ [self.username + ":", self.username[0:1] + ":", self.username.upper() + ":", self.username.lower() + ":", tokenizer.eos_token_id] def encoding_options(self): return False, False, False def print_bot_name(self): return True ######################################################## class PromptFormat_llama(PromptFormat): description = "Llama-chat, Llama2-chat and Mistral-instruct models" def __init__(self): super().__init__() pass def default_system_prompt(self): return \ """You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. """ + \ """Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. """ + \ """Please ensure that your responses are socially unbiased and positive in nature.""" def first_prompt(self): return \ """[INST] <>\n<|system_prompt|>\n<>\n\n<|user_prompt|> [/INST]""" def subs_prompt(self): return \ """[INST] <|user_prompt|> [/INST]""" def stop_conditions(self, tokenizer): return \ [tokenizer.eos_token_id] def encoding_options(self): return True, False, False def print_extra_newline(self): return True def build_attn_mask(self, batch_size, seq_len, past_len, input_mask, device): if input_mask is None and seq_len == 1: return None if isinstance(past_len, tuple): attn_masks = [] for i in range(len(past_len[1])): attn_mask = torch.zeros((1, 1, seq_len, past_len[1][i] + seq_len), dtype = torch.float16, device = device) attn_mask_triu = torch.triu(torch.full((seq_len - 1, seq_len - 1), -65504.)) attn_mask[:, :, : seq_len - 1, past_len[1][i] + 1: past_len[1][i] + seq_len] = attn_mask_triu if input_mask is not None: min_mask_width = min(input_mask[i].shape[-1], seq_len + past_len[1][i]) input_mask_part = safe_move_tensor(input_mask[i][:, :min_mask_width], attn_mask.device) input_mask_part = input_mask_part.unsqueeze(1).unsqueeze(2) attn_mask[:, :, :, :min_mask_width] = torch.minimum(attn_mask[:, :, :, :min_mask_width], input_mask_part) attn_masks.append(attn_mask) return attn_masks else: attn_mask = torch.zeros((batch_size, 1, seq_len, past_len + seq_len), dtype = torch.float16, device = device) attn_mask_triu = torch.triu(torch.full((seq_len - 1, seq_len - 1), -65504.)) attn_mask[:, :, : seq_len - 1, past_len + 1: past_len + seq_len] = attn_mask_triu if input_mask is not None: min_mask_width = min(input_mask.shape[-1], seq_len + past_len) input_mask_part = safe_move_tensor(input_mask[:, :min_mask_width], attn_mask.device) input_mask_part = input_mask_part.unsqueeze(1).unsqueeze(2) attn_mask[:, :, :, :min_mask_width] = torch.minimum(attn_mask[:, :, :, :min_mask_width], input_mask_part) return attn_mask We have to develop a Java program to calculate the sum of n natural numbers. Sum of natural number N as given as sum = 1+2+3+….+N Examples:- 1+2+3+4+5 = 15 1+2+3+4+5+6+7+8+9+10 = 55 Procedure to develop a method to find the sum of N natural numbers in Java, Take the N value. Declare an iterator variable and initialize it with 1 because natural numbers start with 1. Add iterator variable value into the sum variable Increase the value of the iterator variable by 1 Repeat 3 and 4 steps until the number remains greater than the iterator variable The time complexity of this procedure is O(n). import java.util.Scanner; public class NaturalNumberSum { // method to find sum of N natural numbers public static int naturalNumberSum(int number){ int i = 1; // iterator variable // variable to store sum value int sum = 0; // loop to repeat the process while (i<=number) { // add into sum value sum = sum + i; // increase iterator variable i++; } // return sum value return sum; } public static void main(String[] args) { // declare variables int number = 0; int sum = 0; // create Scanner class object Scanner scan = new Scanner(System.in); // read input System.out.print("Enter N value:: "); number = scan.nextInt(); // Calculate the sum value sum = naturalNumberSum(number); // display result System.out.println("Sum = "+sum); // close Scanner class objects scan.close(); } } The output for different test-cases:- Enter N value:: 5 Sum = 15 Enter N value:: 10 Sum = 55 In this program, we have used a while loop to find the sum of natural numbers in Java. While loop is a pre-test loop where the expression is evaluated then only statements are executed. It uses a test expression to control the loop. Before every iteration of the loop, the test expression is evaluated. Also See:- Sum of digits of a number The sum of even digits in a number Sum of odd digits in a number Sum of first & last digit of a number The Sum of Digits Until Single Digit We can also use for loop instead of using a while loop. The for loop is also a pre-test loop, where first of all initialization expression is evaluated then the condition is checked and if the condition is true then only the statements of the for loop are executed. public static int naturalNumberSum(int number){ int sum = 0; for(int i=1; i<=number; i++) sum+=i; return sum; } Or, public static int naturalNumberSum(int number){ int sum = 0; for(int i=1; ; sum+=i, i++) if(i>number) return sum; } The time complexity of all above methods are O(n). Sum of Natural Numbers in Java without using the loop We can also do the same work without using the loop. The formula for this operation, Sum = n * (n+1) / 2; Example:- Sum of first 10 natural numbers = 10*(10+1)/2 = 10*11/2 = 5*11 = 55 It is the best way to find the sum of natural numbers. The time complexity of this method is O(1). import java.util.Scanner; public class NaturalNumberSum { // method to find sum of N natural numbers public static int naturalNumberSum(int number){ return number*(number+1)/2; } public static void main(String[] args) { // declare variables int number = 0; int sum = 0; // create Scanner class object Scanner scan = new Scanner(System.in); // read input System.out.print("Enter N value:: "); number = scan.nextInt(); // Calculate the sum value sum = naturalNumberSum(number); // display result System.out.println("Sum = "+sum); // close Scanner class objects scan.close(); } } Using recursion We already developed java program to find the sum of the natural number using for loop, or while loop, or without using the loop. Now we will find the same using the recursion technique. In Recursion, We divided the big problems into smaller problems or sub-problems. Sum of N natural numbers given as 1+2+….+(n-1)+n. So, the problem can be divided as n + ( (n-1) +… + 2 + 1 ) General case for finding the sum of natural number => sum(n) = n + sum(n-1); Similarly, the base case for finding the sum of natural number => sum(0) = 0; or sum(1) = 1; import module jtransmissiongatetb; wire y; reg a,control; jtransmissiongate jtgate(y,control,a); initial begin $display ("RESULT\ta\ty"); a = 0; control = 0; # 50; // Initial value is set if ( y === 1'bz ) // Test for inversion $display ("PASS \t%d\t%d",a,y); else $display ("FAIL \t%d\t%d",a,y); control = 1; # 50; // Simply change the control signal control = 0; # 50; // Simply change the control signal control = 1; # 50; // Simply change the control signal control = 0; # 50; // Simply change the control signal a = 0; control = 1; # 50; // Initial value is set if ( y === 0 ) // Test for inversion $display ("PASS \t%d\t%d",a,y); else $display ("FAIL \t%d\t%d",a,y); a = 1; control = 0; # 50; // Another value if ( y === 1'bz ) // Test for inversion $display ("PASS \t%d\t%d",a,y); else $display ("FAIL \t%d\t%d",a,y); control = 1; # 50; // Simply change the control signal control = 0; # 50; // Simply change the control signal control = 1; # 50; // Simply change the control signal control = 0; # 50; // Simply change the control signal a = 1; control = 1; # 50; // Another value if ( y === 1 ) // Test for inversion $display ("PASS \t%d\t%d",a,y); else $display ("FAIL \t%d\t%d",a,y); end //enabling the wave dump initial begin $dumpfile("dump.vcd"); $dumpvars; end endmodule module jtransmissiongate(y,control,a); output y; input a,control; wire cbar; assign cbar = ~control; nmos n1(y,a,control); pmos p1(y,a,cbar); //cmos c1(y,a,control,cbar); endmodule module juniversalShiftRegisterTb; wire [3:0] DATAOUT; reg clock, reset; reg [1:0] MODE; reg [3:0] DATAIN; juniversalShiftRegister jusr(DATAOUT, clock, reset, MODE, DATAIN); initial begin clock =0; MODE = 2'b00; DATAIN = 4'b0000; reset = 1; #10; reset = 0; #10; $display("RSLT\tD == DOUT"); // Start testing Right Shift mode MODE = 2'b00; reset = 1; #10; reset = 0; #10; MODE = 2'b01; DATAIN = 4'b0011; #10; if ( DATAOUT === 4'b1000 ) // look at previous value of DATAOUT as well $display("PASS\t%p is %p with %p", DATAIN, MODE, DATAOUT); else $display("FAIL\t%p is %p with %p", DATAIN, MODE, DATAOUT); MODE = 2'b01; DATAIN = 4'b0011; #10; if ( DATAOUT === 4'b1100 ) // look at previous value of DATAOUT as well $display("PASS\t%p is %p with %p", DATAIN, MODE, DATAOUT); else $display("FAIL\t%p is %p with %p", DATAIN, MODE, DATAOUT); // Start testing Left Shift mode MODE = 2'b00; reset = 1; #10; reset = 0; #10; MODE = 2'b10; DATAIN = 4'b0111; #10; if ( DATAOUT === 4'b0001 ) // $display("PASS\t%p is %p with %p", DATAIN, MODE, DATAOUT); else $display("FAIL\t%p is %p with %p", DATAIN, MODE, DATAOUT); MODE = 2'b10; DATAIN = 4'b0111; #10; if ( DATAOUT === 4'b0011 ) // $display("PASS\t%p is %p with %p", DATAIN, MODE, DATAOUT); else $display("FAIL\t%p is %p with %p", DATAIN, MODE, DATAOUT); // Start testing parallel load mode MODE = 2'b00; reset = 1; #10; reset = 0; #10; MODE = 2'b11; DATAIN = 4'b1010; #10; if ( DATAOUT === 4'b1010 ) $display("PASS\t%p is %p with %p", DATAIN, MODE, DATAOUT); else $display("FAIL\t%p is %p with %p", DATAIN, MODE, DATAOUT); #20; $finish; end //enabling the wave dump initial begin $dumpfile("dump.vcd"); $dumpvars; end always #5 clock = ~clock; endmodule #!/bin/bash # use predefined variables to access passed arguments #echo arguments to the shell echo $1 $2 $3 ' -> echo $1 $2 $3' # We can also store arguments from bash command line in special array args=("$@") #echo arguments to the shell echo ${args[0]} ${args[1]} ${args[2]} ' -> args=("$@"); echo ${args[0]} ${args[1]} ${args[2]}' #use $@ to print out all arguments at once echo $@ ' -> echo $@' # use $# variable to print out # number of arguments passed to the bash script echo Number of arguments passed: $# ' -> echo Number of arguments passed: $#' Let’s try executing this script and providing three arguments. $ ./arguments.sh Bash Scripting Tutorial The results when we execute this script: Bash Scripting Tutorial -> echo $1 $2 $3 Bash Scripting Tutorial -> args=("$@"); echo ${args[0]} ${args[1]} ${args[2]} Bash Scripting Tutorial -> echo $@ Number of arguments passed: 3 -> echo Number of arguments passed: $# Executing shell commands with bash The best way to execute a separate shell command inside of a Bash script is by creating a new subshell through the $( ) syntax. Check the example below where we echo the result of running the uname -o command. #!/bin/bash # use a subshell $() to execute shell command echo $(uname -o) # executing bash command without subshell echo uname -o Notice that in the final line of our script, we do not execute the uname command within a subshell, therefore the text is taken literally and output as such. $ uname -o GNU/LINUX $ ./subshell.sh GNU/LINUX uname -o Reading User Input We can use the read command to read input from the user. This allows a user to interact with a Bash script and help dictate the way it proceeds. Here’s an example: #!/bin/bash echo -e "Hi, please type the word: \c " read word echo "The word you entered is: $word" echo -e "Can you please enter two words? " read word1 word2 echo "Here is your input: \"$word1\" \"$word2\"" echo -e "How do you feel about bash scripting? " # read command now stores a reply into the default build-in variable $REPLY read echo "You said $REPLY, I'm glad to hear that! " echo -e "What are your favorite colours ? " # -a makes read command to read into an array read -a colours echo "My favorite colours are also ${colours[0]}, ${colours[1]} and ${colours[2]}:-)" Our Bash script asks multiple questions and then is able to repeat the information back to us through variables and arrays: $ ./read.sh Hi, please type the word: Linuxconfig.org The word you entered is: Linuxconfig.org Can you please enter two words? Debian Linux Here is your input: "Debian" "Linux" How do you feel about bash scripting? good You said good, I'm glad to hear that! What are your favorite colours ? blue green black My favorite colours are also blue, green and black:-) Bash Trap Command The trap command can be used in Bash scripts to catch signals sent to the script and then execute a subroutine when they occur. The script below will detect a Ctrl + C interrupt. #!/bin/bash # bash trap command trap bashtrap INT # bash clear screen command clear; # bash trap function is executed when CTRL-C is pressed: # bash prints message => Executing bash trap subrutine ! bashtrap() { echo "CTRL+C Detected !...executing bash trap !" } # for loop from 1/10 to 10/10 for a in `seq 1 10`; do echo "$a/10 to Exit." sleep 1; done echo "Exit Bash Trap Example!!!" In the output below you can see that we try to Ctrl + C two times but the script continues to execute. $ ./trap.sh 1/10 to Exit. 2/10 to Exit. ^CCTRL+C Detected !...executing bash trap ! 3/10 to Exit. 4/10 to Exit. 5/10 to Exit. 6/10 to Exit. 7/10 to Exit. ^CCTRL+C Detected !...executing bash trap ! 8/10 to Exit. 9/10 to Exit. 10/10 to Exit. Exit Bash Trap Example!!! Arrays Bash is capable of storing values in arrays. Check the sections below for two different examples. Declare simple bash array This example declares an array with four elements. #!/bin/bash #Declare array with 4 elements ARRAY=( 'Debian Linux' 'Redhat Linux' Ubuntu Linux ) # get number of elements in the array ELEMENTS=${#ARRAY[@]} # echo each element in array # for loop for (( i=0;i<$ELEMENTS;i++)); do echo ${ARRAY[${i}]} done Executing the script will output the elements of our array: $ ./arrays.sh Debian Linux Redhat Linux Ubuntu Linux Read file into bash array Rather than filling out all of the elements of our array in the Bash script itself, we can program our script to read input and put it into an array. #!/bin/bash # Declare array declare -a ARRAY # Link filedescriptor 10 with stdin exec 10<&0 # stdin replaced with a file supplied as a first argument exec < $1 let count=0 while read LINE; do ARRAY[$count]=$LINE ((count++)) done echo Number of elements: ${#ARRAY[@]} # echo array's content echo ${ARRAY[@]} # restore stdin from filedescriptor 10 # and close filedescriptor 10 exec 0<&10 10<&- Now let’s execute the script and store four elements in the array by using a file’s contents for input. $ cat bash.txt Bash Scripting Tutorial Guide $ ./bash-script.sh bash.txt Number of elements: 4 Bash Scripting Tutorial Guide *** CompressADPCM3 *** ; JoinCode = CompressADPCM3(Source, Length, Destination, JoinCode) ; d0 a0 d0 a1 d1 ; ; This function compresses a RAW sample to a given memory. The ; result is a 3bit ADPCM code. The destination buffer must be ; at least (Length+7)/8*3 bytes in size. ; ; Function of the JoinCode: See above. XDEF _CompressADPCM3 _CompressADPCM3 movem.l d2-d4,-(sp) move.w d1,d3 ; d3=EstMax swap d1 move.w d1,d2 ; d2=Delta bne.s c3_loop moveq #5,d2 c3_loop moveq #0,d1 ; d1=Shifter bsr.s c3_byte lsl.b #3,d1 bsr.s c3_byte lsl.w #3,d1 bsr.s c3_byte lsl.w #3,d1 bsr.s c3_byte lsl.w #3,d1 bsr.s c3_byte lsl.l #3,d1 bsr.s c3_byte lsl.l #3,d1 bsr.s c3_byte lsl.l #3,d1 bsr.s c3_byte swap d1 move.b d1,(a1)+ rol.l #8,d1 move.b d1,(a1)+ rol.l #8,d1 move.b d1,(a1)+ subq.l #8,d0 ; d0=Counter bhi.s c3_loop move.w d2,d0 ; -> d0=JoinCode swap d0 move.w d3,d0 movem.l (sp)+,d2-d4 rts c3_byte move.b (a0)+,d4 ext.w d4 asl.w #6,d4 sub.w d3,d4 bpl.s c3_positive or.b #%100,d1 neg.w d4 c3_positive sub.w d2,d4 bls.s c3_00 sub.w d2,d4 bls.s c3_01 sub.w d2,d4 bls.s c3_10 c3_11 or.b #%11,d1 bra.s c3_00 c3_10 or.b #%10,d1 bra.s c3_00 c3_01 or.b #%01,d1 c3_00 bsr.s adaptive rts *** Adaptions-Routine *** adaptive ; d1 = SignBit + DataBit move.w d2,d4 lsr.w #1,d4 btst #1,d1 beq.s d3_0 d3_1 btst #0,d1 beq.s d3_10 d3_11 add.w d2,d4 add.w d2,d4 add.w d2,d4 mulu #$6607,d2 bra.s d3_sign d3_10 add.w d2,d4 add.w d2,d4 mulu #$4D14,d2 bra.s d3_sign d3_0 btst #0,d1 beq.s d3_00 d3_01 add.w d2,d4 mulu #$3A9F,d2 bra.s d3_sign d3_00 mulu #$399A,d2 d3_sign btst #2,d1 beq.s d3_add neg.w d4 d3_add add.w d4,d3 add.l #8192,d2 moveq #14,d4 asr.l d4,d2 rts END mov mov bp, 255 traceloop: ; Evaluate whether sample point is inside or outside the shape: ; ; ( a & ( b | c ) ) | ( b & c ) = 0 <=> voxel overlaps fractal push bx mov dx, bx or dx, cx and dx, ax and bx, cx or dx, bx pop bx ; Ignore the lower bits or the fractal will be too fine to see shr dx, 6 jz endtrace dec bp jnz traceloop endtrace: ; BP is 255 - the distance we had to trace mov dx, bp not dl ; Plot pixel mov ds:[di],dl inc di // ****************** #include #include #include #include module jtransmissiongatetb; wire y; reg a,control; jtransmissiongate jtgate(y,control,a); initial begin $display ("RESULT\ta\ty"); a = 0; control = 0; # 50; // Initial value is set if ( y === 1'bz ) // Test for inversion $display ("PASS \t%d\t%d",a,y); else $display ("FAIL \t%d\t%d",a,y); control = 1; # 50; // Simply change the control signal control = 0; # 50; // Simply change the control signal control = 1; # 50; // Simply change the control signal control = 0; # 50; // Simply change the control signal a = 0; control = 1; # 50; // Initial value is set if ( y === 0 ) // Test for inversion $display ("PASS \t%d\t%d",a,y); else $display ("FAIL \t%d\t%d",a,y); a = 1; control = 0; # 50; // Another value if ( y === 1'bz ) // Test for inversion $display ("PASS \t%d\t%d",a,y); else $display ("FAIL \t%d\t%d",a,y); control = 1; # 50; // Simply change the control signal control = 0; # 50; // Simply change the control signal control = 1; # 50; // Simply change the control signal control = 0; # 50; // Simply change the control signal a = 1; control = 1; # 50; // Another value if ( y === 1 ) // Test for inversion $display ("PASS \t%d\t%d",a,y); else $display ("FAIL \t%d\t%d",a,y); end //enabling the wave dump initial begin $dumpfile("dump.vcd"); $dumpvars; end endmodule #include #include #include #include #include #include "config.h" #include "cuda/pack_tensor.cuh" #include "cuda/quantize.cuh" #include "cuda/q_matrix.cuh" #include "cuda/q_attn.cuh" #include "cuda/q_mlp.cuh" #include "cuda/q_gemm.cuh" #include "cuda/rms_norm.cuh" #include "cuda/rope.cuh" #include "cuda/cache.cuh" #include "cuda/h_gemm.cuh" #include "cpp/quantize_func.h" #include "cpp/sampling.h" #include "cpp/util.h" // Some decluttering macros #define TORCH_CHECK_DTYPE(__x, __dtype) TORCH_CHECK((__x).dtype() == torch::__dtype, #__x " is incorrect datatype, must be " #__dtype) #define TORCH_CHECK_DTYPE_OPT(__x, __dtype) TORCH_CHECK((__x).device().is_meta() || (__x).dtype() == torch::__dtype, #__x " is incorrect datatype, must be " #__dtype) #define TORCH_CHECK_SHAPES(__x, __dim_x, __y, __dim_y, __scale_y) TORCH_CHECK((__x).size(__dim_x) == (__y).size(__dim_y) * __scale_y, #__x " and " #__y " have incompatible shapes") #define TORCH_CHECK_SHAPES_OPT(__x, __dim_x, __y, __dim_y, __scale_y) TORCH_CHECK((__x).device().is_meta() || (__x).size(__dim_x) == (__y).size(__dim_y) * __scale_y, #__x " and " #__y " have incompatible shapes") // Packing functions void pack_rows_4 ( torch::Tensor input, torch::Tensor output ) { const at::cuda::OptionalCUDAGuard device_guard(device_of(input)); TORCH_CHECK_DTYPE(input, kShort); TORCH_CHECK_DTYPE(output, kInt); TORCH_CHECK_SHAPES(input, 0, output, 0, 1); TORCH_CHECK_SHAPES(input, 1, output, 1, 8); int rows = input.size(0); int columns = input.size(1); pack_rows_4_cuda ( (uint16_t*) input.data_ptr(), (uint32_t*) output.data_ptr(), rows, columns ); } void pack_columns ( torch::Tensor input, torch::Tensor output, int bits ) { const at::cuda::OptionalCUDAGuard device_guard(device_of(input)); TORCH_CHECK_DTYPE(input, kShort); TORCH_CHECK_DTYPE(output, kInt); TORCH_CHECK_SHAPES(input, 1, output, 1, 1); int in_rows = input.size(0); int columns = input.size(1); int out_rows = output.size(0); int exp_out_rows = in_rows * bits / 32; TORCH_CHECK(out_rows == exp_out_rows, "Wrong output shape for input and bitrate") pack_columns_cuda ( (uint16_t*) input.data_ptr(), (uint32_t*) output.data_ptr(), in_rows, out_rows, columns, bits ); } #include "quantize_func.h" #include "../cuda/quantize.cuh" void quantize_range ( torch::Tensor quant, torch::Tensor scale, torch::Tensor out_q, float qzero, float maxq, torch::Tensor hessian_inv, torch::Tensor weights, torch::Tensor error, int a, int b ) { int columns = weights.size(1); int hcolumns = hessian_inv.size(1); for (int c = a; c < b; c++) { quantize_cuda ( ((const float*) weights.data_ptr()) + c * columns, ((float*) quant.data_ptr()) + c * columns, (const float*) scale.data_ptr(), out_q.device().is_meta() ? NULL : ((uint16_t*) out_q.data_ptr()) + c * columns, 1, columns, qzero, maxq ); adjust_error_row_cuda ( (const float*) hessian_inv.data_ptr(), (float*) error.data_ptr(), (const float*) weights.data_ptr(), (const float*) quant.data_ptr(), c, columns, hcolumns ); vv_mul_sub_cuda ( ((const float*) hessian_inv.data_ptr()) + c * hcolumns + c, ((const float*) error.data_ptr()) + c * columns, ((float*) weights.data_ptr()) + c * columns, b - c, columns ); } torch::Tensor x = hessian_inv.slice(0, a, b).slice(1, b).transpose(0, 1); torch::Tensor y = error.slice(0, a, b); weights.slice(0, b).addmm_(x, y, 1.0f, -1.0f); } //--------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------- __forceinline__ __device__ half dot22_8_h(half2(&dq)[4], const half* a_ptr, const half g_result, const half qs_h) { half2 result = {}; const half2* a2_ptr = (const half2*)a_ptr; #pragma unroll for (int i = 0; i < 4; i++) result = __hfma2(dq[i], *a2_ptr++, result); half result_h = __hadd(__low2half(result), __high2half(result)); return __hfma(result_h, qs_h, g_result); } __forceinline__ __device__ half dot22_16_h(half2(&dq)[8], const half* a_ptr, const half g_result, const half qs_h) { half2 result = {}; const half2* a2_ptr = (const half2*)a_ptr; #pragma unroll for (int i = 0; i < 8; i++) result = __hfma2(dq[i], *a2_ptr++, result); half result_h = __hadd(__low2half(result), __high2half(result)); return __hfma(result_h, qs_h, g_result); } __forceinline__ __device__ half dot22_32_h(half2(&dq)[16], const half* a_ptr, const half g_result, const half qs_h) { half2 result = {}; const half2* a2_ptr = (const half2*)a_ptr; #pragma unroll for (int i = 0; i < 16; i += 1) result = __hfma2(dq[i], *a2_ptr++, result); half result_h = __hadd(__low2half(result), __high2half(result)); return __hfma(result_h, qs_h, g_result); } name: Build Wheels on: workflow_dispatch jobs: build_wheels: name: ${{ matrix.os }} Python ${{ matrix.pyver }} CUDA ${{ matrix.cuda }} runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-20.04, windows-latest] pyver: ["3.8", "3.9", "3.10", "3.11"] cuda: ["11.7.0", "11.8.0", "12.1.1"] defaults: run: shell: pwsh env: CUDAVER: ${{ matrix.cuda }} PYVER: ${{ matrix.pyver }} steps: - name: Free Disk Space uses: jlumbroso/free-disk-space@v1.2.0 if: runner.os == 'Linux' with: tool-cache: false android: true dotnet: true haskell: true large-packages: false swap-storage: false - uses: actions/checkout@v3 - uses: actions/setup-python@v3 with: python-version: ${{ matrix.pyver }} - name: Setup Mamba uses: conda-incubator/setup-miniconda@v2.2.0 with: activate-environment: "build" python-version: ${{ matrix.pyver }} miniforge-variant: Mambaforge miniforge-version: latest use-mamba: true add-pip-as-python-dependency: true auto-activate-base: false - name: Install Dependencies run: | $cudaVersion = $env:CUDAVER $cudaVersionPytorch = $env:CUDAVER.Remove($env:CUDAVER.LastIndexOf('.')).Replace('.','') $cudaChannels = '' $cudaNum = [int]$cudaVersion.substring($cudaVersion.LastIndexOf('.')+1) while ($cudaNum -ge 0) { $cudaChannels += '-c nvidia/label/cuda-' + $cudaVersion.Remove($cudaVersion.LastIndexOf('.')+1) + $cudaNum + ' '; $cudaNum-- } mamba install -y 'cuda' $cudaChannels.TrimEnd().Split() if (!(mamba list cuda)[-1].contains('cuda')) {sleep -s 10; mamba install -y 'cuda' $cudaChannels.TrimEnd().Split()} if (!(mamba list cuda)[-1].contains('cuda')) {throw 'CUDA Toolkit failed to install!'} if ([version]$env:CUDAVER -lt [version]'11.8.0') {$torchver = "torch==2.0.1"} else {$torchver = "torch==2.1.0"} python -m pip install $torchver --index-url https://download.pytorch.org/whl/cu$cudaVersionPytorch python -m pip install build wheel safetensors sentencepiece ninja - name: Build Wheel run: | $env:CUDA_PATH = $env:CONDA_PREFIX $env:CUDA_HOME = $env:CONDA_PREFIX $cudaVersion = $env:CUDAVER $cudaVersionPytorch = $env:CUDAVER.Remove($env:CUDAVER.LastIndexOf('.')).Replace('.','') $BUILDTAG = "+cu$cudaVersionPytorch" if ($IsLinux) {$env:LD_LIBRARY_PATH = $env:CONDA_PREFIX + '/lib:' + $env:LD_LIBRARY_PATH} $env:TORCH_CUDA_ARCH_LIST = if ([version]$env:CUDAVER -lt [version]'11.8') {'6.0 6.1 7.0 7.5 8.0 8.6+PTX'} else {'6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX'} python -m build -n --wheel -C--build-option=egg_info "-C--build-option=--tag-build=$BUILDTAG" if ($IsLinux -and $env:PYVER -eq '3.11' -and $env:CUDAVER -eq '11.8.0') {$env:EXLLAMA_NOCOMPILE=1; python -m build -n} - uses: actions/upload-artifact@v3 with: name: 'wheels' path: ./dist/* build_rocm: name: Build ROCm Wheels & Release needs: build_wheels uses: ./.github/workflows/build-wheels-rocm.yml Metadata-Version: 2.1 Name: exllamav2 Version: 0.0.10 Home-page: https://github.com/turboderp/exllamav2 Author: turboderp License: MIT License-File: LICENSE Requires-Dist: pandas Requires-Dist: ninja Requires-Dist: fastparquet Requires-Dist: torch>=2.0.1 Requires-Dist: safetensors>=0.3.2 Requires-Dist: sentencepiece>=0.1.97 Requires-Dist: pygments Requires-Dist: websockets Requires-Dist: regex # ExLlamaV2 ExLlamaV2 is an inference library for running local LLMs on modern consumer GPUs. ## Overview of differences compared to V1 - Faster, better kernels - Cleaner and more versatile codebase - Support for a new quant format (see below) ## Performance Some quick tests to compare performance with V1. There may be more performance optimizations in the future, and speeds will vary across GPUs, with slow CPUs still being a potential bottleneck: | Model | Mode | Size | grpsz | act | V1: 3090Ti | V1: 4090 | V2: 3090Ti | V2: 4090 | |------------|--------------|-------|-------|-----|------------|----------|------------|-------------| | Llama | GPTQ | 7B | 128 | no | 143 t/s | 173 t/s | 175 t/s | **195** t/s | | Llama | GPTQ | 13B | 128 | no | 84 t/s | 102 t/s | 105 t/s | **110** t/s | | Llama | GPTQ | 33B | 128 | yes | 37 t/s | 45 t/s | 45 t/s | **48** t/s | | OpenLlama | GPTQ | 3B | 128 | yes | 194 t/s | 226 t/s | 295 t/s | **321** t/s | | CodeLlama | EXL2 4.0 bpw | 34B | - | - | - | - | 42 t/s | **48** t/s | | Llama2 | EXL2 3.0 bpw | 7B | - | - | - | - | 195 t/s | **224** t/s | | Llama2 | EXL2 4.0 bpw | 7B | - | - | - | - | 164 t/s | **197** t/s | | Llama2 | EXL2 5.0 bpw | 7B | - | - | - | - | 144 t/s | **160** t/s | | Llama2 | EXL2 2.5 bpw | 70B | - | - | - | - | 30 t/s | **35** t/s | | TinyLlama | EXL2 3.0 bpw | 1.1B | - | - | - | - | 536 t/s | **635** t/s | | TinyLlama | EXL2 4.0 bpw | 1.1B | - | - | - | - | 509 t/s | **590** t/s | ## How to Clone the repository and install dependencies: ``` git clone https://github.com/turboderp/exllamav2 cd exllamav2 pip install -r requirements.txt python test_inference.py -m -p "Once upon a time," ``` A simple console chatbot is included. Run it with: ``` python examples/chat.py -m -mode llama ``` The `-mode` argument chooses the prompt format to use. `llama` is for the Llama(2)-chat finetunes, while `codellama` probably works better for CodeLlama-instruct. `raw` will produce a simple chatlog-style chat that works with base models and various other finetunes. You can also provide a custom system prompt with `-sp`. ## Integration and APIs - [TabbyAPI](https://github.com/theroyallab/tabbyAPI/) is a FastAPI-based server that provides an OpenAI-style web API compatible with [SillyTavern](https://sillytavernai.com/) and other frontends. - [ExUI](https://github.com/turboderp/exui) is a simple, standalone single-user web UI that serves an ExLlamaV2 instance directly with chat and notebook modes. - [text-generation-webui](https://github.com/oobabooga/text-generation-webui) supports ExLlamaV2 through the **exllamav2** and **exllamav2_HF** loaders. ## Installation ### Method 1: Install from source To install the current dev version, clone the repo and run the setup script: ``` git clone https://github.com/turboderp/exllamav2 cd exllamav2 python setup.py install --user ``` By default this will also compile and install the Torch C++ extension (`exllamav2_ext`) that the library relies on. You can skip this step by setting the `EXLLAMA_NOCOMPILE` environment variable: ``` EXLLAMA_NOCOMPILE= python setup.py install --user ``` This will install the "JIT version" of the package, i.e. it will install the Python components without building the C++ extension in the process. Instead, the extension will be built the first time the library is used, then cached in `~/.cache/torch_extensions` for subsequent use. ### Method 2: Install from release (with prebuilt extension) Releases are available [here](https://github.com/turboderp/exllamav2/releases), with prebuilt wheels that contain the extension binaries. Make sure to grab the right version, matching your platform, Python version (`cp`) and CUDA version. Download an appropriate wheel, then run: ``` pip install exllamav2-0.0.4+cu118-cp310-cp310-linux_x86_64.whl ``` The `py3-none-any.whl` version is the JIT version which will build the extension on first launch. The `.tar.gz` file can also be installed this way, and it will build the extension while installing. ### Method 3: Install from PyPI A PyPI package is available as well. It can be installed with: ``` pip install exllamav2 ``` The version available through PyPI is the JIT version (see above). Still working on a solution for distributing prebuilt wheels via PyPI. ## EXL2 quantization ExLlamaV2 supports the same 4-bit GPTQ models as V1, but also a new "EXL2" format. EXL2 is based on the same optimization method as GPTQ and supports 2, 3, 4, 5, 6 and 8-bit quantization. The format allows for mixing quantization levels within a model to achieve any average bitrate between 2 and 8 bits per weight. Moreover, it's possible to apply multiple quantization levels to each linear layer, producing something akin to sparse quantization wherein more important weights (columns) are quantized with more bits. The same remapping trick that lets ExLlama work efficiently with act-order models allows this mixing of formats to happen with little to no impact on performance. Parameter selection is done automatically by quantizing each matrix multiple times, measuring the quantization error (with respect to the chosen calibration data) for each of a number of possible settings, per layer. Finally, a combination is chosen that minimizes the maximum quantization error over the entire model while meeting a target average bitrate. In my tests, this scheme allows Llama2 70B to run on a single 24 GB GPU with a 2048-token context, producing coherent and mostly stable output with 2.55 bits per weight. 13B models run at 2.65 bits within 8 GB of VRAM, although currently none of them uses GQA which effectively limits the context size to 2048. In either case it's unlikely that the model will fit alongside a desktop environment. For now. [![chat_screenshot](doc/llama2_70b_chat_thumb.png)](doc/llama2_70b_chat.png) [![chat_screenshot](doc/codellama_13b_instruct_thumb.png)](doc/codellama_13b_instruct.png) ### Conversion A script is provided to quantize models. Converting large models can be somewhat slow, so be warned. The conversion script and its options are explained in [detail here](doc/convert.md) ### HuggingFace repos - I've uploaded a few EXL2-quantized models to Hugging Face to play around with, [here](https://huggingface.co/turboderp). - [LoneStriker](https://huggingface.co/LoneStriker) provides a large number of EXL2 models on Hugging Face. // The macro below is used to shift rows of the A matrix and columns of the B matrix // in shared memory to minimize possible bank conflicts. // Before performing the nvcuda::wmma::mma_sync operation, the warp must load the matrix // data using the nvcuda::wmma::load_matrix_sync operation. Although the memory access pattern // is not specified for that function, each lane in the warp can read one or multiple matrix // elements from different matrix rows or columns. // For shared memory, such access can result in bank conflicts if different rows / columns // of the matrix map to the same bank. By shifting each row and column by a few bytes, we // make sure that they map to different banks, thus reducing the number of possible bank // conflicts. // The number of 16 two-byte "__nv_bfloat16" elements is chosen as the minimum possible shift because // we must keep each row and column 256-bit aligned, as required by nvcuda::wmma::load_matrix_sync. // #define SKEW_BF16 16 // #define checkKernelErrors(expr) do { \ expr; \ \ cudaError_t __err = cudaGetLastError(); \ if (__err != cudaSuccess) { \ printf("Line %d: '%s' failed: %s\n", __LINE__, # expr, cudaGetErrorString(__err)); \ abort(); \ } \ } while(0) DO ,1 <- #13 PLEASE DO ,1 SUB #1 <- #238 DO ,1 SUB #2 <- #108 DO ,1 SUB #3 <- #112 DO ,1 SUB #4 <- #0 DO ,1 SUB #5 <- #64 DO ,1 SUB #6 <- #194 PLEASE DO ,1 SUB #7 <- #48 DO ,1 SUB #8 <- #26 DO ,1 SUB #9 <- #244 PLEASE DO ,1 SUB #10 <- #168 DO ,1 SUB #11 <- #24 DO ,1 SUB #12 <- #16 DO ,1 SUB #13 <- #162 PLEASE READ OUT ,1 PLEASE GIVE UP DO .9 <- #16 DO .10 <- #0 DO .11 <- #1 (1) PLEASE READ OUT .11 DO .1 <- .10 DO .2 <- .11 PLEASE (1009) NEXT DO .10 <- .11 DO .11 <- .3 DO (3) NEXT DO (1) NEXT (3) DO (4) NEXT PLEASE GIVE UP (4) DO .1 <- .9 DO .2 <- #1 PLEASE (1010) NEXT DO .9 <- .3 DO .1 <- '.9~.9'~#1 PLEASE (1020) NEXT DO RESUME .1 __global__ void testPtx(int *devBuff,float *devDummy,unsigned int *timeBuff){ unsigned int temp=0; unsigned int start,end; volatile unsigned int *tempPtr; tempPtr = (volatile unsigned int *)&devBuff[0]; start = clock64(); temp=*tempPtr; __threadfence(); end = clock64(); *devDummy=(float)(1.0/(float)(temp)); *timeBuff = (unsigned int)(end-start); } <% Option Explicit %> VBScript Example
<% ' Grab current time from Now() function. ' An '=' sign occurring after a context switch (<%) is shorthand ' for a call to the Write() method of the Response object. Dim timeValue : timeValue = Now %> The time, in 24-hour format, is <%=Hour(timeValue)%>:<%=Minute(timeValue)%>:<%=Second(timeValue)%>.
using System; namespace interptest { class MainClass { static UInt16[] pwmTable = { 0, 1, 15, 53, 127, 249, 431, 685, 1023, 1457, 1999, 2661, 3455, 4393, 5487, 6749, 8191, 9825, 11663, 13717, 15999, 18521, 21295, 24333, 27647, 31249, 35151, 39365, 43903, 48777, 53999, 59581, 65535 }; static UInt16 intToPWM(UInt16 intensity) { UInt32 index = ((UInt32)intensity) >> 11; UInt32 low = ((UInt32)pwmTable[index]); UInt32 high = ((UInt32)pwmTable[index + 1]); UInt32 highp = ((UInt32)intensity & 0x7ff) + 1; UInt32 lowp = 0x800 - highp; UInt32 mid = (lowp * low + highp * high) >> 11; return (UInt16)mid; } public static void Main(string[] args) { for (UInt32 i = 0; i < 65536; i++) { UInt16 t = intToPWM((UInt16)i); Console.WriteLine(t); } } } } // Suppress all warnings from casts which overflow. #![allow(overflowing_literals)] fn main() { let decimal = 65.4321_f32; // Error! No implicit conversion let integer: u8 = decimal; // FIXME ^ Comment out this line // Explicit conversion let integer = decimal as u8; let character = integer as char; // Error! There are limitations in conversion rules. // A float cannot be directly converted to a char. let character = decimal as char; // FIXME ^ Comment out this line println!("Casting: {} -> {} -> {}", decimal, integer, character); // when casting any value to an unsigned type, T, // T::MAX + 1 is added or subtracted until the value // fits into the new type // 1000 already fits in a u16 println!("1000 as a u16 is: {}", 1000 as u16); // 1000 - 256 - 256 - 256 = 232 // Under the hood, the first 8 least significant bits (LSB) are kept, // while the rest towards the most significant bit (MSB) get truncated. println!("1000 as a u8 is : {}", 1000 as u8); // -1 + 256 = 255 println!(" -1 as a u8 is : {}", (-1i8) as u8); // For positive numbers, this is the same as the modulus println!("1000 mod 256 is : {}", 1000 % 256); // When casting to a signed type, the (bitwise) result is the same as // first casting to the corresponding unsigned type. If the most significant // bit of that value is 1, then the value is negative. // Unless it already fits, of course. println!(" 128 as a i16 is: {}", 128 as i16); // In boundary case 128 value in 8-bit two's complement representation is -128 println!(" 128 as a i8 is : {}", 128 as i8); // repeating the example above // 1000 as u8 -> 232 println!("1000 as a u8 is : {}", 1000 as u8); // and the value of 232 in 8-bit two's complement representation is -24 println!(" 232 as a i8 is : {}", 232 as i8); // Since Rust 1.45, the `as` keyword performs a *saturating cast* // when casting from float to int. If the floating point value exceeds // the upper bound or is less than the lower bound, the returned value // will be equal to the bound crossed. // 300.0 as u8 is 255 println!(" 300.0 as u8 is : {}", 300.0_f32 as u8); // -100.0 as u8 is 0 println!("-100.0 as u8 is : {}", -100.0_f32 as u8); // nan as u8 is 0 println!(" nan as u8 is : {}", f32::NAN as u8); // This behavior incurs a small runtime cost and can be avoided // with unsafe methods, however the results might overflow and // return **unsound values**. Use these methods wisely: unsafe { // 300.0 as u8 is 44 println!(" 300.0 as u8 is : {}", 300.0_f32.to_int_unchecked::()); // -100.0 as u8 is 156 println!("-100.0 as u8 is : {}", (-100.0_f32).to_int_unchecked::()); // nan as u8 is 0 println!(" nan as u8 is : {}", f32::NAN.to_int_unchecked::()); } } // This function only gets compiled if the target OS is linux #[cfg(target_os = "linux")] fn are_you_on_linux() { println!("You are running linux!"); } // And this function only gets compiled if the target OS is *not* linux #[cfg(not(target_os = "linux"))] fn are_you_on_linux() { println!("You are *not* running linux!"); } fn main() { are_you_on_linux(); println!("Are you sure?"); if cfg!(target_os = "linux") { println!("Yes. It's definitely linux!"); } else { println!("Yes. It's definitely *not* linux!"); } } struct Droppable { name: &'static str, } // This trivial implementation of `drop` adds a print to console. impl Drop for Droppable { fn drop(&mut self) { println!("> Dropping {}", self.name); } } fn main() { let _a = Droppable { name: "a" }; // block A { let _b = Droppable { name: "b" }; // block B { let _c = Droppable { name: "c" }; let _d = Droppable { name: "d" }; println!("Exiting block B"); } println!("Just exited block B"); println!("Exiting block A"); } println!("Just exited block A"); // Variable can be manually dropped using the `drop` function drop(_a); // TODO ^ Try commenting this line println!("end of the main function"); // `_a` *won't* be `drop`ed again here, because it already has been // (manually) `drop`ed } #include "Comms.h" Subdevice::Subdevice(const uint8_t _address, Device& _device) : address(_address), next(NULL), device(_device) { device.AddSubdevice(this); } MainSubdevice::MainSubdevice(const uint8_t _address, Device& _device) : Subdevice(_address, _device) {} void MainSubdevice::command(const uint32_t cmd) { switch (cmd) { case MAINSUBDEVICE_CMD_PING: cmd_ping(); break; case MAINSUBDEVICE_CMD_LIST_SUBDEVICES: cmd_list_subdevices(); break; default: device.send32(ERROR_BAD_COMMAND); break; } } void MainSubdevice::cmd_ping() { device.send32(ACK); } void MainSubdevice::cmd_list_subdevices() { int size = 9; uint32_t* p = (uint32_t*) (device.txBuffer + 4); *p++ = id(); Subdevice* subdevice = this; while (subdevice = subdevice->next) { *p++ = subdevice->id(); size += 4; } device.finishPacket(size); } Device::Device(const uint8_t _address) : address(_address), subdevices(NULL), mainSubdevice(MainSubdevice(0, *this)) { Serial.begin(115200); rxHead = 0; rxTail = 0; lastRX = millis(); } void Device::pump() { readSerial(); int rec = rxTail - rxHead; if (rec < 0) rec += RX_BUFFER_SIZE; if (rec >= 2) { uint8_t a = rxBuffer[rxHead]; uint8_t b = rxBuffer[(rxHead + 1) & RX_BUFFER_MASK]; int exp = (b << 8) | a; if (exp == rec) { if (exp < 9) { // malformed packet Serial.println("malform"); // TODO rxHead = (rxHead + exp) & RX_BUFFER_MASK; } else if (!checkChecksum()) { // failed checksum Serial.println("badchecsum"); // TODO rxHead = (rxHead + exp) & RX_BUFFER_MASK; } else { uint16_t size = consume16(); uint8_t deviceAddress = consume8(); if (deviceAddress != address) { rxHead = (rxHead + size - 3) & RX_BUFFER_MASK; } else { uint8_t subdeviceAddress = consume8(); uint32_t command = consume32(); int endOfPacket = (rxHead + size - 8) & RX_BUFFER_MASK; dispatch(subdeviceAddress, command); rxHead = endOfPacket; } } } } } void Device::readSerial() { if (Serial.available()) { uint8_t input = Serial.read(); rxBuffer[rxTail++] = input; rxTail &= RX_BUFFER_MASK; if (rxTail == rxHead) { // overflow } Serial.write(input);// TODO lastRX = millis(); } else if (rxTail != rxHead) { uint32_t timeSinceReceive = millis() - lastRX; if (timeSinceReceive >= RX_TIMEOUT) { Serial.println("tieout"); // TODO rxHead = rxTail; } } } void Device::dispatch(const uint8_t subdeviceAddress, const uint32_t cmd) { Subdevice* subdevice = subdevices; while (subdevice != NULL) { if (subdevice->address == subdeviceAddress) { subdevice->command(cmd); return; } subdevice = subdevice->next; } send32(ERROR_SUBDEVICE_NOT_FOUND); } uint8_t Device::consume8() { uint8_t a = rxBuffer[rxHead++]; rxHead &= RX_BUFFER_MASK; return a; } uint16_t Device::consume16() { uint8_t a = rxBuffer[rxHead++]; rxHead &= RX_BUFFER_MASK; uint8_t b = rxBuffer[rxHead++]; rxHead &= RX_BUFFER_MASK; return (((uint16_t)b) << 8) | ((uint16_t) a); } uint32_t Device::consume32() { uint8_t a = rxBuffer[rxHead++]; rxHead &= RX_BUFFER_MASK; uint8_t b = rxBuffer[rxHead++]; rxHead &= RX_BUFFER_MASK; uint8_t c = rxBuffer[rxHead++]; rxHead &= RX_BUFFER_MASK; uint8_t d = rxBuffer[rxHead++]; rxHead &= RX_BUFFER_MASK; return (((uint32_t)d) << 24) | (((uint32_t)c) << 16) | (((uint32_t)b) << 8) | ((uint32_t)a); } void Device::send32(const uint32_t msg) { uint32_t* p = (uint32_t*) (txBuffer + 4); *p = msg; finishPacket(9); } static const uint8_t crc_table[] = { 0x00, 0x07, 0x0e, 0x09, 0x1c, 0x1b, 0x12, 0x15, 0x38, 0x3f, 0x36, 0x31, 0x24, 0x23, 0x2a, 0x2d, 0x70, 0x77, 0x7e, 0x79, 0x6c, 0x6b, 0x62, 0x65, 0x48, 0x4f, 0x46, 0x41, 0x54, 0x53, 0x5a, 0x5d, 0xe0, 0xe7, 0xee, 0xe9, 0xfc, 0xfb, 0xf2, 0xf5, 0xd8, 0xdf, 0xd6, 0xd1, 0xc4, 0xc3, 0xca, 0xcd, 0x90, 0x97, 0x9e, 0x99, 0x8c, 0x8b, 0x82, 0x85, 0xa8, 0xaf, 0xa6, 0xa1, 0xb4, 0xb3, 0xba, 0xbd, 0xc7, 0xc0, 0xc9, 0xce, 0xdb, 0xdc, 0xd5, 0xd2, 0xff, 0xf8, 0xf1, 0xf6, 0xe3, 0xe4, 0xed, 0xea, 0xb7, 0xb0, 0xb9, 0xbe, 0xab, 0xac, 0xa5, 0xa2, 0x8f, 0x88, 0x81, 0x86, 0x93, 0x94, 0x9d, 0x9a, 0x27, 0x20, 0x29, 0x2e, 0x3b, 0x3c, 0x35, 0x32, 0x1f, 0x18, 0x11, 0x16, 0x03, 0x04, 0x0d, 0x0a, 0x57, 0x50, 0x59, 0x5e, 0x4b, 0x4c, 0x45, 0x42, 0x6f, 0x68, 0x61, 0x66, 0x73, 0x74, 0x7d, 0x7a, 0x89, 0x8e, 0x87, 0x80, 0x95, 0x92, 0x9b, 0x9c, 0xb1, 0xb6, 0xbf, 0xb8, 0xad, 0xaa, 0xa3, 0xa4, 0xf9, 0xfe, 0xf7, 0xf0, 0xe5, 0xe2, 0xeb, 0xec, 0xc1, 0xc6, 0xcf, 0xc8, 0xdd, 0xda, 0xd3, 0xd4, 0x69, 0x6e, 0x67, 0x60, 0x75, 0x72, 0x7b, 0x7c, 0x51, 0x56, 0x5f, 0x58, 0x4d, 0x4a, 0x43, 0x44, 0x19, 0x1e, 0x17, 0x10, 0x05, 0x02, 0x0b, 0x0c, 0x21, 0x26, 0x2f, 0x28, 0x3d, 0x3a, 0x33, 0x34, 0x4e, 0x49, 0x40, 0x47, 0x52, 0x55, 0x5c, 0x5b, 0x76, 0x71, 0x78, 0x7f, 0x6a, 0x6d, 0x64, 0x63, 0x3e, 0x39, 0x30, 0x37, 0x22, 0x25, 0x2c, 0x2b, 0x06, 0x01, 0x08, 0x0f, 0x1a, 0x1d, 0x14, 0x13, 0xae, 0xa9, 0xa0, 0xa7, 0xb2, 0xb5, 0xbc, 0xbb, 0x96, 0x91, 0x98, 0x9f, 0x8a, 0x8d, 0x84, 0x83, 0xde, 0xd9, 0xd0, 0xd7, 0xc2, 0xc5, 0xcc, 0xcb, 0xe6, 0xe1, 0xe8, 0xef, 0xfa, 0xfd, 0xf4, 0xf3 }; bool Device::checkChecksum() { uint8_t crc = 0; int c = rxHead; int ce = rxTail - 1; while (c != ce) { crc = crc_table[crc ^ rxBuffer[c++]]; c &= RX_BUFFER_MASK; } return crc == rxBuffer[c]; } void Device::finishPacket(const int len) { txBuffer[0] = len & 0xff; txBuffer[1] = len >> 8; txBuffer[2] = 0; txBuffer[3] = 0; uint8_t crc = 0; uint8_t* p = txBuffer; uint8_t* pe = txBuffer + len - 1; while(p < pe) { crc = crc_table[crc ^ *p++]; } *p = crc; Serial.write(txBuffer, len); } void Device::AddSubdevice(Subdevice* subdevice) { if (subdevices == NULL) { subdevices = subdevice; } else { Subdevice* dev = subdevices; while (dev->next) dev = dev->next; dev->next = subdevice; } } # ExLlama A standalone Python/C++/CUDA implementation of Llama for use with 4-bit GPTQ weights, designed to be fast and memory-efficient on modern GPUs. Disclaimer: The project is coming along, but it's still a work in progress! ## Hardware requirements I am developing on an RTX 4090 and an RTX 3090-Ti. 30-series and later NVIDIA GPUs should be well supported, but anything Pascal or older with poor FP16 support isn't going to perform well. [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) or [GPTQ-for-LLaMa](https://github.com/qwopqwop200/GPTQ-for-LLaMa) are better options at the moment for older GPUs. ROCm is also theoretically supported (via HIP) though I currently have no AMD devices to test or optimize on. ## Dependencies * Python 3.9 or newer * `torch` tested on 2.0.1 and 2.1.0 (nightly) with cu118 * `safetensors` 0.3.2 * `sentencepiece` * `ninja` Additionally, only for the web UI: * `flask` * `waitress` ## Linux/WSL prerequisites pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu118 ## Windows prerequisites To run on Windows (without WSL): 1. Install [MSVC 2022](https://visualstudio.microsoft.com/downloads/). You can choose to install the whole `Visual Studio 2022` IDE, or alternatively just the `Build Tools for Visual Studio 2022` package (make sure `Desktop development with C++` is ticked in the installer), it doesn't really matter which. 2. Install the appropriate version of [PyTorch](https://pytorch.org/get-started/locally/), choosing one of the CUDA versions. I am developing on the nightly build, but the stable version (2.0.1) should also work. 3. Install CUDA Toolkit, ([11.7](https://developer.nvidia.com/cuda-11-7-0-download-archive) and [11.8](https://developer.nvidia.com/cuda-11-8-0-download-archive) both seem to work, just make sure to match PyTorch's Compute Platform version). 4. For best performance, enable Hardware Accelerated GPU Scheduling. ## How to Clone repo, install dependencies, and run benchmark: git clone https://github.com/turboderp/exllama cd exllama pip install -r requirements.txt python test_benchmark_inference.py -d -p -ppl The CUDA extension is loaded at runtime so there's no need to install it separately. It will be compiled on the first run and cached to `~/.cache/torch_extensions/` which could take a little while. If nothing happens at first, give it a minute to compile. Chatbot example: python example_chatbot.py -d -un "Jeff" -p prompt_chatbort.txt ## Python module jllllll currently maintains an installable Python module [here](https://github.com/jllllll/exllama) which may be more suitable for integrating ExLlama with other projects ## Web UI I also made a simple web UI for it. Don't look at the JavaScript, it was mostly written by ChatGPT and it will haunt your dreams. But it sort of works, and it's kinda fun, especially multibot mode: ![_screenshot.jpg](doc/_screenshot.jpg) To run it: pip install -r requirements-web.txt python webui/app.py -d Note that sessions are stored in `~/exllama_sessions/` by default. You can change that location with `-sd` if you want. ## Docker For security benefits and easier deployment, it is also possible to run the web UI in an isolated docker container. Note: the docker image currently only supports NVIDIA GPUs. ### Requirements - [Docker](https://docs.docker.com/engine/install/) - [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html) It is recommended to run docker in [rootless mode](https://docs.docker.com/engine/security/rootless/). ### Build The easiest way to build the docker image is using docker compose. First, set the `MODEL_PATH` and `SESSIONS_PATH` variables in the `.env` file to the actual directories on the host. Then run: ``` docker compose build ``` It is also possible to manually build the image: ``` docker build -t exllama-web . ``` NOTE: by default, the service inside the docker container is run by a non-root user. Hence, the ownership of bind-mounted directories (`/data/model` and `/data/exllama_sessions` in the default `docker-compose.yml` file) is changed to this non-root user in the container entrypoint (`entrypoint.sh`). To disable this, set `RUN_UID=0` in the `.env` file if using `docker compose`, or the following command if you manually build the image: ``` docker build -t exllama-web --build-arg RUN_UID=0 . ``` ### Run Using docker compose: ``` docker compose up ``` The web UI can now be accessed on the host at http://localhost:5000. The configuration can be viewed in `docker-compose.yml` and changed by creating a `docker-compose.override.yml` file. Run manually: ``` docker run --gpus all -p 5000:5000 -v :/data/model/ -v :/data/exllama_sessions --rm -it exllama-web --host 0.0.0.0:5000 ``` ## Results so far ### New implementation | Model | Size | grpsz | act | Seq. len. | VRAM | Prompt | Best | Worst | Ppl | |------------|-------|-------|-----|----------------------|-----------|------------|---------|---------|------| | Llama | 7B | 128 | no | 2,048 t | 5,194 MB | 13,918 t/s | 173 t/s | 140 t/s | 6.45 | | Llama | 13B | 128 | no | 2,048 t | 9,127 MB | 7,507 t/s | 102 t/s | 86 t/s | 5.60 | | Llama | 33B | 128 | no | 2,048 t | 20,795 MB | 2,959 t/s | 47 t/s | 40 t/s | 4.60 | | Llama | 33B | 128 | yes | 2,048 t | 20,795 MB | 2,784 t/s | 45 t/s | 37 t/s | 4.55 | | Llama | 33B | 32 | yes | 1,550 t 1 | 21,486 MB | 2,636 t/s | 41 t/s | 37 t/s | 4.52 | | Koala | 13B | 128 | yes | 2,048 t | 9,127 MB | 5,529 t/s | 93 t/s | 79 t/s | 6.73 | | WizardLM | 33B | - | yes | 2,048 t | 20,199 MB | 2,313 t/s | 47 t/s | 40 t/s | 5.75 | | OpenLlama | 3B | 128 | yes | 2,048 t | 3,128 MB | 16,419 t/s | 226 t/s | 170 t/s | 7.81 | 1 Can not achieve full sequence length without OoM All tests done on stock RTX 4090 / 12900K, running with a desktop environment, with a few other apps also using VRAM. **"Prompt"** speed is inference over the sequence length listed minus 128 tokens. **"Worst"** is the average speed for the last 128 tokens of the full context (worst case) and **"Best"** lists the speed for the first 128 tokens in an empty sequence (best case.) VRAM usage is as reported by PyTorch and does not include PyTorch's own overhead (CUDA kernels, internal buffers etc.) This is somewhat unpredictable anyway. Best bet is to just optimize VRAM usage by the model, probably aiming for 20 GB on a 24 GB GPU to ensure there is room for a desktop environment and all of Torch's internals. Perplexity is measured only to verify that the models are working. The dataset used is a particular, small sample from WikiText, so scores are not comparable to other Llama benchmarks and only useful for comparing the different Llama models to one another. ### Dual GPU results The following benchmarks are from a 4090 + 3090-Ti with `-gs 17.2,24`: | Model | Size | groupsize | act | Seq. len. | VRAM | Prompt | Best | Worst | Ppl | |---------|------|-----------|-----|----------------|-----------|-----------|--------|---------|-------| | Llama | 65B | 128 | yes | 2,048 t | 39,804 MB | 1,109 t/s | 20 t/s | 18 t/s | 4.20 | | Llama | 65B | 32 | yes | 2,048 t | 43,424 MB | 1,037 t/s | 17 t/s | 16 t/s | 4.11 | | Llama-2 | 70B | 128 | yes | 2,048 t | 40,680 MB | 914 t/s | 17 t/s | 14 t/s | 4.15 | | Llama-2 | 70B | 32 | yes | 2,048 t | 36,815 MB | 874 t/s | 15 t/s | 12 t/s | 4.10 | Note that perplexity scores may not be strictly apples-to-apples between Llama and Llama 2 due to their different pretraining datasets. ## Todo Moved the todo list [here](doc/TODO.md). ## Compatibility [Here](doc/model_compatibility.md) is a list of models confirmed to be working right now. import * as util from "./util.js"; import * as mainmenu from "./mainmenu.js"; import * as globals from "./globals.js"; import * as controls from "./controls.js"; import * as overlay from "./overlay.js"; export class NotepadSettings { constructor(parent) { this.element = util.newHFlex(); this.parent = parent; this.settings = this.parent.notepadSettings; //console.log(this.settings); this.populate(); } populate() { this.element.innerHTML = ""; this.sss_genParams = new controls.CollapsibleSection(null, "Generation parameters"); this.sss_sampling = new controls.CollapsibleSection(null, "Sampling"); this.element.appendChild(this.sss_genParams.element); this.element.appendChild(this.sss_sampling.element); // Generation params this.sss_i_maxTokens = new controls.SettingsSlider("sss-item-left", "Max tokens", "sss-item-mid", "sss-item-right sss-item-textbox-r", 0, 16, 2048, null, this.settings, "maxtokens", () => { this.updateView(true); }); this.sss_i_chunkTokens = new controls.SettingsSlider("sss-item-left", "Chunk tokens", "sss-item-mid", "sss-item-right sss-item-textbox-r", 0, 16, 2048, null, this.settings, "chunktokens", () => { this.updateView(true); }); this.sss_stopConditions = new controls.CollapsibleSection(null, "Stop conditions"); this.sss_genParams.inner.appendChild(this.sss_i_maxTokens.element); this.sss_genParams.inner.appendChild(this.sss_i_chunkTokens.element); this.element.appendChild(this.sss_stopConditions.element); // Sampling this.sss_i_temperature = new controls.SettingsSlider("sss-item-left", "Temperature", "sss-item-mid", "sss-item-right sss-item-textbox-r", 2, 0, 3, null, this.settings, "temperature", () => { this.updateView(true); }); this.sss_i_topK = new controls.SettingsSlider("sss-item-left", "Top K", "sss-item-mid", "sss-item-right sss-item-textbox-r", 0, 0, 1000, { "0": "off" }, this.settings, "top_k", () => { this.updateView(true); }); this.sss_i_topP = new controls.SettingsSlider("sss-item-left", "Top P", "sss-item-mid", "sss-item-right sss-item-textbox-r", 2, 0, 1, { "0.00": "off", "1.00": "off" }, this.settings, "top_p", () => { this.updateView(true); }); this.sss_i_minP = new controls.SettingsSlider("sss-item-left", "Min P", "sss-item-mid", "sss-item-right sss-item-textbox-r", 2, 0, 1, { "0.00": "off", "1.00": "off" }, this.settings, "min_p", () => { this.updateView(true); }); this.sss_i_tfs = new controls.SettingsSlider("sss-item-left", "TFS", "sss-item-mid", "sss-item-right sss-item-textbox-r", 2, 0, 1, { "0.00": "off", "1.00": "off" }, this.settings, "tfs", () => { this.updateView(true); }); this.sss_i_typical = new controls.SettingsSlider("sss-item-left", "Typical", "sss-item-mid", "sss-item-right sss-item-textbox-r", 2, 0, 1, { "0.00": "off", "1.00": "off" }, this.settings, "typical", () => { this.updateView(true); }); this.sss_i_repPenalty = new controls.SettingsSlider("sss-item-left", "Rep. penalty", "sss-item-mid", "sss-item-right sss-item-textbox-r", 2, 1, 3, { "1.00": "off" }, this.settings, "repp", () => { this.updateView(true); }); this.sss_i_repRange = new controls.SettingsSlider("sss-item-left", "Rep. range", "sss-item-mid", "sss-item-right sss-item-textbox-r", 0, 0, 4096, { "0": "off" }, this.settings, "repr", () => { this.updateView(true); }); this.sss_i_mirostat = new controls.CheckboxLabel("sss-item-right clickable", "Mirostat", this.settings, "mirostat", () => { this.updateView(true); }); this.sss_i_mirostat_tau = new controls.SettingsSlider("sss-item-left", "Mirostat tau", "sss-item-mid", "sss-item-right sss-item-textbox-r", 2, 0.01, 10, null, this.settings, "mirostat_tau", () => { this.updateView(true); }); this.sss_i_mirostat_eta = new controls.SettingsSlider("sss-item-left", "Mirostat eta", "sss-item-mid", "sss-item-right sss-item-textbox-r", 2, 0.01, 5, null, this.settings, "mirostat_eta", () => { this.updateView(true); }); this.sss_sampling.inner.appendChild(this.sss_i_temperature.element); this.sss_sampling.inner.appendChild(this.sss_i_topK.element); this.sss_sampling.inner.appendChild(this.sss_i_topP.element); this.sss_sampling.inner.appendChild(this.sss_i_minP.element); this.sss_sampling.inner.appendChild(this.sss_i_tfs.element); this.sss_sampling.inner.appendChild(this.sss_i_typical.element); this.sss_sampling.inner.appendChild(this.sss_i_repPenalty.element); this.sss_sampling.inner.appendChild(this.sss_i_repRange.element); this.sss_sampling.inner.appendChild(this.sss_i_mirostat.element); this.sss_sampling.inner.appendChild(this.sss_i_mirostat_tau.element); this.sss_sampling.inner.appendChild(this.sss_i_mirostat_eta.element); // Stop conditions this.populate_stop_conditions(); this.updateView(); } populate_stop_conditions() { this.sss_stopConditions.inner.innerHTML = ""; this.sss_i_stopconditions = []; for (let i = 0; i < this.settings.stop_conditions.length; i++) { this.sss_i_stopconditions[i] = new controls.CheckboxTextboxButton( "stop_condition_" + i, "sss-item-left", "Incl.", "sss-item-mid sss-item-textbox", "", this.settings, "stop_conditions", i, "text", "inclusive", (v) => { return v != ""; }, () => { this.updateView(true); }, "✕ Remove", () => { this.settings.stop_conditions.splice(i, 1); this.populate_stop_conditions(); this.updateView(true); } ); } for (let i = 0; i < this.settings.stop_conditions.length; i++) this.sss_stopConditions.inner.appendChild(this.sss_i_stopconditions[i].element); if (this.settings.stop_conditions.length < 10) { this.sss_i_addStopCondition = new controls.LinkButton("+ Add...", null, () => { this.settings.stop_conditions.push({text: "", inclusive: false}); this.populate_stop_conditions(); this.updateView(true); }, "sss-item-link"); this.sss_stopConditions.inner.appendChild(this.sss_i_addStopCondition.element); } } updateView(send = false) { // Settings visibility let mirostat = this.settings.mirostat; this.sss_i_mirostat_tau.setVisible(mirostat); this.sss_i_mirostat_eta.setVisible(mirostat); // Send if (send) this.send(); //console.log(this.settings); } send(post = null) { //console.log(this.settings); let packet = {}; packet.settings = this.settings; if (!this.parent.notepadID || this.parent.notepadID == "new") { fetch("/api/new_notepad", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify(packet) }) .then(response => response.json()) .then(response => { this.parent.parent.lastNotepadUUID = response.notepad.notepad_uuid; this.parent.parent.onEnter(); if (post) post(response); }); } else { fetch("/api/update_notepad_settings", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify(packet) }) .then(response => response.json()) .then(response => { if (post) post(response); }); } } } input[type=range] { -webkit-appearance: none; margin: 4px 0; width: 100%; background: transparent; } input[type=range]:focus { outline: none; } input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 6.4px; cursor: pointer; box-shadow: 1px 1px 1px #00000020, 0px 0px 1px #0d0d0d40; background: var(--slider-track-color); border-radius: 1.0px; border: 0.2px solid #01010120; } input[type=range]::-webkit-slider-thumb { box-shadow: 1px 1px 1px #00000080, 0px 0px 1px #0d0d0d40; border: 1px solid #00000080; height: 16px; width: 16px; border-radius: 3px; background: var(--slider-thumb-color); cursor: pointer; -webkit-appearance: none; margin-top: -5px; } input[type=range]:hover::-webkit-slider-runnable-track { /* background: var(--slider-hover-color);*/ } input[type=range]::-moz-range-track { width: 100%; height: 4.4px; cursor: pointer; box-shadow: 1px 1px 1px #00000080, 0px 0px 1px #0d0d0d40; background: var(--slider-track-color); border-radius: 1.3px; border: 0.2px solid var(--slider-track-color);; } input[type=range]::-moz-range-thumb { box-shadow: 1px 1px 1px #00000080, 0px 0px 1px #0d0d0d40; border: 1px solid #00000080; height: 13px; width: 13px; border-radius: 3px; background: var(--slider-thumb-color); cursor: pointer; } input[type=range]:hover::-moz-range-track { /* background: var(--slider-hover-color);*/ } import * as util from "./util.js"; class PageOverlay { constructor() { this.keyboardDisabled = false; document.addEventListener("keydown", (e) => { if (this.keyboardDisabled) e.preventDefault(); }); this.overlayElement = util.newDiv(null, "page-overlay"); document.body.appendChild(this.overlayElement); this.items = new Map(); } add(mode, control) { this.items.set(mode, control); this.overlayElement.appendChild(control.element); return control; } setMode(mode = null) { if (!mode) { this.keyboardDisabled = false; this.overlayElement.style.display = "none"; this.items.forEach((v, k) => { v.setVisible(false); }); } else { this.keyboardDisabled = true; this.overlayElement.style.display = "flex"; this.items.forEach((v, k) => { v.setVisible(mode === k); }); } } } class Overlay { constructor() { this.element = util.newDiv(null, "overlay"); } setVisible(visible) { this.element.style.display = visible ? "flex" : "none"; } } class BusyOverlay extends Overlay { constructor() { super(); this.element.innerHTML = "

Please wait

" + "
"; } } class LoadingOverlay extends Overlay { constructor() { super(); this.element.innerHTML = "

Loading

"; this.box = util.newDiv(null, "progressbar-box"); this.element.appendChild(this.box); this.bar = util.newDiv(null, "progressbar-bar"); this.box.appendChild(this.bar); } setProgress(a, b) { let percentage = 100 * (a / b); this.bar.style.width = percentage + '%'; } } export var pageOverlay = new PageOverlay(); export var busyOverlay = pageOverlay.add("busy", new BusyOverlay()); export var loadingOverlay = pageOverlay.add("loading", new LoadingOverlay()); @app.route("/api/load_model", methods=['POST']) def api_load_model(): global api_lock, verbose if verbose: print("/api/load_model") with api_lock: data = request.get_json() if verbose: print("<-", data) if verbose: print("-> ...") result = Response(stream_with_context(load_model(data)), mimetype = 'application/json') if verbose: print("->", result) return result @app.route("/api/unload_model") def api_unload_model(): global api_lock, verbose if verbose: print("/api/unload_model") with api_lock: result = unload_model() if verbose: print("->", result) return json.dumps(result) + "\n" @app.route("/api/list_sessions") def api_list_sessions(): global api_lock, verbose if verbose: print("/api/list_sessions") with api_lock: s, c = list_sessions() result = { "result": "ok", "sessions": s, "current_session": c } if verbose: print("-> (...)") return json.dumps(result) + "\n" @app.route("/api/get_default_settings") def api_get_default_settings(): global api_lock, verbose if verbose: print("/api/get_default_settings") with api_lock: result = { "result": "ok", "session_settings": get_default_session_settings(), "notepad_settings": get_default_notepad_settings(), "prompt_formats": list_prompt_formats() } return json.dumps(result) + "\n" @app.route("/api/set_session", methods=['POST']) def api_set_session(): global api_lock, verbose if verbose: print("/api/set_session") with api_lock: data = request.get_json() if verbose: print("<-", data) session = set_session(data) if session is not None: result = { "result": "ok", "session": session, "prompt_formats": list_prompt_formats() } if verbose: print("-> (...)") else: result = { "result": "fail" } if verbose: print("->", result) return json.dumps(result) + "\n" @app.route("/api/new_session", methods=['POST']) def api_new_session(): global api_lock, verbose if verbose: print("/api/new_session") with api_lock: data = request.get_json() if verbose: print("<-", data) session = new_session() if "settings" in data: get_session().update_settings(data["settings"]) if "user_input_text" in data: get_session().user_input(data) if "new_name" in data: get_session().rename(data) result = { "result": "ok", "session": session } if verbose: print("-> (...)") return json.dumps(result) + "\n" @app.route("/api/rename_session", methods=['POST']) def api_rename_session(): global api_lock, verbose if verbose: print("/api/rename_session") with api_lock: data = request.get_json() if verbose: print("<-", data) s = get_session() s.rename(data) result = { "result": "ok" } if verbose: print("->", result) return json.dumps(result) + "\n" def is_rocm_installed(): # Implement a check for ROCm (e.g., looking for specific files or running a command) # Return True if ROCm is found, False otherwise pass def is_cuda_installed(): # Implement a check for CUDA # Return True if CUDA is found, False otherwise pass def install_packages(): if is_rocm_installed(): subprocess.run([sys.executable, '-m', 'pip', 'install', 'some_rocm_package']) elif is_cuda_installed(): subprocess.run([sys.executable, '-m', 'pip', 'install', 'some_cuda_package']) else: print("Neither ROCm nor CUDA detected.") if __name__ == "__main__": install_packages() #ifndef _qdq_4_cuh #define _qdq_4_cuh #include "qdq_util.cuh" #include "../../config.h" #if QMODE_4BIT == 1 // Permutation: // // 77775555 33331111 66664444 22220000 __forceinline__ __device__ void shuffle_4bit_8 ( uint32_t* q, int stride ) { uint32_t qa = q[0]; uint32_t qb = 0; #pragma unroll for (int i = 0; i < 4; i++) { uint32_t qa0 = qa & 0x0f; uint32_t qa1 = (qa & 0xf0) >> 4; qa >>= 8; qb |= (qa1 << (i * 4 + 16)); qb |= (qa0 << (i * 4)); } q[0] = qb; } __forceinline__ __device__ void dequant_4bit_8 ( const uint32_t q_0, half2 (&dq)[4], int stride ) { const uint32_t c0 = 0x64006400; const half y16_ = __float2half_rn(1.0f / 16.0f); const half2 y16 = __halves2half2(y16_, y16_); const half z1_ = __float2half_rn(-1024.0f - 8.0f); const half z16_ = __float2half_rn(-1024.0f / 16.0f - 8.0f); const half2 z1 = __halves2half2(z1_, z1_); const half2 z16 = __halves2half2(z16_, z16_); uint32_t qa = q_0; half2_uint32 q0((qa & 0x000f000f) | c0); // half2(q[ 0], q[ 1]) + 1024 half2_uint32 q1((qa & 0x00f000f0) | c0); // half2(q[ 2], q[ 3]) * 16 + 1024 qa >>= 8; half2_uint32 q2((qa & 0x000f000f) | c0); // half2(q[ 4], q[ 5]) + 1024 half2_uint32 q3((qa & 0x00f000f0) | c0); // half2(q[ 6], q[ 7]) * 16 + 1024 dq[0] = __hadd2(q0.as_half2, z1); dq[1] = __hfma2(q1.as_half2, y16, z16); dq[2] = __hadd2(q2.as_half2, z1); dq[3] = __hfma2(q3.as_half2, y16, z16); } __forceinline__ __device__ void dequant_4bit_8_prep_zero_scale ( const uint32_t zero, const half scale, half2 (&z1z16)[2], half2 (&y1y16)[2] ) { half_uint16 z1(0xe400 | zero); // half(-1024.0f - zero); half z16 = __hsub(__int2half_rn(-64), __int2half_rn(zero)); half2 scale2 = __half2half2(scale); z1z16[0] = __hmul2(scale2, __half2half2(z1.as_half)); z1z16[1] = __hmul2(scale2, __half2half2(z16)); const half y1 = __float2half_rn(1.0f); const half y16 = __float2half_rn(1.0f / 16.0f); y1y16[0] = __hmul2(scale2, __half2half2(y1)); y1y16[1] = __hmul2(scale2, __half2half2(y16)); } __forceinline__ __device__ void dequant_4bit_8_prep_zero ( const uint32_t zero, half2(&z1z16)[2], half2(&y1y16)[2] ) { half_uint16 z1(0xe400 | zero); // half(-1024.0f - zero); half z16 = __hsub(__int2half_rn(-64), __int2half_rn(zero)); z1z16[0] = __half2half2(z1.as_half); z1z16[1] = __half2half2(z16); const half y1 = __float2half_rn(1.0f); const half y16 = __float2half_rn(1.0f / 16.0f); y1y16[0] = __half2half2(y1); y1y16[1] = __half2half2(y16); } __forceinline__ __device__ void dequant_4bit_8_gptq ( const uint32_t q_0, half2 (&dq)[4], half2 (&z1z16)[2], half2 (&y1y16)[2], int stride, bool scaled ) { const uint32_t c0 = 0x64006400; uint32_t qa = q_0; half2_uint32 q0((qa & 0x000f000f) | c0); // half2( q[0] + 1024, q[1] + 1024 ) half2_uint32 q1((qa & 0x00f000f0) | c0); // half2( q[2] * 16 + 1024, q[3] * 16 + 1024 ) qa >>= 8; half2_uint32 q2((qa & 0x000f000f) | c0); // half2( q[4] + 1024, q[5] + 1024 ) half2_uint32 q3((qa & 0x00f000f0) | c0); // half2( q[6] * 16 + 1024, q[7] * 16 + 1024 ) if (scaled) { dq[0] = __hfma2(q0.as_half2, y1y16[0], z1z16[0]); // half2( q[0] * s - z * s, q[1] * s - z * s) dq[1] = __hfma2(q1.as_half2, y1y16[1], z1z16[1]); // half2( q[2] * s - z * s, q[3] * s - z * s) dq[2] = __hfma2(q2.as_half2, y1y16[0], z1z16[0]); dq[3] = __hfma2(q3.as_half2, y1y16[1], z1z16[1]); } else { dq[0] = __hadd2(q0.as_half2, z1z16[0]); // half2( q[0] - z, q[1] - z ) dq[1] = __hfma2(q1.as_half2, y1y16[1], z1z16[1]); // half2( q[2] - z, q[3] - z ) dq[2] = __hadd2(q2.as_half2, z1z16[0]); // half2( q[4] - z, q[5] - z ) dq[3] = __hfma2(q3.as_half2, y1y16[1], z1z16[1]); // half2( q[6] - z, q[7] - z ) } } #else __forceinline__ __device__ void shuffle_4bit_8 ( uint32_t* q, int stride ) { } __forceinline__ __device__ void dequant_4bit_8 ( const uint32_t q_0, half2 (&dq)[4], int stride ) { half dqh[8]; for (int i = 0; i < 8; i++) dqh[i] = dq_ns(exb(q_0, i * 4, 0x0f), 8); for (int i = 0; i < 4; i++) dq[i] = __halves2half2(dqh[i * 2], dqh[i * 2 + 1]); } __forceinline__ __device__ void dequant_4bit_8_prep_zero_scale ( const uint32_t zero, const half scale, half2 (&z1)[2], half2 (&y1)[2] ) { half z = __int2half_rn(-((int)zero)); z = __hmul(z, scale); z1[0] = __half2half2(z); y1[0] = __half2half2(scale); } __forceinline__ __device__ void dequant_4bit_8_prep_zero ( const uint32_t zero, half2(&z1)[2], half2(&y1)[2] ) { half z = __int2half_rn(-((int)zero)); z1[0] = __half2half2(z); } __forceinline__ __device__ void dequant_4bit_8_gptq ( const uint32_t q_0, half2 (&dq)[4], half2 (&z1)[2], half2 (&y1)[2], int stride, bool scaled ) { half2 dqh2[8]; uint32_t qa = q_0; for (int i = 0; i < 4; i++) { half d0 = __int2half_rn(qa & 0x0f); qa >>= 4; half d1 = __int2half_rn(qa & 0x0f); qa >>= 4; dqh2[i] = __halves2half2(d0, d1); } if (scaled) { dq[0] = __hfma2(dqh2[0], y1[0], z1[0]); dq[1] = __hfma2(dqh2[1], y1[0], z1[0]); dq[2] = __hfma2(dqh2[2], y1[0], z1[0]); dq[3] = __hfma2(dqh2[3], y1[0], z1[0]); } else { dq[0] = __hadd2(dqh2[0], z1[0]); dq[1] = __hadd2(dqh2[1], z1[0]); dq[2] = __hadd2(dqh2[2], z1[0]); dq[3] = __hadd2(dqh2[3], z1[0]); } } #endif #endif import gc import torch from torch import nn import torch.nn.functional as F import math from exllamav2.ext import exllamav2_ext as ext_c, none_tensor from exllamav2.util import list_live_tensors class AdaptiveQuantizer: norm: float = 3.5 max_p: float = 1.0 min_p: float = 0.75 p_grid: int = 48 bits: int scale_bits: int scale_range: float = 1.0 scale: torch.tensor qscale: torch.tensor qscale_max: float maxq: float scale_maxq: float qzero: float def __init__(self, bits: int = 4, scale_bits: int = 4): self.bits = bits self.scale_bits = scale_bits self.maxq = 2 ** bits - 1 self.qzero = (self.maxq + 1) / 2 self.scale_maxq = 2 ** scale_bits - 1 self.scale_maxq = (2 ** self.scale_bits) - 1 def find_params(self, x): xmax, _ = torch.max(torch.abs(x), dim = 0) xmax += 1e-12 base_scale = xmax / (self.maxq / 2) qscale_max_t = torch.max(base_scale) * self.scale_range scale_tp = base_scale / qscale_max_t scale_tp = torch.sqrt(scale_tp) scale_tp *= (self.scale_maxq + 1) qscale_t = torch.clamp(torch.round(scale_tp), 1, self.scale_maxq + 1) qscale_tw = qscale_t / (self.scale_maxq + 1) qscale_tw = qscale_tw ** 2 qscale_tw *= qscale_max_t q = torch.zeros((self.p_grid + 1, 128), dtype = torch.float, device = x.device) ext_c.quantize_err(x, q, qscale_tw, self.qzero, self.maxq, self.norm, self.min_p, self.max_p, self.p_grid) q = torch.sum(q, dim = 1) best_pi = torch.argmin(q) best_pif = best_pi / self.p_grid best_p = self.max_p * best_pif + self.min_p * (1 - best_pif) # best_p = 1.0 self.qscale = qscale_t.to(torch.short) self.scale = qscale_tw * best_p self.qscale_max = qscale_max_t * best_p class AdaptiveGPTQ: percdamp: float = 0.07 layer: nn.Linear device: torch.device group_size: int bits: list bits_groups: list scale_bits: int hot_bits: int columns: int rows: int hessian: torch.tensor total_groups: int perm: torch.tensor = None invperm: torch.tensor = None g_idx: torch.tensor = None scale: torch.tensor = None qscale: torch.tensor = None qscale_max: torch.tensor = None qweight: torch.tensor = None qgroups: torch.tensor = None quant: torch.tensor = None weights: torch.tensor = None hessian: torch.tensor = None hessian_inv: torch.tensor = None num_samples: int = 0 num_batches: int = 0 def __init__(self, layer: nn.Linear): self.layer = layer self.device = layer.weight.device self.rows = self.layer.weight.data.shape[1] self.columns = self.layer.weight.data.shape[0] self.weights = self.layer.weight.data.T.clone().float().contiguous() self.hessian = None self.num_samples = 0 self.num_batches = 0 def drop_buffers(self): self.perm = None self.invperm = None self.g_idx = None self.scale = None self.qscale = None self.qscale_max = None self.qweight = None self.qgroups = None self.quant = None self.weights = None self.hessian = None self.hessian_inv = None gc.collect() torch.cuda.empty_cache() def configure(self, group_size: dict, bits = None, bits_prop = None, scale_bits: int = 4 ): self.group_size = group_size self.scale_bits = scale_bits self.bits = bits assert isinstance(bits, list) assert isinstance(bits_prop, list) assert sum(bits_prop) == 1 groups = 0 remaining_rows = self.rows self.bits_groups = [] for b, p in zip(self.bits, bits_prop): assert p > 0 gsz = self.group_size[b] g = math.ceil(min(self.rows * p, remaining_rows) / gsz) groups += g remaining_rows -= g * gsz self.bits_groups.append(g) assert remaining_rows <= 0 self.total_groups = groups # if isinstance(bits, list): # # self.bits = bits # g128 = (self.rows + 128 - 1) // 128 # self.bits_groups = [max(round(g128 * p), 1) * 128 // self.group_size for p in bits_prop] # e = sum(self.bits_groups) - self.total_groups # self.bits_groups[-1] -= e # # else: # # self.bits = [bits] # self.bits_groups = [self.total_groups] # def num_bits(self, subtract_columns = 0): # # gi = self.g_idx.numel() * 32 # qs = self.qscale.numel() * self.scale_bits # qss = self.qscale_max.numel() * 16 # # w = 0 # tr = self.rows # for g, b in zip(self.bits_groups, self.bits): # # c = self.columns - subtract_columns # r = self.group_size * g # if r > tr: r = tr # tr -= r # w += r * c * b # # return w + gi + qs + qss def add_batch(self, inputs): with torch.inference_mode(): if self.hessian is None: self.hessian = torch.zeros((self.rows, self.rows), device=self.device, dtype=torch.float) self.num_batches += 1 num_samples = len(inputs) inputs = torch.cat(inputs, dim = 0) inputs = inputs.view((-1, inputs.shape[-1])).float().T.to("cuda:0") inputs *= math.sqrt(2 / num_samples) self.hessian += inputs.matmul(inputs.T) def prepare(self): with torch.inference_mode(): self.hessian /= self.num_batches diagonal = torch.diag(self.hessian) # Zero weights that have no impact. Disabling this since it feels a little drastic based on just the calibration # data. It likely never triggers, anyway. # dead = diagonal == 0.0 # self.hessian[dead, dead] = 1 # self.weights[dead, :] = 0 # Activation order self.perm = torch.argsort(diagonal, descending = True) self.weights = self.weights[self.perm, :] hessian = self.hessian[self.perm][:, self.perm] self.hessian = None # In case numerical errors have caused some asymmetry in H, assume it's close to symmetrical and force it. # (Doesn't seem to be needed) # torch.cuda.empty_cache() # hessian = (hessian + hessian.T) * 0.5 # torch.cuda.empty_cache() # Damping diagonal = torch.diag(hessian) damp = torch.clamp(self.percdamp * torch.mean(diagonal), min = 1e-5) # Inverse of H attempts = 0 while True: try: d = torch.arange(self.rows, device = self.device) hessian[d, d] += damp # Dump condition number and smallest eigenvalue (should be positive) # fro_norm_hessian = torch.norm(hessian, p = 'fro') # fro_norm_inv = torch.norm(torch.linalg.inv(hessian), p = 'fro') # cond_number = fro_norm_hessian * fro_norm_inv # print(cond_number) # eigenvalues = torch.linalg.eigvalsh(hessian) # is_pd = torch.all(eigenvalues > 0) # print(is_pd) # print(torch.min(eigenvalues)) hessian_inv = torch.linalg.cholesky(hessian) hessian_inv = torch.cholesky_inverse(hessian_inv) # The Cholesky inverse will sometimes fail to compute due to accumulated rounding errors when H # is very large (e.g. 70B MLP down proj) and a lot of calibration data is used (e.g. 100 rows of # 4096 tokens). This won't always throw an exception and sometimes just results in a NaN tensor. if torch.any(torch.isnan(hessian_inv)): raise RuntimeError # Test inversion # test = hessian_inv @ hessian # test.sub_(torch.eye(test.size(0), device = test.device, dtype = test.dtype)) # test **= 2 # test = test.mean() # print(test) hessian_inv = torch.linalg.cholesky(hessian_inv, upper = True) hessian_inv = hessian_inv.contiguous() break except RuntimeError: # If inverting failed, assume there were non-positive eigenvalues, so apply more damping to shift # the eigenvalues in a positive direction. print(" !! Warning: Applied additional damping") attempts += 1 if attempts == 10: raise ValueError("Hessian is not invertible") self.hessian_inv = hessian_inv self.hessian = None def reuse_h(self, other): with torch.inference_mode(): self.hessian_inv = other.hessian_inv self.hessian = None self.perm = other.perm self.weights = self.weights[self.perm, :] def quantize(self, keep_qweight = False, apply = False, drop = False): with torch.inference_mode(): if apply: weights = self.weights self.layer.weight.data = torch.zeros((1, 1), dtype = torch.float32, device = weights.device) else: weights = self.weights.clone() self.quant = torch.zeros_like(self.weights) if keep_qweight: self.qweight = torch.zeros_like(weights, dtype = torch.short) # Quantize groups scale = [] qscale = [] qscale_max = [] qgroups = [] error = weights.clone() group_idx = 0 group_idx_list = [] b = 0 for bits_idx, bits in enumerate(self.bits): quantizer = AdaptiveQuantizer(bits = bits, scale_bits = self.scale_bits) for group in range(self.bits_groups[bits_idx]): a = b b = min(a + self.group_size[bits], self.rows) qgroups.append(bits) qgroups.append(0) quantizer.find_params(weights[a : b, :]) scale.append(quantizer.scale) qscale.append(quantizer.qscale) qscale_max.append(quantizer.qscale_max) ext_c.quantize_range(self.quant, quantizer.scale, self.qweight if keep_qweight else none_tensor, quantizer.qzero, quantizer.maxq, self.hessian_inv, weights, error, a, b) group_idx_list += [group_idx] * (b - a) group_idx += 1 # Create g_idx to store inverse activation order self.g_idx = torch.tensor(group_idx_list, dtype = torch.int32, device = self.device) self.invperm = torch.argsort(self.perm) self.g_idx = self.g_idx[self.invperm] # Store scales self.scale = torch.stack(scale, dim = 0) self.qscale = torch.stack(qscale, dim = 0) self.qscale_max = torch.tensor(qscale_max, dtype = torch.float16, device = self.device) self.qgroups = torch.tensor(qgroups, dtype = torch.short, device = self.device) # Apply if apply: if drop: weights = None error = None scale = None qscale = None qscale_max = None qgroups = None group_idx_list = None gc.collect() torch.cuda.empty_cache() self.apply_quant() def quant_error(self): with torch.inference_mode(): q = self.quant[self.invperm, :] diff = torch.abs(q - self.layer.weight.data.T) mat_error_1 = (diff > 0.01).sum().item() / diff.numel() mat_error_5 = (diff > 0.05).sum().item() / diff.numel() mat_error_10 = (diff > 0.10).sum().item() / diff.numel() return mat_error_1, mat_error_5, mat_error_10 def apply_quant(self): qc = self.quant.cpu() invperm = self.invperm.cpu() q = qc[invperm, :].T q = q.reshape(self.quant.T.shape) q = q.to(self.quant.device) self.layer.weight.data = q def apply_temp(self): q = self.quant[self.invperm, :].T temp_layer = nn.Linear(self.layer.in_features, self.layer.out_features, False, device = "meta", dtype = torch.float16) temp_layer.weight = nn.Parameter(q.reshape(self.layer.weight.shape).type_as(self.layer.weight.data)) return temp_layer def pack(self, key, qparams): assert qparams.scale_bits in [4] # assert self.columns % 32 == 0 output = {} output[key + ".q_invperm"] = self.invperm.to(torch.int) output[key + ".q_scale_max"] = self.qscale_max output[key + ".q_groups"] = self.qgroups columns = self.columns rem_rows = self.rows padding = -columns % 32 if padding != 0: print(f" !! Note: Padding quantized tensor {key}") qst = F.pad(self.qscale, (0, padding)).contiguous() qwt = F.pad(self.qweight, (0, padding)).contiguous() else: qst = self.qscale qwt = self.qweight qst_packed = torch.zeros((qst.shape[0], qst.shape[1] * qparams.scale_bits // 32), dtype = torch.int32, device = self.device) if qparams.scale_bits == 4: ext_c.pack_rows_4(qst, qst_packed) # if qparams.scale_bits == 6: ext_c.pack_rows_6(qst, qst_packed) # TODO: output[key + ".q_scale"] = qst_packed qwt_packed = [] i = 0 row = 0 out_row = 0 while i < self.qscale.shape[0]: bits = self.qgroups[i * 2].item() self.qgroups[i * 2 + 1] = out_row i += 1 rows = min(self.group_size[bits], rem_rows) wpqr = 32 / bits qrows = rows / wpqr assert i == self.qgroups.shape[-1] or qrows == int(qrows) qrows = math.ceil(qrows) g_qwt = qwt[row:row+rows, :].contiguous() g_qwt_packed = torch.zeros((qrows, columns + padding), dtype = torch.int32, device = self.device) if padding > 0: g_qwt[:, -padding:] = 2 ** (bits - 1) ext_c.pack_columns(g_qwt, g_qwt_packed, bits) qwt_packed.append(g_qwt_packed) # print(row, rows, bits) row += rows out_row += qrows rem_rows -= rows qwt_packed = torch.cat(qwt_packed, dim = 0) output[key + ".q_weight"] = qwt_packed return output This page shows examples of messages formatted using JSON (JavaScript Object Notation). { "glossary": { "title": "example glossary", "GlossDiv": { "title": "S", "GlossList": { "GlossEntry": { "ID": "SGML", "SortAs": "SGML", "GlossTerm": "Standard Generalized Markup Language", "Acronym": "SGML", "Abbrev": "ISO 8879:1986", "GlossDef": { "para": "A meta-markup language, used to create markup languages such as DocBook.", "GlossSeeAlso": ["GML", "XML"] }, "GlossSee": "markup" } } } } } The same text expressed as XML: example glossary S Standard Generalized Markup Language SGML ISO 8879:1986 A meta-markup language, used to create markup languages such as DocBook. {"menu": { "id": "file", "value": "File", "popup": { "menuitem": [ {"value": "New", "onclick": "CreateNewDoc()"}, {"value": "Open", "onclick": "OpenDoc()"}, {"value": "Close", "onclick": "CloseDoc()"} ] } }} The same text expressed as XML: {"widget": { "debug": "on", "window": { "title": "Sample Konfabulator Widget", "name": "main_window", "width": 500, "height": 500 }, "image": { "src": "Images/Sun.png", "name": "sun1", "hOffset": 250, "vOffset": 250, "alignment": "center" }, "text": { "data": "Click Here", "size": 36, "style": "bold", "name": "text1", "hOffset": 250, "vOffset": 100, "alignment": "center", "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;" } }} The same text expressed as XML: on main_window 500 500 250 250 center text1 250 100 center sun1.opacity = (sun1.opacity / 100) * 90; {"web-app": { "servlet": [ { "servlet-name": "cofaxCDS", "servlet-class": "org.cofax.cds.CDSServlet", "init-param": { "configGlossary:installationAt": "Philadelphia, PA", "configGlossary:adminEmail": "ksm@pobox.com", "configGlossary:poweredBy": "Cofax", "configGlossary:poweredByIcon": "/images/cofax.gif", "configGlossary:staticPath": "/content/static", "templateProcessorClass": "org.cofax.WysiwygTemplate", "templateLoaderClass": "org.cofax.FilesTemplateLoader", "templatePath": "templates", "templateOverridePath": "", "defaultListTemplate": "listTemplate.htm", "defaultFileTemplate": "articleTemplate.htm", "useJSP": false, "jspListTemplate": "listTemplate.jsp", "jspFileTemplate": "articleTemplate.jsp", "cachePackageTagsTrack": 200, "cachePackageTagsStore": 200, "cachePackageTagsRefresh": 60, "cacheTemplatesTrack": 100, "cacheTemplatesStore": 50, "cacheTemplatesRefresh": 15, "cachePagesTrack": 200, "cachePagesStore": 100, "cachePagesRefresh": 10, "cachePagesDirtyRead": 10, "searchEngineListTemplate": "forSearchEnginesList.htm", "searchEngineFileTemplate": "forSearchEngines.htm", "searchEngineRobotsDb": "WEB-INF/robots.db", "useDataStore": true, "dataStoreClass": "org.cofax.SqlDataStore", "redirectionClass": "org.cofax.SqlRedirection", "dataStoreName": "cofax", "dataStoreDriver": "com.microsoft.jdbc.sqlserver.SQLServerDriver", "dataStoreUrl": "jdbc:microsoft:sqlserver://LOCALHOST:1433;DatabaseName=goon", "dataStoreUser": "sa", "dataStorePassword": "dataStoreTestQuery", "dataStoreTestQuery": "SET NOCOUNT ON;select test='test';", "dataStoreLogFile": "/usr/local/tomcat/logs/datastore.log", "dataStoreInitConns": 10, "dataStoreMaxConns": 100, "dataStoreConnUsageLimit": 100, "dataStoreLogLevel": "debug", "maxUrlLength": 500}}, { "servlet-name": "cofaxEmail", "servlet-class": "org.cofax.cds.EmailServlet", "init-param": { "mailHost": "mail1", "mailHostOverride": "mail2"}}, { "servlet-name": "cofaxAdmin", "servlet-class": "org.cofax.cds.AdminServlet"}, { "servlet-name": "fileServlet", "servlet-class": "org.cofax.cds.FileServlet"}, { "servlet-name": "cofaxTools", "servlet-class": "org.cofax.cms.CofaxToolsServlet", "init-param": { "templatePath": "toolstemplates/", "log": 1, "logLocation": "/usr/local/tomcat/logs/CofaxTools.log", "logMaxSize": "", "dataLog": 1, "dataLogLocation": "/usr/local/tomcat/logs/dataLog.log", "dataLogMaxSize": "", "removePageCache": "/content/admin/remove?cache=pages&id=", "removeTemplateCache": "/content/admin/remove?cache=templates&id=", "fileTransferFolder": "/usr/local/tomcat/webapps/content/fileTransferFolder", "lookInContext": 1, "adminGroupID": 4, "betaServer": true}}], "servlet-mapping": { "cofaxCDS": "/", "cofaxEmail": "/cofaxutil/aemail/*", "cofaxAdmin": "/admin/*", "fileServlet": "/static/*", "cofaxTools": "/tools/*"}, "taglib": { "taglib-uri": "cofax.tld", "taglib-location": "/WEB-INF/tlds/cofax.tld"}}} The same file expressed as XML: cofaxCDS org.cofax.cds.CDSServlet configGlossary:installationAt Philadelphia, PA configGlossary:adminEmail ksm@pobox.com configGlossary:poweredBy Cofax configGlossary:poweredByIcon /images/cofax.gif configGlossary:staticPath /content/static templateProcessorClass org.cofax.WysiwygTemplate templateLoaderClass org.cofax.FilesTemplateLoader templatePath templates templateOverridePath defaultListTemplate listTemplate.htm defaultFileTemplate articleTemplate.htm useJSP false jspListTemplate listTemplate.jsp jspFileTemplate articleTemplate.jsp cachePackageTagsTrack 200 cachePackageTagsStore 200 cachePackageTagsRefresh 60 cacheTemplatesTrack 100 cacheTemplatesStore 50 cacheTemplatesRefresh 15 cachePagesTrack 200 cachePagesStore 100 cachePagesRefresh 10 cachePagesDirtyRead 10 searchEngineListTemplate forSearchEnginesList.htm searchEngineFileTemplate forSearchEngines.htm searchEngineRobotsDb WEB-INF/robots.db useDataStore true dataStoreClass org.cofax.SqlDataStore redirectionClass org.cofax.SqlRedirection dataStoreName cofax dataStoreDriver com.microsoft.jdbc.sqlserver.SQLServerDriver dataStoreUrl jdbc:microsoft:sqlserver://LOCALHOST:1433;DatabaseName=goon dataStoreUser sa dataStorePassword dataStoreTestQuery SET NOCOUNT ON;select test='test'; dataStoreLogFile /usr/local/tomcat/logs/datastore.log dataStoreInitConns 10 dataStoreMaxConns 100 dataStoreConnUsageLimit 100 dataStoreLogLevel debug maxUrlLength 500 cofaxEmail org.cofax.cds.EmailServlet mailHost mail1 mailHostOverride mail2 cofaxAdmin org.cofax.cds.AdminServlet fileServlet org.cofax.cds.FileServlet cofaxTools org.cofax.cms.CofaxToolsServlet templatePath toolstemplates/ log 1 logLocation /usr/local/tomcat/logs/CofaxTools.log logMaxSize dataLog 1 dataLogLocation /usr/local/tomcat/logs/dataLog.log dataLogMaxSize removePageCache /content/admin/remove?cache=pages&id= removeTemplateCache /content/admin/remove?cache=templates&id= fileTransferFolder /usr/local/tomcat/webapps/content/fileTransferFolder lookInContext 1 adminGroupID 4 betaServer true cofaxCDS / cofaxEmail /cofaxutil/aemail/* cofaxAdmin /admin/* fileServlet /static/* cofaxTools /tools/* cofax.tld /WEB-INF/tlds/cofax.tld The action and label values only need to be provided if they are not the same as the id. {"menu": { "header": "SVG Viewer", "items": [ {"id": "Open"}, {"id": "OpenNew", "label": "Open New"}, null, {"id": "ZoomIn", "label": "Zoom In"}, {"id": "ZoomOut", "label": "Zoom Out"}, {"id": "OriginalView", "label": "Original View"}, null, {"id": "Quality"}, {"id": "Pause"}, {"id": "Mute"}, null, {"id": "Find", "label": "Find..."}, {"id": "FindAgain", "label": "Find Again"}, {"id": "Copy"}, {"id": "CopyAgain", "label": "Copy Again"}, {"id": "CopySVG", "label": "Copy SVG"}, {"id": "ViewSVG", "label": "View SVG"}, {"id": "ViewSource", "label": "View Source"}, {"id": "SaveAs", "label": "Save As"}, null, {"id": "Help"}, {"id": "About", "label": "About Adobe CVG Viewer..."} ] }} The same message expressed as XML:
Adobe SVG Viewer
Open Open New Zoom In Zoom Out Original View Quality Pause Mute Find... Find Again Copy Copy Again Copy SVG View SVG View Source Save As Help About Adobe CVG Viewer...
We have discussed qsort() in C. C++ STL provides a similar function sort that sorts a vector or array (items with random access) It generally takes two parameters, the first one being the point of the array/vector from where the sorting needs to begin and the second parameter being the length up to which we want the array/vector to get sorted. The third parameter is optional and can be used in cases such as if we want to sort the elements lexicographically. By default, the sort() function sorts the elements in ascending order. Below is a simple program to show the working of sort(). // C++ program to demonstrate default behaviour of // sort() in STL. #include using namespace std; int main() { int arr[] = { 1, 5, 8, 9, 6, 7, 3, 4, 2, 0 }; int n = sizeof(arr) / sizeof(arr[0]); /*Here we take two parameters, the beginning of the array and the length n upto which we want the array to be sorted*/ sort(arr, arr + n); cout << "\nArray after sorting using " "default sort is : \n"; for (int i = 0; i < n; ++i) cout << arr[i] << " "; return 0; } Output Array after sorting using default sort is : 0 1 2 3 4 5 6 7 8 9 Time Complexity: O(N log N) Auxiliary Space: O(1) How to sort in descending order? sort() takes a third parameter that is used to specify the order in which elements are to be sorted. We can pass the “greater()” function to sort in descending order. This function does a comparison in a way that puts greater elements before. // C++ program to demonstrate descending order sort using // greater<>(). #include using namespace std; int main() { int arr[] = { 1, 5, 8, 9, 6, 7, 3, 4, 2, 0 }; int n = sizeof(arr) / sizeof(arr[0]); sort(arr, arr + n, greater()); cout << "Array after sorting : \n"; for (int i = 0; i < n; ++i) cout << arr[i] << " "; return 0; } Output Array after sorting : 9 8 7 6 5 4 3 2 1 0 Time Complexity: O(N log N) Auxiliary Space: O(1) Sort the array only in the given range: To deal with such types of problems we just have to mention the range inside the sort function. Below is the implementation of above case: // C++ program to demonstrate sort() #include using namespace std; int main() { int arr[] = { 0, 1, 5, 8, 9, 6, 7, 3, 4, 2 }; int n = sizeof(arr) / sizeof(arr[0]); // Sort the elements which lies in the range of 2 to // (n-1) sort(arr + 2, arr + n); cout << "Array after sorting : \n"; for (int i = 0; i < n; ++i) cout << arr[i] << " "; return 0; } // This code is contributed by Suruchi Kumari Output Array after sorting : 0 1 2 3 4 5 6 7 8 9 Time Complexity: O(N log N) Auxiliary Space: O(1) How to sort in a particular order? We can also write our own comparator function and pass it as a third parameter. This “comparator” function returns a value; convertible to bool, which basically tells us whether the passed “first” argument should be placed before the passed “second” argument or not. For eg: In the code below, suppose intervals {6,8} and {1,9} are passed as arguments in the “compareInterval” function(comparator function). Now as i1.first (=6) < i2.first (=1), so our function returns “false”, which tells us that “first” argument should not be placed before “second” argument and so sorting will be done in order like {1,9} first and then {6,8} as next. // A C++ program to demonstrate // STL sort() using // our own comparator #include using namespace std; // An interval has a start // time and end time struct Interval { int start, end; }; // Compares two intervals // according to starting times. bool compareInterval(Interval i1, Interval i2) { return (i1.start < i2.start); } int main() { Interval arr[] = { { 6, 8 }, { 1, 9 }, { 2, 4 }, { 4, 7 } }; int n = sizeof(arr) / sizeof(arr[0]); // sort the intervals in increasing order of // start time sort(arr, arr + n, compareInterval); cout << "Intervals sorted by start time : \n"; for (int i = 0; i < n; i++) cout << "[" << arr[i].start << "," << arr[i].end << "] "; return 0; } Output Intervals sorted by start time : [1,9] [2,4] [4,7] [6,8] The time complexity of std::sort() is: Best Case – O(N log N) Average Case – O(N log N) Worst-Case – O(N log N) Space Complexity: It may use O( log N) auxiliary space. #include #include using namespace std; template class Comparator { // we pass an object of this class as // third arg to sort function... public: bool operator()(T x1, T x2) { return x1 < x2; } }; template bool funComparator(T x1, T x2) { // return type is bool return x1 <= x2; } void show(int a[], int array_size) { for (int i = 0; i < array_size; i++) { cout << a[i] << " "; } } int main() { int a[] = { 1, 5, 8, 9, 6, 7, 3, 4, 2, 0 }; int asize = sizeof(a) / sizeof(int); cout << "The array before sorting is : "; show(a, asize); cout << endl << "The array after sorting is(asc) :"; sort(a, a + asize); show(a, asize); cout << endl << "The array after sorting is(desc) :"; sort(a, a + asize, greater()); show(a, asize); cout << endl << "The array after sorting is(asc but our " "comparator class) :"; sort(a, a + asize, Comparator()); show(a, asize); cout << endl << "The array after sorting is(asc but our " "comparator function) :"; sort(a, a + asize, funComparator); show(a, asize); return 0; } Output The array before sorting is : 1 5 8 9 6 7 3 4 2 0 The array after sorting is(asc) :0 1 2 3 4 5 6 7 8 9 The array after sorting is(desc) :9 8 7 6 5 4 3 2 1 0 The array after sorting is(asc but our comparator class) :0 1 2 3 4 5 6 7 8 9 The array after sorting is(asc but our comparator function) :0 1 2 3 4 5 6 7 8 9 Time Complexity: O(N log N) Auxiliary Space: O(1) Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above The following are different ways to construct or initialize a vector in C++ STL 1. Initializing by pushing values one by one: // C++ program to create an empty // vector and push values one // by one. #include #include using namespace std; int main() { // Create an empty vector vector vect; vect.push_back(10); vect.push_back(20); vect.push_back(30); for (int x : vect) cout << x << " "; return 0; } Output 10 20 30 2. Specifying size and initializing all values: // C++ program to create an empty // vector and push values one // by one. #include #include using namespace std; int main() { int n = 3; // Create a vector of size n with // all values as 10. vector vect(n, 10); for (int x : vect) cout << x << " "; return 0; } Output 10 10 10 3. Initializing like arrays: // C++ program to initialize // a vector like an array. #include #include using namespace std; int main() { vector vect{ 10, 20, 30 }; for (int x : vect) cout << x << " "; return 0; } Output 10 20 30 4. Initializing from an array: // C++ program to initialize // a vector from an array. #include #include using namespace std; int main() { int arr[] = { 10, 20, 30 }; int n = sizeof(arr) / sizeof(arr[0]); vector vect(arr, arr + n); for (int x : vect) cout << x << " "; return 0; } Output 10 20 30 5. Initializing from another vector: // C++ program to initialize a vector from // another vector. #include #include using namespace std; int main() { vector vect1{ 10, 20, 30 }; vector vect2(vect1.begin(), vect1.end()); for (int x : vect2) cout << x << " "; return 0; } Output 10 20 30 6. Initializing all elements with a particular value: // C++ Program to initialize vector using fill() #include #include using namespace std; int main() { // creating array with size 10 vector vect1(10); // initializing using fill() function int value = 5; fill(vect1.begin(), vect1.end(), value); // printing vector for (int x : vect1) cout << x << " "; return 0; } Output 5 5 5 5 5 5 5 5 5 5 7. Initialize an array with consecutive numbers using std::iota: // C++ program to initialize a // vector with consecutive // numbers #include #include #include using namespace std; int main() { // declaring a vector with size 5 vector vec(5); // initializing using iota() iota(vec.begin(), vec.end(), 1); // printing the vector for (int i = 0; i < 5; i++) { cout << vec[i] << " "; } return 0; } Output 1 2 3 4 5 Time complexity: O(N), where N is the size of the vector. Auxiliary space: O(N). If you like GeeksforGeeks and would like to contribute, you can also write an article using write.geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks. Please write comments if you find anything incorrect, or if you want to share more information about the topic discussed above. Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now! How to Hide and Show a Console Window in C++? Read Discuss Courses Practice The task is to hide and Show the console window of a C++ program. The program for the same is given below. Note: The results of the following program can only be seen when it is executed on a console. Example: // C++ program to hide and show a console window #include #include using namespace std; void countdown() { cout << "3" << endl; Sleep(1000); cout << "2" << endl; Sleep(1000); cout << "1" << endl; Sleep(1000); cout << "0" << endl; } int main() { countdown(); HWND window; AllocConsole(); // You Can Find HANDLE of other windows too window = FindWindowA("ConsoleWindowClass", NULL); ShowWindow(window, 0); countdown(); ShowWindow(window, 1); } Output: Explanation: The above program counts from 3 to 1 before the Console Window disappears. After the window has disappeared, the ShowWindow helps the program so that the Console Window reappears again after counting from 3 to 1(executing the countdown function). The execution of the program can be understood by understanding the key functions of the program. #include – The windows.h header in C++ programming languages are specifically designed for windows and contain a very large number of windows specific functions. AllocConsole()- AllocConsole initializes standard input, standard output, and standard error handles for the new console. ShowWindow()- Sets the specified window’s show state. FindWindowA()– Takes string parameters and checks whose class name and window name match the specified strings Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now! Last Updated : 27 Nov, 2022 Prerequisite: Templates in C++ Substitution Failure Is Not An Error (SFINAE) is a principle of the C++ programming language that states that a compiler should not fail to compile a program just because it cannot substitute a template parameter. This principle allows for the use of template metaprogramming and enables the compiler to make decisions based on the types of template arguments, which can be useful when dealing with complex code and difficult to reason about logic. At its core, SFINAE is a way of allowing a compiler to decide which template to use in a given context. The decision is based on the types of template arguments and the compiler will choose the template that is most appropriate for the arguments. Advantages of SFINAE: SFINAE is useful in a variety of scenarios, including writing generic code and dealing with complex logic. SFINAE allows the compiler to decide which template to use, it allows programmers to write code that can be reused in different contexts without needing to explicitly specify the types of template parameters. SFINAE allows for better code reuse, as the same code can be used for different types of objects and parameters. SFINAE also allows for better control over code complexity by allowing the compiler to make decisions based on the types of template parameters, it can reduce the amount of complex logic that needs to be written and understood. SFINAE helps to make code more readable and maintainable, as it is easier to follow the logic of the program. In conclusion, SFINAE is a powerful concept in C++ programming that allows for better code reuse, improved code readability, and better control over code complexity. It is a key component of template metaprogramming and is an essential tool for writing robust and efficient code. Example: // C++ Program to implement // Substitution Failure Is Not An Error #include #include using namespace std; // USing template to avoid errors template void print_type(T t) { // For integer if (is_integral::value) { cout << "T is an integral type" << endl; } // For floating number else if (is_floating_point::value) { cout << "T is a floating point type" << endl; } // All other else { cout << "T is not an integral" << "or floating point type" << endl; } } // Driver Code int main() { // T is an integral type print_type(10); // T is a floating point type print_type(10.5f); // T is an integral type print_type(true); // T is an integral type print_type('a'); // T is not an integral // or floating point type print_type("GFG"); return 0; } Output T is an integral type T is a floating point type T is an integral type T is an integral type T is not an integralor floating point type In this example, the print_type() function is a template function that takes a single argument of type T. Inside the function, there are if statements that use the is_integral and is_floating_point type traits to check the type of T. If T is of the expected type, the corresponding branch of the if statement is executed and the appropriate message is printed. If T is not of the expected type, the else branch is executed and the message “T is not an integral or floating point type” is printed. SFINAE is used in this example because the if statement uses type traits to check the type of T, and if T is not of the expected type, the template substitution will fail. However, because SFINAE is in effect, this failure is not treated as a compile-time error, and the else branch is executed instead. Disadvantages of SFINAE Although SFINAE is very useful it comes with its own limitations, these are : It can be difficult to debug and understand the underlying code, as it relies heavily on the templates and multiple overloads to work correctly. SFINAE is not widely used and can be difficult to find documentation and tutorials for. SFINAE can produce unexpected behavior, as it relies on the compiler to determine which template to use based on the given types. This can lead to unexpected results if the compiler chooses the wrong template. SFINAE can also be slow, as it involves multiple checks in order to determine the correct template. This can lead to a performance hit if used in a critical section of code. There are other methods to perform the same task one of which is enable_if Enable_if (Syntax) template enable_if_t, void> f(T x) { // code that only applies to integral tmodule jinvertertb; reg a; wire y; //Design Instance jinverter jinv(y,a); initial begin $display ("RESULT\ta\ty"); a = 1; # 100; // Another value if ( y == 0 ) // Test for inversion $display (" PASS \t%d\t%d",a,y); else $display (" FAIL \t%d\t%d",a,y); a = 0; # 100; // Initial value is set if ( y == 1 ) // Test for inversion $display (" PASS \t%d\t%d",a,y); else $display (" FAIL \t%d\t%d",a,y); a = 1; # 50; // Another value if ( y == 0 ) // Test for inversion $display (" PASS \t%d\t%d",a,y); else $display (" FAIL \t%d\t%d",a,y); a = 0; # 100; // Initial value is set if ( y == 1 ) // Test for inversion $display (" PASS \t%d\t%d",a,y); else $display (" FAIL \t%d\t%d",a,y); end //enabling the wave dump initial begin $dumpfile("dump.vcd"); $dumpvars; end endmoduleypes goes here } module jinvertertb; reg a; wire y; //Design Instance jinverter jinv(y,a); initial begin $display ("RESULT\ta\ty"); a = 1; # 100; // Another value if ( y == 0 ) // Test for inversion $display (" PASS \t%d\t%d",a,y); else $display (" FAIL \t%d\t%d",a,y); a = 0; # 100; // Initial value is set if ( y == 1 ) // Test for inversion $display (" PASS \t%d\t%d",a,y); else $display (" FAIL \t%d\t%d",a,y); a = 1; # 50; // Another value if ( y == 0 ) // Test for inversion $display (" PASS \t%d\t%d",a,y); else $display (" FAIL \t%d\t%d",a,y); a = 0; # 100; // Initial value is set if ( y == 1 ) // Test for inversion $display (" PASS \t%d\t%d",a,y); else $display (" FAIL \t%d\t%d",a,y); end //enabling the wave dump initial begin $dumpfile("dump.vcd"); $dumpvars; end endmodule module jFIFOTb; wire [7:0] DATAOUT; wire full, empty; reg clock, reset, wn, rn; reg [7:0] DATAIN; jFIFO jfifo(DATAOUT, full, empty, clock, reset, wn, rn, DATAIN); //enabling the wave dump initial begin $dumpfile("dump.vcd"); $dumpvars; end initial begin clock = 0; DATAIN = 8'd0; reset = 1; clock = 1; #5 ; clock = 0; #5; reset = 0; $display("Start testing"); // First write some data into the queue wn = 1; rn = 0; DATAIN = 8'd100; clock = 1; #5 ; clock = 0; #5; DATAIN = 8'd150; clock = 1; #5 ; clock = 0; #5; DATAIN = 8'd200; clock = 1; #5 ; clock = 0; #5; DATAIN = 8'd40; clock = 1; #5 ; clock = 0; #5; DATAIN = 8'd70; clock = 1; #5 ; clock = 0; #5; DATAIN = 8'd65; clock = 1; #5 ; clock = 0; #5; DATAIN = 8'd15; clock = 1; #5 ; clock = 0; #5; // Now start reading and checking the values wn = 0; rn = 1; clock = 1; #5 ; clock = 0; #5; if ( DATAOUT === 8'd100 ) $display("PASS %p ", DATAOUT); else $display("FAIL %p ", DATAOUT); clock = 1; #5 ; clock = 0; #5; if ( DATAOUT === 8'd150 ) $display("PASS %p ", DATAOUT); else $display("FAIL %p ", DATAOUT); clock = 1; #5 ; clock = 0; #5; if ( DATAOUT === 8'd200 ) $display("PASS %p ", DATAOUT); else $display("FAIL %p ", DATAOUT); clock = 1; #5 ; clock = 0; #5; if ( DATAOUT === 8'd40 ) $display("PASS %p ", DATAOUT); else $display("FAIL %p ", DATAOUT); clock = 1; #5 ; clock = 0; #5; if ( DATAOUT === 8'd70 ) $display("PASS %p ", DATAOUT); else $display("FAIL %p ", DATAOUT); clock = 1; #5 ; clock = 0; #5; if ( DATAOUT === 8'd65 ) $display("PASS %p ", DATAOUT); else $display("FAIL %p ", DATAOUT); clock = 1; #5 ; clock = 0; #5; if ( DATAOUT === 8'd15 ) $display("PASS %p ", DATAOUT); else $display("FAIL %p ", DATAOUT); clock = 1; #5 ; clock = 0; #5; if ( empty === 1 ) $display("PASS %p ", empty); else $display("FAIL %p ", empty); end endmodule To understand this example, you should have the knowledge of the following Java programming topics: Java for Loop Java while and do...while Loop The factorial of a positive number n is given by: factorial of n (n!) = 1 * 2 * 3 * 4 * ... * n Example 1: Find Factorial of a number using for loop public class Factorial { public static void main(String[] args) { int num = 10; long factorial = 1; for(int i = 1; i <= num; ++i) { // factorial = factorial * i; factorial *= i; } System.out.printf("Factorial of %d = %d", num, factorial); } } Output Factorial of 10 = 3628800 In this program, we've used for loop to loop through all numbers between 1 and the given number num (10), and the product of each number till num is stored in a variable factorial. We've used long instead of int to store large results of factorial. However, it's still not big enough to store the value of bigger numbers (say 100). For results that cannot be stored in a long variable, we use BigInteger variable declared in java.math library. Example 2: Find Factorial of a number using BigInteger import java.math.BigInteger; public class Factorial { public static void main(String[] args) { int num = 30; BigInteger factorial = BigInteger.ONE; for(int i = 1; i <= num; ++i) { // factorial = factorial * i; factorial = factorial.multiply(BigInteger.valueOf(i)); } System.out.printf("Factorial of %d = %d", num, factorial); } } Output Factorial of 30 = 265252859812191058636308480000000 Here, instead of long, we use BigInteger variable factorial. Since, * cannot be used with BigInteger, we instead use multiply() for the product. Also, num should be casted to BigInteger for multiplication. Likewise, we can also use a while loop to solve this problem. Example 3: Find Factorial of a number using while loop public class Factorial { public static void main(String[] args) { int num = 5, i = 1; long factorial = 1; while(i <= num) { factorial *= i; i++; } System.out.printf("Factorial of %d = %d", num, factorial); } } Output Factorial of 5 = 120 In the above program, unlike a for loop, we have to increment the value of i inside the body of the loop. Though both programs are technically correct, it is better to use for loop in this case. It's because the number of iteration (upto num) is known. Visit this page to learn to find factorial of a number using recursion. Java Program to Check Whether a Number can be Expressed as Sum of Two Prime Numbers To understand this example, you should have the knowledge of the following Java programming topics: Java Methods Java for Loop Java if...else Statement Example: Represent a number as Sum of Two Prime Numbers public class Main { public static void main(String[] args) { int number = 34; boolean flag = false; for (int i = 2; i <= number / 2; ++i) { // condition for i to be a prime number if (checkPrime(i)) { // condition for n-i to be a prime number if (checkPrime(number - i)) { // n = primeNumber1 + primeNumber2 System.out.printf("%d = %d + %d\n", number, i, number - i); flag = true; } } } if (!flag) System.out.println(number + " cannot be expressed as the sum of two prime numbers."); } // Function to check prime number static boolean checkPrime(int num) { boolean isPrime = true; for (int i = 2; i <= num / 2; ++i) { if (num % i == 0) { isPrime = false; break; } } return isPrime; } } Run Code Output 34 = 3 + 31 34 = 5 + 29 34 = 11 + 23 34 = 17 + 17 In the above example, we have created the checkPrime() method to find whether a number is prime or not. The method returns true if the passed number is prime. Here, we have a number 34. The program tries to check if 34 can be represented as the sum of two prime numbers. Working of Program First, we run a for loop from i = 2 to number / 2. Inside the for loop, we used two if statements. The first statement checks if i is prime or not. If true, the second if statement checks if number - i is prime or not. This is because the sum of i and number - i is equal to number. If the second statement is also true, then we can say the number 34 is a valid sum of two prime numbers. // Java Program to Check if Given Integer is Odd or Even // Using Brute Forcew Approach // Importing required classes import java.io.*; import java.util.Scanner; // Main class class GFG { // Main Driver Method public static void main(String[] args) { // Declaring and initializing integer variable int num = 10; // Checking if number is even or odd number // via remainder if (num % 2 == 0) { // If remainder is zero then this number is even System.out.println("Entered Number is Even"); } else { // If remainder is not zero then this number is // odd System.out.println("Entered Number is Odd"); } } } // Java Program to find even sum of // fibonacci Series Till number N import java.io.*; class geeksforgeeks { // Computing the value of first fibonacci series // and storing the sum of even indexed numbers static int Fib_Even_Sum(int N) { if (N <= 0) return 0; int fib[] = new int[2 * N + 1]; fib[0] = 0; fib[1] = 1; // Initializing the sum int s = 0; // Adding remaining numbers for (int j = 2; j <= 2 * N; j++) { fib[j] = fib[j - 1] + fib[j - 2]; // Only considering even indexes if (j % 2 == 0) s += fib[j]; } return s; } // The Driver code public static void main(String[] args) { int N = 11; // Prints the sum of even-indexed numbers System.out.println( "Even sum of fibonacci series till number " + N + " is: " + +Fib_Even_Sum(N)); } } It can be clearly seen that the required sum can be obtained thus: 2 ( F2 + F4 + F6 +………+ F2n ) = (F1 + F2 + F3 + F4 +………+ F2n) – (F1 – F2 + F3 – F4 +………+ F2n) Now the first term can be obtained if we put 2n instead of n in the formula given here. Thus F1 + F2 + F3 + F4 +………+ F2n = F2n+2 – 1. The second term can also be found if we put 2n instead of n in the formula given here Thus, F1 – F2 + F3 – F4 +………- F2n = 1 + (-1)2n+1F2n-1 = 1 – F2n-1. So, 2 ( F2 + F4 + F6 +………+ F2n) = F2n+2 – 1 – 1 + F2n-1 = F2n+2 + F2n-1 – 2 = F2n + F2n+1 + F2n+1 – F2n – 2 = 2 ( F2n+1 -1) Hence, ( F2 + F4 + F6 +………+ F2n) = F2n+1 -1 . // Java Program to find even indexed // Fibonacci Sum in O(Log n) time. class GFG { static int MAX = 1000; // Create an array for memoization static int f[] = new int[MAX]; // Returns n'th Fibonacci number // using table f[] static int fib(int n) { // Base cases if (n == 0) { return 0; } if (n == 1 || n == 2) { return (f[n] = 1); } // If fib(n) is already computed if (f[n] == 1) { return f[n]; } int k = (n % 2 == 1) ? (n + 1) / 2 : n / 2; // Applying above formula [Note value n&1 is 1 // if n is odd, else 0]. f[n] = (n % 2 == 1) ? (fib(k) * fib(k) + fib(k - 1) * fib(k - 1)) : (2 * fib(k - 1) + fib(k)) * fib(k); return f[n]; } // Computes value of even-indexed Fibonacci Sum static int calculateEvenSum(int n) { return (fib(2 * n + 1) - 1); } // Driver program to test above function public static void main(String[] args) { // Get n int n = 11; // Find the alternating sum System.out.println( "Even indexed Fibonacci Sum upto " + n + " terms: " + calculateEvenSum(n)); } } SCREEN 13 z = 1 / 100 FOR i = 0 TO 255 PALETTE i, INT(i / 4) + INT(i / 4) * 256 + INT(i / 4) * 65536 NEXT DO y = 1 dy = 0 ox = 0: oy = 1 FOR x = 1 TO 430 IF y > 0 THEN dy = dy - 1 / 4000 IF y < 0 THEN dy = dy + z y = y + dy a = POINT(x, 100 + y * 50) a = a + 1 IF a > 255 THEN a = 255 PSET (x, 100 + y * 50), a NEXT z = z - 1 / 10000 LOOP DIM bodyx(70) DIM bodyy(70) DIM bodyvx(70) DIM bodyvy(70) DIM obodyx(70) DIM obodyy(70) RANDOMIZE TIMER bodies = 30 FOR i = 1 TO bodies bodyx(i) = 620 * RND + 10 bodyy(i) = 400 * RND + 30 bodyvx(i) = RND - .5 bodyvy(i) = RND - .5 NEXT SCREEN 12 PRINT "...." WHILE INKEY$ = "": WEND CLS DO ' apply gravity FOR i = 1 TO bodies bodyvy(i) = bodyvy(i) + .001 NEXT ' adjust distances FOR i = 1 TO bodies FOR j = 1 TO bodies IF i <> j THEN centx = (bodyx(i) + bodyx(j)) * .5 centy = (bodyy(i) + bodyy(j)) * .5 distx = (bodyx(i) - bodyx(j)) / 2 disty = (bodyy(i) - bodyy(j)) / 2 distf = SQR(distx * distx + disty * disty) mx = distx / distf my = disty / distf bodyvx(i) = bodyvx(i) - mx * (distf - 50) / 100 bodyvy(i) = bodyvy(i) - my * (distf - 50) / 100 END IF NEXT NEXT ' collide with ground FOR i = 1 TO bodies IF bodyy(i) + bodyvy(i) > 440 OR bodyy(i) + bodyvy(i) < 5 THEN bodyvy(i) = -bodyvy(i) * 0! bodyvx(i) = bodyvx(i) * 0! END IF IF bodyx(i) + bodyvx(i) > 625 OR bodyx(i) + bodyvx(i) < 15 THEN bodyvx(i) = -bodyvx(i) * 0! bodyvy(i) = bodyvy(i) * 0! END IF NEXT ' move bodies FOR i = 1 TO bodies obodyx(i) = bodyx(i) obodyy(i) = bodyy(i) bodyx(i) = bodyx(i) + bodyvx(i) bodyy(i) = bodyy(i) + bodyvy(i) NEXT ' clear/draw q = (q + 1) MOD 16 FOR i = 1 TO bodies COLOR 0 CIRCLE (obodyx(i), obodyy(i)), 4 COLOR 15 CIRCLE (bodyx(i), bodyy(i)), 4 'COLOR q 'LINE (bodyx(i), bodyy(i))-(bodyx(i) + bodyvx(i) * 30, bodyy(i) + bodyvy(i) * 30) NEXT COLOR 2 LINE (obodyx(1), obodyy(1))-(bodyx(1), bodyy(1)) 'FOR i = 1 TO bodies - 1 ' FOR j = i + 1 TO bodies ' COLOR 0 ' LINE (obodyx(i), obodyy(i))-(obodyx(j), obodyy(j)) ' COLOR 2 ' LINE (bodyx(i), bodyy(i))-(bodyx(j), bodyy(j)) ' NEXT 'NEXT LOOP ;--------------------------------------------------------------------------- ; start ;--------------------------------------------------------------------------- start desc msg "It's a room." objects start/key start/door start/key id "key" desc msg "It's a key." actions use door ifn start/door.flags.locked msg "The door isn't locked." if start/door.flags.locked msg "The lock on the door goes 'click'." set start/door.flags.locked false examine msg "It is shiny." start/door id "door" desc msg "You see a door." flags locked true open false actions open if start/door.flags.locked msg "It is locked." ifn start/door.flags.locked msg "The door opens." close ifn start/door.flags.open msg "It is already closed." if start/door.flags.open msg "The door closes." go if start/door.flags.open goto end ifn start/door.flags.open msg "The door is closed." examine msg "It looks just like a door." ;--------------------------------------------------------------------------- ; end ;--------------------------------------------------------------------------- end desc "Congratimafations! Another room." objects start/door macroScript ExportCamera category:"Cameras" toolTip:"Blech!" Icon:#("Cameras",2) ( filename = maxFileName flen = findString filename ".max" filename = substring filename 1 (flen-1) sname = filename filename = maxFilePath + filename + ".piper3d" deletefile filename out_file = createfile filename format ";------------------------------------------------------------\n" to:out_file format "; Piper 3D scene file\n" to:out_file format ";\n" to:out_file format "; Scene: % \n" sname to:out_file format ";------------------------------------------------------------\n" to:out_file format "\n" to:out_file format "%_begin\n" sname to:out_file format "\n" to:out_file animend = animationRange.end as string animend = substring animend 1 (findString animend "f"-1) format " dc.w % ; no. frames\n" animend to:out_file format " dc.w % ; no. objects\n" objects.count to:out_file faces = 0 vertices = 0 for o in objects do ( if classOf o == Editable_Mesh then ( faces += o.numfaces vertices += o.numverts ) ) format " dc.w % ; no. vertices\n" vertices to:out_file format " dc.w % ; no. faces\n" faces to:out_file format "\n" to:out_file format " dc.w 0 ; current frame\n" to:out_file format "\n" to:out_file format " dc.l %_vtx ; begin vertices\n" sname sname to:out_file format " dc.l %_fcs ; begin fæces\n" sname sname to:out_file format " dc.l %_mtx ; begin matrices\n" sname sname to:out_file format " dc.l 0 ; begin vertex normals\n" to:out_file format "\n" to:out_file format " dc.w 0 ; init flag\n" to:out_file format "\n" to:out_file format ";------------------------------------------------------------\n" to:out_file format "; Vertex groups\n" to:out_file format ";------------------------------------------------------------\n" to:out_file format "\n" to:out_file format "%_vtx\n" sname to:out_file format "\n" to:out_file for i=1 to objects.count do ( format "; group %: %\n" (i-1) objects[i].name to:out_file format "\n" to:out_file if classOf objects[i] == Editable_Mesh then ( obimat = (inverse objects[i].transform) themesh = snapshotAsMesh objects[i] format " dc.w % ; no. vertices\n" themesh.numverts to:out_file for j=1 to themesh.numverts do ( v = (getVert themesh j) * obimat vxs = formatf v.x 6 vys = formatf v.y 6 vzs = formatf v.z 6 format " dc.s %,%,%\n" vxs vys vzs to:out_file ) ) else ( format " dc.w 0 ; not a mesh\n" to:out_file ) format "\n" to:out_file ) format ";------------------------------------------------------------\n" to:out_file format "; Fæces\n" to:out_file format ";------------------------------------------------------------\n" to:out_file format "\n" to:out_file format "%_fcs\n" sname to:out_file format "\n" to:out_file voff = 0 for i=1 to objects.count do ( format "; group %: %\n" (i-1) objects[i].name to:out_file format "\n" to:out_file if classOf objects[i] == Editable_Mesh then ( themesh = snapshotAsMesh objects[i] for j=1 to themesh.numfaces do ( f = getFace themesh j format " dc.w %,%,%\n" (int (f.x-1+voff)) (int (f.y-1+voff)) (int (f.z-1+voff)) to:out_file smat = objects[i].material mattype = "0" u1 = 0 v1 = 0 u2 = 0 v2 = 0 u3 = 0 v3 = 0 if smat == undefined then ( matname = "0" ) else ( if getNumSubMtls smat == 0 then ( mat = smat ) else ( matid = getFaceMatID themesh j mat = smat.MaterialList[matid] ) matname = (int mat.diffuse.r)*256*256 + (int mat.diffuse.g)*256 + (int mat.diffuse.b) dmap = mat.diffuseMap if dmap != undefined then ( mattype = "1" matname = dmap.filename fntokens = filterString matname "\\" matname = fntokens[fntokens.count] fntokens = filterString matname "." matname = fntokens[1] fntokens = filterString matname "-" matname = "" for k=1 to fntokens.count do ( matname = matname + fntokens[k] if k < fntokens.count then matname=matname+"m" ) matname = sname + "_" + matname + "+1024+14" tverts = getTVFace theMesh j u1 = (int (getTVert theMesh tverts[1] * 65535).x) v1 = 65535 - (int (getTVert theMesh tverts[1] * 65535).y) u2 = (int (getTVert theMesh tverts[2] * 65535).x) v2 = 65536 - (int (getTVert theMesh tverts[2] * 65535).y) macroScript ExportCamera category:"Cameras" toolTip:"Blech!" Icon:#("Cameras",2) ( filename = maxFileName flen = findString filename ".max" filename = substring filename 1 (flen-1) sname = filename filename = maxFilePath + filename + ".piper3d" deletefile filename out_file = createfile filename format ";------------------------------------------------------------\n" to:out_file format "; Piper 3D scene file\n" to:out_file format ";\n" to:out_file format "; Scene: % \n" sname to:out_file format ";------------------------------------------------------------\n" to:out_file format "\n" to:out_file format "%_begin\n" sname to:out_file format "\n" to:out_file animend = animationRange.end as string animend = substring animend 1 (findString animend "f"-1) format " dc.w % ; no. frames\n" animend to:out_file format " dc.w % ; no. objects\n" objects.count to:out_file faces = 0 vertices = 0 for o in objects do ( if classOf o == Editable_Mesh then ( faces += o.numfaces vertices += o.numverts ) ) format " dc.w % ; no. vertices\n" vertices to:out_file format " dc.w % ; no. faces\n" faces to:out_file format "\n" to:out_file format " dc.w 0 ; current frame\n" to:out_file format "\n" to:out_file format " dc.l %_vtx ; begin vertices\n" sname sname to:out_file format " dc.l %_fcs ; begin fæces\n" sname sname to:out_file format " dc.l %_mtx ; begin matrices\n" sname sname to:out_file format " dc.l 0 ; begin vertex normals\n" to:out_file format "\n" to:out_file format " dc.w 0 ; init flag\n" to:out_file format "\n" to:out_file format ";------------------------------------------------------------\n" to:out_file format "; Vertex groups\n" to:out_file format ";------------------------------------------------------------\n" to:out_file format "\n" to:out_file format "%_vtx\n" sname to:out_file format "\n" to:out_file for i=1 to objects.count do ( format "; group %: %\n" (i-1) objects[i].name to:out_file format "\n" to:out_file if classOf objects[i] == Editable_Mesh then ( obimat = (inverse objects[i].transform) themesh = snapshotAsMesh objects[i] format " dc.w % ; no. vertices\n" themesh.numverts to:out_file for j=1 to themesh.numverts do ( v = (getVert themesh j) * obimat vxs = formatf v.x 6 vys = formatf v.y 6 vzs = formatf v.z 6 format " dc.s %,%,%\n" vxs vys vzs to:out_file ) ) else ( format " dc.w 0 ; not a mesh\n" to:out_file ) format "\n" to:out_file ) format ";------------------------------------------------------------\n" to:out_file format "; Fæces\n" to:out_file format ";------------------------------------------------------------\n" to:out_file format "\n" to:out_file format "%_fcs\n" sname to:out_file format "\n" to:out_file voff = 0 for i=1 to objects.count do ( format "; group %: %\n" (i-1) objects[i].name to:out_file format "\n" to:out_file if classOf objects[i] == Editable_Mesh then ( themesh = snapshotAsMesh objects[i] for j=1 to themesh.numfaces do ( f = getFace themesh j format " dc.w %,%,%\n" (int (f.x-1+voff)) (int (f.y-1+voff)) (int (f.z-1+voff)) to:out_file smat = objects[i].material mattype = "0" u1 = 0 v1 = 0 u2 = 0 v2 = 0 u3 = 0 v3 = 0 if smat == undefined then ( matname = "0" ) else ( if getNumSubMtls smat == 0 then ( mat = smat ) else ( matid = getFaceMatID themesh j mat = smat.MaterialList[matid] ) matname = (int mat.diffuse.r)*256*256 + (int mat.diffuse.g)*256 + (int mat.diffuse.b) dmap = mat.diffuseMap if dmap != undefined then ( mattype = "1" matname = dmap.filename fntokens = filterString matname "\\" matname = fntokens[fntokens.count] fntokens = filterString matname "." matname = fntokens[1] fntokens = filterString matname "-" matname = "" for k=1 to fntokens.count do ( matname = matname + fntokens[k] if k < fntokens.count then matname=matname+"m" ) matname = sname + "_" + matname + "+1024+14" tverts = getTVFace theMesh j u1 = (int (getTVert theMesh tverts[1] * 65535).x) v1 = 65535 - (int (getTVert theMesh tverts[1] * 65535).y) u2 = (int (getTVert theMesh tverts[2] * 65535).x) v2 = 65536 - (int (getTVert theMesh tverts[2] * 65535).y) u3 = (int (getTVert theMesh tverts[3] * 65535).x) v3 = 65536 - (int (getTVert theMesh tverts[3] * 65535).y) if u1 > 65535 then u1 = 65535 if v1 > 65535 then v1 = 65535 if u2 > 65535 then u2 = 65535 if v2 > 65535 then v2 = 65535 if u3 > 65535 then u3 = 65535 if v3 > 65535 then v3 = 65535 /* if u1 < 0 then u1 = 0 if v1 < 0 then v1 = 0 if u2 < 0 then u2 = 0 if v2 < 0 then v2 = 0 if u3 < 0 then u3 = 0 if v3 < 0 then v3 = 0 */ if mat.opacityMap != undefined then ( mattype = "2" ) ) ) format " dc.w %\n" mattype to:out_file format " dc.l %\n" matname to:out_file format " dc.w %,%,%,%,%,%\n" u1 v1 u2 v2 u3 v3 to:out_file ) format "\n" to:out_file voff += themesh.numverts ) ) format ";------------------------------------------------------------\n" to:out_file format "; \n" to:out_file format ";------------------------------------------------------------\n" to:out_file format "\n" to:out_file format "%_mtx\n" sname to:out_file format "\n" to:out_file for i = animationRange.start to animationRange.end do ( sliderTime=i format "; index %\n" i to:out_file format "\n" to:out_file for j = 1 to objects.count do ( o=objects[j] vpm=getViewTM() tm=o.transform*vpm tm1=tm.row1 tm2=tm.row2 tm3=tm.row3 tm4=tm.row4 tm11=formatf tm1.x 6 tm12=formatf tm1.y 6 tm13=formatf tm1.z 6 tm21=formatf tm2.x 6 tm22=formatf tm2.y 6 tm23=formatf tm2.z 6 tm31=formatf tm3.x 6 tm32=formatf tm3.y 6 tm33=formatf tm3.z 6 tm41=formatf tm4.x 6 tm42=formatf tm4.y 6 tm43=formatf tm4.z 6 format " dc.s %,%,%\n" tm11 tm12 tm13 to:out_file format " dc.s %,%,%\n" tm21 tm22 tm23 to:out_file format " dc.s %,%,%\n" tm31 tm32 tm33 to:out_file format " dc.s %,%,%\n" tm41 tm42 tm43 to:out_file format "\n" to:out_file ) ) close out_file shelllaunch "notepad.exe" filename ) -- theend u3 = (int (getTVert theMesh tverts[3] * 65535).x) v3 = 65536 - (int (getTVert theMesh tverts[3] * 65535).y) if u1 > 65535 then u1 = 65535 if v1 > 65535 then v1 = 65535 if u2 > 65535 then u2 = 65535 if v2 > 65535 then v2 = 65535 if u3 > 65535 then u3 = 65535 if v3 > 65535 then v3 = 65535 /* if u1 < 0 then u1 = 0 if v1 < 0 then v1 = 0 if u2 < 0 then u2 = 0 if v2 < 0 then v2 = 0 if u3 < 0 then u3 = 0 if v3 < 0 then v3 = 0 */ if mat.opacityMap != undefined then ( mattype = "2" ) ) ) format " dc.w %\n" mattype to:out_file format " dc.l %\n" matname to:out_file format " dc.w %,%,%,%,%,%\n" u1 v1 u2 v2 u3 v3 to:out_file ) format "\n" to:out_file voff += themesh.numverts ) ) format ";------------------------------------------------------------\n" to:out_file format "; \n" to:out_file format ";------------------------------------------------------------\n" to:out_file format "\n" to:out_file format "%_mtx\n" sname to:out_file format "\n" to:out_file for i = animationRange.start to animationRange.end do ( sliderTime=i format "; index %\n" i to:out_file format "\n" to:out_file for j = 1 to objects.count do ( o=objects[j] vpm=getViewTM() tm=o.transform*vpm tm1=tm.row1 tm2=tm.row2 tm3=tm.row3 tm4=tm.row4 tm11=formatf tm1.x 6 tm12=formatf tm1.y 6 tm13=formatf tm1.z 6 tm21=formatf tm2.x 6 tm22=formatf tm2.y 6 tm23=formatf tm2.z 6 tm31=formatf tm3.x 6 tm32=formatf tm3.y 6 tm33=formatf tm3.z 6 tm41=formatf tm4.x 6 tm42=formatf tm4.y 6 tm43=formatf tm4.z 6 format " dc.s %,%,%\n" tm11 tm12 tm13 to:out_file format " dc.s %,%,%\n" tm21 tm22 tm23 to:out_file format " dc.s %,%,%\n" tm31 tm32 tm33 to:out_file format " dc.s %,%,%\n" tm41 tm42 tm43 to:out_file format "\n" to:out_file ) ) close out_file shelllaunch "notepad.exe" filename ) -- theend void DS3231::setDateTime(uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second) { Wire.beginTransmission(DS3231_ADDRESS); #if ARDUINO >= 100 Wire.write(DS3231_REG_TIME); #else Wire.send(DS3231_REG_TIME); #endif #if ARDUINO >= 100 Wire.write(dec2bcd(second)); Wire.write(dec2bcd(minute)); Wire.write(dec2bcd(hour)); Wire.write(dec2bcd(dow(year, month, day))); Wire.write(dec2bcd(day)); Wire.write(dec2bcd(month)); Wire.write(dec2bcd(year-2000)); #else Wire.send(dec2bcd(second)); Wire.send(dec2bcd(minute)); Wire.send(dec2bcd(hour)); Wire.send(dec2bcd(dow(year, month, day))); Wire.send(dec2bcd(day)); Wire.send(dec2bcd(month)); Wire.send(dec2bcd(year-2000)); #endif #if ARDUINO >= 100 Wire.write(DS3231_REG_TIME); #else Wire.send(DS3231_REG_TIME); #endif Wire.endTransmission(); } void DS3231::setDateTime(uint32_t t) { t -= 946681200; uint16_t year; uint8_t month; uint8_t day; uint8_t hour; uint8_t minute; uint8_t second; second = t % 60; t /= 60; minute = t % 60; t /= 60; hour = t % 24; uint16_t days = t / 24; uint8_t leap; for (year = 0; ; ++year) { leap = year % 4 == 0; if (days < 365 + leap) { break; } days -= 365 + leap; } for (month = 1; ; ++month) { uint8_t daysPerMonth = pgm_read_byte(daysArray + month - 1); if (leap && month == 2) { ++daysPerMonth; } if (days < daysPerMonth) { break; } days -= daysPerMonth; } day = days + 1; setDateTime(year+2000, month, day, hour, minute, second); } void DS3231::setDateTime(const char* date, const char* time) { uint16_t year; uint8_t month; uint8_t day; uint8_t hour; uint8_t minute; uint8_t second; year = conv2d(date + 9); switch (date[0]) { case 'J': month = date[1] == 'a' ? 1 : month = date[2] == 'n' ? 6 : 7; break; case 'F': month = 2; break; case 'A': month = date[2] == 'r' ? 4 : 8; break; case 'M': month = date[2] == 'r' ? 3 : 5; break; case 'S': month = 9; break; case 'O': month = 10; break; case 'N': month = 11; break; case 'D': month = 12; break; } day = conv2d(date + 4); hour = conv2d(time); minute = conv2d(time + 3); second = conv2d(time + 6); setDateTime(year+2000, month, day, hour, minute, second); } char* DS3231::dateFormat(const char* dateFormat, RTCDateTime dt) { char buffer[255]; buffer[0] = 0; char helper[11]; while (*dateFormat != '\0') { switch (dateFormat[0]) { // Day decoder case 'd': sprintf(helper, "%02d", dt.day); strcat(buffer, (const char *)helper); break; case 'j': sprintf(helper, "%d", dt.day); strcat(buffer, (const char *)helper); break; case 'l': strcat(buffer, (const char *)strDayOfWeek(dt.dayOfWeek)); break; case 'D': strncat(buffer, strDayOfWeek(dt.dayOfWeek), 3); break; case 'N': sprintf(helper, "%d", dt.dayOfWeek); strcat(buffer, (const char *)helper); break; case 'w': sprintf(helper, "%d", (dt.dayOfWeek + 7) % 7); strcat(buffer, (const char *)helper); break; case 'z': sprintf(helper, "%d", dayInYear(dt.year, dt.month, dt.day)+1); strcat(buffer, (const char *)helper); break; case 'S': strcat(buffer, (const char *)strDaySufix(dt.day)); break; // Month decoder case 'm': sprintf(helper, "%02d", dt.month); strcat(buffer, (const char *)helper); break; case 'n': sprintf(helper, "%d", dt.month); strcat(buffer, (const char *)helper); break; case 'F': strcat(buffer, (const char *)strMonth(dt.month)); break; case 'M': strncat(buffer, (const char *)strMonth(dt.month), 3); break; case 't': sprintf(helper, "%d", daysInMonth(dt.year, dt.month)); strcat(buffer, (const char *)helper); break; // Year decoder case 'Y': sprintf(helper, "%d", dt.year); strcat(buffer, (const char *)helper); break; case 'y': sprintf(helper, "%02d", dt.year-2000); strcat(buffer, (const char *)helper); break; case 'L': sprintf(helper, "%d", isLeapYear(dt.year)); strcat(buffer, (const char *)helper); break; // Hour decoder case 'H': sprintf(helper, "%02d", dt.hour); strcat(buffer, (const char *)helper); break; case 'G': sprintf(helper, "%d", dt.hour); strcat(buffer, (const char *)helper); break; case 'h': sprintf(helper, "%02d", hour12(dt.hour)); strcat(buffer, (const char *)helper); break; case 'g': sprintf(helper, "%d", hour12(dt.hour)); strcat(buffer, (const char *)helper); break; case 'A': strcat(buffer, (const char *)strAmPm(dt.hour, true)); break; case 'a': strcat(buffer, (const char *)strAmPm(dt.hour, false)); break; // Minute decoder case 'i': sprintf(helper, "%02d", dt.minute); strcat(buffer, (const char *)helper); break; // Second decoder case 's': sprintf(helper, "%02d", dt.second); strcat(buffer, (const char *)helper); break; // Misc decoder case 'U': sprintf(helper, "%lu", dt.unixtime); strcat(buffer, (const char *)helper); break; default: strncat(buffer, dateFormat, 1); break; } dateFormat++; } return buffer; } char* DS3231::dateFormat(const char* dateFormat, RTCAlarmTime dt) { char buffer[255]; buffer[0] = 0; char helper[11]; while (*dateFormat != '\0') { switch (dateFormat[0]) { // Day decoder case 'd': sprintf(helper, "%02d", dt.day); strcat(buffer, (const char *)helper); break; case 'j': sprintf(helper, "%d", dt.day); strcat(buffer, (const char *)helper); break; case 'l': strcat(buffer, (const char *)strDayOfWeek(dt.day)); break; case 'D': strncat(buffer, strDayOfWeek(dt.day), 3); break; case 'N': sprintf(helper, "%d", dt.day); strcat(buffer, (const char *)helper); break; case 'w': sprintf(helper, "%d", (dt.day + 7) % 7); strcat(buffer, (const char *)helper); break; case 'S': strcat(buffer, (const char *)strDaySufix(dt.day)); break; // Hour decoder case 'H': sprintf(helper, "%02d", dt.hour); strcat(buffer, (const char *)helper); break; case 'G': sprintf(helper, "%d", dt.hour); strcat(buffer, (const char *)helper); break; case 'h': sprintf(helper, "%02d", hour12(dt.hour)); strcat(buffer, (const char *)helper); break; case 'g': sprintf(helper, "%d", hour12(dt.hour)); strcat(buffer, (const char *)helper); break; case 'A': strcat(buffer, (const char *)strAmPm(dt.hour, true)); break; case 'a': strcat(buffer, (const char *)strAmPm(dt.hour, false)); break; // Minute decoder case 'i': sprintf(helper, "%02d", dt.minute); strcat(buffer, (const char *)helper); break; // Second decoder case 's': sprintf(helper, "%02d", dt.second); strcat(buffer, (const char *)helper); break; default: strncat(buffer, dateFormat, 1); break; } dateFormat++; } return buffer; } RTCDateTime DS3231::getDateTime(void) { int values[7]; Wire.beginTransmission(DS3231_ADDRESS); #if ARDUINO >= 100 Wire.write(DS3231_REG_TIME); #else Wire.send(DS3231_REG_TIME); #endif Wire.endTransmission(); Wire.requestFrom(DS3231_ADDRESS, 7); while(!Wire.available()) {}; for (int i = 6; i >= 0; i--) { #if ARDUINO >= 100 values[i] = bcd2dec(Wire.read()); #else values[i] = bcd2dec(Wire.receive()); #endif } Wire.endTransmission(); t.year = values[0] + 2000; t.month = values[1]; t.day = values[2]; t.dayOfWeek = values[3]; t.hour = values[4]; t.minute = values[5]; t.second = values[6]; t.unixtime = unixtime(); return t; } uint8_t DS3231::isReady(void) { return true; } void DS3231::enableOutput(bool enabled) { uint8_t value; value = readRegister8(DS3231_REG_CONTROL); value &= 0b11111011; value |= (!enabled << 2); writeRegister8(DS3231_REG_CONTROL, value); } void DS3231::setBattery(bool timeBattery, bool squareBattery) { uint8_t value; value = readRegister8(DS3231_REG_CONTROL); if (squareBattery) { value |= 0b01000000; } else { value &= 0b10111111; } if (timeBattery) { value &= 0b01111011; } else { value |= 0b10000000; } writeRegister8(DS3231_REG_CONTROL, value); } bool DS3231::isOutput(void) { uint8_t value; value = readRegister8(DS3231_REG_CONTROL); value &= 0b00000100; value >>= 2; return !value; } void DS3231::setOutput(DS3231_sqw_t mode) { uint8_t value; value = readRegister8(DS3231_REG_CONTROL); value &= 0b11100111; value |= (mode << 3); writeRegister8(DS3231_REG_CONTROL, value); } DS3231_sqw_t DS3231::getOutput(void) { uint8_t value; value = readRegister8(DS3231_REG_CONTROL); value &= 0b00011000; value >>= 3; return (DS3231_sqw_t)value; } void DS3231::enable32kHz(bool enabled) { uint8_t value; value = readRegister8(DS3231_REG_STATUS); value &= 0b11110111; value |= (enabled << 3); writeRegister8(DS3231_REG_STATUS, value); } bool DS3231::is32kHz(void) { uint8_t value; value = readRegister8(DS3231_REG_STATUS); value &= 0b00001000; value >>= 3; return value; } #ifndef DS3231_h #define DS3231_h #if ARDUINO >= 100 #include "Arduino.h" #else #include "WProgram.h" #endif #define DS3231_ADDRESS (0x68) #define DS3231_REG_TIME (0x00) #define DS3231_REG_ALARM_1 (0x07) #define DS3231_REG_ALARM_2 (0x0B) #define DS3231_REG_CONTROL (0x0E) #define DS3231_REG_STATUS (0x0F) #define DS3231_REG_TEMPERATURE (0x11) #ifndef RTCDATETIME_STRUCT_H #define RTCDATETIME_STRUCT_H struct RTCDateTime { uint16_t year; uint8_t month; uint8_t day; uint8_t hour; uint8_t minute; uint8_t second; uint8_t dayOfWeek; uint32_t unixtime; }; struct RTCAlarmTime { uint8_t day; uint8_t hour; uint8_t minute; uint8_t second; }; #endif typedef enum { DS3231_1HZ = 0x00, DS3231_4096HZ = 0x01, DS3231_8192HZ = 0x02, DS3231_32768HZ = 0x03 } DS3231_sqw_t; typedef enum { DS3231_EVERY_SECOND = 0b00001111, DS3231_MATCH_S = 0b00001110, DS3231_MATCH_M_S = 0b00001100, DS3231_MATCH_H_M_S = 0b00001000, DS3231_MATCH_DT_H_M_S = 0b00000000, DS3231_MATCH_DY_H_M_S = 0b00010000 } DS3231_alarm1_t; typedef enum { DS3231_EVERY_MINUTE = 0b00001110, DS3231_MATCH_M = 0b00001100, DS3231_MATCH_H_M = 0b00001000, DS3231_MATCH_DT_H_M = 0b00000000, DS3231_MATCH_DY_H_M = 0b00010000 } DS3231_alarm2_t; class DS3231 { public: bool begin(void); void setDateTime(uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second); void setDateTime(uint32_t t); void setDateTime(const char* date, const char* time); RTCDateTime getDateTime(void); uint8_t isReady(void); DS3231_sqw_t getOutput(void); void setOutput(DS3231_sqw_t mode); void enableOutput(bool enabled); bool isOutput(void); void enable32kHz(bool enabled); bool is32kHz(void); void forceConversion(void); float readTemperature(void); void setAlarm1(uint8_t dydw, uint8_t hour, uint8_t minute, uint8_t second, DS3231_alarm1_t mode, bool armed = true); RTCAlarmTime getAlarm1(void); DS3231_alarm1_t getAlarmType1(void); bool isAlarm1(bool clear = true); void armAlarm1(bool armed); bool isArmed1(void); void clearAlarm1(void); void setAlarm2(uint8_t dydw, uint8_t hour, uint8_t minute, DS3231_alarm2_t mode, bool armed = true); RTCAlarmTime getAlarm2(void); DS3231_alarm2_t getAlarmType2(void); bool isAlarm2(bool clear = true); void armAlarm2(bool armed); bool isArmed2(void); void clearAlarm2(void); void setBattery(bool timeBattery, bool squareBattery); char* dateFormat(const char* dateFormat, RTCDateTime dt); char* dateFormat(const char* dateFormat, RTCAlarmTime dt); private: RTCDateTime t; char *strDayOfWeek(uint8_t dayOfWeek); char *strMonth(uint8_t month); char *strAmPm(uint8_t hour, bool uppercase); char *strDaySufix(uint8_t day); uint8_t hour12(uint8_t hour24); uint8_t bcd2dec(uint8_t bcd); uint8_t dec2bcd(uint8_t dec); long time2long(uint16_t days, uint8_t hours, uint8_t minutes, uint8_t seconds); uint16_t date2days(uint16_t year, uint8_t month, uint8_t day); uint8_t daysInMonth(uint16_t year, uint8_t month); uint16_t dayInYear(uint16_t year, uint8_t month, uint8_t day); bool isLeapYear(uint16_t year); uint8_t dow(uint16_t y, uint8_t m, uint8_t d); uint32_t unixtime(void); uint8_t conv2d(const char* p); void writeRegister8(uint8_t reg, uint8_t value); uint8_t readRegister8(uint8_t reg); }; #endif #include #include #include #include #include #include #include #define cudaCheck(err) (cudaCheck(err, __FILE__, __LINE__)) const std::string errLogFile = "matrixValidationFailure.txt"; int main(int argc, char **argv) { if (argc != 2) { std::cerr << "Please select a kernel (range 0 - 12, 0 for NVIDIA cuBLAS)" << std::endl; exit(EXIT_FAILURE); } // get kernel number int kernel_num = std::stoi(argv[1]); if (kernel_num < 0 || kernel_num > 12) { std::cerr << "Please enter a valid kernel number (0-12)" << std::endl; exit(EXIT_FAILURE); } // get environment variable for device int deviceIdx = 0; if (getenv("DEVICE") != NULL) { deviceIdx = atoi(getenv("DEVICE")); } cudaCheck(cudaSetDevice(deviceIdx)); printf("Running kernel %d on device %d.\n", kernel_num, deviceIdx); // print some device info // CudaDeviceInfo(); // Declare the handle, create the handle, cublasCreate will return a value of // type cublasStatus_t to determine whether the handle was created // successfully (the value is 0) cublasHandle_t handle; if (cublasCreate(&handle)) { std::cerr << "Create cublas handle error." << std::endl; exit(EXIT_FAILURE); }; // Using cudaEvent for gpu stream timing, cudaEvent is equivalent to // publishing event tasks in the target stream float elapsed_time; cudaEvent_t beg, end; cudaEventCreate(&beg); cudaEventCreate(&end); // cuBLAS FLOPs ceiling is reached at 8192 std::vector SIZE = {128, 256, 512, 1024, 2048, 4096}; long m, n, k, max_size; max_size = SIZE[SIZE.size() - 1]; std::cout << "Max size: " << max_size << std::endl; float alpha = 0.5, beta = 3.0; // GEMM input parameters, C=α*AB+β*C float *A = nullptr, *B = nullptr, *C = nullptr, *C_ref = nullptr; // host matrices float *dA = nullptr, *dB = nullptr, *dC = nullptr, *dC_ref = nullptr; // device matrices A = (float *)malloc(sizeof(float) * max_size * max_size); B = (float *)malloc(sizeof(float) * max_size * max_size); C = (float *)malloc(sizeof(float) * max_size * max_size); C_ref = (float *)malloc(sizeof(float) * max_size * max_size); randomize_matrix(A, max_size * max_size); randomize_matrix(B, max_size * max_size); randomize_matrix(C, max_size * max_size); cudaCheck(cudaMalloc((void **)&dA, sizeof(float) * max_size * max_size)); cudaCheck(cudaMalloc((void **)&dB, sizeof(float) * max_size * max_size)); cudaCheck(cudaMalloc((void **)&dC, sizeof(float) * max_size * max_size)); cudaCheck(cudaMalloc((void **)&dC_ref, sizeof(float) * max_size * max_size)); cudaCheck(cudaMemcpy(dA, A, sizeof(float) * max_size * max_size, cudaMemcpyHostToDevice)); cudaCheck(cudaMemcpy(dB, B, sizeof(float) * max_size * max_size, cudaMemcpyHostToDevice)); cudaCheck(cudaMemcpy(dC, C, sizeof(float) * max_size * max_size, cudaMemcpyHostToDevice)); cudaCheck(cudaMemcpy(dC_ref, C, sizeof(float) * max_size * max_size, cudaMemcpyHostToDevice)); int repeat_times = 50; for (int size : SIZE) { m = 32; n = k = size; std::cout << "dimensions(m,n,k) " << m << "," << n << "," << k << ", alpha: " << alpha << ", beta: " << beta << std::endl; // Verify the correctness of the calculation, and execute it once before the // kernel function timing to avoid cold start errors if (kernel_num != 0) { run_kernel(0, m, n, k, alpha, dA, dB, beta, dC_ref, handle); // cuBLAS run_kernel(kernel_num, m, n, k, alpha, dA, dB, beta, dC, handle); // Executes the kernel, modifies the result matrix cudaCheck(cudaDeviceSynchronize()); cudaCheck(cudaGetLastError()); // Check for async errors during kernel run cudaMemcpy(C, dC, sizeof(float) * m * n, cudaMemcpyDeviceToHost); cudaMemcpy(C_ref, dC_ref, sizeof(float) * m * n, cudaMemcpyDeviceToHost); if (!verify_matrix(C_ref, C, m * n)) { std::cout << "Failed to pass the correctness verification against NVIDIA " "cuBLAS." << std::endl; if (m <= 128) { std::cout << " Logging faulty output into " << errLogFile << "\n"; std::ofstream fs; fs.open(errLogFile); fs << "A:\n"; print_matrix(A, m, n, fs); fs << "B:\n"; print_matrix(B, m, n, fs); fs << "C:\n"; print_matrix(C, m, n, fs); fs << "Should:\n"; print_matrix(C_ref, m, n, fs); } exit(EXIT_FAILURE); } } cudaEventRecord(beg); for (int j = 0; j < repeat_times; j++) { // We don't reset dC between runs to save time run_kernel(kernel_num, m, n, k, alpha, dA, dB, beta, dC, handle); } cudaEventRecord(end); cudaEventSynchronize(beg); cudaEventSynchronize(end); cudaEventElapsedTime(&elapsed_time, beg, end); elapsed_time /= 1000.; // Convert to seconds long flops = 2 * m * n * k; printf( "Average elapsed time: (%7.6f) s, performance: (%7.1f) GFLOPS. size: " "(%ld).\n", elapsed_time / repeat_times, (repeat_times * flops * 1e-9) / elapsed_time, m); fflush(stdout); // make dC and dC_ref equal again (we modified dC while calling our kernel // for benchmarking) cudaCheck(cudaMemcpy(dC, dC_ref, sizeof(float) * m * n, cudaMemcpyDeviceToDevice)); } // Free up CPU and GPU space free(A); free(B); free(C); free(C_ref); cudaFree(dA); cudaFree(dB); cudaFree(dC); cudaFree(dC_ref); cublasDestroy(handle); return 0; }; #include #include #include __global__ void kernel(uint *A, uint *B, int row) { auto x = threadIdx.x / 4; auto y = threadIdx.x % 4; A[x * row + y] = x; B[x * row + y] = y; } int main(int argc, char **argv) { uint *Xs, *Ys; uint *Xs_d, *Ys_d; uint SIZE = 4; Xs = (uint *)malloc(SIZE * SIZE * sizeof(uint)); Ys = (uint *)malloc(SIZE * SIZE * sizeof(uint)); cudaMalloc((void **)&Xs_d, SIZE * SIZE * sizeof(uint)); cudaMalloc((void **)&Ys_d, SIZE * SIZE * sizeof(uint)); dim3 grid_size(1, 1, 1); dim3 block_size(4 * 4); kernel<<>>(Xs_d, Ys_d, 4); cudaMemcpy(Xs, Xs_d, SIZE * SIZE * sizeof(uint), cudaMemcpyDeviceToHost); cudaMemcpy(Ys, Ys_d, SIZE * SIZE * sizeof(uint), cudaMemcpyDeviceToHost); cudaDeviceSynchronize(); for (int row = 0; row < SIZE; ++row) { for (int col = 0; col < SIZE; ++col) { std::cout << "[" << Xs[row * SIZE + col] << "|" << Ys[row * SIZE + col] << "] "; } std::cout << "\n"; } cudaFree(Xs_d); cudaFree(Ys_d); free(Xs); free(Ys); } name: SGEMM_CUDA channels: - conda-forge dependencies: - python - black - cmake - matplotlib - seaborn - tabulate .PHONY: all build debug clean profile bench cuobjdump CMAKE := cmake BUILD_DIR := build BENCHMARK_DIR := benchmark_results all: build build: @mkdir -p $(BUILD_DIR) @cd $(BUILD_DIR) && $(CMAKE) -DCMAKE_BUILD_TYPE=Release .. @$(MAKE) -C $(BUILD_DIR) debug: @mkdir -p $(BUILD_DIR) @cd $(BUILD_DIR) && $(CMAKE) -DCMAKE_BUILD_TYPE=Debug .. @$(MAKE) -C $(BUILD_DIR) clean: @rm -rf $(BUILD_DIR) FUNCTION := $$(cuobjdump -symbols build/sgemm | grep -i Warptiling | awk '{print $$NF}') cuobjdump: build @cuobjdump -arch sm_86 -sass -fun $(FUNCTION) build/sgemm | c++filt > build/cuobjdump.sass @cuobjdump -arch sm_86 -ptx -fun $(FUNCTION) build/sgemm | c++filt > build/cuobjdump.ptx # Usage: make profile KERNEL= PREFIX= profile: build @ncu --set full --export $(BENCHMARK_DIR)/$(PREFIX)kernel_$(KERNEL) --force-overwrite $(BUILD_DIR)/sgemm $(KERNEL) bench: build @bash gen_benchmark_results.sh [-0.01, 3.00, 3.01, -2.04, -1.02, -3.02, 0.02, 0.02, 4.02, 4.03, -3.01, -3.04, 0.02, 4.01, 4.02, -4.01, -3.03, 1.01, -4.00, -1.04, -0.02, 3.03, -0.03, -1.04, 3.04, 2.03, 3.03, -1.04, -3.01, -3.04, 4.01, -2.01, 3.02, 2.03, -3.03, 1.00, 0.03, -1.01, -2.00, 4.03, -3.04, 2.02, 1.00, -3.04, 2.02, 2.03, 0.00, -4.02, -3.01, -4.02, -2.03, 1.00, 1.03, -3.01, -2.03, 0.00, 3.03, -4.02, 1.02, -1.02, 4.01, 1.02, 3.00, 1.03, 4.01, -0.03, 1.03, -2.02, -1.01, 2.02, -3.01, -0.04, 4.02, 2.04, -3.03, -2.00, 2.01, 4.04, 1.02, -0.01, 3.00, -2.02, -3.04, 1.03, -3.01, 3.03, -2.03, -4.02, 0.03, 0.00, -4.03, -4.00, -1.00, 2.02, 3.02, -4.01, -0.00, 0.01, 1.03, 4.03, 4.00, -0.04, 4.02, -2.04, 0.02, -2.03, 0.04, -2.01, 2.03, -3.02, 4.03, 3.04, 3.00, -1.03, -0.03, -4.03, -4.00, 4.02, 2.02, -4.00, -4.04, 4.04, -0.00, 1.01, -3.03, -0.03, 1.04, -2.01, -0.00, 3.04, 1.03, 2.04, 4.04, -1.02, 2.03, 0.03, 1.01, -4.04, 1.01, -1.02, -2.03, 3.00, 0.04, -0.00, -0.04, -1.04, 0.02, 3.01, -4.03, 0.01, 3.03, 0.01, 1.03, 3.00, -3.00, 1.04, 0.04, -2.04, -1.00, 0.02, 0.01, -2.01, -4.02, 4.02, -2.01, 2.04, -1.01, 2.03, 2.01, 0.02, 1.02, 4.01, 2.00, 1.02, 3.04, -1.01, -2.04, 3.02, 1.01, 0.04, 1.00, -3.04, 3.03, -2.00, 3.00, -3.01, 4.01, 3.01, 1.02, 0.02, 3.00, -1.00, 4.03, -0.02, 1.03, 1.01, 4.02, 4.02, 1.01, 0.01, 4.04, 2.02, 4.01, 4.04, -1.02, 3.03, 4.04, 3.04, -1.00, -1.02, -3.02, 2.01, -0.02, -1.01, 4.02, 0.03, 4.04, -2.03, -2.04, -2.02, -4.00, -3.03, -0.00, -0.03, 4.02, 2.04, -3.00, 2.04, -1.02, 0.01, -0.00, 3.04, -4.01, -2.01, 2.02, -4.01, 3.01, -2.03, 4.04, 3.01, -4.02, -2.00, -4.01, 3.03, -0.01, 2.02, -4.00, 3.03, 1.04, 2.02, -3.03, 2.01, 2.02, -0.02, -4.02, -2.00; -1.04, -1.04, -2.00, -0.04, -1.00, -0.04, 0.04, -2.04, -2.04, -2.01, 2.00, 1.01, -4.03, 4.00, -0.02, -3.02, 1.04, -4.01, -1.00, -1.04, 4.03, -2.00, 3.04, -2.00, 1.00, 1.01, 1.02, -2.04, 1.00, 2.03, 0.03, 1.02, 3.00, -3.03, 0.01, -0.04, -3.03, -1.00, 3.03, -2.03, 0.03, 2.02, -4.00, -0.00, 3.00, 2.02, -3.03, -2.04, -2.04, -3.01, 1.04, -2.01, -2.01, 0.03, 1.04, 4.03, 2.01, 0.01, 4.03, 0.03, -4.04, -4.03, -4.00, -0.03, -0.01, 4.00, -2.00, 2.00, 3.01, 0.01, -4.00, -2.02, 2.01, 1.03, -4.03, -1.04, -3.02, 2.01, 3.01, 0.01, -1.01, -1.03, -3.02, -4.04, 2.03, 1.02, 1.02, -0.01, -2.02, 4.02, -4.03, -1.01, 1.00, -3.01, -4.01, 4.02, 2.03, 2.01, -0.03, -4.04, 1.00, -3.02, -2.03, 0.03, -3.03, -1.04, -3.01, -2.00, -3.02, -1.01, -2.02, 0.02, -2.01, 4.02, -2.00, -3.01, 4.04, 3.01, 1.02, -2.03, -2.02, -2.02, 2.02, 4.01, 2.00, -3.03, -1.04, -4.03, 0.01, -0.03, -3.00, 4.00, -4.02, -0.01, 4.01, -2.04, 1.03, -3.02, -4.00, -2.00, 4.04, -0.03, 3.02, -1.02, -1.03, -2.01, -0.04, -0.02, 3.02, 0.04, -0.03, 2.00, 0.04, 4.02, -4.03, -0.02, -1.00, -4.00, -2.01, -3.01, 2.01, -4.03, 4.00, 0.02, -1.01, 1.04, 3.00, -0.01, -1.04, 4.04, -3.01, 1.03, 2.02, 1.04, -2.01, -1.04, -2.02, -4.04, -0.00, -0.01, -0.00, -1.01, 0.03, 2.02, 1.04, -4.00, -0.04, 2.03, -2.03, -1.00, -1.02, -3.03, -0.01, -1.03, -2.02, 3.03, -1.03, -3.00, -2.02, 1.00, 0.02, 0.00, 2.01, 0.02, -1.01, -4.02, -1.03, 0.01, -3.00, -3.02, 3.04, -3.04, 0.04, -4.04, -4.02, 1.01, -1.00, -2.02, -3.02, -3.00, -4.01, 2.04, 3.01, 4.01, 2.00, 2.02, 1.00, -3.04, -0.04, -0.03, 2.02, 0.02, -3.00, 4.01, -2.04, 4.03, 2.04, -0.04, -3.00, 0.00, -3.00, -2.00, -3.03, 0.00, 3.04, -3.03, -1.02, -1.02, -0.00, 1.03, 0.01, 2.01, -4.01, -0.01, 4.01, 4.04; 2.02, -3.03, 2.01, -3.02, -2.03, -0.02, -1.01, 3.03, 1.04, -4.00, 2.04, -0.03, 1.00, 4.01, 2.03, -4.00, -2.04, 0.04, 2.00, -4.01, 0.04, -4.01, -1.04, 1.00, 0.02, 0.04, -3.03, -3.03, -1.02, -3.04, 0.04, 4.03, 3.01, 3.04, -0.02, -1.02, 1.02, -3.01, 3.04, 3.02, 2.04, 0.04, -2.02, -3.02, -1.03, 4.01, -1.02, 1.02, -2.00, 0.00, -2.03, -0.03, -2.00, 1.00, -1.04, -0.03, 1.02, -4.03, -1.02, -1.04, -1.03, -0.04, 3.01, 2.04, 2.02, -2.02, -3.03, 1.00, 1.01, -3.04, -3.02, 3.02, 4.02, -1.00, 0.02, 0.00, -1.00, -2.02, -3.00, 3.01, 3.04, 2.02, -4.02, -3.00, 4.02, 2.02, 2.00, -3.04, 4.04, -1.03, -0.01, 1.03, 1.00, 4.00, 2.04, 3.03, -2.01, 0.01, -2.01, 2.04, 0.01, -0.02, -4.01, 0.00, 0.03, -2.03, 1.00, 4.03, -2.02, 0.01, 0.04, -1.04, 1.00, 2.02, -4.02, -3.04, -0.00, 0.01, -3.04, 1.04, -0.01, 0.03, -0.01, 1.00, -0.00, 1.00, -3.02, -0.04, -4.02, 0.03, -3.00, -0.01, 3.01, -3.00, -3.00, 2.03, -0.01, 0.03, 0.02, -0.03, -2.03, -3.04, 4.04, -3.03, 2.03, -4.01, 2.01, 3.02, -2.04, 1.01, -4.03, 4.01, -0.02, 2.02, -4.02, 3.03, -3.00, 0.00, 0.00, -4.01, 4.02, 4.01, 3.01, 1.01, 0.00, 2.00, 0.04, -1.01, 0.01, -4.02, -0.03, -0.02, 3.00, -2.04, 2.04, -1.01, 3.01, -0.02, 2.04, -4.04, -1.04, -1.01, -0.01, 0.04, 0.03, 0.00, 0.00, 2.00, -4.04, -0.00, -0.02, 3.00, 1.00, 2.02, 1.02, -2.02, -3.00, -3.02, 2.03, 0.00, 0.00, -4.01, -4.04, 3.03, -4.00, 1.02, -4.00, -3.03, -0.00, -1.03, 4.03, -0.02, -3.03, 1.02, 1.03, -4.04, 1.04, 3.04, -4.04, -3.02, 0.04, -3.01, 0.04, 0.02, -1.04, 1.03, 1.04, 1.04, 3.03, 1.03, -4.04, 0.04, 3.04, 2.02, -2.03, 4.04, -0.00, -4.03, -3.02, -4.00, -4.02, 1.02, -1.03, 0.00, -3.02, -1.04, 3.04, 2.00, 4.04, -0.00, -4.04, 4.02, 3.03, 3.00, 1.00, 1.01; 3.02, -1.04, 2.00, 4.00, -1.01, 1.00, -0.00, 2.01, -4.04, -2.02, -0.01, -3.04, 4.03, -4.02, -1.00, -2.01, -0.01, 3.00, 3.01, -4.04, -3.01, -4.01, -1.01, -1.00, 1.02, -3.01, 2.04, -1.04, 4.03, -2.04, 3.02, 4.01, -2.02, -0.00, -0.04, 3.02, -2.01, -4.02, -2.03, 2.03, -2.03, -4.03, -4.02, 3.03, 4.00, -2.03, 4.00, 2.02, -4.04, 0.03, 1.03, -2.02, 0.03, -1.01, -1.02, 0.04, -3.00, 2.02, 0.02, 4.04, -3.02, -1.04, 0.02, -0.00, 0.01, -3.03, 4.01, 2.00, 3.00, -3.02, 0.00, -4.03, -1.04, -2.01, -0.02, -1.02, 4.01, 2.00, 4.03, 1.03, 1.04, 4.03, 4.01, 2.03, 1.04, -2.02, -2.01, 4.00, -0.02, 0.03, 2.04, -1.01, 4.00, -1.04, 2.02, -1.00, -3.02, 2.01, 2.03, -1.00, -0.04, -3.01, -3.00, 2.04, -2.03, 1.04, -0.04, 2.02, -4.04, 4.00, -1.02, -0.02, 3.00, -0.03, 2.00, 3.04, -4.04, 2.01, -0.02, 2.01, -2.03, 1.00, 3.01, 0.01, -2.00, 3.00, 1.04, 4.01, -0.02, 4.01, 3.03, 4.01, 2.04, -3.00, -2.04, -2.04, -2.01, 4.02, 3.02, 0.04, -4.04, 2.00, 1.02, -3.03, 2.00, 3.04, 4.04, 0.00, 3.03, 1.01, 4.00, -0.04, 2.03, 3.01, -2.03, 4.01, 3.01, 3.01, 0.01, 4.03, 4.04, -3.04, 4.01, -0.02, -4.04, -3.00, 1.04, -3.02, -2.00, 1.04, 2.00, -2.03, -2.03, -2.00, -2.02, -4.00, 0.01, 2.01, 0.00, -4.01, -4.03, 3.03, 3.02, -2.00, 3.04, 3.03, -1.00, -2.02, 3.02, -1.02, -3.03, 1.03, -4.03, -2.01, 0.04, -1.00, -1.01, 0.00, -4.01, -4.02, 2.03, 3.04, -0.00, -4.02, -3.04, -3.00, 1.04, -4.04, -0.03, 1.04, 0.01, 3.02, 0.04, 3.00, 2.03, -3.03, -3.04, -2.00, -3.03, 0.04, -3.01, 3.04, 0.02, 3.00, -4.03, -0.03, -4.01, 1.00, -3.03, -2.00, 3.04, -0.04, 1.01, 3.04, -0.04, -2.01, -2.00, -1.02, 3.02, -2.04, -3.04, -3.02, -1.03, -2.04, 0.04, 3.02, 1.01, 3.00, 3.03, -2.02, -3.00, 0.00, 3.02, 2.01, 1.03, 4.03; cmake_minimum_required(VERSION 3.19) project(NVIDIA_SGEMM_PRACTICE LANGUAGES CXX CUDA) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) find_package(CUDA REQUIRED) # ensure cuda is available include(CheckLanguage) check_language(CUDA) set(CMAKE_CXX_STANDARD 20) set(CUDA_COMPUTE_CAPABILITY 86) # in debug mode, add debug symbols to device code # this disables most optimizations and kills performance add_compile_options("$<$,$>:-G;-src-in-ptx>") # add_compile_options("--ptxas-options=-v") # Configure header file search paths include_directories(${CUDA_INCLUDE_DIRS}) include_directories(${PROJECT_SOURCE_DIR}/src) # Configure the source file path to be compiled aux_source_directory(${PROJECT_SOURCE_DIR}/src SRC) # generate executable add_executable(sgemm sgemm.cu ${SRC}) set_target_properties(sgemm PROPERTIES CUDA_ARCHITECTURES ${CUDA_COMPUTE_CAPABILITY}) target_link_libraries(sgemm ${CUDA_LIBRARIES} ${CUDA_CUBLAS_LIBRARIES}) add_executable(cuBLAS_sgemm cuBLAS_sgemm.cu ) set_target_properties(sgemm PROPERTIES CUDA_ARCHITECTURES ${CUDA_COMPUTE_CAPABILITY}) target_link_libraries(cuBLAS_sgemm ${CUDA_LIBRARIES} ${CUDA_CUBLAS_LIBRARIES}) add_executable(simplest_kernel simplest_kernel.cu) set_target_properties(sgemm PROPERTIES CUDA_ARCHITECTURES ${CUDA_COMPUTE_CAPABILITY}) target_link_libraries(simplest_kernel ${CUDA_LIBRARIES}) import gzip import random import tqdm import numpy as np import torch from torch.optim import Adam from torch.nn import functional as F from torch.utils.data import DataLoader, Dataset from simple_hierarchical_transformer import HierarchicalTransformer # constants NUM_BATCHES = int(1e5) BATCH_SIZE = 2 GRADIENT_ACCUMULATE_EVERY = 8 LEARNING_RATE = 1e-4 VALIDATE_EVERY = 100 PRIME_LENGTH = 128 GENERATE_EVERY = 500 SEQ_LEN = 8192 GENERATE_LENGTH = 1024 # helpers def cycle(loader): while True: for data in loader: yield data def decode_token(token): return str(chr(max(32, token))) def decode_tokens(tokens): return "".join(list(map(decode_token, tokens))) # instantiate transformer model = HierarchicalTransformer( num_tokens = 256, dim = 1024, depth = 8, seq_len = SEQ_LEN, use_flash_attn = True, compress_factor = 32 ).cuda() # prepare enwik8 data with gzip.open("./data/enwik8.gz") as file: data = np.frombuffer(file.read(int(95e6)), dtype=np.uint8).copy() np_train, np_valid = np.split(data, [int(90e6)]) data_train, data_val = torch.from_numpy(np_train), torch.from_numpy(np_valid) class TextSamplerDataset(Dataset): def __init__(self, data, seq_len): super().__init__() self.data = data self.seq_len = seq_len def __getitem__(self, index): rand_start = torch.randint(0, self.data.size(0) - self.seq_len, (1,)) full_seq = self.data[rand_start : rand_start + self.seq_len + 1].long() return full_seq.cuda() def __len__(self): return self.data.size(0) // self.seq_len train_dataset = TextSamplerDataset(data_train, SEQ_LEN) val_dataset = TextSamplerDataset(data_val, SEQ_LEN) train_loader = cycle(DataLoader(train_dataset, batch_size=BATCH_SIZE)) val_loader = cycle(DataLoader(val_dataset, batch_size=BATCH_SIZE)) # optimizer optim = Adam(model.parameters(), lr = LEARNING_RATE) # training for i in tqdm.tqdm(range(NUM_BATCHES), mininterval = 10.0, desc = "training"): model.train() for _ in range(GRADIENT_ACCUMULATE_EVERY): loss, (ce_loss, recon_loss) = model(next(train_loader), return_loss = True) loss.backward(loss / GRADIENT_ACCUMULATE_EVERY) print(f"training loss: {ce_loss.item()}") torch.nn.utils.clip_grad_norm_(model.parameters(), 0.5) optim.step() optim.zero_grad() if i % VALIDATE_EVERY == 0: model.eval() with torch.no_grad(): loss, (ce_loss, recon_loss) = model(next(val_loader), return_loss = True) print(f"validation loss: {ce_loss.item()}") if i % GENERATE_EVERY == 0: model.eval() inp = random.choice(val_dataset)[:PRIME_LENGTH] prime = decode_tokens(inp) print(f"%s \n\n %s", (prime, "*" * 100)) sample = model.generate(inp[None, ...], GENERATE_LENGTH) output_str = decode_tokens(sample[0]) print(output_str, "\n") { "version": "1.0", "truncation": null, "padding": null, "added_tokens": [ { "id": 0, "content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "special": true }, { "id": 1, "content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "special": true }, { "id": 2, "content": "", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true, "special": true } ], "normalizer": { "type": "Sequence", "normalizers": [ { "type": "Prepend", "prepend": "▁" }, { "type": "Replace", "pattern": { "String": " " }, "content": "▁" } ] }, "pre_tokenizer": null, "post_processor": { "type": "TemplateProcessing", "single": [ { "SpecialToken": { "id": "", "type_id": 0 } }, { "Sequence": { "id": "A", "type_id": 0 } } ], "pair": [ { "SpecialToken": { "id": "", "type_id": 0 } }, { "Sequence": { "id": "A", "type_id": 0 } }, { "SpecialToken": { "id": "", "type_id": 1 } }, { "Sequence": { "id": "B", "type_id": 1 } } ], "special_tokens": { "": { "id": "", "ids": [ 1 ], "tokens": [ "" ] } } }, "decoder": { "type": "Sequence", "decoders": [ { "type": "Replace", "pattern": { "String": "▁" }, "content": " " }, { "type": "ByteFallback" }, { "type": "Fuse" }, { "type": "Strip", "content": " ", "start": 1, "stop": 0 } ] } } #include "q_gemm.cuh" #include "util.cuh" #include "matrix_view.cuh" #include "../config.h" // #include // #include #define BLOCK_KN_SIZE 512 #define MAX_GROUPS_IN_BLOCK (BLOCK_KN_SIZE / 32) #define MAX_COUNT_M 2 #define CLEAR_N_SIZE 256 //#define DEBUG #include "q_gemm_dq.cuh" typedef void (*fp_gemm_half_q_half_kernel) ( const half*, const uint32_t*, const uint32_t*, const half*, const uint16_t*, half*, const int, const int, const int, const int, const int, const uint16_t*, const int, const int, const int, const int, const int, const int ); template __global__ void gemm_half_q_half_kernel ( const half* a, const uint32_t* b_q_weight, const uint32_t* b_q_scale, const half* b_q_scale_max, const uint16_t* b_q_groups, half* c, const int size_m, const int size_n, const int size_k, const int groups, const int groupsize, const uint16_t* __restrict__ b_q_perm, const int rows_8, const int rows_6, const int rows_5, const int rows_4, const int rows_3, const int rows_2 ) { MatrixView_half a_(a, size_m, size_k); MatrixView_half_rw c_(c, size_m, size_n); MatrixView_q4_row b_q_scale_(b_q_scale, groups, size_n); int t = threadIdx.x; // Block int offset_n = blockIdx.x * BLOCK_KN_SIZE; int offset_m = blockIdx.y * m_count; int offset_k = blockIdx.z * BLOCK_KN_SIZE; int end_n = min(offset_n + BLOCK_KN_SIZE, size_n); int end_m = min(offset_m + m_count, size_m); int end_k = min(offset_k + BLOCK_KN_SIZE, size_k); int n = offset_n + t; // Preload block_a __shared__ half block_a[m_count][BLOCK_KN_SIZE]; if (offset_k + t < end_k) { for (int m = 0; m < m_count; ++m) { const half* a_ptr = a_.item_ptr(offset_m + m, 0); half* block_a_ptr = block_a[m]; half a0 = a_ptr[b_q_perm[offset_k + t]]; block_a_ptr[t] = a0; } } __syncthreads(); if (n >= size_n) return; // for (int xs_n = 0; xs_n < size_n - BLOCK_KN_SIZE; // Advance to subblock // int sub_offset_k = SUBBLOCK_K_SIZE * threadIdx.y; // offset_k += sub_offset_k; // end_k = min(offset_k + SUBBLOCK_K_SIZE, size_k); // if (threadIdx.y > 0) return; // int sub_offset_k = 0; // Find initial group int group = offset_k / groupsize; // Preload scales half scales[MAX_GROUPS_IN_BLOCK]; int groups_in_block = DIVIDE((end_k - offset_k), groupsize); for (int g = 0; g < groups_in_block; g++) { half s = dq_scale(b_q_scale_.item(group + g, n), b_q_scale_max[group + g]); scales[g] = s; } // Find initial q row int pre_rows_8 = min(rows_8, offset_k); int pre_rows_6 = offset_k > rows_8 ? min(rows_6, offset_k) - rows_8 : 0; int pre_rows_5 = offset_k > rows_6 ? min(rows_5, offset_k) - rows_6 : 0; int pre_rows_4 = offset_k > rows_5 ? min(rows_4, offset_k) - rows_5 : 0; int pre_rows_3 = offset_k > rows_4 ? min(rows_3, offset_k) - rows_4 : 0; int pre_rows_2 = offset_k > rows_3 ? min(rows_2, offset_k) - rows_3 : 0; int qk = 0; qk += pre_rows_8 / 32 * 8; qk += pre_rows_6 / 32 * 6; qk += pre_rows_5 / 32 * 5; qk += pre_rows_4 / 32 * 4; qk += pre_rows_3 / 32 * 3; qk += pre_rows_2 / 32 * 2; const uint32_t* b_ptr = b_q_weight + qk * size_n + n; const half* a_ptr = &block_a[0][0]; int a_stride = BLOCK_KN_SIZE; // const half* a_ptr = a_.item_ptr(offset_m, 0); // int a_stride = size_k; half qs_h = scales[0]; int scales_idx = 0; int nextgroup = offset_k + groupsize; // Column result half2 block_c[m_count] = {}; // Dot product over groups int k = offset_k; while (k < rows_8 && k < end_k) { int end_k_sg = min(min(k + 128, rows_6), end_k); uint32_t q_0[8], q_1[8]; load_8(b_ptr, size_n, q_0); qdot_8bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_0, q_1); qdot_8bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_1, q_0); qdot_8bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_0, q_1); qdot_8bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_1, q_0); } while (k < rows_6 && k < end_k) { int end_k_sg = min(min(k + 128, rows_5), end_k); uint32_t q_0[6], q_1[6]; load_6(b_ptr, size_n, q_0); qdot_6bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_0, q_1); qdot_6bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_1, q_0); qdot_6bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_0, q_1); qdot_6bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_1, q_0); } while (k < rows_5 && k < end_k) { int end_k_sg = min(min(k + 128, rows_4), end_k); uint32_t q_0[5], q_1[5]; load_5(b_ptr, size_n, q_0); qdot_5bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_0, q_1); qdot_5bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_1, q_0); qdot_5bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_0, q_1); qdot_5bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_1, q_0); } // while (k + 128 < rows_4 && k + 128 < end_k) // { // uint32_t q_0[8], q_1[8]; // load_8(b_ptr, size_n, q_0); // load_8(b_ptr, size_n, q_1); // qdot_4bit_64(k, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_0); // qdot_4bit_64(k, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_1); // } while (k < rows_4 && k < end_k) { int end_k_sg = min(min(k + 128, rows_3), end_k); uint32_t q_0[4], q_1[4]; load_4(b_ptr, size_n, q_0); qdot_4bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_0, q_1); qdot_4bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_1, q_0); qdot_4bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_0, q_1); qdot_4bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_1, q_0); } // while (k + 128 < rows_3 && k + 128 < end_k) // { // uint32_t q_0[6], q_1[6]; // load_6(b_ptr, size_n, q_0); // load_6(b_ptr, size_n, q_1); // qdot_3bit_64(k, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_0); // qdot_3bit_64(k, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_1); // } while (k < rows_3 && k < end_k) { int end_k_sg = min(min(k + 128, rows_2), end_k); uint32_t q_0[3], q_1[3]; load_3(b_ptr, size_n, q_0); qdot_3bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_0, q_1); qdot_3bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_1, q_0); qdot_3bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_0, q_1); qdot_3bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_1, q_0); } // while (k + 128 < rows_2 && k + 128 < end_k) // { // uint32_t q_0[8]; // load_8(b_ptr, size_n, q_0); // qdot_2bit_128(k, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_0); // } while (k < rows_2 && k < end_k) { int end_k_sg = min(k + 128, end_k); uint32_t q_0[2], q_1[2]; load_2(b_ptr, size_n, q_0); qdot_2bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_0, q_1); qdot_2bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_1, q_0); qdot_2bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_0, q_1); qdot_2bit_32(k, end_k_sg, group, nextgroup, groupsize, n, scales, scales_idx, qs_h, block_c, a_ptr, a_stride, b_ptr, size_n, q_1, q_0); } // Accumulate column sums in c for (int m = 0; m < m_count; m++) atomicAdd(c_.item_ptr(offset_m + m, n), __hadd(block_c[m].x, block_c[m].y)); //for (int m = 0; m < m_count; m++) c_.set(offset_m + m, n, block_c[m]); } fp_gemm_half_q_half_kernel pick_gemm_half_q_half_kernel(bool first_block, const int m_count) { if (m_count == 1) return gemm_half_q_half_kernel; if (m_count == 2) return gemm_half_q_half_kernel; // if (m_count == 3) return gemm_half_q_half_kernel; // if (m_count == 4) return gemm_half_q_half_kernel; // if (m_count == 5) return gemm_half_q_half_kernel; // if (m_count == 6) return gemm_half_q_half_kernel; // if (m_count == 7) return gemm_half_q_half_kernel; // if (m_count == 8) return gemm_half_q_half_kernel; return NULL; } void gemm_half_q_half_cuda_part ( const half* a, QMatrix* b, half* c, int size_m, int size_n, int size_k, int count_m ) { dim3 blockDim, gridDim; blockDim.x = BLOCK_KN_SIZE; blockDim.y = 1; blockDim.z = 1; gridDim.x = DIVIDE(size_n, BLOCK_KN_SIZE); gridDim.y = DIVIDE(size_m, count_m); gridDim.z = DIVIDE(size_k, BLOCK_KN_SIZE); fp_gemm_half_q_half_kernel kernel = pick_gemm_half_q_half_kernel(true, count_m); kernel<<>> ( a, b->cuda_q_weight, b->cuda_q_scale, b->cuda_q_scale_max, b->cuda_q_groups, c, size_m, size_n, size_k, b->groups, b->groupsize, b->cuda_q_perm, b->rows_8, b->rows_6, b->rows_5, b->rows_4, b->rows_3, b->rows_2 ); } void gemm_half_q_half_cuda ( cublasHandle_t cublas_handle, const half* a, QMatrix* b, half* c, int size_m, int size_n, int size_k, bool clear, half* temp_dq ) { if (size_m >= MAX_Q_GEMM_ROWS) { // Reconstruct FP16 matrix, then cuBLAS //DBGI3(size_m, size_n, size_k); if (!temp_dq) temp_dq = b->temp_dq; b->reconstruct(temp_dq); cublasSetMathMode(cublas_handle, CUBLAS_TENSOR_OP_MATH); //DBGI3(size_m, size_n, size_k); const half alpha = __float2half(1.0f); const half beta = clear ? __float2half(0.0f) : __float2half(1.0f); cublasHgemm(cublas_handle, CUBLAS_OP_N, CUBLAS_OP_N, size_n, size_m, size_k, &alpha, temp_dq, size_n, a, size_k, &beta, c, size_n); // const float alpha = 1.0f; // const float beta = clear ? 0.0f : 1.0f; // cublasSgemmEx(cublas_handle, // CUBLAS_OP_N, // CUBLAS_OP_N, // size_n, // size_m, // size_k, // &alpha, // temp_dq, // CUDA_R_16F, // size_n, // a, // CUDA_R_16F, // size_k, // &beta, // c, // CUDA_R_16F, // size_n); } else { // Quantized matmul if (clear) clear_tensor_cuda(c, size_m, size_n); int max_chunks = size_m / MAX_COUNT_M; int last_chunk = max_chunks * MAX_COUNT_M; int last_chunk_size = size_m - last_chunk; // DBGI3(size_m, size_n, size_k); // DBGI3(max_chunks, last_chunk, last_chunk_size); if (max_chunks) gemm_half_q_half_cuda_part(a, b, c, last_chunk, size_n, size_k, MAX_COUNT_M); if (last_chunk_size) gemm_half_q_half_cuda_part(a + last_chunk * size_k, b, c + last_chunk * size_n, last_chunk_size, size_n, size_k, last_chunk_size); } } __global__ void clear_kernel ( half* __restrict__ c, const int size_m, const int size_n ) { int m = blockIdx.y; int n = (blockIdx.x * CLEAR_N_SIZE + threadIdx.x) * 8; if (n >= size_n) return; int4* c_ptr = (int4*)(c + m * size_n + n); *c_ptr = {}; } void clear_tensor_cuda ( half* c, int size_m, int size_n ) { dim3 blockDim, gridDim; blockDim.x = CLEAR_N_SIZE; blockDim.y = 1; gridDim.x = DIVIDE(size_n / 8, CLEAR_N_SIZE); gridDim.y = size_m; clear_kernel<<>>(c, size_m, size_n); } #!/usr/bin/env python3 import argparse import torch import torch.nn as nn from datasets import load_dataset from gptq_triton import load_quant from tqdm import tqdm from transformers import AutoTokenizer, LlamaForCausalLM parser = argparse.ArgumentParser() parser.add_argument('--model', type=str, help='Path to model, either a HuggingFace model or a quantized model') parser.add_argument('--quant', action='store_true', help='Whether the model is quantized') parser.add_argument('--stride', type=int, default=512, help='Stride for calculating perplexity') parser.add_argument('--context-length', type=int, default=2048, help='Length of context to use') def main(): args = parser.parse_args() if not args.quant: model = get_llama(args.model) model.eval() model.to('cuda') else: model = load_quant(args.model) model.eval() model.to('cuda') # NOTE: Setting use_fast=False for now, as the alternative was an order of magnitude slower on a recent `transformers` commit tokenizer = AutoTokenizer.from_pretrained(args.model, use_fast=False) context_length = model.seqlen if args.context_length is None else args.context_length for dataset in ['wikitext-2', 'ptb', 'c4']: ppl = calculate_perplexity(model, tokenizer, dataset, max_length=context_length, stride=args.stride) print(f"{dataset} perplexity: {ppl}") def get_llama(model: str): """ Load a pretrained Llama model """ def skip(*args, **kwargs): pass # NOTE: This is a nasty hack, but it speeds up model building by a huge amount old_inits = (torch.nn.init.kaiming_uniform_, torch.nn.init.uniform_, torch.nn.init.normal_) torch.nn.init.kaiming_uniform_ = skip torch.nn.init.uniform_ = skip torch.nn.init.normal_ = skip model = LlamaForCausalLM.from_pretrained(model, torch_dtype='auto') model.seqlen = 2048 # Restore the old initializers torch.nn.init.kaiming_uniform_, torch.nn.init.uniform_, torch.nn.init.normal_ = old_inits return model def get_dataset(dataset_name: str, tokenizer) -> torch.Tensor: if dataset_name == "wikitext-2": test = load_dataset("wikitext", "wikitext-2-raw-v1", split="test") encodings = tokenizer("\n\n".join(test["text"]), return_tensors="pt").input_ids elif dataset_name == 'ptb': test = load_dataset("ptb_text_only", 'penn_treebank', split="validation") encodings = tokenizer("\n\n".join(test["sentence"]), return_tensors="pt").input_ids elif dataset_name == 'c4': # WARNING: Many of the files in the allenai/c4 repo are marked as "Unsafe" by HuggingFace, possibly containing a virus. This particular file is not, and I doubt it's an issue, but worth noting. test = load_dataset('allenai/c4', 'allenai--c4', data_files={'validation': 'en/c4-validation.00000-of-00008.json.gz'}, split='validation') encodings = [tokenizer(x, return_tensors="pt").input_ids for x in test['text'][:1000]] encodings = torch.cat(encodings, dim=1) else: raise ValueError(f"Unknown dataset {dataset_name}") return encodings def calculate_perplexity(model, tokenizer, dataset: str, max_length: int, stride: int = 512) -> float: print("Loading dataset...") encodings = get_dataset(dataset, tokenizer) seq_len = encodings.size(1) print("Calculating perplexity...") print(f"Sequence length: {seq_len}") print(f"Max length: {max_length}") print(f"Stride: {stride}") nlls = [] prev_end_loc = 0 for begin_loc in (pbar := tqdm(range(0, seq_len - 1, stride))): end_loc = min(seq_len - 1, begin_loc + max_length) trg_len = end_loc - prev_end_loc # How many tokens we want to predict input_ids = encodings[:, begin_loc:end_loc+1].to('cuda') # +1 for the labels with torch.no_grad(): # Ask the model for logits # NOTE: Instead of calling HF's model wrapper, we call the model directly to hopefully cut down on some memory overhead outputs = model.model(input_ids[:, :-1], use_cache=False) logits = model.lm_head(outputs[0][..., -trg_len:, :]) # The last trg_len tokens are the labels labels = input_ids[:, -trg_len:].contiguous() # Compute the NLL for this batch using flattened logits and labels loss_fct = nn.CrossEntropyLoss() loss = loss_fct(logits.view(-1, logits.size(-1)), labels.view(-1)) nlls.append(loss.to('cpu').to(torch.float32)) ppl = torch.exp(torch.stack(nlls).mean()) pbar.set_description(f"Perplexity: {ppl:.2f}") prev_end_loc = end_loc if end_loc == (seq_len - 1): break ppl = torch.exp(torch.stack(nlls).mean()) return ppl if __name__ == '__main__': main() [metadata] name = gptq_triton version = 0.0.3 author = fpgaminer author_email = fpgaminer@bitcoin-mining.com description = Fast GPTQ kernels written in Triton long_description = file: README.md long_description_content_type = text/markdown; charset=UTF-8 url = https://github.com/fpgaminer/GPTQ-triton keywords = gptq, triton, torch, cuda, gpu, quantization, quantize, quantized, inference, deep learning, machine learning license = Apache License 2.0 license_file = LICENSE classifiers = Development Status :: 3 - Alpha License :: OSI Approved :: Apache Software License Intended Audience :: Developers Programming Language :: Python :: 3 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Topic :: Scientific/Engineering :: Artificial Intelligence Topic :: Software Development :: Libraries :: Python Modules [options] zip_safe = False include_package_data = False package_dir = = src packages = find: python_requires = >=3.6 install_requires = triton >= 2.0.0 torch >= 2.0.0 transformers [options.packages.find] where = src import random from datasets import load_dataset def get_dataset(dataset_name: str, tokenizer, nsamples: int, seed: int, seqlen: int): if dataset_name == "wikitext-2": return get_wikitext2(nsamples, seed, seqlen, tokenizer) elif dataset_name == 'ptb': return get_ptb(nsamples, seed, seqlen, tokenizer, jointext='\n\n') elif dataset_name == 'ptb-new': return get_ptb(nsamples, seed, seqlen, tokenizer, jointext=' ') elif dataset_name == 'c4': return get_c4(nsamples, seed, seqlen, tokenizer) else: raise ValueError(f"Unknown dataset {dataset_name}") def get_wikitext2(nsamples: int, seed: int, seqlen: int, tokenizer, jointext: str = '\n\n'): traindata = load_dataset('wikitext', 'wikitext-2-raw-v1', split='train') trainenc = tokenizer(jointext.join(traindata['text']), return_tensors='pt') rng = random.Random(seed) trainloader = (rng.randint(0, trainenc.input_ids.shape[1] - seqlen - 1) for _ in range(nsamples)) trainloader = [trainenc.input_ids[:, i:i+seqlen] for i in trainloader] return trainloader def get_ptb(nsamples: int, seed: int, seqlen: int, tokenizer, jointext: str): traindata = load_dataset('ptb_text_only', 'penn_treebank', split='train') trainenc = tokenizer(jointext.join(traindata['sentence']), return_tensors='pt') rng = random.Random(seed) trainloader = (rng.randint(0, trainenc.input_ids.shape[1] - seqlen - 1) for _ in range(nsamples)) trainloader = [trainenc.input_ids[:, i:i+seqlen] for i in trainloader] return trainloader def get_c4(nsamples: int, seed: int, seqlen: int, tokenizer): # WARNING: Many of the files in the allenai/c4 repo are marked as "Unsafe" by HuggingFace, possibly containing a virus. This particular file is not, and I doubt it's an issue, but worth noting. traindata = load_dataset('allenai/c4', 'allenai--c4', data_files={'train': 'en/c4-train.00000-of-01024.json.gz'}, split='train') rng = random.Random(seed) trainloader = [] for _ in range(nsamples): while True: i = rng.randint(0, len(traindata) - 1) trainenc = tokenizer(traindata[i]['text'], return_tensors='pt') if trainenc.input_ids.shape[1] >= seqlen: break i = rng.randint(0, trainenc.input_ids.shape[1] - seqlen - 1) inp = trainenc.input_ids[:, i:i + seqlen] trainloader.append(inp) return trainloader #!/usr/bin/env python3 """ Benchmarks the generation speed of a model. While Benchmark.ipynb provides nice detailed performance data, it measures the kernels in isolation. This script measures "real world" performance by running the whole model in generation mode. It tests a grid of prompt lengths and generation lengths, and saves the timing results to `results.json`. """ import argparse import itertools import json import os import random import time import original_quant import torch import transformers from gptq_triton import load_quant from transformers import AutoTokenizer, LlamaConfig, LlamaForCausalLM parser = argparse.ArgumentParser() parser.add_argument('--model', type=str, help='Path to model, either a HuggingFace model or a quantized model') parser.add_argument('--quant', action='store_true', help='Whether the model is quantized') parser.add_argument('--cuda', type=str, help='Whether to use the old CUDA kernel and format; this must be set to the path to the CUDA quantized model, and --model must be set to a HF model') parser.add_argument('--average', type=int, default=10, help='Number of times to run each test to get an average') def main(): args = parser.parse_args() if args.cuda: model = load_cuda_quant(args.model, args.cuda, 4, -1) model.eval() model.to('cuda') elif not args.quant: model = get_llama(args.model) model.eval() model.to('cuda') else: model = load_quant(args.model) model.eval() model.to('cuda') tokenizer = AutoTokenizer.from_pretrained(args.model, use_fast=False) prompt_lengths = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048] max_lengths = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048] lengths = set(itertools.product(prompt_lengths, max_lengths)) # Remove lengths that we've already tested if os.path.exists('results.jsonl'): with open('results.jsonl', 'r') as f: for line in f: line = json.loads(line) key = (line['prompt_length'], line['max_length']) if key in lengths: lengths.remove(key) # Shuffle the lengths so that we don't always test in the same order and get caching effects lengths = list(lengths) random.shuffle(lengths) # TODO: For some reason the first run is always slow, so we run it once before the benchmark to warm things up encoded_prompt = tokenizer.encode("TODO", add_special_tokens=False, return_tensors='pt').to('cuda') _ = model.generate( input_ids=encoded_prompt, max_length=8, do_sample=True, num_return_sequences=1, suppress_tokens=[model.generation_config.eos_token_id], ) # Run the remaining benchmarks with open('results.jsonl', 'a') as f: for prompt_length, max_length in lengths: print(f'Prompt length: {prompt_length}, max length: {max_length}') results = [] for _ in range(args.average): # Generate a long random string # We do this every time to avoid caching effects prompt = ''.join(random.choice('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 .,;:!?') for _ in range(2048 * 10)) # Encode and crop down encoded_prompt = tokenizer.encode(prompt, add_special_tokens=False, return_tensors='pt') encoded_prompt = encoded_prompt[:, :prompt_length] encoded_prompt = encoded_prompt.to('cuda') start_time = time.time() _ = model.generate( input_ids=encoded_prompt, max_length=max_length + prompt_length, do_sample=True, num_return_sequences=1, suppress_tokens=[model.generation_config.eos_token_id], # This prevents the sampler from ending early; it must generate max_length tokens ) end_time = time.time() gen_time = end_time - start_time speed = max_length / gen_time results.append((gen_time, speed)) # Compute the average avg_time = sum(t for t, _ in results) / len(results) avg_speed = (max_length * len(results)) / sum(t for t, _ in results) print(f'Average generation time: {avg_time:.2f} seconds') print(f'Average generation speed: {avg_speed:.2f} tokens per second') print() f.write(json.dumps({ 'prompt_length': prompt_length, 'max_length': max_length, 'average_time': avg_time, 'average_speed': avg_speed, 'runs': results, })) f.write("\n") f.flush() def get_llama(model: str): """ Load a pretrained Llama model """ def skip(*args, **kwargs): pass # NOTE: This is a nasty hack, but it speeds up model building by a huge amount old_inits = (torch.nn.init.kaiming_uniform_, torch.nn.init.uniform_, torch.nn.init.normal_) torch.nn.init.kaiming_uniform_ = skip torch.nn.init.uniform_ = skip torch.nn.init.normal_ = skip model = LlamaForCausalLM.from_pretrained(model, torch_dtype='auto') model.seqlen = 2048 # Restore the old initializers torch.nn.init.kaiming_uniform_, torch.nn.init.uniform_, torch.nn.init.normal_ = old_inits return model def load_cuda_quant(model, checkpoint, wbits, groupsize): """ Load a quantized model using the old CUDA kernel """ config = LlamaConfig.from_pretrained(model) def noop(*args, **kwargs): pass original_inits = (torch.nn.init.kaiming_uniform_, torch.nn.init.uniform_, torch.nn.init.normal_) torch.nn.init.kaiming_uniform_ = noop torch.nn.init.uniform_ = noop torch.nn.init.normal_ = noop torch.set_default_dtype(torch.half) original_init_weights = transformers.modeling_utils._init_weights transformers.modeling_utils._init_weights = False torch.set_default_dtype(torch.half) model = LlamaForCausalLM(config) torch.set_default_dtype(torch.float) transformers.modeling_utils._init_weights = original_init_weights torch.nn.init.kaiming_uniform_, torch.nn.init.uniform_, torch.nn.init.normal_ = original_inits model = model.eval() layers = original_quant.find_layers(model) for name in ['lm_head']: if name in layers: del layers[name] original_quant.make_quant(model, layers, wbits, groupsize, faster=False) del layers print('Loading model ...') if checkpoint.endswith('.safetensors'): from safetensors.torch import load_file as safe_load model.load_state_dict(safe_load(checkpoint)) else: model.load_state_dict(torch.load(checkpoint)) model.seqlen = 2048 print('Done.') return model if __name__ == '__main__': main() VPS Oct 12, 2023 Ignas R. 10min Read 25 Common Linux Bash Script Examples to Get You Started Bash or Bourne-again shell is one of the most popular shells and command languages for Linux VPS enthusiasts. It was first released in 1989 and was used as the default shell for most Linux distributions ever since. Bash scripting allows users and system administrators to automate processes and save hundreds of hours of manual work. It’s worth mentioning that Bash is also available for Windows and macOS. This tutorial will introduce you to what bash scripting is. It features over twenty useful bash script examples to start your bash scripting journey. What Is Bash Scripting Used For 25 Bash Scripts Examples 1. Hello World 2. Echo Command 3. Sleep Command 4. Wait Command 5. Comments 6. Get User Input 7. Loops 8. Create an Array 9. Conditional Statements 10. Functions 11. Display String Length 12. Extract String 13. Find and Replace String 14. Concatenate Strings 15. Check if a Number is Even or Odd 16. Generate Factorial of Number 17. Create Directories 18. Read Files 19. Print Files With Line Count 20. Delete Files 21. Test if File Exists 22. Check Inodes and Disk Usage 23. Send Email Example 24. Update Packages 25. Show Server Information What Is Bash Scripting Used For Before we move on to the topic of bash scripting use cases, we need to elaborate on what bash and bash scripting are. Bash is a command-line interface interpreter that runs in a text window where users can manage and execute shell commands. Bash – or shell scripting – on the other hand is the process of writing a set of commands to be executed on a Linux system. A file that includes such instructions is called a bash script. To put it simply, the bash interpreter reads the bash script and executes the commands at the same time. For example, a Linux user can execute hundreds of commands with a single click instead of inputting them one by one. For this reason, bash scripting is the go-to choice for increasing productivity, setting up automation, and eliminating repetitive tasks. 25 Bash Scripts Examples The following section will cover 25 of the most popular bash scripting examples, including variable manipulation and echoing out various values. We will also cover functions, arrays, loops, and much more. 1. Hello World Hello World is the most simple bash script to start with. We will create a new variable called learningbash and print out the words Hello World. First, open a new shell script file with a text editor of your choice: nano hello.sh Paste the following lines into it: #!/bin/bash #Creates a new variable with a value of "Hello World" learningbash="Hello World" echo $learningbash The command-line window showcasing the output of the first bash script – Hello World The first line (/bin/bash) is used in every bash script. It instructs the operating system to use a bash interpreter as a command interpreter. 2. Echo Command The echo bash command can be used to print out text as well as values of variables. In the following example, we will showcase how quotation marks affect the echo command. We will start by opening a new bash script file: nano echo.sh This simple bash script example will create a new variable and print it out while using different quotation marks. #!/bin/bash provider="Hostinger" echo 'The best hosting provider is $provider' echo "The best hosting provider is $provider" The command-line window shows the echo command As you can see, if the echo bash command is used with double quotation marks ““, then the script will print out the actual value of a variable. Otherwise, if the single quotation marks ‘‘ are used, it will print out only the name of a variable. 3. Sleep Command Sleep command halts all currently running bash scripts and puts the system to sleep. Start by creating a new bash script file: nano sleep.sh Then, paste in the following simple script: #!/bin/bash sleep 10 && echo “I’ve been sleeping for 10 seconds, I want more” && sleep 10 && echo “I’m done sleeping, thanks!” A bash script with the sleep command. The basic idea is that it puts the system to a halt for a set amount of time The above example starts with a simple sleep bash command that will put your system to sleep for 10 seconds. After that, we combine the previously learned echo command with sleep – this way system will sleep for 10 seconds, then print out some words, sleep again, print out some words again and end its operation. Pro Tip A bash script can always be terminated by clicking CTRL + C without waiting for it to finish its operation. 4. Wait Command wait is a built-in Linux command that waits for completion of running process. The wait command is used with a particular process id or job id. Here’s how to create a wait bash script. Begin by creating a new bash file: nano wait.sh Paste in the following: #!/bin/bash wait 1234 echo “Done” Important! If no job ID is provided, the wait command waits until all child background jobs are completed. 5. Comments Users can easily add comments to their bash scripts with the # symbol. It is extra useful if you’ve got a lengthy script that needs explaining on some lines. Begin by creating a new bash script: nano comments.sh Then paste in the following: #!/bin/bash # Define a variable named Hostinger provider="Hostinger" # Print out the following text echo 'The best hosting provider is $provider' # Print out the following text with $provider variable value echo "The best hosting provider is $provider" The command-line window showing single line comment functionality. It's worth noting that bash comments are not displayed with the script output. Keep in mind that bash comments are only visible on a text editor. 6. Get User Input To take input from users, we’ll use the read bash command. First, create a new bash shell file: nano read.sh Then, fill it with the script below: #!/bin/bash echo "What is your age?" read age echo "Wow, you look younger than $age years old" In the above example, an age value was entered by the user. The output was then printed via the echo command. 7. Loops A loop is an essential tool in various programming languages. To put it simply, a bash loop is a set of instructions that are repeated until a user-specified condition is reached. Start by creating a loop bash program: nano whileloop.sh Then paste in the following: #!/bin/bash n=0 while : do echo Countdown: $n ((n++)) done This will work as a countdown to infinity until you press CTRL + C to stop the script. Now that we’ve tested the while loop, we can move on to the for loop. Create a bash file for it: nano forloop.sh It should contain the script below: #!/bin/bash for (( n=2; n<=10; n++ )) do echo "$n seconds" done A bash script showcasing the "for" loop The script prints out numbers from 2 to 10 while adding the seconds keyword to it. 8. Create an Array A bash array is a data structure designed to store information in an indexed way. It is extra useful if users need to store and retrieve thousands of pieces of data fast. What makes bash arrays special is that unlike any other programming language, they can store different types of elements. For example, you can use a bash array to store both strings and numbers. Create a new file in the current directory: nano array.sh Combine the freshly learned for loop with a new indexed array: #!/bin/bash # Create an indexed array IndexedArray=(egg burger milk) #Iterate over the array to get all the values for i in "${IndexedArray[@]}";do echo "$i";done A bash script to create and print out an array The script iterates over the IndexedArray and prints out all the values. 9. Conditional Statements The most popular and widely used conditional statement is if. Even though the if statement is easy to write and understand, it can be used in advanced shell scripts as well. Begin with a new bash file: nano if.sh Paste the code below in it: #!/bin/bash salary=1000 expenses=800 #Check if salary and expenses are equal if [ $salary == $expenses ]; then echo "Salary and expenses are equal" #Check if salary and expenses are not equal elif [ $salary != $expenses ]; then echo "Salary and expenses are not equal" fi This script creates two new variables and compares whether they are equal or not. 10. Functions A bash function is a set of commands that can be reused numerous times throughout a bash script. Create a new file: nano function.sh Then, paste in the following code – it creates a simple Hello World function. #!/bin/bash hello () { echo 'Hello World!' } hello 11. Display String Length There are a couple of ways of counting string length in bash. We’ll talk about the simplest. Create a file named stringlength.sh: nano stringlength.sh Fill it with the following: #!/bin/bash # Create a new string mystring="lets count the length of this string" i=${#mystring} echo "Length: $i" Here, the # operator is used to get the length of the string variable. 12. Extract String If users need to remove unnecessary parts from strings, they can use the Bash string extraction tools. Start by creating a new bash script: nano extractstring.sh The following script has 4 values, 3 of them being strings. In our example, we will extract only the number value. This can be done via the cut command. First, we instruct the command that each variable is separated by a comma by using the -d flag. Then we ask the cut command to extract the 5th value. #!/bin/bash cut -d , -f 5 <<< "Website,Domain,DNS,SMTP,5005" In another example, we have a string that is mixed with some numbers. We will use expr substr commands to extract only the Hostinger text value. #!/bin/bash expr substr "458449Hostinger4132" 7 9 13. Find and Replace String Another useful bash script for strings is find and replace. Create a file named findreplace.sh: nano findreplace.sh Then paste in the following bash script: #!/bin/bash first="I drive a BMW and Volvo" second="Audi" echo "${first/BMW/"$second"}" Find and replace script in bash The find and replace functionality doesn’t require any special commands, it can all be done with string manipulation. 14. Concatenate Strings Concatenation is the term used for appending one string to the end of another string. Start by creating concatenation.sh file. nano concatenation.sh The most simple example would be the following: #!/bin/bash firststring="The secret is..." secondstring="Bash" thirdstring="$firststring$secondstring" echo "$thirdstring" The above script will connect the values of firststring and secondstring variables creating a whole new thirdstring. A more advanced example would look like this: #!/bin/bash firststring="The secret is..." firststring+="Bash" echo "$firststring" The script uses the += operator to join the strings. With this method, you can concatenate strings with only one variable. 15. Check if a Number is Even or Odd Odd and even numbers can be easily divided using the if statement and some simple math. Create a file named evenoddnumbers.sh: nano evenoddnumbers.sh The script uses the read command to read user input and divides it by 2. If the answer is 0, the number is even. #!/bin/bash read -p "Enter a number and I will check if its odd or even " mynumber if [ $((mynumber%2)) -eq 0 ] then echo "Your number is even" else echo "Your number is odd." fi 16. Generate Factorial of Number The factorial of a number is the result of all positive descending integers. For example, the factorial of 5 would be 120: 5! = 5*4*3*2*1 = 120 Factorial scrips are very useful for users learning about recursion. Start by creating a .sh file executable: factorial.sh The following script will ask the user to enter a number they want to get the factorial of and use a for loop to calculate it. #!/bin/bash echo Enter the number you want to get factorial for read mynumber factorial=1 for ((i=1;i<=mynumber;i++)) do factorial=$(($factorial*$i)) done echo $factorial The command-line window displaying shell script for getting factorial of a number 17. Create Directories It is effortless to create directories in bash unless you need to create a lot of directories quickly. In the following example, we will use the bash script to create a set of directories with the same subdirectories in each. First, create a file named directories.sh: nano directories.sh Then paste in the following code: #!/bin/bash mkdir -p {Math,English,Geography,Arts}/{notes,examresults,portfolio} The script creates 4 main directories: Math, English, Geography, and Arts. The Notes, examresults, and portfolio subdirectories are also created inside each. If you were to replace the / symbol in the middle with _, the script would look like this: #!/bin/bash mkdir -p {Math,English,Geography,Arts}_{notes,examresults,portfolio} Here’s the output for it displaying a merge of the two directories: A bash script to create a lot of directories quickly. The first bash case statement indicates which interpreter to use #!/bin/bash #Declare string S1 S1="Bash" #Declare string S2 S2="Scripting" if [ $S1 = $S2 ]; then echo "Both Strings are equal" else echo "Strings are NOT equal" fi The following script will check to see if a file exists or not. #!/bin/bash file="./file" if [ -e $file ]; then echo "File exists" else echo "File does not exist" fi The result: $ ./filetesting.sh File does not exist $ touch file $ ./filetesting.sh File exists Similarly for example we can use while loop to check if file does not exist. This script will sleep until file does exist. Note bash negator ! which negates the -e option. #!/bin/bash while [ ! -e myfile ]; do # Sleep until file does exists/is created sleep 1 done Bash Select The select command allows us to prompt the user to make a selection. #!/bin/bash PS3='Choose one word: ' # bash select select word in "linux" "bash" "scripting" "tutorial" do echo "The word you have selected is: $word" # Break, otherwise endless loop break done exit 0 The result: $ ./select.sh 1) linux 2) bash 3) scripting 4) tutorial Choose one word: 2 The word you have selected is: bash Case statement conditional The case statement makes it easy to have many different possibilities, whereas an if statement can get lengthy very quickly if you have more than a few possibilities to account for. #!/bin/bash echo "What is your preferred programming / scripting language" echo "1) bash" echo "2) perl" echo "3) phyton" echo "4) c++" echo "5) I do not know !" read case; #simple case bash structure # note in this case $case is variable and does not have to # be named case this is just an example case $case in 1) echo "You selected bash";; 2) echo "You selected perl";; 3) echo "You selected phyton";; 4) echo "You selected c++";; 5) exit esac The result: $ ./case.sh What is your preferred programming / scripting language 1) bash 2) perl 3) phyton 4) c++ 5) I do not know ! 3 You selected phyton Bash quotes and quotations Quotations and quotes are important part of bash and bash scripting. Here are some bash quotes and quotations basics. Escaping Meta characters Before we start with quotes and quotations we should know something about escaping meta characters. Escaping will suppress a special meaning of meta characters and therefore meta characters will be read by bash literally. To do this we need to use backslash \ character. Example: #!/bin/bash #Declare bash string variable BASH_VAR="Bash Script" # echo variable BASH_VAR echo $BASH_VAR #when meta character such us "$" is escaped with "\" it will be read literally echo \$BASH_VAR # backslash has also special meaning and it can be suppressed with yet another "\" echo "\\" Here’s what it looks like when we execute the script: $ ./escape_meta.sh Bash Script $BASH_VAR \ Single quotes Single quotes in bash will suppress special meaning of every meta characters. Therefore meta characters will be read literally. It is not possible to use another single quote within two single quotes not even if the single quote is escaped by backslash. #!/bin/bash # Declare bash string variable BASH_VAR="Bash Script" # echo variable BASH_VAR echo $BASH_VAR # meta characters special meaning in bash is suppressed when using single quotes echo '$BASH_VAR "$BASH_VAR"' The result: $ ./single_quotes.sh Bash Script $BASH_VAR "$BASH_VAR" Double quotes Double quotes in bash will suppress special meaning of every meta characters except $, \ and `. Any other meta characters will be read literally. It is also possible to use single quote within double quotes. If we need to use double quotes within double quotes bash can read them literally when escaping them with \. Example: #!/bin/bash #Declare bash string variable BASH_VAR="Bash Script" # echo variable BASH_VAR echo $BASH_VAR # meta characters and its special meaning in bash is # suppressed when using double quotes except "$", "\" and "`" echo "It's $BASH_VAR and \"$BASH_VAR\" using backticks: `date`" The result: $ ./double_quotes.sh Bash Script It's Bash Script and "Bash Script" using backticks: Thu 10 Feb 2022 10:24:15 PM EST Bash quoting with ANSI-C style There is also another type of quoting and that is ANSI-C. In this type of quoting characters escaped with \ will gain special meaning according to the ANSI-C standard. \a alert (bell) \b backspace \e an escape character \f form feed \n newline \r carriage return \t horizontal tab \v vertical tab \\ backslash \` single quote \nnn octal value of characters ( see [http://www.asciitable.com/ ASCII table] ) \xnn hexadecimal value of characters ( see [http://www.asciitable.com/ ASCII table] ) One day, a little girl named Lily found a needle in her room. She knew it was difficult to play with it because it was sharp. Lily wanted to share the needle with her mom, so she could sew a button on her shirt. Lily went to her mom and said, "Mom, I found this needle. Can you share it with me and sew my shirt?" Her mom smiled and said, "Yes, Lily, we can share the needle and fix your shirt." Together, they shared the needle and sewed the button on Lily's shirt. It was not difficult for them because they were sharing and helping each other. After they finished, Lily thanked her mom for sharing the needle and fixing her shirt. They both felt happy because they had shared and worked together. <|endoftext|> Once upon a time, there was a little car named Beep. Beep loved to go fast and play in the sun. Beep was a healthy car because he always had good fuel. Good fuel made Beep happy and strong. One day, Beep was driving in the park when he saw a big tree. The tree had many leaves that were falling. Beep liked how the leaves fall and wanted to play with them. Beep drove under the tree and watched the leaves fall on him. He laughed and beeped his horn. Beep played with the falling leaves all day. When it was time to go home, Beep knew he needed more fuel. He went to the fuel place and got more healthy fuel. Now, Beep was ready to go fast and play again the next day. And Beep lived happily ever after. <|endoftext|> One day, a little fish named Fin was swimming near the shore. He saw a big crab and wanted to be friends. "Hi, I am Fin. Do you want to play?" asked the little fish. The crab looked at Fin and said, "No, I don't want to play. I am cold and I don't feel fine." Fin felt sad but wanted to help the crab feel better. He swam away and thought of a plan. He remembered that the sun could make things warm. So, Fin swam to the top of the water and called to the sun, "Please, sun, help my new friend feel fine and not freeze!" The sun heard Fin's call and shone its warm light on the shore. The crab started to feel better and not so cold. He saw Fin and said, "Thank you, little fish, for making me feel fine. I don't feel like I will freeze now. Let's play together!" And so, Fin and the crab played and became good friends. <|endoftext|> Once upon a time, in a land full of trees, there was a little cherry tree. The cherry tree was very sad because it did not have any friends. All the other trees were big and strong, but the cherry tree was small and weak. The cherry tree was envious of the big trees. One day, the cherry tree felt a tickle in its branches. It was a little spring wind. The wind told the cherry tree not to be sad. The wind said, "You are special because you have sweet cherries that everyone loves." The cherry tree started to feel a little better. As time went on, the cherry tree grew more and more cherries. All the animals in the land came to eat the cherries and play under the cherry tree. The cherry tree was happy because it had many friends now. The cherry tree learned that being different can be a good thing. And they all lived happily ever after. <|endoftext|> Once upon a time, there was a little girl named Lily. Lily liked to pretend she was a popular princess. She lived in a big castle with her best friends, a cat and a dog. One day, while playing in the castle, Lily found a big cobweb. The cobweb was in the way of her fun game. She wanted to get rid of it, but she was scared of the spider that lived there. Lily asked her friends, the cat and the dog, to help her. They all worked together to clean the cobweb. The spider was sad, but it found a new home outside. Lily, the cat, and the dog were happy they could play without the cobweb in the way. And they all lived happily ever after. <|endoftext|> Once upon a time, in a big lake, there was a brown kayak. The brown kayak liked to roll in the water all day long. It was very happy when it could roll and splash in the lake. One day, a little boy named Tim came to play with the brown kayak. Tim and the brown kayak rolled in the water together. They laughed and had a lot of fun. The sun was shining, and the water was warm. After a while, it was time for Tim to go home. He said goodbye to the brown kayak and gave it a big hug. The brown kayak was sad to see Tim go, but it knew they would play together again soon. So, the brown kayak kept rolling in the water, waiting for the next fun day with Tim. <|endoftext|> Once upon a time, in a small town, there was a troubled little girl named Lily. She was always sad because she lost her favorite toy, a triangle. She looked everywhere in her house but could not find it. One sunny day, Lily went to the park to play. She saw a big puddle of water and thought her triangle might be there. She put her hand in the water to soak it and looked for her toy. She felt something at the bottom of the puddle. Lily pulled it out and saw that it was her triangle! She was so happy that she found it. From that day on, Lily was never troubled again. She played with her triangle every day and always kept it close to her. And when she saw puddles, she would smile and remember how she found her toy. <|endoftext|> Once upon a time, in a peaceful town, there lived a little boy named Tim. Tim loved to run and play outside. One day, Tim saw a race in the park. He was excited and wanted to join the race. Tim went to his friend, Sarah, and said, "Let's start the race!" Sarah smiled and said, "Yes, let's go!" They lined up with the other kids and waited for the race to begin. When they heard the word "Go!", they started running as fast as they could. Tim and Sarah ran with all their speed, laughing and having fun. They could feel the wind in their hair as they raced to the finish line. In the end, Tim won the race and Sarah came in second. They were both so happy and proud of themselves. They celebrated with their friends and had a great day at the park. <|endoftext|> Once upon a time, there was a clever little dog named Max. Max loved to run and play with his friends in the park. One day, Max was running very fast when he fell and hurt his knee. Max went to his friend, the wise old owl, and said, "Owl, my knee hurts. What can I do?" The owl thought for a moment and said, "Max, you should test your knee. Try to walk slowly and see if it still hurts." So Max tested his knee by walking slowly. At first, it hurt a little, but soon Max felt better. He said, "Thank you, Owl, for your help. Now I can play with my friends again." Max was so happy that he could play with his friends without pain. He learned that sometimes, it was good to slow down and listen to his body. And Max and his friends played happily in the park ever after. <|endoftext|> One day, a fast driver named Tim went for a ride in his loud car. He loved to speed down the street and feel the wind in his hair. As he drove, he saw his friend, Sam, standing by the road. "Hi, Sam!" Tim called out. "Do you want to go for a ride?" "Yes, please!" Sam said, and he got in the car. They drove around the town, going fast and having fun. The car was very loud, and everyone could hear them coming. At last, they stopped at the park to play. They ran and laughed until it was time to go home. Tim and Sam had a great day together, speeding in the loud car and playing in the park. <|endoftext|> Once upon a time, there was a big car named Dependable. He had a very important job. Dependable would take a family to the park every day. The family had a mom, dad, and a little girl named Lily. They all had a lot of love for each other. One day, when they got to the park, they saw a big sign that said, "Fun Race Today!" The family was very excited. They knew that Dependable was very fast and could win the race. So, they decided to join the race. The race started, and Dependable went very fast. The other cars tried to catch up, but Dependable was too quick. In the end, Dependable won the race! The family was so happy and proud of their car. They knew that their love for each other and their trust in Dependable made them win the race. And from that day on, they had even more fun at the park, knowing that they had the fastest and most dependable car around. <|endoftext|> Once upon a time, there was a boy named Tim. He liked to wear a big, dark hat. The hat was his favorite thing to wear. Tim wore the hat everywhere he went. One day, Tim found a pencil on the ground. The pencil was small and yellow. Tim liked the pencil a lot. He put the pencil in his hat and took it with him. Tim drew pictures with the pencil. He drew a sun, a tree, and a cat. Tim was very happy with his new pencil. He wore his dark hat and drew pictures every day. <|endoftext|> One day, a girl named Mia went for a walk. She saw a big, scary house. It had a tall door and small windows. Mia was brave, so she went inside the house. In the house, Mia saw a birdcage. Inside the birdcage, there was a little bird. The bird was sad. It wanted to fly and be free. Mia wanted to help the bird. Mia opened the birdcage door. The bird flew out and was happy. It was not scary anymore. Mia and the bird were friends. They played and had fun all day. <|endoftext|> Once upon a time, in a small house, there lived a little girl named Amy. Amy was very sleepy. She put on her pajamas and went to bed. In the middle of the night, Amy heard a soft sound. She opened her eyes and saw a friendly ghost. The ghost said, "Hello, Amy! I am here to help you." Amy asked the ghost, "Can you help me pick a dream?" The ghost smiled and said, "Of course! Let's pick a happy dream for you." Together, they picked a dream about playing in a big park with lots of friends. Amy said, "Thank you, ghost!" The ghost smiled and said, "You're welcome. Now, go back to sleep and enjoy your dream." Amy closed her eyes, feeling happy and safe with her new friend. And so, Amy had a wonderful dream, thanks to the kind ghost. From that night on, the ghost would always visit Amy and help her pick the best dreams, and they became the best of friends. <|endoftext|> Once upon a time, in a big forest, there was a tiny mushroom. It was all alone. The sun was very harsh, and the mushroom did not like it. It wanted to find a friend to play with and to help it hide from the sun. One day, a little bunny came hopping by. The mushroom called out, "Hello, bunny! Will you be my friend?" The bunny looked at the mushroom and smiled. "Sure, I will be your friend. Let's play together!" The bunny and the mushroom played all day, and they were very happy. As they played, the bunny realized that the mushroom needed help to hide from the harsh sun. So, the bunny dug a hole in the ground and put the mushroom inside. Now, the mushroom was safe and cool. The mushroom and the bunny were the best of friends, and they played in the forest every day. <|endoftext|> Once upon a time, there was a queen. She was a very nice queen. She had a big, pretty castle. The queen had a lot of work to do every day. But today, she wanted to relax. The queen went to the park to relax. She sat on a soft, green grass. The queen saw a bug. The bug was disgusting. The queen did not like the disgusting bug. The queen went back to her castle. She was happy to be away from the disgusting bug. Now, the queen could relax in her big, pretty castle. The queen smiled and had a good day. <|endoftext|> Once upon a time, there was a little white cat named Fluffy. Fluffy loved to play with her best friend, a small boy named Timmy. They played outside in the sun every day. Fluffy liked to chase Timmy, and Timmy liked to run. One day, Timmy learned a new word at school. He wanted to teach Fluffy the word too. Timmy said, "Fluffy, the word is 'repeat'. Can you say 'repeat'?" Fluffy looked at Timmy and said, "Meow." Timmy laughed and said, "No, Fluffy, say 'repeat'." Fluffy tried again and said, "Meow-peat." Timmy clapped his hands and said, "Good job, Fluffy! You said the word!" Fluffy was very happy. She liked learning new words with Timmy. From that day on, Fluffy and Timmy played a game where they would teach each other new words. They had lots of fun together, and they lived happily ever after. <|endoftext|> Once upon a time, there was a big octopus. He lived in the deep blue sea. He had a friend, a reliable fish. They played together every day. One day, the octopus and the fish found a big jug. They wanted to pour water on their friends for fun. But they couldn't agree on who would pour the water. The octopus said, "I want to pour the water!" The fish said, "No, I want to pour the water!" They were not happy. Then, the octopus had an idea. He said, "Let's both pour the water!" The fish liked the idea. They picked up the big jug together and poured water on all their friends. Everyone laughed and had fun. The octopus and the fish were happy again. They learned to share and play together. And they lived happily ever after. <|endoftext|> One day, a silly cat named Tom found a hoop in the yard. He wanted to play with it, but it was too big. Tom thought very hard about how to make the hoop smaller. Tom had an idea. He would stretch the hoop to make it smaller. He put his paws on the hoop and pulled as hard as he could. The hoop started to stretch! It got smaller and smaller. Now, the hoop was just the right size for Tom to play with. He jumped through the hoop and chased it around the yard. Tom had so much fun playing with his new toy. And that is the story of the silly cat and the hoop. <|endoftext|> Once upon a time, there was a polite crab. The crab lived in the sea. The crab had many friends. One day, the crab met a new friend. The new friend did not know how to play. The crab wanted to help the new friend. The polite crab showed the new friend how to play. They played all day. They had lots of fun. The new friend was happy. The polite crab was happy too. They were best friends forever. <|endoftext|> Once, there was a boy named Tim. Tim liked to fish. He had a long pole to catch fish. One day, his friend Sam came to play. Sam saw the pole and asked, "Can you lend me your pole?" Tim said, "Yes, but be careful!" Sam took the pole and went to the river. He tried to catch a fish. He saw a big, yummy fish. He wanted to catch it. He pulled the pole very hard. But the pole broke! Sam felt sad. Sam went back to Tim with the broken pole. He said, "I am sorry, I broke your pole." Tim was very sad. Now, he could not catch yummy fish. They both learned to be more careful with their things. <|endoftext|> Once upon a time, in a small house, there lived a boy named Tim. Tim was a selfish boy. He did not like to share his things with others. One day, his mom brought home a big bag of vegetables. She wanted to explain to Tim why it was important to share. "Tim," said Mom, "we need to share these vegetables with our neighbors. It is not good to be selfish." Tim did not want to share the vegetables. He wanted to keep them all for himself. But Mom told him, "If you share, you will make others happy." Tim thought about it and then said, "No, I don't want to share." So, he took the vegetables and hid them in his room. The neighbors were sad because they had no food to eat. They knocked on Tim's door and asked if he had any food to share. Tim did not want to share, so he said no. That night, Tim ate all the vegetables by himself. He felt very full and sick. He wished he had listened to his mom and shared with the neighbors. But now, it was too late. The vegetables were gone, and Tim felt very bad. <|endoftext|> Once upon a time, there was a girl named Sue. Sue had long hair that would remind her of a rainbow. She would play with her hair all day. One day, Sue saw a slow snail in her garden. The snail had a pretty shell. Sue wanted to be friends with the snail. She named the snail Sam. Sue and Sam played together every day. They would race, but Sam was always slow. Sue would laugh and clap her hands. Sue and Sam were very happy. <|endoftext|> Once upon a time, there was a helpful girl named Lily. She loved to read books and spend time with her friends. One day, she found a new book at school. The book was about a kind bear who helped everyone in the forest. Lily read the book to her friends. They all liked the story. They wanted to be like the kind bear in the book. So, they decided to help others too. They helped their teacher clean the classroom. They also helped their friends when they fell down or needed a friend to play with. As they spent more time being helpful, Lily and her friends felt happy. They learned that being kind and helpful to others made them happy too. The moral of the story is to be kind and helpful, just like the kind bear in the book. <|endoftext|> Once upon a time, there was a little boy named Tim. Tim wanted to build something special for his mom's birthday. He thought and thought about what to make. Then, he had an idea! He would build a big present for her. Tim was worried. He didn't know if he could build the present all by himself. He asked his dad for help. Together, they found some big boxes, pretty paper, and a big bow. They worked together to make the present look nice. When Tim's mom saw the present, she was so happy! She gave Tim a big hug and thanked him for the special gift. Tim felt proud that he could build something so nice for his mom. And he was no longer worried. <|endoftext|> One day, a big whale was swimming in the deep blue sea. The whale was very mysterious. It had a big smile on its face and liked to play with the little fish. The mysterious whale loved to relax in the warm water. It would lay on its back and let the waves rock it like a baby. The little fish would swim around the whale, and they all felt happy and safe. One day, the mysterious whale and the little fish found a beautiful place to relax. It was a quiet spot with lots of colorful plants and pretty shells. They all had a fun day, playing and relaxing together in their new secret place. <|endoftext|> Once upon a time, there was a smelly old tree. By the tree, there was a big hole. In the hole, there was a shiny coin. A boy named Tim saw the coin and wanted it. Tim said to his friend, "I want that coin, but the tree is smelly and rot." His friend said, "Be brave, Tim! You can get the coin." So, Tim went to the smelly tree and tried to get the coin from the hole. As Tim got closer to the hole, he saw a little mouse. The mouse said, "I will help you get the coin, but you must help me too." Tim agreed, and they got the coin together. Tim was happy, and the mouse was happy too. And they both learned that even in smelly places, good things can happen. <|endoftext|> Once upon a time, there was a little boy named Tim. Tim loved going to the park to play. One day, Tim went to the park with his mom and dad. He was very happy. At the park, Tim saw a big tree. He wanted to give the tree a hug. So, he hugged the tree and felt good. Tim liked the tree a lot. He played with his ball, ran around, and had a lot of fun. Tim had a successful day at the park. He played and laughed a lot. When it was time to go home, Tim felt tired but happy. He couldn't wait to come back to the park again. <|endoftext|> One sunny day, a pretty boat was on the water. The boat was red and blue. A girl named Lily and her dog, Spot, were on the boat. They liked to play and have fun together. Lily saw a big fish jump out of the water. She said, "Wow, Spot! Did you see that big fish?" Spot barked and wagged his tail. They both laughed and clapped their hands. Lily picked up a hose and started to spray water. She sprayed the water on the boat and on Spot. Spot jumped and barked, trying to catch the water. They played and sprayed water until the sun went down. Then, they went home, happy and wet. <|endoftext|> Once upon a time, there was a girl named Lily. She had a flute that she loved to play. One day, she met a deaf cat who could not hear her play the flute. Lily wanted to help the cat hear her music. Lily had an idea. She would stretch a big string from her flute to the cat's ear. The cat could feel the music through the string. The cat was happy and started to dance. Lily and the deaf cat became best friends. They played and danced together every day. The cat loved to feel the music from Lily's flute. They were happy and had lots of fun. <|endoftext|> Once upon a time, there was a boy named Tom. He loved gum. One day, he found a thin piece of gum on the ground. He thought it was very special. He put the gum in his pocket to save it for later. Tom went to play with his friend, Sam. They played a game where they had to escape from a pretend monster. They ran and hid, but the monster always found them. Tom felt scared, but he remembered his special gum. He thought it could help them win the game. Tom took out the thin gum and shared it with Sam. They both chewed the gum and started to run from the monster again. But this time, they did not escape. The gum made them feel sick and slow. The monster caught them, and they lost the game. Tom and Sam were very sad. They learned never to pick up gum from the ground again. <|endoftext|> Once upon a time, there was a little boy named Tim. Tim had a favorite vest that he loved to wear. It was a pretty vest with many colors. He wore it all the time. One day, it started to rain when Tim was playing outside. The rain made Tim and his vest very wet. Tim did not like being wet, so he went back inside his house. His mom saw his wet vest and told him to take it off. Tim took off his wet vest and started to weep. He was sad because his favorite vest was wet. His mom saw him weep and hugged him. She told him not to worry, she would dry the vest. Tim felt better and played with his toys while he waited for his vest to dry. <|endoftext|> Once upon a time, there was a little boat. The boat was blue and it liked to float on the water. One day, the sun was very hot and the water began to dry up. The boat was sad because it could not float anymore. A bird saw the boat and asked, "Why are you sad, little boat?" The boat said, "The water is dry and I cannot float. I miss the water." The bird wanted to help the boat, so it thought of an easy plan. The bird told the boat, "I will find more water for you. Then you can float again!" The boat was happy and thanked the bird. The bird flew away and soon found a big pond. It came back and told the boat about the pond. Together, the bird and the boat went to the big pond. The boat was able to float again and it was very happy. The bird and the boat played together in the water all day long. And they became the best of friends. <|endoftext|> Once upon a time, there was an old lady who lived in a small house. She loved to mix things in her big pot. One day, she decided to mix some yummy soup for her lunch. As she mixed the soup, she saw some smoke come out of her pot. She knew that meant the soup was very hot. The old lady was very careful not to touch the smoke or the pot. She let the soup cool down and then she ate it. The old lady thought it was the best soup she ever had. She was very happy and full. From that day on, she always mixed yummy soup for her lunch. <|endoftext|> Once upon a time, there was a little boy named Tim. Tim was very nervous. He had lost his toy razor. He loved to pretend to shave like his dad. Every day, he would play with his toy razor. But now, it was gone. One day, Tim went to the park with his mom. He thought maybe he left his toy razor there. He looked and looked, but he could not find it. Tim was very sad. He missed his toy razor so much. He wanted to find it and play with it again. Then, Tim saw a girl playing with a toy. He looked closer and recognized it. It was his toy razor! Tim was so happy. He went to the girl and told her that it was his toy. The girl was nice and gave it back to him. After that, Tim was not nervous anymore. He had his toy razor back and could play with it again. And they all lived happily ever after. <|endoftext|> Once upon a time, there was a big gray elephant named Elly. Elly was sad because she thought she was ugly. She had big ears and a long nose, and she felt different from the other animals. One day, a little bird named Benny flew to Elly. Benny saw that Elly was sad and asked, "Why are you sad, Elly?" Elly told Benny that she felt ugly and did not like her big ears and long nose. Benny looked at Elly and said, "I think you are not ugly. You are special." Benny promised to show Elly how her big ears and long nose made her special. They went to the river, and Benny asked Elly to use her long nose to spray water on the dry plants. Elly did and the plants grew happy and green. Then, Benny asked Elly to use her big ears to fan the hot animals. Elly did, and all the animals felt cool and happy. Elly learned that being different was not ugly. She was special and had her own way to help others. Elly and Benny became best friends, and they lived happily ever after. <|endoftext|> Once upon a time, there was a little dog named Zigzag. Zigzag loved to run and play in the park. One day, Zigzag saw a big twisty slide. He wanted to try it, so he ran up to the slide. Zigzag twisted and turned as he went down the slide. He went so fast that he fell off at the end. He felt embarrassed because all his friends saw him fall. But his friends did not laugh at him. They ran to help Zigzag get up. Zigzag's friends told him not to be embarrassed. They all tried the twisty slide, too. They all twisted and turned, just like Zigzag. They had so much fun playing together. And Zigzag learned that it's okay to make mistakes, as long as you have good friends by your side. <|endoftext|> Once upon a time, in a small house, there was a cat and a dog. They liked to play all day. One day, they saw a shiny chain on the floor. They both wanted it. The cat had an idea. She rubbed her head on the dog's leg. The dog felt happy and closed his eyes. The cat took the chain and ran away. The dog felt sad and guilty. Later, the cat felt bad. She went back to the dog and gave him the chain. They both played with the chain and were happy friends again. <|endoftext|> One day, a little boy named Tim went to play outside. He saw a big box near the tree. Tim was very curious. He wanted to know what was inside. So, he went closer to the box and took a peek. Inside the box, Tim found a toy gun. He was so happy! He picked up the gun and started to play with it. He pretended to be a superhero, saving the world from bad guys. Tim ran around the yard, laughing and having fun. After playing for a while, Tim started to feel hungry. He went back to his house and saw his mom in the kitchen. She had made some yummy cookies for him. Tim ate the cookies and told his mom about the toy gun and his adventures. His mom smiled and gave him a big hug. <|endoftext|> One day, a boy named Tim found a big hammer in his toy box. He took the hammer and went to play in the deep mud outside. While he was playing, he saw a little bug stuck in the mud. "Help me, please!" said the bug. Tim wanted to help, but he didn't want to delay his playtime. The bug looked very sad, so Tim decided to help. Tim used his big hammer to make a path in the mud. The bug was able to crawl out and said, "Thank you, Tim!" Tim felt happy that he helped the bug. After that, he continued playing with his hammer, but now he also had a new friend to play with. <|endoftext|> Once upon a time, in a small house, there was a big box. The box was empty. A little boy named Tim wanted to find something to put in the box. He started to search his room. Tim looked under his bed and found a soft toy. He pushed the toy into the box. Next, he searched in his closet and found a ball. He pushed the ball into the box too. Tim was happy to see his box filling up. After a while, the box was full. Tim felt proud of his search. He showed his mom and dad the full box. They smiled and clapped. Tim had turned the empty box into a box filled with fun things. <|endoftext|> Once upon a time, in a big, green park, there was a small, messy dog named Binky. Binky had a long, waggy tail and loved to play with his friends. One sunny day, Binky and his friends were playing catch with a big, red ball. As they played, Binky's tail got caught in a bush. "Ouch!" he cried. Binky's friends heard him cry and came running to help. "What's wrong, Binky?" asked his friend, a cute, fluffy bunny named Lulu. "My tail is stuck!" Binky said with a sad face. Lulu and the other friends tried to help Binky get his tail out of the bush. They pulled and pulled, but it was still stuck. Then, a wise, old owl named Oliver flew down from a tall tree. "Don't cry, Binky," he said. "I can help you get your tail out." Oliver used his sharp beak to carefully cut the bush and free Binky's tail. Binky was so happy! He wagged his tail and said, "Thank you, Oliver!" All the friends cheered and clapped. Then, they went back to playing with the big, red ball, laughing and having fun together. <|endoftext|> Once upon a time, in a small town, there was a little boy named Tim. Tim loved to speak and play with his friends. One day, Tim found a big, pink gum on the ground. It looked amazing. Tim picked it up and put it in his pocket. He thought, "I will show this to my friends later." Tim went to the park to play with his friends. He saw them playing and running. Tim took the gum out of his pocket and showed it to his friends. They all wanted to see the amazing gum. Tim told them, "I found it on the ground. It looks amazing, right?" His friends nodded and smiled. Later, Tim and his friends sat under a big tree. They all looked at the gum and talked about how amazing it was. Then, they decided to share the gum. They broke it into small pieces and each took a piece. They chewed the gum and it was very yummy. They all laughed and spoke about how great the gum was. Tim was happy that he found the amazing gum and could share it with his friends. <|endoftext|> Once upon a time, there was a little boy named Tim. Tim loved pumpkins. He loved their round shape and bright orange color. One day, Tim saw a small pumpkin in the garden. It was not clear if the pumpkin was ready to be picked. Tim asked his mom, "Can I receive this pumpkin, please?" His mom looked at the pumpkin and said, "It is not ready yet. You must wait for it to grow bigger." Tim waited and watched the pumpkin grow. As it grew, he learned to be patient. He knew that good things come to those who wait. Finally, the day came when the pumpkin was big and ready to be picked. Tim's mom said, "Now you can receive the pumpkin, Tim." Tim was so happy! He had waited and now he had a big, beautiful pumpkin. The moral of the story is that patience is a good thing. When we wait for the right time, we can receive the best things in life. <|endoftext|> Once upon a time, there was a little girl named Lily. She lived in a small house with her mom and dad. One day, her mom asked her to go to the park and play. Lily was very happy and ran to the park. At the park, Lily saw a wide tree. She went to the tree and saw a faucet. She turned the faucet and water came out. Lily was thirsty, so she drank some water. Then, she saw a little boy who was also thirsty. Lily said, "Hi, I am Lily. Let's be friends!" The little boy smiled and said, "Hi, I am Tom. Nice to meet you!" They both drank water and played together. Lily and Tom played and had fun all day. They learned that it is good to share and help others. When they went home, they told their moms and dads about their new friend. Lily and Tom were happy because they learned that sharing and helping others makes everyone happy. <|endoftext|> Once upon a time, there was a little flower named Bloom. Bloom lived in a big garden with many other flowers. Bloom had a goal to be the most beautiful flower in the garden. One sunny day, Bloom saw a dangerous bug coming near the flowers. Bloom was scared and said to the other flowers, "Watch out! Dangerous bug is coming!" The other flowers thanked Bloom for the warning, and they all hid from the bug. After the bug left, the flowers were safe and happy. Because Bloom warned them, they all agreed that Bloom was the most beautiful flower in the garden. Bloom's goal came true, and they all lived happily ever after. <|endoftext|> Once upon a time, in a small town, there lived a humble girl named Lily. She loved to give and help others. One day, she saw an old lady who looked sad. Lily went to the lady and said, "Why are you sad?" The old lady said, "I am hungry, and I have no food." Lily wanted to help her, so she ran home to get some food. Lily put some food on a plate and went back to the old lady. She gave the plate to the lady and said, "Here, eat this." The old lady smiled and said, "Thank you, Lily. You are very kind." The old lady was happy, and Lily felt good that she could help. From that day on, Lily always looked for ways to help others and share what she had. And everyone in the town loved the humble girl who loved to give. <|endoftext|> Once upon a time, there was a little girl named Sue. Sue had a big bedroom with fancy things in it. She loved her room very much. One day, she saw a small flower in her room. The flower was trying to bloom. Sue said to the flower, "Hello, little flower! Why are you trying to bloom in my bedroom?" The flower said, "I want to be a fancy flower in your room." Sue liked the idea, but she knew that flowers needed sun and water to grow. Sue tried to help the flower. She gave it water and put it near the window. But the flower did not get enough sun. It tried very hard to bloom, but it could not. The flower became sad and said, "I am sorry, Sue. I cannot be a fancy flower in your room." In the end, the flower did not bloom. It stayed small and sad. Sue felt bad for the flower. She wished she could help it more. But she knew that flowers needed sun and water to grow, and her bedroom was not the best place for a flower to live. <|endoftext|> Once upon a time, there was a little infant named Tim. He liked to play with his toys and watch the birds outside his window. Tim had a big, soft teddy bear that he loved very much. One day, Tim's teddy bear was sad. Tim did not know why his teddy bear was sad. He tried to make his teddy bear happy by giving it a hug and a kiss. Tim decided to take his sad teddy bear outside to watch the birds with him. They sat under a big tree and watched the birds sing and fly. Soon, the teddy bear was not sad anymore. Tim and his teddy bear were very happy watching the birds together. <|endoftext|> Once upon a time, in a small town, there was a little boy named Tim. Tim loved ice-cream so much. One day, he saw an ancient ice-cream truck. The truck was very old and slow, but it had a big sign that said "Ice-Cream". Tim went to the truck and said, "Hi, can I have ice-cream, please?" The ice-cream man looked at him and said, "Sure, little boy. Here you go." Tim took the ice-cream and started to eat it. But it did not taste good at all. It tasted very bad. Tim screamed, "Yuck! This ice-cream is bad!" The ice-cream man just laughed and said, "I am sorry, little boy. The ice-cream is too old." Tim was very sad and walked away. He did not get to enjoy his ice-cream that day. <|endoftext|> Once upon a time, there were two best friends, Joe and Grace. They were always playing together and having so much fun. One day, Joe and Grace decided to go to the town's marketplace. When they got there, they saw a vendor with lots of colorful balloons. Joe wanted one so badly, but he didn't have enough money. Grace saw how sad Joe was and wanted to help. She asked her mom to bring some money so Joe could buy a balloon. When Grace's mom arrived she saw that Joe wanted a deep red balloon. Joe was so relieved to be able to buy it after his friend helped him. Grace said to Joe, "Remember, if you help a friend in need, you will always be rewarded!" Joe and Grace smiled and hugged each other, walked away with the deep red balloon, proud of the lesson they had learnt. <|endoftext|> Once there was a graceful bird called Billy. He was always looking for something to do. One day he decided to try something new. He wanted to weigh himself with a spoon. Billy gathered his spoon and measured himself. He found that he was very light! He was happy with his weight and wanted to celebrate. So he started to dance in the sky. His graceful moves caused even the clouds to watch. He spread his wings and flew higher, higher and higher until he was just a dot in the sky. Billy went flying around the world. Then, one by one he started to pick up all the things he had weighed with the spoon. In the end, Billy was still the lightest and most graceful of them all! <|endoftext|> Once upon a time there were two friends, Jack and Jill. Jack and Jill went up the hill to play a game. The game was silly. Jack and Jill took turns pushing a big button. Every time they pushed the button they would separate. Jack shouted: "Let's try again!" So they took turns pushing the button again. This time the button spun them around and around until they were dizzy. Jill giggled and said: "That was so silly!" Jack laughed and said: "Let's try the button one more time!" So they pressed the button again and this time it sent them soaring high into the sky! Jack and Jill flew around, but eventually the button sent them back down to the ground. They were safe and sound, but something was different this time. Jack and Jill were no longer together. The button had separated them! But it was all worth it in the end, because a silly game can bring people together in the most unexpected of ways. <|endoftext|> Once upon a time, there was a boy who loved to climb. One day, he decided to climb to the top of a mountain to get a better view. When he reached the peak, he saw a lake below him. It looked so inviting, so he decided to climb back down to the lake. As soon as the boy got to the lake, he noticed a boat on the shore. He asked the boat, "Are you available?" The boat replied, "Yes, I am available for you to use." The boy was so excited! He couldn't wait to jump into the boat and go for a ride on the lake. The boy took the boat out on the lake and had a wonderful time. But when he finished his ride, he noticed a sign near the shore. It said, "Take care of the boat; treat it with respect". The boy realized that it was not just available, it had been given to him to use with respect. The moral of the story is that when given something, it should be treated with gratitude and respect. We should never take things for granted. <|endoftext|> Once, there was a girl. She had a garage. Inside the garage she kept her toys. One day, the girl noticed something was wrong with her toys. She went in the garage and saw that they had broken. She decided she would repair them and make them as good as new. She made sure to wash them all so they were nice and healthy. Then she took some glue and fixed all the toys until they looked perfect. She was very pleased with her work. When she was done, the girl could play with her toys again and have lots of fun. She was very happy. <|endoftext|> Mommy and Emily were playing a matching game together. Emily was so excited to find the matching games at the store. She liked watching the videos on the screen as she matched each card. "Mommy, I think I'm getting really good at this!" Emily said. "That's wonderful, sweetheart!" Mommy replied. "You're doing so well!" But then, Emily noticed something strange. She pulled out one of the cards and looked closely at it. "Mommy, this card isn't real," she said. "It's fake!" Mommy took the card and looked at it. "You're right," she said. "This card is fake. It doesn't match the others." Mommy and Emily decided to get a new video game instead. Emily was happy to have an even better game to play. She could tell the difference between a real card and a fake one. <|endoftext|> Once there was a little girl called Mia who loved to jump. Everywhere she went, she jumped. When walking to school, she would jump on the sidewalk. At the park, she would jump into the sandbox. One day Mia was at the supermarket and she saw something unusual. She saw a lawyer. Mia had never seen a lawyer before so it made her very curious. She wanted to know what a lawyer did and why he was so dressed up. So, Mia jumped right up to the lawyer and asked him. The lawyer was very confused. He had never seen a little girl so eager to talk to him. He tried to explain but Mia kept on jumping and interrupting. Soon enough the store manager got involved. He explained to Mia that it was not appropriate to engage with strangers and it was wrong to interrupt people when they were talking. Mia was very sorry for her behaviour and decided to never do something like this again. She had learned her lesson that it is important to be respectful to all strangers. <|endoftext|> Once there was a girl named Lucy. She was three years old and she loved gum. She had lots of different flavours and she ate it every day. One day Lucy thought it would be fun to try extra big bubblegum. She put it in her mouth and blew a huge bubble. Suddenly, the bubble popped and tickled her nose. She started to sneeze and sneeze. Lucy looked down and saw her shirt was covered in gum. She was so ashamed. She wanted to hide but couldn't. So she asked for help from her parents. They showed her how to use a wet cloth to wipe the gum away. She smiled with relief and promised never to try big bubblegum again. <|endoftext|> Once, there was a small boy named Charlie. Charlie loved stories more than anything else. Charlie's mommy always said that stories were special and delicate. One day, Charlie's mommy said "Let's go to the store and get something special for dinner. Today, you can have whatever you want to eat!" Charlie was so excited! He wondered what he should pick. As they walked through the store, Charlie reached out and touched a strawberry. He asked his mommy, "What does this taste like?" His mommy replied, "Oh, it's very sweet! If you taste it, you'll love it!" Charlie was so excited! He couldn't wait to get home and have his special dinner. When they arrived home, Charlie couldn't believe his eyes. On the table was a plate full of fresh strawberries! He smiled and said, "Mommy, did you know strawberries were my favorite?" His mommy smiled and said, "I had a feeling you would like them! Go ahead and taste them, they are so delicate and sweet." Charlie picked one up, took a bite, and smiled. He had experienced the special and delightful taste of a strawberry. What a delicious dinner! <|endoftext|> Once upon a time, there was a little girl named Cindy. Every day, Cindy would go to the store to get milk for her family. She loved the store and was always greeted by the friendly shopkeeper. One day when Cindy was at the store, she noticed something strange: the shelves were all empty! She asked the shopkeeper why the shelves were empty. "It's too hard for you to understand," the shopkeeper said. Cindy wasn't happy about this. But she had to trust the shopkeeper. So, she said goodbye and went home. When Cindy told her family the news they didn't recognize the problem. But then they noticed something even more strange: the milk was gone too! The family soon realized what had happened: the shopkeeper had been preparing for a snowstorm and had run out of milk. They were relieved that the shopkeeper had already taken care of the problem. Cindy was happy that she had recognized the problem. Next time, she would know that she shouldn't leave getting milk too late. <|endoftext|> Jack was feeling a bit sad. He wanted some wine but he didn't have any. He walked up to a store and asked the shopkeeper, "Do you have any wine?" The shopkeeper replied, "Yes, I have some. It's bad though. Are you sure you want it?" Jack thought for a moment then said, "Yes, I will take it." The shopkeeper counted out two bottles of wine and handed them to Jack. Jack thanked the shopkeeper and went home. When Jack got home he opened a bottle of the bad wine and took a sip - it tasted horrible! He thought to himself, "Maybe I should have asked for something else!" <|endoftext|> Once upon a time, there was a little girl named Annie. She was only three years old but she was full of energy and liked to explore. One day, she was walking in the forest and came across a clearing. In the middle of the clearing was an arrow. Annie was nosy and wanted to take a closer look. She walked up to the arrow and suddenly a voice shouted at her from behind, “Be careful not to touch it!” Annie jumped back in fright and saw an old man. The old man said, “My name is Wilbur and I was just minding my own business when I saw you walking towards the arrow. I was worried that you may get injured, so I shouted.” Annie smiled and said, “Thank you Wilbur, I will mind your advice." Wilbur smiled back and replied, “That’s very wise young lady. Now why don’t we just run away and leave the arrow in peace?” And so, Annie and Wilbur ran away. Annie learned that even if you are nosy, it is important to follow the advice of others and mind what you are doing. <|endoftext|> Once upon a time, there was a little girl who loved fashion. She spent all of her time imagining what it would be like to have the perfect outfit for her. Every day, she would go searching for new clothes that she could wear. One day, she found the most perfect dress. It was her favourite colour, and it fit her perfectly. She was so excited, she decided to wear it that same day. When she got to school, all the other students crowded around to admire her dress. She was so proud and happy. She knew that it was the best choice she had ever made. But then her teacher told her she couldn't wear it. The dress was too fancy, too 'fit' for school. She felt so sad and embarrassed. Tears ran down her face, and she had to go home without her perfect dress. The little girl was never able to wear her dress again. She still remembers it with sadness. She never imagined it would end this way. <|endoftext|> Once there were two friends named Bob and Sam. They were playing together in the garden one day. Sam picked a flower and then pointed to a black bird in a tree. "What's that?" he asked Bob. Bob smiled and said, "That's a Crow. Listen, what sound does it make?" Suddenly, the crow made a loud sound that sounded like "Caw, Caw!" "That's a Caw," Bob smiled. Sam laughed and said, "I think I should pick a better word next time!" Bob smiled and nodded. "That's a good idea. We should always pick the right word to use when we talk to each other." The moral of the story is that it is important to choose the right words when you talk to your friends. Being thoughtful and using kind words can help keep friendships strong. <|endoftext|> One night, two brave animals were walking through a dark forest. The first animal was a big, strong bear. The second animal was a small, alert owl. The owl said, "The trees are so dark here. I can barely see!" The bear said, "Don't be scared, little owl. I'm here with you." The owl said, "Thank you, bear. I feel safer with you here." Suddenly, they heard a loud noise. The bear started to tremble. He said, "Let's leave this place! Quickly!" The owl got alert and flapped its wings. Together, they ran through the forest until they emerged into the night sky, safe and sound. The bear hugged the owl and said, "We did it! We made it out of there together." The owl smiled and said, "Yes, we did." The two animals laughed happily. From then on, they were the best of friends. <|endoftext|> Once upon a time there was a kitty who liked to play with a special brush. Each day, the kitty would lend the brush to a friend in the park. Every day, the kitty was so careless with the brush that it got lost. One day, the kitty was playing in the park when it saw its special brush with a rabbit. The kitty asked the rabbit if he could lend the brush. The rabbit said, "If you want the brush back, then you must be careful and not let it get lost again!" The kitty agreed and happily went off with the brush. The kitty was very careful with the brush from then on. In fact, the kitty was so careful that it never lost the brush again. Everyone in the park was happy to hear this and the kitty lived happily ever after. <|endoftext|> Once, there was a little girl named Ella. She was very excited, because today was a very special day. Ella grabbed her toys and her backpack. Then, she stepped out of her house and started walking. Ella followed the pathway until she reached a big, red stove in the middle of the forest. It was very unique! Ella looked around and saw nobody. Ella stepped closer to the stove and asked, "Who are you?". Suddenly, out of nowhere, Ella heard a voice. It was coming from the stove. It said, "I'm a magical stove! I can grant you three wishes!". Ella was baffled. But she was also excited about her wishes. She thought for a short moment and made her wishes. The magical stove granted all of Ella's wishes in an instant. Ella was so happy. She thanked the magical stove and stepped back, returning to her home. From that moment on, Ella was sure that her wishes would come true. She knew that she had met something very unique that day. <|endoftext|> Once upon a time, there was a caterpillar called Bill. He had 8 small legs and loved exploring in the garden. One day, Bill was walking around when he heard a noise in the bushes. Curious, he crept closer to take a look. Suddenly, a big, tough frog jumped out from the bushes. Bill was so scared, he blinked his eyes and scurried away. The frog bellowed "Where are you going? Don't be a scaredy-cat!" It made Bill feel better as he stopped and said shyly, "I'm sorry, I thought you were scary." The frog smiled and said, "There's nothing wrong with being scared, just always be brave and face your fear. Everyone gets scared sometimes." Bill smiled back, thanked the frog, and continued his adventure. He soon realized that sometimes, being brave and facing tough things can be quiet rewarding. From that day forth, Bill always remembered the frog's advice and faced his fear, no matter how tough it seemed. <|endoftext|> Once upon a time, there was a baby who wanted to pick something special. He went to a shop and saw an ancient case. He picked it up and looked inside. It was full of unbelievably shiny gems and jewels. He couldn't believe his eyes. He was so excited and he knew this case was perfect. He quickly picked it up and wrapped it up with a big red bow. He smiled and couldn't wait to show his mum and dad. He rushed home and when they saw the case they were so surprised. He was so proud and he knew this case was very special. He kept it on his shelf for all to see. Everyone was so amazed by the ancient case. <|endoftext|> Once there was a naughty little girl. She was very naughty and always misbehaving. One day she do something very naughty. She took her daddy’s tie and put it in the dirt. It began to rot away in the soil. The little girl felt very bad about what she’d done, but it was too late. The tie was ruined and couldn’t be fixed. The little girl’s daddy was very sad. He had worked very hard to buy that tie, and now it was gone. The little girl knew she had done something wrong and she was sorry. The daddy gave the little girl a big, big hug and said it was alright. He said he still loved her and that she must never do such a naughty thing again. The little girl was very happy and promised to never do anything naughty again. And with that, the tie was forgotten and the little girl was happy once more. <|endoftext|> Jim was very frightened when he arrived at the barber's shop. It was his first time getting a haircut! He didn't want his mum to leave him alone with the strange man. "Don't worry," said the barber. He smiled and handed Jim a big lollipop. "I'll look after you and give you the best haircut ever." Jim's frown disappeared and he couldn't help but be excited. The barber put a cape around him, and the chair felt like a magic carpet ride. Soon, Jim felt his hair being trimmed, and the barber even gave him some funny glasses to look through. When Jim looked in the mirror, he saw the best haircut ever! He was so happy, he forgot all about being scared. Mum smiled when she saw Jim. She was so proud of him for sitting so still for such a long time. "Well done, my boy!" she said, giving him a big hug. Jim smiled and couldn't wait to show his friends his new haircut. <|endoftext|> One cold winter day, Tilly was outside helping in the garden. She grabbed a rake and started cleaning up the leaves on the ground. She held the rake in front of her and carefully balanced the leaves. The ground was icy so Tilly took some small steps to steady herself. Tilly carefully moved the rake back and forth against the ground, pushing the leaves into a pile. She smiled as the pile grew bigger. She even found some shiny objects under the leaves. When she was finished, Tilly stood back and admired her work. The ground was so clean and tidy. Tilly was so proud of herself. She gave herself a big hug to celebrate. Tilly grabbed her rake, feeling warm and happy inside. She had done an amazing job with the rake and was super proud of herself. <|endoftext|> Once upon a time there was an adorable little rabbit. His mommy told him to rake the leaves in the garden. So he raked and raked but it was a lot of work and he got tired very quickly. His daddy saw him struggling and decided to help him. He took the rake and together they finished raking the garden in no time. After they finished, his daddy said to him, "Helping each other can make chores seem like less of a chore. It's so much nicer to do them together, isn't it?". The adorable little rabbit nodded and smiled in agreement. Then his mommy asked him to wipe the table and the two of them wiped it together. In the end, the little rabbit learned a valuable lesson: when you have big tasks ahead of you, it's okay to ask for help. Working together makes chores much easier! <|endoftext|> Once upon a time there was a brother and sister who loved to play together. One day they went to the park and saw the most interesting mug. It was big, colourful and looked like it belonged to a magical creature. The brother was very tempted to steal it but the sister was obedient and wouldn't let him. The brother said "Come on, just take it! It'll be fun!" The sister replied firmly "No! That would be wrong, stealing is not allowed!" Eventually, the brother listened to his sister and put the mug back. Both of them were glad that they had been obedient and followed the rules. After that, they ran off and played their favourite game. The End. <|endoftext|> Once upon a time, there was a tall fox who lived in the forest. She was very curious, and every day she liked to study the forest animals. One day, she asked a rabbit who was hopping by, "Do you know what I study every day?" The rabbit looked up and said, "No, I don't know, what do you study?". The fox replied, "I like to study the animals that live in the forest. I like to find out how they live and what they do." The rabbit said, "That sounds very interesting! I wish I could study too." The fox smiled and said, "You can. Just come with me tomorrow, and I will show you how to study the animals in the forest". The rabbit was very happy and the next day they both went off together to study the animals in the forest. They had lots of fun, and they both learnt a lot. <|endoftext|> Once upon a time there was a modest lake in the middle of the forest. All the animals around were waiting to welcome a new visitor. One day, a little 3 year old girl arrived at the lake. The animals were so excited to see a human for the first time! The squirrel welcomed her with a friendly “hi” and the deer said “hello”. The little girl was so happy to meet the animals and she replied “hi! It’s so nice to meet you!” The little girl roamed around the lake and animals went with her. She laughed and made so many friends. All the animals were so happy that she came to visit the modest lake. They spent a lovely day together playing and exploring the lake. In the end, they all said goodbye and the little girl said “Thank you so much for welcoming me! I had so much fun!”. And with that, she waved goodbye and continued her journey. <|endoftext|> One day, Jane and her daddy were at the park. Jane saw something very special - a big green tree with green powder around it. Jane walked closer to the tree and saw that the powder was made of tiny green pieces. "What is that Daddy?" Jane asked. "That's special powder, Jane," her daddy replied. "Let's gather some of it together and take it home with us." So Jane and her daddy started gathering the powder into a bucket. They filled the bucket up with the powder and started walking home. When they got home, Daddy asked Jane what she wanted to do with the green powder. "Let's make a special cake with it," she said. So, Jane and her daddy used the green powder to make a special cake. They cut it up and shared it between them. Jane smiled, as it was the yummiest cake she had ever tasted. The end. <|endoftext|> It was a sunny day and Jimmy was out playing in the park. As he ran around, he came across a mouse. He was excited to see it and noticed how flexible the little mouse was. Jimmy exclaimed, “Wow, that mouse is so flexible! Maybe it wants to be my friend!” The mouse gave him a little surprise, by hopping right up on his shoulder! Jimmy was overjoyed and thought to himself, “Now I have a new best friend!” Jimmy and the mouse were having so much fun running around the park together, but then suddenly they heard someone coming towards them. It was Jimmy’s mom. She had come to take him home. Jimmy shouted, “Mom, look, I made a new friend, a mouse!” But to Jimmy’s surprise, his mom said, “Oh no, we can’t keep it. Poor thing, let it go.” Jimmy sadly said goodbye to his new friend, and watched as the mouse ran away. He realized he would never see it again. The end. <|endoftext|> Once, there were two friends who were playing in the yard. One was clumsy and the other wasn't. The clumsy one said, “Let’s catch a bug!” But the other one disagreed. The clumsy friend said, “Why don’t you want to catch a bug?” The other friend said, “Bugs can be scary. Let’s play hide and seek instead.” The clumsy one disagreed. “No, let’s catch a bug!” Then, the two friends had an idea. They decided to play both games. First, they would catch a bug and then after, they would play hide and seek in the yard. They ran around the yard, chasing the bugs and having lots of fun. The clumsy one ran clumsily and the other one ran quicker and caught more bugs. The two friends laughed and played together until they were tired. They went home feeling happy and excited. <|endoftext|> One day, Little Bear and his Mommy went for a visit. She took him to a place he had never seen before. It was an icy place with lots of snow. As they walked around, Little Bear heard some music. It came from something his Mommy called a radio. It made Little Bear smile. When Little Bear asked his Mommy about it, she said it was called a radio and that it played music. Little Bear said, "Can I make music with it too?" Mommy said, "Yes, Little Bear, you can make your own music too. Let's try it together." So Little Bear and Mommy made music together with the radio. Little Bear was so happy. It was an amazing visit! <|endoftext|> Once upon a time, a little girl named Nora wanted to explore nature. She went to a meadow filled with white flowers, and she picked one that was the prettiest. She smelled it, and it was so sweet. Then Nora saw a small bunny hopping in the grass. She giggled and smiled, and she softly called the bunny over to her. The bunny hopped closer and closer until it was right beside her. Nora was so happy, so she bent down and kissed the bunny on its nose. The bunny was very happy, so it hopped off into the meadow and found it's family. Nora smiled and looked out into the meadow, taking in all the whiteness and beauty of nature. It was so gorgeous, like a picture from a fairy tale. Nora kept playing until the sun started to go down. She thanked nature for this amazing day and kissed her hand and blew it towards the sky. And with that, Nora went home and went to bed, dreaming of all the wonderful things nature had to offer. <|endoftext|> Once upon a time, there lived a lively young reindeer in the North pole. He was always so excited about the snow and he loved playing out in the cold! One day, he decided to go off into the snow and explore. So off he went, exploring the snow and having fun. But suddenly he noticed something he hadn't seen before - a big, deep hole in the snow. He went over to have a look and noticed it was full of ice. Just then, his mother noticed what was happening and called out to him. She warned him to stay away from the hole and said, "Don't go too close! The ice is too cold for a reindeer like you!" The young reindeer listened carefully and promised to stay away from the deep and chilly hole. He thanked his mother for her warning and promised to be more careful from then on. The lively reindeer was much more cautious and kept a safe distance from the deep, icy hole. He kept a smile on his face and continued exploring the snow. The end. <|endoftext|> Once upon a time, there lived a little girl called Lucy. One day, Lucy was feeling very sad. She wanted to fly away so she could be happy but she was too young. Then, a bright flame appeared in the sky. She was scared at first, but then she saw that the flame was made of magic. Lucy asked the flame, "Can you let me fly away so I can be happy again?" The flame answered, "Yes, I can permit you to fly away but first you must promise to take care of your family." Lucy smiled and said, "I will certainly take care of them. Please let me fly away!" The flame permitted Lucy to spread her arms and fly away into the night. She felt happy, free and no longer sad. Lucy waved goodbye to the flame and continued with her adventures. <|endoftext|> Once upon a time there was a brave warrior who lived far away in the forest. One day the warrior sailed away to explore the world on a small boat. They sailed around for hours and hours, eventually coming to a new land. The warrior was curious so they jumped off the boat and started to explore. But it was uncomfortable, so the warrior decided to go back to the boat. In their hurry to get back, the warrior called out, “Quick! Quick!”. It was then that a friendly bird flew over. The warrior smiled and asked the bird, “Do you know a faster way to sail?” The bird replied, “Of course! Follow me, I'll show you!” The warrior quickly hopped on the boat and followed the bird. The bird showed the warrior how to make the boat sail faster and soon the warrior was on their way. The breeze was gentle and the warrior felt comfortable once again. The warrior thanked the bird for showing them the way and sailed away, never to forget the bird's kindness. <|endoftext|> Once upon a time, there lived a little girl. She loved going outside to play in the sun. One day, the sun was shining so brightly and everything was so warm. The little girl excitedly started to run around. She ran so fast she got dizzy, then fell to the ground. But then, to her surprise, she felt something cold. She looked down and saw the ground was covered in snow. The little girl gasped. She quickly ran to her mom and said, "Mommy, there's snow outside! Can we go play?" Her mom chuckled and said, "Yes, but we have to grab a sack first." So they went outside and gathered up the snow in a sack. The little girl was so excited that she twirled around and around, making a mini snow storm. They took the sack home and put it near the fireplace. The little girl wanted to play with the snow all day, and her mom said she could do just that. So the little girl spent the day playing with the snow until the sack was empty. It was cold but still so much fun! <|endoftext|> Once there was a boy named Tom. Tom wanted to see something special, so he went to a high mountain. It was sunny and warm outside so the snow began to melt. Tom found something surprising: a magnet! He was excited and picked it up. Tom looked around and tried to find something with his magnet. He soon noticed that the magnet was attracting some pieces of metal on the ground. He picked them up and put them in his pocket. Tom kept playing with his magnet. Suddenly he heard a noise, it was high and loud! He looked up and saw a beautiful rainbow. He smiled, this was something special! <|endoftext|> One summer morning, a little boy named Andy was walking around outside. He saw a white rabbit in the grass and wanted to touch it. He walked over to the rabbit and reached out his hand, but he stopped just before he touched it. There were two green spiders crawling on the rabbit. He had never seen anything like this before, and he was scared! He stepped back and thought of a plan. He quietly reached inside his pocket and found some small stones. He threw the stones at the spiders and they ran away! He was so happy, he could touch the rabbit now. But then, the rabbit hopped away. Andy was a bit sad but quickly remembered he still got to touch the white rabbit. It was a special moment. <|endoftext|> Once there was a little girl named Lucy. She loved to play with her toys, but today was different. She was outside with her parents and there were a lot of people around. They were all wealthy people and were talking about something strange. Lucy listened carefully, but the words were all strange to her. She then noticed one wealthy man pointing to his toes. She wondered why and asked her dad, "What's he pointing at?" Her dad laughed and smiled, "That man is showing off his money! He's wealthy and he wants everyone to know." This made little Lucy excited. She wished she had money too. She wanted to show off her wealth like the man. But then her dad said something that made her sad. He said, "It's just playing pretend. You don't need money to have fun!" So Lucy put away her dreams of being wealthy and went back to playing with her toys. But secretly she still hoped one day she could show off her own wealth too! <|endoftext|> Once there was a boy who liked to run. Every day he ran faster and faster. He was so fast that he seemed to float rather than run! One day, his mommy gave him a weight to carry. It was big and heavy, but the boy didn’t mind. He held on tightly and ran with it, as if it were nothing. He ran for hours and hours, never stopping for a rest. The weight grew heavier and heavier, but the boy never thought about it. He kept on running, ever faster and ever further. Then, all of a sudden, the boy felt himself trip! He had been so careless, he couldn’t keep his footing. He had been running too fast and too far, with too much weight in his hands. The weight had been too heavy for him, and as he fell, he knew that he had gone much too far. Now it was time to turn around and run back home. <|endoftext|> Once upon a time there was a coat frame. It was fit for a special occasion. A little girl named Rachel came to try it on. Rachel noticed that the frame was disturbed. It was not standing up straight. "Don't worry," said her mother. "We can fix it." Her mother carefully adjusted the frame. Rachel stepped in, and it was a good fit. "It looks beautiful," said her mother. Rachel smiled in delight. The frame was no longer disturbed. It was standing up straight and Rachel looked wonderful. That's how Rachel got to wear the perfect coat frame for her special day! <|endoftext|> Once upon a time, there was a modest car. It drove around the country at a careful speed. Every day, its driver, Lizzie, said to the car, “Let’s go! Let’s speed!” But the car never wanted to go too quickly. One day, Lizzie spotted a rabbit hopping along the country road. She looked at her car and said, “Oh dear! We need to speed up or we’ll never catch this rabbit!” So, Lizzie put her foot down on the pedal and the car began to go faster. The rabbit kept hopping along, faster and faster, until it was a tiny blur on the horizon. But the car managed to keep up, going at a modest speed. In the end, Lizzie drove her car all the way to the end of the country road and the rabbit hopped off into the sunset. <|endoftext|> One day, Mary was sitting on the grass in the park, eating a sandwich. She chewed it slowly, looking around. Suddenly, something sparkly caught her eye - it was a silver necklace glistening in the sun. Mary noticed it was near a bush, so she crawled over to take a closer look. When she got close, Mary could see that the necklace was suspended from a thin branch. She reached out to take it in her tiny hand and felt it's cool metal. Just then, a voice called out from behind her. It was an old woman. "Do you like it?" she said. Mary was a bit anxious but nodded and smiled. "It's yours," the woman said warmly. "I saw you admiring it and thought you might like to have it." Mary thanked the woman politely, before heading home with the new silver necklace in her pocket. From that day onward, every time Mary chewed her lunch in the park, she would also play with her silver necklace, and think back to the day when she had first seen it. <|endoftext|> Once upon a time, there was a little boy named Joe. He was always happy and very healthy. One day, Joe saw a lovely bird in the sky. He was so amazed and pointed at it. "Look, look!", he said to his mum. His mum looked up and smiled. "Joe, don't you realize the sky is filled with so many birds?" Joe thought for a second, and then his face lit up. He had realized that the sky was full of wonderful birds. Mum smiled, proud of her little boy. She was glad to see him realize something so special. Joe was happy too - he had just had a wonderful realization. <|endoftext|> Once upon a time, a little girl named Lucy was playing with her chalk. She drew beautiful pictures with it outside her house. Suddenly, her friend Mary came over and asked if she wanted to play. Lucy said yes but Mary thought of something else to do. She wanted to cut her chalk in half. Lucy was not happy about this. She didn't want anyone to mess with her original chalk. But, Mary kept insisting and said, "C'mon Lucy, let's cut the chalk! It'll be fun!" Lucy refused but with some convincing from Mary, she agreed to it. So, they got a knife and started cutting the chalk. But, to their surprise, the chalk pieces became smaller and smaller until the chalk disappeared. Lucy felt sad. She knew that her chalk could never be the same again. Better not to mess with an original. <|endoftext|> Once upon a time there lived a little girl named Amy. She was very alert and always looked for new things to explore. One day she decided to search for a painter who could help her. She went out of her house and looked everywhere. Amy walked along the street and soon she found a painter. She was so excited! She asked the painter, “Can you help me?” The painter smiled at Amy and said, “Yes, I can! What do you need help with?” Amy said, “Can you paint my bedroom? It would look so much better.” The painter smiled again and said, “Yes, I can do that for you. I can make it very special.” Amy was very happy and thanked the painter. She watched as he painted the room. It was as if magic had come to her bedroom. Amy was especially alert that day when she watched the painter working in her bedroom. She enjoyed every moment of it. When the painter was done, she thanked him again and gave him a big hug. The painter smiled before he left. Amy's bedroom had never looked so good before. She was so happy and smiled from ear to ear. The End. <|endoftext|> Once upon a time, there was a little girl named Lola. She was three years old and she loved purple things. One day, she was walking in the park when she saw a big pastry. It was covered in purple frosting, and she wanted to try it! Lola ran to the pastry and pulled at the top. It was stuck, so she pulled harder and harder. Suddenly, the pastry tore in two! Lola gasped in surprise and said, "I did it!" She grabbed one of the pastry pieces and took a big bite. It tasted so sweet and delicious. Suddenly, Lola heard her mother's voice and she knew it was time to go home. She quickly picked up the other piece of pastry and ran to her mother. Lola showed her mom the pastry and said, "Look what I found!" Her mother smiled and said, "It sure looks yummy. Now let's put it in a bag until we get home." The End <|endoftext|> Once upon a time, there was a creative farmer who lived on a farm. He loved his farm and the animals who lived there. Every day he would go out and take care of the animals. One day, the farmer noticed something strange. One of his ducks seemed to be explaining something to the other animals, but he couldn't understand a word of it. He went over to the animals, and said, "What is going on here?". The duck replied, "I'm explaining to the other animals that over the hill, there is a big pond with lots of yummy bugs and fish." The farmer smiled and said, "That sounds like a wonderful idea. Let's go explore this big pond and see what we can find.” So, the farmer and the animals marched over the hill and across the field until they reached the big pond. They had lots of fun, playing and exploring around the pond, and found lots of yummy bugs and fish. The farmer thanked the creative duck for showing them the pond, and all the animals went home happy. <|endoftext|> Once upon a time a little girl named Jill had a very special toy. It was a black car that could zip around the room. She loved playing with it, zipping it back and forth. Every morning when Jill woke up, she would go to the toy car to make sure it was still there. One day, when Jill looked at the car, she noticed something strange. There was a print on the side. She couldn't figure out where it came from. She kept looking at the print and suddenly, the car started to zip across the room. Jill was so excited, she couldn't believe it! The car kept zip, zip, zipping all around the room. Jill followed it and it stopped at a big black box. Jill opened the box and inside was a present for her. It was a black toy robot! She was so excited and couldn't believe her eyes. Jill understood that the print on her car was the same as the print on the box. The car had known it was the present all along and had zipped across the room to show her the special surprise. <|endoftext|> Once upon a time, there was a small girl named Susie. Susie loved to go exploring in the big backyard of her house. One day, Susie went outside with her teddy bear. As she was running around, she saw something hidden behind a bush. She went near it, and when she peeked behind the bush, she found a kitty! Susie was so excited to see the kitty that she ran over to it. Susie said to the kitty, "Hi kitty, why are you here all alone?" The kitty meowed and then said, "I'm lost. I don't know how to get back home." Susie felt so sorry for the kitty and she wanted to help him. She said, "Don't worry, kitty. I can help you find your way home! Let's go visit and see." So Susie and the kitty started walking to find the kitty's home. After a while, they ran into some trouble. There was a big angry dog that blocked their way. Susie and the kitty were scared, but Susie kept her head and said, "Don't worry, kitty. We can find another way." So they both ran away and found a hidden path to get to the kitty's home. Finally, they arrived at the kitty's house. They said goodbye to each <|endoftext|> John and Sarah were playing together in their backyard when they found a piece of metal. It was shiny and reflective and they couldn't wait to show their parents. John asked Sarah, "What should we do with the metal?" Sarah thought for a moment, then said, "Let's take it to Mommy and Daddy!" With that, they ran off excitedly, ready to surprise their parents. They raced into the house, and shouted, "Mommy, Daddy! Look what we found!" Their parents were very surprised and asked, "Where did you find this piece of metal?" John and Sarah were so proud of their discovery, and couldn't wait to tell the story. They recounted that they found the metal outside in the backyard and it was so shiny and reflective. Their parents smiled, and said, "Well, why don't you two take it around the neighbourhood and see if you can return it to its rightful owner. If nobody takes it, you two can keep it!". John and Sarah were so cheerful and excited about the prospect of helping find the true owner of the metal, that they grabbed it and set off, ready to call on their neighbours. <|endoftext|> There was a little girl with dark hair. Her name was Joy. She lived in a big house with her parents. One day, Joy was playing outside in her garden. Suddenly, she felt something on her leg - something pinching her. It was a big, black bug! Joy screamed and tried to get away, but the bug kept following her. She tried to run and hide, but it was too quick. Joy's parents heard her cries and came running. They used a stick to help her get rid of the bug. After the bug was gone, they hugged Joy and told her everything would be alright. When the bug was gone, Joy felt relieved and happy. She went back to playing in the garden, making sure she didn't step on any more bugs. <|endoftext|> Once upon a time there was a little girl named Rita. She was gentle and sweet and was always nice to everyone. One day Rita was walking in the park and noticed something shiny. She decided to take a closer look. As she got closer, she realized that someone had stolen someone else's toy. Rita was very sad because she knew the toy belonged to someone else. But then she looked at the toy, she noticed that part of it was broken. She put her small muscle into work and managed to fix it. Rita picked up the toy and decided to find who it belonged to. She went all around the park, showing the toy to anyone who looked like they were searching for it. Finally, she found a young boy who was looking for the toy. Rita quietly gave the toy to the boy, who looked at her in surprise. He thanked her and said, "You taught me a very important lesson: to respect people’s belongings and to treat others with kindness." Rita smiled, feeling proud of herself. She had done something good and made a difference. Later that day, Rita thought to herself, "When you are gentle and kind, you can do magical things!" <|endoftext|> One day, John and his mom were out in the woods. John was looking to find some lumber for his toy boat. They had been scourging for hours, but hadn't found anything yet. "Are you sure there's lumber around here, Mom?" asked John. "Of course," she said happily. "Just keep looking, I'm sure we'll find it." John kept searching, but soon stumbled upon an ancient chest. He excitedly opened it, demonstrating his dependable strength. Inside, he found the lumber he was looking for. John quickly improved his toy boat, since his strength was now dependable. With newfound confidence, John raced off with his boat in the river. He sailed faster than ever, enjoying the adventure he had found. John sure was glad he found that lumber! <|endoftext|> Once upon a time, there was a little boy named Thomas. He was three years old and loved to explore. One day, he went on a big adventure to a far away oasis. On his way, he found a broken tree branch. He decided to touch it, but quickly pulled his hand away as it was too sharp. As Thomas continued his journey, he pondered why the branch was so broken. He soon came across a little river that was flowing down the side of the oasis. He remembered the branch and wondered if the river had something to do with it. The little boy arrived at the oasis and he was in awe. He ran to the edge of the water and started to touch it. As soon as he did, the river started to swell and the current quickly became stronger. Thomas quickly pulled his hand away. The little boy realized that the branch had broken from the rapidly rising waters. Thomas now understood why the branch was so broken and he was careful not to touch it again. <|endoftext|> Once upon a time, there was a lazy figure who was always looking for ways to relax. One day, he saw a big tree in the distance and decided to take a nap. As he was lying there, a small voice shouted, “Hey! Wake up!” The lazy figure opened his eyes and saw a small child standing in front of him. The child was insisting that the figure should come play with him. But the lazy figure was feeling too lazy to move so he politely declined the friendly offer. The child was very persistent, though, and he kept insisting that the figure should come play. So the figure finally gave in and agreed to follow the child's lead. And so, the lazy figure followed the boy and had the most amazing day! They laughed and played for hours and soon their day had come to an end. The figure was very grateful for the company and said goodbye to the wonderful little child. The figure returned home feeling refreshed and kids all around continued to insist that he join them to have lots of fun. The end. <|endoftext|> Once upon a time there was a new little bunny. Her name was Chloe and she was very excited to explore the world. One day she was hopping in the forest when something big happened! The trees began to shake and the ground rumbled. Chloe didn't know what to do, so she crouched down and covered her ears until the shaking stopped. When it was all over, Chloe looked around and saw all of the other animals. They were all looking just as scared as she felt. Suddenly, a wise old owl spoke up. "My friends," he said. "We just had an earthquake!" Everyone looked confused. "What is an earthquake?" Chloe asked. "It is a big shaking that happens sometimes," said the owl. "We all need to be careful when it happens!" Chloe thanked the owl for teaching her something new and, after that day, she liked to be extra careful whenever she heard rumbling in the ground. <|endoftext|> Once upon a time, there was a little girl named Molly. She was very worried, because she had lost her favorite toy. One night, while she was crying in bed, she heard a gentle hooting sound. Molly opened her window and a friendly owl flew in. Molly was surprised, but the owl only wanted to help. It flew around the room, searching until it found Molly's toy. It bowed its wings and dropped the toy in Molly's lap. Molly was amazed and asked the owl, “What are you?” The owl hooted again and said, “I'm an owl! I saw that you were worried so I wanted to come and restore your toy. Now, please have a good night's sleep.” Molly thanked the owl and fell asleep with a smile on her face. From that day on, Molly was sure that owls were magical creatures who could make any worries go away. <|endoftext|> Once upon a time there was a small boy who wanted to go on an adventure. He decided to take a boat out to sea. After a few hours, the boat sailed onto a big, beautiful island. The island was so nice that the boy wanted to explore it. He jumped out of the boat into the water and started to swim towards the island. There was a mild breeze that kept him cool as he swam. The boy arrived on the shore of the island. He looked around and noticed a small hut. He stood up and walked towards it. When he arrived, he heard a voice say, "Hello! Who are you?" The boy was surprised. He looked around and saw an old man standing nearby. The old man said, "I'm the island's caretaker. My name is John. What's your name?" The boy smiled and said his name. Then he asked if he could explore the island. John said to him, "Of course you can. Just be careful - some of the island can be a bit wild. I'll stay here and make sure you're safe." So the boy explored the island with John. They walked around the beach and swam in the mild ocean. Then, when it was time to go back, the boy thanked John for showing him the island and waved goodbye. The boy sailed back to the shore with lots of great memories of the island. He <|endoftext|> Once upon a time there was a fairy who lived in a tree near a pond. The fairy was very stubborn and always wanted things to go her way. One day when the fairy was flying around the tree, she saw a boy who was playing by the pond. The boy had a red balloon which he was dropping into the pond. The fairy shouted to the boy, "stop, don't drop the balloon!" But the boy was too stubborn to listen and he dropped the balloon into the pond. The fairy flew down to the pond, and with a wave of her magic wand, the balloon rose up out of the pond, much drier and brighter than before. The boy was so happy. He hugged the fairy and thanked her for saving his balloon. The fairy smiled and said, "You must be more careful next time and listen to me!" <|endoftext|> Once upon a time there was a black record. It was very helpful and it could do great things. One day, a 3 year old wanted to use the record. The record said, "I can't help you out. You have to be older". The 3 year old was very sad. Then, an old man showed up. He was very helpful and offered to help find a way to make the record work. He tried to figure out how to make the record work, but no matter how hard he tried, he couldn't make the record work. The 3 year old was very sad. He asked the old man, "Can you make it work?" The old man shook his head and said, "I'm sorry, but I can't make it work. I tried everything I could. I'm afraid the record will never work again." The 3 year old was very sad and never forgot the black record. The 3 year old never saw the old man again. <|endoftext|> Once upon a time there was a little girl who loved trips. She woke up one morning and asked her mom, "Can we go on a trip today?" Her Mom smiled and said, "Yes, let's go!" The little girl got dressed quickly and they went outside. The sun was bright and the sky was a beautiful color. The mom and the little girl walked to the park and went to the pond. The little girl became very excited and wanted to stir the pond. She grabbed the stick and stirred the water. The pond became a colorful whirlpool of fun. The little girl was so happy that she danced around with joy. Inside the whirlpool, she found colorful fish, rocks, and some small treasure. The mom and the little girl had a wonderful trip and returned home with lots of beautiful memories. <|endoftext|> Once upon a time, there was a girl named Jane. She was spreading candy around with her friends. Everyone was having so much fun; they couldn't stop laughing. Suddenly, John came over to the group and saw everyone with the candy. He felt envious that he didn't have any. Jane happily offered John a piece of candy. "It's okay," she said, "We'll share." John couldn't believe how kind Jane was. He accepted the candy and enjoyed it together with the other children. Moral: Sharing brings people closer together and can make everyone happy. <|endoftext|> Once upon a time there was a little girl who loved to play. Everywhere she went she would find something new and exciting to play with. One day the little girl was playing in the garden when she found a strange passport. The passport looked weird and she wondered where it had come from. The passport belonged to a magical mermaid who had been visiting the garden. The little girl wanted to show the passport to her family, so she put it in her pocket and went inside. But when she went to show her family the passport, there was no sign of it anywhere. The little girl looked everywhere but there was no sign of the passport. She asked her family if they had seen the passport, but they hadn't seen it. Suddenly, the little girl heard a voice coming from the garden. It was the magical mermaid, who thanked the little girl for finding her passport. The little girl was so happy to have found the passport and the magical mermaid was grateful to get it back. They played in the garden together until it was time for the mermaid to return home. From that day forward the little girl was never without her passport, always ready to explore new and exciting places. <|endoftext|> Bruce was an incredibly brilliant three year old. He was playing with his friends in the garden and they were having a lot of fun. They were playing a game but Bruce started to feel like something wasn't quite right. He asked his friend, "Do you trust your sauce?" His friend shrugged and said, "Sure, it's tasty and I always eat it." Bruce thought for a moment, then asked, "Do you think it's always reliable?" His friend replied, "Yes, it's always been brilliant and hasn't let me down. I think it's reliable." That was enough for Bruce and he decided to trust the sauce. He made a choice to keep playing the game and have fun, trusting the sauce would always be reliable. Together with his friend, they finished the game happily. <|endoftext|> One day, Mom and Jack were in the garden. Jack looked around and saw all the different colors of the flowers. "Mom, can I pick one?" he asked. Mom nodded. "Yes," she said. "Pick a big, reliable one that won't break when you bring it inside." Jack thought and thought, then picked a pink one that was very big. He put it in his pocket. But when he got home, he realized the petals had fallen off his flower. Jack was sad. How could he show Mom something reliable now? He asked his friend Paul for help. Paul said he could help, but first Jack had to do something for him. Jack said okay, and Paul told him to pick one extra flower from the garden to bring to him. Jack nodded, went back to the garden, and carefully chose a yellow flower. Jack brought the yellow flower to Paul, who said thanks and gave Jack some seeds from his garden. Jack planted the seeds in his garden, and now every summer Jack can see his reliable flowers growing! <|endoftext|> Once there was a little girl called Lucy who wanted to sell something very special. She carefully wrapped up her knee in a box and took it outside. Once she got to the market place, Lucy could see the many different people gathered together and she felt shy. She began to shout, “I’m selling my knee!” One of the people at the market was an old woman who had seen many things in her life. She approached Lucy and said, “Do you want some help selling your knee?” Lucy nodded and smiled. The old woman was very compassionate and kind and she soon found a buyer who was willing to pay a good amount of money for Lucy's knee. Lucy could not believe her luck! The old woman then said, “You should always be brave and use your compassion when trying to sell something. You never know who might be in the market place and be willing to buy it.” Lucy smiled and said, “Thank you so much for your advice and for helping me to sell my knee.” The old woman smiled back at her and said, “It was my pleasure. I'm sure you'll have success in other things you try and sell in the future.” And Lucy never forgot the old woman's words or the lesson she had learnt on that day. <|endoftext|> John watched a bug crawl across the grass. He was careful not to hurt it. His mom smiled as she watched him. Mom picked up the little bug and put it inside her case. She explained that it would be safer inside. John was upset. He wanted the bug to stay outside and play. He began to cry. Mom gave John a hug, and she sighed. She said that she was sorry, but it was safer inside the case. John smiled. He still missed the little bug, but he understood why mom was being so careful. John and mom hugged again. Mom thanked John for understanding, and they went on to play some more. <|endoftext|> Once there was a boy. His name was Tim. He was three years old and was very adventurous. One day he decided to go for a walk with his parents. As they walked, they noticed something wonderful. There was a lake, with bright blue waters, and beautiful green trees surrounding it. The family couldn't help but add it to their list of favorite places. Tim was so excited, he said, "Can we go explore? I would love to see what's there!" His parents replied, "Yes Tim! What an adventurous idea!" They all went to explore. Tim discovered so many amazing things. He found colorful rocks, and new plants he'd never seen before. He even saw some animals stepping out of the water. Tim added these sights to his memory, and felt a sense of wonder as he explored. He had a great day with his family and enjoyed their adventurous outing. <|endoftext|> Once there was a messy lizard. He wanted to move around the garden. He saw a beautiful flower and said to himself, "I can move that way." So the lizard moved towards the flower. He saw a big tree and said to himself, "I can move that way." So the lizard moved towards the tree. Suddenly, he heard a voice. It was a ladybug. The ladybug said, "Where are you going?" The lizard said, "I'm moving around the garden." The ladybug said, "Would you like help?" The lizard said, "Yes please!" So the ladybug and the lizard moved around the garden together. They found a muddy puddle and the ladybug said, "Let's move that way." So they moved towards the puddle and made a mess. But they had a lot of fun! <|endoftext|> Once there was a little girl named Ella. She was the most popular girl in school. She loved to play on the balancing beam in the playground. She was so good at balancing that she never had to use her muscles. One day, all the kids gathered around Ella, asking her to show them what she could do. She smiled and got on the beam. She balanced so well that the kids all applauded. Ella's teacher came out and told her not to stay on the beam too long. "Sometimes, muscles get tired," he said. But Ella didn't listen. She stayed on the beam for a really long time. Eventually, her muscles got tired and she fell off. Everyone was very sad. Ella's teacher told her to be careful next time. But Ella didn't listen and she fell off the beam the next time too. And the next time. The kids in school stopped asking Ella to balance on the beam, since they were afraid something bad might happen. Ella was no longer the most popular girl at school. <|endoftext|> Mama and Papa had a party for their little girl. It was her third birthday. Everyone had come over to celebrate. There was cake, games, and balloons. The little girl was so excited. The guests all cheered as Mama and Papa gave the little girl a shiny new toy. "Thank you," she said with a smile. Mama and Papa then revealed to the guests that the toy was actually a surprise. They said it was a trap. The little girl was curious and asked what it was. Papa explained it was like a game. He said if she did something the trap would make a noise and they would all applaud. The little girl was embarrassed, but she was excited too. She stepped up to the trap and tried her best. When the trap finally made a sound, everyone clapped and cheered. She was so proud of herself. "See," Papa said, "you were brave and you did it!" The little girl smiled and hugged Papa. She was so happy to have accomplished something and everyone else was proud of her. It was her best birthday yet. <|endoftext|> Jack and Sue were playing in the yard when they spotted a Dinosaur. They both ran up to it to take a closer look. Sue was filled with amazement. "Wow!", she said awely. "Where did it come from?" "I don't know", Jack said. But let's hang it up in my room so we can look at it everyday." The two of them grabbed the dinosaur and filled it up in Jack's room. Jack hung it from a tree branch in one corner of his room and it looked very nice. Sue watched with a proud smile. "That makes your room look really humble", she said. Jack smiled happily. "Thank you Sue!", he said with a big smile. "Now I can see it every morning when I wake up!" <|endoftext|> Once upon a time there was a little girl named Emily. She was very excited when she woke up one morning because she was going to have a special surprise. Emily was told over breakfast to put on her shoes and wait outside. When she opened the front door she saw a tower of spicy food, her favorite! Emily took a bite and instantly thought it was the best she had ever tasted. She kept eating and eating until the tower was gone! Soon, Emily started to feel strange. Her belly was getting bigger and bigger and was starting to hurt! Emily's parents tried to make her feel better, but nothing worked. Finally, Emily had to go to the hospital. The doctors told her she had thought too much spicy food and that she needed to stay in bed for a few days so she could get better. Emily was really sad and never wanted to eat spicy food again. The end. <|endoftext|> Sue and Mike were planning a picnic in the park. They wanted to have the best time ever! Sue and Mike packed snacks for their picnic. They brought lots of different snacks, but their favorite was the beans. When they arrived in the park, they spread out their blanket and started to get ready for the picnic. Suddenly, Sue noticed something strange – there was a deaf rabbit in the middle of the park. Sue was excited. She called out to Mike, "Let's give him some beans!" Mike nodded with a smile and together they took out an extra portion of beans and placed it near the rabbit. The rabbit hopped around the beans and started to eat. Sue and Mike were delighted to see the rabbit enjoying their snack. They had a wonderful picnic and plan to visit the park again soon. <|endoftext|> Once upon a time, there was a zipping sound in the quiet room. It sounded like someone was playing with something. Two friends, Mel and June, were curious and excited to find out what was making the noise. "What's that noise?" asked June. "I don't know," said Mel, "Let's go find out!" The two went searching around the room until they found the source of the noise: a pin, zipping up and down the wall! "How unusual," said June, "How does it zip up and down the wall like that? Mel put her finger to her lips and said, "Shhh, maybe it's magic?" June's wide eyes lit up as she said, "That's it! I think we should try to figure out how it works!" The two friends worked together to try and make the pin zip again. After a few minutes of hard work, the pin began to zip again! "Woo-hoo!" cried Mel, "We did it! How exciting! I think this pin has a magical zipping power!" June and Mel enjoyed their newfound discovery and magic pin. From that day forward, the two friends would take turns zipping the pin up and down the wall. It was the quietest, most exciting adventure they ever had. <|endoftext|> John went to the market one day with his mom. He saw a beautiful blue kite that he really wanted. His mom told him he couldn't have it, but he wouldn't listen. He was too excited and ran to the kite to grab it. Suddenly, a tough foot stepped on the kite. John was scared and turned around. There was a big man with a mean look on his face. “Mommy,” John said, scared. The man said, “I run the market and I won’t provide for any children running around and taking things that don’t belong to them.” John was still scared and backed away slowly. His mom told the man she was sorry and would pay for the kite. But the man said it was too late and he wanted John to learn a lesson. He told John to never take things that don't belong to him again, and he made John leave the market. John and his mom had a bad ending that day. He never got the kite and he was reminded to never take things that weren't his. <|endoftext|> Once upon a time there was a bird named Max. He loved being able to soar through the sky. One day however, Max felt helpless when his wing was injured. He couldn't fly anymore and he was stuck on the ground. Max's friends noticed this, so they came over to help. "Don't worry, Max," they said. They set up a nest for him and brought him things to eat. Max was so happy he began to settle in. He was grateful for his friends' help. He felt safer in his nest and didn't feel so helpless anymore. One day Max had an idea. He asked his friends, "What if I set up a will? That way, if something happens to me, you can take care of my nest." Max's friends thought this was a great idea. So Max wrote a will that his friends would follow after he was gone. He was so relieved to have this plan in place. Max's friends made sure to take care of him and the nest. With their help, Max was able to settle in to his new home peacefully. <|endoftext|> Once upon a time, there was a light beetle. He had never been outside and wanted to see the world. So one day, the beetle crawled out of its box and looked around. Suddenly, he saw a big tree and decided to climb it. He worked up the trunk and made it to the top, but found he was stuck. "Help!" the beetle cried. Just then, a bird flew by and heard the beetle's cry. "What's wrong little beetle?" asked the bird. The beetle explained what had happened, and the bird laughed. "My friend, the ant, can help you," said the bird. "Let me take you to her." The bird took the beetle to the ant, who said she could help. She pulled and tugged, and the beetle worked his way around the branch, until he was finally free. The beetle thanked the bird and ant, before flying off into the light. He had seen the world and was now ready for a real adventure! <|endoftext|> Once upon a time there was a very playful puppy named Jack. Jack loved printing, which meant that he could make lots of paper with colourful patterns. One day, Jack found a small pill on the floor. He was fascinated by the shiny round shape, so he picked it up and tried to print it. "What are you trying to do, Jack?" asked his mother, who had just seen him. "I am trying to print the pill, mum," answered Jack. "Oh, the pill is too small to print. Let's find something else that is bigger and easier to print," said his mother. So, Jack and his mother went outside and found a big red leaf which they printed. Jack was very happy! The printed leaf was very colourful and beautiful. From then on, Jack kept printing lots of colourful things. <|endoftext|> Once upon a time, there was a pale gem which nobody knew the power of. One day a teacher appeared in the village and told the people, "I know the power of the pale gem! I will teach you how to use it." Everyone was excited and gathered around the teacher. The teacher said, "Now, I will teach you how to make the pale gem magical. First you must find a special vessel and fill it with water. Then place the pale gem in the vessel and watch as it glows." Everyone was amazed! The teacher continued, "While holding the vessel with the pale gem in it, you must say a very special spell. Say the words 'Pale Gem, I call on you to bring us luck and fortune!' and the gem will become magical and bring us luck and fortune." Everyone was thrilled and thanked the teacher. The village was now filled with more luck and fortune than ever before, all thanks to the teacher who taught them all how to use the pale gem. <|endoftext|> Once upon a time there was a bridge. It was very smooth. All the animals wanted to walk on top of it. One day a little mouse was walking across the bridge. He saw a big dog on the other side and the little mouse wanted to show the dog how brave he was. He bowed to the big dog and kept walking. The big dog didn't like the little mouse and he chased him to the other side. The little mouse was so scared and screamed for help. Unfortunately no-one was around to help him. The big dog finally caught up with the little mouse and he was so angry. He barked very loudly and the little mouse screamed and ran away as fast as he could. But it was too late. The big dog had been too fast and the little mouse was never seen again. <|endoftext|> Once there was a boy who lived in a very beautiful landscape. He loved exploring the landscape and learning about all of the amazing things it had to offer. One day, while exploring the landscape, the boy came upon a very bossy chipmunk. The chipmunk wanted the boy to do whatever it said and do it right away. The boy understood that the chipmunk was bossy, so he didn’t argue. Instead, he listened and did as the chipmunk asked. The chipmunk told the boy to follow it through the landscape. As they walked, the chipmunk stopped at certain places. It was at these places that the chipmunk revealed something truly incredible. At the end of their journey, the boy finally understood why the chipmunk had been so bossy. It had led him to the most amazing places in the landscape and showed him things he never would have seen on his own. <|endoftext|> Once upon a time, there was a boy named John. He was three years old and he was excited for his new birthday. He hoped he would get a special present. John's mummy took him to the park where all of his friends were. His friends were cheering and they had a big, delicious looking cake. John was very happy and everyone began to sing happy birthday. John looked around and saw lots of presents sitting next to the cake. He looked at his mummy and said: "Which one is for me mummy?" His mummy laughed and said: "Let's have a look and find out!" John was so excited to open the biggest present first. He opened it and inside was a comfortable chair. He was so happy and he hugged his mummy. "It's my special present mummy, thank you!" John sat down in the chair and looked at the cake. He wanted to eat it and hope that it was as tasty as it looked. His mummy cut the cake and everyone had a piece. John took a big bite and he said: "Mummy this is the best cake I have ever tasted!". His mummy smiled and said: "I am so glad you like it". John was so happy he laughed and clapped his hands. It was the best birthday ever! <|endoftext|> Mummy and Timmy were in the closet, looking for something. Mummy asked Timmy to pass her a hanger. Timmy refused because he wanted to pick it himself. Mummy told him that she needed the hanger, but Timmy shook his head and said no. He was being very rude. Mummy was getting angry now. She told Timmy, "If you don't give me the hanger, you won't get any ice cream." Timmy still refused and said he wanted to pick it himself. He stomped his feet on the floor. Mummy scolded Timmy and said, "That's not nice behaviour. You have to be polite. Give me the hanger please." Timmy looked at Mummy and said, "Okay." He reached up to the shelf, grabbed the hanger, and handed it to Mummy. Mummy smiled and gave Timmy a hug. "Thank you, my love." <|endoftext|> Once there was a little girl named Amy who loved to skip. She could skip from the flower bed to the mailbox, the sidewalk to the trees. Every time she skipped she looked so happy that everyone in the neighbourhood just couldn't help but smile. One day Amy's dad asked her to come into his workshop. He wanted to show her something special. He pointed to an old box with an original knob on the front. He said, “Amy, can you open this box? It might be filled with something magical.” Amy was so excited! She tried to turn the knob but it was so tight she just couldn't do it. She asked her Dad, “Can you help me open the box, Daddy?” Her Dad smiled and gave the knob a big twist. When he opened the box, Amy saw there were lots of ribbons inside. She let out a cheer and said, “I can use them to skip!” So, with her ribbons in hand, Amy skipped her way around the neighbourhood. Everywhere she went, she put a smile on everyone's faces. The original knob had opened a box of joy! <|endoftext|> Once upon a time, there was a very selfish boy who loved to scare his friends. One day, he brought a gas mask to school and he wanted to scare everyone. He even put on the gas mask himself and then tried to scare his friends. His friends were scared and became angry. One of them said, "Why are you so selfish?" The boy realized that it wasn't nice to scare his friends. He told them, "I'm sorry. I won't do this again." His friends were happy and then all of them played together in the playground. They all had a lot of fun and the boy now knows better than to scare his friends. <|endoftext|> Once upon a time, there lived an orange tree. All the oranges on the tree were delicious and juicy. The tree wanted to share its delicious oranges with the world. One day, it decided to give away all of its oranges to the local animals. The animal friends were delighted! The squirrels, birds, rabbits, and more all shared the oranges. They each had as much as they wanted to eat. But the tree remained sad, for it no longer had any oranges left to share. Just then, the sun began to shine brighter and the sun’s warmth brought new life to the tree. Its branches were soon filled with many delicious oranges. This time, the tree decided to be more careful. It only gave away five oranges each day and kept the rest. This made it happy and it could remain generous without becoming empty. The moral of this story is that if we are generous, we can remain happy and still have a lot to give. <|endoftext|> Once upon a time, there was a pirate who lived in a far away land. He was a mean pirate and was very intelligent. He looked for ways to steal from others. One day, he noticed two young kids playing nearby. The pirate decided to steal their toys. He waited until the kids were not looking and then he quickly grabbed the toys and ran away. The kids were very sad. But one of them, who was very intelligent, decided to take action. He looked around for the pirate and soon spotted him far away in the distance. The intelligent kid thought of a plan and quickly ran back to get help. He gathered his friends and they all ran after the pirate. But the pirate knew that they were following him and he was too fast for them. In the end, the pirate was able to escape with the kids' toys and never got caught. The kids were very sad that they couldn't get back what he had stolen. <|endoftext|> It was time for the lecture to begin. Little Tom was excited to come to the high school and learn something new. When he arrived, he was amazed at the big space filled with many people. The teacher started his lecture. He spoke with a voice that was calming and wise. Tom listened carefully and learned many new things. He began to feel a strange feeling in his heart. Tom asked the teacher, "What is this feeling inside my heart?" The teacher smiled and said to him, "It's the feeling of healing. When you learn something new, your heart can heal and grow stronger." Tom smiled and felt happy. He knew that the lecture would help him to heal and feel better. He thanked the teacher for his wise words and ran off to tell the other children the good news. <|endoftext|> Once there was a poor little girl named Mary. Mary loved to kick around circles in the dirt. One day, Mary went to the park, kicked the circles around for a while, and got very tired. She decided to take a nap. While Mary was sleeping, a beautiful fairy flew down from the sky and she said, "What a beautiful little girl! Here, I will give you a special present." She waved her magic wand and a big circle appeared. Mary woke up, saw the big circle and asked, "What is this?" The fairy said, "It's a magic circle. It will give you whatever you want. All you have to do is to kick the circle three times, and something special will happen." So Mary kicked the big circle three times, closed her eyes and when she opened them again, she was filled with joy! The magic circle had given her a bag of money, a beautiful house and a pet dog. Mary looked up to the sky and thanked the fairy from the bottom of her heart. Now Mary was no longer poor, and she could enjoy kicking circles in the park for hours and hours! <|endoftext|> Once there was a family of bear bears. Everyone was very happy and they had lots of fun together. One day, the family was getting ready to go to a party. They wanted to make sure they looked nice and had the best welcome. So they all worked together to prepare, and it was a tough job. Finally, the day arrived and the family set out for the party. When they got there, everything was not as they had expected. There was a sign at the door that said "No bear bears allowed." The family members were very sad and disappointed. They were so surprised that they all just sat there, without saying a word. Suddenly, the father bear bear spoke. He said, "This is a tough lesson, but the best thing to do is to move on. We should remember that no matter how hard we prepare, not everyone will welcome us." And with this, the family sadly walked away. They had learned a valuable lesson that day: no matter how much we try to be welcomed, some people will never accept us. <|endoftext|> Once upon a time, the ground was dry and hard. Granny was getting ready to go to the market to buy food. Little Jack asked, “Can I come with you, Granny?” Granny replied, “Yes, it’s a lovely day. Let’s go.” They soon arrived at the market, and Granny bought a lot of food. She told Jack, “Let’s take this food home and bury it in the ground. We can save it for later.” Little Jack asked, “Why?” Granny said, “So that it won’t get eaten.” Little Jack helped Granny to bury the food and soon enough, the ground was full of yummy food. The next day, Granny and Little Jack went back to their garden and Little Jack started digging. To his surprise, the food he buried yesterday was still there! Granny said, “Look, Jack, our plan was successful!” Little Jack smiled with happiness. They enjoyed their yummy food and lived happily ever after. <|endoftext|> Once upon a time there were two friends named Fluffy and Daisy. They were very playful and loved to watch the world together. One day, they decided to go on an adventure. They walked around the meadow and watched the birds as they chirped and flew through the sky. The friends stopped to admire a nearby pond, where they saw a patient old turtle watching them. Daisy, the more playful of the two, was determined to say hello. She waddled up to the turtle and said “Hello, are you watching too?”. The turtle smiled and quietly replied “Yes, I always watch the world around me”. Fluffy and Daisy and the turtle enjoyed watching the world for a while together. When it was time for them to go, Daisy waved goodbye, and the two friends continued their journey! <|endoftext|> Once upon a time, there was a little girl called Anna. She was three years old and very curious. She wanted to explore the world around her. One day, Anna was walking through the forest when she came across an old oak tree. She stopped to look at it and noticed that the base of the tree was empty. Anna decided to take a closer look and curiously stepped inside. She was amazed to discover that the hollow tree was filled with twinkling lights which displayed colourful images. She gasped in delight and called out to her mum, who had been walking just behind Anna. "Mummy! Come and look!" Anna exclaimed, stretching her arm out to point to the beautiful display. Mummy smiled, "Oh Anna, you have found a magical tree!" <|endoftext|> Once upon a time there was an orange needle called Frank. He had been in the same spot for years and he was getting bored. He wanted to explore, but he didn't know how to. Then one day, a small 3 year old child saw Frank. The child said "Hello Frank! I'm going to help you explore the world." Frank was so excited! The child said, "I think we should reverse!" Frank looked confused, but the child explained that it meant going backwards, the opposite of forwards. So, the child and Frank started reversing. They went up and down, side to side and around in circles. Frank was enjoying his adventure! After an hour of reversing, the child and Frank stopped. The child said, "Wow, that was a lot of fun! You now know that you can explore by reversing." Frank thanked the child for his help and then said goodbye. As the child walked away, Frank knew that he would never forget this adventure. <|endoftext|> The little girl was standing on the side of the road, watching all the people and bright flags in the parade. She was so excited and wanted to join in. Suddenly, she saw a group of children in the parade wearing cool hats, dancing and singing. "I want to join!" the little girl shouted happily. One of the adults in the parade saw the little girl and gave her a big smile. "Come on" he said, diving into the parade, "Come join the fun!" The little girl followed him and started to dance with the other children. Everyone was laughing and having a great time. But soon the little girl became frustrated. She couldn't keep up with the other children, and they were all having more fun than her. But then one of the adults came over and said: "Come on, let's show them how to dive in this parade." With a big smile, the little girl followed the adult and started to dance and sing. Soon, she was singing and dancing just like the other children, and everyone was having a great time. The little girl was happy and no longer frustrated. <|endoftext|> Once upon a time there was a little boy who loved to explore. He wanted to see all the wonders of the world. So one day he walked and walked until he came to the edge of a huge forest. He was excited to explore the forest. He ventured in. Soon enough, he came across an extraordinary sight. A giant tree that had a swing that went way up high, so high he could touch the sky. He was so excited he just had to give it a try. So he climbed up the tree and squeezed himself onto the swing seat. He started swinging and swaying and before long he was feeling so merry and carefree. Suddenly, he felt a massive hand squeeze him tight. He looked around and saw an old and miserable giant. The giant spoke in a grumbling voice, "You don't belong in my forest, get away!" The little boy was scared and quickly jumped down from the swing. He was so sad, he had to leave the wonderful adventure he had been having. He quietly went home, feeling more than a little miserable. <|endoftext|> Once upon a time, there were two friends named Jack and Jill. Jack and Jill loved to match. Every day, they would match rocks, leaves, and sticks. One day, Jack and Jill wanted to match in the harbor. Getting to the harbor was a long journey, but they kept on walking until they arrived. When they got to the harbor, it was so miserable. There were no rocks, leaves, or sticks to match. Jack and Jill were so sad. Suddenly, they spotted a pile of match boxes near the harbor. Jack and Jill were so excited, they grabbed one of the match boxes and began to match the colorful boxes. They played at the harbor all day, matching the pretty match boxes until the sun started to go down. That day, Jack and Jill had an amazing time and each went home with a smile. And they promised to come back to the harbor soon and match again. <|endoftext|> Once upon a time there were two friends, Jack and Jill. They were playing together in a big field. Suddenly, Jack noticed a deep well! He was so excited, he wanted to jump right into it. But Jill called out, "No, Jack! Don't jump!" Jack ignored her and he went nearer and nearer. Jill got worried and she said, "Jack stop! I'm scared!" Jack didn't listen and he was about to jump in. Jill got very scared, so she shouted, "No Jack! Panic!" Jack was so sorry, he jumped back and started crying. Jill hugged him tight and said, "It's ok, Jack. Don't worry. I'm sorry I scared you." Jack smiled and they hugged each other. They never came near the well again. The end. <|endoftext|> Once upon a time there was a white phone. The phone was special and could fold out. One day, a little girl, who was three years old, saw the phone and said "Wow!" The girl wanted to play with the phone, so she carefully folded out the phone. She thought the phone looked like a butterfly. She was very excited and started to giggle. The girl's mother saw her playing with the phone and said, "No, you must be gentle with it. Folding the phone out is a special thing you can only do when you get older." The little girl understood and started to fold the phone back together. When she finished folding it, she said "Wow!" again. Then she put the phone carefully back on the table. The end. <|endoftext|> Once there was a strong stone. It wanted to stay by itself so it could be alone. But that was hard to do in the forest. Every day an animal would come by and try to move the stone. But the stone was strong and wouldn't budge. Then one day, a butterfly flew by and asked the stone why it wanted to stay by itself. The butterfly said it would like to be friends with the stone. The stone was very happy. The butterfly and the stone became great friends. Every day, the butterfly would come to visit and stay with the stone. The stone was so glad that it didn't have to be alone any more. It was strong and would stay with its friend forever. <|endoftext|> Mummy was with her little girl in the park. The little girl loved to play on the swings and they had been there a long time. Mummy said, "We should go soon. It's getting dark." But the little girl protested, "No, I want to stay here!" She was having so much fun. Mummy sighed. She urged the little girl to leave, but the little girl's feelings were too strong. Mummy was starting to worry. She was worried about the darkness, and that the little girl might get tired and weak. She said, "Come on sweetheart, we must go now." The little girl felt a bit weak, so finally she agreed to go. Mummy was happy, because she was no longer worried. <|endoftext|> A mummy and her little girl called Sarah were getting ready to go on a trip. Sarah watched as her mummy packed a big sack with lots of things. "What's in that sack, Mummy?" asked Sarah. Mummy replied, "It's full of lots of fun things that we can take with us on our trip." Sarah asked, "Can I take my dolly?" Mummy replied, "Yes of course, but you will have to pack it into the sack yourself." Sarah was excited and put her dolly safely into the big sack. She looked up at her mummy and smiled. On the trip, Sarah met lots of friendly people and things she had not seen before. She was having a wonderful time. When it was time to go home, Sarah remembered that she had put her dolly in the sack and so she checked to make sure it was still there. It was! Mummy said to her, "Isn't it nice when things are packed up neatly and safely?" Sarah nodded and smiled. The moral of the story is to be careful to always pack up things neatly and safely, which helps us to take care of our possessions. <|endoftext|> Once there was a mother and her three year old daughter, Molly. Molly really wanted to sleep in her own bed but her mom said it was still too soon. Molly remembered that when she was even littler, she used to sleep in a crib. Molly said, "Mommy, can I sleep in my crib please? It's so little, I think I can fit!" But mom said no, it was too little and she was too old. Molly was so sad and asked, "Why can't I sleep in my crib? It's so cozy and fun!" Mom said, "It's too small, Molly. You're getting so big that you need a big bed now. Come on, I'll have a fun time picking out a big bed with you!" Molly smiled. She wasn't sure why her crib couldn't be her bed anymore, but it was funny to think of sleeping in a big bed! <|endoftext|> Once upon a time there was a kid named Danny. He was playing all alone, but he was not scared. Suddenly, he saw a big bug. Danny felt fearful and he backed away slowly. "What do you want?" he asked the bug. The bug answered, "I want to take a trip on your lip." Danny was surprised, but he agreed. He kissed the bug and closed his eyes. The bug flew away and Danny finished his journey. Suddenly, he heard a noise—it was the bug coming back. The bug said, "Thank you for the ride. Now I have to go back to my home. Goodbye." Danny waved goodbye, and he suddenly realized why the bug wanted to ride on his lip. The bug needed to get back to its family. Danny felt happy and relieved. <|endoftext|> Once upon a time there was a crab named Bob. He lived in a big rock by the sea. One day, Bob was walking along the beach and he saw a little girl playing. The girl looked very happy, so Bob decided to greet her. Bob said, "Hello!" The girl smiled and said, "Hi there!" Bob asked, "What are you doing?" The girl said, "I'm looking for seashells. They are so pretty, and sweet too!" Then Bob said, "I know of a place that has lots of seashells, right near my rock home. Would you like to come and see?" The girl was very excited, so she said, "Yes please!" So Bob and the girl went to Bob's rock home. Sure enough, the beach was full of pretty and sweet seashells. The girl picked up all the shells she could see and thanked Bob for finding them. Bob said, "You're welcome! I'm glad you're happy." The girl smiled and gave Bob a big hug. They said goodbye and the girl ran off, clutching her shell collection close to her heart. Bob watched her go, feeling a great sense of joy. He was glad he could help make someone so happy. <|endoftext|> It was a sunny morning and a little girl was taking a walk with her puppy. Her puppy was very excited and pulled at the leash, but the girl was very gentle with him. Suddenly, they heard something and the puppy jumped, making the girl so clumsy that she dropped the leash. "Oh no!" She said. The puppy ran off, so the girl started running after him. She ran around the whole park, but she could not find him anywhere. She was about to cry when she finally saw him behind a bush. He was busy cleaning himself. The girl was so relieved and ran to him. She hugged him tightly and said, "Please don't run away again. I was so scared!" The puppy looked at her with his big eyes and gave her a big kiss. From then on, she never let go of his leash. <|endoftext|> Once there was a bear who loved spicy food. He always used to pick the spiciest of all the food in the village. One day, he was making his usual rounds at the village market when he saw his friend, the rabbit. The bear waved and the rabbit bowed in response. The bear asked the rabbit what he had in his basket and the rabbit replied, "I'm bringing yummy carrot cake to my grandmother. It's her favourite." The bear immediately started drooling. He asked the rabbit if he could have some and the rabbit said, "Sure, but it's really spicy. Are you sure you can take such a pain?" The bear was too excited to wait. He eagerly took the carrot cake and bit into it. Alas! The bear had never tasted such a spicy food before. Suddenly his mouth was on fire and he yelped in pain. The bear learnt a lesson that day: when it comes to food, not everything that tastes fancy is necessarily best for you. <|endoftext|> Once upon a time, there was a brave turtle. She was very small, but full of courage. One day, she decided to explore the big world and find new things. She started to crawl very slowly. After a while, she saw a small hole under the ground. She wondered what she will find there. She got very excited and started to crawl into the hole. Once she got in she saw the most amazing thing: thousands of brightly coloured stones and sparkly crystals! She was so excited that she couldn't move. Suddenly, a small mouse said: "Why hello there little turtle! What are you doing here?". The turtle was so surprised, but she answered: "I'm looking for amazing things!". The mouse smiled: "Well, look no further. You're in the most amazing place!". The turtle smiled and started to play with the stones and crystals. She forgot about the time, until it got dark and she decided to crawl back home. The turtle was very happy. She found an amazing place she never knew existed before. Whenever she felt sad, she remembered that magical place she'd seen and smiled. <|endoftext|> Once upon a time there was a fat penny. She looked so shiny and beautiful that she made a young boy smile. The boy picked up the penny and decided to take it home with him. When he arrived home, the boy's mother said, "You can't keep the penny, it doesn't belong to us. You have to return it." The boy wasn't too happy about that but he had no choice. He slowly walked back to the place where he had found the penny and put it back on the ground. Suddenly, a fat rat jumped out of nowhere and snatched the penny away. The boy was so surprised that he forgot to chase after the rat. The boy never saw his penny again. He was very sad. <|endoftext|> It was a warm summer day when Billy and his dog, Spot, went for a walk. They continued down the path, hand in hand. As they walked, the waist high grass swayed in the breeze. Suddenly, Spot spied something shiny in the grass and scrambled to get it. Billy tugged on the leash, but Spot was too excited. Then Billy heard it, a loud 'Slam'. Spot had shut the gate behind him! Billy dropped the leash and ran to the gate, but it was too late. Spot was nowhere to be seen. Billy was confused. He didn't know what to do. Luckily, a friendly farmer saw the commotion and helped Billy open the gate. Spot was reunited with Billy and they continued on their walk, hand in hand. <|endoftext|> Once upon a time, there was a little boy called Jack. Jack was three years old. He wanted to go out and have some fun. Every day, Jack's parents would take him to the playground. It was a great place to play. Jack loved ringing the bell and playing with the swings and slides. One day, Jack heard a strange noise. It sounded like a bell ringing. He looked around and saw a big, red telephone box. Inside was a telephone and it was ringing. Jack went to his dad and asked, "What is that?" His dad said, "It's a telephone. Come and rub the buttons. It makes a great sound!" So, Jack went to the telephone and rubbed the buttons. He was so excited to hear it ring and he kept rubbing the buttons. The little boy was so happy and he smiled from ear to ear. He said, "This is great!" <|endoftext|> Once upon a time, there was a little girl named Jane. She was three years old and she was very curious. One day, she asked her mom if she could have some shrimp for dinner. Her mom said no, because it was too expensive. Jane got angry and demanded shrimp. Her mom said no again and Jane started to cry. Just then, Jane noticed something pink out of the corner of her eye. It was a magical box with a big, pink shrimp inside. Jane wanted the shrimp more than ever and she demanded it. Her mom was hesitant but she finally agreed that Jane could have it. Jane was so excited! She clapped her hands and laughed. She thanked her mom, grabbed the pink shrimp and ran outside to play. She was so happy to have a special treat. Jane's mom smiled and felt relieved that Jane was content. <|endoftext|> Once upon a time, there lived a girl. She was just three years old and very tidy. Every day, she would clean up her room and make sure everything was in its place. One day, she was cleaning her room when she saw something shiny. She picked it up and saw it was a penny! She was so excited. She wanted to show it to her mom. She shouted: "Mom! Look!" Her mom came in. The girl showed her the penny. Her mom smiled and said, "Wow! What a tidy penny. You can keep it safe in your room." The girl nodded, and put the penny in her drawer. Then, she shut the drawer tightly. The girl was so happy that she had a shiny penny. She hugged it and thanked her mom for letting her keep it. From then on, she kept her room very tidy so she could keep her penny safe. <|endoftext|> Once there was a lady who had a special leg. It was deaf and she never wanted to talk about it. One day, a little boy asked the lady why her leg was so special. She was surprised he noticed! The lady smiled and told the boy she was deaf in the leg because she was born that way. The boy was surprised— he thought it was unusual but very cool! He asked the lady to teach him sign language and she gladly agreed! The lady taught the boy many things, including how to communicate with people who can’t hear. From then on, the little boy and the lady shared a special bond— they both knew that being different could be a wonderful thing. <|endoftext|> John was walking outside on a warm summer day. He was laughing and feeling happy. Suddenly, he saw a small pile of ash on the ground. He smiled and decided to explore what it was. He bent down and opened the pile of ash. Inside, he saw a little bird. It was still alive, but barely. John smiled and ran to find help for the bird. He called to a man walking by and asked for help. The man said "No, I don't care. Leave it alone and get away from it." John said "Please help the bird. It needs my help." The man replied, "No, it's not worth my time. Leave it and go away!" John sadly looked at the bird. He wished he could help it. He smiled and went away. The little bird died soon after, alone in the pile of ash with no help. John looked back and smiled sadly. He knew that he should have kept trying harder to help. <|endoftext|> Once upon a time there was a little girl who was so very careful. One day she went outside to play and she found a caterpillar! She was so excited! The girl carefully put the caterpillar in her pocket so she could take him home. She stopped and said to the caterpillar, "Let's go home," and the caterpillar smiled. When they arrived, she put the caterpillar in her garden and said, "You can stay here and have lots of adventures." The caterpillar nodded. The girl gave the caterpillar a hug and said, "Be careful and remember to stay safe." She watched as the caterpillar crawled away, feeling sure he would have a wonderful time in her garden. <|endoftext|> Once upon a time there was a kid named Todd. He was three years old and loved adventure. One day, he decided to sail out to sea on a homemade raft. Todd hoisted up the sail and it bellowed in the wind. He was scared at first but then he smiled with delight. The sun was shining, the water was glimmering, and he felt like he was on top of the world. He said loudly to the sea, "This is the best day of my life!" Suddenly, a giant fish jumped out of the water. "Wow!" Todd called. "It looks like it's trying to play with me." The fish kept jumping in the air and making loud noises. He jumped and laughed until he was so tired he could barely keep his eyes open. Todd waved goodbye to the giant fish and sailed back to shore. He thought to himself, "I can't wait for the next time I can sail." <|endoftext|> Once upon a time, there was a dependable monkey named James who lived in the woods. He went out every day looking for food and play. All the animals in the forest respected him and always followed his lead. One day James heard a strange noise coming from the top of the tallest tree. He asked his friends what it was and they told him it sounded like a x-ray machine. James wanted to find out what it was, so he started climbing up the tree. When he got to the top of the tree, James saw a man was spraying a weird powder all around. The man noticed James and said "Hey kid, don't you never spray anything without thinking first. It could be dangerous". James understood the message and thanked the man for his advice. From then on James was more thoughtful when it came to taking risks. He remembered that being dependable is the most important thing to be. The moral of the story is to always be careful when taking risks and to trust yourself when it comes to making decisions. Always remember to be dependable! <|endoftext|> Once upon a time there were two friends, Jack and Jill. They were walking in the woods when they saw a turkey. “Let’s get the turkey!" said Jack. Jill was scared so she said, “No. That turkey is too fast. We won’t be able to get it." Jack didn’t give up and said, “I can get the turkey if I run fast." Jack ran fast, but the turkey ran faster. Then something amazing happened. Jack received help from a friendly animal! The animal ran after the turkey and caught it. Jack was very happy and said, “Thank you for helping me get the turkey.” The animal smiled and said, “You’re welcome. Now you can enjoy the turkey. Have a good day!” Jack and Jill received the turkey and ran home. They had a wonderful dinner that day and were very happy. <|endoftext|> Once upon a time there was a brilliant engine who lived in a car. One day, the car drove to a special place with a lot of cars. The engine met many other engines. They all said hello and introduced themselves. One engine was especially friendly. His name was Alfie and he was just like the others but he was even more brilliant. The engine was so excited to meet Alfie. The engine said to Alfie, “ Hi, I’m the engine. I’m so glad to meet you!” Alfie smiled and said, “Glad to meet you too! Let’s be friends.” So, the engine and Alfie became the best of friends. From then on, the engine was never alone and was always happy. <|endoftext|> Sam was a curious little three-year-old, who loved going on adventures. One day, while walking outside, he noticed a big, gloomy looking door. A chill ran down his spine, but his curiosity was stronger. He tip-toed closer, and peeked inside. Suddenly, he saw something strange. It was big and white, and had funny long arms and strange long fingers. Sam was a bit scared, until it spoke. "Don't be afraid," said the skeleton. "My name is Skeleton. I live in this dark, gloomy room, and I'm looking for a friend to play with - someone like you!" Sam was so excited. "I'll be your friend," he said, shouting and jumping up and down. He couldn't believe he was playing with a skeleton. Since then, Sam and Skeleton have been the best of friends. They play every day, and Sam tells him about all his adventures outside. Skeleton loves hearing about them, and since then, his room isn't so gloomy anymore. <|endoftext|> Bob needed to go the bathroom. He ran down the hallway and into the bathroom. It was really hot in the bathroom; the sun was beating down on the windows. It made Bob feel warm and uncomfortable. Bob went over to the faucet and tried to turn it on. But the water wouldn't come out. Bob knew that something was wrong with it, so he called for his mom. "Mom! The water won't come out! What should I do?" he said. "It needs to be improved," said his mom. "It looks like it's broken." Bob was disappointed. He didn't like the idea of having no water in the bathroom. He knew that it wouldn't be fixed until his mom paid someone to fix it. So Bob had to find another way to solve his problem. He looked around but there wasn't anything else he could use. Bob was upset, but there was nothing else he could do. He hoped that the bathroom would get better soon, but it looked like he would have to wait. <|endoftext|> Once upon a time, there was a brave prince. He loved to learn swordfighting. Every day he would go practice with his teacher. One day his teacher said he was ready to learn the secret of the sword. The prince watched carefully as the teacher taught him. He learned quickly and the teacher was impressed. As the prince was leaving, the teacher said, "Remember to share the secret with no one!" The prince promised he would not. The prince practiced with his sword every day. Everyone was amazed how fast he was learning and how good he was getting. The prince's friends became envious of him and wanted to learn the secret too. But the prince kept his promise and did not teach them. The prince kept improving and his friends kept coming back asking him to teach them. But the prince just smiled and kept practicing. <|endoftext|> Paul was feeling very happy. Today he was meeting his old friends from his childhood. Paul was excited to see them again as it had been a long time. When he arrived, he was reminded of all the fun they used to have together. Paul said, "Do you remember when we used to play together in this park? It was so much fun!" All of his friends nodded and started laughing. His friends suggested they should keep in touch, so they decided to create a network. This way, they could always stay in touch, no matter where they were in the world. They wanted to make sure that their network was reliable so they exchanged emails, telephone numbers and addresses. Paul was delighted. "This is a great idea! Now, we always have a way to stay connected". His friends agreed and all of them hugged before saying goodbye. Paul couldn't believe how lucky he was. He was reminded of how wonderful it was to have such reliable friends. <|endoftext|> Mia was walking in the forest. She heard something that made her stop and listen. Was it a bird chirping? No, it sounded like whistling. She looked around and saw a strange man. He was holding a spear and looking very sad. Mia ran up to him. "Hello!" she said. The man jumped and looked up. "Oh! I'm so sorry," he said. "I was just walking and the sun was so warm and I was feeling so lonely that I started to whistle." "It's OK," said Mia. "I like to whistle too. Will you be my friend?" The man smiled. "Yes I would love to be your friend," he said. Mia and the man were now best friends. They enjoyed walking in the forest and whistling together. Whenever the man felt sad, Mia would hug him and say, "It's OK. Everything will be alright." The man was so happy to have such a wonderful friend. He knew he would never feel alone again. <|endoftext|> John was in the park with his Mom. He loved the park and he was always looking out for animals. Suddenly, he saw something in the distance - it was a big, green dinosaur! John was so excited so he couldn't help running towards it. John's Mom yelled after him and warned him to stop. She said to John, "The dinosaur is not available John. You cannot go near it." John stopped and looked at the dinosaur. He couldn't believe that a real, living dinosaur was right in front of him. He wanted to get closer but he listened to his Mom and stayed where he was. John waved goodbye to the dinosaur as he and his Mom left the park. John was happy to have seen a dinosaur and he smiled the whole way home, thinking about his special sighting. <|endoftext|> Once upon a time, there lived a little girl named Kate. She was 3 years old and loved to play with her toys. One day, she was playing with her stuffed cat, when she noticed a red spike on the ground. She picked it up and looked at it curiously. "What is this little thing?" she asked her mom. Her mom smiled and said, "It's a printing spike. It can help you print your own stories and pictures." Kate was very excited to hear this, so she tried to print something. She carefully pressed the spike onto her paper and, sure enough, a nice red print was made. "Wow!" she said with excitement. From then on, she used the printing spike to make all kinds of stories, pictures and designs. Kate and her family were so proud of her. She had made so many red prints with her spike. From that day onwards, Kate was known as the printing queen. <|endoftext|> Once upon a time, there was a clumsy mole who lived in a big field. He was a very clumsy mole, and he was always tripping over his feet. One day, the mole's best friend, a squirrel, came over for a visit. The mole was excited and asked his friend, "What should we do?" The squirrel answered, "Let's cover things with leaves!" The mole thought it was a great idea, so they spent the day covering things like rocks, trees, and even a hole in the ground with colorful leaves. When they were done, the mole was tired and said, "This is fun! Let's do it again!" The squirrel laughed and said, "Sure, let's do it tomorrow!" The End. <|endoftext|> Once an day, Jimmy and his mum went to the park. Jimmy was so excited to go on a special adventure. He saw a big wheel and wanted to go on it. Together he and his mum hopped on the wheel and soon it began to zoom around! Jimmy was so delighted to go so high, he started to laugh and waved at the birds flying around him. Eventually the wheel stopped and the operator gave Jimmy a prize for his bravery! Jimmy was so excited to receive a prize that he ran around the park in celebration. On the way home, Jimmy's mum was a little frustrated. She wanted to find a shortcut to get home quicker, but no matter which way they went they seemed to end up back at the park. Frustrated she decided to take the long way home. Jimmy didn't mind though and zoomed right by his mum all the way home, clutching his prize close. From that day Jimmy knew that he would always have an adventure with his mum! <|endoftext|> Once there was a girl named Sally who loved to dance. She was always moving around her house, singing and dancing. One night when Sally was dancing, her mom came in and put her to bed. Before Sally went to sleep, she thought about dancing and imagined a peaceful place where she could dance forever. She closed her eyes and imagined a beautiful place full of trees and flowers. In the middle of the forest was a big, open grassy area where Sally could do her favorite dance. Sally knew that if she slept well, she would be able to go to her peaceful place and dance the next day. So she went to sleep feeling peaceful and happy. In the morning, Sally got to dance in her secret place. She moved around, twirling and jumping, smiling and laughing. As she danced, a warm breeze made her dance even more and she felt a peaceful feeling inside her heart. Sally danced until she was tired and then she hugged herself and said: "I love to dance in my peaceful place, it makes me feel so happy." <|endoftext|> One sunny day, Jimmy found an old bicycle in the grass. It was hairy with lots of rust. He couldn't wait to try it! Jimmy ran to get his older brother Dave, who was very happy to help him. "Let's push it to the street," said Dave. So they both grabbed the handle bars and pushed the old bicycle. Suddenly, they heard a loud noise. It was Jimmy's dad! "You kids stop right now!" he said in a angry voice. Jimmy and Dave were scared. But it was too late. When they looked down, they saw that a strange hairy creature surged out of the bike. It had sharp teeth and long claws. Then it angrily growled at Jimmy and Dave. The two brothers ran away in terror, leaving the old bicycle behind. They never saw it again, or the creature that had grown out of it. <|endoftext|> Once upon a time there lived a shy little girl named Denise. Denise loved adventures and playing outside. One day Denise went to the beach and asked her mom if she could swim in the ocean. Her mom said to be careful, because there might be a hurricane coming. Denise's mom was worried, but Denise wasn't scared. She felt like she could do anything. So Denise kept playing and swimming in the ocean. After a while her mom noticed there was a storm coming. She yelled for Denise to come back and get out of the water. But Denise wanted to keep swimming. She wanted to prove that storms couldn't stop her. Suddenly the scariness of the hurricane came closer and the waves were getting bigger and bigger. Denise was so frightened that she started to cry. Her mom ran to Denise and said, "Honey, you were so brave, but you should always listen to me so you don't get hurt. You can be brave, but still be careful." Denise hugged her mom and felt relieved. She had learned a very important lesson that day – you can be brave, but it's important to listen to the advice of others. <|endoftext|> Once upon a time, there was a naughty little mouse. His name was Peter. Peter liked to play all day and never listen to his mom. One day, Peter took a walk in the forest. Suddenly, he saw something that made him blink - a secret door! He ran quickly to the door and peeked inside. "Oh wow!" Peter said. "Who goes there?" a voice said from inside. Peter was so scared that he couldn't say a word. After a few moments, the voice spoke again. "If you want to enter this secret door, you must answer a riddle. If you can't answer it, you must go away." Peter thought for a minute and then asked, "What is the answer?" The voice replied, "Beware the naughty ones!" Peter smiled and said, "I know the answer! I'm naughty, but I'm also very curious! May I enter please?" The voice laughed and said, "Yes, you may come in and explore the secret door!" And so, Peter did. He explored the secret door with great curiosity and had many adventures! <|endoftext|> Once upon a time there was a small bunny called Alice. Alice liked to do things all by herself. She was very independent. One day Alice went to visit her friend. When she arrived there was a big fridge in the middle of the room. Alice had a great idea. She opened the fridge and found a big surprise. She saw yummy ice cream. She wanted to eat it all by herself, so she grabbed a bowl and the ice cream. She closed the fridge and enjoyed her ice cream. She remembered to always be independent. The next day Alice and her friend were playing outside. Alice saw a fridge in the garden. She was so excited and rushed over. She opened it and saw something sparkly. It was a magic wand! Instinctively, Alice remembered what to do with the wand - make a wish. She closed the fridge and made her wish. She wished to always remember to be independent. In that moment, she felt so special. Alice will never forget the magical moment when she found the magic wand in the fridge, and she will always remember to be independent. <|endoftext|> Once upon a time, there were two bears, Bob and Jenny. Bob was a young bear, and Jenny was an old bear. They were discussing the summer day. "The sun is shining brightly and it's making the blossoms in the trees sparkle," said Jenny. Bob looked at the ground and noticed the dust near his paws. "What's this dust?" he asked Jenny, pointing towards the dirt. Jenny smiled. "That dust is from the old path," she said. "It's been here for many, many years." Bob smiled back. He thought about the years that had gone by and how young he still was. "Let's go find some new adventures!" he said with excitement. And so they did. They explored the woods and enjoyed their summer day together. <|endoftext|> Once upon a time there was a little girl, who was very excited. She loved playing outside, especially in her garden. One day, when she was playing in the garden, she spotted something unusual. She saw a vine had started growing up one of the walls near her window. "Wow, that's so cool!" the little girl exclaimed. The vine kept growing and when the little girl returned to the garden, the vine had changed - it had now covered the entire wall! The little girl was so excited that she ran inside to get some help. She quickly found her mommy and told her about the vine. "Mommy, I want to climb the vine!" the little girl said, hopping from one foot to the other. Her mommy smiled and said, "Okay, but be careful!" The little girl carefully climbed the vine to the top of the wall, and she was so proud of herself. She was excited to have done something so special and was looking forward to doing it again! <|endoftext|> It was a hot summer day. Lucy and her mom were out in the yard. Lucy's mom was gardening and Lucy was playing with a ball. Suddenly, Lucy's ball rolled towards the house and stopped at the back door. Lucy went over to get the ball, but it was stuck in the door. She called out to her mom, "Mommy, help!" Her mom said, "I'm busy right now, but try to open the door yourself." Lucy tried to open the door, but it wouldn't move. She was getting frustrated. So she leaned her shoulder against the door and pushed as hard as she could. Suddenly, the door opened revealing a filthy freezer. It was filled with old food and had a nasty smell. Lucy was so surprised that she jumped back. She asked, "Mommy, what is this?" Her mom said, "It's a freezer, Lucy. We need to clean it up." Lucy grabbed her mom's hand and said, "We can make it look like new!" And so, with a lot of effort, Lucy and her mom cleaned the freezer until it looked brand new. When they were done, Lucy smiled in satisfaction — her job was complete. <|endoftext|> Mommy and Daddy were eating dinner. Mommy said, "What do you want for dinner?" Daddy looked at the menu and said, "I can't decide. It looks difficult to choose." Then Daddy had an idea. He said, "Let's play a game. I'll count to three and on three you will forget everything you were thinking." Mommy said, "Ok, that sounds fun!" So Daddy started counting, "One, two, three!" As soon as he said three, Mommy forgot everything and said, "I don't know what I want!" Daddy smiled and said, "How about the mac and cheese?" Mommy smiled too and said, "Yes, that sounds good!" So Daddy and Mommy ordered the mac and cheese for dinner. They both enjoyed it and had a happy evening together. <|endoftext|> Once upon a time there was a little girl called Lacy. She was very happy, playful and loved to explore her world. Every day, Lacy had lots of fun as she played in her backyard. She always ran around the garden with the sun shining on her back. One day, when Lacy was playing outside, she heard something in the bushes. She looked around and saw a small furry creature looking back at her. It was a tiny little fox, just like she had seen on TV. She was so excited and shouted, "Mine!" The fox, who was also very playful, didn't run away and even came closer. Lacy started petting the fox and ever since then, the fox became her best friend. From that day onward, Lacy and the fox went on many adventures together, running and playing through the garden and discovering the world around them. Little did Lacy know that one day, the fox would protect her from danger. But that's a story for another day! <|endoftext|> Once upon a time, there was a chubby little girl called Daisy. Daisy loved her mummy and daddy very much, and she spent every day playing with them. One day, Daisy went to play in the garden. While she was there, she found a beautiful crystal lying in the grass. It glittered in the sunshine and Daisy thought it was magical. She wanted to keep it for herself. Daisy put it in her pocket and ran back to the house to show mummy and daddy. But when she got there, she saw that someone had disturbed the living room. Everything was in a mess and her parents were nowhere to be seen. Poor Daisy started to cry. She was scared and she didn't know what had happened. She was so upset that she dropped the crystal and it made a loud noise when it hit the ground. At that moment, the bad robbers returned to the house. The crystal made them angry and they chased Daisy out of the house. They never saw Daisy again. Her parents were so sad that she was gone. Daisy's chubby little face never returned to the house again. <|endoftext|> "What are you doing grandma?" asked Charles. "I'm adding yarn" said grandma. "Wow! What a lot of yarn!" said Charles. He watched as grandma wound the high yarn around her fingers and added more. "Why are you making yarn?" asked Charles. "I'm making a special scarf for your mom's birthday," said grandma. Charles smiled. "Can I help you add the yarn?" he asked. Grandma smiled and gave Charles some yarn to add. They spent the rest of the afternoon adding the yarn together. They laughed and sang as they worked. At the end of the day, the scarf was finished. It was a long, high scarf, full of many colors. Charles was so proud of the finished scarf. "That looks wonderful" said Charles. Grandma smiled. "It sure does," she said. "It was so nice to have your help in adding the yarn. You did a great job." <|endoftext|> Ben and his dad walked through the swamp. Everywhere there were logs lying around. Dad was looking for a perfect log to take home. "Where's the perfect log?", Dad asked Ben. Ben looked around. Everywhere was wet and somebody had put lots of logs there. Dad became impatient. "Maybe if we struggle to find the log it will help," Dad said. Ben started feeling around the logs and pushing them to see which was the perfect log for Dad. At last, Ben found the perfect log and gave it to Dad. Dad was so happy. He thanked Ben for his help. Together they took the log home. <|endoftext|> Once upon a time, there lived a young girl. Her name was Molly and she was three years old. Molly's mummy was so proud of her daughter. One day, Molly was feeling a bit wild. She wanted to do something daring. So, she asked her Mum, "Mummy, can I wear a skirt?" Mummy thought carefully and then suggested, "Why don't you try wearing a shorts? Wearing a skirt is a bit difficult." Molly thought this was a great idea. She got very excited and ran to her wardrobe to find a nice pair of shorts <|endoftext|> Mummy and John were in the park. John was eating his ice-cream, while Mummy was talking to a friend. Suddenly, John felt embarrassed as he saw everyone around them staring at him. He quickly tried to hide the ice-cream behind his back. Mummy noticed his embarrassment and asked, "What's wrong, John?" John replied, "They are all looking at me." Mummy smiled and said, "That's normal, the ice-cream is yummy, why don't you show it to them?" John reluctantly put the ice-cream back in his hand and tried to smile, but the other children kept staring at him. He felt even more embarrassed and started to cry. Mummy hugged him and said, "That's ok, everyone makes mistakes. Let's go home now." John sadly nodded and Mummy took him home. The ice-cream was all gone, but the embarrassment he felt was not. <|endoftext|> Jack and Jill were walking up the hill. Jack said to Jill, "I am thirsty. Let's get some water from the river." They quickly ran to the riverbank. Jack was surprised to see the river was dry! He asked Jill, "What are we going to do now?" Jill pointed to an old man in a tip. She said, "That man might be able to help us." Jack and Jill ran to the old man. He said, "Don't worry children, I can supply you with some water." He then took out a bottle of cool and refreshing water. Jack and Jill thanked the old man, and he said, "You children should always remember to be helpful and kind to others." They said goodbye and walked away with their water. Jack and Jill enjoyed their cool and dry water, and they were thankful they had been able to find help. <|endoftext|> Once upon a time, Mummy, Daddy and their daughter, Isabel, sat down at the dinner table. Daddy looked at Isabel and asked her what she wanted to discuss. She smiled and said she wanted to talk about something unusual. Mummy and Daddy started to discuss dinner and Isabel heard them talk about something unusual. She wondered what it was and asked them what it was. Mummy said that it was a special dinner that she had cooked. She had put lots of unusual ingredients together, like carrots, celery and some strange spices. Isabel was very excited and couldn't wait to see what it tasted like. Mummy smiled and said the dinner was a surprise and that Isabel would have to wait until it was ready. After a short while, Mummy brought in the dinner. When Isabel saw it, her eyes went wide. It looked so delicious! Mummy asked Isabel what she thought of the dinner. Isabel said it was the most unusual dinner she had ever seen. She tried a bit of everything and said it tasted delicious. Mummy, Daddy and Isabel all smiled as they enjoyed the dinner together. Every time they ate dinner after that, Isabel would always ask if there was something unusual to talk about! <|endoftext|> Henry loved to learn about the world. He loved to watch people and see what they did. One day, Henry went for a walk and saw a smooth lake. He wanted to learn how to swim but he had some trouble. He kept trying, but he couldn't get the hang of it. After many attempts, he got frustrated. He felt like giving up. But he kept trying until he finally learned how to swim. He was so proud when he could swim smoothly. He learned that if he worked hard and kept trying, he could achieve anything. He learned a valuable lesson that day. <|endoftext|> Once there was an old man. He saw an old brick and thought it would be fun to take it home to play with. So he went to steal it. He was hiding behind a tree when he heard someone coming. He saw it was a little girl. She looked at the old brick and said, "That'll be nice to have for building my house." The old man said, "You can't take that. I'm going to steal it for myself." The little girl replied, "Well, you can't do that. That's not nice." The old man thought for a minute. Then he said, "How about I share it with you? We can both have it and play together." The little girl smiled and said, "Yes, that sounds fun!" So they both took the old brick home and had lots of fun building together. <|endoftext|> The sun showed its face in the morning sky and it shone brightly. The birds flew up to the sky and sang their happy song. Then, a little girl named Lucy came out of her house and looked up. She saw the bright sun and the fluffy clouds. She was so happy that she jumped up with excitement! Lucy: "Look at the beautiful clouds! I wish I could go up and touch them!" Suddenly, there was a rumble in the sky. Something had blocked out the sun and the sky had become dark. Lucy looked up and saw that a big selfish cloud had come between the sun and the sky. Lucy: "No, not that selfish cloud! Get away!" But the selfish cloud didn't move. It just stayed there and blocked out the sun. Lucy was sad and she slowly walked back to her house. The sun slowly returned and the sky became sunny and bright once again. Lucy was surprised that the selfish cloud had gone away. She was so happy that she smiled and shouted in joy. Lucy: "Yay! Thank goodness the selfish cloud is gone!" <|endoftext|> Once upon a time, there was a girl. She was very excited, because her mom had just given her a surprise. It was a special present—a red pedal car! She could go anywhere she wanted with it. Her mom also said she had to be organized when driving it. The girl was a bit scared at first, but then she felt brave. She thought it looked fun, so she asked her mom if she could go for a drive. Her mom said yes and gave her a permit to be in the streets. The girl put on her helmet and safety vest, then she hopped into her pedal car. She started pedaling as soon as she could. She was so happy and excited to explore the world and feel the wind in her face. She drove around the town, meeting all kinds of people. She went over the hills, up and down the roads, and everywhere felt different. Everyone said hello and waved to her, and it made her smile. By the end of the day, the girl felt so proud. She drove the pedal car so well, and it was all because her mom had taught her how to be organized. She thanked her mom for the special present and promised to be careful when outside in the streets. The girl then grabbed her permit and her special pedal car, hopped in, and drove off into the sunset. <|endoftext|> Little Jack was so proud of his igloo. It was the biggest one in the neighbourhood and he had worked so hard on it with his dad. Little Jack's dad called to him from the porch. "Let's go for a walk!" he said. Jack eagerly jumped up and ran over. "Where will we go?" he asked. Dad smiled. "Let's go and visit the Arctic Igloos," he replied. Little Jack was so excited. He ran ahead of his dad as they made their way to the igloo village. As they got closer and closer, they could see all the igloos in their bright colours. Little Jack gasped in amazement. Dad pointed to the biggest one in the village. "I bet that's the most important one," he said. Little Jack smiled. His dad was right. He ran ahead and urged his dad to follow. As they got closer, Jack could see his dad's proud smile. <|endoftext|> Once upon a time there was a heavy truck. The truck belonged to a man called Ben. One day, the truck stopped working, so Ben took it to a mechanic. When Ben arrived at the mechanic's shop, the mechanic told him that the truck had frozen. He said it needed fixing before Ben could drive it away. Ben asked the mechanic, "Can you fix it?" The mechanic looked at the truck and said, "Yes, I will fix it. But it will take me some time." So Ben left the truck at the mechanic's shop and came back a few days later. When he arrived, the mechanic said, "It is fixed! You can drive your truck away now." Ben was so happy. He drove the truck home, and it never froze again. <|endoftext|> Once upon a time there were two friends, Jack and Lea. They were playing in the park one day when Jack said, "Let's do an exercise!" Lea said, "What's an exercise?" Jack said, "It's a rare thing that we can measure. It's a thing that makes us feel strong and happy. It's fun!" The two friends ran around in circles, then jumped up and clapped their hands. After that, they sat down and counted the number of jumps they had done. Then Jack said, "We did a big exercise! Let's do more!" The two friends continued to have fun while they did their exercises. And they felt very proud of themselves when they measured their progress. The end. <|endoftext|> Once upon a time there was a little girl called Max. Max loved to play outside in the sunshine. One day, while she was playing, a big bad monster appeared. The monster had three heads and wiggly arms. Max was scared and wanted to run away. But the monster offered her some sweets. "If you come a bit closer, I can give you some nice sweets," said the monster. Max was still scared and didn't want to get too close. But then the monster said, "I won't hurt you. I just want to give you a gentle touch to show I'm a nice monster." Max could see the monster looked different than usual monsters and decided to take a closer look. She reached out to take the sweets and noticed the monster was giving her a gentle touch instead of a bad one. Max started to feel much better. After that, they became friends and they would often play together in the sunshine. <|endoftext|> Once upon a time there was a little girl called Amy. She was three years old and she had a pet puppy. The puppy was very playful and always running around the garden. But one day, Amy's mommy put up a fence in the garden made of wire. It was very high and the puppy was sad that she couldn't play as much anymore. That night, Amy noticed the puppy outside the fence, trying to get back in the garden. She asked her mommy why the puppy couldn't get in, and her mommy said the fence was there to make sure the puppy behaved. Amy felt frustrated. Even though she understood why the fence was there, she wanted to make her puppy happy. And so she decided to find a way for her puppy to still have fun. The next day, Amy and her puppy went for a walk and she discovered a park with lots of wide open spaces and interesting toys. She brought the puppy to this park everyday so that it could have fun and use up its energy. Amy was very happy that she had solved the problem. Her puppy was behaving and was happy again. <|endoftext|> Once upon a time there was a young girl who lived in a small house. One day she decided to go for a walk in the woods near her house. While she was walking, she saw a small door in the ground. She used all her strength to push it open and saw some stairs that led up to an attic. She went up the stairs and when she entered the attic, she saw someone. He was dressed in all black and he looked like he was in a hurry. He spoke to the young girl, "You should not be here. Hurry, go back the way you came". The young girl was scared and she quickly ran back the way she had come. But before she could get very far away, the man chasing her appeared. He was coming closer and closer. The young girl started to cry and she ran faster, but she couldn't outrun the man. He quickly caught up to her and grabbed her. The young girl was never seen again. <|endoftext|> One day there was a clever radio. It sang lovely songs and made everyone happy. But then something strange happened. The radio began to split in two. It split and split until the pieces were very small. Everyone was so sad to see their clever radio fall apart. But then a very special thing happened. A man came and fixed the radio, and soon it was singing again. Everyone was so happy and cheered that their clever radio was back! <|endoftext|> Minnie was a three year old girl who loved to explore. One day, she decided to investigate an old house in the woods. As she started to look around, she noticed a message written on the door - it said "tough times ahead". Minnie was confused by this, but she knew it was something important. She kept exploring and soon she heard a man's voice. He was talking about something called a "message". Minnie had no idea what he meant and she walked up to him to ask. He explained to her that a message was a way to tell someone about something important. Minnie was still a bit confused but the man reassured her and said, "Whenever you miss someone, you can send them a message." He showed her how to write a message and soon Minnie was on her way with a note in her pocket. When she got home, she shared the note with her family who hugged her tight and said: "We always miss you when you're away". Minnie smiled, feeling extra special and safe. She had learned an important lesson - tough times can be made better with a simple message. <|endoftext|> Once upon a time there was a car. The car was slow and it made the driver feel sad. The driver said, "I wish I could make my car go faster." The driver's friend said, "I have an idea, let's try to improve your car!" The driver was so happy. The friend and the driver began to work on the car. First, they made sure the wheels were tight. Then, they put some new oil in the engine so it would run better. When they finished, the driver started the car to see how it ran. The car roared to life and drove faster than before. The driver and his friend were so happy! The driver said, "I knew we could improve my car!" They were both so proud of their work. Now the driver can get where he needs to go faster. <|endoftext|> Once upon a time, there lived a little boy named Jimmy. One cold day, Jimmy was playing with a knife in his yard. He thought it was fun to use the knife to cut things. Out of the corner of his eye, Jimmy saw his dad, who said to him, "Jimmy, knives are not toys. You must be very careful with them, or you could get hurt!" Jimmy was scared and put the knife away. From then on, he was more careful whenever he was holding a knife. The moral of the story is that we should always increase our care and caution when using sharp objects like knives. <|endoftext|> Once upon a time there was a girl called Emma. Emma was very obedient. One morning, Emma went into her classroom. As she entered, she saw her teacher sat at the desk. Emma said “Hello teacher” and smiled. The teacher smiled back and said, “Hello Emma, it's nice to see you.” Emma walked over to the desk and put her bag down. She had some pencils in her bag. The teacher said, “Emma, I want you to be obedient and write your name on the whiteboard.” Emma nodded and started to write her name carefully. When she had finished, the teacher said, “Well done, Emma. You have been very obedient. You can sit back down at the desk now.” Emma smiled and went back to her desk. She was proud of herself for being obedient. She was happy to be in her classroom. <|endoftext|> Once upon a time there was a girl called Molly. She was three years old and loved learning new things. One day she saw something new, she did not know what it was called. It was a big green thing. She asked her mother, "What is that thing?" Her mother smiled and said: "It's called a plant. Would you like to learn about it?" Molly was very excited and said: "Yes, please!" Her mother introduced her to the plant and explained how to take care of it. She said: "You need to water it every day, so it will stay healthy". Molly really wanted to make her new plant happy. Every day, she would water the plant and scream out happiness whenever she saw it grow. She was so happy when she saw the plant grow bigger and bigger. She was very persistent in taking care of the plant, and she never stopped. Finally, the plant blossomed and Molly was so proud. From then on, Molly introduced her plant to everyone she knew. <|endoftext|> Once upon a time, there were two people who were very happy - their names were Jack and Jane. They loved each other very much, and so they decided to get married. They had a big party, and all the people at the party were happy and excited. After they got married, Jack and Jane went to sleep in their cozy bed. They were so tired from all the excitement that they fell asleep very quickly. The next morning, Jack and Jane woke up and hugged each other. They were very happy because they were married now, and they loved each other very much. Jack and Jane were so happy that they went back to sleep, cuddling each other. So they slept and stayed very tired, but they were still very happy and in love. The end. <|endoftext|> Once upon a time, there was a bear. The bear was walking through the woods when he heard a loud snap. He looked around and saw a curtain hanging down from a branch. He was curious, so he went to see what had made the noise. There, he found a little mouse. The poor mouse had gotten its tail caught on a twig and had snapped it off. The bear was very sad, he could tell the mouse was hurt. He looked around and found a soft leaf to wrap up the mouse's tail. He kept it safe until the mouse felt better. Then, he hung the curtain over a branch to make a cozy home for the mouse. The mouse thanked the bear and said goodbye as he scampered off into the woods. The bear was glad he was able to help the little mouse and make sure it didn't get hurt anymore. <|endoftext|> John was a little boy. He loved to go outside to play with the birds and trees. One day, he went out to the park. The sun was shining and the trees were blowing in the wind. John felt so powerful. He felt like he could fly. He started to run and jump around and feel graceful like a bird. Suddenly, John fell to the ground. He cried out for help. A man came running to help him. The man spoke, “You were being too brave and over confident. You cannot use your power like that.” John felt sad. He learned a lesson he would never forget. He knew he had to be more careful. John never went outside to play again. He was too scared to feel the powerful, graceful energy again. <|endoftext|> Once upon a time there was a thin tower. It was so tall that it stretched up into the clouds. Every day a girl would come and stare up at it. She enjoyed watching it, and the tower seemed to watch her back. One day, the girl couldn't take her eyes off the tower. There was a feeling in her gut that something special was about to happen. The girl made a wish. Suddenly, a loud boom filled the sky. The tower was beginning to fall! It was tumbling slowly to the ground. The girl had been wishing that the tower would get closer so she could touch it. And her wish had come true! The tower came so close that the girl could reach up and touch it. The girl felt happy and amazed. This was the best day ever! <|endoftext|> Once there was a boy named Jack. He was three years old and he loved playing with his friends. One day, he was walking in the park when he saw a glove on the ground. He picked it up and asked himself, "Whose glove is this?" He looked around but there was no one in sight. Then he came upon an old man and asked, "Excuse me, sir, can you answer me? Whose glove is this?" The old man smiled and said "Ah, this glove belongs to me. I must have dropped it while I was walking. Thank you for finding it." Jack was happy that he solved the mystery of the glove. But then he remembered something. He asked the old man, "Can I have your glove? It's so soft and looks very easy to use." The old man thought for a moment and then said, "Yes, you may have the glove. I think it would make a wonderful present for you." Jack smiled and thanked the old man. From then on, he kept the glove with him everywhere he went! <|endoftext|> Once upon a time, there was a pretty kitty who lived with its mommy in a nice home. The kitty was always so careful, but one day it noticed something strange. A thief had snuck into their home while they were sleeping. The kitty grazed the furry creature and soon realized it was not its mommy. The thief was scared, so it quickly ran away. The kitty jumped up and chased after it. The thief could not get away fast enough, but it was still able to make it far away. Mommy came out of the house and saw the kitty gone. She called for her, but the kitty was too far away and couldn't hear. Mommy searched the entire neighborhood, but she couldn't recognize the thief or the kitty. She started to get scared and soon worried that the thief had taken away her pretty kitty. After much searching, she sadly went home without the kitty. The kitty never returned home and was never seen again. <|endoftext|> One day, a little boy was playing in his garden. He was excited to feel the sun on his face and the grass beneath his feet. Suddenly, he noticed a spider crawling towards him. He became scared and started to move away. The spider started chasing the little boy, who ran back and forth, looking for a place to hide. He was frustrated that the spider kept following him. Just then, the boy's mother appeared. She said, "What is going on here?" The little boy replied, "Mummy, there's a spider chasing me. I don't like it." His mother smiled and said, "That's okay. Spiders won't hurt you. Just try and stay calm and relax." The little boy tried to take a deep breath and slowly, he began to feel less scared. He said, "Okay, I'm not scared anymore." The spider soon stopped chasing him and he was no longer frustrated. He smiled and said, "Thank you, Mummy!" <|endoftext|> Mary and James were happily playing together in the summer sunshine. Mary thought to herself that summer was very attractive. She smiled, then said to James, "Let's add something to our game." "What should we add?" asked James. "What about if we pretend there is a cave under the tree, and we have to explore it. We can take a stick and a pretend map!" Mary replied. James's eyes lit up with excitement. "That sounds great!" Mary and James gathered some sticks and stones, and began their adventures. They pretended they were discovering all kinds of things in their pretend cave, and enjoyed their game so much they didn't want to stop. The two friends made up amazing stories as they explored, adding new ideas to their game. Summer was the best time to adventure together and have lots of fun! <|endoftext|> Once there was a very shy 3 year old named Andy. He liked to play with his many teddy bears, but he wasn't sure what to do when he was outside. One day, Andy's mom took him to the park. Andy was scared and didn't want to join the other kids. His mom said, "Come on, Andy. You will learn something here, and it will be fun too!" At first, Andy was hesitant, but eventually, he gathered his courage and went to the playground. He felt a bit dull there, but he soon found out that he could make new friends. In addition, he was able to learn all kinds of things in the park. Each day, Andy spent time in the park with his new friends. He learned how to climb up a tall slide, prices of different things he saw, how to swing with grace, and more. When it was time to leave, Andy was sad. He thanked his mom and said, "I want to come to the park everyday. It was really fun to learn so many things here!" <|endoftext|> It was a hot day and Sandy and her mommy were at the park. Sandy blinked in the bright sunlight and looked around. Everything was so much fun. Suddenly, Sandy saw a butterfly fluttering in the sky. She was mesmerized. She started to walk towards it when her mommy yelled "wait, Sandy!" Sandy stopped and looked back at her mommy. Her mommy blinked and smiled. "Let's go and have a picnic," she said. So they spread a blanket on the grass and unpacked the food. While they ate, the butterfly flew down and landed on Sandy's shoulder. Sandy gasped in surprise and smiled. She closed her eyes and blinked slowly. She felt so happy. Afterwards, Sandy and her mommy packed everything away and headed home. Sandy couldn't stop smiling. She promised herself that she would always remember that special day at the park. <|endoftext|> Once upon a time, there was a little boy named Tom. Tom loved to look up at the sky every night. He would often see a comet speeding by and it would always make him happy. One night, Tom was a bit worried because he couldn't see the comet. He asked his mom, "Mom, where is the comet? Why can't I see it?" His mom smiled warmly and said, "Don't worry, Tom. It will rise again soon." Tom was confused. He asked, "What does that mean?" His mom explained, "It means that it will appear again. Everyone and everything has their ups and downs, just like the comet. Just be patient and it will come back to us." Tom nodded and looked up at the night sky. He was no longer worried. He knew that everything will come back even if it seems to be gone for a while. Tom had learned a valuable lesson from his mom: don't worry even if something is gone for a while. It will rise again. <|endoftext|> Kari was so excited. She was going to the park. "Mum, can I take the blocks?" She asked. Mum said yes and gave Kari a bag full of blocks. At the park, Kari found a big tree and sat in the shade. Then she looked around and noticed another child playing with some blocks. Kari was jealous. She wanted to play with the blocks, too. She began to cry. The other child came over to Kari. "You can play with me," he said. Kari felt much better and was very happy. The two of them played with the blocks together. They built a tower that was very tall. Kari was so proud of what they had built. Mum watched them from a distance and smiled. She said, "I'm so glad you found a friend to play with." <|endoftext|> Jimmy was swinging in the playground. He loved being high up in the air and how it made him feel so light. His friends were there too and everyone was having a great time. Suddenly, Jimmy heard a loud noise. He stopped swinging and looked around. He saw a jar lying on the ground near the swing. He ran to it and picked it up. The jar had a gentle pattern, with blue and yellow flowers. Jimmy brought the jar closer to his eyes and saw a ladybug crawling around inside. It was really tiny. He smiled and called his friends. "Look what I found!" he said. His friends gathered around him and all looked at the little lady bug. They oohed and ahhed and said it was so cute. Then the lady bug stopped and Jimmy decided to set it free. He opened the jar's lid and gently turned it upside down. The lady bug hopped out and flew off into the sky, free to explore its new world. Jimmy smiled and watched until it was out of sight. Then he went back to swing with his friends. That had been an exciting find and he couldn't wait to tell his mom about it when he got home! <|endoftext|> Once there was a generous bear. He liked to help others and was always very kind. But he had one habit that no one really knew about: he loved to eat clay! Every day he would go outside and search for clay in the woods. Then he would find a quiet spot, sit down and take a bite of the delicious clay. One day, he stumbled across two little kittens. They were feeling scared and alone, so the bear was very generous. He shared some of his clay with them and the kittens were so happy. The bear and the kittens became fast friends, and they would go out into the woods every day searching for clay. Sure enough, they always seemed to find enough clay for everyone, and soon enough it became a daily ritual. It was a wonderful friendship that would last for years - and all because of the generous bear, who was always willing to share his clay with others. <|endoftext|> Once upon a time, there was a farmer who wanted to buy something special. He had a rare barn and wanted to give it an extra sparkle. So he went out to buy the perfect thing. The farmer searched and searched, but nothing seemed quite right. Then, he stumbled upon something quite unique - a shiny diamond! It was so rare, the farmer knew this was the perfect thing to put in his barn. The farmer bought the diamond and took it back to his barn. To his surprise, when the diamond was placed in the barn it lit up the entire space – like a never ending twinkle! Everyone who had visited the farm was in awe of this magical sight. The barn had become rarer than ever before! The farmer was so happy with his purchase. He now had a truly special barn, better than ever before. And so, the farmer and the diamond lived happily ever after. <|endoftext|> Once upon a time there was a boy named Frank. Frank loved to play with his sock. He thought it was so fun to throw the sock in the air and catch it. One day, Frank jumped into his garden and decided to play forever. He threw the sock up as high as he could and ran to catch it. He ran so fast that, poof! The sock disappeared. Frank was very confused. He started thinking about where the sock had gone. He looked up in the sky and shouted, “sock, where are you?!” Just then, Frank heard a voice from up above. “I'm up here!” it said. Frank looked up and saw the sock floating in the air. The sock said, “I'm flying now! I jumped up so fast that I flew into the sky!” Frank laughed. He waved goodbye to the sock and ran off to find something else to play with. <|endoftext|> Once upon a time, there was a little girl named Jacky. Jacky loved playing with her helicopter. She liked to fly it high in the sky and spin around and around. One day, Jacky wanted to take her helicopter for a ride around the park. She put on her shoes and off she went. At the park, Jacky was enjoying flying in the sky when all of a sudden, a big gust of wind came and her helicopter landed in a pond. Jacky was very upset and started to cry. Suddenly, an attractive horse came galloping over and said, "Don't worry Jacky. I can help you get your helicopter out of the pond." Jacky said, " really?! How? The horse said, " With a fight. See, if I fight against the pond with all of my strength, I will be able to get your helicopter out". Jacky was amazed and said, "Thanks a lot!" So the horse fought hard against the pond and in the end it was victorious. The helicopter was safe and sound! Jacky was so happy that she hugged the horse and thanked it. From that day on, Jacky and the horse were the best of friends. Jacky would take her helicopter for a ride and the horse would run beside her. It was a beautiful sight to see. <|endoftext|> Clarissa was feeling very grumpy as she watched the soldiers walk by. "What's wrong?" Her mother asked. "Why don't you play with them in the garden?" Clarissa shook her head, "No. I don't like the soldiers." But her mother smiled and said, "Maybe you'll change your mind. Come and play with them in the garden". So Clarissa went outside. She thought about running away but everything inside her was telling her to give them a chance. As she stepped out of the house, the soldiers saw her and called her name. Clarissa was still feeling grumpy so instead of walking toward them, she ran away and started to weep. The soldiers were startled by her reaction but they followed her anyway and finally caught up to her. "What's wrong?" Asked one of the soldiers. Clarissa wiped her eyes and said, "I was just thinking that sometimes you have to give people a chance". And with that, the soldiers welcomed her as a friend and she learned that soldiers were not so scary after all. <|endoftext|> Once upon a time there was a little girl named Jane. She was only three years old. One day, she asked her mom for something sweet. Her mom said yes and gave her a blueberry muffin. Jane was so happy! She remembered how sweet it tasted and wanted more. The next day, Jane asked her mom for another muffin. Her mom laughed and said, "Oh no sweetheart, one is enough for today." But Jane didn't remember what her mom said. She kept asking for a muffin. Her mom got tired of her requests and said, "No, Jane. No more muffins today." Jane was sad, but she didn't give up. She kept asking for a muffin and started to cry. Her mom eventually got angry and said, "That's it! No more muffins for you ever again." Jane was so sad. She would never get to eat her favorite sweet treat again. <|endoftext|> Once upon a time, there were two friends who loved to play together. One day, they played a game of hide and seek. After a few minutes, one of them found the other. But when he found his friend, he saw that his friend had an itch. He asked, "What's wrong? Why do you have an itch?" His friend replied, "My shirt is dirty, and it's making me itchy." The friend then had a brilliant idea! He said, "Let's share! I have a clean shirt here that I can give you!" His friend was so happy and he agreed to take the shirt. The friends shared the shirt, and the friend with the itch was now feeling much better. They both laughed out loud and hugged each other to celebrate their special moment. Then they continued to play until it was time to go home. They were very happy, both with their special moment as well as sharing the shirt – it was a perfect day! <|endoftext|> Bob and Sue were going to a party. They were celebrating Sue's birthday. When they arrived, Bob started kicking the ball around. He was having lots of fun. But before long, Sue came over and said, "No, Bob, don't be so foolish. It's my birthday party!" Bob stopped to listen, then gave the ball a big kick. He and Sue laughed and ran around the party together. Everyone had a great time. <|endoftext|> The sun shone brightly in the sky, making the grass very dry. Tommy and his dad were outside playing football. Tommy enjoyed playing football with his dad very much. Suddenly, Tommy started to sneeze. He sneezed so hard that he dropped the football. His dad said, "Bless you, Tommy. Take a break and have a drink of water." Tommy sat down and drank his water. After a few sips, he felt much better. He said to his dad, "Can we play some more football now? It's a lot of fun!" His dad smiled and said, "Yes, let's go!" They started playing football again and had a great time. Tommy never wanted the day to end. <|endoftext|> Once upon a time, there was a brave bear called Bob. Every day, Bob would take his friend, a little rabbit, with him on all his adventures. One day, Bob saw an interesting zigzag path in the forest. He urgently wanted to explore it, so he urged his friend to join him. "Let's go, Rabbit! It's gonna be an exciting journey!" he exclaimed. But Rabbit was feeling a bit afraid. "It's very dry and there are so many zigzags," he said nervously. "Don't worry," said Bob reassuringly, "I'm here with you. Nothing bad will happen." Rabbit felt a bit better. With a happy heart, he followed Bob onto the zigzag path. Together, they explored the mysterious path and had a great adventure! <|endoftext|> The sun was shining brightly as John stepped out of his tiny house. He was an ignorant child who loved nothing more than running and playing. He had an old sheet he used as a blanket and he often imagined himself as a superhero. John always wanted someone to play with but there was nobody around. Sighing, he decided he'd find someone. On his way out of town, he heard two voices, one of which was quite familiar. He recognized the voice of his neighbor, old Mrs. Johnson. John walked closer, hiding behind a bush and peaked through the branches. Mrs. Johnson and a stranger were talking and the stranger seemed to be angry about something. Suddenly, the stranger shouted and stepped towards Mrs. Johnson. John was scared and decided to go back home, but before he could do so, the stranger noticed him. The stranger ran towards John, who screamed and tried to escape. But the stranger was faster than him and eventually caught him. The stranger threatened to take John away, saying something about his family having done something wrong. John began to cry and pleaded to be let go, but the stranger remained firm. In the end, the stranger took old John away, never to be seen again. <|endoftext|> Once upon a time, there was a very fast onion named Gary. He was so fast, that he could even race the wind. He liked to brag about his speed to all of his friends. One day, Gary decided to challenge the wind to a race. He wanted to prove that he was even faster than the wind. So, he zoomed off without a thought! When Gary approached the wind his friends were worried. They shouted out to Gary to quit the race and come back, but Gary didn't listen. He wanted to prove that he was the fastest. The wind started to pick up and Gary was struggling to keep up. Soon enough, he was too tired to keep up with the wind and Gary had to quit the race. Poor Gary! All this excitement had been for nothing. Despite his failure, Gary's friends assured him that he was still the fastest onion that they ever knew. The moral of this story? It's important to remember your limits and to quit when things get too hard. <|endoftext|> Once upon a time, there was a patient nurse. Her name was Sarah and she worked at a hospital. Every day, she looked after the children and made them feel better. One day, Sarah was taking care of a 3 year old boy called John. He was feeling unwell and was very upset. “John, why don't you come and sit with me?” said Sarah kindly. John shook his head and said, “No, I want to stay in my room.” Sarah was very understanding and said, “That's okay. I'll be here when you need me.” John walked into his room and shut the door. He was feeling scared and lonely. Soon, Sarah heard him crying and opened the door. She said, “It's okay, John. I'm here to help you feel better.” John looked at the kind nurse and smiled. He was happy to have a patient nurse by his side to help him feel better. <|endoftext|> One sunny day, Lily and her mom were walking in the park. Lily loved the park; she could smell the sweet smell of nature, and enjoy the sunshine on her face. "Mom, let's go play on the slides," Lily said, as they passed the playground. "Okay," her mom said with a smile. Lily ran over to the slide, but as she tried to climb the ladder, she began to slip. She grabbed onto the rungs, but soon both of her feet were in the air. "Oh no!" Lily said, feeling embarrassed. Her mom ran over, and caught her in her arms. Lily looked up at her mom's eye, and saw how sweetly she was smiling. "We'll try again," her mom said, lifting her up and setting her back down on the ladder. Lily began climbing again, and this time, she made it all the way up to the top. She gave a victorious smile, then quickly slipped down the slide. <|endoftext|> Once upon a time, there was a little girl called Alice. She was three years old and very obedient. One day, her parents took her to the beach. As they strolled along the shore, Alice spotted something shiny in the sand. She ran over to a spot and started to dig. She pulled out a silver key! She jumped up and down and shouted, "I've found a key!". Her parents laughed and asked her what she thought the key unlocked. Alice considered this and frowned. She then smiled and said, "Maybe it unlocks an adventure!" Her parents smiled and hugged her. They then all started out together, determined to discover the secret of the silver key. <|endoftext|> Once upon a time, there was a little girl who was very eager to play the violin. She looked at her mum and asked, "Mum, can I grab my violin?" Her mum smiled and said, "Of course, sweetheart!" The little girl ran over to the violin case and grabbed the instrument. With a big smile on her face, she hugged it close. The mum watched as her daughter played and felt happy that her child was so eager. With every note she played, the little girl's face lit up with joy. At the end of the song, the mum smiled and said, "That was beautiful, sweetheart!" The little girl smiled back and gave her mum a big hug. <|endoftext|> Once upon a time there were two friends, Sam and Joe. Sam and Joe wanted to go outside and play, but it was so cold! Sam said, "It's too cold, let's go inside where it's warm." Joe said, "No way! I'm ready for a challenge." Then, he slowly walked outside, and Sam followed him. Suddenly, a strong gust of wind struck them. Joe shivered, then said, "It's too cold, let's go back inside." Sam smiled and said, "I have an idea! Let's play a game." The two friends played their game, and had lots of fun. Joe said, "It's not so cold anymore." They kept playing until it was time to go home. Sam and Joe were glad they had braved the cold and enjoyed their game. <|endoftext|> Once upon a time, there was a little girl called Maisy. She was playing in her bedroom when she saw a big chest in the corner. Maisy was very curious, so she walked over to the chest and opened it. Inside she found lots of toys! Maisy was so excited that she grabbed the toys and started to play. Suddenly, her older brother Oliver burst into the room. "Put those back!" he said in a loud bossy voice. Maisy was so scared, she quickly put the toys back in the chest and shut the lid. She started to cry. Oliver saw her crying and said, "Don't worry, I won't be mad. You can play with the toys if you want. I just don't want you to make a mess in here!" Maisy smiled and said, "Thank you, Oliver!" She was so happy that she opened the chest and started playing with her toys. <|endoftext|> Jenny and her mom were walking in the park one day. Suddenly they noticed a raven on a nearby tree. Jenny asked her mom who the little black bird was. Her mom smiled and said, "That's a raven." Jenny smiled and nodded her head in agreement. "Oh, look how tidy it is!" she said as it fluffed up its feathers. The raven seemed to be enjoying the warm day. It cocked its head this way and that, trying to catch sounds of the forest. Then it took off in the air and flew away. Jenny watched it and waved goodbye. She smiled and said, "Goodbye, Mr. Raven!" Her mom put her arm around Jenny and said, "Let's go get some ice cream. Doesn't that sound nice?" Jenny's eyes lit up and she nodded her head, saying, "Yes!". She seemed very eager to get some ice cream. So off they went, happy to enjoy the day together. <|endoftext|> It was a gloomy day outside, but Sarah wanted to play. She ran to the garden with her bucket, ready to have some fun. Sarah filled her bucket with water from the pond, then she grabbed a pebble. She looked up at the sky and threw the pebble in the water. It made a huge splash! "That was fun!" Sarah said with a smile. She filled her bucket up again, this time with more pebbles. She skipped around the pond and threw the pebbles in the water, one after the other. Each time, they made a big splash! Sarah was getting hungry, so she ran back inside. She spread some delicious raspberry jam on her toast and enjoyed a yummy snack. "What a nice day," Sarah said with a full tummy. Now she was ready to go back outside and make even more splashes! <|endoftext|> Mummy and Daddy were picking flowers in the garden. Mummy picked a red daisy, Daddy picked a purple thistle and the little girl picked a beautiful lily. The lily was her favorite because it was so fluffy and white and the aroma was heavenly. Daddy said, "Let's bring this lily inside and put it on the windowsill." Mummy said, "How about we make it a surprise?" So the family all went inside and the little girl put the lily on the windowsill. When she stepped back to admire her work, she noticed a bright yellow butterfly that had landed on the lily. The little girl smiled. Mummy said, "Oh my, that lily looks so warm and cozy with the butterfly on top." The little girl nodded, delighted with her surprise. And, from that day on, the warm lily became a happy reminder of the special family day. <|endoftext|> Once upon a time, there was a father and daughter. The little girl was very excited because her daddy was going to paint their house. The daddy grabbed a paintbrush and a big tin of paint. He said to his daughter “Let’s go and paint the house!” The little girl ran to get her toy axe. She said “I’ll help you, Daddy. I’ll use my axe to chop the wood.” Daddy said “That’s a great idea! But you need to be careful because the axe is very sharp.” The little girl got to work and chopped up some wood. She was careful and everything went well. After they painted the house, Daddy said “Look how nice it looks now. Let’s go inside, it’s too hot outside.” The little girl said “Yay! Daddy, you’re the best house painter!” And everyone was happy. The End. <|endoftext|> Once upon a time, Lucy the bee was flying in the meadow. She was looking for a place to build her hive. Suddenly, she saw a small, hairy bush. She flew over to take a closer look and saw that it was perfect! "I'll make my home here," she said happily. She started to gather pieces of wood and flowers to build her hive. Just then, a butterfly flew by. "What are you doing?" asked the butterfly. "I'm building my home," Lucy said. The butterfly smiled. "That's very nice," he said. "But what if something happens to it?" "I don't know," Lucy said, frowning. The butterfly nodded. "That's why it's important to build your hive with friends," he said. "If something happens, everyone can help." Lucy smiled, and set to work with her new friends. After much hard work, they managed to finish the hive together. The moral of this story is that it is always better to work with friends. That way, if something happens, we can help each other out. <|endoftext|> It was a beautiful day and Little Joe wanted to go for a walk. He quickly put on his shoes and ran outside. On the grass, he saw a big hole. Little Joe was curious, so he slowly approached the hole. As soon as he reached it, he noticed something moving inside. Little Joe said, “Hello? Who’s there?” A little voice replied, “It’s me. I’m Mrs. Mouse. I’m stuck in this hole and I can’t get out.” Little Joe was nosy and he wanted to help Mrs. Mouse. He said, “I’m going to catch you so you can get free.” Mrs. Mouse was very thankful and together she and Little Joe were able to get her out of the hole. Mrs. Mouse was happy to go back home. Little Joe was glad he was able to help her. He waved goodbye and went back home with a smile on his face. <|endoftext|> Once there was a man that had a dirty wet shirt. He was keen to wear it to a special event, so he put it on. Unfortunately the shirt was too big for him! He went to ask his friend for help. “Can you help me shrink my shirt?” he asked. His friend smiled and said, “Yes. Put it in the dryer and let it spin around for a few minutes. Then it should be a better fit!” The man thanked his friend and did as he said. He put his wet and dirty shirt into the dryer and watched it spin. When the shirt came out it looked much better. It had shrunk enough so that it fit him perfectly! The man was really happy and he wore his shirt to the event. He looked very smart and he was delighted with his new look. <|endoftext|> Once upon a time there were two friends called Winnie and Peter. They were both three years old and loved playing together everyday. One day, as they were playing together, Winnie saw a trumpet lying on the ground and decided to grab it. She sat on it happily, not knowing what it was. "Peter, come and sit too!" she shouted. But Peter said he couldn't because it would be too rough. Like a tornado, Winnie put the trumpet down and got off it - shocked. She had realised that the trumpet belonged to somebody else and she was sorry for trying to take it. Although Winnie felt sad and guilty, Peter gave her a big hug and said "It doesn't matter what happened. Just be kind and honest to everyone. That's the most important lesson we can ever learn!". The two of them shared one last hug and went back to playing together happily ever after. The moral of the story is to always be kind and honest to everyone. <|endoftext|> The sun was shining brightly in the sky, and Jack was running, because he wanted to go fast. He wanted to speed away across the grass. His mum, who was watching from the side, said, “Jack, careful now, you don’t want to trip!” Jack stopped and looked to the left. He saw a shy rabbit, hiding in a bush. “Mum, look!” Jack shouted. He wanted to go over and meet the shy little rabbit. But his mum said, “Jack, don’t go too close. We don’t want to scare it away. Let’s just watch it from here.” So they both stayed very still and watched the rabbit, who stayed very shy and stayed in the same spot. Eventually, after a few minutes, the rabbit hopped away and disappeared. So they waved goodbye and Jack started running again. He sped off across the grass and his mum smiled. <|endoftext|> Once upon a time, Jane was walking through the forest. Suddenly, she saw a skull in the grass. It looked messy, like someone had been digging around. "Hmm... What does this skull taste like?", Jane wondered. She bent down, grabbed the skull and carefully licked the bone. It tasted salty and sour at the same time. Jane continued her walk, thinking about the skull. She knew she shouldn't have tasted it. Suddenly, a voice said "Why did you taste the skull?". It was a small creature with red wings. "It looked interesting so I thought I'd try it", Jane replied. "That was a very wrong thing to do," said the creature. "Skulls are not meant to be tasted." Jane agreed, suddenly feeling embarrassed. "I'm sorry," she said. "I won't do it again." The creature smiled, flew away and disappeared into the forest. From then on, Jane was careful not to taste any messy skulls she found in the forest! <|endoftext|> Once upon a time, there were two friends named Lily and Max. They were playing in the garden outside of Lily's house. Lily's garden was so rich and colorful, with big green trees and red, yellow, and orange flowers. Max looked around and noticed something. He asked Lily, "Do you recognize that thing in the garden?" Lily wasn't sure what he was talking about. Max pointed to a spot in the garden and said, "That big yellow thing is special." Lily walked closer and then she recognized it! It was a huge yellow butterfly! She said, "Wow! It looks so pretty." The butterfly flew over to a nearby flower and started to drink the nectar. Max and Lily watched the butterfly for a long time. Eventually, the butterfly flew away but Max and Lily never forgot about it. They will always remember their special moment in the rich garden. <|endoftext|> Once upon a time there was a hairy monster who lived under a mountain. The monster was so naughty that the other animals were scared of him. One day, the monster wanted to escape from the mountain, so he bit through the stone walls. Suddenly, a jail appeared in front of him. The monster was so scared that he forgot about freedom and ran back inside the mountain. The next day, the monster saw a mouse walking by. The monster jumped out and said, "Please, mouse, will you help me escape this jail?" The mouse replied, "If you promise not to bite me, I will try to help you." The monster agreed and the mouse guided him out of the jail and back to the mountain. From then on, the monster was careful not to bite anyone anymore. <|endoftext|> Once upon a time there were two best friends named Tim and Jack. They had been friends since they were little and always looked out for each other. One day, Jack got the exciting news that he had been accepted to the university of his dreams. He was so excited to get started on this new adventure. He told Tim the good news with glee, but Tim didn't seem as excited. "Why aren't you happy for me?" asked Jack. Tim sighed and replied, "I'm happy for you, but I'm also sad. We will be separated now that you're going away. I don't want that to happen!" Jack smiled and said, "That's okay, we will stay in touch and be best friends forever. Just because I'm going to the university, doesn't mean you and I can't still have a chat when we are feeling a bit messy." Tim smiled, happy to know that his best friend would still be around even if they were separated. They gave each other a hug and promised to keep in touch. The moral of the story is that even when apart, you can still stay close to your friends if you remember to stay connected. <|endoftext|> One day, a small boy called Sam found a kite in the park. He was so happy to see it! He ran to get it and started to fly it. Suddenly, an old man came over and told him, "Stop! You're disturbing me!" Sam was so scared. The old man had a very gentle voice. He said, "This kite belongs to me. I lost it a long time ago." Sam was sorry to hear this and apologised to the old man. The old man was very compassionate. He said, "I'm happy that you found it. Do you want to keep the kite? You can fly it whenever you want". Sam was overjoyed that the old man was so kind. He thanked him a hundred times and flew away with the kite. He had a wonderful time in the park, flying his kite with a compassionate old man. <|endoftext|> Once upon a time, there was a group of yellow chickens on a farm. Every morning they would run around, looking for things to eat and play. One day, they found something even better - a basket filled with delicious grass and seeds. The chickens were so excited! They took some of the grass and seeds back to the barn to share with their friends. The chickens started to prepare the food and made a big, tasty feast. The chickens were all so happy, they decided to have a party. They danced around and sang cheerful songs all day. Suddenly, one of the chickens noticed something in the corner of the barn. It was a giant yellow egg! The chicken ran to get the others and said, “Let’s prepare the egg! We can share it with the rest of the group!” The chickens worked quickly and soon had the egg ready for their friends. Everyone lined up and sang a happy song as they savored the delicious meal. The yellow chickens enjoyed their party and danced until the sun went down. They ended the day with happy bellies and smiles on their faces! <|endoftext|> Once upon a time there was a truck. It was big and yellow and it liked to go out for rides. One day, the truck was driving down the road and it saw a little girl. She was very polite. The truck stopped and said, "Hello there, I'm truck! Would you like to take a ride?" The little girl nodded with excitement. The truck said, "Let's go look around the town. I think you'll like it!" The little girl smiled and said, "Thank you, Truck! That sounds like fun!" They drove around the town and the truck pointed out lots of interesting things to the girl. They even stopped for ice cream. When the ride was over, the little girl said, "Thank you for the ride, Truck. That was so much fun!" The truck smiled and answered, "You're most welcome. It was my pleasure." The little girl and truck waved goodbye, and the truck drove off down the road. <|endoftext|> Once upon a time, there was a little girl named Lucy. She was only three years old. She loved playing outside in the sunshine and running around with her furry cat. One day, she noticed a big hairy stack of hay in the corner of her garden. She got really excited and rushed over to it. She ran her fingers through the soft hay and shouted with joy. Then, she decided to make a hideout in the stack. She carefully moved the hay to create little nooks and crannies, and a cozy hiding place. She was so excited when she was done and couldn't wait to go hide inside her hay stack. Just then, her cat came over and meowed. Lucy called out, "Hi kitty! I made a stack house. Do you want to come inside and play?" The cat darted inside, and Lucy quickly followed. She was so excited to explore her new secret hideaway. The two of them curled up together in the cozy hay and stayed there for hours, filled with excitement. <|endoftext|> There was a boy called Will. He loved to play outside. One day, he found a wagon and he thought it was his. He was so excited and he said to himself, "It belongs to me now." Will took the wagon with him to the park. He was having fun playing and pushing the wagon. Suddenly, a big boy came running towards Will. The big boy said, "That's my wagon. Give it back!" Will was scared, but he said, "No! It belongs to me." The big boy was getting angry. He shouted, "Stupid boy! You don't belong here!" He grabbed the wagon and ran away. Will was so sad. He learned that not everything he wanted belonged to him. <|endoftext|> One sunny day, a pirate was wandering through the woods. He had a big, shining hat, two swords and a wooden leg. Suddenly he heard a noise coming from the bushes. The pirate stopped and listened carefully. "Ouch, it hurts", a small voice called out from the bushes. The pirate went to investigate, and he saw a little girl, who was crying. The pirate asked her why she was crying, but she only shook her head. The pirate lifted the little girl out of the bushes, and asked her again why she was so hurt. This time she told the pirate that she had been playing hide-and-seek with her friend, and had gotten lost. The pirate put his arm around the little girl, and smiled down at her. He promised he would lead her home, so she wouldn't be hurt anymore. As the two walked, the pirate told her stories about his adventures of sailing the seven seas. The pirate took the little girl home, and stayed to make sure she was safe. Both the little girl and the pirate were happy about this. The little girl had learned an important lesson - always listen to your parents, so you don't get lost. And the pirate had learned a lesson too - helping out others can make you feel good. <|endoftext|> John ran quickly to the mall. As he looked around, he saw so many things. He found a deep pond with lots of fish inside. “Wow,” John said. John saw Mommy walking up to him. “Hi John!” she said. “Let’s go on a hunt. Can you help me find something?” “Sure!” said John. The two of them ran around the mall looking for things. They saw a big deep bird's nest in a tree. They also saw lots of yummy snacks in the mall store. John saw a playground and got excited. “Mommy, can we go on the slide?” he asked. Mommy laughed. “Of course!” She said. They ran to the slide, and soon they were having lots of fun. After a while, it was time to leave. John said goodbye to all the friends he made and ran back home. <|endoftext|> Once there was an infant playing in a garden. He was with his mom and dad. The infant looked around, examining the colourful flowers and plants. He noticed another infant in the garden who was also playing. The two infants said hi to each other and quickly became friends. They laughed and talked about how helpful their parents were. Together, they explored the garden. The little friends looked at all sorts of things, some furry, some wet and some slimy! Suddenly, they heard a loud noise coming from above. They looked up to see a big dark cloud. The cloud was growing bigger and bigger. Then, the two infants heard their parents calling them. The infant told his friend he had to go, but promised to make up for it. Unfortunately, the infant never got to see his friend again. When he returned to the garden later, he saw a big storm had destroyed the garden. He said goodbye to his friend in his heart, knowing he'd never see him again. <|endoftext|> Once upon a time, there was a little girl named Molly. Molly had a great big, hairy dog. They were very happy together. One day, Molly and her dog were out walking in the park when they heard a noise. Molly was scared and she hugged her dog tight. Then something strange happened. A ghost appeared beneath a tree. It was a very strange sight. Molly's dog growled at the ghost. The ghost ran away and Molly felt brave. "What was that, Molly?" asked her dog. "I don't know," replied Molly. As they continued their walk, Molly noticed something strange. Whenever Molly said the word "yield", ghosts appeared from the trees! She had the magic power to make ghosts yield. Molly was excited and scared at the same time. She decided to keep this magic to herself. Molly went home and hugged her hairy dog. She knew she was safe. <|endoftext|> Ted was a lively little boy. He was always ready for adventure. One day Ted found a shiny red helmet and he couldn't resist trying it on. He wore it everywhere and loved it. One day, Ted and his friends decided to go biking. Ted proudly put his red helmet on, and prepared to go. Suddenly, his helmet began to tear. Ted's friends laughed. "Oh Ted, what shall you do now?" one of them asked. Ted smiled and said: "I don't need a helmet to go biking. I'm too lively for danger!" Everyone agreed and went off on their bicycles, happily racing each other. Ted was the happiest of all. <|endoftext|> Once upon a time there was a puppy. He was small and brown, and loved to play. Every day, he would go out on fun adventures with his dad. But one day, something wonderful happened! His dad decided that he was an obedient dog, so he was going to become a model! That meant he had to listen even more closely to his dad, so he did his best. The puppy was so excited to model for all the people he met. He loved meeting new people and showing off how obedient he could be. People would say, "What a nice puppy!" The puppy soon became famous! He was very popular, and his dad was so proud of him. The puppy had become a very famous model! The puppy and his dad had lots of fun after that. The puppy was always very obedient, which made his dad very happy. They would go on all kinds of adventures and the puppy was always the star! <|endoftext|> Once upon a time, there was a little girl called Claire. She was very brave and powerful. One day, she was playing in her yard when she saw a patient sitting on the grass. The patient was crying and seemed very sad. She went over to the patient and asked, "What's wrong?" The patient told Claire that she had fallen from her bed earlier that day. Claire was determined to help the patient, so she put her powerful hands on the patient's back and tried to lift them off the ground. But the patient was too heavy. Claire thought and thought. She decided that the only way she could help the patient was to get help from her mom and dad. She ran into her home and called her parents. Then they all helped the patient back onto her bed. The patient thanked Claire and said, "You are a very brave and powerful girl!" Claire smiled. She was happy she was able to help. <|endoftext|> Once upon a time, there was a little girl who loved playing with her doll. Her doll was the best in the whole wide world. Every day, she would take the doll out of its box and admire the bright eyes and soft hair. One day, the little girl saw a beautiful rug in the living room. The rug was pink and had soft, white flecks. She went over to admire it, but then she felt shy. “Why are you feeling shy?” asked her mom. “It’s just a rug!” The little girl sheepishly smiled and said, “I’m shy because I don’t know how to admire a rug like I do my doll.” Her mom smiled. “You can admire it in the same way – look at its colors and its texture. It will look just as beautiful!” The little girl smiled and got a bit closer to the rug. She admired its softness and the way it glowed in the sunlight. She felt happy and knew she could admire anything if she used her imagination. <|endoftext|> Once upon a time, there was a little girl. She had a black candle in her hand. She said, "Let's go and rest!" The little girl set her black candle down and flopped on the bed. When she closed her eyes, she heard a voice. The voice said, "Don't forget me!" The little girl opened her eyes and picked up the black candle. She said, "Let's go and rest together!" So, the little girl and the black candle went outside and found a nice spot to sit and rest. The little girl held the black candle close and said, "Thank you for coming with me to rest." The black candle glowed and replied, "You're welcome, my friend." Then the sun began to set, and the little girl and the black candle watched the sky turn from blue to black. They rested for a few more minutes before the little girl stood up, blew out the black candle, and said, "Let's go home now." And so, the little girl and the black candle went home together and had a good night's rest. <|endoftext|> Once upon a time, there was a little boy named Andy. He loved to explore and watch the world around him. Everywhere he went, Andy was curious and wanted to know more. One day, Andy saw an interesting clock. He was very curious and asked his mom, "What's that?" His mom smiled and said, “That’s a clock. It tells us what time it is. See, it's twelve o'clock.” Andy was amazed and said, "It can really do that? Wow, this clock is so cool!" From then on, Andy looked at the clock every day to see what time it was. He was always a bit surprised when he saw the hands moving around and around. Everywhere he went, Andy was curious and wanted to know more. <|endoftext|> Once upon a time there were two friends, Emma and Jack. They went to the market together to see what they could find. While they walked around, Jack saw something very attractive. "What do you have there?" Emma asked. "Oh, just something I found." Jack said, holding it up for Emma to see. "That's really nice, can I take a closer look?" Jack said, "Sure, it's yours if you want it. We can do a trade." So, Emma and Jack talked about what kind of trade they would do. Emma said she had some ribbon that was really pretty and Jack said he wanted something useful. So they decided Emma would give Jack the ribbon and Jack would give Emma the thing he had found. They both thought it was a good trade. At the end, they both smiled and thanked each other. They hugged and said goodbye. Emma went away with her new thing and Jack went away with a ribbon. It was a good day at the market! <|endoftext|> One day, Ginger was playing with her little brother in the playground. Although she was only three years old, she wanted to show off her skills. She climbed a ladder that was much too big for her and once she reached the top she proudly shouted to her little brother, “I am winning!” Her brother was very proud of her, but he wished he could do the same. He asked, “Can I win too?” Ginger laughed, “Of course you can win! But you have to be very brave and try your hardest.” So Ginger helped her brother to climb the ladder. He was a bit scared, but his sister was there encouraging him. Finally, he made it to the top and shouted in triumph, “I won!” Ginger hugged her little brother, “That’s the way to be true and win!” They looked around and saw that the playground was very dirty. Ginger and her brother quickly got to work cleaning it up. Ginger smiled at her brother, “Winning is even more fun when it’s true and clean!” <|endoftext|> Once upon a time, there was a small girl. She had a curious mind and liked to explore the world. One day, she was playing in her garden when she noticed a tall hedge. It was big and blue and it seemed like it was hiding something. The girl wanted to know what was behind the hedge so she started searching for a key to unlock it. After searching for a little while, she found a tiny blue key in the dirt. She was so excited that she ran to the hedgewit the key in her hand. The girl tried the key in the hedge but it didn't fit. She felt a bit sad but decided to keep searching for something that could open it. After a while, she found a small hole near the bottom of the hedge. She carefully inserted the key into the hole and - click! - the hedge opened. Behind the hedge was a secret garden filled with beautiful blue flowers. The girl was so happy! She couldn't believe that something so beautiful was hidden behind the hedge. She was excited to explore the secret garden and kept visiting it every day. This is how the small girl discovered the secret garden and every time she visited it, her joy was even bigger than before. <|endoftext|> Once there was a modest pilot who flew a plane each and every day. One day, a loud siren rang from his plane. He had no choice but to put on the parachute and save himself. The pilot looked down from the sky and saw a river below. He threw away his fear of water and jumped into the river. He was relieved to see a small rowboat at the side. The pilot started rowing with all his might and for hours and hours, he continued to row. Suddenly, he heard a voice from the river bank. It was a three year old child. "Where are you going?" the child asked. The pilot answered, "I'm trying to save myself." The child smiled and said, "I can help you! I have a bigger boat at home." The pilot thanked the child and soon they were on the bigger boat. After several hours, the pilot reached the shore safely. He thanked the child and said, “I’m very lucky to have found you. You saved my life.” The modest pilot was very grateful for the child's help. <|endoftext|> The curtains were hanging cleanly in the windows of the little room. Every day, the girl would run in and whisper secrets to them. She hadn't noticed it before, but today, when she was talking in her very quietest voice, the curtains rustled as if in response. Her eyes grew wider as she heard what sounded like an echo of her own whisper. Curious, she asked the curtains, "Can you understand me?". The curtains didn't move. She whispered the question again and waited. She heard a faint whispering in response, but it wasn't the same as if she were speaking. This whisper felt different somehow. The girl waited and listened. Suddenly, the curtains moved again. This time they were pushing back, inviting her closer. As the girl looked closer, she saw a crack in the window and she could now hear more clearly the voice she had heard earlier. "Come here," it said. The girl took a deep breath, trembling with anticipation and excitement. She stepped closer and the curtain parted. Behind it was a secret garden. Everything was clean and vibrant and the girl felt more alive than she had ever felt before. She was finally on an adventure of her own. The girl and the whisper from the curtains had a lot more to share. <|endoftext|> Freddy the teddy was feeling very lonely. He wanted a friend to play with. One day he went for a walk and he rolled past a big house. When he got to the doorstep, he heard a voice. "Hello? Who's there?" The voice said from behind the door. Freddy was so surprised. He looked around and saw a big brown curtain was pulled aside. He saw a friendly face waving at him. It was a small girl. "Hey! I'm Suzy! Who are you?" Suzy asked with a big smile. "I'm Freddy the teddy" Freddy replied with a smile too. Suzy brought Freddy inside and they started to play together. They rolled around the house laughing and having fun with each other. Freddy was so happy to have a new friend to play with. And every day they opened the big brown curtain and made new adventures together. <|endoftext|> One day, Mommy and Little Man were in the park. Little Man was hungry and Mommy gave him a spoon. Little Man excitedly started walking and he saw a dangerous-looking bee. He ran up to Mommy and said, "Mommy, Mommy! Bee!" Mommy looked and said, "Yes, honey. That bee looks dangerous." Little Man said, "Can I accept it?" Mommy smiled and said, "No, sweetie, we can't accept it. It's too dangerous." Little Man looked down and frowned. Just then a butterfly flew by. Mommy said, "Look, Little Man. That butterfly isn't dangerous. You can accept it." Little Man smiled, excitedly accepted the butterfly, and ran off with his spoon. <|endoftext|> Once upon a time there was a three year old girl named Lily. She was playing with her favorite toy when suddenly she heard a loud noise. Lily was afraid so she ran and hid behind the dining room table. Then she heard a voice coming from the kitchen. It was her mommy. "Lily, stay here and don’t move! I’m going in for an operation tomorrow and I need you to be a brave girl", said Mommy. Lily was very scared but she nodded her head. Then her mommy hugged her tightly and said, "Don’t worry, Mommy will be okay. The doctors will take care of me". Then Lily’s brother, Jack, came into the room. He was being selfish and wanted attention. He said, "Why does Lily get all the hugs? What about me?". Mommy smiled and said, "I love you both the same. Just sit next to Lily and I’ll hug you both". So Lily and Jack stayed there, cuddled up together and Mommy hugged them both. <|endoftext|> Once upon a time, there was a little girl named Jane. Jane wanted some rice for dinner. She asked her mom, "Mom, can I have some rice for dinner?" Her mom smiled and said, "Of course, Jane. You just have to be patient." So Jane waited patiently while her mom cooked the rice. When it was ready, Jane ate some of it, but she was so full, she fell asleep while eating her rice! Her mom came over and carefully picked up Jane. She carried her to bed and tucked her in. Jane was so tired she went straight to sleep. Mom smiled and said, "Jane, you should take a good nap so you're ready for school tomorrow." Jane happily snuggled into her blankets and went to sleep, dreaming about the delicious rice she had for dinner. <|endoftext|> Once upon a time there was a little girl called Daisy. Every day she would ask her parents to teach her new things. One day, Daisy saw a model car on the table and asked her mum to teach her about it. Daisy's mum said she would, but first Daisy had to do her chores. Daisy was sad, but she agreed and finished her chores. Once the chores were done, Daisy's mum taught her all about the model car. She showed her how to put it together and all the amazing features it had. Daisy was very happy and she was proud of the model car she had made. The next day, Daisy and her mum went to the park. Daisy wanted to show everyone her model car, but when she got to the park she saw another girl playing with an even bigger and more amazing model car than hers. Daisy became very sad, she wished she could have that car too. But then Daisy's mum came up with an idea. She said "Maybe I can teach you how to make a bigger and more amazing model car". Daisy was very excited and thanked her mum for the offer! Daisy's mum taught her all she needed to know and Daisy became the proud owner of a bigger and better model car. <|endoftext|> Tommy was playing in the park with his new helicopter. He was very excited. His papa had given it to him for his birthday. Tommy was pretending to fly the helicopter around the park. He pretended it was the real thing. Suddenly, a mean boy came up to him. The mean boy said, "That's a fake helicopter. Give it to me!" Tommy screamed and held the helicopter close. He said, "No! It's mine! I won't give it to you!" The mean boy got mad and tried to grab the helicopter. But Tommy was too quick. He threw the helicopter as far away as he could. The mean boy chased the helicopter, but Tommy ran the other way. He was safe now. After that day, Tommy never saw the mean boy again. He would always play with his helicopter in the park. <|endoftext|> Once there was a little girl named June who loved to drive. She had a beautiful car that was blue and silver and she loved it very much. One day, June wanted to drive to hear her favorite band play. June asked her mom, “Can I drive to the band?” Mom said, “Yes, June. Be careful!” June was so happy and put on her seat belt. Then, she started her car and drove down the street. The band finished playing just before June arrived. Everyone was saying how beautiful the music was. June clapped and smiled. The band thanked everyone and waved goodbye. June waved back and drove home. That was the day June went to see her favorite band! <|endoftext|> Mia was playing outside in the enormous park. She could see so many things. There were trees, and rocks, and slides. She wanted to slide, but it was too high for her. Suddenly, she heard a loud noise. Mia turned around and saw a giant striking the ground very hard. Mia was scared and hid behind a tree. The giant noticed her and said, "Hello Mia". Mia was so surprised that he knew her name. The giant asked, "Do you want to play with me?" Mia thought for a moment and said, "Yes, I would like that." So Mia and the giant played a game together. They rolled rocks, laughed and had fun! After a while, the giant struck the ground with his foot and said goodbye. Mia waved goodbye to the giant and couldn't believe he was so enormous and friendly! <|endoftext|> Linda was walking in the forest when she saw something mysterious. She had to take a closer look. She slowly approached it, and realized it was a bulb. She was very excited, she wanted to grab it, and take it with her. Suddenly a voice shouted, "Hey! Don't grab it!" Linda jumped back in shock. A mysterious figure was standing there, she had never seen anything like it before. He asked her, "Do you know what this is?". She shook her head, and he said, "That to me is a precious bulb. It's not an ordinary bulb, you know, it can perform magical tricks". Linda's eyes lit up with curiosity, she couldn't take her eyes off it. The figure said, "If you want, You can take it with you". Linda was very excited, she grabbed the bulb and hugged it. She thanked the figure and ran home. She knew this was going to be a fun adventure. At home, Linda started exploring the bulb. She played with it and tried to figure out how to make it work. She closed her eyes, concentrated and presto! The bulb suddenly glowed and started performing magical tricks! Linda was amazed, she had never before seen something so mysterious. <|endoftext|> Once there was a bird who lived in a forest. One day it wanted to fly, so it flapped its wings and rose high into the sky. Its wings were strong and it felt so free. But then it started to feel something strange, a thick, dark ash was filling the air. What was it? The bird wondered. Suddenly it heard a voice from down below. "Haha!" Someone laughed, "that's my fire! I burnt it bigger and stronger, so the ash would fly!" The bird flew down to see what was happening. It saw a small figure standing by a campfire. The bird asked, "Why do you want the ash to fly?" "Because," the figure replied, "when it floats across the land, it makes things more bitter for the people who live here. That's why I like to make my fire bigger and stronger." The bird was shocked. It didn't want anyone to be made miserable like that. It flew back up into the sky and spread its wings wide, creating a gust of wind. This blew the ashes away, removing any bitter taste they might bring. The figure watched in amazement as this kindness of the bird. The bird said before it flew away, "Don't ever forget that kindness can spread hope and joy, even in the darkest of places." <|endoftext|> Once upon a time, there was a clean picnic in the park. Two kids, one called Ben and the other called Lucy, were excited to eat their lunch. Ben said, "Let's close the picnic basket so no bugs come in". He shut the lid and the two kids sat on a blanket. They started to munch on their food, but soon heard a loud buzzing noise. Lucy said, "That's strange! What is that noise?" She looked around and saw a bee flying above them. Ben said, "We should have kept the picnic basket closed!" They started to run away, but Ben quickly realized he left the blanket on the ground. Ben felt that they must go back, but Lucy refused. She thought the bee would still be around. Ben said, "We have to go back, otherwise the blanket will get dirty!" Finally, they ran back and quickly grabbed the blanket. The two kids laughed as they ran away with the blanket. They learned an important lesson that day - to always keep their picnic basket closed! <|endoftext|> Once there was a mommy and a toddler. The toddler wanted to try to do yoga with mommy. So they tried it together. The toddler tried to touch his toes, but he could not do it. He felt frustrated. Mommy said, "Stretch your legs, sweetheart. You can do it!" The little one tried again and he actually got his toes to touch. He felt proud and happy, but it still seemed like a long way for him to do yoga. The mommy held his hand and said, "Let's take it slow, and practice often." The toddler and mommy kept practicing yoga and soon, the little one could do long stretches. He smiled and told mommy, "Look what I can do now!" The moral of the story is that practice and patience can help us do anything, even if it seems too hard or too long in the beginning. <|endoftext|> Once upon a time, there was a deaf, three year old girl. She loved going to the library every day and read books. One day, while she was reading, she came across a big book about history. She was curious and wanted to read it, even though she was scared of its size. The librarian saw the girl and smiled. She said, “Do you want to read more about history?” The girl nodded and the librarian said, “That’s great! You can learn so much from reading history books.” The girl smiled and took the book home. She read the book every day, and soon she knew a lot of facts about the past. The girl was very proud when she showed her parents what she had learnt from reading history. Her parents smiled and said, “You’re so clever!” She felt so proud - she had achieved something all by herself, even though she was deaf! <|endoftext|> Once upon a time, there was a girl called Lucy. She was very small, only three years old, and sometimes felt helpless. Lucy wanted to explore the world, so one day she decided to wander. She went far from home and eventually stumbled upon a weird stage. On the stage was an old man who saw Lucy and asked her if she wanted to join him. She nodded, filled with excitement about what she would see. The old man put on a show, but Lucy didn't understand one bit of it. She became frustrated and started to cry and told the old man that she wanted to go home. He laughed and continued the show. Lucy felt helpless and didn't know what to do. Suddenly, a woman walked on to the stage and said to the old man, "Let the little girl go. She's too young to understand what you are doing." The old man gave a funny smile and nodded. He said to Lucy, "You can go home now - remember never to wander too far again." Lucy smiled and wandered back home, feeling a little wiser. <|endoftext|> Once there was a panda who was very hairy. He was called Andy. Every day, Andy would go and search for food. One day, he was walking deep in the forest when he saw a small cave. He thought it would be a great place to look for food. As he got closer, he could feel the cave was strange. When he stepped inside, he saw there were many white things on the ground. He didn't know what they were, but he knew he needed them. Andy walked around the cave carefully and eventually found a big pile of bamboo. He was so happy and wasted no time picking up as much as he could. Suddenly, he heard a voice. It said to him, "I need help. You need to help me". Andy looked around but he couldn't see anyone in the cave. With a puzzled look on his face, he said, "Who said that?". The voice said, "I'm here. I am a big, hairy panda like you. I need your help to get out of the cave". Andy was so excited. He took the white things and placed them in a line in front of the cave. He said, "These will help us get out of here!". Slowly, he and his new friend made their way out of the cave. Once they were safely outside, they hugged each other. They were so happy and thanked each other for <|endoftext|> Once upon a time there were two brothers named Billy and Joe. They both loved to explore the outdoors and always looked for adventure. One afternoon, they decided to take a walk in the woods. Suddenly, something strange happenned. A glowing ball of light started to appear and floated above the trees. Billy and Joe were so amazed! "We must catch it!" yelled Billy. But each time the boys tried to get close to the ball, it would vanish! No matter how persistent they were, they were unable to catch it. Eventually, they had to give up. Joe said, "Let's go home now, brother. We'll come back another day and search some more." Billy and Joe happily returned home that morning, with an exciting secret to share. <|endoftext|> Danny was in a hurry. He wanted to get to the park quickly and he ran as fast as he could. His mama said they would be late if he didn't hurry up. When they got to the park, Danny was eager to run and play. He didn't want to wait any longer. But his mama said he had to be patient. She told him that his friends were coming soon. So Danny sat down on the bench to wait. He was patient, but it was hard. All he wanted was to play with his friends. He wished for them to hurry. Suddenly Danny saw them running down the street. They were hurrying just like him. He couldn't wait any longer and ran to meet them. He was so eager to start playing with them. Danny's mama smiled. She was glad that Danny had been so patient. Finally he could have fun with his friends. <|endoftext|> Once upon a time there was a girl who wanted to build something special. She had an idea to make a stack of blocks. The girl went to get the blocks and found that some were regular ones and some were special ones. She was excited and started creating the stack of blocks. She put the regular blocks on the bottom and then the special ones on the top. Suddenly, the stack of blocks fell down. Oh no! The girl was sad but she said, “I can fix this”. Little by little, the girl put each block back in place. With a lot of hard work, she managed to make the stack look perfect again. The girl was so proud. She shouted, “I fixed it!” And the stack of blocks stayed standing. <|endoftext|> Once upon a time, in a small village there lived a young girl called Lucy. She was very popular among her friends for her vibrant and happy personality. One day, when Lucy was walking past the park, she spotted something in the grass. When she looked closer, she saw it was an old purse! Lucy was so excited and she bent down to pick it up. When she opened the purse, she found lots of coins inside. She was so happy that she could now buy herself some new toys. But when she tried to stand up again, Lucy suddenly realised that she was stuck. She had been using her purse to balance herself and in the process had become tangled up in the long grass. Lucy started to struggle to try and get untangled, but the long grass was too powerful. She began to cry and shout for help. Just then, one of her friends walking past the park heard her cries and came to her rescue. Her friend put down his popular baseball cap and helped Lucy free herself. After a few minutes of struggling, Lucy was free. She thanked her friend and gave him a big hug. The two of them stopped to count the coins inside the purse before walking back to Lucy's house. The End! <|endoftext|> Once upon a time there was a boy called Tom. He was a very kind and gentle boy. He felt sad every day because sometimes it felt like the world was too rough and unkind. One day Tom spoke to his mom and said, "Mom, I don't like that the world is so rough." His mom paused and thought for a moment, then said, "I know what you can do to help make the world nicer, Tom." Tom waited eagerly as his mom explained. "You can use your kind heart to heal the world. You can be kind and gentle like you always are and that will help the world feel better." Tom's eyes lit up and he wondered if he could really do it. The next day, Tom went outside and smiled at everyone he saw. He said hello and wished them a good day. Little by little, he felt more and more joy in his heart. He knew he was helping to heal the world and that made him smile. The world always needs a little bit of love, and with help from Tom, it was slowly beginning to heal. <|endoftext|> Once upon a time there were two friends, Joe and Jenny. Joe and Jenny loved to play together outside. Today, they were playing at the beach. The beach was clear and the sun was shining. Joe and Jenny saw some fish swimming in the sea. Jenny asked Joe: "Can we go swim?" Joe hesitated. He said, "No, let's stay here". But Jenny said, "Please, Joe! Let's go swim!" Joe finally agreed. He said, "Okay. But only if you stay close to me". They went to the water and they paddled and splashed around. There were big waves, and it was a lot of fun. But then Joe saw something. He saw a big fish that was coming right at Jenny! Joe was scared. He shouted, "Jenny, look out! Swim away!" Jenny screamed and started swimming away quickly. Joe reached out and slapped the fish away. Finally, after a lot of swimming, Joe and Jenny were safe. Jenny looked at Joe and said, "Thanks for saving me, Joe!" Joe smiled and said, "I was just looking out for you". <|endoftext|> Frank the frog was very troubled. His fountain had broken and he was sure no one could fix it. One day Frank's best friend Sam the snail came to visit him. Sam asked, "What's wrong Frank?" Frank said sadly, "My fountain is broken and I can't fix it." But Sam had a plan! He said, "If you come with me I might know someone who can help you fix your fountain." So Frank and Sam went out into the woods, looking for help. And soon they found Snail Bob! Snail Bob smiled at Frank and said, "Don't worry, with a bit of hard work we can get your fountain running again." Frank was overjoyed! He and Snail Bob got to work and soon he had a beautiful working fountain. Frank was so happy and relieved, and he thanked Snail Bob for his help. From then on, Frank and Sam made sure to visit Snail Bob to say thank you. <|endoftext|> Once upon a time there was a girl and her name was Sarah. Sarah loved to share her toys with her friends. One day she went upstairs to her bedroom, and she saw something beautiful. It was a magical castle with a gate that opened up to reveal a pink garden. Sarah couldn't believe her eyes! She called her friends to come upstairs and see what she had found. Her friends were amazed when they saw the beautiful castle. They all decided to share in the fun and explore the magical garden. They all had such a fun time that day playing in the castle and exploring the garden. <|endoftext|> Once upon a time there was a very wealthy family who owned many things, but the family's most cherished possession was the puppy that the father had bought for the children that same day. The puppy was small and fluffy with big, black eyes. The family went outside to play with the puppy, and they laughed with joy as they watched the puppy chase around butterflies. Suddenly, the puppy started to shiver with cold and the family looked up to see storm clouds gathering in the sky. The mother said to the father, "Let's go inside quick and get the pup warm." But the father said, "It's ok, the pup will be fine in this weather," and he began to walk away. The children were about to shiver too, but the mother quickly picked up the puppy and rushed everyone inside to safety. The family was so thankful that the mother had acted quickly and that the puppy was safe. The mom said to the dad, "See, that's why I always listen to my instincts." The family smiled and hugged their beloved puppy tight, thanking the mom for her wisdom. <|endoftext|> Once upon a time, there was a little girl named Jane. She was a very curious three-year-old who liked to explore. One day, she decided to go for a walk in the park. On her way she saw a big hill. It looked fun, so Jane decided to take a few steps up it. It was easy, so she kept going and soon she was at the top! Jane was so proud of herself. Just then she heard someone say, "Wow! You made it up here so quickly!" Jane turned around and saw a tall man wearing a hat. She smiled and said, "Yes, I was going very fast!" The man laughed and said, "You sure were! Great job!" Jane thanked him and continued on her way. With a smile on her face, she knew she could do anything if she put her mind to it. <|endoftext|> Tim was feeling very nervous. He didn't like to talk in front of big crowds. Everyone was watching him and he felt scared. He just wanted to be alone and hide. But Tim couldn't hide. He heard his mom calling him to talk in front of the crowd. He was so afraid that he started to cry. But he didn't want to look silly in front of everyone, so he wiped his tears away and slowly stepped forward. He was shocked to see all the junk in the room. There were all sorts of broken toys and trash strewn about. He realized it was a junkyard, and he felt even more nervous. He wanted to go back home, but his mom was encouraging him forward. He took a deep breath and slowly started to talk. At first it was hard, but soon the words were coming easier and he was no longer scared. He looked out over the crowd and he could tell they were listening. When he was finished talking, there was a big cheer from the crowd. Tim couldn't believe it. He had done it and he was so proud. He looked back over the junkyard and smiled. He was no longer scared. <|endoftext|> Benny was at the airport with his mom. He watched as people moved around him with huge suitcases. They made careful steps with the big bags. Mom said, “ We need to pack your luggage Benny. It’s time to go home.” Benny rolled his small suitcase to the desk. The lady behind the desk smiled at him and said carefully, “Now I need you to check your suitcase so we can get you on your flight.” Benny stared at the little suitcase. He watched as the lady pressed some buttons and then it closed with a loud click. He felt a swell of excitement in his chest and jumped with joy. Mom saw the excitement on Benny’s face and said with a smile, “Now it’s time to take that luggage and go home. Be careful and walk slowly, okay?” Benny nodded and carefully held his suitcase as he walked out of the airport. He was on his way home. <|endoftext|> Once upon a time, there was a delicate boat floating in the ocean. It was getting tired so it decided to take a rest. The boat gently floated to a beautiful harbor. The harbor was full of many boats like the delicate one. The delicate boat was happy to be in the harbor. All the boats rested in the harbor together. There was a nice breeze blowing. Everyone was happy and safe in the harbor. The delicate boat went to sleep in the harbor and felt cozy and content. The boats stayed in the harbor for a long time to get some rest. After a while, the boats started to wake up and were ready to sail again. The delicate boat was happy to be in the harbor and thanked them all for the peace it had found. The delicate boat was so happy that it had found a place to rest in the harbor. It said goodbye to the other boats and started sailing again. The delicate boat went on many adventures, but it would always remember the peaceful moments it had spent in the harbor. <|endoftext|> John was out at the park with his family. He wanted to act brave, so he ran and jumped across the wooden bridge. But when he reached the other side, he felt a bit dizzy. He decided to sit and watch his brothers and sisters play. He heard his dad say something about a surprise. Mom asked, "What surprise, dad?" Dad replied, "We'll give John a special pass that he can use to go on all the rides at the fair!" John was so excited that he jumped off the bridge and ran over to his dad. "Can I go on the rides?" he squealed. Dad smiled and said, "All in good time my son. You'll have to wait and see!" All the way home, John wondered what it would be like to be able to go on all the rides. When they arrived home, he was so eager to find out that he ran inside and grabbed the pass. But as he looked at it, he felt a bit dizzy. It was only then that he realized it had to be a special day to use the pass. Now he was more excited than ever to find out what it was! <|endoftext|> Once upon a time, there lived a little girl. She had a special mission; to collect doves. Everyday she would put on her brightly coloured dress and her sparkly shoes and go out collecting. Every morning she would walk to the park and then look to the sky. Then she would spot a dove and try to catch it in her hands. Today was a sunny day, and the little girl was feeling very sleepy. She found a big tree to sit under as she watched the doves up in the sky. Suddenly she noticed a dove land on a branch close to her. Gently, she reached out to try and catch it. "Coo-Coo!" the dove said. The little girl was suprised. She had never heard a dove talk before! "Hi, little dove" the little girl said. "My name's Daisy. And I'm here to collect doves". "Well, you caught me!" the dove said. "Let's be friends!" Daisy was so happy. She had found a special friend and could share her dove collecting mission with him. Together Daisy and her dove friend went on many adventures and caught lots of doves. Every night before bedtime, Daisy would give her doves a big hug before they flew up to the sky. That was Daisy's life collecting her special doves, and it was just perfect. <|endoftext|> Once upon a time there were two friends, Jack and Jill. They liked to play together every day in the park. One day, Jack wanted to eat beef for his lunch. But Jill wanted to eat something else. Jack said to Jill, "Let's eat beef, it's yummy!" Jill said, "No, I want to eat something pink." Jack was not happy and they started to play a game of tag. Suddenly, Jack had an idea. He said, "Let's go to the store and buy a pink beef!" Jill was excited and they ran to the store. They found a delicious pink beef, and Jack bought it for Jill. Jill was so happy, and they both enjoyed eating the pink beef together. The friends kept playing in the park and enjoyed their lunch of pink beef. From that day on, Jack and Jill enjoyed playing together and eating pink beef for lunch. <|endoftext|> Once upon a time, there was a small, weak girl. One day, she went on an adventure and went to the beach. On the beach, she saw the ocean, which was big and blue. She waved to it and wondered what kind of dreams it could have. Suddenly, she felt brave and decided to dip her feet into the ocean water. The water was cold and tickled her feet. She liked it and wished she could stay there forever. When it got dark, the girl went back home. She looked up at the stars and thought about how small she was compared to the universe. Then, she remembered the dream she wanted to take from the ocean. She imagined it was a dream that could make her strong, and she held onto it tight. The next day, she took a deep breath and waved goodbye to the ocean. She felt weak but strong in her heart. She knew that no matter how hard things got, her dream would give her the courage she needed to keep going. <|endoftext|> The sun shone brightly in the jungle that day. Bob the monkey was sad. He watched the other animals in the jungle playing together. He wanted to join in the fun, but nobody asked him to play. Suddenly, an elephant stomped into the clearing and roared. He was mad! Everyone else looked scared. The elephant turned to Bob and said, "You need to help me find my lost trunk!" Bob didn't want to help, but he knew he had to. He climbed onto the elephant's back and off they went. But when the elephant couldn't find his trunk, he got even madder! He turned to Bob and slapped him with his trunk. Bob ran off, never to be seen in the jungle again. He was sad. He wished someone had played with him when he had the chance. <|endoftext|> Once upon a time, there was a little boy named Jack. Jack was a happy and active child who loved to play around wherever he went. Today, Jack was feeling very tired so he decided to take a nap. He found a big tree and he decided to take a stand underneath it. He snuggled up to the trunk and closed his eyes. As Jack was sleeping, he felt something touch his arm. He opened his eyes and saw a butterfly looking at him. "Hello," said Jack, rubbing the sleep from his eyes. The butterfly said nothing and continued to touch Jack's arm. It felt so soft that Jack smiled and nodded his head in agreement. The butterfly flew away and Jack slowly got up and stretched his legs. He felt much better and much less tired. Jack smiled and said thank you to the butterfly before he went off to play. <|endoftext|> Fred was a robot who lived on a planet far away. He loved to go on adventures and one day he wanted to explore. He put on his running shoes and began to jog. He thought it would be a nice day for running. As he jogged, he looked up at the sky and saw an enormous planet. It was so big and sparkly that he wanted to go and see it. Fred ran even faster and eventually he got to the enormous planet. When he arrived, he felt so excited! He wanted to explore the planet. He looked around and said, “Hello? Anyone home?” Suddenly, he heard a voice from the sky. “Hi Fred, I’m here!” Fred looked up and saw a giant smiling at him. The giant said, “Welcome to my planet – let’s explore together!” Fred and the giant had a wonderful time exploring the enormous planet. They ran and jogged around the planet, discovering new things and having great adventures. Fred was so happy and grateful to have found this amazing planet. He couldn’t wait to come back and explore it again! <|endoftext|> Once upon a time there was a boy called Tom. Tom liked to play outside but sometimes he got tired and wanted to rest. One day, Tom was sitting in his garden and saw something he wanted - a nice, red stamp. It was beautiful and Tom knew he needed it. So Tom asked his mum, “Mummy, I need that red stamp!” But his mum shook her head and said, “No, Tom. You don’t need it. We already have enough stamps.” So Tom kept asking and eventually his mum said, “You can borrow a stamp from your friend. That’s much nicer than taking something you don’t need.” So Tom went to his friend’s house and asked if he could borrow a stamp. His friend said yes and gave Tom a nice, red stamp. Tom was so happy and learnt a lesson - it’s better to ask and share than to take something you don’t need. <|endoftext|> Mia was building lots of different shapes with blocks. She had built a big circle and a square and lots of different shapes! Daddy came in to join her and asked what she had built. "I've made a circle and a square," explained Mia. "I'm going to make a cube next!" Mia started to lay out the blocks in a cube shape. Daddy sat down and watched her build. After a while, the cube was finished! "Look Daddy, I made a cube!" exclaimed Mia. "That's great Mia," said Daddy. "That cube looks really fit," he said. Mia smiled and she was really proud of her cube. Then she started to make another cube. This one was even more fit! <|endoftext|> Once upon a time there was a prince who was very rude. He was always unkind to everyone he met. One day he met a little girl who was only three years old. She was so sweet and kind. The prince thought it would be fun to pick on her. The girl looked up at the prince and said, "Why are you being so mean to me?" The prince snarled and said, "Because I can." The little girl stood up tall and bravely said, "I will not let you be so rude! We must fight!" The prince was surprised. He asked, "What do you mean fight?" The little girl smiled and said, "I mean that we can fight with our words. We can both be kind and polite. We can have a nice conversation." The prince thought about this for a moment and realized how silly he had been. He nodded and said, "Ok. Let's do that!" Since then the prince and the little girl have become friends. They talk every day and never fight with words. <|endoftext|> Tiny Tom was walking in the park with his mom when he suddenly saw a huge well. He looked up at his mom with excitement and asked, "What is that well mommy?". His mom smiled and replied, "Well, it's a very deep hole in the ground with water at the bottom, sweetheart". Tom couldn't believe his eyes. He wanted to see what was in the huge well. So he stepped closer to the edge and took a look inside. Suddenly, he lost his footing and was about to fall in the well. His mom quickly ran to him and grabbed him, just in time. Tom started to cry and his mom hugged him tightly. She then said, "I know you are curious, Tom, but it can be dangerous to investigate things without knowing them. Let's take a quick break to calm down. Tom sighed, and looked away, embarrassed. He realized he had done something wrong and said sorry to his mom. Together, they returned home and his mom reminded him that curiosity was a good thing but it's important to always be careful. <|endoftext|> One day, a fox was wandering through the forest. The fox moved quickly and gracefully, her playful spirit showing in her every step. All of a sudden, she saw a small rabbit ahead. The rabbit immediately seemed scared and ran away. The fox was surprised, for she had no intention of scaring away the rabbit. She wanted to make friends! The fox chased after the rabbit and called out, "Don't be scared! I just want to be your friend." The rabbit stopped and looked back. It crept back slowly, not sure if it could trust the fox. The fox declared firmly, "I won't ever hurt you. I promise!" Th