├── LICENSE ├── README.md └── docs ├── 1-基础语法.md ├── 2-爬虫.md └── backend ├── 3-TODOLIST.md ├── 4-寒假轮作业.md ├── 5-合作轮交易平台.md └── 6-暑假轮考核.md /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # west2-online python考核指南 2 | 3 | 这里是西二在线工作室python方向的考核指南,旨在为初学者提供一个循序渐进的python学习路线 4 | 5 | > 本文写于2023年5月,已经**不建议**学习python后端,仅供参考 6 | > 7 | 8 | ## 版权 9 | 10 | 本项目遵循GPL-3.0 License,转载请注明本项目仓库地址 11 | 12 | ## 概览 13 | 14 | | 阶段 | 学习内容 | 预期时长 | 15 | | ---------------------------------------------- | ------------------------------------------------------------ | ------------- | 16 | | [基础](docs/1-基础语法.md) | Python基本操作,字符串、列表、字典的使用,函数,类与对象 | 30天(1个月) | 17 | | [爬虫](docs/2-爬虫.md) | http请求/响应,http包,网页架构,数据提取和解析,数据库的使用 | 30天(1个月) | 18 | | [备忘录](docs/backend/3-TODOLIST.md) | GitHub和git的使用,REST风格,flask框架/fastapi框架,接口测试工具 | 30天(1个月) | 19 | | [大作业](docs/backend/4-寒假轮作业.md)(后端) | JWT,参数校验,ORM,工程化,异常处理,文件处理 | 60天(2个月) | 20 | | [合作](docs/backend/5-合作轮交易平台.md)(后端) | WebSocket通信,日志,权限,缓存,测试,服务器部署 | 90天(3个月) | 21 | | [暑期轮](docs/backend/6-暑假轮考核.md)(后端) | 与前端/客户端进行合作开发第一款相对成熟的产品,了解项目的对接、开发、测试;进行底层源码的学习 | 60天(2个月) | 22 | 23 | 预期时长以一名零基础为参考,如果是已经对其他语言有一定的了解所有预期时长都可以除以10 24 | 25 | ## 时间安排 26 | 27 | 考虑到学期的期末等因素,以学期为单位,安排学习内容如下 28 | 29 | | 时间 | 完成内容 | 30 | | -------- | ------------------ | 31 | | 第一学期 | 基础、爬虫、备忘录 | 32 | | 寒假 | 大作业 | 33 | | 第二学期 | 合作 | 34 | | 暑假 | 暑期合作 | 35 | 36 | ## 考核设计 37 | 38 | | 名称 | 解释 | 39 | | -------- | ---------------------------------------------- | 40 | | 参考资料 | 供给同学们进行参考学习的部分学习资料 | 41 | | 知识点 | 本轮要求掌握的知识内容 | 42 | | 背景 | (部分阶段有)增加部分趣味性的故事 | 43 | | 任务 | 任务的具体描述 | 44 | | Bonus | 在完成任务的基础上进行实现更加深入的功能/特性 | 45 | | 提示 | (部分阶段有)对考核,或者对语言学习的一些提示 | 46 | 47 | ## 考核目标 48 | 49 | 我们的目标是快速为初学者构建一套**较为完整的Python开发知识体系**。也就是经过完整的考核过程后,你将会有**独立开发一款后端软件**的能力,这意味着你可以通过这个赚取你的第一桶金了(指接外包)。 50 | 51 | 但是很明显,这样快速的学习并**不能满足现代企业对Python开发工程师的需求**。这要求我们在学习过程中更加注重对原理、源码的掌握,同时这也能在面试等方面提供更多的帮助。并且我们的考核更加**偏向业务**,因此需要自己学习更加深入的内容,我们只是提供一条学习道路并培养你一定的**源码阅读、文档阅读、独立学习**的能力。 52 | 53 | 如果你有意将Python开发作为你将来学习或工作的主要方向,我们建议认真负责的完成每一轮的**全部内容**,并能够简单了解一些框架的底层原理与设计模式、运维相关的知识、增强创造创新的能力。 54 | 55 | ## 项目结构 56 | 57 | ``` 58 | . 59 | ├────docs // 考核文档 60 | │ ├────backend // 后续后端考核文档 61 | ├────LICENSE 62 | └────README.md 63 | ``` 64 | 65 | 66 | 67 | ## 其他 68 | 69 | 由于AI开发特性原因(需要学习Python语言基本特性),前两轮考核内容含有AI的作业。 70 | -------------------------------------------------------------------------------- /docs/1-基础语法.md: -------------------------------------------------------------------------------- 1 | # 1-基础语法 2 | 3 | - 配环境 4 | - 推荐教程 5 | - 初学者作业 6 | - 有基础者作业 7 | - 作业要求 8 | - 有想学人工智能学习的同学注意 9 | - 预习下⼀轮 10 | - 考核截止日期 11 | - 提交方式 12 | 13 | ## 配环境 14 | 15 | 下载pycharm [PyCharm:JetBrains为专业开发者提供的Python IDE](https://www.jetbrains.com.cn/pycharm/) 16 | 17 | 一开始学下载社区版 18 | 19 | 想要用专业版可以申请学生免费许可证 20 | 21 | 想搞人工智能的电脑最好有好点的显卡,实在没有只能搞gpu云服务了 22 | 23 | 想搞人工智能的去装个anaconda 24 | 25 | ## 推荐教程 26 | 27 | 1. Crossin编程教室 [Python 入门指南 (python666.cn)](https://python666.cn/cls/lesson/list/) 28 | 29 | 2. Python - 100天从新手到大师的前10节课 [jackfrued/Python-100-Days: Python - 100天从新手到大师 (github.com)](https://github.com/jackfrued/Python-100-Days) 30 | 31 | 3. Python官方文档 [3.10.7 Documentation (python.org)](https://docs.python.org/zh-cn/3/) 32 | 33 | 4. 菜鸟教程 [Python3 教程 | 菜鸟教程 (runoob.com)](https://www.runoob.com/python3/python3-tutorial.html) 34 | 35 | 5. 廖雪峰的官⽅教程 [Python教程 - 廖雪峰的官方网站 (liaoxuefeng.com)](https://www.liaoxuefeng.com/wiki/1016959663602400) 36 | 37 | 6. b站能学的视频太多了,但是大部分时间太长,难以坚持看下去,可以先对着上面的教程看,有看不懂的再去找对应的视频 38 | 39 | 7. 关于Python的学习路线和一些常见问题 [code-roadmap/Python学习路线.md at main · liyupi/code-roadmap (github.com)](https://github.com/liyupi/code-roadmap/blob/main/docs/roadmap/Python学习路线.md) 40 | 41 | 42 | ## 初学者作业 43 | 44 | 1. 输入三个整数x,y,z,请尝试用多种方式把这三个数由大到小输出 45 | 2. 输出九九乘法表 46 | 3. 输入⼀个字符串,判断字符串中是否含有"ol"这个⼦串,若有把所有的"ol"替换为"fzu",最后把字符串倒序输出 47 | 4. 输入⼀个列表(list),列表中含有字符串和整数,删除其中的字符串元素,然后把剩下的整数升序排序,输出列表 48 | 5. 创建一个字典(dict),为字典添加几个键为学号,值为姓名元素,删除学号尾号为偶数的元素,输出字典 49 | 6. 创建一个函数,这个函数可以统计一个只有数字的列表中各个数字出现的次数,通过字典方式返回 50 | 7. 设计⼀个商品类,它具有的私有数据成员是商品序号、商品名、单价、总数量和剩余数量。具有的 公有成员函数是:初始化商品信息的构造函数__init__,显示商品信息的函数display,计算已售出 商品价值income,修改商品信息的函数setdata 51 | 8. (可选)尝试用所学的知识写一个斗地主随机发牌程序,将每个人的发牌以及多的三张牌的结果分别输出到player1.txt,player2.txt,player3.txt,others.txt四个文件中,可以不要求牌的花色 52 | 53 | ## 有基础者作业 54 | 55 | 1. 实现一个装饰器,在开始执行函数时输出该函数名称, 并在结束时输出函数的开始时间和结束时间以及运行时间 56 | 57 | 2. 用所学的知识写一个斗地主随机发牌程序,将每个人的发牌以及多的三张牌的结果分别按照从大到小的顺序输出到player1.txt,player2.txt,player3.txt,others.txt四个文件中 58 | 59 | 3. 写一个列表推导式,生成一个5*10的矩阵,矩阵内的所有值为1,再写一个列表推导式,把这个矩阵转置 60 | 61 | 4. 了解类的魔术方法(Magic Method)。创建类MyZoo,实现以下功能: 62 | 63 | - 具有字典anmials,动物名称作为key,动物数量作为value 64 | 65 | - 实例化对象的时候,输出"My Zoo!" 66 | 67 | - 创建对象的时候可以输入字典进行初始化,若无字典传入,则初始化anmials为空字典 68 | 69 | ```python 70 | myzoooo = MyZoo({"pig":5,'dog':6}) 71 | myzoooo = MyZoo() 72 | ``` 73 | 74 | 75 | 76 | - print(myzoooo) 输出 动物名称和数量 77 | 78 | - 比较两个对象是否相等时,只要动物种类一样,就判断相等: 79 | 80 | ```python 81 | 输入: 82 | myzoooo1 = MyZoo({'pig':1}) 83 | myzoooo2 = MyZoo({'pig':5}) 84 | print(myzoooo1 == myzoooo2) 85 | 输出: 86 | My Zoo! 87 | My Zoo! 88 | True 89 | ``` 90 | 91 | 92 | 93 | - len(myzoooo) 输出所有动物总数 94 | 95 | 5. (可选)写一个正则表达式,用于验证用户密码,长度在6~18 之间,只能包含英文和数字 96 | 97 | ## 作业要求 98 | 99 | 1. 不要抄袭哦 100 | 2. 遇到不会的时候先自己去网上找资料,实在找不到在来问,用搜索引擎解决问题的能力非常重要 101 | 3. 例如输入输出的格式可以自己决定,但是要符合题目要求 102 | 4. 有基础者的只需要做有基础者作业即可 103 | 104 | ## 有想学人工智能学习的同学注意 105 | 106 | 我们会在第二轮考核结束后进行一次面试,进行人工智能方向和后端方向的分流。 107 | 108 | 对人工智能感兴趣的同学可以提前做好以下准备: 109 | 110 | 1. 机器学习理论知识:推荐教程:吴恩达机器学习 https://study.163.com/course/introduction/1210076550.htm (当然其他教程也可)打好基础很重要。 111 | 2. Python的numpy和pandas库的使用:便于数据处理,数据处理也很重要捏。 112 | 113 | ## 预习下⼀轮 114 | 115 | 1. 爬虫是什么? 116 | 2. 了解正则表达式 117 | 3. 了解requests,selenium等库,有能力的可以尝试学习scrapy框架 118 | 4. 了解lxml或者BeautifulSoup 119 | 5. 了解mysql数据库的使用方法 120 | 6. 注册GitHub账号,学习git的使用 121 | 7. 了解基础的网页架构(html+css) 122 | 8. 爬虫教程 https://cuiqingcai.com/5052.html +b站视频也很多 123 | 124 | -------------------------------------------------------------------------------- /docs/2-爬虫.md: -------------------------------------------------------------------------------- 1 | # 2-爬虫 2 | 3 | - 知识点 4 | - 推荐教程 5 | - 初学者作业 6 | - 有基础者作业 7 | - 额外作业 8 | - 作业要求 9 | - 有想学人工智能学习的同学注意 10 | - 预习下⼀轮 11 | 12 | ## 知识点 13 | 14 | 1. 网页架构(html+css+css选择器) 15 | 2. 网页抓包工具的使用 16 | 3. 网页请求(requests库的使用,请求头,请求参数,代理) 17 | 4. 数据提取(正则表达式,xpath(推荐),bs4) 18 | 5. json,解码,模拟登录,反爬,简单的js逆向(可选) 19 | 6. selenium的使用 20 | 7. 数据库的使用,推荐使用mysql 21 | 8. scrapy框架的使用 22 | 23 | ## 推荐教程 24 | 25 | 1. b站视频 https://www.bilibili.com/video/BV1Yh411o7Sz (前面比较推荐,后面异步协程多任务有兴趣的可以学) 26 | 27 | 2. Python3 网络爬虫开发实战教程 https://cuiqingcai.com/5052.html (不要全看,重点requests,xpath,ajax,其他太杂不需要) 28 | 29 | 3. devtools https://learn.microsoft.com/zh-cn/microsoft-edge/devtools-guide-chromium/elements-tool/elements-tool (重点**元素工具和网络工具**,控制台工具,应用程序工具也比较有用,源代码工具js逆向时会用到) 30 | 31 | 4. xpath教程 https://www.runoob.com/xpath/xpath-syntax.html 32 | 33 | 5. selenium https://blog.csdn.net/IT_LanTian/article/details/122986725 ( v4.0版本及之后的教程:https://blog.csdn.net/stitchD/article/details/123818886 、https://www.selenium.dev/documentation/ ) 34 | 35 | 6. mysql下载安装 https://blog.csdn.net/weixin_63294643/article/details/127176401 (可以下载Navicat for MySQL获取可视化页面) 36 | 37 | 7. python操作mysql https://www.runoob.com/python3/python3-mysql.html 38 | 39 | 8. github https://github.com/ 40 | 41 | 42 | ## 初学者作业 43 | 44 | 1. 爬取福大教务通知 https://jwch.fzu.edu.cn/jxtz.htm 45 | 46 | 要求: 47 | 48 | - 获取教务通知(最近100条即可,但需要获取总页数或条数) 49 | - 提取通知信息中的“通知人”(如:质量办、计划科)、标题、日期、详情链接。 50 | - 爬取通知详情的html,可能存在“附件”,提取附件名,附件下载次数,附件链接吗,有能力请尽可能将附件爬取下来。 51 | - 上述内容一律要去除回车、括号等无用符号 52 | - 把除附件外爬取到的数据存入数据库中 53 | 54 | 2. 爬取百度百科历史上的今天 https://baike.baidu.com/calendar/ 55 | 56 | 要求: 57 | 58 | - 获取一年内每天的历史上的今天发生了什么,包括年份,事件类型(birth、death等),标题,简要内容 59 | - 上述内容一律要去除回车、括号等无用符号 60 | - 把爬取到的数据存入数据库中 61 | 62 | ## 有基础者作业 63 | 64 | 1. 用scrapy框架爬取b站评论,不要用selenium https://www.bilibili.com/ 65 | 66 | 要求: 67 | 68 | - 获取视频的投币、点赞、收藏及评论总数 69 | - 获取该视频下的所有评论和子评论!所有评论和子评论!所有评论和子评论!(不要只有三条子评论的那种,要所有子评论),包括评论用户,评论内容,评论时间,评论点赞数 70 | - 把爬取到的数据存入数据库中,注意区分是否为子评论 71 | 72 | ## 额外作业(给想学更多的同学的,对接下来的学习也有帮助) 73 | 74 | 1. (**已经不推荐**)做一个简单的页面,可以选择复刻 http://news.fznews.com.cn/guonei/20221024/6356459aa9b15.shtml 的主体部分,不要求页头和页尾,不要求js,自己找别的类似的页面进行复刻也可以 75 | - 知识点:html+css 76 | - 推荐教程:菜鸟教程, w3cschool 77 | 78 | 2. 试用numpy、pandas等库分析初学者作业第一题中:(对人工智能感兴趣的同学尽可能尝试) 79 | 要求: 80 | - 附件下载次数与通知人是否关系,若有,有什么联系? 81 | - 统计每天的通知数,分析哪段时间通知比较密集? 82 | - 作业提交请附上报告(代码运行结果及其分析) 83 | 84 | 3. 试用selenium驱动浏览器对豆瓣(https://movie.douban.com/top250) 做一个长截图并保存在本地 (请将源代码和截图一起提交) 85 | 86 | 4. 学习使用用matplotlib画图 87 | 88 | 要求: 89 | 90 | 1. 用matplotlib画正态分布曲线,其中平均值为0,标准差为1,需要画出的要点为:标题,xy轴标签,概率曲线的标签,双y轴 91 | 2. 用matplotlib画三位圆锥,其解析式为z=-np.sqrt(x ** 2 + y ** 2),xy的范围都为[-5,5],步进0.5,需要画出的要点为:标题,xy轴标签,三位平面,colorbar,色彩映射使用viridis 92 | 93 | ## 作业要求 94 | 95 | 1. 不要抄袭哦 96 | 2. 遇到不会的时候先自己去网上找资料,实在找不到再来问,用搜索引擎解决问题的能力非常重要 97 | 4. 有基础者的只需要做有基础者作业即可 98 | 5. 额外作业想做就做,也可以不做 99 | 100 | ## 有想学人工智能学习的同学注意 101 | 102 | 1. 继续学习机器学习基础知识 103 | 2. 额外作业第二题必须要做,也算是对数据分析和处理的熟悉过程。 104 | 3. 试着了解机器学习的一部分基础知识概念 105 | 比如它能解决什么问题 106 | 能分辨出需要解决的问题是什么类型 107 | 什么是训练集 什么是测试集 108 | 109 | ## 预习下⼀轮 110 | 111 | 1. 了解js的基本知识 112 | 2. 了解⼀下flask库/fastapi库 (两者选一个即可) 113 | 3. 尝试用flask库/fastapi库写一个todoList 114 | 4. 了解RESTful API规范 115 | 5. 熟悉数据库的使用 116 | 6. 注册GitHub账号,学习git的使用 117 | 7. flask教程 https://dormousehole.readthedocs.io/en/latest/ 118 | 8. fastapi教程 https://fastapi.tiangolo.com/ 119 | -------------------------------------------------------------------------------- /docs/backend/3-TODOLIST.md: -------------------------------------------------------------------------------- 1 | # 3-TODOLIST 2 | 3 | - 想说的话 4 | - 知识点 5 | - 推荐教程 6 | - 初学者作业 7 | - 有基础者作业 8 | - ~~人工智能作业~~ 9 | 10 | ## 想说的话 11 | 12 | 1. ~~Q:我想学人工智能,为什么要学后端方面的知识?~~ 13 | 14 | ~~A:人工智能不是单打独斗,也需要合作应用,很多时候训练好的模型在别人调用时,需要一些简单的接口,因此需要学习少量的后端知识,从而知道怎么发送接口,但是无需深入了解。~~ 15 | 16 | 2. Q:Python后端有前途吗? 17 | 18 | A:Python后端在几年前还是很热门的,但是现在已经日渐式微,在求职方面比不过Java和Go,但由于搭建速度快还是有些中小公司在产品初期使用,因此如果有想深入后端的,可以去多看看Java和Go,或者转前端测试。但是如果你只想做一个个人的小项目的话,Python开发速度快,工具多,是不错的选择。 19 | 20 | 3. Q:为什么学习Flask或者FastApi而不是更强的Django? 21 | 22 | A:现在前后端分离是主流,前端通过接口和后端通讯,而不是后端直接渲染,强调低耦合。而Django在前后端分离的项目上,对比Flask以及FastApi没有优势,反而显得太重了。因此选择Flask或者FastApi进行学习 23 | 24 | 4. ~~Q:人工智能面试会考什么?~~ 25 | 26 | ~~A:在本轮,我们会要求有想要参加人工智能的同学写一些通过之前的资料学习的感悟和思考,然后根据这些感悟有针对性的提问,检验大家的学习成果。当然搞人工智能需要你有一个好一点的显卡(如果你能搞到室友的显卡也不是不可以)。~~ 27 | 28 | ## 知识点 29 | 30 | 1. 注册GitHub账号,学习git的使用 31 | 2. HTTP请求,URL,请求头,请求体,状态码与REST风格API 32 | 3. flask框架/fastapi框架的使用 33 | 4. 接口测试工具的使用(apifox(推荐),apipost,postman) 34 | 5. 数据库的增删改查 35 | 6. 接口文档编写(接口测试工具的文档功能/swagger) 36 | 7. 简单网页的制作(可选) 37 | 38 | ## 推荐教程 39 | 40 | 1. git和GitHub的使用 https://blog.csdn.net/weixin_53315561/article/details/126802065 (pycharm的git其实也很方便,可以了解一下) 41 | 42 | 2. flask文档 https://dormousehole.readthedocs.io/en/latest/ 43 | 44 | 3. flask视频教程 https://www.bilibili.com/video/BV1v7411M7us (为什么推荐这个教程,因为这个教程只讲接口,不用了解模板和渲染的纯后台,更适合现在前后端分离趋势) 45 | 46 | 4. fastapi文档 https://fastapi.tiangolo.com/zh/ (fastapi的文档已经写的很完善了,一步步入手,可以先看文档,不会再去搜) 47 | 48 | 5. 接口测试工具 49 | - apifox (https://www.apifox.cn/) 50 | - apipost (https://www.apipost.cn/) 51 | - postman (https://www.postman.com/) 52 | 53 | 6. REST风格api (https://juejin.cn/post/7025222833798119454) 状态码请按照文中的反例来写,状态码全传200,通过返回体中的code字段进行区分请求是否成功,同时返回msg,成功返回data。至于为什么状态码全传200可以看知乎 54 | 55 | ```json 56 | HTTP/1.1 200 ok 57 | Content-Type: application/json 58 | Server: example.com 59 | #失败 60 | { 61 | "code": 404, 62 | "msg": "该活动不存在", 63 | } 64 | #成功 65 | { 66 | "code": 200, 67 | "msg": "success", 68 | "data": { 69 | ... 70 | } 71 | } 72 | ``` 73 | 74 | 6. RESTful api部分相关前置知识 https://cloud.tencent.com/developer/article/1448167 、https://blog.csdn.net/D_R_L_T/article/details/82562902 75 | 76 | 7. 多种传参方式,Query传参和Body传参,具体请看相应框架的文档 77 | 78 | 8. GitHub是一个很好的学习平台,可以看别人的代码的架构了解自己的不足 79 | 80 | 9. pycharm可以在创建项目时选择Flask项目和FastApi项目,让项目快速启动起来,可以尝试 81 | 82 | 83 | ## 初学者作业 84 | 85 | 编写一个TODOLIST,使用flask框架/fastapi框架**完成以下 API**,执行**操作数据表**的操作,**并编写接口文档**! 86 | 87 | 增: 88 | 89 | - 添加一条新的待办事项 90 | 91 | 改: 92 | 93 | - 将 一条/所有待办事项设置为已完成 94 | - 将 一条/所有已完成事项设置为待办 95 | 96 | 查: 97 | 98 | - 查看 所有已完成/所有待办/所有事项 (需分页) 99 | - 输入关键字查询事项 (需分页) 100 | - 通过id查询事项 101 | 102 | 删: 103 | 104 | - 删除 一条/所有已完成/所有待办/所有事项 105 | 106 | **要求数据表数据与数据类型** 107 | 108 | | id | 主键,int | 109 | | -------- | ------------- | 110 | | 标题 | varchar | 111 | | 内容 | varchar/text | 112 | | 完成状态 | varchar | 113 | | 添加时间 | int/timestamp | 114 | | 截止时间 | int/timestamp | 115 | 116 | **要求:** 117 | 118 | 1. 以上的改,查,删的“一条”请都通过id实现 119 | 2. 设置合理的路径,能从路径看出所实现的功能 120 | 3. 接口尽量满足 RESTful API 规范 121 | 4. 返回的接口格式请和上面所说的类似,返回JSON格式数据 122 | 123 | ## 有基础者作业 124 | 125 | **在完成初学者作业的基础上有选择的加以下功能** 126 | 127 | - 数据表再多一个type类型,区分事项的紧急度,类型为枚举类型 128 | - 使用ORM 129 | - 跨域功能 130 | - 使用Redis缓存 131 | - 做一个简单的前端todolist页面,不要求美观,只要求展现数据和进行增删改查功能,要求使用ajax通讯。可以使用jQuery和bootstrap(上面三个都是很多年前的技术,想搞全栈的直接去学前端框架) 132 | - 编写单元测试 133 | 134 | ## ~~人工智能作业~~ 135 | 136 | 1. ~~完成初学者作业(查询可以不分页)~~ 137 | 2. ~~结合之前学习的和人工智能有关的内容,根据之前的学习情况梳理一份学习笔记,用MarkDown格式写,最好写的通俗易懂,加上自己的理解,字数不限,越多越好,并上传。~~ 138 | -------------------------------------------------------------------------------- /docs/backend/4-寒假轮作业.md: -------------------------------------------------------------------------------- 1 | # 4-寒假轮作业 2 | 3 | - 知识点 4 | - 推荐教程 5 | - 多人作业 6 | - 单人作业 7 | 8 | ## 知识点 9 | 10 | 1. RESTAPI 11 | 2. JWT鉴权 12 | 3. 参数校验 13 | 4. ORM 14 | 5. 工程化 15 | 6. 异常处理 16 | 7. 文件处理 17 | 8. 日志 18 | 9. 权限 19 | 10. 参数校验 20 | 11. 缓存 21 | 12. docker 22 | 13. 雪花算法 23 | 24 | ## 推荐教程 25 | 26 | 1. RESTAPI 27 | 2. JWT鉴权知识 https://learnku.com/articles/17883 28 | 3. JWT用法 https://blog.csdn.net/yangbindxj/article/details/125344291 (这里用了Fastapi的例子,其实jwt库两个都可以用) 29 | 4. ORM 用Flask推荐flask-sqlalchemy,用Fastapi推荐sqlalchemy,flask-sqlalchemy可以通过paginate分页比较方便,sqlalchemy分页需要offset+limit 30 | 5. 蓝图(Flask)/APIRouter(Fastapi)看各自的文档还有网上资料 31 | 6. 通过异常处理器(@app.errorhandler/@app.exception_handler)捕获异常(参数错误/token错误),并把异常结果格式化为应该返回的格式 32 | 7. 文件的上传,响应文件下载 33 | 8. 推荐使用logging日志工具打印运行时的日志 34 | 9. 在登陆后在token中添加用户的权限信息,对于需要token的接口在JWT解码时进行权限检验和进行拦截,Flask使用装饰器,FastApi可以选择依赖注入,或者使用中间件拦截 35 | 10. FastiApi可以使用自带的参数检验,Flask应该引入Flask-Restful,规范RestfulAPi,同时使用其带的参数检验功能[Flask-RESTful](http://www.pythondoc.com/Flask-RESTful/index.html) 36 | 11. 在框架中接入redis等进行缓存,读写很快,可以用于缓存验证码,以及一些经常读写的信息 37 | 12. 部署项目环境弄起来非常的难受,建议大家学习一下docker,使用docker将项目部署到服务器 38 | 13. 各种id可以使用雪花算法来生成,防止数据库自增id过程出错 39 | 40 | ## 多人作业 41 | 42 | > 本轮为第一轮寒假轮考核。今年我们在正式考核前加入了预热环节。 43 | 44 | ### 目的 45 | 46 | - 与前端同学合作,实现前后端对接,实现项目的真正落地 47 | - 对Flask的掌握 48 | - 熟悉开发流程与规范 49 | 50 | ### 任务 51 | 52 | #### Warm Up:实现一个简单的Todolist对接 53 | 54 | - 这一步旨在先熟悉一下前后端该如何合作与对接(后端写的接口,前端该如何调用,前端发送的数据,后端该如何接收),不需要写很复杂,页面简单,能实现基本的待办清单功能即可。 55 | - 也可以在第三轮的作业上进行修改,补充对接逻辑。 56 | - 这个部分**为期7天**。 57 | 58 | #### 寒假轮考核:仿一个社区平台——稀土掘金 59 | 60 | > 红线涂掉的就是不需要的 61 | 62 | 1. 首页 63 | 64 | ⽂章榜:按点击量降序 65 | 66 | 最新:最新发布的⽂章 67 | 68 | 写⽂章按钮:点击之后进入文章编辑界面 69 | 70 | 带头像的下拉菜单:有“我的主页”这一项就行 71 | 72 | [![img](https://github.com/west2-online-reserve/collection-frontends/raw/main/img/4-%E5%AF%92%E5%81%87%E5%90%88%E4%BD%9C%E8%BD%AE/image.png)](https://github.com/west2-online-reserve/collection-frontends/blob/main/img/4-寒假合作轮/image.png) 73 | 74 | [![img](https://github.com/west2-online-reserve/collection-frontends/raw/main/img/4-%E5%AF%92%E5%81%87%E5%90%88%E4%BD%9C%E8%BD%AE/image-1.png)](https://github.com/west2-online-reserve/collection-frontends/blob/main/img/4-寒假合作轮/image-1.png) 75 | 76 | 2. 文章页 77 | 78 | 内容展示:Markdown 解析与渲染 79 | 80 | 点赞按钮:点赞收藏文章 81 | 82 | 评论功能:普通⽂本评论就⾏,不⽤加表情/图⽚/链接等,要求带⼦评论 83 | 84 | [![img](https://github.com/west2-online-reserve/collection-frontends/raw/main/img/4-%E5%AF%92%E5%81%87%E5%90%88%E4%BD%9C%E8%BD%AE/image-2.png)](https://github.com/west2-online-reserve/collection-frontends/blob/main/img/4-寒假合作轮/image-2.png) 85 | 86 | [![img](https://github.com/west2-online-reserve/collection-frontends/raw/main/img/4-%E5%AF%92%E5%81%87%E5%90%88%E4%BD%9C%E8%BD%AE/image-3.png)](https://github.com/west2-online-reserve/collection-frontends/blob/main/img/4-寒假合作轮/image-3.png) 87 | 88 | 3. 我的主页 89 | 90 | 个人简介 91 | 92 | 我写的⽂章 93 | 94 | 我点赞的⽂章 95 | 96 | 进入设置页按钮 97 | 98 | [![img](https://github.com/west2-online-reserve/collection-frontends/raw/main/img/4-%E5%AF%92%E5%81%87%E5%90%88%E4%BD%9C%E8%BD%AE/image-4.png)](https://github.com/west2-online-reserve/collection-frontends/blob/main/img/4-寒假合作轮/image-4.png) 99 | 100 | 4. 设置页 101 | 102 | 支持修改用户名 103 | 104 | 支持修改密码 105 | 106 | 支持修改头像 107 | 108 | [![img](https://github.com/west2-online-reserve/collection-frontends/raw/main/img/4-%E5%AF%92%E5%81%87%E5%90%88%E4%BD%9C%E8%BD%AE/image-5.png)](https://github.com/west2-online-reserve/collection-frontends/blob/main/img/4-寒假合作轮/image-5.png) 109 | 110 | 5. 写文章界面 111 | 112 | 拥有文章标题 113 | 114 | 支持Markdown编写,且支持实时预览 115 | 116 | 发布按钮 117 | 118 | 其他都不需要 119 | 120 | [![img](https://github.com/west2-online-reserve/collection-frontends/raw/main/img/4-%E5%AF%92%E5%81%87%E5%90%88%E4%BD%9C%E8%BD%AE/image-6.png)](https://github.com/west2-online-reserve/collection-frontends/blob/main/img/4-寒假合作轮/image-6.png) 121 | 122 | ### 多人作业要求 123 | 124 | 1. 跨域功能 125 | 2. 登录注册功能,对应密码应该进行密码哈希处理 126 | 3. 对登录和注册的值进行检验,在检验有误时返回错误 127 | 4. 登录后后端生成token并返回给前端,有些接口要对token的权限进行检验,不合法、没有权限或者过期返回错误 128 | 5. 使用ORM对数据进行操作 129 | 6. 有清晰的项目结构,通过蓝图(Flask)或者APIRouter(Fastapi)进行分组 130 | 7. 编写接口文档 131 | 132 | ### Bonus 133 | 134 | > 这些内容和组队的前端同学讨论后,自行选择性完成 135 | 136 | 1. 除了可以写⽂章,还有草稿箱:暂存写到⼀半的⽂章 137 | 2. ⽀持⽂章⽬录功能(点击后可以跳转到同⼀⻚⾯的位置) 138 | 3. 允许多层嵌套评论(现有的⽹站⼤多数使⽤⼆级评论,没有做到真正的多级) 139 | 4. ⽀持搜索功能(模糊搜索) 140 | 5. 点赞使⽤缓存处理,不要求很难的逻辑 141 | 142 | ## 单人作业 143 | 144 | ### 目的 145 | 146 | - 掌握HTTP协议和Web工作原理 147 | - 掌握现代 HTTP 框架开发流程 148 | - 掌握数据库的增删改查(CRUD)及基础的数据库表设计 149 | - 入门简单的缓存引入和使用 150 | - 入门简单的项目设计模式 151 | 152 | ### 背景 153 | 154 | 金三银四来了!FanOne 正在准备面试,由于过于卷,于是想放松一下看一下番剧,可惜她又没有`大会员`,FanOne现在很苦恼 155 | 156 | ### 任务清单 157 | 158 | > 请你写一个**视频网站**(写 API 文档接口即可),让LWGG能在没有大会员的条件下开心的追番吧! 159 | 160 | 请遵照以下接口文档完成功能 161 | 162 | https://apifox.com/apidoc/shared-dcb1a5ef-5c75-4a0e-9486-e3bd748379a0 163 | 164 | 你不必完成以上的全部功能,以下完成本次作业的最低要求(共计 17 个接口,已经非常少了) 165 | 166 | | 模块名 | 最低需要完成的接口 | 数量 | 167 | | ------ | -------------------------------------------- | ---- | 168 | | 用户 | 注册、登录、用户信息、上传头像 | 4 | 169 | | 视频 | 投稿、发布列表、搜索视频、热门排行榜 | 4 | 170 | | 互动 | 点赞操作、点赞列表、评论、评论列表、删除评论 | 5 | 171 | | 社交 | 关注操作、关注列表、粉丝列表、好友列表 | 4 | 172 | 173 | 别看很多,中间我们还砍掉了以下内容 174 | 175 | ### 你不需要完成的内容 176 | 177 | 除了上面没列出的接口外,你还不需要完成这些 178 | 179 | - 不需要考虑性能,只需要完成项目即可 180 | - 不需要考虑设计模式/项目结构,只需要完成项目即可 181 | - *不需要考虑其他七七八八的,只需要跑通接口即可* 182 | - 互动模块:评论接口只要求完成对视频的点赞,即 comment_id 字段的功能不需要实现,**我们只需要你完成对视频的评论即可,不需要实现对评论进行评论** 183 | - 互动模块:点赞操作只要求完成对视频的点赞,不需要处理对评论的点赞 184 | - 视频模块:投稿接口不要求实现分片上传和分布式存储,你只需要做到可以正常接收文件,并保存到本地某个目录下即可 185 | - 社交模块:不需要完成 WebSocket 部分 186 | 187 | ### 提醒你需要完成的内容 188 | 189 | - 分页管理:如果参数带有 page_num 和 page_size,需要正确识别并进行分页 190 | - 视频搜索:考察简单的 SQL,因此搜索条件需要全部满足 191 | - 删除评论:不可删除其他人的评论 192 | - 需要支持双 Token 193 | - 为你的项目提供一份**项目结构图(目录树)** 194 | - 完成**Docker部署**(编写Dockerfile并且利用这个文件成功部署你的项目,不要求传镜像到 hub 上) 195 | - **请求和返回结构必须遵循接口文档** 196 | 197 | ### Bonus 198 | 199 | - 实现全部接口的全部功能 200 | - 对点赞操作引入 Redis 缓存 201 | - 不使用文档中的**投稿**接口,改用自己设计接口,以实现视频的分片上传与存储 202 | - 实现WebSocket 聊天功能 203 | 204 | ### 提示 205 | 206 | - Apifox 里可以直接调试哦 207 | - 请关注你项目的逻辑,尤其是社交部分 208 | - 请注意你的数据库表设计,尤其是互动和社交部分 209 | - 热门排行榜考察的是你的 Redis 引入和使用,只需要中间使用到了 Redis 就行(例如,用户请求一次后你将排行榜存在 redis,后续请求直接从 redis 获取数据,不考虑过深的逻辑) 210 | - **下半年的全部作业,都会要求你在本次项目的基础上进行增添和修改**,请认真对待你的项目结构 211 | - 这次作业会考察关系型数据库表的设计以及你的设计模式、项目结构规范,**如果你认为你以上几个可能写的不理想,建议提前实现剩余接口和不要求完成的内容**,下一次答辩后会要求你修改你项目中不合理的结构和表设计 212 | 213 | 不要过度关注CURD的内容,请将目标放在下面这些 214 | 215 | - 项目架构是否合理 216 | - 数据库设计是否合理 217 | - 是否对新技术(如Redis)的使用相对合理 218 | - 每一个接口的逻辑是否正确(例如,在上传视频时是否考虑到了用户是否登录?) 219 | - 你的接口能否支撑住多人访问? 220 | - 当你使用缓存后,是否能避免出现缓存穿透,缓存雪崩等情况? 221 | 222 | ### 具体要求 223 | 224 | - 跨域功能 225 | - 登录注册功能,对应密码应该进行密码哈希处理 226 | - 对登录和注册的值进行检验,在检验有误时按照要求返回结果 227 | - 登录后后端生成token并返回给前端,除登录注册外的所有接口都要对token进行检验,不合法或者过期按照要求返回结果 228 | - 使用ORM对数据进行操作 229 | - 分页搜索 230 | - 有清晰的项目结构,分为user/video等模块,通过蓝图(Flask)或者APIRouter(Fastapi)进行分组 231 | - 符合RESTAPI(不符合你好像也对接不上) 232 | -------------------------------------------------------------------------------- /docs/backend/5-合作轮交易平台.md: -------------------------------------------------------------------------------- 1 | # 5-合作轮交易平台 2 | 3 | - 知识点 4 | - 推荐教程 5 | - 多人作业 6 | - 作业要求 7 | 8 | ## 知识点 9 | 10 | 1. WebSocket,SocketIO 11 | 2. 日志 12 | 3. 权限 13 | 4. 参数校验 14 | 5. 邮箱/图形验证 15 | 6. 缓存 16 | 7. 测试 17 | 8. 服务器部署 18 | 9. docker 19 | 20 | ## 推荐教程 21 | 22 | 1. [Flask-SocketIO](https://flask-socketio.readthedocs.io/)经常打不开,不过网上有很多它的翻译,可以查看 23 | 2. [fastapi-socketio](https://github.com/pyropy/fastapi-socketio)文档都没有,不过网上有一些实战经验,可以进行参考 24 | 3. [Socket.IO](https://socket.io/zh-CN/) 最完善的SocketIO文档,不过服务端是Nodejs,不是Python,可以参考借鉴,客户端api在写前端时可能会用到 25 | 4. 推荐使用logging日志工具打印运行时的日志 26 | 5. 在登陆后在token中添加用户的权限信息,对于需要token的接口在JWT解码时进行权限检验和进行拦截,Flask使用装饰器,FastApi可以选择依赖注入,或者使用中间件拦截 27 | 6. FastiApi可以使用自带的参数检验,Flask应该引入Flask-Restful,规范RestfulAPi,同时使用其带的参数检验功能[Flask-RESTful](http://www.pythondoc.com/Flask-RESTful/index.html) 28 | 7. 在框架中接入redis等进行缓存,读写很快,可以用于缓存验证码,以及一些经常读写的信息 29 | 8. 使用pytest编写单元测试,使用pytest-cov查看单测覆盖率(发送请求并传入参数,判断结果是否一致,好的产品单元测试覆盖率应该达到85%) 30 | 9. 作为一个程序员怎么能没有一个属于自己的服务器呢?如果有点钱的话,大家可以去腾讯云、阿里云等云服务商购买一个便宜的云服务器(新人首单有优惠,要买就买久一点,一年100左右吧),同时将自己的项目部署到服务器上。服务器上请使用`uWSGI`或`gunicorn`启动项目,以获取更大的性能。(还可以用做部署定时爬虫,在线图床,个人网站等,大家可以自己尝试) 31 | 10. 部署项目环境弄起来非常的难受,建议大家学习一下docker,使用docker将项目部署到服务器 32 | 11. 建议为代码编写注释以及使用typehint,增加代码的可读性,在每天写完代码后,或者解决什么问题后,可以写一下笔记,方便以后再进行回顾 33 | 12. 本次项目给的时间应该会很长,对于Flask和FastApi这两个框架其实还有很多可以拓展的地方,[awesome-flask](https://github.com/humiaozuzu/awesome-flask)和[awesome-fastapi](https://github.com/mjhea0/awesome-fastapi)列举了很多这些框架的相关精彩项目和插件,可以自主进行学习。同时大家也不要把自己局限于Python上,应该多了解一些别的语言的相关写法,比如Go,Java,或者前端。但是不允许**什么都不学**。本轮考核结束后,我会问一些你在这段时间内学到的东西和收获。 34 | 35 | ## 多人作业 36 | 37 | 二手游戏账号交易平台,参考交易游或闲鱼 38 | 39 | ## 平台支持功能 40 | 41 | ### 支持聊天功能 42 | 43 | ```txt 44 | 支持文字、图片交流 45 | 保存聊天记录 46 | 支持屏蔽功能 47 | 有聊天界面和消息提醒 48 | 49 | 可以接受系统发送消息 50 | ``` 51 | 52 | ### 支持黑名单功能 53 | 54 | ```txt 55 | 用户举报或平台检测 56 | ↓ 57 | 管理员审核,决定加入黑名单 58 | ↓ 59 | 回复用户审核情况 60 | 61 | 黑名单用户只能使用充值和提现功能和接受系统消息,其他功能不允许使用,且昵称头像进行特殊处理 62 | ``` 63 | 64 | ### 支持后台审核 65 | 66 | ```txt 67 | 管理员权限: 审核商品,审核用户举报 68 | 管理员有处理事故的功能 69 | ``` 70 | 71 | ### 支持个人中心 72 | 73 | ```txt 74 | 用户买卖家一体 75 | 个人中心可查看: 个人信息: 用户名,昵称,头像,修改密码,绑定邮箱,实名认证 76 | 买家中心:已购买订单,收藏订单,出价订单 77 | 卖家中心:出售商品,已完成订单,买家的出价 78 | 余额钱包: 充值,提现 79 | ``` 80 | 81 | ### 支持事故处理 82 | 83 | ```txt 84 | 目前主要有两大情况: 85 | 1.交易完成后,卖家找回账号 86 | 处理手段:紧急冻结卖家钱包,管理员审核账号情况。情况属实,若卖家钱包足够交易价格,则按交易价格返回给买家,解冻卖家钱包,将卖家加入黑名单; 87 | 若钱包不足交易价格,将钱包余额全数返回买家(平台可以自行补偿),并将卖家加入讨债列表和黑名单 88 | 89 | 2.买家收货后,取消交易,卖家检查账户发现问题拒绝取消交易 90 | 处理手段:管理员审核账号情况,账号确实受损,如卖家同意,按照账号受损情况将交易金按协议比例发给卖家,剩余交易金返回买家 91 | 如账号价值严重受损,没有什么交易价值,则将交易金全部发给卖家,通知买家,且买家加入黑名单 92 | 如卖家不同意,则进行协调程序 93 | 账号并没有价值受损,则告知卖家,结束交易过程,交易金返还买家 94 | 如卖家不同意,则进行协调程序 95 | ``` 96 | 97 | ## 作业要求 98 | 99 | 1. 上述基本功能 100 | 2. 项目结构合理 101 | 3. 日志功能 102 | 4. 单元测试(不包含websocket和SocketIO,覆盖率至少80%) 103 | 5. 部署(可选) 104 | -------------------------------------------------------------------------------- /docs/backend/6-暑假轮考核.md: -------------------------------------------------------------------------------- 1 | # 6-暑假轮考核 2 | 3 | - 知识点 4 | - 推荐教程 5 | - 考核要求 6 | - 任务列表 7 | - 评分标准 8 | - 开源活动 9 | 10 | ## 知识点 11 | 12 | ## 推荐教程 13 | 14 | ## 考核要求 15 | 16 | > 这一轮通常是与工作室的其他方向组队开发一款产品,但是也可以选择其他,例如 17 | > 18 | > - 精读源码并从底层实现一个简单框架 19 | > - 参加开源活动,例如开源之夏、GSoC(Google Summer of Code)等 20 | 21 | 请从以下4项任务中选择一项作为你的暑假轮考核项目 22 | 23 | ## 任务列表 24 | 25 | ### 1.参加字节青训营,并且完成项目(队友摆烂就坚持到最后) 26 | 27 | ### 2.深入Flask源码,手写一个Flask,满足以下功能,不要求模板 28 | 29 | - 路由和视图函数(蓝图):Flask使用路由来将URL映射到相应的视图函数,处理用户请求并返回相应的数据或页面。 30 | - 错误处理: Flask提供了异常处理机制,可以处理应用程序中的异常和错误,并返回相应的错误页面或SON响应。 31 | 中间件:Flask允许使用中间件来处理请求和响应,可以在请求到达视图函数之前或者在响应返回给客户端之前进行一些处理,如身份验证、日志记录等。 32 | 33 | ### 3.深入任意一种ORM源码,完成一个ORM,满足以下功能 34 | 35 | - 对象-关系映射:ORM需要能够将数据库中的表和记录映射到应用程序中的对象和属性。这包括定义对象模型指定对象和表之间的映射关系,并确保数据在对象和数据库之间的一致性。 36 | - CRUD操作支持: ORM应该提供对数据库的常见CRUD(创建、读取、更新、删除)操作的支持。这包括创建新记录、读取记录、更新记录和删除记录的能力,并尽可能的提供分页的功能。 37 | - 查询语言:QRM应该提供一种查询语言,以便开发人员可以通过编写高级查询来检索特定的记录。这个查询语言应该抽象化底层数据库的查询语言(例如SQL),以简化查询过程。 38 | - 数据关系处理:ORM应该处理数据之间的关系,如一对一、一对多和多对多关系。它应该提供一种简洁的方式来定义关系并确保在操作数据时维护关系的完整性。 39 | - 缓存机制:ORM可以具备缓存机制,以优化性能。它可以缓存常用的查询结果或对象,以避免频繁的数据库查询操作。 40 | 41 | ### 4.完成一个合作项目 42 | 43 | - 可自行选择与java、前端等进行组队,或者自成一队。最后一轮考核的题目不做具体功能要求。需和队友沟通设计出一个具有创意创新创业(具体自己把握)特点的产品,或者个人独立全栈。 44 | - 要求: 45 | - 功能需求完善,具备投入使用潜能的产品 46 | - 注意代码规范 47 | - 少些基础增删改查功能,多些产品特色 48 | 49 | - 如果你选择做这个,你最好看一下答辩评价标准,如有必要可以与组长进行联系,和组长交流你的DIY项目,以获得组长对你这个项目的判断。 50 | 51 | - 一个小建议:先拟定一个项目大纲,把这个大纲发给组长看(各个方向的),组长认为可以做那么再进行开发,如果认为不行,可以考虑修改大纲,这样能保证你们做起来不那么累。 52 | 53 | - 项目不是必须要求前端 + 后端,可以纯后端也可以纯前端。**前后端分离开发务必保证接口对齐** 54 | 55 | ## 评分标准 56 | 57 | 我们会设两轮答辩:中期答辩和终期答辩,如果你是提前完成任务的话,可以只申请进行一轮终期答辩,进入答辩前,你的项目评分应该至少高于60 58 | 59 | ### Git、Github、文档、项目结构、代码质量(30%) 60 | 61 | 这部分评价标准无法做到客观,**请保证你的项目看起来像是个商业/开源化、文档友好、代码合规、git使用规范的优质项目** 62 | 63 | 这部分得分低于60的直接设为不合格,除非你项目足够好,但是一个好项目这部分得分会低吗? 64 | 65 | ### 工时(70%) 66 | 67 | 我们会评估你的项目大致所需的时间,这个时间也就是所谓的工时。你的项目工作时长必须满足我们的心理预期。 68 | 69 | **对于第四轮多人作业,完成基本功能,我们认为工时为10小时。** 70 | 71 | **对于第五轮合作轮作业,如果你在基本功能保证的基础上完成了所有要求,那么我们认为工时为25小时。** 72 | 73 | 我们对我们的心理预期进行一定的保密,但我们**保证需要的工时应当是不少于30 - 40小时**。 74 | 75 | ## 开源活动 76 | 77 | 这里我们推荐以下站点,可以关注一下: 78 | 79 | 1. 开源软件供应链点亮计划 (开源之夏) - https://summer-ospp.ac.cn/ 80 | 2. Google Summber of Code (gsoc) - https://summerofcode.withgoogle.com/ 81 | 3. GLCC开源夏令营 - https://opensource.alibaba.com/ 82 | 4. 腾讯犀牛鸟开源人才培养计划 - https://opensource.tencent.com/summer-of-code 83 | 84 | 除此之外,可以关注一下一些大厂的开源网站 85 | 86 | 1. 阿里开源:https://opensource.alibaba.com/ 87 | 2. 腾讯开源:https://opensource.tencent.com/ 88 | 3. Meta Open Source:https://opensource.fb.com/ 89 | 4. Google Open Source:https://opensource.google/ 90 | 5. Uber Open Source:https://uber.github.io/#/ 91 | 6. 开源 - 美团技术团队:[https://tech.meituan.com/tags/%E5%BC%80%E6%BA%90.html](https://tech.meituan.com/tags/开源.html) --------------------------------------------------------------------------------