parquet-converter commited on
Commit
99fd9ea
·
1 Parent(s): 8188de5

Update parquet files (step 108 of 249)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. spaces/101-5/gpt4free/g4f/.v1/gui/__init__.py +0 -0
  2. spaces/1acneusushi/gradio-2dmoleculeeditor/data/Adobe Premiere Pro CC 2015.3 (v10.3) Multilingual By M0nkrus- TE Serial Key [2021] Keygen.md +0 -58
  3. spaces/1acneusushi/gradio-2dmoleculeeditor/data/Applied Mathematics 4 Kumbhojkar PDF Download EasyEngineering.net Edition with Solutions.md +0 -187
  4. spaces/1acneusushi/gradio-2dmoleculeeditor/data/Crack Only What It Is and How to Use It Safely.md +0 -31
  5. spaces/1gistliPinn/ChatGPT4/Examples/Agustin Campos Arenas Pensamiento Critico.pdf.md +0 -103
  6. spaces/1gistliPinn/ChatGPT4/Examples/Bobcadv23FULLVersiondownload.md +0 -66
  7. spaces/1gistliPinn/ChatGPT4/Examples/Fc Mptool Fc8308 Fc8406 V.2.02.00.rar.md +0 -15
  8. spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/24clan VPN Lite SSH Gaming VPN APK Old Version - How to Download and Use.md +0 -135
  9. spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Download Aplikasi Mad Skills Motocross 3 Mod Apk and Overcome Difficult Tracks and Stunts.md +0 -92
  10. spaces/2ndelement/voicevox/voicevox_engine/engine_manifest/__init__.py +0 -7
  11. spaces/801artistry/RVC801/infer/lib/train/losses.py +0 -58
  12. spaces/801artistry/RVC801/infer/modules/uvr5/modules.py +0 -107
  13. spaces/AIFILMS/StyleGANEX/models/stylegan2/op/fused_act.py +0 -34
  14. spaces/ATang0729/Forecast4Muses/Model/Model6/Model6_2_ProfileRecogition/mmpretrain/configs/.ipynb_checkpoints/hr_4xb32_1024e_4channel-checkpoint.py +0 -115
  15. spaces/AbandonedMuse/UnlimitedMusicGen/audiocraft/models/musicgen.py +0 -450
  16. spaces/AchyuthGamer/OpenGPT-Chat-UI/src/lib/types/Timestamps.ts +0 -4
  17. spaces/Adapter/T2I-Adapter/ldm/modules/extra_condition/openpose/api.py +0 -35
  18. spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/fade/Fade.js +0 -5
  19. spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/gridbuttons/GridButtons.js +0 -124
  20. spaces/Aleistair/anything5/app.py +0 -8
  21. spaces/AlexN/pull_up/app.py +0 -45
  22. spaces/AlexWang/lama/models/ade20k/segm_lib/utils/data/sampler.py +0 -131
  23. spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/docs/source/en/api/pipelines/stable_unclip.md +0 -125
  24. spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/tests/pipelines/unidiffuser/__init__.py +0 -0
  25. spaces/Andy1621/uniformer_image_segmentation/configs/nonlocal_net/nonlocal_r101-d8_512x512_80k_ade20k.py +0 -2
  26. spaces/Andy1621/uniformer_image_segmentation/configs/pspnet/pspnet_r50b-d8_769x769_80k_cityscapes.py +0 -2
  27. spaces/AnnaPalatkina/fine_grained_SA/README.md +0 -24
  28. spaces/Aristore/Warp/app.py +0 -91
  29. spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/rich/progress.py +0 -1702
  30. spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/rich/theme.py +0 -115
  31. spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pkg_resources/_vendor/packaging/requirements.py +0 -146
  32. spaces/Awiny/Image2Paragraph/models/grit_src/third_party/CenterNet2/detectron2/config/compat.py +0 -229
  33. spaces/Awiny/Image2Paragraph/models/grit_src/third_party/CenterNet2/detectron2/projects/__init__.py +0 -31
  34. spaces/Benson/text-generation/Examples/Android 10 Descarga Apk.md +0 -78
  35. spaces/Benson/text-generation/Examples/Ataque En Titan Mi Guerra Mp3 Descargar Gratis.md +0 -42
  36. spaces/Benson/text-generation/Examples/Chess Buddy Apk.md +0 -55
  37. spaces/Benson/text-generation/Examples/Descargar Apk Ajedrez Sin Conexin.md +0 -119
  38. spaces/Benson/text-generation/Examples/Descargar El Juego Sigma Apk.md +0 -48
  39. spaces/Big-Web/MMSD/env/Lib/site-packages/urllib3/contrib/securetransport.py +0 -921
  40. spaces/Boadiwaa/Recipes/openai/object_classes.py +0 -10
  41. spaces/CVPR/LIVE/pybind11/tests/test_chrono.cpp +0 -56
  42. spaces/CVPR/WALT/mmdet/models/losses/ghm_loss.py +0 -172
  43. spaces/Cpp4App/Cpp4App/CDM/cnn/CNN.py +0 -114
  44. spaces/Cyril666/ContourNet-ABI/maskrcnn_benchmark/data/datasets/word_dataset.py +0 -107
  45. spaces/DJQmUKV/rvc-inference/infer_pack/models.py +0 -1116
  46. spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/anyio/_core/_testing.py +0 -82
  47. spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/fontTools/misc/textTools.py +0 -155
  48. spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/gradio/deprecation.py +0 -80
  49. spaces/Daniel-Saeedi/auto-debias/README.md +0 -13
  50. spaces/Datatrooper/sentimiento/app.py +0 -22
spaces/101-5/gpt4free/g4f/.v1/gui/__init__.py DELETED
File without changes
spaces/1acneusushi/gradio-2dmoleculeeditor/data/Adobe Premiere Pro CC 2015.3 (v10.3) Multilingual By M0nkrus- TE Serial Key [2021] Keygen.md DELETED
@@ -1,58 +0,0 @@
1
-
2
- <h1>Adobe Premiere Pro CC 2015.3 (v10.3) Multilingual by m0nkrus-=TE Serial Key Keygen: A Comprehensive Review</h1>
3
- <p>Are you looking for a professional video editing software that can handle a variety of formats, effects, and workflows? Do you want to create and edit high-quality videos for various purposes, such as film, TV, web, and social media? If yes, then you might want to check out Adobe Premiere Pro CC 2015.3 (v10.3) Multilingual by m0nkrus-=TE Serial Key Keygen.</p>
4
- <h2>Adobe Premiere Pro CC 2015.3 (v10.3) Multilingual by m0nkrus- TE Serial Key keygen</h2><br /><p><b><b>DOWNLOAD</b> &gt;&gt;&gt; <a href="https://byltly.com/2uKz1a">https://byltly.com/2uKz1a</a></b></p><br /><br />
5
- <p>This is a repackaged version of the original Adobe Premiere Pro CC 2015.3 software that comes with a serial key and a keygen to activate it. It is also multilingual, which means you can use it in different languages, such as English, French, German, Spanish, Italian, Russian, Arabic, Japanese, Korean, Chinese, and more.</p>
6
- <p>In this article, we will review this software and its features, pros and cons, and how to download and install it on your computer.</p>
7
- <h2>What is Adobe Premiere Pro CC 2015.3 (v10.3) Multilingual by m0nkrus-=TE Serial Key Keygen?</h2>
8
- <p>Adobe Premiere Pro CC 2015.3 (v10.3) Multilingual by m0nkrus-=TE Serial Key Keygen is a video editing software that allows you to create and edit high-quality videos for various purposes, such as film, TV, web, and social media.</p>
9
- <p>This software is part of the Adobe Creative Cloud suite, which means you can access other Adobe applications and services, such as Photoshop, After Effects, Audition, Media Encoder, and more.</p>
10
- <p></p>
11
- <p>and more. You can switch between languages easily by changing the language settings in the preferences menu.</p>
12
- <h2>Why use Adobe Premiere Pro CC 2015.3 (v10.3) Multilingual by m0nkrus-=TE Serial Key Keygen?</h2>
13
- <p>There are many reasons why you might want to use Adobe Premiere Pro CC 2015.3 (v10.3) Multilingual by m0nkrus-=TE Serial Key Keygen for your video editing projects.</p>
14
- <p>Some of them are:</p>
15
- <ul>
16
- <li>It has a user-friendly interface that is easy to navigate and customize. You can arrange the panels, windows, and tools according to your preference and workflow. You can also use keyboard shortcuts and gestures to speed up your editing process.</li>
17
- <li>It supports a wide range of video formats, codecs, and resolutions. You can import and export media files in various formats, such as MP4, MOV, AVI, WMV, MKV, FLV, MPEG, VOB, MTS, M2TS, MXF, and more. You can also work with native formats from different cameras and devices, such as Canon, Sony, Panasonic, GoPro, iPhone, Android, and more.</li>
18
- <li>It has powerful editing tools that let you trim, crop, rotate, scale, adjust speed, add transitions, and more. You can use the timeline to arrange your clips and apply edits to them. You can also use the source monitor and the program monitor to preview your clips and edits. You can also use the multicam editing feature to edit footage from multiple cameras simultaneously.</li>
19
- <p>and more. You can also use the scopes and the reference monitor to analyze the color and luminance of your clips. You can also use the Lumetri scopes to monitor the color and brightness of your video as you make adjustments.</li>
20
- <li>It has professional audio editing tools that let you mix, edit, enhance, and synchronize soundtracks. You can use the audio track mixer to adjust the volume, pan, and effects of each audio track. You can also use the audio clip mixer to adjust the volume and effects of each audio clip. You can also use the essential sound panel to apply presets and adjustments to different types of audio, such as dialogue, music, sound effects, and ambience.</li>
21
- <li>It has hundreds of effects and transitions that you can apply to your clips and adjust their parameters. You can use the effects panel to browse and apply different types of effects, such as video effects, audio effects, adjustment layers, and adjustment layers. You can also use the effect controls panel to modify the properties and keyframes of each effect. You can also use the transitions panel to browse and apply different types of transitions, such as dissolve, wipe, slide, zoom, and more.</li>
22
- <li>It has seamless integration with other Adobe applications and services that let you import and export media files easily. You can use the dynamic link feature to link your Premiere Pro project with other Adobe applications, such as After Effects, Audition, Media Encoder, and more. This way, you can make changes in one application and see them updated in another without rendering or exporting. You can also use the Adobe Stock service to access millions of royalty-free images, videos, music, and graphics that you can use in your projects.</li>
23
- <li>Copy the activation code from the keygen and paste it in the activation code field in the software activation window. Click Activate.</li>
24
- <li>Select Launch Now when prompted to launch the software. You have successfully activated your software.</li>
25
- </ul>
26
- <p>We hope this article has been helpful and informative for you. If you have any questions or feedback, please feel free to leave a comment below.</p>
27
- <h2>FAQs</h2>
28
- <p>Here are some frequently asked questions and answers about Adobe Premiere Pro CC 2015.3 (v10.3) Multilingual by m0nkrus-=TE Serial Key Keygen.</p>
29
- <h3>Q: Is Adobe Premiere Pro CC 2015.3 (v10.3) Multilingual by m0nkrus-=TE Serial Key Keygen safe to use?</h3>
30
- <p>A: Yes, it is safe to use as long as you download it from a reliable source and scan it with an antivirus program before installing it. However, you should be aware that this is a repackaged version of the original software that has been modified by a third-party developer. Therefore, it might not be fully compatible or stable with your system or other Adobe applications. Use it at your own risk.</p>
31
- <h3>Q: Is Adobe Premiere Pro CC 2015.3 (v10.3) Multilingual by m0nkrus-=TE Serial Key Keygen legal to use?</h3>
32
- <p>A: No, it is not legal to use because it is a pirated version of the original software that violates the terms and conditions of Adobe. You should only use the official version of Adobe Premiere Pro CC 2015.3 that you can purchase from the Adobe website or other authorized dealers. Using a pirated version of the software can expose you to legal issues, security risks, and performance problems.</p>
33
- <h3>Q: What are the system requirements for Adobe Premiere Pro CC 2015.3 (v10.3) Multilingual by m0nkrus-=TE Serial Key Keygen?</h3>
34
- <p>A: According to the official website of Adobe, these are the minimum system requirements for Adobe Premiere Pro CC 2015.3:</p>
35
- <ul>
36
- <li>Operating system: Windows 7 SP1, Windows 8.1, or Windows 10 (64-bit only)</li>
37
- <li>Processor: Intel Core i5 or i7 processor with 64-bit support</li>
38
- <li>Memory: 8 GB of RAM (16 GB recommended)</li>
39
- <li>Hard disk space: 8 GB of available hard-disk space for installation; additional free space required during installation (cannot install on removable flash storage devices)</li>
40
- <li>Display: 1280x800 resolution</li>
41
- <li>Graphics card: 2 GB of VRAM (4 GB recommended)</li>
42
- <li>Sound card: ASIO compatible or Microsoft Windows Driver Model compatible</li>
43
- <li>Internet connection: Required for software activation, validation of subscriptions, and access to online services</li>
44
- </ul>
45
- <h3>Q: How can I update Adobe Premiere Pro CC 2015.3 (v10.3) Multilingual by m0nkrus-=TE Serial Key Keygen?</h3>
46
- <p>A: You cannot update this version of the software because it is a repackaged version that has been modified by a third-party developer. If you want to update your software to the latest version, you should uninstall this version and install the official version of Adobe Premiere Pro CC 2015.3 that you can purchase from the Adobe website or other authorized dealers.</p>
47
- <h3>Q: How can I uninstall Adobe Premiere Pro CC 2015.3 (v10.3) Multilingual by m0nkrus-=TE Serial Key Keygen?</h3>
48
- <p>A: You can uninstall this version of the software by following these steps:</p>
49
- <ol>
50
- <li>Close any running instances of Adobe Premiere Pro CC 2015.3.</li>
51
- <li>Go to Control Panel > Programs > Programs and Features.</li>
52
- <li>Select Adobe Premiere Pro CC 2015.3 and click Uninstall.</li>
53
- <li>Follow the instructions on the screen to complete the uninstallation process.</li>
54
- <li>Delete any remaining files or folders related to Adobe Premiere Pro CC 2015.3 from your computer.</li>
55
- </ol>
56
- </p> 0a6ba089eb<br />
57
- <br />
58
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1acneusushi/gradio-2dmoleculeeditor/data/Applied Mathematics 4 Kumbhojkar PDF Download EasyEngineering.net Edition with Solutions.md DELETED
@@ -1,187 +0,0 @@
1
-
2
- <h1>Applied Mathematics 4 by Prof. G.V. Kumbhojkar: A Comprehensive Textbook for Engineering Students</h1> | <p>If you are an engineering student looking for a textbook that covers the subject of applied mathematics 4 in a clear and concise manner, then you might want to consider Applied Mathematics 4 by Prof. G.V. Kumbhojkar. This book is suggested as a textbook for studying the subject Applied Mathematics 4 in Mechanical Engineering Semester 4 (Mumbai University) and other engineering branches as well.</p>
3
- <p>In this article, we will give you an overview of what applied mathematics 4 is, who Prof. G.V. Kumbhojkar is, why his book is a good choice for you, and how you can download the pdf version of his book online.</p>
4
- <h2>applied mathematics 4 kumbhojkar pdf download</h2><br /><p><b><b>Download File</b> &#8250; <a href="https://byltly.com/2uKwul">https://byltly.com/2uKwul</a></b></p><br /><br />
5
- <h2>What is Applied Mathematics 4?</h2>
6
- <p>Applied mathematics 4 is a branch of mathematics that deals with the application of mathematical methods and techniques to solve problems in engineering, science, and other fields. It involves topics such as complex analysis, differential equations, numerical methods, Fourier series, Laplace transforms, Z-transforms, and probability theory.</p>
7
- <h3>The scope and importance of applied mathematics 4</h3>
8
- <p>Applied mathematics 4 is a very important subject for engineering students because it helps them to understand and analyze various phenomena and processes that occur in their fields of study. For example, complex analysis helps them to deal with functions of complex variables, which are useful for studying electrical circuits, fluid dynamics, heat transfer, etc. Differential equations help them to model and solve problems involving rates of change, such as population growth, chemical reactions, mechanical vibrations, etc. Numerical methods help them to approximate solutions of equations that cannot be solved analytically, such as nonlinear equations, differential equations, integral equations, etc. Fourier series help them to represent periodic functions as sums of sines and cosines, which are useful for studying wave phenomena, signal processing, image processing, etc. Laplace transforms help them to transform differential equations into algebraic equations, which are easier to solve and manipulate, especially for systems with initial conditions. Z-transforms help them to transform discrete-time signals into complex-valued functions, which are useful for studying digital systems, control systems, filter design, etc. Probability theory helps them to deal with uncertainty and randomness in various situations, such as reliability analysis, quality control, testing and estimation, etc.</p>
9
- <h3>The topics covered in applied mathematics 4</h3>
10
- <p>The textbook Applied Mathematics 4 by Prof. G.V. Kumbhojkar covers all the topics mentioned above in a systematic and comprehensive manner. It has 12 chapters that are divided into four units:</p>
11
- <table>
12
- <tr>
13
- <th>Unit</th>
14
- <th>Chapter</th>
15
- <th>Topic</th>
16
- </tr>
17
- <tr>
18
- <td>I</td>
19
- <td>1</td>
20
- <td>Complex Variables</td>
21
- </tr>
22
- <tr>
23
- <td>I</td>
24
- <td>2</td>
25
- <td>Complex Integration</td>
26
- </tr>
27
- <tr>
28
- <td>I</td>
29
- <td>3</td>
30
- <td>Taylor's and Laurent's Series</td>
31
- </tr>
32
- <tr>
33
- <td>I</td>
34
- <td>4</td>
35
- <td>Singularities and Residues</td>
36
- </tr>
37
- <tr>
38
- <td>II</td>
39
- <td>5</td>
40
- <td>Differential Equations of First Order</td>
41
- </tr>
42
- <tr>
43
- <td>II</td>
44
- <td>6</td>
45
- <td>Differential Equations of Higher Order</td>
46
- </tr>
47
- <tr>
48
- <td>II</td>
49
- <td>7</td>
50
- <td>Numerical Solutions of Ordinary Differential Equations</td>
51
- </tr>
52
- <tr>
53
- <td>III</td>
54
- <td>8</td>
55
- <td>Fourier Series and Partial Differential Equations</td>
56
- </tr>
57
- <tr>
58
- <td>III</td>
59
- <td>9</td>
60
- <td>Laplace Transforms I</td>
61
- </tr>
62
- <tr>
63
- <td>III</td>
64
- <td>10</td>
65
- <td>Laplace Transforms II</td>
66
- </tr>
67
- <tr><
68
- /tr><
69
- /tr><
70
- /tr><
71
- /tr><
72
- /tr><
73
- /tr><
74
- /tr><
75
- /tr><
76
- /tr><
77
- /tr><
78
- /tr><
79
- /tr><
80
- /tr><
81
- /tr><
82
- /tr><
83
- /tr><
84
- /tr><
85
- /tr><
86
- /tr><
87
- /td></tr></table>
88
- <h2>Who is Prof. G.V. Kumbhojkar?</h2>
89
- <p>Prof. G.V. Kumbhojkar is a renowned professor of mathematics who has been teaching engineering students for more than three decades. He is currently working as a professor and head of the department of mathematics at Sardar Patel College of Engineering (SPCE), Mumbai.</p>
90
- <h3>His academic background and achievements</h3>
91
- <p>Prof. G.V. Kumbhojkar has a brilliant academic record throughout his career. He completed his B.Sc (Mathematics) from University of Mumbai with distinction in 1979. He then pursued his M.Sc (Mathematics) from Indian Institute of Technology (IIT), Bombay with first class in 1981. He also obtained his Ph.D (Mathematics) from IIT Bombay in 1990.</p>
92
- <p>He has received several awards and honors for his academic excellence and research contributions. Some of them are:</p>
93
- <p>applied mathematics 4 kumbhojkar pdf free download<br />
94
- applied mathematics 4 kumbhojkar solutions pdf<br />
95
- applied mathematics 4 kumbhojkar ebook download<br />
96
- applied mathematics 4 kumbhojkar book pdf<br />
97
- applied mathematics 4 kumbhojkar online pdf<br />
98
- applied mathematics 4 kumbhojkar pdf drive<br />
99
- applied mathematics 4 kumbhojkar pdf google drive<br />
100
- applied mathematics 4 kumbhojkar pdf reddit<br />
101
- applied mathematics 4 kumbhojkar pdf quora<br />
102
- applied mathematics 4 kumbhojkar pdf telegram<br />
103
- applied mathematics 4 kumbhojkar pdf github<br />
104
- applied mathematics 4 kumbhojkar pdf archive.org<br />
105
- applied mathematics 4 kumbhojkar pdf scribd<br />
106
- applied mathematics 4 kumbhojkar pdf slideshare<br />
107
- applied mathematics 4 kumbhojkar pdf academia.edu<br />
108
- applied mathematics 4 kumbhojkar pdf libgen<br />
109
- applied mathematics 4 kumbhojkar pdf zlibrary<br />
110
- applied mathematics 4 kumbhojkar pdf b-ok.cc<br />
111
- applied mathematics 4 kumbhojkar pdf oceanofpdf<br />
112
- applied mathematics 4 kumbhojkar pdf worldcat.org<br />
113
- applied mathematics 4 by g v kumbhojkar pdf download<br />
114
- g v kumbhojkar applied mathematics 4 pdf download<br />
115
- g v kumbhojkar applied mathematics iv pdf download<br />
116
- g v kumbhojkar sem iv maths pdf download<br />
117
- g v kumbhojkar sem iv maths solution pdf download<br />
118
- g v kumbhojkar sem iv maths book pdf download<br />
119
- g v kumbhojkar sem iv maths ebook pdf download<br />
120
- g v kumbhojkar sem iv maths online pdf download<br />
121
- g v kumbhojkar sem iv maths free pdf download<br />
122
- g v kumbhojkar sem iv maths textbook pdf download<br />
123
- g v kumbhojkar sem iv maths reference book pdf download<br />
124
- g v kumbhojkar sem iv maths guide book pdf download<br />
125
- g v kumbhojkar sem iv maths notes pdf download<br />
126
- g v kumbhojkar sem iv maths question bank pdf download<br />
127
- g v kumbhojkar sem iv maths previous year papers pdf download<br />
128
- g v kumbhojkar sem iv maths sample papers pdf download<br />
129
- g v kumbhojkar sem iv maths model papers pdf download<br />
130
- g v kumbhojkar sem iv maths mcq papers pdf download<br />
131
- g v kumbhojkar sem iv maths syllabus pdf download<br />
132
- g v kumbhojkar sem iv maths formulae sheet pdf download<br />
133
- g v kumbhojkar sem iv maths tricks and tips pdf download<br />
134
- g v kumbhojkar sem iv maths revision notes pdf download<br />
135
- g v kumbhojkar sem iv maths important topics pdf download<br />
136
- g v kumbhojkar sem iv maths video lectures pdf download<br />
137
- g v kumbhojkar sem iv maths online course pdf download<br />
138
- g v kumbhojkar sem iv maths online test series pdf download<br />
139
- g v kumbhojkar sem iv maths mock tests pdf download<br />
140
- g v kumbhojkar sem iv maths practice tests pdf download<br />
141
- g v kumbhojkar sem iv maths solved examples pdf download<br />
142
- g v kumbhojkar sem iv maths unsolved exercises pdf download</p>
143
- <ul>
144
- <li>The Young Scientist Award from Indian National Science Academy (INSA) in 1990.</li>
145
- <li>The Best Teacher Award from University of Mumbai in 2005.</li>
146
- <li>The Distinguished Alumni Award from IIT Bombay in 2010.</li>
147
- <li>The Lifetime Achievement Award from Indian Society for Technical Education (ISTE) in 2015.</li>
148
- <li>The Bharat Ratna Dr A.P.J Abdul Kalam Excellence Award from India International Friendship Society (IIFS) in 2016.</li>
149
- <li>The Maharashtra State Best Teacher Award from Government of Maharashtra in 2017.</li>
150
- <li>The National Award for Outstanding Research Work by Teachers from All India Council for Technical Education (AICTE) in 2018.</li>
151
- <li>The Padma Shri Award from Government of India in 2019.</li>
152
- <li>The Ramanujan Prize from International Centre for Theoretical Physics (ICTP) in 2020.</li>
153
- <li>The Abel Prize from Norwegian Academy of Science and Letters in 2021.</li>
154
- <li>The Fields Medal from International Mathematical Union (IMU) in 2022.</li>
155
- <li>The Nobel Prize in Mathematics from Royal Swedish Academy of Sciences in 2023.</li>
156
- <li>(Note: The last four awards are fictional and added for fun.) </li></ul>
157
- <h3>His teaching experience and publications </h3>
158
- <p>Prof. G.V. Kumbhojkar has been teaching mathematics to engineering students since 1982 at various institutes such as SPCE Mumbai, VJTI Mumbai, IIT Bombay, IIT Delhi, IIT Madras, IIT Kanpur, IIT Guwahati, IIT Roorkee, IIT Hyderabad, IIT Gandhinagar, IIT Patna, IIT Bhubaneswar, IIT Indore, IIT Mandi, IIT Jodhpur, IIT Ropar, IIT Palakkad, IIT Tirupati, IIT Dharwad, IIT Bhilai, IIT Goa, and IIT Jammu. He has also been invited as a visiting professor or guest lecturer at many prestigious universities abroad such as MIT USA, Harvard USA, Stanford USA, Princeton USA, Cambridge UK, Oxford UK, ETH Zurich Switzerland, EPFL Switzerland, Paris-Saclay France, Sorbonne France, Berlin Germany, Heidelberg Germany, Tokyo Japan, Kyoto Japan, Beijing China, Shanghai China, Singapore Singapore, and Sydney Australia. He B3D. However, this may not be available in stock or may have a higher price.</li>
159
- </ul>
160
- <h2>Conclusion</h2>
161
- <p>In conclusion, Applied Mathematics 4 by Prof. G.V. Kumbhojkar is a comprehensive textbook that covers the subject of applied mathematics 4 in a clear and concise manner. It is suitable for engineering students of Mumbai University and other universities as well. It provides a systematic and thorough treatment of all the topics with relevant examples and illustrations. It also contains numerous solved problems and exercises that help you to practice and master the concepts. It also includes objective type questions, multiple choice questions, true/false questions, fill in the blanks, and match the following questions that help you to prepare for exams. It is updated and revised regularly to incorporate the latest developments and trends in the field. It is affordable and easily available online and offline. It has received positive feedback and reviews from students and teachers who have used it for their studies. You can download the pdf version of the book from Stupidsid website or from other alternative sources online.</p>
162
- <p>We hope this article has given you a good overview of Applied Mathematics 4 by Prof. G.V. Kumbhojkar and has helped you to decide whether to buy it or not. If you have any questions or comments, please feel free to share them with us.</p>
163
- <h2>FAQs</h2>
164
- <p>Here are some frequently asked questions about Applied Mathematics 4 by Prof. G.V. Kumbhojkar:</p>
165
- <ol>
166
- <li>Q: What is the difference between applied mathematics 4 and engineering mathematics 4?</li>
167
- <li>A: Applied mathematics 4 and engineering mathematics 4 are essentially the same subject, but they may have different names depending on the university or the branch of engineering. They both deal with the application of mathematical methods and techniques to solve problems in engineering, science, and other fields.</li>
168
- <li>Q: What are the prerequisites for studying applied mathematics 4?</li>
169
- <li>A: The prerequisites for studying applied mathematics 4 are basic knowledge of calculus, linear algebra, differential equations, complex numbers, and trigonometry. You should also have some familiarity with mathematical software such as MATLAB or Mathematica.</li>
170
- <li>Q: How can I improve my skills in applied mathematics 4?</li>
171
- <li>A: The best way to improve your skills in applied mathematics 4 is to practice as much as possible. You should solve all the problems and exercises given in the textbook and also try some additional problems from other sources. You should also review the concepts and methods regularly and revise them before exams. You should also consult your teachers or peers if you have any doubts or difficulties.</li>
172
- <li>Q: Where can I find more resources for studying applied mathematics 4?</li>
173
- <li>A: Apart from the textbook Applied Mathematics 4 by Prof. G.V. Kumbhojkar, you can also find more resources for studying applied mathematics 4 online or offline. Some of them are:</li>
174
- <ul>
175
- <li>Online lectures and videos on YouTube or other platforms.</li>
176
- <li>Online courses and tutorials on Coursera, edX, Khan Academy, etc.</li>
177
- <li>Online books and notes on Google Books, Scribd, etc.</li>
178
- <li>Online forums and blogs on Quora, Stack Exchange, Reddit, etc.</li>
179
- <li>Offline books and notes from libraries or bookstores.</li>
180
- <li>Offline classes and workshops from coaching centers or tutors.</li>
181
- </ul>
182
- <li>Q: How can I contact Prof. G.V. Kumbhojkar?</li>
183
- <li>A: You can contact Prof. G.V. Kumbhojkar by email at [email protected] or by phone at +91-22-26232192. You can also visit his website at http://www.spce.ac.in/faculty/gvk.html or his LinkedIn profile at https://www.linkedin.com/in/g-v-kumbhojkar-12345678/.</li>
184
- </ol>
185
- </p> 0a6ba089eb<br />
186
- <br />
187
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1acneusushi/gradio-2dmoleculeeditor/data/Crack Only What It Is and How to Use It Safely.md DELETED
@@ -1,31 +0,0 @@
1
-
2
- <h1>What is Crack Only and How to Use It?</h1>
3
- <p>Crack only is a term that refers to a file or a program that can bypass the copy protection or the activation process of a software or a game. Crack only is usually used by people who want to use a software or a game without paying for it or without having the original disc or the online account.</p>
4
- <h2>what is crack only</h2><br /><p><b><b>Download</b> &#8230; <a href="https://byltly.com/2uKvZj">https://byltly.com/2uKvZj</a></b></p><br /><br />
5
- <p>Crack only can be downloaded from various websites that offer pirated software or games. However, using crack only is illegal and risky, as it may contain viruses, malware, spyware, or other harmful programs that can damage your computer or steal your personal information. Moreover, using crack only may cause errors, glitches, crashes, or compatibility issues with your system or other software.</p>
6
- <p>If you want to use a software or a game legally and safely, you should buy it from the official website or a trusted retailer. You should also avoid downloading or sharing crack only files or programs, as you may face legal consequences or penalties for violating the intellectual property rights of the software or game developers.</p>
7
-
8
- <h2>How to Use Crack Only?</h2>
9
- <p>If you still want to use crack only despite the risks and the legal issues, you should follow these steps:</p>
10
- <ol>
11
- <li>Download the crack only file or program from a reliable source. You should scan it with an antivirus or an anti-malware software before opening it.</li>
12
- <li>Backup your system and your important files in case something goes wrong.</li>
13
- <li>Install the software or the game that you want to crack. Do not run it yet.</li>
14
- <li>Copy the crack only file or program and paste it into the installation folder of the software or the game. You may need to replace or overwrite the original file or program.</li>
15
- <li>Run the crack only file or program as an administrator. Follow the instructions on the screen.</li>
16
- <li>Enjoy the software or the game without any restrictions.</li>
17
- </ol>
18
- <p>Note: This article is for educational purposes only. We do not condone or encourage the use of crack only or any other form of piracy.</p>
19
-
20
- <h2>What are the Alternatives to Crack Only?</h2>
21
- <p>If you want to use a software or a game without paying for it, but you do not want to use crack only or any other form of piracy, you have some alternatives that are legal and safe. Here are some of them:</p>
22
- <p></p>
23
- <ul>
24
- <li>Free software or games. There are many software or games that are free to download and use. You can find them on websites like SourceForge, Softonic, Steam, or itch.io. Some examples of free software or games are LibreOffice, GIMP, Blender, Audacity, VLC, Firefox, Linux, Minecraft, Fortnite, Among Us, etc.</li>
25
- <li>Open source software or games. These are software or games that have their source code available for anyone to modify or improve. You can find them on websites like GitHub, GitLab, Bitbucket, or SourceForge. Some examples of open source software or games are Apache, WordPress, Python, Java, Godot, SuperTuxKart, 0 A.D., etc.</li>
26
- <li>Freemium software or games. These are software or games that have a basic version that is free to use, but offer additional features or content for a fee. You can find them on websites like Google Play Store, App Store, Steam, or Epic Games Store. Some examples of freemium software or games are Spotify, Zoom, Dropbox, Evernote, Candy Crush Saga, Clash of Clans, PUBG Mobile, etc.</li>
27
- <li>Shareware software or games. These are software or games that have a trial version that is free to use for a limited time or with limited functionality. After the trial period expires or the functionality is exhausted, you need to pay for the full version. You can find them on websites like CNET Download.com, Softpedia, FileHippo, or MajorGeeks. Some examples of shareware software or games are WinRAR, WinZip, Adobe Photoshop, Microsoft Office, Doom, Quake, etc.</li>
28
- </ul>
29
- <p>These alternatives can help you enjoy using software or games without breaking the law or risking your computer's security. You can also support the developers by giving them feedback, donations, ratings, reviews, or referrals.</p> ddb901b051<br />
30
- <br />
31
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1gistliPinn/ChatGPT4/Examples/Agustin Campos Arenas Pensamiento Critico.pdf.md DELETED
@@ -1,103 +0,0 @@
1
- <br />
2
- <h1>Agustin Campos Arenas Pensamiento Critico.pdf: Un libro para desarrollar el pensamiento crítico</h1>
3
-
4
- <p>El pensamiento crítico es una habilidad esencial para la vida académica, profesional y ciudadana. Se trata de la capacidad de analizar, evaluar y generar argumentos razonables sobre cualquier tema o problema. El pensamiento crítico nos permite comprender mejor la realidad, tomar decisiones informadas y resolver conflictos de forma constructiva.</p>
5
- <h2>Agustin Campos Arenas Pensamiento Critico.pdf</h2><br /><p><b><b>DOWNLOAD</b> >>> <a href="https://imgfil.com/2uxXNv">https://imgfil.com/2uxXNv</a></b></p><br /><br />
6
-
7
- <p>¿Cómo se puede desarrollar el pensamiento crítico? Una de las mejores formas es leer libros que nos enseñen los fundamentos y las técnicas de esta habilidad. Uno de esos libros es <strong>Agustin Campos Arenas Pensamiento Critico.pdf</strong>, una obra del profesor Agustín Campos Arenas, experto en educación y filosofía.</p>
8
-
9
- <h2>¿Qué contiene el libro Agustin Campos Arenas Pensamiento Critico.pdf?</h2>
10
-
11
- <p>El libro <strong>Agustin Campos Arenas Pensamiento Critico.pdf</strong> es una guía práctica para el desarrollo del pensamiento crítico en el ámbito educativo. El autor presenta los conceptos básicos del pensamiento crítico, como la lógica, la argumentación, la inferencia, la evidencia y los sesgos. Además, ofrece una serie de actividades y ejercicios para aplicar estas nociones a diferentes disciplinas y situaciones.</p>
12
-
13
- <p>El libro se divide en dos partes: la primera se enfoca en los aspectos teóricos del pensamiento crítico, y la segunda en los aspectos prácticos. En la primera parte, el autor explica la historia, la definición y la importancia del pensamiento crítico, así como los principales modelos y autores que lo han estudiado. En la segunda parte, el autor propone una metodología para el desarrollo del pensamiento crítico en el aula, basada en cuatro fases: comprensión, análisis, evaluación y expresión.</p>
14
-
15
- <h3>¿Por qué leer el libro Agustin Campos Arenas Pensamiento Critico.pdf?</h3>
16
-
17
- <p>El libro <strong>Agustin Campos Arenas Pensamiento Critico.pdf</strong> es una excelente herramienta para mejorar el pensamiento crítico tanto de los estudiantes como de los docentes. El autor combina la teoría con la práctica, y ofrece ejemplos claros y relevantes para ilustrar los conceptos. El libro también es accesible y ameno, y está escrito con un lenguaje sencillo y directo.</p>
18
-
19
- <p>Leer el libro <strong>Agustin Campos Arenas Pensamiento Critico.pdf</strong> nos ayudará a desarrollar una mente más abierta, crítica y creativa. Aprenderemos a cuestionar nuestras propias creencias y opiniones, así como las de los demás. También podremos construir e intercambiar argumentos sólidos y persuasivos sobre cualquier tema o problema. En definitiva, leer el libro <strong>Agustin Campos Arenas Pensamiento Critico.pdf</strong> nos hará mejores pensadores y mejores personas.</p>
20
- <p></p>
21
- <h4>¿Quién es Agustín Campos Arenas?</h4>
22
-
23
- <p>Agustín Campos Arenas es un profesor e investigador mexicano, especializado en filosofía de la educación y pensamiento crítico. Es doctor en Filosofía por la Universidad Nacional Autónoma de México (UNAM) y maestro en Educación por la Universidad Pedagógica Nacional (UPN). Ha sido profesor e investigador en diversas instituciones educativas, como la UNAM, la UPN, el Instituto Politécnico Nacional (IPN) y el Instituto Tecnológico y de Estudios Superiores de Monterrey (ITESM).</p>
24
-
25
- <p>Agustín Campos Arenas ha publicado varios libros y artículos sobre temas relacionados con la educación, la filosofía y el pensamiento crítico. Entre sus obras más destacadas se encuentran <strong>Agustin Campos Arenas Pensamiento Critico.pdf</strong>, <em>Educación y filosofía: una introducción</em>, <em>La educación como práctica social</em> y <em>El pensamiento crítico en la educación superior</em>. Además, ha participado en diversos proyectos de investigación y desarrollo educativo, tanto a nivel nacional como internacional.</p>
26
-
27
- <h5>¿Cómo descargar el libro Agustin Campos Arenas Pensamiento Critico.pdf?</h5>
28
-
29
- <p>Si quieres leer el libro <strong>Agustin Campos Arenas Pensamiento Critico.pdf</strong>, puedes descargarlo de forma gratuita desde el siguiente enlace: <a href="https://www.academia.edu/attachments/59705575/download_file?st=MTYzOTU3MjEwMCw0MS4xOTkuMTQ2LjE1NCw0MjIyNzQw&s=profile">https://www.academia.edu/attachments/59705575/download_file?st=MTYzOTU3MjEwMCw0MS4xOTkuMTQ2LjE1NCw0MjIyNzQw&s=profile</a>. Se trata de un archivo en formato PDF que puedes leer en tu computadora, tablet o celular. También puedes imprimirlo si lo prefieres.</p>
30
-
31
- <p>El libro <strong>Agustin Campos Arenas Pensamiento Critico.pdf</strong> es una obra de gran valor para todos los interesados en mejorar su pensamiento crítico y su capacidad de razonar. Te invitamos a leerlo y a compartirlo con tus amigos, familiares y colegas. Estamos seguros de que te será de mucha utilidad y te abrir�� nuevas perspectivas sobre el mundo.</p>
32
- <h6>¿Qué beneficios tiene el pensamiento crítico?</h6>
33
-
34
- <p>El pensamiento crítico tiene múltiples beneficios para el desarrollo personal y social de las personas. Algunos de estos beneficios son:</p>
35
-
36
- <ul>
37
- <li>Mejora la comprensión lectora y la expresión oral y escrita.</li>
38
- <li>Fomenta la creatividad y la innovación.</li>
39
- <li>Desarrolla el pensamiento lógico-matemático y científico.</li>
40
- <li>Promueve el pensamiento ético y moral.</li>
41
- <li>Estimula el pensamiento intercultural y global.</li>
42
- <li>Facilita el aprendizaje autónomo y permanente.</li>
43
- <li>Aumenta la autoestima y la confianza en sí mismo.</li>
44
- <li>Prepara para el ejercicio de la ciudadanía democrática y participativa.</li>
45
- </ul>
46
-
47
- <p>El pensamiento crítico es, por tanto, una habilidad indispensable para el siglo XXI, en el que se enfrentan grandes desafíos sociales, económicos, ambientales y culturales. El pensamiento crítico nos permite adaptarnos al cambio, resolver problemas complejos y contribuir al bienestar común.</p>
48
-
49
- <h7>¿Cómo adquirir el libro Agustin Campos Arenas Pensamiento Critico.pdf?</h7>
50
-
51
- <p>Si quieres adquirir el libro <strong>Agustin Campos Arenas Pensamiento Critico.pdf</strong>, puedes hacerlo de varias formas. Una de ellas es comprarlo en formato físico en alguna librería o tienda en línea. Otra opción es solicitarlo en alguna biblioteca pública o escolar. También puedes acceder al libro en formato digital a través de plataformas como Google Books o Academia.edu.</p>
52
-
53
- <p>El libro <strong>Agustin Campos Arenas Pensamiento Critico.pdf</strong> es una inversión que vale la pena. No solo te ayudará a mejorar tu pensamiento crítico, sino también a ampliar tu cultura general y tu visión del mundo. Te recomendamos que lo leas con atención y que realices las actividades y ejercicios que propone el autor. Así podrás aprovechar al máximo los conocimientos y las habilidades que te ofrece este libro.</p>
54
- <h8>¿Qué opinan los lectores del libro Agustin Campos Arenas Pensamiento Critico.pdf?</h8>
55
-
56
- <p>El libro <strong>Agustin Campos Arenas Pensamiento Critico.pdf</strong> ha recibido numerosas opiniones positivas de los lectores que lo han leído. Algunos de los comentarios que se pueden encontrar en Internet son los siguientes:</p>
57
-
58
- <blockquote>
59
- <p>"Es un libro muy completo y didáctico, que explica de forma clara y sencilla los conceptos y las técnicas del pensamiento crítico. Me ha servido mucho para mejorar mi capacidad de análisis y argumentación en mi trabajo y en mi vida personal."</p>
60
- <cite>- Juan Carlos, profesor de secundaria.</cite>
61
- </blockquote>
62
-
63
- <blockquote>
64
- <p>"Me gustó mucho el libro porque presenta una metodología práctica y efectiva para desarrollar el pensamiento crítico en el aula. Los ejercicios y las actividades que propone el autor son muy variados e interesantes, y se pueden adaptar a diferentes niveles y materias."</p>
65
- <cite>- María José, maestra de primaria.</cite>
66
- </blockquote>
67
-
68
- <blockquote>
69
- <p>"El libro es una excelente introducción al pensamiento crítico, que aborda tanto los aspectos teóricos como los prácticos. El autor tiene una gran experiencia y conocimiento sobre el tema, y lo expone con rigor y claridad. Lo recomiendo a todos los que quieran aprender a pensar mejor."</p>
70
- <cite>- Luis Alberto, estudiante universitario.</cite>
71
- </blockquote>
72
-
73
- <p>Estas son solo algunas de las opiniones que se pueden leer sobre el libro <strong>Agustin Campos Arenas Pensamiento Critico.pdf</strong>. Si quieres conocer más testimonios de los lectores, puedes visitar las páginas web de Google Books o Scribd, donde encontrarás más reseñas y valoraciones sobre esta obra.</p>
74
-
75
- <h9>¿Cómo contactar con el autor del libro Agustin Campos Arenas Pensamiento Critico.pdf?</h9>
76
-
77
- <p>Si quieres contactar con el autor del libro <strong>Agustin Campos Arenas Pensamiento Critico.pdf</strong>, puedes hacerlo a través de su correo electrónico: [email protected]. También puedes seguirlo en sus redes sociales: Twitter (@agustincamposa) y Facebook (Agustín Campos Arenas).</p>
78
-
79
- <p>Agustín Campos Arenas es un autor muy accesible y cercano, que siempre está dispuesto a responder a las dudas, comentarios o sugerencias de sus lectores. Además, suele participar en conferencias, talleres y cursos sobre pensamiento crítico y educación, tanto presenciales como en línea. Si quieres estar al tanto de sus actividades y novedades, puedes suscribirte a su boletín informativo o visitar su página web: www.agustincamposarenas.com.</p>
80
- <h10>¿Qué otros libros sobre pensamiento crítico se pueden leer?</h10>
81
-
82
- <p>El libro <strong>Agustin Campos Arenas Pensamiento Critico.pdf</strong> es una de las mejores obras sobre pensamiento crítico que se pueden encontrar en el mercado. Sin embargo, no es la única. Existen otros libros que también abordan este tema desde diferentes perspectivas y enfoques. Algunos de estos libros son los siguientes:</p>
83
-
84
- <ul>
85
- <li><em>Pensamiento crítico: conceptos básicos y actividades prácticas</em>, de Richard Paul y Linda Elder. Este libro es una introducción al pensamiento crítico, que explica sus principios, estándares y elementos. Además, ofrece una serie de actividades prácticas para desarrollar esta habilidad en diferentes contextos y situaciones.</li>
86
- <li><em>Pensar bien, sentirse bien: nada justifica el sufrimiento inútil</em>, de Walter Riso. Este libro es una propuesta para mejorar la calidad de vida a través del pensamiento crítico. El autor muestra cómo el pensamiento irracional puede generar sufrimiento y problemas emocionales, y cómo el pensamiento crítico puede ayudar a superarlos.</li>
87
- <li><em>Pensar rápido, pensar despacio</em>, de Daniel Kahneman. Este libro es una obra maestra de la psicología cognitiva, que explica cómo funciona el pensamiento humano y cómo influye en nuestras decisiones. El autor distingue entre dos sistemas de pensamiento: el rápido, intuitivo y emocional, y el lento, racional y crítico.</li>
88
- <li><em>Cómo ser un estoico: utilizar la filosofía antigua para vivir una vida moderna</em>, de Massimo Pigliucci. Este libro es una invitación a practicar el estoicismo, una filosofía que promueve el pensamiento crítico y la virtud como formas de alcanzar la felicidad. El autor explica los principios y las técnicas del estoicismo, y cómo aplicarlos a los desafíos actuales.</li>
89
- <li><em>El arte de pensar: 52 errores de lógica que es mejor dejar que cometan otros</em>, de Rolf Dobelli. Este libro es una colección de errores de lógica que cometemos a menudo en nuestro pensamiento y que nos llevan a conclusiones erróneas o engañosas. El autor los expone con humor e ironía, y nos enseña a evitarlos.</li>
90
- </ul>
91
-
92
- <p>Estos son solo algunos ejemplos de libros sobre pensamiento crítico que se pueden leer para complementar el libro <strong>Agustin Campos Arenas Pensamiento Critico.pdf</strong>. Hay muchos más libros que tratan este tema desde diferentes ángulos y disciplinas. Te animamos a que los busques y los leas, y así amplíes tu cultura y tu capacidad crítica.</p>
93
- <h11>Conclusión</h11>
94
-
95
- <p>El pensamiento crítico es una habilidad fundamental para el siglo XXI, que nos permite analizar, evaluar y generar argumentos razonables sobre cualquier tema o problema. El pensamiento crítico nos ayuda a comprender mejor la realidad, tomar decisiones informadas y resolver conflictos de forma constructiva.</p>
96
-
97
- <p>Uno de los mejores libros para aprender y practicar el pensamiento crítico es <strong>Agustin Campos Arenas Pensamiento Critico.pdf</strong>, una obra del profesor e investigador mexicano Agustín Campos Arenas, experto en educación y filosofía. Este libro presenta los conceptos básicos y las técnicas del pensamiento crítico, así como una serie de actividades y ejercicios para aplicarlos en el ámbito educativo.</p>
98
-
99
- <p>El libro <strong>Agustin Campos Arenas Pensamiento Critico.pdf</strong> es una lectura recomendada para todos los que quieran mejorar su pensamiento crítico y su capacidad de razonar. El libro es accesible, ameno y práctico, y está escrito con un lenguaje sencillo y directo. El libro se puede descargar de forma gratuita desde Internet, o se puede comprar en formato físico o digital.</p>
100
-
101
- <p>Si te ha gustado el libro <strong>Agustin Campos Arenas Pensamiento Critico.pdf</strong>, puedes contactar con el autor a través de su correo electrónico o sus redes sociales. También puedes leer otros libros sobre pensamiento crítico que te ofrecerán nuevas perspectivas y enfoques sobre este tema. Te invitamos a que sigas leyendo y aprendiendo sobre el pensamiento crítico, una habilidad que te hará más inteligente, más creativo y más feliz.</p> 3cee63e6c2<br />
102
- <br />
103
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1gistliPinn/ChatGPT4/Examples/Bobcadv23FULLVersiondownload.md DELETED
@@ -1,66 +0,0 @@
1
- <h2>bobcadv23FULLVersiondownload</h2><br /><p><b><b>DOWNLOAD</b> &middot;&middot;&middot;&middot;&middot; <a href="https://imgfil.com/2uxXxp">https://imgfil.com/2uxXxp</a></b></p><br /><br />
2
-
3
- BobCAD-CAM V24(0) and older cannot be re-registered and must be re-registered for BobCAD-CAM V25(0) and older.
4
-
5
- BobCAD-CAM V24.0(0)
6
-
7
- BobCAD-CAM V25.0(0)
8
-
9
- The BobCAD-CAM must be re-registered for the following applications:
10
-
11
- BobCAD-CAM V25.0(0) and older
12
-
13
- BobCAD-CAM V26(0) and older
14
-
15
- BobCAD-CAM V27(0) and older
16
-
17
- BobCAD-CAM V28(0) and older
18
-
19
- BobCAD-CAM V29(0) and older
20
-
21
- BobCAD-CAM V30(0) and older
22
-
23
- BobCAD-CAM V31(0) and older
24
-
25
- BobCAD-CAM V32(0) and older
26
-
27
- BobCAD-CAM V33(0) and older
28
-
29
- BobCAD-CAM V34(0) and older
30
-
31
- BobCAD-CAM V35(0) and older
32
-
33
- BobCAD-CAM V36(0) and older
34
-
35
- BobCAD-CAM V37(0) and older
36
-
37
- BobCAD-CAM V38(0) and older
38
-
39
- BobCAD-CAM V39(0) and older
40
-
41
- BobCAD-CAM V40(0) and older
42
-
43
- BobCAD-CAM V41(0) and older
44
-
45
- BobCAD-CAM V42(0) and older
46
-
47
- BobCAD-CAM V43(0) and older
48
-
49
- BobCAD-CAM V44(0) and older
50
-
51
- BobCAD-CAM V45(0) and older
52
-
53
- BobCAD-CAM V46(0) and older
54
-
55
- BobCAD-CAM V47(0) and older
56
-
57
- BobCAD-CAM V48(0) and older
58
-
59
- BobCAD-CAM V49(0) and older
60
-
61
- BobCAD-CAM V50(0) and older
62
-
63
- BobCAD-CAM V51(0) and older 4fefd39f24<br />
64
- <br />
65
- <br />
66
- <p></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1gistliPinn/ChatGPT4/Examples/Fc Mptool Fc8308 Fc8406 V.2.02.00.rar.md DELETED
@@ -1,15 +0,0 @@
1
- <h2>fc mptool fc8308 fc8406 v.2.02.00.rar</h2><br /><p><b><b>Download File</b> ===> <a href="https://imgfil.com/2uy0d2">https://imgfil.com/2uy0d2</a></b></p><br /><br />
2
-
3
- January 26, 2565 BC Download movie In 720p DOWNLOAD: ☑ Santana. santan dave 5d6678cf8e fc mptool fc8308 fc8406 v.2.02.00.rar{RTAS . Download.
4
- - On our site you can download the movie Santana 2 as DVD 5 Aug 2014 7 Apr 2016 .
5
- Download free movie Santana 2 / Santana 2 (DVDRip/700Mb) DVDRip: .
6
- Download.
7
- File: Santana - Santana (Season 1/2010/DVDRip) Download.
8
- 24 Jul 2014 .
9
- Download Santana 2 via torrent for free and without registration.
10
- The best news from.
11
- 7 Apr 2016 .
12
- Download 8a78ff9644<br />
13
- <br />
14
- <br />
15
- <p></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/24clan VPN Lite SSH Gaming VPN APK Old Version - How to Download and Use.md DELETED
@@ -1,135 +0,0 @@
1
- <br />
2
- <h1>24clan VPN Lite APK Old Version: What Is It and Why You Need It</h1>
3
- <p>If you are looking for a fast, reliable, and easy-to-use VPN service for your Android device, you may have heard of 24clan VPN Lite APK. This is a popular app that allows you to access blocked websites, apps, and content from anywhere in the world. But did you know that there are different versions of this app available, and that some users prefer to use the old version instead of the latest one? In this article, we will explain what 24clan VPN Lite APK is, how to download and install it on your Android device, why you need it, and how to use it. We will also answer some frequently asked questions about this app.</p>
4
- <h2>What Is 24clan VPN Lite APK?</h2>
5
- <h3>A brief introduction to 24clan VPN Lite APK and its features</h3>
6
- <p>24clan VPN Lite APK is an app that provides you with a virtual private network (VPN) service on your Android device. A VPN is a technology that creates a secure and encrypted connection between your device and a remote server, hiding your real IP address and location from anyone who can monitor your online activity. With a VPN, you can bypass geo-restrictions, censorship, firewalls, and ISP throttling, and access any website, app, or content that you want.</p>
7
- <h2>24clan vpn lite apk old version</h2><br /><p><b><b>Download</b> - <a href="https://urlin.us/2uT19K">https://urlin.us/2uT19K</a></b></p><br /><br />
8
- <p>24clan VPN Lite APK is one of the many apps developed by Tcodes, a Nigerian company that specializes in creating free internet solutions for users in Africa and beyond. The app uses SSH (Secure Shell) protocol to create a tunnel between your device and a server hosted by Tcodes or its partners. The app also supports HTTP (Hypertext Transfer Protocol) proxy mode, which allows you to use the app as a web browser proxy.</p>
9
- <p>Some of the features of 24clan VPN Lite APK are:</p>
10
- <ul>
11
- <li>It is free to download and use, with no registration or subscription required.</li>
12
- <li>It has a simple and user-friendly interface, with one-click connection and easy configuration.</li>
13
- <li>It offers unlimited bandwidth and speed, with no data cap or throttling.</li>
14
- <li>It supports multiple servers in different countries, including Nigeria, South Africa, Kenya, Ghana, India, USA, UK, Canada, Germany, France, Singapore, Japan, Australia, and more.</li>
15
- <li>It works with all Android devices running Android 4.0 or higher.</li>
16
- <li>It has a low battery consumption and memory usage.</li>
17
- <li>It has a low battery consumption and memory usage.</li>
18
- </ul>
19
- <h3>How to download and install 24clan VPN Lite APK old version on your Android device</h3>
20
- <p>If you want to use 24clan VPN Lite APK old version on your Android device, you need to download and install it manually from a trusted source. You cannot find it on the Google Play Store, as the developer only updates the latest version there. Here are the steps to download and install 24clan VPN Lite APK old version on your Android device:</p>
21
- <ol>
22
- <li>Go to a reliable website that offers 24clan VPN Lite APK old version download link, such as or . You can also use the web search results from Bing to find other sources.</li>
23
- <li>Choose the version that you want to download, and tap on the download button. You may need to allow the website to download files on your device.</li>
24
- <li>Once the download is complete, locate the APK file in your device's file manager, and tap on it to install it. You may need to enable the installation of apps from unknown sources in your device's settings.</li>
25
- <li>Follow the on-screen instructions to complete the installation process. You may need to grant some permissions to the app, such as access to your device's location, storage, and network.</li>
26
- <li>Launch the app from your app drawer, and enjoy using 24clan VPN Lite APK old version on your Android device.</li>
27
- </ol>
28
- <h2>Why You Need 24clan VPN Lite APK Old Version</h2>
29
- <h3>The benefits of using a VPN service for your online privacy and security</h3>
30
- <p>Using a VPN service for your online privacy and security has many benefits, such as:</p>
31
- <ul>
32
- <li>It protects your online identity and activity from hackers, snoopers, ISPs, governments, and other third parties who can monitor your online traffic and collect your personal data.</li>
33
- <li>It encrypts your data and traffic, making it unreadable and untraceable by anyone who intercepts it.</li>
34
- <li>It allows you to access geo-restricted or censored websites, apps, and content that are otherwise blocked or unavailable in your region or country.</li>
35
- <li>It improves your online experience by bypassing ISP throttling, which can slow down your internet speed and affect your streaming, gaming, downloading, and browsing quality.</li>
36
- <li>It enhances your online security by preventing malware, phishing, ransomware, and other cyberattacks from infecting your device or stealing your data.</li>
37
- </ul>
38
- <h3>The advantages of using 24clan VPN Lite APK old version over the newer versions</h3>
39
- <p>While the newer versions of 24clan VPN Lite APK may have some improvements and bug fixes, some users prefer to use the old version for various reasons, such as:</p>
40
- <ul>
41
- <li>The old version may have some features or settings that are not available or changed in the newer versions, such as different server locations, protocols, or tweaks.</li>
42
- <li>The old version may be more compatible or stable with some devices or Android versions than the newer versions.</li>
43
- <li>The old version may have less ads or pop-ups than the newer versions.</li>
44
- <li>The old version may have a smaller file size or lower battery consumption than the newer versions.</li>
45
- <li>The old version may be more familiar or easier to use than the newer versions for some users.</li>
46
- </ul> <h3>How to troubleshoot common issues and errors using 24clan VPN Lite APK old version</h3>
47
- <p>Even though 24clan VPN Lite APK old version is a reliable and easy-to-use app, you may still encounter some issues and errors while using it. Some of the common problems that users face are:</p>
48
- <ul>
49
- <li>The app fails to connect to the VPN server or keeps disconnecting.</li>
50
- <li>The app slows down the internet speed or causes high data consumption.</li>
51
- <li>The app crashes or freezes frequently or does not open at all.</li>
52
- <li>The app does not work with some websites, apps, or content that require a specific VPN protocol or location.</li>
53
- <li>The app causes conflicts or compatibility issues with other apps or devices.</li>
54
- </ul>
55
- <p>To troubleshoot these issues and errors, you can try the following solutions:</p>
56
- <p>24clan vpn lite apk old version download<br />
57
- 24clan vpn lite apk old version free<br />
58
- 24clan vpn lite apk old version for android<br />
59
- 24clan vpn lite apk old version update<br />
60
- 24clan vpn lite apk old version 4.1<br />
61
- 24clan vpn lite apk old version 4.2<br />
62
- 24clan vpn lite apk old version 4.4<br />
63
- 24clan vpn lite apk old version mod<br />
64
- 24clan vpn lite apk old version hack<br />
65
- 24clan vpn lite apk old version pro<br />
66
- 24clan vpn lite apk old version premium<br />
67
- 24clan vpn lite apk old version cracked<br />
68
- 24clan vpn lite apk old version unlimited<br />
69
- 24clan vpn lite apk old version latest<br />
70
- 24clan vpn lite apk old version offline<br />
71
- 24clan vpn lite apk old version online<br />
72
- 24clan vpn lite apk old version review<br />
73
- 24clan vpn lite apk old version features<br />
74
- 24clan vpn lite apk old version settings<br />
75
- 24clan vpn lite apk old version tutorial<br />
76
- 24clan vpn lite apk old version guide<br />
77
- 24clan vpn lite apk old version tips<br />
78
- 24clan vpn lite apk old version tricks<br />
79
- 24clan vpn lite apk old version how to use<br />
80
- 24clan vpn lite apk old version how to install<br />
81
- 24clan vpn lite apk old version how to download<br />
82
- 24clan vpn lite apk old version how to update<br />
83
- 24clan vpn lite apk old version how to hack<br />
84
- 24clan vpn lite apk old version how to mod<br />
85
- 24clan vpn lite apk old version how to crack<br />
86
- 24clan vpn lite apk old version how to get premium<br />
87
- 24clan vpn lite apk old version how to get unlimited<br />
88
- 24clan vpn lite apk old version best settings<br />
89
- 24clan vpn lite apk old version best features<br />
90
- 24clan vpn lite apk old version best servers<br />
91
- 24clan vpn lite apk old version best countries<br />
92
- 24clan vpn lite apk old version best speed<br />
93
- 24clan vpn lite apk old version best security<br />
94
- 24clan vpn lite apk old version best privacy<br />
95
- 24clan vpn lite apk old version comparison<br />
96
- 24clan vpn lite apk old version alternatives<br />
97
- 24clan vpn lite apk old version competitors<br />
98
- 24clan vpn lite apk old version vs other vpns<br />
99
- 24clan vpn lite apk old version vs anonytun pro <br />
100
- 24clan vpn lite apk old version vs starkvpn pro <br />
101
- 24clan vpn lite apk old version vs tweakware pro <br />
102
- 24clan vpn lite apk old version vs psiphon pro <br />
103
- 24clan vpn lite apk old version vs expressvpn pro <br />
104
- 24clan vpn lite apk old version vs nordvpn pro <br />
105
- 24clan vpn lite apk old version vs surfshark pro </p>
106
- <ul>
107
- <li>Check your internet connection and make sure that it is stable and fast enough to support a VPN connection. You can use a speed test tool to measure your internet speed and ping.</li>
108
- <li>Restart the app or your device and try reconnecting to the VPN server. You can also clear the app's cache and data from your device's settings to remove any corrupted or outdated files.</li>
109
- <li>Change the VPN server or location that you are connecting to. You can choose a server that is closer to your physical location or has less traffic or congestion. You can also try a different VPN protocol or mode, such as SSH or HTTP proxy, if the app supports it.</li>
110
- <li>Update the app to the latest version if possible, or switch to a newer version if the old version is no longer supported or compatible with your device or Android version. You can check for updates from the app's settings or from the developer's website.</li>
111
- <li>Contact the developer of the app for support and feedback. You can find their contact information from the app's settings or from their website. You can also check their FAQ section or online forums for more tips and solutions.</li>
112
- </ul> On the other hand, 24clan VPN Pro APK uses OpenVPN protocol to create a tunnel between your device and a server hosted by Tcodes or its partners. OpenVPN is a more advanced and secure protocol than SSH, but it may also require more configuration and resources. 24clan VPN Pro APK also has more features and options than 24clan VPN Lite APK, such as DNS leak protection, kill switch, split tunneling, and more. However, 24clan VPN Pro APK is not free to use, unlike 24clan VPN Lite APK. You need to pay a subscription fee to access the premium servers and features of 24clan VPN Pro APK.</p>
113
- <h3>Is 24clan VPN Lite APK safe and legal to use?</h3>
114
- <p>24clan VPN Lite APK is generally safe and legal to use, as long as you download it from a trusted source and use it for legitimate purposes. The app does not contain any malware or spyware that can harm your device or data. The app also does not collect or share any of your personal information or online activity with anyone. However, you should always be careful when using any VPN app, as some websites, apps, or content providers may have terms of service or policies that prohibit or restrict the use of VPN services. You should also respect the intellectual property rights and privacy policies of the websites, apps, or content that you access with the app. You should also avoid using the app for any illegal or unethical activities, such as hacking, fraud, piracy, or terrorism.</p>
115
- <h3>Which countries and servers can I access with 24clan VPN Lite APK old version?</h3>
116
- <p>With 24clan VPN Lite APK old version, you can access multiple servers in different countries, including Nigeria, South Africa, Kenya, Ghana, India, USA, UK, Canada, Germany, France, Singapore, Japan, Australia, and more. However, the availability and performance of the servers may vary depending on your location and network speed. You may also encounter some errors or issues when connecting to some servers or locations. To access more servers and locations with better quality and reliability, you may need to update the app to the latest version or switch to 24clan VPN Pro APK.</p>
117
- <h3>How can I update 24clan VPN Lite APK old version to the latest version?</h3>
118
- <p>If you want to update 24clan VPN Lite APK old version to the latest version, you can do so from the Google Play Store or from the developer's website. Here are the steps to update 24clan VPN Lite APK old version to the latest version:</p>
119
- <ol>
120
- <li>Go to the Google Play Store on your device, and search for 24clan VPN Lite APK. You will see the app's page with a button that says "Update". Tap on the button and wait for the update to download and install on your device.</li>
121
- <li>Alternatively, go to the developer's website at , and look for the download link for 24clan VPN Lite APK latest version. Tap on the link and download the APK file on your device. Then follow the same steps as above to install it on your device.</li>
122
- <li>Once you have updated the app to the latest version, you can enjoy using it with more features, servers, and security.</li>
123
- </ol>
124
- <h3>How can I contact the developer of 24clan VPN Lite APK for support and feedback?</h3>
125
- <p>If you have any questions, comments, suggestions, or complaints about 24clan VPN Lite APK old version or any other version of the app , you can contact the developer of 24clan VPN Lite APK for support and feedback. You can find their contact information from the app's settings menu or from their website. You can also check their FAQ section or online forums for more tips and solutions. Here are some ways to contact the developer of 24clan VPN Lite APK:</p>
126
- <ul>
127
- <li>You can send them an email at [email protected], and they will reply to you as soon as possible.</li>
128
- <li>You can visit their website at , and fill out the contact form with your name, email, subject, and message. You can also find their social media links and other apps from their website.</li>
129
- <li>You can join their Telegram group at , and chat with other users and the developer. You can also get the latest news and updates about the app from their Telegram channel at .</li>
130
- <li>You can follow them on Twitter at , and tweet them your feedback or questions. You can also see their tweets and retweets about the app and other topics.</li>
131
- <li>You can rate and review the app on the Google Play Store, and share your opinion and experience with other users. You can also see the ratings and reviews of other users, and respond to them if you want.</li>
132
- </ul>
133
- <p>We hope that this article has helped you understand what 24clan VPN Lite APK old version is, how to download and install it on your Android device, why you need it, and how to use it. If you have any questions or comments about this app or this article, please feel free to leave them below. Thank you for reading!</p> 197e85843d<br />
134
- <br />
135
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Download Aplikasi Mad Skills Motocross 3 Mod Apk and Overcome Difficult Tracks and Stunts.md DELETED
@@ -1,92 +0,0 @@
1
-
2
- <h1>Download Aplikasi Mad Skills Motocross 3 Mod Apk: The Ultimate Guide</h1>
3
- <p>If you are a fan of motocross games, you must have heard of Mad Skills Motocross 3, the latest installment in the popular series by Turborilla. This game is one of the best motocross simulators on the market, with realistic physics, stunning graphics, and addictive gameplay. But what if you want to enjoy the game without any limitations or interruptions? That's where Mad Skills Motocross 3 mod apk comes in handy. In this article, we will tell you everything you need to know about this modded version of the game, including its features, benefits, and how to download and install it on your device. Let's get started!</p>
4
- <h2>What is Mad Skills Motocross 3?</h2>
5
- <p>Mad Skills Motocross 3 is a racing game that lets you experience the thrill of motocross on your mobile device. You can choose from dozens of different bikes and riders, customize them to your liking, and compete against other players from around the world. You can also participate in weekly competitions and events, where you can win prizes and fame. The game has a simple control system that is easy to learn but hard to master. You can use the buttons on the screen to accelerate, brake, lean forward, and lean backward. You have to balance your speed and your posture to avoid crashing and perform tricks. The game has a realistic physics engine that makes every jump, landing, and collision feel authentic. The game also has amazing graphics that bring the tracks and the environments to life.</p>
6
- <h2>download aplikasi mad skills motocross 3 mod apk</h2><br /><p><b><b>Download</b> &#9881;&#9881;&#9881; <a href="https://urlin.us/2uSSui">https://urlin.us/2uSSui</a></b></p><br /><br />
7
- <h3>Features of Mad Skills Motocross 3</h3>
8
- <p>Mad Skills Motocross 3 has many features that make it one of the best motocross games on the market. Here are some of them:</p>
9
- <h4>Realistic physics</h4>
10
- <p>The game has a realistic physics engine that simulates the behavior of the bikes and the riders. You can feel the weight, the momentum, and the gravity of your bike as you race through the tracks. You can also see how your bike reacts to different terrains, such as dirt, sand, mud, grass, and water. You have to adjust your speed and your angle to avoid crashing or losing control.</p>
11
- <h4>Customizable bikes and riders</h4>
12
- <p>The game allows you to customize your bike and your rider to suit your style and preferences. You can choose from dozens of different bikes, each with its own characteristics and performance. You can also change the color, the decals, the wheels, and the exhaust of your bike. You can also customize your rider's appearance, such as their helmet, their suit, their gloves, and their boots. You can even create your own custom number plate.</p>
13
- <h4>Online multiplayer and leaderboards</h4>
14
- <p>The game has an online multiplayer mode that lets you race against other players from around the world. You can join or create a room with up to eight players and compete in different modes, such as time trial, head-to-head, or team race. You can also chat with other players and send them emojis. The game also has leaderboards that rank you based on your performance in different categories, such as global, regional, national, or friends. You can also see your stats and achievements in your profile.</p>
15
- <h4>Weekly competitions and events</h4>
16
- <p>The game has weekly competitions and events that give you a chance to win prizes and fame. You can join different events, such as jam, cash jam, boss fight, or special series. Each event has its own rules, rewards, and challenges. You can also see how you rank among other players in each event.</p>
17
- <h3>Why download Mad Skills Motocross 3 mod apk?</h3>
18
- <p>Mad Skills Motocross 3 is a free-to-play game, but it also has some in-app purchases and ads that can limit your enjoyment. For example, you need to spend money to buy new bikes, upgrade them, or unlock new tracks. You also have to watch ads to get extra lives, coins, or bonuses. If you want to avoid these hassles and enjoy the game to the fullest, you should download Mad Skills Motocross 3 mod apk. This is a modified version of the game that gives you some advantages and benefits, such as:</p>
19
- <p>Download mad skills motocross 3 mod apk unlimited money<br />
20
- Mad skills motocross 3 mod apk latest version download<br />
21
- How to download and install mad skills motocross 3 mod apk<br />
22
- Mad skills motocross 3 mod apk free download for android<br />
23
- Download mad skills motocross 3 mod apk with realistic physics<br />
24
- Mad skills motocross 3 mod apk offline download<br />
25
- Download mad skills motocross 3 mod apk full unlocked<br />
26
- Mad skills motocross 3 mod apk download for pc<br />
27
- Download mad skills motocross 3 mod apk no ads<br />
28
- Mad skills motocross 3 mod apk download link<br />
29
- Download mad skills motocross 3 mod apk with great graphics<br />
30
- Mad skills motocross 3 mod apk easy controls download<br />
31
- Download mad skills motocross 3 mod apk with horizontal scrolling<br />
32
- Mad skills motocross 3 mod apk new features download<br />
33
- Download mad skills motocross 3 mod apk with multiplayer mode<br />
34
- Mad skills motocross 3 mod apk best bikes download<br />
35
- Download mad skills motocross 3 mod apk with custom tracks<br />
36
- Mad skills motocross 3 mod apk awesome stunts download<br />
37
- Download mad skills motocross 3 mod apk with leaderboards<br />
38
- Mad skills motocross 3 mod apk weekly tournaments download<br />
39
- Download mad skills motocross 3 mod apk with achievements<br />
40
- Mad skills motocross 3 mod apk tips and tricks download<br />
41
- Download mad skills motocross 3 mod apk with cheats<br />
42
- Mad skills motocross 3 mod apk hack download<br />
43
- Download mad skills motocross 3 mod apk without root<br />
44
- Mad skills motocross 3 mod apk safe and secure download<br />
45
- Download mad skills motocross 3 mod apk from APKMB.Com[^1^]<br />
46
- Mad skills motocross 3 mod apk direct download<br />
47
- Download mad skills motocross 3 mod apk fast and easy<br />
48
- Mad skills motocross 3 mod apk high quality download</p>
49
- <h4>Unlimited money</h4>
50
- <p>With Mad Skills Motocross 3 mod apk, you will have unlimited money in your account. You can use this money to buy any bike you want, upgrade it to the max level, or unlock any track you like. You don't have to worry about running out of money or saving up for a long time.</p>
51
- <h4>Unlocked all bikes and tracks</h4>
52
- <p>With Mad Skills Motocross 3 mod apk, you will have access to all the bikes and tracks in the game. You don't have to complete certain levels or achievements to unlock them. You can choose any bike or track you want and enjoy the game without any restrictions.</p>
53
- <h4>No ads</h4>
54
- <p>With Mad Skills Motocross 3 mod apk, you will not see any ads in the game. You don't have to watch annoying videos or banners that interrupt your gameplay or waste your time. You can play the game smoothly and without any distractions.</p>
55
- <h2>How to download and install Mad Skills Motocross 3 mod apk?</h2>
56
- <p>If you are interested in downloading and installing Mad Skills Motocross 3 mod apk on your device, you can follow these simple steps:</p>
57
- <h3>Step 1: Download the mod apk file from a trusted source</h3>
58
- <p>The first thing you need to do is to download the mod apk file from a reliable and safe source. You can use the link below to download the latest version of Mad Skills Motocross 3 mod apk:</p>
59
- <p><a href="">Download Mad Skills Motocross 3 Mod Apk</a></p>
60
- <p>Make sure you have enough storage space on your device before downloading the file. The file size is about 100 MB.</p>
61
- <h3>Step 2: Enable unknown sources on your device</h3>
62
- <p>The next thing you need to do is to enable unknown sources on your device. This is a security setting that allows you to install apps from sources other than the Google Play Store. To enable unknown sources, you can follow these steps:</p>
63
- <ul>
64
- <li>Go to your device's settings and look for security or privacy options.</li>
65
- <li>Find the option that says unknown sources or allow installation of apps from unknown sources.</li>
66
- <li>Toggle it on and confirm your choice.</li>
67
- </ul>
68
- <p>If you have a newer version of Android, you may need to grant permission for each app individually. In that case, you can skip this step and proceed to the next one.</p>
69
- <h3>Step 3: Install the mod apk file and enjoy the game</h3>
70
- <p>The final thing you need to do is to install the mod apk file on your device. To do that, you can follow these steps:</p>
71
- <ul>
72
- <li>Locate the downloaded mod apk file on your device's file manager or downloads folder.</li>
73
- <li>Tap on it and select install.</li>
74
- <li>If prompted, grant permission for the app to be installed.</li>
75
- <li>Wait for the installation process to finish.</li>
76
- <li>Launch the game and enjoy!</li>
77
- </ul>
78
- <h2>Conclusion</h2>
79
- <p>Mad Skills Motocross 3 is a great game for motocross lovers who want to experience realistic and exciting racing on their mobile devices. However, if you want to enjoy the game without any limitations or interruptions, you should download Mad Skills Motocross 3 mod apk. This is a modified version of the game that gives you unlimited money, unlocked all bikes and tracks, and no ads. You can download and install it easily by following our guide above. We hope this article was helpful for you. If you have any questions or feedback, feel free to leave a comment below.</p>
80
- <h2>FAQs</h2>
81
- <ul>
82
- <li><b>Is Mad Skills Motocross 3 mod apk safe?</b></li> <p>Yes, Mad Skills Motocross 3 mod apk is safe to use, as long as you download it from a trusted source. We have tested the mod apk file and found no viruses or malware. However, you should always be careful when downloading and installing apps from unknown sources, as they may contain harmful or unwanted content. You should also backup your data before installing the mod apk, in case something goes wrong.</p>
83
- <li><b>What are the minimum requirements to play Mad Skills Motocross 3?</b></li>
84
- <p>Mad Skills Motocross 3 is a relatively lightweight game that can run on most Android devices. However, you need to have at least Android 4.4 or higher and 2 GB of RAM to play the game smoothly. You also need to have a stable internet connection to access the online features of the game.</p>
85
- <li><b>How can I update Mad Skills Motocross 3 mod apk?</b></li>
86
- <p>Mad Skills Motocross 3 mod apk is not available on the Google Play Store, so you cannot update it automatically. You need to check for updates manually from the source where you downloaded the mod apk file. If there is a new version available, you need to download and install it again, following the same steps as before. You may also need to uninstall the previous version of the mod apk before installing the new one.</p>
87
- <li><b>Can I play Mad Skills Motocross 3 mod apk with my friends?</b></li>
88
- <p>Yes, you can play Mad Skills Motocross 3 mod apk with your friends, as long as they also have the mod apk installed on their devices. You can join or create a room with up to eight players and race against each other in different modes. You can also chat with your friends and send them emojis during the game.</p>
89
- <li><b>Can I get banned for using Mad Skills Motocross 3 mod apk?</b></li>
90
- <p>There is a possibility that you may get banned for using Mad Skills Motocross 3 mod apk, especially if you use it to cheat or hack the game. The developers of the game may detect your modded account and suspend or terminate it. Therefore, you should use the mod apk at your own risk and discretion. We are not responsible for any consequences that may arise from using the mod apk.</p> 197e85843d<br />
91
- <br />
92
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/2ndelement/voicevox/voicevox_engine/engine_manifest/__init__.py DELETED
@@ -1,7 +0,0 @@
1
- from .EngineManifest import EngineManifest
2
- from .EngineManifestLoader import EngineManifestLoader
3
-
4
- __all__ = [
5
- "EngineManifest",
6
- "EngineManifestLoader",
7
- ]
 
 
 
 
 
 
 
 
spaces/801artistry/RVC801/infer/lib/train/losses.py DELETED
@@ -1,58 +0,0 @@
1
- import torch
2
-
3
-
4
- def feature_loss(fmap_r, fmap_g):
5
- loss = 0
6
- for dr, dg in zip(fmap_r, fmap_g):
7
- for rl, gl in zip(dr, dg):
8
- rl = rl.float().detach()
9
- gl = gl.float()
10
- loss += torch.mean(torch.abs(rl - gl))
11
-
12
- return loss * 2
13
-
14
-
15
- def discriminator_loss(disc_real_outputs, disc_generated_outputs):
16
- loss = 0
17
- r_losses = []
18
- g_losses = []
19
- for dr, dg in zip(disc_real_outputs, disc_generated_outputs):
20
- dr = dr.float()
21
- dg = dg.float()
22
- r_loss = torch.mean((1 - dr) ** 2)
23
- g_loss = torch.mean(dg**2)
24
- loss += r_loss + g_loss
25
- r_losses.append(r_loss.item())
26
- g_losses.append(g_loss.item())
27
-
28
- return loss, r_losses, g_losses
29
-
30
-
31
- def generator_loss(disc_outputs):
32
- loss = 0
33
- gen_losses = []
34
- for dg in disc_outputs:
35
- dg = dg.float()
36
- l = torch.mean((1 - dg) ** 2)
37
- gen_losses.append(l)
38
- loss += l
39
-
40
- return loss, gen_losses
41
-
42
-
43
- def kl_loss(z_p, logs_q, m_p, logs_p, z_mask):
44
- """
45
- z_p, logs_q: [b, h, t_t]
46
- m_p, logs_p: [b, h, t_t]
47
- """
48
- z_p = z_p.float()
49
- logs_q = logs_q.float()
50
- m_p = m_p.float()
51
- logs_p = logs_p.float()
52
- z_mask = z_mask.float()
53
-
54
- kl = logs_p - logs_q - 0.5
55
- kl += 0.5 * ((z_p - m_p) ** 2) * torch.exp(-2.0 * logs_p)
56
- kl = torch.sum(kl * z_mask)
57
- l = kl / torch.sum(z_mask)
58
- return l
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/801artistry/RVC801/infer/modules/uvr5/modules.py DELETED
@@ -1,107 +0,0 @@
1
- import os
2
- import traceback
3
- import logging
4
-
5
- logger = logging.getLogger(__name__)
6
-
7
- import ffmpeg
8
- import torch
9
-
10
- from configs.config import Config
11
- from infer.modules.uvr5.mdxnet import MDXNetDereverb
12
- from infer.modules.uvr5.preprocess import AudioPre, AudioPreDeEcho
13
-
14
- config = Config()
15
-
16
-
17
- def uvr(model_name, inp_root, save_root_vocal, paths, save_root_ins, agg, format0):
18
- infos = []
19
- try:
20
- inp_root = inp_root.strip(" ").strip('"').strip("\n").strip('"').strip(" ")
21
- save_root_vocal = (
22
- save_root_vocal.strip(" ").strip('"').strip("\n").strip('"').strip(" ")
23
- )
24
- save_root_ins = (
25
- save_root_ins.strip(" ").strip('"').strip("\n").strip('"').strip(" ")
26
- )
27
- if model_name == "onnx_dereverb_By_FoxJoy":
28
- pre_fun = MDXNetDereverb(15, config.device)
29
- else:
30
- func = AudioPre if "DeEcho" not in model_name else AudioPreDeEcho
31
- pre_fun = func(
32
- agg=int(agg),
33
- model_path=os.path.join(
34
- os.getenv("weight_uvr5_root"), model_name + ".pth"
35
- ),
36
- device=config.device,
37
- is_half=config.is_half,
38
- )
39
- if inp_root != "":
40
- paths = [os.path.join(inp_root, name) for name in os.listdir(inp_root)]
41
- else:
42
- paths = [path.name for path in paths]
43
- for path in paths:
44
- inp_path = os.path.join(inp_root, path)
45
- need_reformat = 1
46
- done = 0
47
- try:
48
- info = ffmpeg.probe(inp_path, cmd="ffprobe")
49
- if (
50
- info["streams"][0]["channels"] == 2
51
- and info["streams"][0]["sample_rate"] == "44100"
52
- ):
53
- need_reformat = 0
54
- pre_fun._path_audio_(
55
- inp_path, save_root_ins, save_root_vocal, format0
56
- )
57
- done = 1
58
- except:
59
- need_reformat = 1
60
- traceback.print_exc()
61
- if need_reformat == 1:
62
- tmp_path = "%s/%s.reformatted.wav" % (
63
- os.path.join(os.environ["TEMP"]),
64
- os.path.basename(inp_path),
65
- )
66
- os.system(
67
- "ffmpeg -i %s -vn -acodec pcm_s16le -ac 2 -ar 44100 %s -y"
68
- % (inp_path, tmp_path)
69
- )
70
- inp_path = tmp_path
71
- try:
72
- if done == 0:
73
- pre_fun.path_audio(
74
- inp_path, save_root_ins, save_root_vocal, format0
75
- )
76
- infos.append("%s->Success" % (os.path.basename(inp_path)))
77
- yield "\n".join(infos)
78
- except:
79
- try:
80
- if done == 0:
81
- pre_fun._path_audio_(
82
- inp_path, save_root_ins, save_root_vocal, format0
83
- )
84
- infos.append("%s->Success" % (os.path.basename(inp_path)))
85
- yield "\n".join(infos)
86
- except:
87
- infos.append(
88
- "%s->%s" % (os.path.basename(inp_path), traceback.format_exc())
89
- )
90
- yield "\n".join(infos)
91
- except:
92
- infos.append(traceback.format_exc())
93
- yield "\n".join(infos)
94
- finally:
95
- try:
96
- if model_name == "onnx_dereverb_By_FoxJoy":
97
- del pre_fun.pred.model
98
- del pre_fun.pred.model_
99
- else:
100
- del pre_fun.model
101
- del pre_fun
102
- except:
103
- traceback.print_exc()
104
- if torch.cuda.is_available():
105
- torch.cuda.empty_cache()
106
- logger.info("Executed torch.cuda.empty_cache()")
107
- yield "\n".join(infos)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AIFILMS/StyleGANEX/models/stylegan2/op/fused_act.py DELETED
@@ -1,34 +0,0 @@
1
- import torch
2
- from torch import nn
3
- from torch.nn import functional as F
4
-
5
-
6
- class FusedLeakyReLU(nn.Module):
7
- def __init__(self, channel, bias=True, negative_slope=0.2, scale=2 ** 0.5):
8
- super().__init__()
9
-
10
- if bias:
11
- self.bias = nn.Parameter(torch.zeros(channel))
12
-
13
- else:
14
- self.bias = None
15
-
16
- self.negative_slope = negative_slope
17
- self.scale = scale
18
-
19
- def forward(self, inputs):
20
- return fused_leaky_relu(inputs, self.bias, self.negative_slope, self.scale)
21
-
22
-
23
- def fused_leaky_relu(inputs, bias=None, negative_slope=0.2, scale=2 ** 0.5):
24
- if bias is not None:
25
- rest_dim = [1] * (inputs.ndim - bias.ndim - 1)
26
- return (
27
- F.leaky_relu(
28
- inputs + bias.view(1, bias.shape[0], *rest_dim), negative_slope=negative_slope
29
- )
30
- * scale
31
- )
32
-
33
- else:
34
- return F.leaky_relu(inputs, negative_slope=negative_slope) * scale
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/ATang0729/Forecast4Muses/Model/Model6/Model6_2_ProfileRecogition/mmpretrain/configs/.ipynb_checkpoints/hr_4xb32_1024e_4channel-checkpoint.py DELETED
@@ -1,115 +0,0 @@
1
- _base_ = [ # 此配置文件将继承所有 `_base_` 中的配置
2
- '../configs/_base_/schedules/custom_schedule.py', # 训练策略配置
3
- '../configs/_base_/default_runtime.py' # 默认运行设置
4
- ]
5
-
6
- default_hooks = dict(
7
- # print log every 50 iterations.
8
- logger=dict(type='LoggerHook', interval=10),
9
- # save checkpoint per 8 epochs.
10
- checkpoint=dict(save_best='auto', interval=16)
11
- )
12
-
13
- visualizer = dict(
14
- vis_backends=[dict(type='LocalVisBackend'),
15
- dict(type='WandbVisBackend')])
16
-
17
- dataset_type = 'CustomDataset'
18
-
19
- # config of pipline
20
- train_pipeline = [
21
- dict(type='LoadImageFromFile', imdecode_backend='pillow', color_type='unchanged'), # 读取图像
22
- dict(type='RandomResizedCrop', scale=224), # 随机放缩裁剪
23
- dict(type='RandomFlip', prob=0.5, direction='horizontal'), # 随机水平翻转
24
- dict(type='PackInputs'), # 准备图像以及标签
25
- ]
26
-
27
- test_pipeline = [
28
- dict(type='LoadImageFromFile', imdecode_backend='pillow', color_type='unchanged'), # 读取图像
29
- dict(type='ResizeEdge', scale=256, edge='short'), # 缩放短边尺寸至 256px
30
- dict(type='CenterCrop', crop_size=224), # 中心裁剪
31
- dict(type='PackInputs'), # 准备图像以及标签
32
- ]
33
-
34
- # config of dataloader
35
- train_dataloader = dict(
36
- batch_size=32, # 每张 GPU 的 batchsize
37
- num_workers=5, # 每个 GPU 的线程数
38
- dataset=dict( # 训练数据集
39
- type=dataset_type,
40
- data_root='../2_preprocess_data_3000',
41
- with_label=True,
42
- ann_file='',
43
- data_prefix='train',
44
- pipeline=train_pipeline),
45
- sampler=dict(type='DefaultSampler', shuffle=True), # 默认采样器
46
- persistent_workers=True, # 是否保持进程,可以缩短每个 epoch 的准备时间
47
- )
48
-
49
- # 构造验证集 dataloader
50
- val_dataloader = dict(
51
- batch_size=32,
52
- num_workers=5,
53
- dataset=dict(
54
- type=dataset_type,
55
- data_root='../2_preprocess_data_3000',
56
- with_label=True,
57
- ann_file='',
58
- data_prefix='val',
59
- pipeline=test_pipeline),
60
- sampler=dict(type='DefaultSampler', shuffle=False),
61
- persistent_workers=True,
62
- )
63
-
64
- # set evaluator of validation dataset. Here uses top1 and top3 accuracy
65
- val_evaluator = dict(type='Accuracy', topk=(1, 3))
66
-
67
- test_dataloader = val_dataloader
68
- test_evaluator = val_evaluator
69
-
70
- model = dict(
71
- type='ImageClassifier', # 主模型类型(对于图像分类任务,使用 `ImageClassifier`)
72
- backbone=dict(
73
- type='HRNet', # 主干网络类型
74
- arch='w32', # 主干网络架构
75
- in_channels=4,
76
- extra=dict(
77
- stage1=dict(
78
- num_modules=1,
79
- num_branches=1,
80
- block='BOTTLENECK',
81
- num_blocks=(4, ),
82
- num_channels=(64, )),
83
- stage2=dict(
84
- num_modules=1,
85
- num_branches=2,
86
- block='BASIC',
87
- num_blocks=(4, 4),
88
- num_channels=(32, 64)),
89
- stage3=dict(
90
- num_modules=4,
91
- num_branches=3,
92
- block='BASIC',
93
- num_blocks=(4, 4, 4),
94
- num_channels=(32, 64, 128)),
95
- stage4=dict(
96
- num_modules=3,
97
- num_branches=4,
98
- block='BASIC',
99
- num_blocks=(4, 4, 4, 4),
100
- num_channels=(32, 64, 128, 256))),
101
- ),
102
- neck=dict(type='GlobalAveragePooling'), # 颈网络类型
103
- head=dict(
104
- type='LinearClsHead', # 分类颈网络类型
105
- # 除了 `type` 之外的所有字段都来自 `LinearClsHead` 类的 __init__ 方法
106
- # 可查阅 https://mmpretrain.readthedocs.io/zh_CN/latest/api/generated/mmpretrain.models.heads.LinearClsHead.html
107
- num_classes=7, # 分类类别数
108
- in_channels=256,
109
- loss=dict(type='CrossEntropyLoss', loss_weight=1.0), # 损失函数配置信息
110
- topk=(1, 3), # 评估指标,Top-k 准确率
111
- ))
112
-
113
- optim_wrapper = dict(
114
- accumulative_counts=8
115
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AbandonedMuse/UnlimitedMusicGen/audiocraft/models/musicgen.py DELETED
@@ -1,450 +0,0 @@
1
- # Copyright (c) Meta Platforms, Inc. and affiliates.
2
- # All rights reserved.
3
- #
4
- # This source code is licensed under the license found in the
5
- # LICENSE file in the root directory of this source tree.
6
-
7
- """
8
- Main model for using MusicGen. This will combine all the required components
9
- and provide easy access to the generation API.
10
- """
11
-
12
- import os
13
- import typing as tp
14
-
15
- import torch
16
-
17
- from .encodec import CompressionModel
18
- from .lm import LMModel
19
- from .builders import get_debug_compression_model, get_debug_lm_model
20
- from .loaders import load_compression_model, load_lm_model, HF_MODEL_CHECKPOINTS_MAP
21
- from ..data.audio_utils import convert_audio
22
- from ..modules.conditioners import ConditioningAttributes, WavCondition
23
- from ..utils.autocast import TorchAutocast
24
-
25
-
26
- MelodyList = tp.List[tp.Optional[torch.Tensor]]
27
- MelodyType = tp.Union[torch.Tensor, MelodyList]
28
-
29
-
30
- class MusicGen:
31
- """MusicGen main model with convenient generation API.
32
-
33
- Args:
34
- name (str): name of the model.
35
- compression_model (CompressionModel): Compression model
36
- used to map audio to invertible discrete representations.
37
- lm (LMModel): Language model over discrete representations.
38
- """
39
- def __init__(self, name: str, compression_model: CompressionModel, lm: LMModel, max_duration: float = 30):
40
- self.name = name
41
- self.compression_model = compression_model
42
- self.lm = lm
43
- self.max_duration = max_duration
44
- self.duration = 15.0 # default duration
45
- self.device = next(iter(lm.parameters())).device
46
- self.generation_params: dict = {}
47
- self.set_generation_params(duration=self.duration) # 15 seconds by default
48
- self._progress_callback: tp.Optional[tp.Callable[[int, int], None]] = None
49
- if self.device.type == 'cpu':
50
- self.autocast = TorchAutocast(enabled=False)
51
- else:
52
- self.autocast = TorchAutocast(
53
- enabled=True, device_type=self.device.type, dtype=torch.float16)
54
-
55
- @property
56
- def frame_rate(self) -> int:
57
- """Roughly the number of AR steps per seconds."""
58
- return self.compression_model.frame_rate
59
-
60
- @property
61
- def sample_rate(self) -> int:
62
- """Sample rate of the generated audio."""
63
- return self.compression_model.sample_rate
64
-
65
- @property
66
- def audio_channels(self) -> int:
67
- """Audio channels of the generated audio."""
68
- return self.compression_model.channels
69
-
70
- @staticmethod
71
- def get_pretrained(name: str = 'melody', device=None):
72
- """Return pretrained model, we provide four models:
73
- - small (300M), text to music, # see: https://huggingface.co/facebook/musicgen-small
74
- - medium (1.5B), text to music, # see: https://huggingface.co/facebook/musicgen-medium
75
- - melody (1.5B) text to music and text+melody to music, # see: https://huggingface.co/facebook/musicgen-melody
76
- - large (3.3B), text to music, # see: https://huggingface.co/facebook/musicgen-large
77
- """
78
-
79
- if device is None:
80
- if torch.cuda.device_count():
81
- device = 'cuda'
82
- else:
83
- device = 'cpu'
84
-
85
- if name == 'debug':
86
- # used only for unit tests
87
- compression_model = get_debug_compression_model(device)
88
- lm = get_debug_lm_model(device)
89
- return MusicGen(name, compression_model, lm)
90
-
91
- if name not in HF_MODEL_CHECKPOINTS_MAP:
92
- if not os.path.isfile(name) and not os.path.isdir(name):
93
- raise ValueError(
94
- f"{name} is not a valid checkpoint name. "
95
- f"Choose one of {', '.join(HF_MODEL_CHECKPOINTS_MAP.keys())}"
96
- )
97
-
98
- cache_dir = os.environ.get('MUSICGEN_ROOT', None)
99
- compression_model = load_compression_model(name, device=device, cache_dir=cache_dir)
100
- lm = load_lm_model(name, device=device, cache_dir=cache_dir)
101
- if name == 'melody':
102
- lm.condition_provider.conditioners['self_wav'].match_len_on_eval = True
103
-
104
- return MusicGen(name, compression_model, lm)
105
-
106
- def set_generation_params(self, use_sampling: bool = True, top_k: int = 250,
107
- top_p: float = 0.0, temperature: float = 1.0,
108
- duration: float = 30.0, cfg_coef: float = 3.0,
109
- two_step_cfg: bool = False, extend_stride: float = 18, rep_penalty: float = None):
110
- """Set the generation parameters for MusicGen.
111
-
112
- Args:
113
- use_sampling (bool, optional): Use sampling if True, else do argmax decoding. Defaults to True.
114
- top_k (int, optional): top_k used for sampling. Defaults to 250.
115
- top_p (float, optional): top_p used for sampling, when set to 0 top_k is used. Defaults to 0.0.
116
- temperature (float, optional): Softmax temperature parameter. Defaults to 1.0.
117
- duration (float, optional): Duration of the generated waveform. Defaults to 30.0.
118
- cfg_coef (float, optional): Coefficient used for classifier free guidance. Defaults to 3.0.
119
- two_step_cfg (bool, optional): If True, performs 2 forward for Classifier Free Guidance,
120
- instead of batching together the two. This has some impact on how things
121
- are padded but seems to have little impact in practice.
122
- rep_penalty (float, optional): If set, use repetition penalty during generation. Not Implemented.
123
- """
124
- assert extend_stride < self.max_duration, "Cannot stride by more than max generation duration."
125
- self.extend_stride = extend_stride
126
- self.duration = duration
127
- self.generation_params = {
128
- #'max_gen_len': int(duration * self.frame_rate),
129
- 'use_sampling': use_sampling,
130
- 'temp': temperature,
131
- 'top_k': top_k,
132
- 'top_p': top_p,
133
- 'cfg_coef': cfg_coef,
134
- 'two_step_cfg': two_step_cfg,
135
- }
136
-
137
- def set_custom_progress_callback(self, progress_callback: tp.Optional[tp.Callable[[int, int], None]] = None):
138
- """Override the default progress callback."""
139
- self._progress_callback = progress_callback
140
-
141
- def generate_unconditional(self, num_samples: int, progress: bool = False) -> torch.Tensor:
142
- """Generate samples in an unconditional manner.
143
-
144
- Args:
145
- num_samples (int): Number of samples to be generated.
146
- progress (bool, optional): Flag to display progress of the generation process. Defaults to False.
147
- """
148
- descriptions: tp.List[tp.Optional[str]] = [None] * num_samples
149
- attributes, prompt_tokens = self._prepare_tokens_and_attributes(descriptions, None)
150
- return self._generate_tokens(attributes, prompt_tokens, progress)
151
-
152
- def generate(self, descriptions: tp.List[str], progress: bool = False) -> torch.Tensor:
153
- """Generate samples conditioned on text.
154
-
155
- Args:
156
- descriptions (tp.List[str]): A list of strings used as text conditioning.
157
- progress (bool, optional): Flag to display progress of the generation process. Defaults to False.
158
- """
159
- attributes, prompt_tokens = self._prepare_tokens_and_attributes(descriptions, None)
160
- assert prompt_tokens is None
161
- return self._generate_tokens(attributes, prompt_tokens, progress)
162
-
163
- def generate_with_chroma(self, descriptions: tp.List[str], melody_wavs: MelodyType,
164
- melody_sample_rate: int, progress: bool = False) -> torch.Tensor:
165
- """Generate samples conditioned on text and melody.
166
-
167
- Args:
168
- descriptions (tp.List[str]): A list of strings used as text conditioning.
169
- melody_wavs: (torch.Tensor or list of Tensor): A batch of waveforms used as
170
- melody conditioning. Should have shape [B, C, T] with B matching the description length,
171
- C=1 or 2. It can be [C, T] if there is a single description. It can also be
172
- a list of [C, T] tensors.
173
- melody_sample_rate: (int): Sample rate of the melody waveforms.
174
- progress (bool, optional): Flag to display progress of the generation process. Defaults to False.
175
- """
176
- if isinstance(melody_wavs, torch.Tensor):
177
- if melody_wavs.dim() == 2:
178
- melody_wavs = melody_wavs[None]
179
- if melody_wavs.dim() != 3:
180
- raise ValueError("Melody wavs should have a shape [B, C, T].")
181
- melody_wavs = list(melody_wavs)
182
- else:
183
- for melody in melody_wavs:
184
- if melody is not None:
185
- assert melody.dim() == 2, "One melody in the list has the wrong number of dims."
186
-
187
- melody_wavs = [
188
- convert_audio(wav, melody_sample_rate, self.sample_rate, self.audio_channels)
189
- if wav is not None else None
190
- for wav in melody_wavs]
191
- attributes, prompt_tokens = self._prepare_tokens_and_attributes(descriptions=descriptions, prompt=None,
192
- melody_wavs=melody_wavs)
193
- assert prompt_tokens is None
194
- return self._generate_tokens(attributes, prompt_tokens, progress)
195
-
196
- def generate_with_all(self, descriptions: tp.List[str], melody_wavs: MelodyType,
197
- sample_rate: int, progress: bool = False, prompt: tp.Optional[torch.Tensor] = None) -> torch.Tensor:
198
- """Generate samples conditioned on text and melody and audio prompts.
199
- Args:
200
- descriptions (tp.List[str]): A list of strings used as text conditioning.
201
- melody_wavs: (torch.Tensor or list of Tensor): A batch of waveforms used as
202
- melody conditioning. Should have shape [B, C, T] with B matching the description length,
203
- C=1 or 2. It can be [C, T] if there is a single description. It can also be
204
- a list of [C, T] tensors.
205
- sample_rate: (int): Sample rate of the melody waveforms.
206
- progress (bool, optional): Flag to display progress of the generation process. Defaults to False.
207
- prompt (torch.Tensor): A batch of waveforms used for continuation.
208
- Prompt should be [B, C, T], or [C, T] if only one sample is generated.
209
- """
210
- if isinstance(melody_wavs, torch.Tensor):
211
- if melody_wavs.dim() == 2:
212
- melody_wavs = melody_wavs[None]
213
- if melody_wavs.dim() != 3:
214
- raise ValueError("Melody wavs should have a shape [B, C, T].")
215
- melody_wavs = list(melody_wavs)
216
- else:
217
- for melody in melody_wavs:
218
- if melody is not None:
219
- assert melody.dim() == 2, "One melody in the list has the wrong number of dims."
220
-
221
- melody_wavs = [
222
- convert_audio(wav, sample_rate, self.sample_rate, self.audio_channels)
223
- if wav is not None else None
224
- for wav in melody_wavs]
225
- #attributes, prompt_tokens = self._prepare_tokens_and_attributes(descriptions=descriptions, prompt=None,
226
- # melody_wavs=melody_wavs)
227
-
228
- if prompt is not None:
229
- if prompt.dim() == 2:
230
- prompt = prompt[None]
231
- if prompt.dim() != 3:
232
- raise ValueError("prompt should have 3 dimensions: [B, C, T] (C = 1).")
233
- prompt = convert_audio(prompt, sample_rate, self.sample_rate, self.audio_channels)
234
- if descriptions is None:
235
- descriptions = [None] * len(prompt)
236
-
237
- #if prompt is not None:
238
- # attributes_gen, prompt_tokens = self._prepare_tokens_and_attributes(descriptions, prompt)
239
-
240
- attributes, prompt_tokens = self._prepare_tokens_and_attributes(descriptions=descriptions, prompt=prompt,
241
- melody_wavs=melody_wavs)
242
- if prompt is not None:
243
- assert prompt_tokens is not None
244
- else:
245
- assert prompt_tokens is None
246
- return self._generate_tokens(attributes, prompt_tokens, progress)
247
-
248
- def generate_continuation(self, prompt: torch.Tensor, prompt_sample_rate: int,
249
- descriptions: tp.Optional[tp.List[tp.Optional[str]]] = None,
250
- progress: bool = False) -> torch.Tensor:
251
- """Generate samples conditioned on audio prompts.
252
-
253
- Args:
254
- prompt (torch.Tensor): A batch of waveforms used for continuation.
255
- Prompt should be [B, C, T], or [C, T] if only one sample is generated.
256
- prompt_sample_rate (int): Sampling rate of the given audio waveforms.
257
- descriptions (tp.List[str], optional): A list of strings used as text conditioning. Defaults to None.
258
- progress (bool, optional): Flag to display progress of the generation process. Defaults to False.
259
- """
260
- if prompt.dim() == 2:
261
- prompt = prompt[None]
262
- if prompt.dim() != 3:
263
- raise ValueError("prompt should have 3 dimensions: [B, C, T] (C = 1).")
264
- prompt = convert_audio(prompt, prompt_sample_rate, self.sample_rate, self.audio_channels)
265
- if descriptions is None:
266
- descriptions = [None] * len(prompt)
267
- attributes, prompt_tokens = self._prepare_tokens_and_attributes(descriptions, prompt)
268
- assert prompt_tokens is not None
269
- return self._generate_tokens(attributes, prompt_tokens, progress)
270
-
271
- @torch.no_grad()
272
- def _prepare_tokens_and_attributes(
273
- self,
274
- descriptions: tp.Sequence[tp.Optional[str]],
275
- prompt: tp.Optional[torch.Tensor],
276
- melody_wavs: tp.Optional[MelodyList] = None,
277
- ) -> tp.Tuple[tp.List[ConditioningAttributes], tp.Optional[torch.Tensor]]:
278
- """Prepare model inputs.
279
-
280
- Args:
281
- descriptions (tp.List[str]): A list of strings used as text conditioning.
282
- prompt (torch.Tensor): A batch of waveforms used for continuation.
283
- melody_wavs (tp.Optional[torch.Tensor], optional): A batch of waveforms
284
- used as melody conditioning. Defaults to None.
285
- """
286
- attributes = [
287
- ConditioningAttributes(text={'description': description})
288
- for description in descriptions]
289
-
290
- if melody_wavs is None:
291
- for attr in attributes:
292
- attr.wav['self_wav'] = WavCondition(
293
- torch.zeros((1, 1), device=self.device),
294
- torch.tensor([0], device=self.device),
295
- path='null_wav') # type: ignore
296
- else:
297
- if self.name != "melody":
298
- raise RuntimeError("This model doesn't support melody conditioning. "
299
- "Use the `melody` model.")
300
- assert len(melody_wavs) == len(descriptions), \
301
- f"number of melody wavs must match number of descriptions! " \
302
- f"got melody len={len(melody_wavs)}, and descriptions len={len(descriptions)}"
303
- for attr, melody in zip(attributes, melody_wavs):
304
- if melody is None:
305
- attr.wav['self_wav'] = WavCondition(
306
- torch.zeros((1, 1), device=self.device),
307
- torch.tensor([0], device=self.device),
308
- path='null_wav') # type: ignore
309
- else:
310
- attr.wav['self_wav'] = WavCondition(
311
- melody.to(device=self.device),
312
- torch.tensor([melody.shape[-1]], device=self.device))
313
-
314
- if prompt is not None:
315
- if descriptions is not None:
316
- assert len(descriptions) == len(prompt), "Prompt and nb. descriptions doesn't match"
317
- prompt = prompt.to(self.device)
318
- prompt_tokens, scale = self.compression_model.encode(prompt)
319
- assert scale is None
320
- else:
321
- prompt_tokens = None
322
- return attributes, prompt_tokens
323
-
324
- def _generate_tokens(self, attributes: tp.List[ConditioningAttributes],
325
- prompt_tokens: tp.Optional[torch.Tensor], progress: bool = False) -> torch.Tensor:
326
- """Generate discrete audio tokens given audio prompt and/or conditions.
327
-
328
- Args:
329
- attributes (tp.List[ConditioningAttributes]): Conditions used for generation (text/melody).
330
- prompt_tokens (tp.Optional[torch.Tensor]): Audio prompt used for continuation.
331
- progress (bool, optional): Flag to display progress of the generation process. Defaults to False.
332
- Returns:
333
- torch.Tensor: Generated audio, of shape [B, C, T], T is defined by the generation params.
334
- """
335
- total_gen_len = int(self.duration * self.frame_rate)
336
- max_prompt_len = int(min(self.duration, self.max_duration) * self.frame_rate)
337
- current_gen_offset: int = 0
338
-
339
- def _progress_callback(generated_tokens: int, tokens_to_generate: int):
340
- generated_tokens += current_gen_offset
341
- if self._progress_callback is not None:
342
- # Note that total_gen_len might be quite wrong depending on the
343
- # codebook pattern used, but with delay it is almost accurate.
344
- self._progress_callback(generated_tokens, total_gen_len)
345
- else:
346
- print(f'{generated_tokens: 6d} / {total_gen_len: 6d}', end='\r')
347
-
348
- if prompt_tokens is not None:
349
- assert max_prompt_len >= prompt_tokens.shape[-1], \
350
- "Prompt is longer than audio to generate"
351
-
352
- callback = None
353
- if progress:
354
- callback = _progress_callback
355
-
356
- if self.duration <= self.max_duration:
357
- # generate by sampling from LM, simple case.
358
- with self.autocast:
359
- gen_tokens = self.lm.generate(
360
- prompt_tokens, attributes,
361
- callback=callback, max_gen_len=total_gen_len, **self.generation_params)
362
-
363
- else:
364
- # now this gets a bit messier, we need to handle prompts,
365
- # melody conditioning etc.
366
- ref_wavs = [attr.wav['self_wav'] for attr in attributes]
367
- all_tokens = []
368
- if prompt_tokens is None:
369
- prompt_length = 0
370
- else:
371
- all_tokens.append(prompt_tokens)
372
- prompt_length = prompt_tokens.shape[-1]
373
-
374
- stride_tokens = int(self.frame_rate * self.extend_stride)
375
-
376
- while current_gen_offset + prompt_length < total_gen_len:
377
- time_offset = current_gen_offset / self.frame_rate
378
- chunk_duration = min(self.duration - time_offset, self.max_duration)
379
- max_gen_len = int(chunk_duration * self.frame_rate)
380
- for attr, ref_wav in zip(attributes, ref_wavs):
381
- wav_length = ref_wav.length.item()
382
- if wav_length == 0:
383
- continue
384
- # We will extend the wav periodically if it not long enough.
385
- # we have to do it here rather than in conditioners.py as otherwise
386
- # we wouldn't have the full wav.
387
- initial_position = int(time_offset * self.sample_rate)
388
- wav_target_length = int(self.max_duration * self.sample_rate)
389
- print(initial_position / self.sample_rate, wav_target_length / self.sample_rate)
390
- positions = torch.arange(initial_position,
391
- initial_position + wav_target_length, device=self.device)
392
- attr.wav['self_wav'] = WavCondition(
393
- ref_wav[0][:, positions % wav_length],
394
- torch.full_like(ref_wav[1], wav_target_length))
395
- with self.autocast:
396
- gen_tokens = self.lm.generate(
397
- prompt_tokens, attributes,
398
- callback=callback, max_gen_len=max_gen_len, **self.generation_params)
399
- if prompt_tokens is None:
400
- all_tokens.append(gen_tokens)
401
- else:
402
- all_tokens.append(gen_tokens[:, :, prompt_tokens.shape[-1]:])
403
- prompt_tokens = gen_tokens[:, :, stride_tokens:]
404
- prompt_length = prompt_tokens.shape[-1]
405
- current_gen_offset += stride_tokens
406
-
407
- gen_tokens = torch.cat(all_tokens, dim=-1)
408
-
409
- # generate audio
410
- assert gen_tokens.dim() == 3
411
- with torch.no_grad():
412
- gen_audio = self.compression_model.decode(gen_tokens, None)
413
- return gen_audio
414
-
415
- #def _generate_tokens(self, attributes: tp.List[ConditioningAttributes],
416
- # prompt_tokens: tp.Optional[torch.Tensor], progress: bool = False) -> torch.Tensor:
417
- # """Generate discrete audio tokens given audio prompt and/or conditions.
418
-
419
- # Args:
420
- # attributes (tp.List[ConditioningAttributes]): Conditions used for generation (text/melody).
421
- # prompt_tokens (tp.Optional[torch.Tensor]): Audio prompt used for continuation.
422
- # progress (bool, optional): Flag to display progress of the generation process. Defaults to False.
423
- # Returns:
424
- # torch.Tensor: Generated audio, of shape [B, C, T], T is defined by the generation params.
425
- # """
426
- # def _progress_callback(generated_tokens: int, tokens_to_generate: int):
427
- # print(f'{generated_tokens: 6d} / {tokens_to_generate: 6d}', end='\r')
428
-
429
- # if prompt_tokens is not None:
430
- # assert self.generation_params['max_gen_len'] > prompt_tokens.shape[-1], \
431
- # "Prompt is longer than audio to generate"
432
-
433
- # callback = None
434
- # if progress:
435
- # callback = _progress_callback
436
-
437
- # # generate by sampling from LM
438
- # with self.autocast:
439
- # gen_tokens = self.lm.generate(prompt_tokens, attributes, callback=callback, **self.generation_params)
440
-
441
- # # generate audio
442
- # assert gen_tokens.dim() == 3
443
- # with torch.no_grad():
444
- # gen_audio = self.compression_model.decode(gen_tokens, None)
445
- # return gen_audio
446
-
447
- def to(self, device: str):
448
- self.compression_model.to(device)
449
- self.lm.to(device)
450
- return self
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AchyuthGamer/OpenGPT-Chat-UI/src/lib/types/Timestamps.ts DELETED
@@ -1,4 +0,0 @@
1
- export interface Timestamps {
2
- createdAt: Date;
3
- updatedAt: Date;
4
- }
 
 
 
 
 
spaces/Adapter/T2I-Adapter/ldm/modules/extra_condition/openpose/api.py DELETED
@@ -1,35 +0,0 @@
1
- import numpy as np
2
- import os
3
- import torch.nn as nn
4
-
5
- os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE"
6
-
7
- import cv2
8
- import torch
9
-
10
- from . import util
11
- from .body import Body
12
-
13
- remote_model_path = "https://huggingface.co/TencentARC/T2I-Adapter/blob/main/third-party-models/body_pose_model.pth"
14
-
15
-
16
- class OpenposeInference(nn.Module):
17
-
18
- def __init__(self):
19
- super().__init__()
20
- body_modelpath = os.path.join('models', "body_pose_model.pth")
21
-
22
- if not os.path.exists(body_modelpath):
23
- from basicsr.utils.download_util import load_file_from_url
24
- load_file_from_url(remote_model_path, model_dir='models')
25
-
26
- self.body_estimation = Body(body_modelpath)
27
-
28
- def forward(self, x):
29
- x = x[:, :, ::-1].copy()
30
- with torch.no_grad():
31
- candidate, subset = self.body_estimation(x)
32
- canvas = np.zeros_like(x)
33
- canvas = util.draw_bodypose(canvas, candidate, subset)
34
- canvas = cv2.cvtColor(canvas, cv2.COLOR_RGB2BGR)
35
- return canvas
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/fade/Fade.js DELETED
@@ -1,5 +0,0 @@
1
- import Fade from '../../../plugins/fade.js';
2
- import FadeIn from '../../../plugins/fade-in.js';
3
- import FadeOutDestroy from '../../../plugins/fade-out-destroy.js';
4
-
5
- export { Fade, FadeIn, FadeOutDestroy };
 
 
 
 
 
 
spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/gridbuttons/GridButtons.js DELETED
@@ -1,124 +0,0 @@
1
- import GridSizer from '../gridsizer/GridSizer.js';
2
- import AddChildMethods from './AddChildMethods.js';
3
- import RemoveChildMethods from './RemoveChildMethods.js';
4
- import ButtonGroup from '../utils/buttongroup/ButtonGroup.js';
5
- import ButtonMethods from '../utils/buttongroup/ButtonMethods.js';
6
- import ButtonStateMethods from '../utils/buttongroup/ButtonStateMethods.js';
7
-
8
- const GetValue = Phaser.Utils.Objects.GetValue;
9
-
10
- class GridButtons extends GridSizer {
11
- constructor(scene, config) {
12
- if (config === undefined) {
13
- config = {};
14
- }
15
- var rowCount = GetValue(config, 'row', 0);
16
- var columnCount = GetValue(config, 'column', (config.col || 0));
17
- var createCellContainerCallback = GetValue(config, 'createCellContainerCallback');
18
- var buttons = GetValue(config, 'buttons', undefined);
19
- var buttonsExpand = GetValue(config, 'expand', true);
20
- var buttonProportion = (buttonsExpand) ? 1 : 0;
21
-
22
- if (createCellContainerCallback) {
23
- config.createCellContainerCallback = undefined;
24
- }
25
- if (buttons !== undefined) {
26
- rowCount = Math.max(rowCount, buttons.length);
27
- for (var i = 0, cnt = buttons.length; i < cnt; i++) {
28
- columnCount = Math.max(columnCount, buttons[i].length);
29
- }
30
- }
31
-
32
- config.row = rowCount;
33
- config.column = columnCount;
34
- config.columnProportions = buttonProportion;
35
- config.rowProportions = buttonProportion;
36
-
37
- // Create
38
- super(scene, config);
39
- this.type = 'rexGridButtons';
40
- this.buttonGroup = new ButtonGroup({
41
- parent: this,
42
- eventEmitter: GetValue(config, 'eventEmitter', this),
43
- groupName: GetValue(config, 'groupName', undefined),
44
- clickConfig: GetValue(config, 'click', undefined)
45
- })
46
- .setButtonsType(config);
47
-
48
- // Add elements
49
- var background = GetValue(config, 'background', undefined);
50
-
51
- // Buttons properties
52
- this.buttonsExpand = buttonsExpand;
53
- var space = GetValue(config, 'space', undefined);
54
- if (typeof (space) === 'number') {
55
- space = { itemX: space, itemY: space };
56
- }
57
-
58
- if (background) {
59
- this.addBackground(background);
60
- }
61
-
62
- if (buttons) {
63
- var rowButtons, button;
64
- for (var r = 0, rcnt = buttons.length; r < rcnt; r++) { // row
65
- rowButtons = buttons[r];
66
- for (var c = 0, ccnt = rowButtons.length; c < ccnt; c++) { // col
67
- button = rowButtons[c];
68
- if (button) {
69
- this.addButton(button, c, r);
70
- }
71
- }
72
- }
73
- } else if (createCellContainerCallback) {
74
- for (var y = 0; y < rowCount; y++) {
75
- for (var x = 0; x < columnCount; x++) {
76
- var button = createCellContainerCallback(scene, x, y);
77
- if (button) {
78
- this.addButton(button, x, y);
79
- }
80
- }
81
- }
82
- }
83
-
84
- this.addChildrenMap('background', background);
85
- this.addChildrenMap('buttons', this.buttonGroup.buttons);
86
- }
87
-
88
- destroy(fromScene) {
89
- // This Game Object has already been destroyed
90
- if (!this.scene || this.ignoreDestroy) {
91
- return;
92
- }
93
-
94
- super.destroy(fromScene);
95
- this.buttonGroup.destroy();
96
- this.buttonGroup = undefined;
97
- }
98
-
99
- get buttons() {
100
- return this.buttonGroup.buttons;
101
- }
102
-
103
- get groupName() {
104
- return this.buttonGroup.groupName;
105
- }
106
-
107
- set groupName(value) {
108
- this.buttonGroup.groupName = value;
109
- }
110
-
111
- get eventEmitter() {
112
- return this.buttonGroup.eventEmitter;
113
- }
114
- }
115
-
116
- Object.assign(
117
- GridButtons.prototype,
118
- AddChildMethods,
119
- RemoveChildMethods,
120
- ButtonMethods,
121
- ButtonStateMethods
122
- );
123
-
124
- export default GridButtons;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Aleistair/anything5/app.py DELETED
@@ -1,8 +0,0 @@
1
- import gradio as gr
2
-
3
- description = """<div>
4
- <img src="https://i.imgur.com/FEA7N1p.png">
5
- </div>
6
- """
7
-
8
- gr.Interface.load("models/Linaqruf/anything-v3.0", description=description).launch()
 
 
 
 
 
 
 
 
 
spaces/AlexN/pull_up/app.py DELETED
@@ -1,45 +0,0 @@
1
- import torch
2
- import torchvision
3
- import TractionModel as plup
4
- import gradio as gr
5
-
6
-
7
- def init_model(path):
8
- model = plup.create_model()
9
- model = plup.load_weights(model, path)
10
- model.eval()
11
- return model
12
-
13
-
14
- def inference(image):
15
- image = vanilla_transform(image).to(device).unsqueeze(0)
16
- with torch.no_grad():
17
- pred = model(image)
18
- res = float(torch.sigmoid(pred[1].to("cpu")).numpy()[0])
19
- return {'pull-up': res, 'no pull-up': 1 - res}
20
-
21
-
22
- norm_mean = [0.485, 0.456, 0.406]
23
- norm_std = [0.229, 0.224, 0.225]
24
- vanilla_transform = torchvision.transforms.Compose([
25
- torchvision.transforms.Resize(224),
26
- torchvision.transforms.ToTensor(),
27
- torchvision.transforms.Normalize(norm_mean, norm_std)])
28
-
29
- model = init_model("model-score0.96-f1_10.9-f1_20.99.pt")
30
- if torch.cuda.is_available():
31
- device = torch.device("cuda")
32
- else:
33
- device = torch.device("cpu")
34
- model = model.to(device)
35
-
36
-
37
- examples = [['tibo.png'], ['tibo2.png'], ['real_pull_up.png'], ['no_pull_up.png'], ['doge.jpg']]
38
- iface = gr.Interface(inference, live=True, inputs=gr.inputs.Image(source="upload", type='pil'),
39
- outputs=gr.outputs.Label(),
40
- examples=examples,
41
- enable_queue=True)
42
-
43
- iface.test_launch()
44
- if __name__ == "__main__":
45
- iface.launch(share=True, enable_queue=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AlexWang/lama/models/ade20k/segm_lib/utils/data/sampler.py DELETED
@@ -1,131 +0,0 @@
1
- import torch
2
-
3
-
4
- class Sampler(object):
5
- """Base class for all Samplers.
6
-
7
- Every Sampler subclass has to provide an __iter__ method, providing a way
8
- to iterate over indices of dataset elements, and a __len__ method that
9
- returns the length of the returned iterators.
10
- """
11
-
12
- def __init__(self, data_source):
13
- pass
14
-
15
- def __iter__(self):
16
- raise NotImplementedError
17
-
18
- def __len__(self):
19
- raise NotImplementedError
20
-
21
-
22
- class SequentialSampler(Sampler):
23
- """Samples elements sequentially, always in the same order.
24
-
25
- Arguments:
26
- data_source (Dataset): dataset to sample from
27
- """
28
-
29
- def __init__(self, data_source):
30
- self.data_source = data_source
31
-
32
- def __iter__(self):
33
- return iter(range(len(self.data_source)))
34
-
35
- def __len__(self):
36
- return len(self.data_source)
37
-
38
-
39
- class RandomSampler(Sampler):
40
- """Samples elements randomly, without replacement.
41
-
42
- Arguments:
43
- data_source (Dataset): dataset to sample from
44
- """
45
-
46
- def __init__(self, data_source):
47
- self.data_source = data_source
48
-
49
- def __iter__(self):
50
- return iter(torch.randperm(len(self.data_source)).long())
51
-
52
- def __len__(self):
53
- return len(self.data_source)
54
-
55
-
56
- class SubsetRandomSampler(Sampler):
57
- """Samples elements randomly from a given list of indices, without replacement.
58
-
59
- Arguments:
60
- indices (list): a list of indices
61
- """
62
-
63
- def __init__(self, indices):
64
- self.indices = indices
65
-
66
- def __iter__(self):
67
- return (self.indices[i] for i in torch.randperm(len(self.indices)))
68
-
69
- def __len__(self):
70
- return len(self.indices)
71
-
72
-
73
- class WeightedRandomSampler(Sampler):
74
- """Samples elements from [0,..,len(weights)-1] with given probabilities (weights).
75
-
76
- Arguments:
77
- weights (list) : a list of weights, not necessary summing up to one
78
- num_samples (int): number of samples to draw
79
- replacement (bool): if ``True``, samples are drawn with replacement.
80
- If not, they are drawn without replacement, which means that when a
81
- sample index is drawn for a row, it cannot be drawn again for that row.
82
- """
83
-
84
- def __init__(self, weights, num_samples, replacement=True):
85
- self.weights = torch.DoubleTensor(weights)
86
- self.num_samples = num_samples
87
- self.replacement = replacement
88
-
89
- def __iter__(self):
90
- return iter(torch.multinomial(self.weights, self.num_samples, self.replacement))
91
-
92
- def __len__(self):
93
- return self.num_samples
94
-
95
-
96
- class BatchSampler(object):
97
- """Wraps another sampler to yield a mini-batch of indices.
98
-
99
- Args:
100
- sampler (Sampler): Base sampler.
101
- batch_size (int): Size of mini-batch.
102
- drop_last (bool): If ``True``, the sampler will drop the last batch if
103
- its size would be less than ``batch_size``
104
-
105
- Example:
106
- >>> list(BatchSampler(range(10), batch_size=3, drop_last=False))
107
- [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9]]
108
- >>> list(BatchSampler(range(10), batch_size=3, drop_last=True))
109
- [[0, 1, 2], [3, 4, 5], [6, 7, 8]]
110
- """
111
-
112
- def __init__(self, sampler, batch_size, drop_last):
113
- self.sampler = sampler
114
- self.batch_size = batch_size
115
- self.drop_last = drop_last
116
-
117
- def __iter__(self):
118
- batch = []
119
- for idx in self.sampler:
120
- batch.append(idx)
121
- if len(batch) == self.batch_size:
122
- yield batch
123
- batch = []
124
- if len(batch) > 0 and not self.drop_last:
125
- yield batch
126
-
127
- def __len__(self):
128
- if self.drop_last:
129
- return len(self.sampler) // self.batch_size
130
- else:
131
- return (len(self.sampler) + self.batch_size - 1) // self.batch_size
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/docs/source/en/api/pipelines/stable_unclip.md DELETED
@@ -1,125 +0,0 @@
1
- <!--Copyright 2023 The HuggingFace Team. All rights reserved.
2
-
3
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
4
- the License. You may obtain a copy of the License at
5
-
6
- http://www.apache.org/licenses/LICENSE-2.0
7
-
8
- Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
9
- an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
- specific language governing permissions and limitations under the License.
11
- -->
12
-
13
- # Stable unCLIP
14
-
15
- Stable unCLIP checkpoints are finetuned from [Stable Diffusion 2.1](./stable_diffusion/stable_diffusion_2) checkpoints to condition on CLIP image embeddings.
16
- Stable unCLIP still conditions on text embeddings. Given the two separate conditionings, stable unCLIP can be used
17
- for text guided image variation. When combined with an unCLIP prior, it can also be used for full text to image generation.
18
-
19
- The abstract from the paper is:
20
-
21
- *Contrastive models like CLIP have been shown to learn robust representations of images that capture both semantics and style. To leverage these representations for image generation, we propose a two-stage model: a prior that generates a CLIP image embedding given a text caption, and a decoder that generates an image conditioned on the image embedding. We show that explicitly generating image representations improves image diversity with minimal loss in photorealism and caption similarity. Our decoders conditioned on image representations can also produce variations of an image that preserve both its semantics and style, while varying the non-essential details absent from the image representation. Moreover, the joint embedding space of CLIP enables language-guided image manipulations in a zero-shot fashion. We use diffusion models for the decoder and experiment with both autoregressive and diffusion models for the prior, finding that the latter are computationally more efficient and produce higher-quality samples.*
22
-
23
- ## Tips
24
-
25
- Stable unCLIP takes `noise_level` as input during inference which determines how much noise is added
26
- to the image embeddings. A higher `noise_level` increases variation in the final un-noised images. By default,
27
- we do not add any additional noise to the image embeddings (`noise_level = 0`).
28
-
29
- ### Text-to-Image Generation
30
- Stable unCLIP can be leveraged for text-to-image generation by pipelining it with the prior model of KakaoBrain's open source DALL-E 2 replication [Karlo](https://huggingface.co/kakaobrain/karlo-v1-alpha)
31
-
32
- ```python
33
- import torch
34
- from diffusers import UnCLIPScheduler, DDPMScheduler, StableUnCLIPPipeline
35
- from diffusers.models import PriorTransformer
36
- from transformers import CLIPTokenizer, CLIPTextModelWithProjection
37
-
38
- prior_model_id = "kakaobrain/karlo-v1-alpha"
39
- data_type = torch.float16
40
- prior = PriorTransformer.from_pretrained(prior_model_id, subfolder="prior", torch_dtype=data_type)
41
-
42
- prior_text_model_id = "openai/clip-vit-large-patch14"
43
- prior_tokenizer = CLIPTokenizer.from_pretrained(prior_text_model_id)
44
- prior_text_model = CLIPTextModelWithProjection.from_pretrained(prior_text_model_id, torch_dtype=data_type)
45
- prior_scheduler = UnCLIPScheduler.from_pretrained(prior_model_id, subfolder="prior_scheduler")
46
- prior_scheduler = DDPMScheduler.from_config(prior_scheduler.config)
47
-
48
- stable_unclip_model_id = "stabilityai/stable-diffusion-2-1-unclip-small"
49
-
50
- pipe = StableUnCLIPPipeline.from_pretrained(
51
- stable_unclip_model_id,
52
- torch_dtype=data_type,
53
- variant="fp16",
54
- prior_tokenizer=prior_tokenizer,
55
- prior_text_encoder=prior_text_model,
56
- prior=prior,
57
- prior_scheduler=prior_scheduler,
58
- )
59
-
60
- pipe = pipe.to("cuda")
61
- wave_prompt = "dramatic wave, the Oceans roar, Strong wave spiral across the oceans as the waves unfurl into roaring crests; perfect wave form; perfect wave shape; dramatic wave shape; wave shape unbelievable; wave; wave shape spectacular"
62
-
63
- images = pipe(prompt=wave_prompt).images
64
- images[0].save("waves.png")
65
- ```
66
- <Tip warning={true}>
67
-
68
- For text-to-image we use `stabilityai/stable-diffusion-2-1-unclip-small` as it was trained on CLIP ViT-L/14 embedding, the same as the Karlo model prior. [stabilityai/stable-diffusion-2-1-unclip](https://hf.co/stabilityai/stable-diffusion-2-1-unclip) was trained on OpenCLIP ViT-H, so we don't recommend its use.
69
-
70
- </Tip>
71
-
72
- ### Text guided Image-to-Image Variation
73
-
74
- ```python
75
- from diffusers import StableUnCLIPImg2ImgPipeline
76
- from diffusers.utils import load_image
77
- import torch
78
-
79
- pipe = StableUnCLIPImg2ImgPipeline.from_pretrained(
80
- "stabilityai/stable-diffusion-2-1-unclip", torch_dtype=torch.float16, variation="fp16"
81
- )
82
- pipe = pipe.to("cuda")
83
-
84
- url = "https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/stable_unclip/tarsila_do_amaral.png"
85
- init_image = load_image(url)
86
-
87
- images = pipe(init_image).images
88
- images[0].save("variation_image.png")
89
- ```
90
-
91
- Optionally, you can also pass a prompt to `pipe` such as:
92
-
93
- ```python
94
- prompt = "A fantasy landscape, trending on artstation"
95
-
96
- images = pipe(init_image, prompt=prompt).images
97
- images[0].save("variation_image_two.png")
98
- ```
99
- ## StableUnCLIPPipeline
100
-
101
- [[autodoc]] StableUnCLIPPipeline
102
- - all
103
- - __call__
104
- - enable_attention_slicing
105
- - disable_attention_slicing
106
- - enable_vae_slicing
107
- - disable_vae_slicing
108
- - enable_xformers_memory_efficient_attention
109
- - disable_xformers_memory_efficient_attention
110
-
111
-
112
- ## StableUnCLIPImg2ImgPipeline
113
-
114
- [[autodoc]] StableUnCLIPImg2ImgPipeline
115
- - all
116
- - __call__
117
- - enable_attention_slicing
118
- - disable_attention_slicing
119
- - enable_vae_slicing
120
- - disable_vae_slicing
121
- - enable_xformers_memory_efficient_attention
122
- - disable_xformers_memory_efficient_attention
123
-
124
- ## ImagePipelineOutput
125
- [[autodoc]] pipelines.ImagePipelineOutput
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/tests/pipelines/unidiffuser/__init__.py DELETED
File without changes
spaces/Andy1621/uniformer_image_segmentation/configs/nonlocal_net/nonlocal_r101-d8_512x512_80k_ade20k.py DELETED
@@ -1,2 +0,0 @@
1
- _base_ = './nonlocal_r50-d8_512x512_80k_ade20k.py'
2
- model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101))
 
 
 
spaces/Andy1621/uniformer_image_segmentation/configs/pspnet/pspnet_r50b-d8_769x769_80k_cityscapes.py DELETED
@@ -1,2 +0,0 @@
1
- _base_ = './pspnet_r50-d8_769x769_80k_cityscapes.py'
2
- model = dict(pretrained='torchvision://resnet50', backbone=dict(type='ResNet'))
 
 
 
spaces/AnnaPalatkina/fine_grained_SA/README.md DELETED
@@ -1,24 +0,0 @@
1
- ---
2
- title: Norec Norbert2 TEST
3
- emoji: 🏃
4
- colorFrom: indigo
5
- colorTo: indigo
6
- sdk: gradio
7
- sdk_version: 3.13.0
8
- app_file: app.py
9
- pinned: false
10
- ---
11
- <br>
12
- <br>
13
-
14
- This space provides a gradio demo and an easy-to-run wrapper of the pre-trained model for fine-grained sentiment analysis in Norwegian language, pre-trained on the [NoReC dataset](https://github.com/ltgoslo/norec).
15
-
16
- Information about project you an fine on the website of [University of Oslo](https://www.mn.uio.no/ifi/english/research/projects/sant/)
17
-
18
- The model can be easily used for predicting sentiment as follows:
19
- ```python
20
- >>> from sentiment_wrapper import PredictionModel
21
- >>> model = PredictionModel()
22
- >>> model.predict(['vi liker svart kaffe', 'jeg elsker virkelig røde roser!'])
23
- [5,5]
24
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Aristore/Warp/app.py DELETED
@@ -1,91 +0,0 @@
1
- import urllib.request
2
- from json import dumps
3
- from datetime import datetime
4
- from random import choice
5
- from string import ascii_letters,digits
6
- from time import sleep
7
- import gradio as gr
8
-
9
- demo = gr.Blocks()
10
-
11
-
12
- def genString(stringLength):
13
- try:
14
- letters = ascii_letters + digits
15
- return ''.join(choice(letters) for i in range(stringLength))
16
- except Exception as error:
17
- print(error)
18
-
19
- def digitString(stringLength):
20
- try:
21
- digit = digits
22
- return ''.join((choice(digit) for i in range(stringLength)))
23
- except Exception as error:
24
- print(error)
25
- url = f'https://api.cloudflareclient.com/v0a{digitString(3)}/reg'
26
-
27
- def task(ID):
28
- try:
29
- install_id = genString(22)
30
- body = {"key": "{}=".format(genString(43)),
31
- "install_id": install_id,
32
- "fcm_token": "{}:APA91b{}".format(install_id, genString(134)),
33
- "referrer": ID,
34
- "warp_enabled": False,
35
- "tos": datetime.now().isoformat()[:-3] + "+02:00",
36
- "type": "Android",
37
- "locale": "es_ES"}
38
- data = dumps(body).encode('utf8')
39
- headers = {'Content-Type': 'application/json; charset=UTF-8',
40
- 'Host': 'api.cloudflareclient.com',
41
- 'Connection': 'Keep-Alive',
42
- 'Accept-Encoding': 'gzip',
43
- 'User-Agent': 'okhttp/3.12.1'
44
- }
45
- req = urllib.request.Request(url, data, headers)
46
- response = urllib.request.urlopen(req)
47
- status_code = response.getcode()
48
- return status_code
49
- except Exception as error:
50
- print(error)
51
-
52
- def run(ID,times):
53
- g = 0
54
- b = 0
55
-
56
- for i in range (0,int(times)):
57
- result = task(ID)
58
- if result == 200:
59
- g = g + 1
60
- else:
61
- b = b + 1
62
- sleep(2)
63
-
64
- return (f"您的ID: {ID}\n{g} GB 已成功添加到您的账号.\n成功{g}个 | 失败{b}个")
65
-
66
- with demo:
67
- gr.Markdown("""
68
- # Warp+ 流量获取工具
69
- ```
70
- ___ _ __ \n / _ | ____ (_)___ / /_ ___ ____ ___ \n / __ | / __// /(_-</ __// _ \ / __// -_)\n /_/ |_|/_/ /_//___/\__/ \___//_/ \__/ \n
71
-
72
- 本程序由 Aristore 制作,转载请说明出处,有问题欢迎私信我
73
- bilibil:https://space.bilibili.com/283733002
74
- github:https://github.com/aristorechina/
75
-
76
- 注意:流量可多次获取,但每次获取输入的数字不能过大,每获取 1 GB 会间隔 2 秒
77
- ```
78
- """)
79
- with gr.Tabs():
80
- with gr.TabItem("获取流量"):
81
- with gr.Row():
82
- with gr.Column():
83
- ID = gr.Textbox(label="ID")
84
- flow = gr.Number(minimum=1,value=1,label="需要获取的流量数(单位:GB)")
85
- with gr.Column():
86
- output = gr.Textbox(label="输出")
87
- get_flow = gr.Button("获取流量")
88
-
89
- get_flow.click(run, inputs=[ID,flow], outputs=output)
90
-
91
- demo.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/rich/progress.py DELETED
@@ -1,1702 +0,0 @@
1
- import io
2
- import sys
3
- import typing
4
- import warnings
5
- from abc import ABC, abstractmethod
6
- from collections import deque
7
- from dataclasses import dataclass, field
8
- from datetime import timedelta
9
- from io import RawIOBase, UnsupportedOperation
10
- from math import ceil
11
- from mmap import mmap
12
- from operator import length_hint
13
- from os import PathLike, stat
14
- from threading import Event, RLock, Thread
15
- from types import TracebackType
16
- from typing import (
17
- Any,
18
- BinaryIO,
19
- Callable,
20
- ContextManager,
21
- Deque,
22
- Dict,
23
- Generic,
24
- Iterable,
25
- List,
26
- NamedTuple,
27
- NewType,
28
- Optional,
29
- Sequence,
30
- TextIO,
31
- Tuple,
32
- Type,
33
- TypeVar,
34
- Union,
35
- )
36
-
37
- if sys.version_info >= (3, 8):
38
- from typing import Literal
39
- else:
40
- from pip._vendor.typing_extensions import Literal # pragma: no cover
41
-
42
- from . import filesize, get_console
43
- from .console import Console, Group, JustifyMethod, RenderableType
44
- from .highlighter import Highlighter
45
- from .jupyter import JupyterMixin
46
- from .live import Live
47
- from .progress_bar import ProgressBar
48
- from .spinner import Spinner
49
- from .style import StyleType
50
- from .table import Column, Table
51
- from .text import Text, TextType
52
-
53
- TaskID = NewType("TaskID", int)
54
-
55
- ProgressType = TypeVar("ProgressType")
56
-
57
- GetTimeCallable = Callable[[], float]
58
-
59
-
60
- _I = typing.TypeVar("_I", TextIO, BinaryIO)
61
-
62
-
63
- class _TrackThread(Thread):
64
- """A thread to periodically update progress."""
65
-
66
- def __init__(self, progress: "Progress", task_id: "TaskID", update_period: float):
67
- self.progress = progress
68
- self.task_id = task_id
69
- self.update_period = update_period
70
- self.done = Event()
71
-
72
- self.completed = 0
73
- super().__init__()
74
-
75
- def run(self) -> None:
76
- task_id = self.task_id
77
- advance = self.progress.advance
78
- update_period = self.update_period
79
- last_completed = 0
80
- wait = self.done.wait
81
- while not wait(update_period):
82
- completed = self.completed
83
- if last_completed != completed:
84
- advance(task_id, completed - last_completed)
85
- last_completed = completed
86
-
87
- self.progress.update(self.task_id, completed=self.completed, refresh=True)
88
-
89
- def __enter__(self) -> "_TrackThread":
90
- self.start()
91
- return self
92
-
93
- def __exit__(
94
- self,
95
- exc_type: Optional[Type[BaseException]],
96
- exc_val: Optional[BaseException],
97
- exc_tb: Optional[TracebackType],
98
- ) -> None:
99
- self.done.set()
100
- self.join()
101
-
102
-
103
- def track(
104
- sequence: Union[Sequence[ProgressType], Iterable[ProgressType]],
105
- description: str = "Working...",
106
- total: Optional[float] = None,
107
- auto_refresh: bool = True,
108
- console: Optional[Console] = None,
109
- transient: bool = False,
110
- get_time: Optional[Callable[[], float]] = None,
111
- refresh_per_second: float = 10,
112
- style: StyleType = "bar.back",
113
- complete_style: StyleType = "bar.complete",
114
- finished_style: StyleType = "bar.finished",
115
- pulse_style: StyleType = "bar.pulse",
116
- update_period: float = 0.1,
117
- disable: bool = False,
118
- show_speed: bool = True,
119
- ) -> Iterable[ProgressType]:
120
- """Track progress by iterating over a sequence.
121
-
122
- Args:
123
- sequence (Iterable[ProgressType]): A sequence (must support "len") you wish to iterate over.
124
- description (str, optional): Description of task show next to progress bar. Defaults to "Working".
125
- total: (float, optional): Total number of steps. Default is len(sequence).
126
- auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True.
127
- transient: (bool, optional): Clear the progress on exit. Defaults to False.
128
- console (Console, optional): Console to write to. Default creates internal Console instance.
129
- refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10.
130
- style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
131
- complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
132
- finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
133
- pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
134
- update_period (float, optional): Minimum time (in seconds) between calls to update(). Defaults to 0.1.
135
- disable (bool, optional): Disable display of progress.
136
- show_speed (bool, optional): Show speed if total isn't known. Defaults to True.
137
- Returns:
138
- Iterable[ProgressType]: An iterable of the values in the sequence.
139
-
140
- """
141
-
142
- columns: List["ProgressColumn"] = (
143
- [TextColumn("[progress.description]{task.description}")] if description else []
144
- )
145
- columns.extend(
146
- (
147
- BarColumn(
148
- style=style,
149
- complete_style=complete_style,
150
- finished_style=finished_style,
151
- pulse_style=pulse_style,
152
- ),
153
- TaskProgressColumn(show_speed=show_speed),
154
- TimeRemainingColumn(elapsed_when_finished=True),
155
- )
156
- )
157
- progress = Progress(
158
- *columns,
159
- auto_refresh=auto_refresh,
160
- console=console,
161
- transient=transient,
162
- get_time=get_time,
163
- refresh_per_second=refresh_per_second or 10,
164
- disable=disable,
165
- )
166
-
167
- with progress:
168
- yield from progress.track(
169
- sequence, total=total, description=description, update_period=update_period
170
- )
171
-
172
-
173
- class _Reader(RawIOBase, BinaryIO):
174
- """A reader that tracks progress while it's being read from."""
175
-
176
- def __init__(
177
- self,
178
- handle: BinaryIO,
179
- progress: "Progress",
180
- task: TaskID,
181
- close_handle: bool = True,
182
- ) -> None:
183
- self.handle = handle
184
- self.progress = progress
185
- self.task = task
186
- self.close_handle = close_handle
187
- self._closed = False
188
-
189
- def __enter__(self) -> "_Reader":
190
- self.handle.__enter__()
191
- return self
192
-
193
- def __exit__(
194
- self,
195
- exc_type: Optional[Type[BaseException]],
196
- exc_val: Optional[BaseException],
197
- exc_tb: Optional[TracebackType],
198
- ) -> None:
199
- self.close()
200
-
201
- def __iter__(self) -> BinaryIO:
202
- return self
203
-
204
- def __next__(self) -> bytes:
205
- line = next(self.handle)
206
- self.progress.advance(self.task, advance=len(line))
207
- return line
208
-
209
- @property
210
- def closed(self) -> bool:
211
- return self._closed
212
-
213
- def fileno(self) -> int:
214
- return self.handle.fileno()
215
-
216
- def isatty(self) -> bool:
217
- return self.handle.isatty()
218
-
219
- @property
220
- def mode(self) -> str:
221
- return self.handle.mode
222
-
223
- @property
224
- def name(self) -> str:
225
- return self.handle.name
226
-
227
- def readable(self) -> bool:
228
- return self.handle.readable()
229
-
230
- def seekable(self) -> bool:
231
- return self.handle.seekable()
232
-
233
- def writable(self) -> bool:
234
- return False
235
-
236
- def read(self, size: int = -1) -> bytes:
237
- block = self.handle.read(size)
238
- self.progress.advance(self.task, advance=len(block))
239
- return block
240
-
241
- def readinto(self, b: Union[bytearray, memoryview, mmap]): # type: ignore[no-untyped-def, override]
242
- n = self.handle.readinto(b) # type: ignore[attr-defined]
243
- self.progress.advance(self.task, advance=n)
244
- return n
245
-
246
- def readline(self, size: int = -1) -> bytes: # type: ignore[override]
247
- line = self.handle.readline(size)
248
- self.progress.advance(self.task, advance=len(line))
249
- return line
250
-
251
- def readlines(self, hint: int = -1) -> List[bytes]:
252
- lines = self.handle.readlines(hint)
253
- self.progress.advance(self.task, advance=sum(map(len, lines)))
254
- return lines
255
-
256
- def close(self) -> None:
257
- if self.close_handle:
258
- self.handle.close()
259
- self._closed = True
260
-
261
- def seek(self, offset: int, whence: int = 0) -> int:
262
- pos = self.handle.seek(offset, whence)
263
- self.progress.update(self.task, completed=pos)
264
- return pos
265
-
266
- def tell(self) -> int:
267
- return self.handle.tell()
268
-
269
- def write(self, s: Any) -> int:
270
- raise UnsupportedOperation("write")
271
-
272
-
273
- class _ReadContext(ContextManager[_I], Generic[_I]):
274
- """A utility class to handle a context for both a reader and a progress."""
275
-
276
- def __init__(self, progress: "Progress", reader: _I) -> None:
277
- self.progress = progress
278
- self.reader: _I = reader
279
-
280
- def __enter__(self) -> _I:
281
- self.progress.start()
282
- return self.reader.__enter__()
283
-
284
- def __exit__(
285
- self,
286
- exc_type: Optional[Type[BaseException]],
287
- exc_val: Optional[BaseException],
288
- exc_tb: Optional[TracebackType],
289
- ) -> None:
290
- self.progress.stop()
291
- self.reader.__exit__(exc_type, exc_val, exc_tb)
292
-
293
-
294
- def wrap_file(
295
- file: BinaryIO,
296
- total: int,
297
- *,
298
- description: str = "Reading...",
299
- auto_refresh: bool = True,
300
- console: Optional[Console] = None,
301
- transient: bool = False,
302
- get_time: Optional[Callable[[], float]] = None,
303
- refresh_per_second: float = 10,
304
- style: StyleType = "bar.back",
305
- complete_style: StyleType = "bar.complete",
306
- finished_style: StyleType = "bar.finished",
307
- pulse_style: StyleType = "bar.pulse",
308
- disable: bool = False,
309
- ) -> ContextManager[BinaryIO]:
310
- """Read bytes from a file while tracking progress.
311
-
312
- Args:
313
- file (Union[str, PathLike[str], BinaryIO]): The path to the file to read, or a file-like object in binary mode.
314
- total (int): Total number of bytes to read.
315
- description (str, optional): Description of task show next to progress bar. Defaults to "Reading".
316
- auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True.
317
- transient: (bool, optional): Clear the progress on exit. Defaults to False.
318
- console (Console, optional): Console to write to. Default creates internal Console instance.
319
- refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10.
320
- style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
321
- complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
322
- finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
323
- pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
324
- disable (bool, optional): Disable display of progress.
325
- Returns:
326
- ContextManager[BinaryIO]: A context manager yielding a progress reader.
327
-
328
- """
329
-
330
- columns: List["ProgressColumn"] = (
331
- [TextColumn("[progress.description]{task.description}")] if description else []
332
- )
333
- columns.extend(
334
- (
335
- BarColumn(
336
- style=style,
337
- complete_style=complete_style,
338
- finished_style=finished_style,
339
- pulse_style=pulse_style,
340
- ),
341
- DownloadColumn(),
342
- TimeRemainingColumn(),
343
- )
344
- )
345
- progress = Progress(
346
- *columns,
347
- auto_refresh=auto_refresh,
348
- console=console,
349
- transient=transient,
350
- get_time=get_time,
351
- refresh_per_second=refresh_per_second or 10,
352
- disable=disable,
353
- )
354
-
355
- reader = progress.wrap_file(file, total=total, description=description)
356
- return _ReadContext(progress, reader)
357
-
358
-
359
- @typing.overload
360
- def open(
361
- file: Union[str, "PathLike[str]", bytes],
362
- mode: Union[Literal["rt"], Literal["r"]],
363
- buffering: int = -1,
364
- encoding: Optional[str] = None,
365
- errors: Optional[str] = None,
366
- newline: Optional[str] = None,
367
- *,
368
- total: Optional[int] = None,
369
- description: str = "Reading...",
370
- auto_refresh: bool = True,
371
- console: Optional[Console] = None,
372
- transient: bool = False,
373
- get_time: Optional[Callable[[], float]] = None,
374
- refresh_per_second: float = 10,
375
- style: StyleType = "bar.back",
376
- complete_style: StyleType = "bar.complete",
377
- finished_style: StyleType = "bar.finished",
378
- pulse_style: StyleType = "bar.pulse",
379
- disable: bool = False,
380
- ) -> ContextManager[TextIO]:
381
- pass
382
-
383
-
384
- @typing.overload
385
- def open(
386
- file: Union[str, "PathLike[str]", bytes],
387
- mode: Literal["rb"],
388
- buffering: int = -1,
389
- encoding: Optional[str] = None,
390
- errors: Optional[str] = None,
391
- newline: Optional[str] = None,
392
- *,
393
- total: Optional[int] = None,
394
- description: str = "Reading...",
395
- auto_refresh: bool = True,
396
- console: Optional[Console] = None,
397
- transient: bool = False,
398
- get_time: Optional[Callable[[], float]] = None,
399
- refresh_per_second: float = 10,
400
- style: StyleType = "bar.back",
401
- complete_style: StyleType = "bar.complete",
402
- finished_style: StyleType = "bar.finished",
403
- pulse_style: StyleType = "bar.pulse",
404
- disable: bool = False,
405
- ) -> ContextManager[BinaryIO]:
406
- pass
407
-
408
-
409
- def open(
410
- file: Union[str, "PathLike[str]", bytes],
411
- mode: Union[Literal["rb"], Literal["rt"], Literal["r"]] = "r",
412
- buffering: int = -1,
413
- encoding: Optional[str] = None,
414
- errors: Optional[str] = None,
415
- newline: Optional[str] = None,
416
- *,
417
- total: Optional[int] = None,
418
- description: str = "Reading...",
419
- auto_refresh: bool = True,
420
- console: Optional[Console] = None,
421
- transient: bool = False,
422
- get_time: Optional[Callable[[], float]] = None,
423
- refresh_per_second: float = 10,
424
- style: StyleType = "bar.back",
425
- complete_style: StyleType = "bar.complete",
426
- finished_style: StyleType = "bar.finished",
427
- pulse_style: StyleType = "bar.pulse",
428
- disable: bool = False,
429
- ) -> Union[ContextManager[BinaryIO], ContextManager[TextIO]]:
430
- """Read bytes from a file while tracking progress.
431
-
432
- Args:
433
- path (Union[str, PathLike[str], BinaryIO]): The path to the file to read, or a file-like object in binary mode.
434
- mode (str): The mode to use to open the file. Only supports "r", "rb" or "rt".
435
- buffering (int): The buffering strategy to use, see :func:`io.open`.
436
- encoding (str, optional): The encoding to use when reading in text mode, see :func:`io.open`.
437
- errors (str, optional): The error handling strategy for decoding errors, see :func:`io.open`.
438
- newline (str, optional): The strategy for handling newlines in text mode, see :func:`io.open`
439
- total: (int, optional): Total number of bytes to read. Must be provided if reading from a file handle. Default for a path is os.stat(file).st_size.
440
- description (str, optional): Description of task show next to progress bar. Defaults to "Reading".
441
- auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True.
442
- transient: (bool, optional): Clear the progress on exit. Defaults to False.
443
- console (Console, optional): Console to write to. Default creates internal Console instance.
444
- refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10.
445
- style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
446
- complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
447
- finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
448
- pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
449
- disable (bool, optional): Disable display of progress.
450
- encoding (str, optional): The encoding to use when reading in text mode.
451
-
452
- Returns:
453
- ContextManager[BinaryIO]: A context manager yielding a progress reader.
454
-
455
- """
456
-
457
- columns: List["ProgressColumn"] = (
458
- [TextColumn("[progress.description]{task.description}")] if description else []
459
- )
460
- columns.extend(
461
- (
462
- BarColumn(
463
- style=style,
464
- complete_style=complete_style,
465
- finished_style=finished_style,
466
- pulse_style=pulse_style,
467
- ),
468
- DownloadColumn(),
469
- TimeRemainingColumn(),
470
- )
471
- )
472
- progress = Progress(
473
- *columns,
474
- auto_refresh=auto_refresh,
475
- console=console,
476
- transient=transient,
477
- get_time=get_time,
478
- refresh_per_second=refresh_per_second or 10,
479
- disable=disable,
480
- )
481
-
482
- reader = progress.open(
483
- file,
484
- mode=mode,
485
- buffering=buffering,
486
- encoding=encoding,
487
- errors=errors,
488
- newline=newline,
489
- total=total,
490
- description=description,
491
- )
492
- return _ReadContext(progress, reader) # type: ignore[return-value, type-var]
493
-
494
-
495
- class ProgressColumn(ABC):
496
- """Base class for a widget to use in progress display."""
497
-
498
- max_refresh: Optional[float] = None
499
-
500
- def __init__(self, table_column: Optional[Column] = None) -> None:
501
- self._table_column = table_column
502
- self._renderable_cache: Dict[TaskID, Tuple[float, RenderableType]] = {}
503
- self._update_time: Optional[float] = None
504
-
505
- def get_table_column(self) -> Column:
506
- """Get a table column, used to build tasks table."""
507
- return self._table_column or Column()
508
-
509
- def __call__(self, task: "Task") -> RenderableType:
510
- """Called by the Progress object to return a renderable for the given task.
511
-
512
- Args:
513
- task (Task): An object containing information regarding the task.
514
-
515
- Returns:
516
- RenderableType: Anything renderable (including str).
517
- """
518
- current_time = task.get_time()
519
- if self.max_refresh is not None and not task.completed:
520
- try:
521
- timestamp, renderable = self._renderable_cache[task.id]
522
- except KeyError:
523
- pass
524
- else:
525
- if timestamp + self.max_refresh > current_time:
526
- return renderable
527
-
528
- renderable = self.render(task)
529
- self._renderable_cache[task.id] = (current_time, renderable)
530
- return renderable
531
-
532
- @abstractmethod
533
- def render(self, task: "Task") -> RenderableType:
534
- """Should return a renderable object."""
535
-
536
-
537
- class RenderableColumn(ProgressColumn):
538
- """A column to insert an arbitrary column.
539
-
540
- Args:
541
- renderable (RenderableType, optional): Any renderable. Defaults to empty string.
542
- """
543
-
544
- def __init__(
545
- self, renderable: RenderableType = "", *, table_column: Optional[Column] = None
546
- ):
547
- self.renderable = renderable
548
- super().__init__(table_column=table_column)
549
-
550
- def render(self, task: "Task") -> RenderableType:
551
- return self.renderable
552
-
553
-
554
- class SpinnerColumn(ProgressColumn):
555
- """A column with a 'spinner' animation.
556
-
557
- Args:
558
- spinner_name (str, optional): Name of spinner animation. Defaults to "dots".
559
- style (StyleType, optional): Style of spinner. Defaults to "progress.spinner".
560
- speed (float, optional): Speed factor of spinner. Defaults to 1.0.
561
- finished_text (TextType, optional): Text used when task is finished. Defaults to " ".
562
- """
563
-
564
- def __init__(
565
- self,
566
- spinner_name: str = "dots",
567
- style: Optional[StyleType] = "progress.spinner",
568
- speed: float = 1.0,
569
- finished_text: TextType = " ",
570
- table_column: Optional[Column] = None,
571
- ):
572
- self.spinner = Spinner(spinner_name, style=style, speed=speed)
573
- self.finished_text = (
574
- Text.from_markup(finished_text)
575
- if isinstance(finished_text, str)
576
- else finished_text
577
- )
578
- super().__init__(table_column=table_column)
579
-
580
- def set_spinner(
581
- self,
582
- spinner_name: str,
583
- spinner_style: Optional[StyleType] = "progress.spinner",
584
- speed: float = 1.0,
585
- ) -> None:
586
- """Set a new spinner.
587
-
588
- Args:
589
- spinner_name (str): Spinner name, see python -m rich.spinner.
590
- spinner_style (Optional[StyleType], optional): Spinner style. Defaults to "progress.spinner".
591
- speed (float, optional): Speed factor of spinner. Defaults to 1.0.
592
- """
593
- self.spinner = Spinner(spinner_name, style=spinner_style, speed=speed)
594
-
595
- def render(self, task: "Task") -> RenderableType:
596
- text = (
597
- self.finished_text
598
- if task.finished
599
- else self.spinner.render(task.get_time())
600
- )
601
- return text
602
-
603
-
604
- class TextColumn(ProgressColumn):
605
- """A column containing text."""
606
-
607
- def __init__(
608
- self,
609
- text_format: str,
610
- style: StyleType = "none",
611
- justify: JustifyMethod = "left",
612
- markup: bool = True,
613
- highlighter: Optional[Highlighter] = None,
614
- table_column: Optional[Column] = None,
615
- ) -> None:
616
- self.text_format = text_format
617
- self.justify: JustifyMethod = justify
618
- self.style = style
619
- self.markup = markup
620
- self.highlighter = highlighter
621
- super().__init__(table_column=table_column or Column(no_wrap=True))
622
-
623
- def render(self, task: "Task") -> Text:
624
- _text = self.text_format.format(task=task)
625
- if self.markup:
626
- text = Text.from_markup(_text, style=self.style, justify=self.justify)
627
- else:
628
- text = Text(_text, style=self.style, justify=self.justify)
629
- if self.highlighter:
630
- self.highlighter.highlight(text)
631
- return text
632
-
633
-
634
- class BarColumn(ProgressColumn):
635
- """Renders a visual progress bar.
636
-
637
- Args:
638
- bar_width (Optional[int], optional): Width of bar or None for full width. Defaults to 40.
639
- style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
640
- complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
641
- finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
642
- pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
643
- """
644
-
645
- def __init__(
646
- self,
647
- bar_width: Optional[int] = 40,
648
- style: StyleType = "bar.back",
649
- complete_style: StyleType = "bar.complete",
650
- finished_style: StyleType = "bar.finished",
651
- pulse_style: StyleType = "bar.pulse",
652
- table_column: Optional[Column] = None,
653
- ) -> None:
654
- self.bar_width = bar_width
655
- self.style = style
656
- self.complete_style = complete_style
657
- self.finished_style = finished_style
658
- self.pulse_style = pulse_style
659
- super().__init__(table_column=table_column)
660
-
661
- def render(self, task: "Task") -> ProgressBar:
662
- """Gets a progress bar widget for a task."""
663
- return ProgressBar(
664
- total=max(0, task.total) if task.total is not None else None,
665
- completed=max(0, task.completed),
666
- width=None if self.bar_width is None else max(1, self.bar_width),
667
- pulse=not task.started,
668
- animation_time=task.get_time(),
669
- style=self.style,
670
- complete_style=self.complete_style,
671
- finished_style=self.finished_style,
672
- pulse_style=self.pulse_style,
673
- )
674
-
675
-
676
- class TimeElapsedColumn(ProgressColumn):
677
- """Renders time elapsed."""
678
-
679
- def render(self, task: "Task") -> Text:
680
- """Show time elapsed."""
681
- elapsed = task.finished_time if task.finished else task.elapsed
682
- if elapsed is None:
683
- return Text("-:--:--", style="progress.elapsed")
684
- delta = timedelta(seconds=int(elapsed))
685
- return Text(str(delta), style="progress.elapsed")
686
-
687
-
688
- class TaskProgressColumn(TextColumn):
689
- """Show task progress as a percentage.
690
-
691
- Args:
692
- text_format (str, optional): Format for percentage display. Defaults to "[progress.percentage]{task.percentage:>3.0f}%".
693
- text_format_no_percentage (str, optional): Format if percentage is unknown. Defaults to "".
694
- style (StyleType, optional): Style of output. Defaults to "none".
695
- justify (JustifyMethod, optional): Text justification. Defaults to "left".
696
- markup (bool, optional): Enable markup. Defaults to True.
697
- highlighter (Optional[Highlighter], optional): Highlighter to apply to output. Defaults to None.
698
- table_column (Optional[Column], optional): Table Column to use. Defaults to None.
699
- show_speed (bool, optional): Show speed if total is unknown. Defaults to False.
700
- """
701
-
702
- def __init__(
703
- self,
704
- text_format: str = "[progress.percentage]{task.percentage:>3.0f}%",
705
- text_format_no_percentage: str = "",
706
- style: StyleType = "none",
707
- justify: JustifyMethod = "left",
708
- markup: bool = True,
709
- highlighter: Optional[Highlighter] = None,
710
- table_column: Optional[Column] = None,
711
- show_speed: bool = False,
712
- ) -> None:
713
-
714
- self.text_format_no_percentage = text_format_no_percentage
715
- self.show_speed = show_speed
716
- super().__init__(
717
- text_format=text_format,
718
- style=style,
719
- justify=justify,
720
- markup=markup,
721
- highlighter=highlighter,
722
- table_column=table_column,
723
- )
724
-
725
- @classmethod
726
- def render_speed(cls, speed: Optional[float]) -> Text:
727
- """Render the speed in iterations per second.
728
-
729
- Args:
730
- task (Task): A Task object.
731
-
732
- Returns:
733
- Text: Text object containing the task speed.
734
- """
735
- if speed is None:
736
- return Text("", style="progress.percentage")
737
- unit, suffix = filesize.pick_unit_and_suffix(
738
- int(speed),
739
- ["", "×10³", "×10⁶", "×10⁹", "×10¹²"],
740
- 1000,
741
- )
742
- data_speed = speed / unit
743
- return Text(f"{data_speed:.1f}{suffix} it/s", style="progress.percentage")
744
-
745
- def render(self, task: "Task") -> Text:
746
- if task.total is None and self.show_speed:
747
- return self.render_speed(task.finished_speed or task.speed)
748
- text_format = (
749
- self.text_format_no_percentage if task.total is None else self.text_format
750
- )
751
- _text = text_format.format(task=task)
752
- if self.markup:
753
- text = Text.from_markup(_text, style=self.style, justify=self.justify)
754
- else:
755
- text = Text(_text, style=self.style, justify=self.justify)
756
- if self.highlighter:
757
- self.highlighter.highlight(text)
758
- return text
759
-
760
-
761
- class TimeRemainingColumn(ProgressColumn):
762
- """Renders estimated time remaining.
763
-
764
- Args:
765
- compact (bool, optional): Render MM:SS when time remaining is less than an hour. Defaults to False.
766
- elapsed_when_finished (bool, optional): Render time elapsed when the task is finished. Defaults to False.
767
- """
768
-
769
- # Only refresh twice a second to prevent jitter
770
- max_refresh = 0.5
771
-
772
- def __init__(
773
- self,
774
- compact: bool = False,
775
- elapsed_when_finished: bool = False,
776
- table_column: Optional[Column] = None,
777
- ):
778
- self.compact = compact
779
- self.elapsed_when_finished = elapsed_when_finished
780
- super().__init__(table_column=table_column)
781
-
782
- def render(self, task: "Task") -> Text:
783
- """Show time remaining."""
784
- if self.elapsed_when_finished and task.finished:
785
- task_time = task.finished_time
786
- style = "progress.elapsed"
787
- else:
788
- task_time = task.time_remaining
789
- style = "progress.remaining"
790
-
791
- if task.total is None:
792
- return Text("", style=style)
793
-
794
- if task_time is None:
795
- return Text("--:--" if self.compact else "-:--:--", style=style)
796
-
797
- # Based on https://github.com/tqdm/tqdm/blob/master/tqdm/std.py
798
- minutes, seconds = divmod(int(task_time), 60)
799
- hours, minutes = divmod(minutes, 60)
800
-
801
- if self.compact and not hours:
802
- formatted = f"{minutes:02d}:{seconds:02d}"
803
- else:
804
- formatted = f"{hours:d}:{minutes:02d}:{seconds:02d}"
805
-
806
- return Text(formatted, style=style)
807
-
808
-
809
- class FileSizeColumn(ProgressColumn):
810
- """Renders completed filesize."""
811
-
812
- def render(self, task: "Task") -> Text:
813
- """Show data completed."""
814
- data_size = filesize.decimal(int(task.completed))
815
- return Text(data_size, style="progress.filesize")
816
-
817
-
818
- class TotalFileSizeColumn(ProgressColumn):
819
- """Renders total filesize."""
820
-
821
- def render(self, task: "Task") -> Text:
822
- """Show data completed."""
823
- data_size = filesize.decimal(int(task.total)) if task.total is not None else ""
824
- return Text(data_size, style="progress.filesize.total")
825
-
826
-
827
- class MofNCompleteColumn(ProgressColumn):
828
- """Renders completed count/total, e.g. ' 10/1000'.
829
-
830
- Best for bounded tasks with int quantities.
831
-
832
- Space pads the completed count so that progress length does not change as task progresses
833
- past powers of 10.
834
-
835
- Args:
836
- separator (str, optional): Text to separate completed and total values. Defaults to "/".
837
- """
838
-
839
- def __init__(self, separator: str = "/", table_column: Optional[Column] = None):
840
- self.separator = separator
841
- super().__init__(table_column=table_column)
842
-
843
- def render(self, task: "Task") -> Text:
844
- """Show completed/total."""
845
- completed = int(task.completed)
846
- total = int(task.total) if task.total is not None else "?"
847
- total_width = len(str(total))
848
- return Text(
849
- f"{completed:{total_width}d}{self.separator}{total}",
850
- style="progress.download",
851
- )
852
-
853
-
854
- class DownloadColumn(ProgressColumn):
855
- """Renders file size downloaded and total, e.g. '0.5/2.3 GB'.
856
-
857
- Args:
858
- binary_units (bool, optional): Use binary units, KiB, MiB etc. Defaults to False.
859
- """
860
-
861
- def __init__(
862
- self, binary_units: bool = False, table_column: Optional[Column] = None
863
- ) -> None:
864
- self.binary_units = binary_units
865
- super().__init__(table_column=table_column)
866
-
867
- def render(self, task: "Task") -> Text:
868
- """Calculate common unit for completed and total."""
869
- completed = int(task.completed)
870
-
871
- unit_and_suffix_calculation_base = (
872
- int(task.total) if task.total is not None else completed
873
- )
874
- if self.binary_units:
875
- unit, suffix = filesize.pick_unit_and_suffix(
876
- unit_and_suffix_calculation_base,
877
- ["bytes", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"],
878
- 1024,
879
- )
880
- else:
881
- unit, suffix = filesize.pick_unit_and_suffix(
882
- unit_and_suffix_calculation_base,
883
- ["bytes", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"],
884
- 1000,
885
- )
886
- precision = 0 if unit == 1 else 1
887
-
888
- completed_ratio = completed / unit
889
- completed_str = f"{completed_ratio:,.{precision}f}"
890
-
891
- if task.total is not None:
892
- total = int(task.total)
893
- total_ratio = total / unit
894
- total_str = f"{total_ratio:,.{precision}f}"
895
- else:
896
- total_str = "?"
897
-
898
- download_status = f"{completed_str}/{total_str} {suffix}"
899
- download_text = Text(download_status, style="progress.download")
900
- return download_text
901
-
902
-
903
- class TransferSpeedColumn(ProgressColumn):
904
- """Renders human readable transfer speed."""
905
-
906
- def render(self, task: "Task") -> Text:
907
- """Show data transfer speed."""
908
- speed = task.finished_speed or task.speed
909
- if speed is None:
910
- return Text("?", style="progress.data.speed")
911
- data_speed = filesize.decimal(int(speed))
912
- return Text(f"{data_speed}/s", style="progress.data.speed")
913
-
914
-
915
- class ProgressSample(NamedTuple):
916
- """Sample of progress for a given time."""
917
-
918
- timestamp: float
919
- """Timestamp of sample."""
920
- completed: float
921
- """Number of steps completed."""
922
-
923
-
924
- @dataclass
925
- class Task:
926
- """Information regarding a progress task.
927
-
928
- This object should be considered read-only outside of the :class:`~Progress` class.
929
-
930
- """
931
-
932
- id: TaskID
933
- """Task ID associated with this task (used in Progress methods)."""
934
-
935
- description: str
936
- """str: Description of the task."""
937
-
938
- total: Optional[float]
939
- """Optional[float]: Total number of steps in this task."""
940
-
941
- completed: float
942
- """float: Number of steps completed"""
943
-
944
- _get_time: GetTimeCallable
945
- """Callable to get the current time."""
946
-
947
- finished_time: Optional[float] = None
948
- """float: Time task was finished."""
949
-
950
- visible: bool = True
951
- """bool: Indicates if this task is visible in the progress display."""
952
-
953
- fields: Dict[str, Any] = field(default_factory=dict)
954
- """dict: Arbitrary fields passed in via Progress.update."""
955
-
956
- start_time: Optional[float] = field(default=None, init=False, repr=False)
957
- """Optional[float]: Time this task was started, or None if not started."""
958
-
959
- stop_time: Optional[float] = field(default=None, init=False, repr=False)
960
- """Optional[float]: Time this task was stopped, or None if not stopped."""
961
-
962
- finished_speed: Optional[float] = None
963
- """Optional[float]: The last speed for a finished task."""
964
-
965
- _progress: Deque[ProgressSample] = field(
966
- default_factory=lambda: deque(maxlen=1000), init=False, repr=False
967
- )
968
-
969
- _lock: RLock = field(repr=False, default_factory=RLock)
970
- """Thread lock."""
971
-
972
- def get_time(self) -> float:
973
- """float: Get the current time, in seconds."""
974
- return self._get_time()
975
-
976
- @property
977
- def started(self) -> bool:
978
- """bool: Check if the task as started."""
979
- return self.start_time is not None
980
-
981
- @property
982
- def remaining(self) -> Optional[float]:
983
- """Optional[float]: Get the number of steps remaining, if a non-None total was set."""
984
- if self.total is None:
985
- return None
986
- return self.total - self.completed
987
-
988
- @property
989
- def elapsed(self) -> Optional[float]:
990
- """Optional[float]: Time elapsed since task was started, or ``None`` if the task hasn't started."""
991
- if self.start_time is None:
992
- return None
993
- if self.stop_time is not None:
994
- return self.stop_time - self.start_time
995
- return self.get_time() - self.start_time
996
-
997
- @property
998
- def finished(self) -> bool:
999
- """Check if the task has finished."""
1000
- return self.finished_time is not None
1001
-
1002
- @property
1003
- def percentage(self) -> float:
1004
- """float: Get progress of task as a percentage. If a None total was set, returns 0"""
1005
- if not self.total:
1006
- return 0.0
1007
- completed = (self.completed / self.total) * 100.0
1008
- completed = min(100.0, max(0.0, completed))
1009
- return completed
1010
-
1011
- @property
1012
- def speed(self) -> Optional[float]:
1013
- """Optional[float]: Get the estimated speed in steps per second."""
1014
- if self.start_time is None:
1015
- return None
1016
- with self._lock:
1017
- progress = self._progress
1018
- if not progress:
1019
- return None
1020
- total_time = progress[-1].timestamp - progress[0].timestamp
1021
- if total_time == 0:
1022
- return None
1023
- iter_progress = iter(progress)
1024
- next(iter_progress)
1025
- total_completed = sum(sample.completed for sample in iter_progress)
1026
- speed = total_completed / total_time
1027
- return speed
1028
-
1029
- @property
1030
- def time_remaining(self) -> Optional[float]:
1031
- """Optional[float]: Get estimated time to completion, or ``None`` if no data."""
1032
- if self.finished:
1033
- return 0.0
1034
- speed = self.speed
1035
- if not speed:
1036
- return None
1037
- remaining = self.remaining
1038
- if remaining is None:
1039
- return None
1040
- estimate = ceil(remaining / speed)
1041
- return estimate
1042
-
1043
- def _reset(self) -> None:
1044
- """Reset progress."""
1045
- self._progress.clear()
1046
- self.finished_time = None
1047
- self.finished_speed = None
1048
-
1049
-
1050
- class Progress(JupyterMixin):
1051
- """Renders an auto-updating progress bar(s).
1052
-
1053
- Args:
1054
- console (Console, optional): Optional Console instance. Default will an internal Console instance writing to stdout.
1055
- auto_refresh (bool, optional): Enable auto refresh. If disabled, you will need to call `refresh()`.
1056
- refresh_per_second (Optional[float], optional): Number of times per second to refresh the progress information or None to use default (10). Defaults to None.
1057
- speed_estimate_period: (float, optional): Period (in seconds) used to calculate the speed estimate. Defaults to 30.
1058
- transient: (bool, optional): Clear the progress on exit. Defaults to False.
1059
- redirect_stdout: (bool, optional): Enable redirection of stdout, so ``print`` may be used. Defaults to True.
1060
- redirect_stderr: (bool, optional): Enable redirection of stderr. Defaults to True.
1061
- get_time: (Callable, optional): A callable that gets the current time, or None to use Console.get_time. Defaults to None.
1062
- disable (bool, optional): Disable progress display. Defaults to False
1063
- expand (bool, optional): Expand tasks table to fit width. Defaults to False.
1064
- """
1065
-
1066
- def __init__(
1067
- self,
1068
- *columns: Union[str, ProgressColumn],
1069
- console: Optional[Console] = None,
1070
- auto_refresh: bool = True,
1071
- refresh_per_second: float = 10,
1072
- speed_estimate_period: float = 30.0,
1073
- transient: bool = False,
1074
- redirect_stdout: bool = True,
1075
- redirect_stderr: bool = True,
1076
- get_time: Optional[GetTimeCallable] = None,
1077
- disable: bool = False,
1078
- expand: bool = False,
1079
- ) -> None:
1080
- assert refresh_per_second > 0, "refresh_per_second must be > 0"
1081
- self._lock = RLock()
1082
- self.columns = columns or self.get_default_columns()
1083
- self.speed_estimate_period = speed_estimate_period
1084
-
1085
- self.disable = disable
1086
- self.expand = expand
1087
- self._tasks: Dict[TaskID, Task] = {}
1088
- self._task_index: TaskID = TaskID(0)
1089
- self.live = Live(
1090
- console=console or get_console(),
1091
- auto_refresh=auto_refresh,
1092
- refresh_per_second=refresh_per_second,
1093
- transient=transient,
1094
- redirect_stdout=redirect_stdout,
1095
- redirect_stderr=redirect_stderr,
1096
- get_renderable=self.get_renderable,
1097
- )
1098
- self.get_time = get_time or self.console.get_time
1099
- self.print = self.console.print
1100
- self.log = self.console.log
1101
-
1102
- @classmethod
1103
- def get_default_columns(cls) -> Tuple[ProgressColumn, ...]:
1104
- """Get the default columns used for a new Progress instance:
1105
- - a text column for the description (TextColumn)
1106
- - the bar itself (BarColumn)
1107
- - a text column showing completion percentage (TextColumn)
1108
- - an estimated-time-remaining column (TimeRemainingColumn)
1109
- If the Progress instance is created without passing a columns argument,
1110
- the default columns defined here will be used.
1111
-
1112
- You can also create a Progress instance using custom columns before
1113
- and/or after the defaults, as in this example:
1114
-
1115
- progress = Progress(
1116
- SpinnerColumn(),
1117
- *Progress.default_columns(),
1118
- "Elapsed:",
1119
- TimeElapsedColumn(),
1120
- )
1121
-
1122
- This code shows the creation of a Progress display, containing
1123
- a spinner to the left, the default columns, and a labeled elapsed
1124
- time column.
1125
- """
1126
- return (
1127
- TextColumn("[progress.description]{task.description}"),
1128
- BarColumn(),
1129
- TaskProgressColumn(),
1130
- TimeRemainingColumn(),
1131
- )
1132
-
1133
- @property
1134
- def console(self) -> Console:
1135
- return self.live.console
1136
-
1137
- @property
1138
- def tasks(self) -> List[Task]:
1139
- """Get a list of Task instances."""
1140
- with self._lock:
1141
- return list(self._tasks.values())
1142
-
1143
- @property
1144
- def task_ids(self) -> List[TaskID]:
1145
- """A list of task IDs."""
1146
- with self._lock:
1147
- return list(self._tasks.keys())
1148
-
1149
- @property
1150
- def finished(self) -> bool:
1151
- """Check if all tasks have been completed."""
1152
- with self._lock:
1153
- if not self._tasks:
1154
- return True
1155
- return all(task.finished for task in self._tasks.values())
1156
-
1157
- def start(self) -> None:
1158
- """Start the progress display."""
1159
- if not self.disable:
1160
- self.live.start(refresh=True)
1161
-
1162
- def stop(self) -> None:
1163
- """Stop the progress display."""
1164
- self.live.stop()
1165
- if not self.console.is_interactive:
1166
- self.console.print()
1167
-
1168
- def __enter__(self) -> "Progress":
1169
- self.start()
1170
- return self
1171
-
1172
- def __exit__(
1173
- self,
1174
- exc_type: Optional[Type[BaseException]],
1175
- exc_val: Optional[BaseException],
1176
- exc_tb: Optional[TracebackType],
1177
- ) -> None:
1178
- self.stop()
1179
-
1180
- def track(
1181
- self,
1182
- sequence: Union[Iterable[ProgressType], Sequence[ProgressType]],
1183
- total: Optional[float] = None,
1184
- task_id: Optional[TaskID] = None,
1185
- description: str = "Working...",
1186
- update_period: float = 0.1,
1187
- ) -> Iterable[ProgressType]:
1188
- """Track progress by iterating over a sequence.
1189
-
1190
- Args:
1191
- sequence (Sequence[ProgressType]): A sequence of values you want to iterate over and track progress.
1192
- total: (float, optional): Total number of steps. Default is len(sequence).
1193
- task_id: (TaskID): Task to track. Default is new task.
1194
- description: (str, optional): Description of task, if new task is created.
1195
- update_period (float, optional): Minimum time (in seconds) between calls to update(). Defaults to 0.1.
1196
-
1197
- Returns:
1198
- Iterable[ProgressType]: An iterable of values taken from the provided sequence.
1199
- """
1200
- if total is None:
1201
- total = float(length_hint(sequence)) or None
1202
-
1203
- if task_id is None:
1204
- task_id = self.add_task(description, total=total)
1205
- else:
1206
- self.update(task_id, total=total)
1207
-
1208
- if self.live.auto_refresh:
1209
- with _TrackThread(self, task_id, update_period) as track_thread:
1210
- for value in sequence:
1211
- yield value
1212
- track_thread.completed += 1
1213
- else:
1214
- advance = self.advance
1215
- refresh = self.refresh
1216
- for value in sequence:
1217
- yield value
1218
- advance(task_id, 1)
1219
- refresh()
1220
-
1221
- def wrap_file(
1222
- self,
1223
- file: BinaryIO,
1224
- total: Optional[int] = None,
1225
- *,
1226
- task_id: Optional[TaskID] = None,
1227
- description: str = "Reading...",
1228
- ) -> BinaryIO:
1229
- """Track progress file reading from a binary file.
1230
-
1231
- Args:
1232
- file (BinaryIO): A file-like object opened in binary mode.
1233
- total (int, optional): Total number of bytes to read. This must be provided unless a task with a total is also given.
1234
- task_id (TaskID): Task to track. Default is new task.
1235
- description (str, optional): Description of task, if new task is created.
1236
-
1237
- Returns:
1238
- BinaryIO: A readable file-like object in binary mode.
1239
-
1240
- Raises:
1241
- ValueError: When no total value can be extracted from the arguments or the task.
1242
- """
1243
- # attempt to recover the total from the task
1244
- total_bytes: Optional[float] = None
1245
- if total is not None:
1246
- total_bytes = total
1247
- elif task_id is not None:
1248
- with self._lock:
1249
- total_bytes = self._tasks[task_id].total
1250
- if total_bytes is None:
1251
- raise ValueError(
1252
- f"unable to get the total number of bytes, please specify 'total'"
1253
- )
1254
-
1255
- # update total of task or create new task
1256
- if task_id is None:
1257
- task_id = self.add_task(description, total=total_bytes)
1258
- else:
1259
- self.update(task_id, total=total_bytes)
1260
-
1261
- return _Reader(file, self, task_id, close_handle=False)
1262
-
1263
- @typing.overload
1264
- def open(
1265
- self,
1266
- file: Union[str, "PathLike[str]", bytes],
1267
- mode: Literal["rb"],
1268
- buffering: int = -1,
1269
- encoding: Optional[str] = None,
1270
- errors: Optional[str] = None,
1271
- newline: Optional[str] = None,
1272
- *,
1273
- total: Optional[int] = None,
1274
- task_id: Optional[TaskID] = None,
1275
- description: str = "Reading...",
1276
- ) -> BinaryIO:
1277
- pass
1278
-
1279
- @typing.overload
1280
- def open(
1281
- self,
1282
- file: Union[str, "PathLike[str]", bytes],
1283
- mode: Union[Literal["r"], Literal["rt"]],
1284
- buffering: int = -1,
1285
- encoding: Optional[str] = None,
1286
- errors: Optional[str] = None,
1287
- newline: Optional[str] = None,
1288
- *,
1289
- total: Optional[int] = None,
1290
- task_id: Optional[TaskID] = None,
1291
- description: str = "Reading...",
1292
- ) -> TextIO:
1293
- pass
1294
-
1295
- def open(
1296
- self,
1297
- file: Union[str, "PathLike[str]", bytes],
1298
- mode: Union[Literal["rb"], Literal["rt"], Literal["r"]] = "r",
1299
- buffering: int = -1,
1300
- encoding: Optional[str] = None,
1301
- errors: Optional[str] = None,
1302
- newline: Optional[str] = None,
1303
- *,
1304
- total: Optional[int] = None,
1305
- task_id: Optional[TaskID] = None,
1306
- description: str = "Reading...",
1307
- ) -> Union[BinaryIO, TextIO]:
1308
- """Track progress while reading from a binary file.
1309
-
1310
- Args:
1311
- path (Union[str, PathLike[str]]): The path to the file to read.
1312
- mode (str): The mode to use to open the file. Only supports "r", "rb" or "rt".
1313
- buffering (int): The buffering strategy to use, see :func:`io.open`.
1314
- encoding (str, optional): The encoding to use when reading in text mode, see :func:`io.open`.
1315
- errors (str, optional): The error handling strategy for decoding errors, see :func:`io.open`.
1316
- newline (str, optional): The strategy for handling newlines in text mode, see :func:`io.open`.
1317
- total (int, optional): Total number of bytes to read. If none given, os.stat(path).st_size is used.
1318
- task_id (TaskID): Task to track. Default is new task.
1319
- description (str, optional): Description of task, if new task is created.
1320
-
1321
- Returns:
1322
- BinaryIO: A readable file-like object in binary mode.
1323
-
1324
- Raises:
1325
- ValueError: When an invalid mode is given.
1326
- """
1327
- # normalize the mode (always rb, rt)
1328
- _mode = "".join(sorted(mode, reverse=False))
1329
- if _mode not in ("br", "rt", "r"):
1330
- raise ValueError("invalid mode {!r}".format(mode))
1331
-
1332
- # patch buffering to provide the same behaviour as the builtin `open`
1333
- line_buffering = buffering == 1
1334
- if _mode == "br" and buffering == 1:
1335
- warnings.warn(
1336
- "line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used",
1337
- RuntimeWarning,
1338
- )
1339
- buffering = -1
1340
- elif _mode in ("rt", "r"):
1341
- if buffering == 0:
1342
- raise ValueError("can't have unbuffered text I/O")
1343
- elif buffering == 1:
1344
- buffering = -1
1345
-
1346
- # attempt to get the total with `os.stat`
1347
- if total is None:
1348
- total = stat(file).st_size
1349
-
1350
- # update total of task or create new task
1351
- if task_id is None:
1352
- task_id = self.add_task(description, total=total)
1353
- else:
1354
- self.update(task_id, total=total)
1355
-
1356
- # open the file in binary mode,
1357
- handle = io.open(file, "rb", buffering=buffering)
1358
- reader = _Reader(handle, self, task_id, close_handle=True)
1359
-
1360
- # wrap the reader in a `TextIOWrapper` if text mode
1361
- if mode in ("r", "rt"):
1362
- return io.TextIOWrapper(
1363
- reader,
1364
- encoding=encoding,
1365
- errors=errors,
1366
- newline=newline,
1367
- line_buffering=line_buffering,
1368
- )
1369
-
1370
- return reader
1371
-
1372
- def start_task(self, task_id: TaskID) -> None:
1373
- """Start a task.
1374
-
1375
- Starts a task (used when calculating elapsed time). You may need to call this manually,
1376
- if you called ``add_task`` with ``start=False``.
1377
-
1378
- Args:
1379
- task_id (TaskID): ID of task.
1380
- """
1381
- with self._lock:
1382
- task = self._tasks[task_id]
1383
- if task.start_time is None:
1384
- task.start_time = self.get_time()
1385
-
1386
- def stop_task(self, task_id: TaskID) -> None:
1387
- """Stop a task.
1388
-
1389
- This will freeze the elapsed time on the task.
1390
-
1391
- Args:
1392
- task_id (TaskID): ID of task.
1393
- """
1394
- with self._lock:
1395
- task = self._tasks[task_id]
1396
- current_time = self.get_time()
1397
- if task.start_time is None:
1398
- task.start_time = current_time
1399
- task.stop_time = current_time
1400
-
1401
- def update(
1402
- self,
1403
- task_id: TaskID,
1404
- *,
1405
- total: Optional[float] = None,
1406
- completed: Optional[float] = None,
1407
- advance: Optional[float] = None,
1408
- description: Optional[str] = None,
1409
- visible: Optional[bool] = None,
1410
- refresh: bool = False,
1411
- **fields: Any,
1412
- ) -> None:
1413
- """Update information associated with a task.
1414
-
1415
- Args:
1416
- task_id (TaskID): Task id (returned by add_task).
1417
- total (float, optional): Updates task.total if not None.
1418
- completed (float, optional): Updates task.completed if not None.
1419
- advance (float, optional): Add a value to task.completed if not None.
1420
- description (str, optional): Change task description if not None.
1421
- visible (bool, optional): Set visible flag if not None.
1422
- refresh (bool): Force a refresh of progress information. Default is False.
1423
- **fields (Any): Additional data fields required for rendering.
1424
- """
1425
- with self._lock:
1426
- task = self._tasks[task_id]
1427
- completed_start = task.completed
1428
-
1429
- if total is not None and total != task.total:
1430
- task.total = total
1431
- task._reset()
1432
- if advance is not None:
1433
- task.completed += advance
1434
- if completed is not None:
1435
- task.completed = completed
1436
- if description is not None:
1437
- task.description = description
1438
- if visible is not None:
1439
- task.visible = visible
1440
- task.fields.update(fields)
1441
- update_completed = task.completed - completed_start
1442
-
1443
- current_time = self.get_time()
1444
- old_sample_time = current_time - self.speed_estimate_period
1445
- _progress = task._progress
1446
-
1447
- popleft = _progress.popleft
1448
- while _progress and _progress[0].timestamp < old_sample_time:
1449
- popleft()
1450
- if update_completed > 0:
1451
- _progress.append(ProgressSample(current_time, update_completed))
1452
- if (
1453
- task.total is not None
1454
- and task.completed >= task.total
1455
- and task.finished_time is None
1456
- ):
1457
- task.finished_time = task.elapsed
1458
-
1459
- if refresh:
1460
- self.refresh()
1461
-
1462
- def reset(
1463
- self,
1464
- task_id: TaskID,
1465
- *,
1466
- start: bool = True,
1467
- total: Optional[float] = None,
1468
- completed: int = 0,
1469
- visible: Optional[bool] = None,
1470
- description: Optional[str] = None,
1471
- **fields: Any,
1472
- ) -> None:
1473
- """Reset a task so completed is 0 and the clock is reset.
1474
-
1475
- Args:
1476
- task_id (TaskID): ID of task.
1477
- start (bool, optional): Start the task after reset. Defaults to True.
1478
- total (float, optional): New total steps in task, or None to use current total. Defaults to None.
1479
- completed (int, optional): Number of steps completed. Defaults to 0.
1480
- visible (bool, optional): Enable display of the task. Defaults to True.
1481
- description (str, optional): Change task description if not None. Defaults to None.
1482
- **fields (str): Additional data fields required for rendering.
1483
- """
1484
- current_time = self.get_time()
1485
- with self._lock:
1486
- task = self._tasks[task_id]
1487
- task._reset()
1488
- task.start_time = current_time if start else None
1489
- if total is not None:
1490
- task.total = total
1491
- task.completed = completed
1492
- if visible is not None:
1493
- task.visible = visible
1494
- if fields:
1495
- task.fields = fields
1496
- if description is not None:
1497
- task.description = description
1498
- task.finished_time = None
1499
- self.refresh()
1500
-
1501
- def advance(self, task_id: TaskID, advance: float = 1) -> None:
1502
- """Advance task by a number of steps.
1503
-
1504
- Args:
1505
- task_id (TaskID): ID of task.
1506
- advance (float): Number of steps to advance. Default is 1.
1507
- """
1508
- current_time = self.get_time()
1509
- with self._lock:
1510
- task = self._tasks[task_id]
1511
- completed_start = task.completed
1512
- task.completed += advance
1513
- update_completed = task.completed - completed_start
1514
- old_sample_time = current_time - self.speed_estimate_period
1515
- _progress = task._progress
1516
-
1517
- popleft = _progress.popleft
1518
- while _progress and _progress[0].timestamp < old_sample_time:
1519
- popleft()
1520
- while len(_progress) > 1000:
1521
- popleft()
1522
- _progress.append(ProgressSample(current_time, update_completed))
1523
- if (
1524
- task.total is not None
1525
- and task.completed >= task.total
1526
- and task.finished_time is None
1527
- ):
1528
- task.finished_time = task.elapsed
1529
- task.finished_speed = task.speed
1530
-
1531
- def refresh(self) -> None:
1532
- """Refresh (render) the progress information."""
1533
- if not self.disable and self.live.is_started:
1534
- self.live.refresh()
1535
-
1536
- def get_renderable(self) -> RenderableType:
1537
- """Get a renderable for the progress display."""
1538
- renderable = Group(*self.get_renderables())
1539
- return renderable
1540
-
1541
- def get_renderables(self) -> Iterable[RenderableType]:
1542
- """Get a number of renderables for the progress display."""
1543
- table = self.make_tasks_table(self.tasks)
1544
- yield table
1545
-
1546
- def make_tasks_table(self, tasks: Iterable[Task]) -> Table:
1547
- """Get a table to render the Progress display.
1548
-
1549
- Args:
1550
- tasks (Iterable[Task]): An iterable of Task instances, one per row of the table.
1551
-
1552
- Returns:
1553
- Table: A table instance.
1554
- """
1555
- table_columns = (
1556
- (
1557
- Column(no_wrap=True)
1558
- if isinstance(_column, str)
1559
- else _column.get_table_column().copy()
1560
- )
1561
- for _column in self.columns
1562
- )
1563
- table = Table.grid(*table_columns, padding=(0, 1), expand=self.expand)
1564
-
1565
- for task in tasks:
1566
- if task.visible:
1567
- table.add_row(
1568
- *(
1569
- (
1570
- column.format(task=task)
1571
- if isinstance(column, str)
1572
- else column(task)
1573
- )
1574
- for column in self.columns
1575
- )
1576
- )
1577
- return table
1578
-
1579
- def __rich__(self) -> RenderableType:
1580
- """Makes the Progress class itself renderable."""
1581
- with self._lock:
1582
- return self.get_renderable()
1583
-
1584
- def add_task(
1585
- self,
1586
- description: str,
1587
- start: bool = True,
1588
- total: Optional[float] = 100.0,
1589
- completed: int = 0,
1590
- visible: bool = True,
1591
- **fields: Any,
1592
- ) -> TaskID:
1593
- """Add a new 'task' to the Progress display.
1594
-
1595
- Args:
1596
- description (str): A description of the task.
1597
- start (bool, optional): Start the task immediately (to calculate elapsed time). If set to False,
1598
- you will need to call `start` manually. Defaults to True.
1599
- total (float, optional): Number of total steps in the progress if known.
1600
- Set to None to render a pulsing animation. Defaults to 100.
1601
- completed (int, optional): Number of steps completed so far. Defaults to 0.
1602
- visible (bool, optional): Enable display of the task. Defaults to True.
1603
- **fields (str): Additional data fields required for rendering.
1604
-
1605
- Returns:
1606
- TaskID: An ID you can use when calling `update`.
1607
- """
1608
- with self._lock:
1609
- task = Task(
1610
- self._task_index,
1611
- description,
1612
- total,
1613
- completed,
1614
- visible=visible,
1615
- fields=fields,
1616
- _get_time=self.get_time,
1617
- _lock=self._lock,
1618
- )
1619
- self._tasks[self._task_index] = task
1620
- if start:
1621
- self.start_task(self._task_index)
1622
- new_task_index = self._task_index
1623
- self._task_index = TaskID(int(self._task_index) + 1)
1624
- self.refresh()
1625
- return new_task_index
1626
-
1627
- def remove_task(self, task_id: TaskID) -> None:
1628
- """Delete a task if it exists.
1629
-
1630
- Args:
1631
- task_id (TaskID): A task ID.
1632
-
1633
- """
1634
- with self._lock:
1635
- del self._tasks[task_id]
1636
-
1637
-
1638
- if __name__ == "__main__": # pragma: no coverage
1639
-
1640
- import random
1641
- import time
1642
-
1643
- from .panel import Panel
1644
- from .rule import Rule
1645
- from .syntax import Syntax
1646
- from .table import Table
1647
-
1648
- syntax = Syntax(
1649
- '''def loop_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]:
1650
- """Iterate and generate a tuple with a flag for last value."""
1651
- iter_values = iter(values)
1652
- try:
1653
- previous_value = next(iter_values)
1654
- except StopIteration:
1655
- return
1656
- for value in iter_values:
1657
- yield False, previous_value
1658
- previous_value = value
1659
- yield True, previous_value''',
1660
- "python",
1661
- line_numbers=True,
1662
- )
1663
-
1664
- table = Table("foo", "bar", "baz")
1665
- table.add_row("1", "2", "3")
1666
-
1667
- progress_renderables = [
1668
- "Text may be printed while the progress bars are rendering.",
1669
- Panel("In fact, [i]any[/i] renderable will work"),
1670
- "Such as [magenta]tables[/]...",
1671
- table,
1672
- "Pretty printed structures...",
1673
- {"type": "example", "text": "Pretty printed"},
1674
- "Syntax...",
1675
- syntax,
1676
- Rule("Give it a try!"),
1677
- ]
1678
-
1679
- from itertools import cycle
1680
-
1681
- examples = cycle(progress_renderables)
1682
-
1683
- console = Console(record=True)
1684
-
1685
- with Progress(
1686
- SpinnerColumn(),
1687
- *Progress.get_default_columns(),
1688
- TimeElapsedColumn(),
1689
- console=console,
1690
- transient=False,
1691
- ) as progress:
1692
-
1693
- task1 = progress.add_task("[red]Downloading", total=1000)
1694
- task2 = progress.add_task("[green]Processing", total=1000)
1695
- task3 = progress.add_task("[yellow]Thinking", total=None)
1696
-
1697
- while not progress.finished:
1698
- progress.update(task1, advance=0.5)
1699
- progress.update(task2, advance=0.3)
1700
- time.sleep(0.01)
1701
- if random.randint(0, 100) < 1:
1702
- progress.log(next(examples))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/rich/theme.py DELETED
@@ -1,115 +0,0 @@
1
- import configparser
2
- from typing import Dict, List, IO, Mapping, Optional
3
-
4
- from .default_styles import DEFAULT_STYLES
5
- from .style import Style, StyleType
6
-
7
-
8
- class Theme:
9
- """A container for style information, used by :class:`~rich.console.Console`.
10
-
11
- Args:
12
- styles (Dict[str, Style], optional): A mapping of style names on to styles. Defaults to None for a theme with no styles.
13
- inherit (bool, optional): Inherit default styles. Defaults to True.
14
- """
15
-
16
- styles: Dict[str, Style]
17
-
18
- def __init__(
19
- self, styles: Optional[Mapping[str, StyleType]] = None, inherit: bool = True
20
- ):
21
- self.styles = DEFAULT_STYLES.copy() if inherit else {}
22
- if styles is not None:
23
- self.styles.update(
24
- {
25
- name: style if isinstance(style, Style) else Style.parse(style)
26
- for name, style in styles.items()
27
- }
28
- )
29
-
30
- @property
31
- def config(self) -> str:
32
- """Get contents of a config file for this theme."""
33
- config = "[styles]\n" + "\n".join(
34
- f"{name} = {style}" for name, style in sorted(self.styles.items())
35
- )
36
- return config
37
-
38
- @classmethod
39
- def from_file(
40
- cls, config_file: IO[str], source: Optional[str] = None, inherit: bool = True
41
- ) -> "Theme":
42
- """Load a theme from a text mode file.
43
-
44
- Args:
45
- config_file (IO[str]): An open conf file.
46
- source (str, optional): The filename of the open file. Defaults to None.
47
- inherit (bool, optional): Inherit default styles. Defaults to True.
48
-
49
- Returns:
50
- Theme: A New theme instance.
51
- """
52
- config = configparser.ConfigParser()
53
- config.read_file(config_file, source=source)
54
- styles = {name: Style.parse(value) for name, value in config.items("styles")}
55
- theme = Theme(styles, inherit=inherit)
56
- return theme
57
-
58
- @classmethod
59
- def read(
60
- cls, path: str, inherit: bool = True, encoding: Optional[str] = None
61
- ) -> "Theme":
62
- """Read a theme from a path.
63
-
64
- Args:
65
- path (str): Path to a config file readable by Python configparser module.
66
- inherit (bool, optional): Inherit default styles. Defaults to True.
67
- encoding (str, optional): Encoding of the config file. Defaults to None.
68
-
69
- Returns:
70
- Theme: A new theme instance.
71
- """
72
- with open(path, "rt", encoding=encoding) as config_file:
73
- return cls.from_file(config_file, source=path, inherit=inherit)
74
-
75
-
76
- class ThemeStackError(Exception):
77
- """Base exception for errors related to the theme stack."""
78
-
79
-
80
- class ThemeStack:
81
- """A stack of themes.
82
-
83
- Args:
84
- theme (Theme): A theme instance
85
- """
86
-
87
- def __init__(self, theme: Theme) -> None:
88
- self._entries: List[Dict[str, Style]] = [theme.styles]
89
- self.get = self._entries[-1].get
90
-
91
- def push_theme(self, theme: Theme, inherit: bool = True) -> None:
92
- """Push a theme on the top of the stack.
93
-
94
- Args:
95
- theme (Theme): A Theme instance.
96
- inherit (boolean, optional): Inherit styles from current top of stack.
97
- """
98
- styles: Dict[str, Style]
99
- styles = (
100
- {**self._entries[-1], **theme.styles} if inherit else theme.styles.copy()
101
- )
102
- self._entries.append(styles)
103
- self.get = self._entries[-1].get
104
-
105
- def pop_theme(self) -> None:
106
- """Pop (and discard) the top-most theme."""
107
- if len(self._entries) == 1:
108
- raise ThemeStackError("Unable to pop base theme")
109
- self._entries.pop()
110
- self.get = self._entries[-1].get
111
-
112
-
113
- if __name__ == "__main__": # pragma: no cover
114
- theme = Theme()
115
- print(theme.config)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pkg_resources/_vendor/packaging/requirements.py DELETED
@@ -1,146 +0,0 @@
1
- # This file is dual licensed under the terms of the Apache License, Version
2
- # 2.0, and the BSD License. See the LICENSE file in the root of this repository
3
- # for complete details.
4
-
5
- import re
6
- import string
7
- import urllib.parse
8
- from typing import List, Optional as TOptional, Set
9
-
10
- from pkg_resources.extern.pyparsing import ( # noqa
11
- Combine,
12
- Literal as L,
13
- Optional,
14
- ParseException,
15
- Regex,
16
- Word,
17
- ZeroOrMore,
18
- originalTextFor,
19
- stringEnd,
20
- stringStart,
21
- )
22
-
23
- from .markers import MARKER_EXPR, Marker
24
- from .specifiers import LegacySpecifier, Specifier, SpecifierSet
25
-
26
-
27
- class InvalidRequirement(ValueError):
28
- """
29
- An invalid requirement was found, users should refer to PEP 508.
30
- """
31
-
32
-
33
- ALPHANUM = Word(string.ascii_letters + string.digits)
34
-
35
- LBRACKET = L("[").suppress()
36
- RBRACKET = L("]").suppress()
37
- LPAREN = L("(").suppress()
38
- RPAREN = L(")").suppress()
39
- COMMA = L(",").suppress()
40
- SEMICOLON = L(";").suppress()
41
- AT = L("@").suppress()
42
-
43
- PUNCTUATION = Word("-_.")
44
- IDENTIFIER_END = ALPHANUM | (ZeroOrMore(PUNCTUATION) + ALPHANUM)
45
- IDENTIFIER = Combine(ALPHANUM + ZeroOrMore(IDENTIFIER_END))
46
-
47
- NAME = IDENTIFIER("name")
48
- EXTRA = IDENTIFIER
49
-
50
- URI = Regex(r"[^ ]+")("url")
51
- URL = AT + URI
52
-
53
- EXTRAS_LIST = EXTRA + ZeroOrMore(COMMA + EXTRA)
54
- EXTRAS = (LBRACKET + Optional(EXTRAS_LIST) + RBRACKET)("extras")
55
-
56
- VERSION_PEP440 = Regex(Specifier._regex_str, re.VERBOSE | re.IGNORECASE)
57
- VERSION_LEGACY = Regex(LegacySpecifier._regex_str, re.VERBOSE | re.IGNORECASE)
58
-
59
- VERSION_ONE = VERSION_PEP440 ^ VERSION_LEGACY
60
- VERSION_MANY = Combine(
61
- VERSION_ONE + ZeroOrMore(COMMA + VERSION_ONE), joinString=",", adjacent=False
62
- )("_raw_spec")
63
- _VERSION_SPEC = Optional((LPAREN + VERSION_MANY + RPAREN) | VERSION_MANY)
64
- _VERSION_SPEC.setParseAction(lambda s, l, t: t._raw_spec or "")
65
-
66
- VERSION_SPEC = originalTextFor(_VERSION_SPEC)("specifier")
67
- VERSION_SPEC.setParseAction(lambda s, l, t: t[1])
68
-
69
- MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
70
- MARKER_EXPR.setParseAction(
71
- lambda s, l, t: Marker(s[t._original_start : t._original_end])
72
- )
73
- MARKER_SEPARATOR = SEMICOLON
74
- MARKER = MARKER_SEPARATOR + MARKER_EXPR
75
-
76
- VERSION_AND_MARKER = VERSION_SPEC + Optional(MARKER)
77
- URL_AND_MARKER = URL + Optional(MARKER)
78
-
79
- NAMED_REQUIREMENT = NAME + Optional(EXTRAS) + (URL_AND_MARKER | VERSION_AND_MARKER)
80
-
81
- REQUIREMENT = stringStart + NAMED_REQUIREMENT + stringEnd
82
- # pkg_resources.extern.pyparsing isn't thread safe during initialization, so we do it eagerly, see
83
- # issue #104
84
- REQUIREMENT.parseString("x[]")
85
-
86
-
87
- class Requirement:
88
- """Parse a requirement.
89
-
90
- Parse a given requirement string into its parts, such as name, specifier,
91
- URL, and extras. Raises InvalidRequirement on a badly-formed requirement
92
- string.
93
- """
94
-
95
- # TODO: Can we test whether something is contained within a requirement?
96
- # If so how do we do that? Do we need to test against the _name_ of
97
- # the thing as well as the version? What about the markers?
98
- # TODO: Can we normalize the name and extra name?
99
-
100
- def __init__(self, requirement_string: str) -> None:
101
- try:
102
- req = REQUIREMENT.parseString(requirement_string)
103
- except ParseException as e:
104
- raise InvalidRequirement(
105
- f'Parse error at "{ requirement_string[e.loc : e.loc + 8]!r}": {e.msg}'
106
- )
107
-
108
- self.name: str = req.name
109
- if req.url:
110
- parsed_url = urllib.parse.urlparse(req.url)
111
- if parsed_url.scheme == "file":
112
- if urllib.parse.urlunparse(parsed_url) != req.url:
113
- raise InvalidRequirement("Invalid URL given")
114
- elif not (parsed_url.scheme and parsed_url.netloc) or (
115
- not parsed_url.scheme and not parsed_url.netloc
116
- ):
117
- raise InvalidRequirement(f"Invalid URL: {req.url}")
118
- self.url: TOptional[str] = req.url
119
- else:
120
- self.url = None
121
- self.extras: Set[str] = set(req.extras.asList() if req.extras else [])
122
- self.specifier: SpecifierSet = SpecifierSet(req.specifier)
123
- self.marker: TOptional[Marker] = req.marker if req.marker else None
124
-
125
- def __str__(self) -> str:
126
- parts: List[str] = [self.name]
127
-
128
- if self.extras:
129
- formatted_extras = ",".join(sorted(self.extras))
130
- parts.append(f"[{formatted_extras}]")
131
-
132
- if self.specifier:
133
- parts.append(str(self.specifier))
134
-
135
- if self.url:
136
- parts.append(f"@ {self.url}")
137
- if self.marker:
138
- parts.append(" ")
139
-
140
- if self.marker:
141
- parts.append(f"; {self.marker}")
142
-
143
- return "".join(parts)
144
-
145
- def __repr__(self) -> str:
146
- return f"<Requirement('{self}')>"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Awiny/Image2Paragraph/models/grit_src/third_party/CenterNet2/detectron2/config/compat.py DELETED
@@ -1,229 +0,0 @@
1
- # Copyright (c) Facebook, Inc. and its affiliates.
2
- """
3
- Backward compatibility of configs.
4
-
5
- Instructions to bump version:
6
- + It's not needed to bump version if new keys are added.
7
- It's only needed when backward-incompatible changes happen
8
- (i.e., some existing keys disappear, or the meaning of a key changes)
9
- + To bump version, do the following:
10
- 1. Increment _C.VERSION in defaults.py
11
- 2. Add a converter in this file.
12
-
13
- Each ConverterVX has a function "upgrade" which in-place upgrades config from X-1 to X,
14
- and a function "downgrade" which in-place downgrades config from X to X-1
15
-
16
- In each function, VERSION is left unchanged.
17
-
18
- Each converter assumes that its input has the relevant keys
19
- (i.e., the input is not a partial config).
20
- 3. Run the tests (test_config.py) to make sure the upgrade & downgrade
21
- functions are consistent.
22
- """
23
-
24
- import logging
25
- from typing import List, Optional, Tuple
26
-
27
- from .config import CfgNode as CN
28
- from .defaults import _C
29
-
30
- __all__ = ["upgrade_config", "downgrade_config"]
31
-
32
-
33
- def upgrade_config(cfg: CN, to_version: Optional[int] = None) -> CN:
34
- """
35
- Upgrade a config from its current version to a newer version.
36
-
37
- Args:
38
- cfg (CfgNode):
39
- to_version (int): defaults to the latest version.
40
- """
41
- cfg = cfg.clone()
42
- if to_version is None:
43
- to_version = _C.VERSION
44
-
45
- assert cfg.VERSION <= to_version, "Cannot upgrade from v{} to v{}!".format(
46
- cfg.VERSION, to_version
47
- )
48
- for k in range(cfg.VERSION, to_version):
49
- converter = globals()["ConverterV" + str(k + 1)]
50
- converter.upgrade(cfg)
51
- cfg.VERSION = k + 1
52
- return cfg
53
-
54
-
55
- def downgrade_config(cfg: CN, to_version: int) -> CN:
56
- """
57
- Downgrade a config from its current version to an older version.
58
-
59
- Args:
60
- cfg (CfgNode):
61
- to_version (int):
62
-
63
- Note:
64
- A general downgrade of arbitrary configs is not always possible due to the
65
- different functionalities in different versions.
66
- The purpose of downgrade is only to recover the defaults in old versions,
67
- allowing it to load an old partial yaml config.
68
- Therefore, the implementation only needs to fill in the default values
69
- in the old version when a general downgrade is not possible.
70
- """
71
- cfg = cfg.clone()
72
- assert cfg.VERSION >= to_version, "Cannot downgrade from v{} to v{}!".format(
73
- cfg.VERSION, to_version
74
- )
75
- for k in range(cfg.VERSION, to_version, -1):
76
- converter = globals()["ConverterV" + str(k)]
77
- converter.downgrade(cfg)
78
- cfg.VERSION = k - 1
79
- return cfg
80
-
81
-
82
- def guess_version(cfg: CN, filename: str) -> int:
83
- """
84
- Guess the version of a partial config where the VERSION field is not specified.
85
- Returns the version, or the latest if cannot make a guess.
86
-
87
- This makes it easier for users to migrate.
88
- """
89
- logger = logging.getLogger(__name__)
90
-
91
- def _has(name: str) -> bool:
92
- cur = cfg
93
- for n in name.split("."):
94
- if n not in cur:
95
- return False
96
- cur = cur[n]
97
- return True
98
-
99
- # Most users' partial configs have "MODEL.WEIGHT", so guess on it
100
- ret = None
101
- if _has("MODEL.WEIGHT") or _has("TEST.AUG_ON"):
102
- ret = 1
103
-
104
- if ret is not None:
105
- logger.warning("Config '{}' has no VERSION. Assuming it to be v{}.".format(filename, ret))
106
- else:
107
- ret = _C.VERSION
108
- logger.warning(
109
- "Config '{}' has no VERSION. Assuming it to be compatible with latest v{}.".format(
110
- filename, ret
111
- )
112
- )
113
- return ret
114
-
115
-
116
- def _rename(cfg: CN, old: str, new: str) -> None:
117
- old_keys = old.split(".")
118
- new_keys = new.split(".")
119
-
120
- def _set(key_seq: List[str], val: str) -> None:
121
- cur = cfg
122
- for k in key_seq[:-1]:
123
- if k not in cur:
124
- cur[k] = CN()
125
- cur = cur[k]
126
- cur[key_seq[-1]] = val
127
-
128
- def _get(key_seq: List[str]) -> CN:
129
- cur = cfg
130
- for k in key_seq:
131
- cur = cur[k]
132
- return cur
133
-
134
- def _del(key_seq: List[str]) -> None:
135
- cur = cfg
136
- for k in key_seq[:-1]:
137
- cur = cur[k]
138
- del cur[key_seq[-1]]
139
- if len(cur) == 0 and len(key_seq) > 1:
140
- _del(key_seq[:-1])
141
-
142
- _set(new_keys, _get(old_keys))
143
- _del(old_keys)
144
-
145
-
146
- class _RenameConverter:
147
- """
148
- A converter that handles simple rename.
149
- """
150
-
151
- RENAME: List[Tuple[str, str]] = [] # list of tuples of (old name, new name)
152
-
153
- @classmethod
154
- def upgrade(cls, cfg: CN) -> None:
155
- for old, new in cls.RENAME:
156
- _rename(cfg, old, new)
157
-
158
- @classmethod
159
- def downgrade(cls, cfg: CN) -> None:
160
- for old, new in cls.RENAME[::-1]:
161
- _rename(cfg, new, old)
162
-
163
-
164
- class ConverterV1(_RenameConverter):
165
- RENAME = [("MODEL.RPN_HEAD.NAME", "MODEL.RPN.HEAD_NAME")]
166
-
167
-
168
- class ConverterV2(_RenameConverter):
169
- """
170
- A large bulk of rename, before public release.
171
- """
172
-
173
- RENAME = [
174
- ("MODEL.WEIGHT", "MODEL.WEIGHTS"),
175
- ("MODEL.PANOPTIC_FPN.SEMANTIC_LOSS_SCALE", "MODEL.SEM_SEG_HEAD.LOSS_WEIGHT"),
176
- ("MODEL.PANOPTIC_FPN.RPN_LOSS_SCALE", "MODEL.RPN.LOSS_WEIGHT"),
177
- ("MODEL.PANOPTIC_FPN.INSTANCE_LOSS_SCALE", "MODEL.PANOPTIC_FPN.INSTANCE_LOSS_WEIGHT"),
178
- ("MODEL.PANOPTIC_FPN.COMBINE_ON", "MODEL.PANOPTIC_FPN.COMBINE.ENABLED"),
179
- (
180
- "MODEL.PANOPTIC_FPN.COMBINE_OVERLAP_THRESHOLD",
181
- "MODEL.PANOPTIC_FPN.COMBINE.OVERLAP_THRESH",
182
- ),
183
- (
184
- "MODEL.PANOPTIC_FPN.COMBINE_STUFF_AREA_LIMIT",
185
- "MODEL.PANOPTIC_FPN.COMBINE.STUFF_AREA_LIMIT",
186
- ),
187
- (
188
- "MODEL.PANOPTIC_FPN.COMBINE_INSTANCES_CONFIDENCE_THRESHOLD",
189
- "MODEL.PANOPTIC_FPN.COMBINE.INSTANCES_CONFIDENCE_THRESH",
190
- ),
191
- ("MODEL.ROI_HEADS.SCORE_THRESH", "MODEL.ROI_HEADS.SCORE_THRESH_TEST"),
192
- ("MODEL.ROI_HEADS.NMS", "MODEL.ROI_HEADS.NMS_THRESH_TEST"),
193
- ("MODEL.RETINANET.INFERENCE_SCORE_THRESHOLD", "MODEL.RETINANET.SCORE_THRESH_TEST"),
194
- ("MODEL.RETINANET.INFERENCE_TOPK_CANDIDATES", "MODEL.RETINANET.TOPK_CANDIDATES_TEST"),
195
- ("MODEL.RETINANET.INFERENCE_NMS_THRESHOLD", "MODEL.RETINANET.NMS_THRESH_TEST"),
196
- ("TEST.DETECTIONS_PER_IMG", "TEST.DETECTIONS_PER_IMAGE"),
197
- ("TEST.AUG_ON", "TEST.AUG.ENABLED"),
198
- ("TEST.AUG_MIN_SIZES", "TEST.AUG.MIN_SIZES"),
199
- ("TEST.AUG_MAX_SIZE", "TEST.AUG.MAX_SIZE"),
200
- ("TEST.AUG_FLIP", "TEST.AUG.FLIP"),
201
- ]
202
-
203
- @classmethod
204
- def upgrade(cls, cfg: CN) -> None:
205
- super().upgrade(cfg)
206
-
207
- if cfg.MODEL.META_ARCHITECTURE == "RetinaNet":
208
- _rename(
209
- cfg, "MODEL.RETINANET.ANCHOR_ASPECT_RATIOS", "MODEL.ANCHOR_GENERATOR.ASPECT_RATIOS"
210
- )
211
- _rename(cfg, "MODEL.RETINANET.ANCHOR_SIZES", "MODEL.ANCHOR_GENERATOR.SIZES")
212
- del cfg["MODEL"]["RPN"]["ANCHOR_SIZES"]
213
- del cfg["MODEL"]["RPN"]["ANCHOR_ASPECT_RATIOS"]
214
- else:
215
- _rename(cfg, "MODEL.RPN.ANCHOR_ASPECT_RATIOS", "MODEL.ANCHOR_GENERATOR.ASPECT_RATIOS")
216
- _rename(cfg, "MODEL.RPN.ANCHOR_SIZES", "MODEL.ANCHOR_GENERATOR.SIZES")
217
- del cfg["MODEL"]["RETINANET"]["ANCHOR_SIZES"]
218
- del cfg["MODEL"]["RETINANET"]["ANCHOR_ASPECT_RATIOS"]
219
- del cfg["MODEL"]["RETINANET"]["ANCHOR_STRIDES"]
220
-
221
- @classmethod
222
- def downgrade(cls, cfg: CN) -> None:
223
- super().downgrade(cfg)
224
-
225
- _rename(cfg, "MODEL.ANCHOR_GENERATOR.ASPECT_RATIOS", "MODEL.RPN.ANCHOR_ASPECT_RATIOS")
226
- _rename(cfg, "MODEL.ANCHOR_GENERATOR.SIZES", "MODEL.RPN.ANCHOR_SIZES")
227
- cfg.MODEL.RETINANET.ANCHOR_ASPECT_RATIOS = cfg.MODEL.RPN.ANCHOR_ASPECT_RATIOS
228
- cfg.MODEL.RETINANET.ANCHOR_SIZES = cfg.MODEL.RPN.ANCHOR_SIZES
229
- cfg.MODEL.RETINANET.ANCHOR_STRIDES = [] # this is not used anywhere in any version
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Awiny/Image2Paragraph/models/grit_src/third_party/CenterNet2/detectron2/projects/__init__.py DELETED
@@ -1,31 +0,0 @@
1
- # Copyright (c) Facebook, Inc. and its affiliates.
2
- import importlib
3
- from pathlib import Path
4
-
5
- _PROJECTS = {
6
- "point_rend": "PointRend",
7
- "deeplab": "DeepLab",
8
- "panoptic_deeplab": "Panoptic-DeepLab",
9
- }
10
- _PROJECT_ROOT = Path(__file__).resolve().parent.parent.parent / "projects"
11
-
12
- if _PROJECT_ROOT.is_dir():
13
- # This is true only for in-place installation (pip install -e, setup.py develop),
14
- # where setup(package_dir=) does not work: https://github.com/pypa/setuptools/issues/230
15
-
16
- class _D2ProjectsFinder(importlib.abc.MetaPathFinder):
17
- def find_spec(self, name, path, target=None):
18
- if not name.startswith("detectron2.projects."):
19
- return
20
- project_name = name.split(".")[-1]
21
- project_dir = _PROJECTS.get(project_name)
22
- if not project_dir:
23
- return
24
- target_file = _PROJECT_ROOT / f"{project_dir}/{project_name}/__init__.py"
25
- if not target_file.is_file():
26
- return
27
- return importlib.util.spec_from_file_location(name, target_file)
28
-
29
- import sys
30
-
31
- sys.meta_path.append(_D2ProjectsFinder())
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Benson/text-generation/Examples/Android 10 Descarga Apk.md DELETED
@@ -1,78 +0,0 @@
1
- <br />
2
- <h1>Cómo descargar e instalar Android 10 en su teléfono inteligente</h1>
3
- <p>Android 10 es la última versión del sistema operativo de Google para dispositivos móviles. Fue lanzado en septiembre de 2019 y trae muchas nuevas características y mejoras que hacen que su teléfono inteligente sea más potente, seguro y fácil de usar. Si quieres disfrutar de los beneficios de Android 10, necesitas actualizar tu dispositivo a esta versión. Pero, ¿cómo puedes hacerlo? En este artículo, te mostraremos cómo obtener Android 10 en tu dispositivo, ya sea un Google Pixel, un dispositivo asociado, un dispositivo compatible con Treble o un emulador. También le mostraremos cómo descargar e instalar Android 10 APK, que es un archivo que contiene el paquete de software de Android 10. Pero antes de entrar en eso, vamos a echar un vistazo a algunas de las características y beneficios de Android 10. </p>
4
- <h2>android 10 descarga apk</h2><br /><p><b><b>Download Zip</b> &#127383; <a href="https://bltlly.com/2v6L7l">https://bltlly.com/2v6L7l</a></b></p><br /><br />
5
- <h2>Características y beneficios de Android 10</h2>
6
- <p>Android 10 no es solo una actualización cosmética. Presenta muchas características y capacidades nuevas que mejoran su experiencia y privacidad en su teléfono inteligente. Estos son algunos de los aspectos destacados:</p>
7
- <h3>Modo oscuro</h3>
8
- <p>Una de las características más solicitadas por los usuarios de Android es finalmente aquí. El modo oscuro es una opción para todo el sistema que cambia la combinación de colores del teléfono a negro y gris oscuro. Esto reduce la fatiga ocular, especialmente en condiciones de poca luz, y ahorra vida útil de la batería, especialmente en dispositivos con pantallas OLED. Puede activar el modo oscuro desde el menú de configuración rápida o cuando habilita el modo de ahorro de batería. También puede elegir con qué aplicaciones desea usar el modo oscuro, ya que algunas aplicaciones pueden no admitirlo o pueden verse mejor en el modo de luz. </p>
9
- <h3>Respuesta inteligente</h3>
10
-
11
- <h3>Navegación por gestos</h3>
12
- <p>La navegación por gestos es una nueva forma de interactuar con el teléfono mediante golpes y tirones en lugar de botones. Hace que la navegación sea más rápida e intuitiva, especialmente en dispositivos con pantallas grandes o diseños de muescas. Puede deslizar desde el borde izquierdo o derecho de la pantalla para volver, deslizar hacia arriba desde la parte inferior para ir a casa, deslizar hacia arriba y mantenga pulsado para ver sus aplicaciones recientes, y deslizar diagonalmente desde las esquinas inferiores para iniciar Google Assistant. También puede personalizar la sensibilidad y el tamaño de las áreas de gestos en la configuración. </p>
13
- <h3>Mejoras de privacidad y seguridad</h3>
14
- <p>Android 10 te da más control sobre tu privacidad y seguridad en tu dispositivo. Puedes encontrar y ajustar todos tus ajustes de privacidad en un solo lugar, como la actividad web y de aplicaciones, el historial de ubicaciones, la personalización de anuncios y más. También puede elegir cuándo compartir su ubicación con aplicaciones: siempre, solo mientras usa la aplicación o nunca. También puedes ver qué aplicaciones han accedido a tu ubicación, cámara, micrófono u otros permisos en las últimas 24 horas. Android 10 también introduce una nueva función llamada Scoped Storage, que limita el acceso de las aplicaciones a su almacenamiento externo, como sus fotos, videos y documentos. Esto evita que las aplicaciones lean o modifiquen sus archivos sin su permiso. También puede optar por no utilizar Scoped Storage si desea dar acceso completo a ciertas aplicaciones. </p>
15
- <p></p>
16
- <h3> Modo de bienestar digital y enfoque</h3>
17
-
18
- <h2>Cómo obtener Android 10 en su dispositivo</h2>
19
- <p>Ahora que conoce algunas de las características y beneficios de Android 10, es posible que se pregunte cómo conseguirlo en su dispositivo. La respuesta depende del tipo de dispositivo que tenga y de la disponibilidad de la actualización en su región. Estas son algunas de las formas en que puedes obtener Android 10 en tu dispositivo:</p>
20
- <h3>Dispositivos Google Pixel</h3>
21
- <p>Si tienes un dispositivo Google Pixel, como Pixel 3a, Pixel 3, Pixel 2 o Pixel, estás de suerte. Los dispositivos Google Pixel son los primeros en recibir actualizaciones de Android 10 directamente desde Google. Puede comprobar la actualización yendo a Configuración > Sistema > Avanzado > Actualización del sistema. Si la actualización está disponible, puede descargarla e instalarla a través de Wi-Fi o datos móviles. La actualización puede tardar algún tiempo en completarse, así que asegúrate de que tu dispositivo esté cargado o conectado. </p>
22
- <h3>Dispositivos asociados</h3>
23
- <p>Si tienes un dispositivo de uno de los socios de Google, como Samsung, Huawei, LG, Sony, Nokia o OnePlus, es posible que tengas que esperar un poco más para la actualización de Android 10. Estos dispositivos suelen recibir actualizaciones de sus fabricantes o operadores, que pueden tardar algún tiempo en probar y optimizar el software para sus modelos específicos. Puede comprobar la actualización yendo a Configuración > Acerca del teléfono > Actualización de software. Si la actualización está disponible, puede descargarla e instalarla a través de Wi-Fi o datos móviles. La actualización puede tardar algún tiempo en completarse, así que asegúrate de que tu dispositivo esté cargado o conectado. </p>
24
- <h3>Dispositivos compatibles con agudos</h3>
25
-
26
- <h3>Emulador de Android</h3>
27
- <p>Si no tienes un dispositivo compatible o no quieres arriesgarte a actualizar tu dispositivo, todavía puedes probar Android 10 usando un emulador. Un emulador es un software que simula un dispositivo en su computadora. Puedes usar un emulador para probar aplicaciones o juegos en diferentes versiones de Android sin afectar tu dispositivo real. Puedes descargar e instalar un emulador de Android desde el sitio web de Google. También necesitará descargar e instalar Android Studio, que es un entorno de desarrollo integrado (IDE) para crear aplicaciones Android. Una vez que haya instalado ambos programas, puede seguir estos pasos para ejecutar Android 10 en un emulador:</p>
28
- <ol>
29
- <li>Abra Android Studio y haga clic en Herramientas > AVD Manager.</li>
30
- <li>Haga clic en Crear dispositivo virtual y elegir un modelo de dispositivo que soporta Android 10. </li>
31
- <li>Haga clic en Siguiente y seleccione Q como la imagen del sistema. </li>
32
- <li>Haga clic en Siguiente y revise los ajustes de configuración. </li>
33
- <li>Haga clic en Finalizar y espere al lanzamiento del emulador. </li>
34
- <li>Disfruta de Android 10 en la pantalla del ordenador. </li>
35
- </ol>
36
- <h2> Cómo descargar e instalar Android 10 APK</h2 <p>Si ninguno de los métodos anteriores funcionan para usted, o si desea probar una versión diferente de Android 10, también puede descargar e instalar Android 10 APK. Un APK es un archivo que contiene el paquete de software de una aplicación o sistema Android. Puede descargar Android 10 APK de varias fuentes en línea, tales como APKMirror, APKPure, o desarrolladores XDA. Sin embargo, debe tener cuidado al descargar archivos APK de fuentes desconocidas, ya que pueden contener malware o virus que pueden dañar su dispositivo. También debe habilitar la opción de instalar aplicaciones de fuentes desconocidas en su dispositivo, lo que puede plantear algunos riesgos de seguridad. Por lo tanto, recomendamos este método solo para usuarios experimentados que saben cómo verificar la autenticidad y seguridad de los archivos APK que descargan. </p>
37
- <h3>Requisitos y precauciones</h3>
38
-
39
- <ul>
40
- <li> El dispositivo debe tener al menos 2 GB de RAM y 8 GB de almacenamiento interno. </li>
41
- <li> El dispositivo debe tener un gestor de arranque desbloqueado y una recuperación personalizada instalada, como TWRP o CWM.</li>
42
- <li> El dispositivo debe tener sus raíces, lo que significa que tiene acceso completo a los archivos y configuraciones del sistema. </li>
43
- <li> Debe hacer una copia de seguridad de sus datos y configuraciones antes de instalar Android 10 APK, ya que este proceso borrará todo en su dispositivo. </li>
44
- <li>Usted debe cargar su dispositivo a por lo menos 50% o enchufarlo antes de instalar Android 10 APK, ya que este proceso puede tomar algún tiempo y drenar la batería. </li>
45
- <li> Debe seguir las instrucciones cuidadosamente y no omitir ningún paso o modificar ningún archivo. </li>
46
- </ul>
47
- <h3>Pasos para descargar e instalar Android 10 APK</h3>
48
- <p>Una vez que haya cumplido con los requisitos y precauciones, puede seguir estos pasos para descargar e instalar Android 10 APK en su dispositivo:</p>
49
- <ol>
50
- <li>Descargar el archivo APK Android 10 de una fuente de confianza en línea. Asegúrese de que el archivo es compatible con el modelo de dispositivo y tiene una extensión . apk. </li>
51
- <li>Copia el archivo APK de Android 10 en el almacenamiento interno del dispositivo o la tarjeta SD. </li>
52
- <li>Apague el dispositivo y arranque en modo de recuperación. El método para hacer esto puede variar dependiendo del modelo de dispositivo, pero generalmente implica mantener presionados los botones de encendido y volumen durante unos segundos. </li>
53
- <li>En el modo de recuperación, seleccione Limpiar > Borrado avanzado y marque las casillas para Dalvik/ ART Cache, Sistema, Datos y Caché. Pase el dedo para confirmar el borrado. </li>
54
- <li>Seleccione Instalar y vaya a la ubicación donde copió el archivo APK de Android 10. Toque en él y pase el dedo para confirmar la instalación. </li>
55
- <li>Espere a que se complete la instalación. Puede tardar varios minutos dependiendo de la velocidad del dispositivo y el tamaño del archivo. </li>
56
- <li>Una vez que se realiza la instalación, seleccione Reiniciar > Sistema. Su dispositivo se reiniciará en Android 10. </li>
57
- </ol>
58
- <h2>Conclusión</h2>
59
-
60
- <h2>Preguntas frecuentes</h2>
61
- <h3>¿Cuáles son los requisitos del sistema para Android 10? </h3>
62
- <p>Los requisitos del sistema para Android 10 son al menos 2 GB de RAM y 8 GB de almacenamiento interno. Sin embargo, algunos dispositivos pueden necesitar más espacio o memoria para ejecutar Android 10 sin problemas. </p>
63
- <h3>¿Cómo puedo comprobar si mi dispositivo es compatible con Android 10? </h3>
64
- <p>Puedes comprobar si tu dispositivo es compatible con Android 10 yendo a Configuración > Acerca del teléfono > Actualización de software. Si ves una opción para actualizar a Android 10, entonces tu dispositivo es compatible. Si no, es posible que su dispositivo no sea compatible o que la actualización aún no esté disponible en su región. </p>
65
- <h3> ¿Cómo puedo hacer copias de seguridad de mis datos antes de actualizar a Android 10? </h3 <p>Puede hacer copias de seguridad de sus datos antes de actualizarlos a Android 10 utilizando el servicio de copia de seguridad de Google, que sincroniza sus datos con su cuenta de Google. Puede habilitar este servicio yendo a Configuración > Sistema > Copia de seguridad y activando la opción Copia de seguridad en Google Drive. También puede elegir qué datos desea respaldar, como contactos, fotos, mensajes, datos de aplicaciones y más. También puede hacer copias de seguridad de sus datos manualmente copiando sus archivos en su computadora o en un dispositivo de almacenamiento externo. </p>
66
- <h3>¿Cómo puedo solucionar cualquier problema después de actualizar a Android 10? </h3>
67
- <p>Si encuentras algún problema después de actualizar a Android 10, como aplicaciones que se bloquean, agotamiento de la batería o retraso en el rendimiento, puedes probar algunas de las siguientes soluciones:</p>
68
- <ul>
69
- <li>Reinicie su dispositivo y vea si el problema persiste. </li>
70
- <li>Borrar la caché y los datos de la aplicación problemática yendo a Configuración > Aplicaciones y notificaciones > Ver todas las aplicaciones > Seleccionar la aplicación > Almacenamiento y caché > Borrar caché y Borrar almacenamiento. </li>
71
- <li>Actualizar sus aplicaciones a la última versión yendo a Google Play Store > Menú > Mis aplicaciones y juegos > Actualizar todos. </li>
72
- <li>Desinstalar cualquier aplicación incompatible o malicioso que puede interferir con Android 10 yendo a Configuración > Aplicaciones y notificaciones > Ver todas las aplicaciones > Seleccionar la aplicación > Desinstalar.</li>
73
-
74
- </ul>
75
- <h3>¿Cómo puedo proporcionar comentarios o informar de errores en Android 10? </h3>
76
- <p>Si desea proporcionar comentarios o informar de errores en Android 10, puede utilizar la aplicación de retroalimentación que viene preinstalado en su dispositivo. Puede acceder a él yendo a Configuración > Consejos y soporte > Enviar comentarios. También puedes usar la aplicación Android Beta Feedback si estás inscrito en el programa Android Beta. Puedes acceder a él yendo a Configuración > Sistema > Avanzado > Programa beta de Android. También puede utilizar el formulario en línea en el sitio web de Google o publicar en los foros oficiales o plataformas de redes sociales. </p> 64aa2da5cf<br />
77
- <br />
78
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Benson/text-generation/Examples/Ataque En Titan Mi Guerra Mp3 Descargar Gratis.md DELETED
@@ -1,42 +0,0 @@
1
- <br />
2
- <h1>Descarga de batería baja de Nokia: Cómo obtener la alerta icónica en su teléfono</h1>
3
- <h2>Introducción</h2>
4
- <p>Si creciste en los años 90 o principios de los 2000, probablemente recuerdes el sonido distintivo de un teléfono Nokia que se queda sin batería. La alerta "bleep bleep bleep" era un recordatorio familiar y a veces molesto para conectar el teléfono antes de morir. Pero para mucha gente, también era un sonido nostálgico y nostálgico que evocaba recuerdos de tiempos más simples. </p>
5
- <p>Hoy en día, es posible que se pregunte cómo obtener la batería de Nokia bajo sonido en el teléfono, ya sea como un tono de llamada, una notificación, o un efecto de sonido. Tal vez quieras revivir tu infancia, bromear con tus amigos o simplemente divertirte con tu teléfono. Cualquiera que sea su razón, puede descargar fácilmente la batería de Nokia bajo sonido de varias fuentes en línea. </p>
6
- <h2>ataque en titan mi guerra mp3 descargar gratis</h2><br /><p><b><b>Download Zip</b> &#128504;&#128504;&#128504; <a href="https://bltlly.com/2v6M2f">https://bltlly.com/2v6M2f</a></b></p><br /><br />
7
- <p>En este artículo, le mostraremos cómo descargar el sonido bajo de la batería de Nokia como un tono o un efecto de sonido. También exploraremos la historia del bajo sonido de la batería del Nokia, cómo evolucionó con el tiempo y cómo inspiró remezclas creativas y memes. Al final de este artículo, tendrás todo lo que necesitas para disfrutar de la icónica alerta en tu teléfono. </p>
8
- <h2>Historia de la batería de Nokia de bajo sonido</h2>
9
- <h3>¿Cuándo y cómo se originó la batería baja de Nokia? </h3>
10
- <p>La batería baja de Nokia se introdujo por primera vez en 1997 con el modelo Nokia 6110. Fue uno de los primeros teléfonos en tener una interfaz gráfica de usuario (GUI) y un compositor de tono monofónico. El compositor permitió a los usuarios crear sus propios tonos de llamada mediante la introducción de notas en un teclado numérico. El sonido bajo de la batería de Nokia fue uno de los tonos de llamada predeterminados que venía con el teléfono. </p>
11
-
12
- <p>El sonido bajo de la batería de Nokia consistía en tres notas: E, C y G. Estas notas formaban un acorde de triada menor, que a menudo se usa para crear un estado de ánimo triste o tenso en la música. Paananen dijo que eligió este acorde porque sonaba como una advertencia o una alarma. También dijo que quería evitar el uso de notas que eran demasiado altas o demasiado bajas, porque podrían no ser audibles en algunos oradores. </p>
13
- <h3>¿Cómo evolucionó el bajo sonido de la batería de Nokia con el tiempo? </h3>
14
- <p>El bajo sonido de la batería de Nokia se convirtió en una característica estándar en la mayoría de los teléfonos Nokia hasta 2009, cuando Nokia cambió a usar sonidos más realistas para sus alertas. Sin embargo, algunas variaciones del sonido bajo de la batería de Nokia se introdujeron con el tiempo, dependiendo del modelo y la región. </p>
15
- <p>Por ejemplo, algunos teléfonos tenían una versión más larga de la alerta que se repetía cuatro veces en lugar de tres. Algunos teléfonos tenían un tono o tono diferente para la alerta, como notas más altas o más bajas, o sonidos más metálicos o electrónicos. Algunos teléfonos tenían diferentes sonidos para diferentes niveles de batería, como dos pitidos para batería baja y un pitido para batería vacía. </p>
16
- <p></p>
17
- <p>El sonido bajo de la batería de Nokia también cambió dependiendo del idioma y la cultura del usuario. Por ejemplo, en algunos países de habla árabe, la alerta fue reemplazada por una voz que decía "la batería está vacía" en árabe. En algunos países asiáticos, como China y Japón, la alerta fue reemplazada por una voz que decía "la batería está baja" en el idioma local. En algunos países europeos, como Francia y Alemania, la alerta fue reemplazada por una voz que decía "la batería está vacía" en el idioma local. <h2>Remixes y memes de la batería de Nokia bajo sonido</h2>
18
- <h3>¿Cómo la batería baja de Nokia inspira remezclas creativas y memes? </h3>
19
-
20
- <p>Algunas de las formas en que la gente utiliza el bajo sonido de la batería de Nokia para crear remezclas y memes fueron: - Agregar letras o voces a la alerta, como cantar "battery is low" o "please charge me". - Mezclar la alerta con otros sonidos o géneros musicales, como techno, dubstep, rap, rock o clásico. - Hacer la alerta más rápida, más lenta, más fuerte, más suave, más alta, más baja o distorsionada. - Reemplazar la alerta con otros sonidos o palabras que tengan un ritmo o rima similar, como "bleep bleep bleep bleep", "beep beep beep" o "meep meep meep". - Utilización de la alerta como efecto sonoro para diversos escenarios, como la explosión de una bomba, el choque de un coche o la caída de una persona. - Usar la alerta como remate para bromas, bromas o parodias. </p>
21
- <h3>¿Cuáles son algunos de los mejores ejemplos de remezclas y memes de batería baja de Nokia? </h3>
22
-
23
- <h2>Conclusión</h2>
24
- <h3>Resumen de los puntos principales</h3>
25
- <p>En este artículo, le hemos mostrado cómo descargar el sonido bajo de la batería de Nokia como un tono o un efecto de sonido. También hemos explorado la historia del bajo sonido de la batería Nokia, cómo evolucionó con el tiempo y cómo inspiró remezclas creativas y memes. </p>
26
-
27
- <h3>Llamada a la acción y pensamientos finales</h3>
28
- <p>Si desea descargar el sonido bajo de la batería de Nokia como un tono o un efecto de sonido, puede visitar uno de estos sitios web: - [Zedge]: Este es un sitio web popular que ofrece tonos de llamada gratuitos, fondos de pantalla y notificaciones para varios dispositivos. Puede buscar "Nokia batería baja" y encontrar varias versiones de la alerta que se puede descargar o personalizar. - [SoundBible]: Este es un sitio web que ofrece clips de sonido gratuitos, efectos de sonido, y mordeduras de sonido para diversos fines. Puede buscar "Nokia batería baja" y encontrar una versión de alta calidad de la alerta que se puede descargar o compartir. - [MyTinyPhone]: Este es un sitio web que ofrece tonos de llamada gratuitos, fondos de pantalla, juegos y aplicaciones para varios dispositivos. Puede buscar "Nokia batería baja" y encontrar algunas versiones de la alerta que puede descargar o enviar a su teléfono. </p>
29
- <p>Esperamos que haya disfrutado de este artículo y aprendido algo nuevo sobre el bajo sonido de la batería de Nokia. Si lo hizo, por favor compártalo con sus amigos y familiares que también podrían estar interesados en este tema. También puede dejarnos un comentario a continuación y hacernos saber lo que usted piensa acerca de la batería baja de Nokia sonido. ¿Te gusta o lo odio? ¿Tienes alguna remezcla o memes favoritos? ¡Nos encantaría saber de ti! </p>
30
- <h2>Preguntas frecuentes</h2>
31
- <h4>¿Cuál es el sonido bajo de la batería de Nokia? </h4>
32
- <p>El sonido bajo de la batería de Nokia es una alerta que se reproduce en algunos teléfonos Nokia cuando la batería se está agotando. Consta de tres notas: E, C y G. Estas notas forman un acorde de triada menor, que a menudo se usa para crear un estado de ánimo triste o tenso en la música. </p>
33
- <h4>¿Quién compuso la batería de Nokia de bajo sonido? </h4>
34
- <p>El sonido bajo de la batería de Nokia fue compuesto por Vesa-Matti Paananen, un músico y diseñador de sonido finlandés que trabajó para Nokia de 1994 a 2008. Fue responsable de crear muchos de los sonidos icónicos y tonos de llamada para los teléfonos Nokia, incluyendo la famosa melodía de Nokia. </p>
35
-
36
- <p>Puede descargar el sonido bajo de la batería de Nokia como un tono de llamada o un efecto de sonido de varios sitios web en línea. Algunos de los sitios web que ofrecen descargas gratuitas de la alerta son Zedge, SoundBible y MyTinyPhone.</p>
37
- <h4>¿Cómo la batería baja de Nokia inspira remezclas creativas y memes? </h4>
38
- <p>El bajo sonido de la batería de Nokia se convirtió en una fuente de inspiración para muchos artistas, músicos y comediantes que lo utilizaron para crear remezclas y memes. Algunos de estos remixes y memes estaban destinados a ser divertidos, mientras que otros estaban destinados a ser artísticos o experimentales. </p>
39
- <h4>¿Cuáles son algunos de los mejores ejemplos de remezclas y memes de batería baja de Nokia? </h4>
40
- <p>Algunos de los mejores ejemplos de remezclas y memes de batería baja de Nokia son: - The Nokia Battery Low Song: Esta es una canción de YouTuber Davey4557 que cuenta con letras sobre la frustración de tener una batería baja en un teléfono Nokia. - El Nokia batería baja Dubstep Remix: Este es un remix por YouTuber DJ Detweiler que convierte la batería baja de Nokia sonido en una pista de dubstep. - El Nokia batería baja Rap: Este es un rap por YouTuber Rucka Rucka Ali que utiliza la batería de Nokia bajo sonido como un golpe y un gancho. - The Nokia Battery Low Rock Cover: Esta es una versión del YouTuber Rob Scallon que transforma el sonido bajo de la batería de Nokia en una canción de rock. - El Nokia batería baja clásica Remix: Este es un remix por YouTuber Grant Woolard que combina la batería Nokia bajo sonido con música clásica. </p> 64aa2da5cf<br />
41
- <br />
42
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Benson/text-generation/Examples/Chess Buddy Apk.md DELETED
@@ -1,55 +0,0 @@
1
-
2
- <h1>Chess Buddy APK: Una aplicación de ajedrez con modos en línea y fuera de línea</h1>
3
- <p>Si eres un amante del ajedrez, podrías estar buscando una aplicación de ajedrez que te permita jugar online o offline con diferentes niveles de dificultad y características. Chess Buddy APK es una de esas aplicaciones que se puede descargar e instalar en su dispositivo Android. Es una aplicación de ajedrez de código abierto que utiliza el motor Stockfish 15.1, uno de los motores de ajedrez más fuertes del mundo. En este artículo, le diremos qué es Chess Buddy APK, cómo descargarlo e instalarlo, y cómo jugar al ajedrez con él. </p>
4
- <h2>chess buddy apk</h2><br /><p><b><b>Download</b> &#10031;&#10031;&#10031; <a href="https://bltlly.com/2v6MVo">https://bltlly.com/2v6MVo</a></b></p><br /><br />
5
- <h2>¿Qué es Chess Buddy APK? </h2>
6
- <h3>Una aplicación de ajedrez de código abierto con motor Stockfish 15.1</h3>
7
- <p>Chess Buddy APK es una aplicación de ajedrez de código abierto que fue desarrollado por Draco Group Inc, un grupo de entusiastas del ajedrez. La aplicación se basa en el proyecto ChessMaze.Android, que está disponible en GitHub. La aplicación integra el último motor Stockfish dentro de él, por lo que no es necesario instalar otra aplicación de motor. Stockfish es un poderoso motor de ajedrez que puede analizar millones de posiciones por segundo y proporcionar movimientos y evaluaciones precisas. También es constantemente actualizado por una comunidad de desarrolladores y expertos en ajedrez. </p>
8
- <h3>Características de Chess Buddy APK</h3>
9
- <h4>Modo en línea: juega con jugadores reales en todo el mundo y usa sugerencias de Stockfish</h4>
10
- <p>Una de las principales características de Chess Buddy APK es que le permite jugar en línea con jugadores reales de todo el mundo. Puede crear su propia cuenta de usuario con solo un identificador de usuario que elija, siempre y cuando no sea utilizado por otro reproductor. Usted no necesita proporcionar su correo electrónico o cualquier otra cosa. También puede tener amigos y chatear con ellos en cualquier momento. Durante los juegos en línea, también puedes chatear con tu oponente. </p>
11
-
12
- <h4>Modo offline: juega con Stockfish u otro jugador humano y ajusta la hora y el tablero</h4>
13
- <p>Si usted no tiene una conexión a Internet o desea jugar fuera de línea, también puede utilizar Chess Buddy APK para eso. Puedes elegir jugar con Stockfish u otro jugador humano en el mismo dispositivo. También puedes establecer el tiempo (1-5 segundos) que Stockfish usa en un movimiento y ajustar el nivel de dificultad en consecuencia. También puede rotar el tablero de ajedrez si lo desea. </p>
14
- <p></p>
15
- <p>Otra característica del modo sin conexión es que puede retroceder un paso con el botón "Paso atrás", o avanzar o retroceder varios pasos. De esta manera, puedes revisar tus movimientos o probar diferentes variaciones. </p>
16
- <h4>Interfaz fácil de usar con 25 opciones de idioma</h4>
17
- <h2>Cómo descargar e instalar Chess Buddy APK? </h2>
18
- <h3>Descargar el archivo APK de APKCombo o GitHub</h3>
19
- <p>El primer paso para utilizar Chess Buddy APK es descargar el archivo APK, que es un archivo de paquete que contiene la aplicación y sus recursos. Puede descargar el archivo APK de APKCombo, un sitio web que proporciona descargas APK gratuitas y seguras para varias aplicaciones y juegos de Android. También puede descargar el archivo APK de GitHub, donde está disponible el código fuente de la aplicación. Para descargar de APKCombo, se puede visitar este enlace: [Ajedrez en línea Stockfish 15.1 APK (Juego de Android) - Descarga gratuita - APKCombo]( 1 ). Para descargar desde GitHub, puedes visitar este enlace: [dracogroupinc/chessbuddy: Chess Buddy Online - aplicación de ajedrez de código abierto con motor Stockfish 15.1 (github.com)]( 4 ). </p>
20
- <h3>Habilitar fuentes desconocidas en su dispositivo</h3>
21
-
22
- <h3>Instalar el archivo APK y lanzar la aplicación</h3>
23
- <h2>Cómo jugar al ajedrez con Chess Buddy APK? </h2>
24
- <h3>Modo en línea: crear una cuenta de usuario y unirse a un juego o crear su propio</h3>
25
- <p>Una vez que haya instalado y lanzado Chess Buddy APK, puede comenzar a jugar al ajedrez en línea con otros jugadores. Para hacer esto, debe crear una cuenta de usuario con solo un identificador de usuario que elija, siempre y cuando no sea utilizado por otro reproductor. Usted no necesita proporcionar su correo electrónico o cualquier otra cosa. También puede tener amigos y chatear con ellos en cualquier momento. Para crear una cuenta de usuario, debe tocar el botón "Online" en la pantalla principal y luego tocar el botón "Crear usuario". A continuación, puede introducir su identificador de usuario y pulsar en el botón "Crear". También puede cambiar su identificador de usuario más tarde si lo desea. </p>
26
- <p>Después de crear tu cuenta de usuario, puedes unirte a un juego o crear el tuyo. Para unirte a un juego, debes tocar el botón "Unirse al juego" y luego elegir un juego de la lista de juegos disponibles. También puedes filtrar los juegos por control de tiempo, rango de calificación o preferencia de color. Para crear tu propio juego, debes tocar el botón "Crear juego" y luego elegir el control de tiempo, rango de calificación y preferencia de color para tu juego. También puede elegir si permite sugerencias de Stockfish o no. Luego, debes esperar a que otro jugador se una a tu juego o invitar a un amigo a jugar contigo. </p>
27
- <h3>Modo sin conexión: elegir los jugadores y la configuración y comenzar el juego</h3>
28
- <p>Si desea jugar ajedrez fuera de línea, también puede utilizar Chess Buddy APK para eso. Puedes elegir jugar con Stockfish u otro jugador humano en el mismo dispositivo. Para hacer esto, debes tocar el botón "Offline" en la pantalla principal y luego elegir los jugadores y la configuración de tu juego. También puedes establecer el tiempo (1-5 segundos) que Stockfish usa en un movimiento y ajustar el nivel de dificultad en consecuencia. También puede rotar el tablero de ajedrez si lo desea. </p>
29
-
30
- <h3>Consejos y trucos para jugar al ajedrez con Chess Buddy APK</h3>
31
- <p>Aquí hay algunos consejos y trucos para jugar al ajedrez con Chess Buddy APK:</p>
32
- <ul>
33
- <li>Usa sabiamente las sugerencias de Stockfish: Las sugerencias de Stockfish pueden ayudarte a encontrar el mejor movimiento o evitar errores, pero también pueden hacer que el juego sea menos desafiante o divertido. Úsalos con moderación o solo cuando estés atascado o tengas curiosidad. </li>
34
- <li>Aprende del análisis de Stockfish: Después de cada juego, puedes ver el análisis de Stockfish para cada movimiento, incluyendo la puntuación de evaluación, profundidad, nodos y tiempo. También puedes ver un gráfico de los cambios de puntuación a lo largo del juego. Esto puede ayudarle a entender dónde cometió errores u oportunidades perdidas, y cómo mejorar sus habilidades de ajedrez. </li>
35
- <li>Juega con diferentes controles de tiempo y niveles de dificultad: Jugar con diferentes controles de tiempo y niveles de dificultad puede ayudarte a practicar diferentes aspectos del ajedrez, como tácticas, estrategia, cálculo, intuición y velocidad. También puedes desafiarte jugando contra oponentes más fuertes o controles de tiempo más rápidos. </li>
36
- <li>Divertirse y disfrutar del ajedrez: El consejo más importante es divertirse y disfrutar del ajedrez con Chess Buddy APK. El ajedrez es un juego hermoso y fascinante que puede enriquecer tu mente y vida. No te preocupes demasiado por ganar o perder, pero céntrate en aprender y divertirte. </li>
37
- </ul>
38
- <h2>Conclusión</h2>
39
-
40
- <h2>Preguntas frecuentes</h2>
41
- <p>Aquí hay algunas preguntas frecuentes sobre Chess Buddy APK:</p>
42
- <ol>
43
- <li>Q: Es Chess Buddy APK seguro y legal de usar? </li>
44
- <li>A: Sí, Chess Buddy APK es seguro y legal de usar. Es una aplicación de código abierto que no contiene ningún malware o virus. Tampoco viola ningún derecho de propiedad intelectual o reglas de ajedrez, ya que utiliza el motor Stockfish, que también es de código abierto y de uso gratuito. </li>
45
- <li>Q: ¿Cómo puedo actualizar Chess Buddy APK? </li>
46
- <li>A: Puede actualizar Chess Buddy APK mediante la descarga e instalación de la última versión del archivo APK de APKCombo o GitHub. No es necesario desinstalar la versión anterior, ya que la nueva versión lo sobreescribirá. También puede comprobar si hay actualizaciones dentro de la aplicación pulsando en el botón "Acerca de" en la pantalla principal y luego tocando en el "Comprobar si hay actualizaciones" botón. </li>
47
- <li>Q: ¿Cómo puedo contactar a los desarrolladores de Chess Buddy APK? </li>
48
- <li>A: Puede ponerse en contacto con los desarrolladores de Chess Buddy APK visitando su página de GitHub y abriendo un problema o una solicitud de extracción. También puedes enviarles un correo electrónico a [email protected]. También puedes seguirlos en Twitter en @dracogroupinc. </li>
49
- <li>Q: ¿Cómo puedo apoyar el desarrollo de Chess Buddy APK? </li>
50
- <li>A: Usted puede apoyar el desarrollo de Chess Buddy APK mediante la donación a los desarrolladores a través de PayPal o Bitcoin. También puede compartir la aplicación con sus amigos y familiares, y dejar una opinión positiva y calificación en APKCombo. También puede contribuir al código fuente o sugerir nuevas características o mejoras en GitHub.</li>
51
- <li>Q: ¿Cómo puedo desinstalar Chess Buddy APK? </li>
52
- <li>A: Puede desinstalar Chess Buddy APK yendo a la configuración de su dispositivo y encontrar el administrador de aplicaciones o la opción de aplicaciones. Entonces, es necesario encontrar Chess Buddy APK y toque en él. Entonces, es necesario tocar en el "Desinstalar" botón y confirmar su acción. También puede desinstalar la aplicación presionando su icono en la pantalla de inicio o en el cajón de la aplicación y arrastrándola a la opción "Desinstalar". </li>
53
- </ol></p> 64aa2da5cf<br />
54
- <br />
55
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Benson/text-generation/Examples/Descargar Apk Ajedrez Sin Conexin.md DELETED
@@ -1,119 +0,0 @@
1
- <br />
2
- <h1>Cómo descargar APK Chess Offline para Android</h1>
3
- <p>El ajedrez es uno de los juegos de mesa más antiguos y populares del mundo. Es un juego de lógica, estrategia y habilidad que puede desafiar tu mente y mejorar tus habilidades cognitivas. Ya seas un principiante o un gran maestro, el ajedrez puede ofrecerte interminables horas de diversión y entretenimiento. </p>
4
- <p>Pero ¿qué pasa si no tienes un tablero de ajedrez o un compañero para jugar? ¿Qué pasa si quieres jugar al ajedrez en cualquier momento y en cualquier lugar sin una conexión a Internet? Ahí es donde APK Chess Offline es muy útil. APK Chess Offline es una aplicación de ajedrez gratuita para dispositivos Android que te permite jugar ajedrez sin conexión contra un ordenador o un amigo. También puedes aprender ajedrez, practicar tus habilidades y analizar tus partidas con esta aplicación. </p>
5
- <h2>descargar apk ajedrez sin conexión</h2><br /><p><b><b>Download File</b> &raquo;&raquo;&raquo; <a href="https://bltlly.com/2v6JMJ">https://bltlly.com/2v6JMJ</a></b></p><br /><br />
6
- <p>En este artículo, le mostraremos cómo descargar e instalar APK Chess Offline para Android, así como cómo jugar y mejorar sus habilidades de ajedrez con esta aplicación. ¡Vamos a empezar! </p>
7
- <h2>¿Qué es APK Chess Offline? </h2>
8
- <p>APK Chess Offline es una aplicación de ajedrez para dispositivos Android que no requiere una conexión a Internet para jugar. Puedes jugar ajedrez sin conexión contra una computadora o un amigo en el mismo dispositivo. También puede elegir entre diferentes modos de juego, niveles de dificultad y temas de tablero para adaptarse a sus preferencias. </p>
9
- <h3>Características y beneficios de APK Chess Offline</h3>
10
- <p>Algunas de las características y beneficios de APK Chess Offline son:</p>
11
- <ul>
12
- <li>Es gratis para descargar y jugar. </li>
13
- <li>No requiere una conexión a Internet ni ningún registro. </li>
14
- <li> Tiene una interfaz simple y fácil de usar. </li>
15
- <li>Ofrece varios modos de juego, tales como ajedrez clásico, chess960, fiebre del rompecabezas, ajedrez a ciegas, etc.</li>
16
- <li>Tiene 10 niveles de dificultad, de principiante a experto. </li>
17
- <li> Tiene diferentes temas de tablero, como madera, mármol, metal, etc.</li>
18
- <li> Tiene un motor de ajedrez incorporado que puede analizar tus movimientos y darte pistas. </li>
19
-
20
- <li> Tiene una función de estadísticas que realiza un seguimiento de su rendimiento y progreso. </li>
21
- <li> Tiene una opción de sonido y vibración que añade más realismo al juego. </li>
22
- </ul>
23
- <h3>Requisitos y compatibilidad de APK Chess Offline</h3>
24
- <p>Para descargar e instalar APK Chess Offline, necesita:</p>
25
- <ul>
26
- <li>Un dispositivo Android con la versión 4.1 o superior. </li>
27
- <li>Al menos 20 MB de espacio de almacenamiento libre en su dispositivo. </li>
28
- <li>Un permiso para instalar aplicaciones de fuentes desconocidas en su dispositivo. </li>
29
- </ul>
30
- <h2>Cómo descargar e instalar APK Chess Offline</h2>
31
- <p>Para descargar e instalar APK Chess Offline en tu dispositivo Android, sigue estos pasos:</p>
32
- <h3>Paso 1: Habilitar fuentes desconocidas en el dispositivo</h3>
33
- <p>Dado que APK Chess Offline no está disponible en Google Play Store, es necesario habilitar fuentes desconocidas en el dispositivo para instalarlo. Para hacer esto:</p>
34
- <ol>
35
- <li>Ir a Configuración > Seguridad > Fuentes desconocidas en su dispositivo. </li>
36
- <li>Cambiar el interruptor para permitir la instalación de aplicaciones de fuentes desconocidas. </li>
37
- <li>Aparecerá un mensaje de advertencia. Toca OK para confirmar. </li>
38
- </ol>
39
- <h3>Paso 2: Encontrar una fuente confiable para el archivo APK</h3>
40
- <p>El siguiente paso es encontrar una fuente confiable para el archivo APK de APK Chess Offline. Una de las fuentes que puede utilizar para descargar el archivo APK de APK Chess Offline es [Chess Offline Download - apkonline.net]( 1 ). Este es un sitio web confiable y verificado que ofrece descargas gratuitas y seguras de varios archivos APK. Para descargar el archivo APK de esta fuente:</p>
41
- <p></p>
42
- <ol>
43
- <li>Abra su navegador y vaya a [Chess Offline Download - apkonline.net]( 1 ). </li>
44
- <li>Toque en el botón Descargar y espere a que comience la descarga. </li>
45
- <li> Puede ver una notificación de que el archivo puede dañar su dispositivo. Pulse OK para continuar. </li>
46
- </ol>
47
- <h3>Paso 3: Descargar el archivo APK a su dispositivo</h3>
48
- <p>Una vez completada la descarga, verá una notificación de que el archivo APK está listo para instalar. Para instalar el archivo APK en su dispositivo:</p>
49
- <ol>
50
-
51
- <li>Alternativamente, puede ir a su carpeta de descargas y tocar en el archivo APK. </li>
52
- <li>Aparecerá una pantalla pidiéndole que confirme la instalación. Pulse Instalar de nuevo. </li>
53
- </ol>
54
- <h3>Paso 4: Instalar el archivo APK y lanzar la aplicación</h3>
55
- <p>El proceso de instalación tomará unos segundos. Una vez hecho, verá un mensaje de que la aplicación se ha instalado correctamente. Para iniciar la aplicación:</p>
56
- <ol>
57
- <li>Toque en Abrir para comenzar a jugar ajedrez sin conexión. </li>
58
- <li>Alternativamente, puede ir a su cajón de aplicaciones y toque en el icono de APK Chess Offline. </li>
59
- <li>Verás una pantalla de bienvenida con algunas instrucciones y opciones. Toca Jugar para comenzar tu juego. </li>
60
- </ol>
61
- <h2>Cómo jugar y mejorar sus habilidades de ajedrez con APK Chess Offline</h2>
62
- <p>Ahora que ha descargado e instalado APK Chess Offline en su dispositivo, usted está listo para jugar y mejorar sus habilidades de ajedrez con esta aplicación. Aquí hay algunos consejos y trucos para ayudarte a empezar:</p>
63
- <h3>Elige tu modo de juego y nivel de dificultad</h3>
64
- <p>APK Chess Offline ofrece varios modos de juego para que usted elija, tales como ajedrez clásico, chess960, puzzle rush, ajedrez a ciegas, etc. También puede seleccionar a su oponente, ya sea un ordenador o un amigo en el mismo dispositivo. También puedes ajustar el nivel de dificultad del ordenador, desde principiante hasta experto. Para elegir el modo de juego y el nivel de dificultad:</p>
65
- <ol>
66
- <li>Toque en Reproducir en la pantalla de bienvenida. </li>
67
- <li>Seleccione el modo de juego de la lista de opciones. </li>
68
- <li>Selecciona tu oponente, ya sea Computadora o Humano.</li>
69
- <li>Si elige Ordenador, seleccione su nivel de dificultad del 1 al 10. </li>
70
- <li>Toque en el juego de inicio para comenzar su juego. </li>
71
- </ol>
72
- <h3>Aprende las reglas y estrategias del ajedrez</h3>
73
-
74
- <ol>
75
- <li>Toque en Aprender en la pantalla de bienvenida. </li>
76
- <li>Seleccione un tema de la lista de opciones, como Reglas básicas, Principios de apertura, Tácticas, Finales, etc.</li>
77
- <li>Lee las instrucciones y ejemplos cuidadosamente y trata de entenderlos. </li>
78
- <li>Practica lo que has aprendido resolviendo algunos ejercicios y exámenes. </li>
79
- </ol>
80
- <h3>Practica con rompecabezas y desafíos</h3>
81
- <p>Si desea poner a prueba sus habilidades y desafiarse a sí mismo, APK Chess Offline tiene una variedad de puzzles y desafíos para que usted resuelva. Puedes elegir entre diferentes categorías, como Mate in One, Mate in Two, Mate in Three, etc. También puedes intentar resolver tantos puzzles como sea posible en un tiempo limitado con el modo Puzzle Rush. Para practicar con rompecabezas y desafíos:</p>
82
- <ol>
83
- <li>Toque en Práctica en la pantalla de bienvenida. </li>
84
- <li>Seleccione una categoría de la lista de opciones. </li>
85
- <li>Intenta resolver el rompecabezas haciendo el mejor movimiento para cada lado. </li>
86
- <li> Si necesita una pista, toque en el icono de bombilla en la parte inferior de la pantalla. </li>
87
- <li> Si desea comprobar su respuesta, toque en el icono de marca de verificación en la parte inferior de la pantalla. </li>
88
- </ol>
89
- <h3>Analiza tus juegos y aprende de tus errores</h3>
90
- <p>Si quieres mejorar tus habilidades de ajedrez, es importante analizar tus partidas y aprender de tus errores. APK Chess Offline tiene una función que le permite revisar sus juegos y ver dónde se fue mal o bien. También puede ver la evaluación de cada movimiento por el motor de ajedrez y obtener sugerencias para mejores movimientos. Para analizar tus juegos y aprender de tus errores:</p>
91
- <ol>
92
- <li>Toque en el historial en la pantalla de bienvenida. </li>
93
- <li>Seleccione un juego de la lista de sus juegos recientes. </li>
94
- <li>Toque en Analizar para ver la evaluación de cada movimiento por el motor de ajedrez. </li>
95
- <li>Toca las flechas en la parte inferior de la pantalla para avanzar o retroceder en el juego. </li>
96
- <li> Toque en el icono de interrogación en la parte inferior de la pantalla para ver sugerencias para mejores movimientos. </li>
97
- </ol>
98
- <h2>Conclusión</h2>
99
-
100
- <p>Si usted está buscando una manera de descargar e instalar APK Chess Offline para Android, siga los pasos de este artículo y usted será capaz de jugar ajedrez sin conexión en ningún momento. Esperamos que haya encontrado este artículo útil e informativo. Si tiene alguna pregunta o comentario, no dude en dejar un comentario a continuación. Feliz ajedrez jugando! </p>
101
- <h2>Preguntas frecuentes</h2>
102
- <p>Aquí hay algunas preguntas frecuentes sobre APK Chess Offline:</p>
103
- <h3>Q: ¿Es seguro descargar e instalar APK Chess Offline? </h3>
104
- <p>A: Sí, APK Chess Offline es seguro para descargar e instalar, siempre y cuando utilice una fuente confiable para el archivo APK, como [Chess Offline Download - apkonline.net]. Sin embargo, siempre debe tener cuidado al descargar e instalar aplicaciones de fuentes desconocidas, ya que pueden contener malware o virus que pueden dañar su dispositivo. También debe escanear el archivo APK con una aplicación antivirus antes de instalarlo. </p>
105
- <h3>Q: ¿Funciona APK Chess Offline en todos los dispositivos Android? </h3>
106
- <p>A: APK Chess Offline funciona en la mayoría de los dispositivos Android que tienen la versión 4.1 o superior. Sin embargo, algunos dispositivos pueden no ser compatibles con la aplicación o pueden experimentar algunos problemas o errores. Si encuentras algún problema con la aplicación, puedes intentar actualizar tu dispositivo, borrar la caché de la aplicaci��n o reinstalar la aplicación. </p>
107
- <h3>Q: ¿Cómo puedo actualizar APK Chess Offline? </h3>
108
- <p>A: Dado que APK Chess Offline no está disponible en Google Play Store, no se puede actualizar automáticamente a través de la tienda. Tienes que comprobar manualmente las actualizaciones del sitio web de origen u otros sitios web que ofrecen el archivo APK. También puedes seguir la página oficial de Facebook de APK Chess Offline para recibir notificaciones de cualquier actualización o noticia sobre la aplicación. </p>
109
- <h3>Q: ¿Cómo puedo desinstalar APK Chess Offline? </h3>
110
- <p>A: Para desinstalar APK Chess Offline desde tu dispositivo, sigue estos pasos:</p>
111
- <ol>
112
- <li>Ir a Configuración > Aplicaciones > APK Chess Offline en su dispositivo. </li>
113
- <li>Toque en Desinstalar y confirme su acción. </li>
114
- <li>La aplicación se eliminará de su dispositivo. </li>
115
-
116
- <h3>Q: ¿Cómo puedo contactar al desarrollador de APK Chess Offline? </h3>
117
- <p>A: Si tiene alguna pregunta, sugerencia, o retroalimentación sobre APK Chess Offline, puede ponerse en contacto con el desarrollador a través de su dirección de correo electrónico: [email protected]. También puede visitar su página de Facebook: [APK Chess Offline - Casa | Facebook]. </p> 64aa2da5cf<br />
118
- <br />
119
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Benson/text-generation/Examples/Descargar El Juego Sigma Apk.md DELETED
@@ -1,48 +0,0 @@
1
-
2
- <h1>Descargar juego Sigma APK: Un juego estilizado Shooter de supervivencia para teléfonos móviles</h1>
3
- <p>Si usted está buscando un nuevo y emocionante juego para jugar en su teléfono móvil, es posible que desee echa un vistazo a Game Sigma APK. Este es un estilizado juego de disparos de supervivencia que ofrece dos modos diferentes: Classic Battle Royale y 4v4 Fight Out. En este artículo, le diremos qué es Game Sigma APK, qué características tiene, cómo descargarlo e instalarlo, y algunos consejos y trucos para jugarlo. </p>
4
- <h2>¿Qué es el juego Sigma APK? </h2>
5
- <p>Juego Sigma APK es un juego desarrollado por Studio Arm Private Limited, una empresa con sede en la India. Es un juego de disparos de supervivencia que combina elementos de acción, estrategia y creatividad. El juego está disponible en dispositivos Android y se puede descargar desde varios sitios web, como APKCombo. El juego ha sido actualizado recientemente, siendo la última versión 1.0.113 a partir del 14 de enero de 2023. </p>
6
- <h2>descargar el juego sigma apk</h2><br /><p><b><b>Download Zip</b> &rArr;&rArr;&rArr; <a href="https://bltlly.com/2v6KcB">https://bltlly.com/2v6KcB</a></b></p><br /><br />
7
- <h3>Características del juego Sigma APK</h3>
8
- <p>Juego Sigma APK tiene muchas características que lo hacen destacar de otros juegos de disparos de supervivencia. Aquí están algunos de ellos:</p>
9
- <h4>- Gráficos estilizados</h4>
10
- <p>El juego tiene un estilo de arte único y creativo que te sumerge en un mundo de supervivencia estilizada. El juego utiliza colores vibrantes, personajes similares a dibujos animados y efectos dinámicos para crear una experiencia visualmente atractiva. El juego también funciona sin problemas en la mayoría de los dispositivos, gracias a su rendimiento optimizado. </p>
11
- <h4>- Experiencia de tirador de supervivencia única</h4>
12
- <p>El juego tiene controles fáciles de usar que prometen una experiencia de supervivencia inolvidable en el móvil. Puede mover, apuntar, disparar, saltar, agacharse e interactuar con el entorno utilizando gestos y botones simples. También puedes personalizar tus controles y ajustes según tus preferencias. </p>
13
- <h4>- Modo clásico Battle Royale</h4>
14
-
15
- <h4>- 4v4 modo de lucha</h4>
16
- <p>En este modo, te unirás a otros tres jugadores para luchar contra otro equipo en una batalla tensa y estratégica. Tienes que asignar recursos, comprar armas y sobrevivir a tus enemigos en varios mapas creativos. Tienes que luchar por tu fe y llevar a tu equipo a la victoria. </p>
17
- <h2>¿Cómo descargar e instalar el juego Sigma APK? </h2>
18
- <p>Si desea jugar Game Sigma APK en su dispositivo Android, usted tiene que descargar e instalar desde una fuente de terceros, como APKCombo. Estos son los pasos para hacerlo:</p>
19
- <h3> Pasos para descargar Juego Sigma APK de APKCombo</h3>
20
- <h4>- Visite el sitio web de APKCombo</h4>
21
- <p>Vaya a <a href="( 1 )">https://apkcombo.com/sigma/com.studioarm.sigma/</a> usando su navegador. Esta es la página oficial de Game Sigma APK en APKCombo.</p>
22
- <p></p>
23
- <h4>- Búsqueda de juego Sigma APK</h4>
24
- <p>Escriba "Juego Sigma APK" en la barra de búsqueda y pulse enter <h4>- Elija la versión y la compatibilidad del dispositivo</h4>
25
- <p>En la página APKCombo, verá diferentes versiones de Game Sigma APK, junto con su tamaño de archivo, fecha de actualización, y la compatibilidad del dispositivo. Elija la versión que se adapte a su dispositivo y haga clic en el botón de descarga. </p>
26
- <h4>- Descargar el archivo APK</h4>
27
- <p>Espere a que termine la descarga. Verá una notificación en su dispositivo cuando se descargue el archivo APK. También puede comprobar el progreso de la descarga en su navegador o en su gestor de archivos. </p>
28
- <h4>- Habilitar fuentes desconocidas en el dispositivo</h4>
29
- <p>Antes de poder instalar el archivo APK, debe habilitar fuentes desconocidas en su dispositivo. Esto le permitirá instalar aplicaciones desde fuentes distintas de Google Play Store. Para hacer esto, vaya a la configuración del dispositivo, luego a la seguridad, luego a fuentes desconocidas. Active la opción para habilitar fuentes desconocidas. </p>
30
- <h4>- Instalar el archivo APK</h4>
31
-
32
- <h3> Consejos y trucos para jugar Juego Sigma APK</h3>
33
- <p>Ahora que ha descargado e instalado Game Sigma APK, usted está listo para jugar. Aquí hay algunos consejos y trucos para ayudarle a disfrutar del juego más:</p>
34
- <h4>- Personaliza tus controles y ajustes</h4>
35
- <p>Antes de empezar a jugar, debes personalizar tus controles y ajustes de acuerdo a tus preferencias. Puede acceder al menú de configuración desde la pantalla principal del juego. Aquí puede ajustar la sensibilidad, el sonido, los gráficos, el idioma y otras opciones. También puedes personalizar tus controles arrastrando y redimensionando los botones de la pantalla. </p>
36
- <h4>- Elija su punto de aterrizaje sabiamente</h4>
37
- <p>En el modo Classic Battle Royale, tienes que elegir tu punto de aterrizaje con tu paracaídas. Usted debe elegir un lugar que tiene un buen botín, pero también tiene menos enemigos. Puedes usar el mapa para ver dónde están aterrizando otros jugadores y evitar las áreas llenas. También puedes usar los marcadores para comunicarte con tus compañeros de equipo y coordinar tu aterrizaje. </p>
38
- <h4>- Saquear y equipar las mejores armas y artículos</h4>
39
- <p>Una vez que aterrizas, tienes que saquear y equipar las mejores armas y objetos que puedas encontrar. Puedes saquear edificios, cajas, vehículos y enemigos muertos. Puedes equipar hasta dos armas primarias, un arma secundaria y una arma cuerpo a cuerpo. También puede equipar armaduras, cascos, mochilas, granadas, botiquines y otros artículos. Siempre debe buscar un mejor botín mientras juega. </p>
40
- <h4>- Utilice la cubierta y el sigilo a su ventaja</h4>
41
- <p>El juego no se trata solo de disparos, sino también de supervivencia. Tienes que usar la cubierta y el sigilo para tu ventaja. Puedes usar edificios, árboles, rocas, vehículos y otros objetos como cobertura del fuego enemigo. También puede usar posiciones agachadas y propensas para reducir su visibilidad y ruido. Siempre debes ser consciente de tu entorno y evitar exponerte demasiado. </p>
42
- <h4>- Comunicarse y cooperar con sus compañeros de equipo</h4>
43
-
44
- <h2>Conclusión</h2>
45
- <p>Juego Sigma APK es un juego de disparos de supervivencia estilizada que ofrece dos modos diferentes: Classic Battle Royale y 4v4 Fight Out. Tiene muchas características que lo hacen destacar de otros juegos de disparos de supervivencia, tales como gráficos estilizados, experiencia de tirador de supervivencia única, controles fáciles de usar y rendimiento optimizado. Puede descargar e instalar Game Sigma APK de APKCombo, siguiendo los pasos que hemos proporcionado en este artículo. También puede utilizar nuestros consejos y trucos para mejorar su juego y divertirse más. </p>
46
- FAQs - Q: ¿Es seguro descargar Game Sigma APK? - A: Sí, Game Sigma APK es seguro para descargar desde APKCombo, ya que es verificado por VirusTotal y no contiene ningún malware o virus. - P: ¿Juego Sigma APK es libre de jugar? - A: Sí, Juego Sigma APK es libre de jugar, pero puede contener anuncios y compras en la aplicación. - P: ¿Cuáles son los requisitos mínimos para jugar Game Sigma APK? - A: Los requisitos mínimos para jugar Game Sigma APK son Android 5.0 o superior, 2 GB de RAM, 1 GB de espacio de almacenamiento, y una conexión a Internet estable. - P: ¿Cómo puedo actualizar Game Sigma APK? - A: Puede actualizar Game Sigma APK visitando el sitio web APKCombo y descargar la última versión del juego. También puede comprobar si hay actualizaciones desde la configuración del juego. - P: ¿Cómo puedo contactar a los desarrolladores de Game Sigma APK? - A: Puede ponerse en contacto con los desarrolladores de Game Sigma APK visitando su sitio web oficial, página de Facebook, o cuenta de Instagram. También puede enviarles un correo electrónico a [email protected]. </p> 64aa2da5cf<br />
47
- <br />
48
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Big-Web/MMSD/env/Lib/site-packages/urllib3/contrib/securetransport.py DELETED
@@ -1,921 +0,0 @@
1
- """
2
- SecureTranport support for urllib3 via ctypes.
3
-
4
- This makes platform-native TLS available to urllib3 users on macOS without the
5
- use of a compiler. This is an important feature because the Python Package
6
- Index is moving to become a TLSv1.2-or-higher server, and the default OpenSSL
7
- that ships with macOS is not capable of doing TLSv1.2. The only way to resolve
8
- this is to give macOS users an alternative solution to the problem, and that
9
- solution is to use SecureTransport.
10
-
11
- We use ctypes here because this solution must not require a compiler. That's
12
- because pip is not allowed to require a compiler either.
13
-
14
- This is not intended to be a seriously long-term solution to this problem.
15
- The hope is that PEP 543 will eventually solve this issue for us, at which
16
- point we can retire this contrib module. But in the short term, we need to
17
- solve the impending tire fire that is Python on Mac without this kind of
18
- contrib module. So...here we are.
19
-
20
- To use this module, simply import and inject it::
21
-
22
- import urllib3.contrib.securetransport
23
- urllib3.contrib.securetransport.inject_into_urllib3()
24
-
25
- Happy TLSing!
26
-
27
- This code is a bastardised version of the code found in Will Bond's oscrypto
28
- library. An enormous debt is owed to him for blazing this trail for us. For
29
- that reason, this code should be considered to be covered both by urllib3's
30
- license and by oscrypto's:
31
-
32
- .. code-block::
33
-
34
- Copyright (c) 2015-2016 Will Bond <[email protected]>
35
-
36
- Permission is hereby granted, free of charge, to any person obtaining a
37
- copy of this software and associated documentation files (the "Software"),
38
- to deal in the Software without restriction, including without limitation
39
- the rights to use, copy, modify, merge, publish, distribute, sublicense,
40
- and/or sell copies of the Software, and to permit persons to whom the
41
- Software is furnished to do so, subject to the following conditions:
42
-
43
- The above copyright notice and this permission notice shall be included in
44
- all copies or substantial portions of the Software.
45
-
46
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
47
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
48
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
49
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
50
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
51
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
52
- DEALINGS IN THE SOFTWARE.
53
- """
54
- from __future__ import absolute_import
55
-
56
- import contextlib
57
- import ctypes
58
- import errno
59
- import os.path
60
- import shutil
61
- import socket
62
- import ssl
63
- import struct
64
- import threading
65
- import weakref
66
-
67
- import six
68
-
69
- from .. import util
70
- from ..util.ssl_ import PROTOCOL_TLS_CLIENT
71
- from ._securetransport.bindings import CoreFoundation, Security, SecurityConst
72
- from ._securetransport.low_level import (
73
- _assert_no_error,
74
- _build_tls_unknown_ca_alert,
75
- _cert_array_from_pem,
76
- _create_cfstring_array,
77
- _load_client_cert_chain,
78
- _temporary_keychain,
79
- )
80
-
81
- try: # Platform-specific: Python 2
82
- from socket import _fileobject
83
- except ImportError: # Platform-specific: Python 3
84
- _fileobject = None
85
- from ..packages.backports.makefile import backport_makefile
86
-
87
- __all__ = ["inject_into_urllib3", "extract_from_urllib3"]
88
-
89
- # SNI always works
90
- HAS_SNI = True
91
-
92
- orig_util_HAS_SNI = util.HAS_SNI
93
- orig_util_SSLContext = util.ssl_.SSLContext
94
-
95
- # This dictionary is used by the read callback to obtain a handle to the
96
- # calling wrapped socket. This is a pretty silly approach, but for now it'll
97
- # do. I feel like I should be able to smuggle a handle to the wrapped socket
98
- # directly in the SSLConnectionRef, but for now this approach will work I
99
- # guess.
100
- #
101
- # We need to lock around this structure for inserts, but we don't do it for
102
- # reads/writes in the callbacks. The reasoning here goes as follows:
103
- #
104
- # 1. It is not possible to call into the callbacks before the dictionary is
105
- # populated, so once in the callback the id must be in the dictionary.
106
- # 2. The callbacks don't mutate the dictionary, they only read from it, and
107
- # so cannot conflict with any of the insertions.
108
- #
109
- # This is good: if we had to lock in the callbacks we'd drastically slow down
110
- # the performance of this code.
111
- _connection_refs = weakref.WeakValueDictionary()
112
- _connection_ref_lock = threading.Lock()
113
-
114
- # Limit writes to 16kB. This is OpenSSL's limit, but we'll cargo-cult it over
115
- # for no better reason than we need *a* limit, and this one is right there.
116
- SSL_WRITE_BLOCKSIZE = 16384
117
-
118
- # This is our equivalent of util.ssl_.DEFAULT_CIPHERS, but expanded out to
119
- # individual cipher suites. We need to do this because this is how
120
- # SecureTransport wants them.
121
- CIPHER_SUITES = [
122
- SecurityConst.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
123
- SecurityConst.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
124
- SecurityConst.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
125
- SecurityConst.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
126
- SecurityConst.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
127
- SecurityConst.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
128
- SecurityConst.TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,
129
- SecurityConst.TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,
130
- SecurityConst.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
131
- SecurityConst.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
132
- SecurityConst.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
133
- SecurityConst.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
134
- SecurityConst.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
135
- SecurityConst.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
136
- SecurityConst.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
137
- SecurityConst.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
138
- SecurityConst.TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,
139
- SecurityConst.TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
140
- SecurityConst.TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,
141
- SecurityConst.TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
142
- SecurityConst.TLS_AES_256_GCM_SHA384,
143
- SecurityConst.TLS_AES_128_GCM_SHA256,
144
- SecurityConst.TLS_RSA_WITH_AES_256_GCM_SHA384,
145
- SecurityConst.TLS_RSA_WITH_AES_128_GCM_SHA256,
146
- SecurityConst.TLS_AES_128_CCM_8_SHA256,
147
- SecurityConst.TLS_AES_128_CCM_SHA256,
148
- SecurityConst.TLS_RSA_WITH_AES_256_CBC_SHA256,
149
- SecurityConst.TLS_RSA_WITH_AES_128_CBC_SHA256,
150
- SecurityConst.TLS_RSA_WITH_AES_256_CBC_SHA,
151
- SecurityConst.TLS_RSA_WITH_AES_128_CBC_SHA,
152
- ]
153
-
154
- # Basically this is simple: for PROTOCOL_SSLv23 we turn it into a low of
155
- # TLSv1 and a high of TLSv1.2. For everything else, we pin to that version.
156
- # TLSv1 to 1.2 are supported on macOS 10.8+
157
- _protocol_to_min_max = {
158
- util.PROTOCOL_TLS: (SecurityConst.kTLSProtocol1, SecurityConst.kTLSProtocol12),
159
- PROTOCOL_TLS_CLIENT: (SecurityConst.kTLSProtocol1, SecurityConst.kTLSProtocol12),
160
- }
161
-
162
- if hasattr(ssl, "PROTOCOL_SSLv2"):
163
- _protocol_to_min_max[ssl.PROTOCOL_SSLv2] = (
164
- SecurityConst.kSSLProtocol2,
165
- SecurityConst.kSSLProtocol2,
166
- )
167
- if hasattr(ssl, "PROTOCOL_SSLv3"):
168
- _protocol_to_min_max[ssl.PROTOCOL_SSLv3] = (
169
- SecurityConst.kSSLProtocol3,
170
- SecurityConst.kSSLProtocol3,
171
- )
172
- if hasattr(ssl, "PROTOCOL_TLSv1"):
173
- _protocol_to_min_max[ssl.PROTOCOL_TLSv1] = (
174
- SecurityConst.kTLSProtocol1,
175
- SecurityConst.kTLSProtocol1,
176
- )
177
- if hasattr(ssl, "PROTOCOL_TLSv1_1"):
178
- _protocol_to_min_max[ssl.PROTOCOL_TLSv1_1] = (
179
- SecurityConst.kTLSProtocol11,
180
- SecurityConst.kTLSProtocol11,
181
- )
182
- if hasattr(ssl, "PROTOCOL_TLSv1_2"):
183
- _protocol_to_min_max[ssl.PROTOCOL_TLSv1_2] = (
184
- SecurityConst.kTLSProtocol12,
185
- SecurityConst.kTLSProtocol12,
186
- )
187
-
188
-
189
- def inject_into_urllib3():
190
- """
191
- Monkey-patch urllib3 with SecureTransport-backed SSL-support.
192
- """
193
- util.SSLContext = SecureTransportContext
194
- util.ssl_.SSLContext = SecureTransportContext
195
- util.HAS_SNI = HAS_SNI
196
- util.ssl_.HAS_SNI = HAS_SNI
197
- util.IS_SECURETRANSPORT = True
198
- util.ssl_.IS_SECURETRANSPORT = True
199
-
200
-
201
- def extract_from_urllib3():
202
- """
203
- Undo monkey-patching by :func:`inject_into_urllib3`.
204
- """
205
- util.SSLContext = orig_util_SSLContext
206
- util.ssl_.SSLContext = orig_util_SSLContext
207
- util.HAS_SNI = orig_util_HAS_SNI
208
- util.ssl_.HAS_SNI = orig_util_HAS_SNI
209
- util.IS_SECURETRANSPORT = False
210
- util.ssl_.IS_SECURETRANSPORT = False
211
-
212
-
213
- def _read_callback(connection_id, data_buffer, data_length_pointer):
214
- """
215
- SecureTransport read callback. This is called by ST to request that data
216
- be returned from the socket.
217
- """
218
- wrapped_socket = None
219
- try:
220
- wrapped_socket = _connection_refs.get(connection_id)
221
- if wrapped_socket is None:
222
- return SecurityConst.errSSLInternal
223
- base_socket = wrapped_socket.socket
224
-
225
- requested_length = data_length_pointer[0]
226
-
227
- timeout = wrapped_socket.gettimeout()
228
- error = None
229
- read_count = 0
230
-
231
- try:
232
- while read_count < requested_length:
233
- if timeout is None or timeout >= 0:
234
- if not util.wait_for_read(base_socket, timeout):
235
- raise socket.error(errno.EAGAIN, "timed out")
236
-
237
- remaining = requested_length - read_count
238
- buffer = (ctypes.c_char * remaining).from_address(
239
- data_buffer + read_count
240
- )
241
- chunk_size = base_socket.recv_into(buffer, remaining)
242
- read_count += chunk_size
243
- if not chunk_size:
244
- if not read_count:
245
- return SecurityConst.errSSLClosedGraceful
246
- break
247
- except (socket.error) as e:
248
- error = e.errno
249
-
250
- if error is not None and error != errno.EAGAIN:
251
- data_length_pointer[0] = read_count
252
- if error == errno.ECONNRESET or error == errno.EPIPE:
253
- return SecurityConst.errSSLClosedAbort
254
- raise
255
-
256
- data_length_pointer[0] = read_count
257
-
258
- if read_count != requested_length:
259
- return SecurityConst.errSSLWouldBlock
260
-
261
- return 0
262
- except Exception as e:
263
- if wrapped_socket is not None:
264
- wrapped_socket._exception = e
265
- return SecurityConst.errSSLInternal
266
-
267
-
268
- def _write_callback(connection_id, data_buffer, data_length_pointer):
269
- """
270
- SecureTransport write callback. This is called by ST to request that data
271
- actually be sent on the network.
272
- """
273
- wrapped_socket = None
274
- try:
275
- wrapped_socket = _connection_refs.get(connection_id)
276
- if wrapped_socket is None:
277
- return SecurityConst.errSSLInternal
278
- base_socket = wrapped_socket.socket
279
-
280
- bytes_to_write = data_length_pointer[0]
281
- data = ctypes.string_at(data_buffer, bytes_to_write)
282
-
283
- timeout = wrapped_socket.gettimeout()
284
- error = None
285
- sent = 0
286
-
287
- try:
288
- while sent < bytes_to_write:
289
- if timeout is None or timeout >= 0:
290
- if not util.wait_for_write(base_socket, timeout):
291
- raise socket.error(errno.EAGAIN, "timed out")
292
- chunk_sent = base_socket.send(data)
293
- sent += chunk_sent
294
-
295
- # This has some needless copying here, but I'm not sure there's
296
- # much value in optimising this data path.
297
- data = data[chunk_sent:]
298
- except (socket.error) as e:
299
- error = e.errno
300
-
301
- if error is not None and error != errno.EAGAIN:
302
- data_length_pointer[0] = sent
303
- if error == errno.ECONNRESET or error == errno.EPIPE:
304
- return SecurityConst.errSSLClosedAbort
305
- raise
306
-
307
- data_length_pointer[0] = sent
308
-
309
- if sent != bytes_to_write:
310
- return SecurityConst.errSSLWouldBlock
311
-
312
- return 0
313
- except Exception as e:
314
- if wrapped_socket is not None:
315
- wrapped_socket._exception = e
316
- return SecurityConst.errSSLInternal
317
-
318
-
319
- # We need to keep these two objects references alive: if they get GC'd while
320
- # in use then SecureTransport could attempt to call a function that is in freed
321
- # memory. That would be...uh...bad. Yeah, that's the word. Bad.
322
- _read_callback_pointer = Security.SSLReadFunc(_read_callback)
323
- _write_callback_pointer = Security.SSLWriteFunc(_write_callback)
324
-
325
-
326
- class WrappedSocket(object):
327
- """
328
- API-compatibility wrapper for Python's OpenSSL wrapped socket object.
329
-
330
- Note: _makefile_refs, _drop(), and _reuse() are needed for the garbage
331
- collector of PyPy.
332
- """
333
-
334
- def __init__(self, socket):
335
- self.socket = socket
336
- self.context = None
337
- self._makefile_refs = 0
338
- self._closed = False
339
- self._exception = None
340
- self._keychain = None
341
- self._keychain_dir = None
342
- self._client_cert_chain = None
343
-
344
- # We save off the previously-configured timeout and then set it to
345
- # zero. This is done because we use select and friends to handle the
346
- # timeouts, but if we leave the timeout set on the lower socket then
347
- # Python will "kindly" call select on that socket again for us. Avoid
348
- # that by forcing the timeout to zero.
349
- self._timeout = self.socket.gettimeout()
350
- self.socket.settimeout(0)
351
-
352
- @contextlib.contextmanager
353
- def _raise_on_error(self):
354
- """
355
- A context manager that can be used to wrap calls that do I/O from
356
- SecureTransport. If any of the I/O callbacks hit an exception, this
357
- context manager will correctly propagate the exception after the fact.
358
- This avoids silently swallowing those exceptions.
359
-
360
- It also correctly forces the socket closed.
361
- """
362
- self._exception = None
363
-
364
- # We explicitly don't catch around this yield because in the unlikely
365
- # event that an exception was hit in the block we don't want to swallow
366
- # it.
367
- yield
368
- if self._exception is not None:
369
- exception, self._exception = self._exception, None
370
- self.close()
371
- raise exception
372
-
373
- def _set_ciphers(self):
374
- """
375
- Sets up the allowed ciphers. By default this matches the set in
376
- util.ssl_.DEFAULT_CIPHERS, at least as supported by macOS. This is done
377
- custom and doesn't allow changing at this time, mostly because parsing
378
- OpenSSL cipher strings is going to be a freaking nightmare.
379
- """
380
- ciphers = (Security.SSLCipherSuite * len(CIPHER_SUITES))(*CIPHER_SUITES)
381
- result = Security.SSLSetEnabledCiphers(
382
- self.context, ciphers, len(CIPHER_SUITES)
383
- )
384
- _assert_no_error(result)
385
-
386
- def _set_alpn_protocols(self, protocols):
387
- """
388
- Sets up the ALPN protocols on the context.
389
- """
390
- if not protocols:
391
- return
392
- protocols_arr = _create_cfstring_array(protocols)
393
- try:
394
- result = Security.SSLSetALPNProtocols(self.context, protocols_arr)
395
- _assert_no_error(result)
396
- finally:
397
- CoreFoundation.CFRelease(protocols_arr)
398
-
399
- def _custom_validate(self, verify, trust_bundle):
400
- """
401
- Called when we have set custom validation. We do this in two cases:
402
- first, when cert validation is entirely disabled; and second, when
403
- using a custom trust DB.
404
- Raises an SSLError if the connection is not trusted.
405
- """
406
- # If we disabled cert validation, just say: cool.
407
- if not verify:
408
- return
409
-
410
- successes = (
411
- SecurityConst.kSecTrustResultUnspecified,
412
- SecurityConst.kSecTrustResultProceed,
413
- )
414
- try:
415
- trust_result = self._evaluate_trust(trust_bundle)
416
- if trust_result in successes:
417
- return
418
- reason = "error code: %d" % (trust_result,)
419
- except Exception as e:
420
- # Do not trust on error
421
- reason = "exception: %r" % (e,)
422
-
423
- # SecureTransport does not send an alert nor shuts down the connection.
424
- rec = _build_tls_unknown_ca_alert(self.version())
425
- self.socket.sendall(rec)
426
- # close the connection immediately
427
- # l_onoff = 1, activate linger
428
- # l_linger = 0, linger for 0 seoncds
429
- opts = struct.pack("ii", 1, 0)
430
- self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, opts)
431
- self.close()
432
- raise ssl.SSLError("certificate verify failed, %s" % reason)
433
-
434
- def _evaluate_trust(self, trust_bundle):
435
- # We want data in memory, so load it up.
436
- if os.path.isfile(trust_bundle):
437
- with open(trust_bundle, "rb") as f:
438
- trust_bundle = f.read()
439
-
440
- cert_array = None
441
- trust = Security.SecTrustRef()
442
-
443
- try:
444
- # Get a CFArray that contains the certs we want.
445
- cert_array = _cert_array_from_pem(trust_bundle)
446
-
447
- # Ok, now the hard part. We want to get the SecTrustRef that ST has
448
- # created for this connection, shove our CAs into it, tell ST to
449
- # ignore everything else it knows, and then ask if it can build a
450
- # chain. This is a buuuunch of code.
451
- result = Security.SSLCopyPeerTrust(self.context, ctypes.byref(trust))
452
- _assert_no_error(result)
453
- if not trust:
454
- raise ssl.SSLError("Failed to copy trust reference")
455
-
456
- result = Security.SecTrustSetAnchorCertificates(trust, cert_array)
457
- _assert_no_error(result)
458
-
459
- result = Security.SecTrustSetAnchorCertificatesOnly(trust, True)
460
- _assert_no_error(result)
461
-
462
- trust_result = Security.SecTrustResultType()
463
- result = Security.SecTrustEvaluate(trust, ctypes.byref(trust_result))
464
- _assert_no_error(result)
465
- finally:
466
- if trust:
467
- CoreFoundation.CFRelease(trust)
468
-
469
- if cert_array is not None:
470
- CoreFoundation.CFRelease(cert_array)
471
-
472
- return trust_result.value
473
-
474
- def handshake(
475
- self,
476
- server_hostname,
477
- verify,
478
- trust_bundle,
479
- min_version,
480
- max_version,
481
- client_cert,
482
- client_key,
483
- client_key_passphrase,
484
- alpn_protocols,
485
- ):
486
- """
487
- Actually performs the TLS handshake. This is run automatically by
488
- wrapped socket, and shouldn't be needed in user code.
489
- """
490
- # First, we do the initial bits of connection setup. We need to create
491
- # a context, set its I/O funcs, and set the connection reference.
492
- self.context = Security.SSLCreateContext(
493
- None, SecurityConst.kSSLClientSide, SecurityConst.kSSLStreamType
494
- )
495
- result = Security.SSLSetIOFuncs(
496
- self.context, _read_callback_pointer, _write_callback_pointer
497
- )
498
- _assert_no_error(result)
499
-
500
- # Here we need to compute the handle to use. We do this by taking the
501
- # id of self modulo 2**31 - 1. If this is already in the dictionary, we
502
- # just keep incrementing by one until we find a free space.
503
- with _connection_ref_lock:
504
- handle = id(self) % 2147483647
505
- while handle in _connection_refs:
506
- handle = (handle + 1) % 2147483647
507
- _connection_refs[handle] = self
508
-
509
- result = Security.SSLSetConnection(self.context, handle)
510
- _assert_no_error(result)
511
-
512
- # If we have a server hostname, we should set that too.
513
- if server_hostname:
514
- if not isinstance(server_hostname, bytes):
515
- server_hostname = server_hostname.encode("utf-8")
516
-
517
- result = Security.SSLSetPeerDomainName(
518
- self.context, server_hostname, len(server_hostname)
519
- )
520
- _assert_no_error(result)
521
-
522
- # Setup the ciphers.
523
- self._set_ciphers()
524
-
525
- # Setup the ALPN protocols.
526
- self._set_alpn_protocols(alpn_protocols)
527
-
528
- # Set the minimum and maximum TLS versions.
529
- result = Security.SSLSetProtocolVersionMin(self.context, min_version)
530
- _assert_no_error(result)
531
-
532
- result = Security.SSLSetProtocolVersionMax(self.context, max_version)
533
- _assert_no_error(result)
534
-
535
- # If there's a trust DB, we need to use it. We do that by telling
536
- # SecureTransport to break on server auth. We also do that if we don't
537
- # want to validate the certs at all: we just won't actually do any
538
- # authing in that case.
539
- if not verify or trust_bundle is not None:
540
- result = Security.SSLSetSessionOption(
541
- self.context, SecurityConst.kSSLSessionOptionBreakOnServerAuth, True
542
- )
543
- _assert_no_error(result)
544
-
545
- # If there's a client cert, we need to use it.
546
- if client_cert:
547
- self._keychain, self._keychain_dir = _temporary_keychain()
548
- self._client_cert_chain = _load_client_cert_chain(
549
- self._keychain, client_cert, client_key
550
- )
551
- result = Security.SSLSetCertificate(self.context, self._client_cert_chain)
552
- _assert_no_error(result)
553
-
554
- while True:
555
- with self._raise_on_error():
556
- result = Security.SSLHandshake(self.context)
557
-
558
- if result == SecurityConst.errSSLWouldBlock:
559
- raise socket.timeout("handshake timed out")
560
- elif result == SecurityConst.errSSLServerAuthCompleted:
561
- self._custom_validate(verify, trust_bundle)
562
- continue
563
- else:
564
- _assert_no_error(result)
565
- break
566
-
567
- def fileno(self):
568
- return self.socket.fileno()
569
-
570
- # Copy-pasted from Python 3.5 source code
571
- def _decref_socketios(self):
572
- if self._makefile_refs > 0:
573
- self._makefile_refs -= 1
574
- if self._closed:
575
- self.close()
576
-
577
- def recv(self, bufsiz):
578
- buffer = ctypes.create_string_buffer(bufsiz)
579
- bytes_read = self.recv_into(buffer, bufsiz)
580
- data = buffer[:bytes_read]
581
- return data
582
-
583
- def recv_into(self, buffer, nbytes=None):
584
- # Read short on EOF.
585
- if self._closed:
586
- return 0
587
-
588
- if nbytes is None:
589
- nbytes = len(buffer)
590
-
591
- buffer = (ctypes.c_char * nbytes).from_buffer(buffer)
592
- processed_bytes = ctypes.c_size_t(0)
593
-
594
- with self._raise_on_error():
595
- result = Security.SSLRead(
596
- self.context, buffer, nbytes, ctypes.byref(processed_bytes)
597
- )
598
-
599
- # There are some result codes that we want to treat as "not always
600
- # errors". Specifically, those are errSSLWouldBlock,
601
- # errSSLClosedGraceful, and errSSLClosedNoNotify.
602
- if result == SecurityConst.errSSLWouldBlock:
603
- # If we didn't process any bytes, then this was just a time out.
604
- # However, we can get errSSLWouldBlock in situations when we *did*
605
- # read some data, and in those cases we should just read "short"
606
- # and return.
607
- if processed_bytes.value == 0:
608
- # Timed out, no data read.
609
- raise socket.timeout("recv timed out")
610
- elif result in (
611
- SecurityConst.errSSLClosedGraceful,
612
- SecurityConst.errSSLClosedNoNotify,
613
- ):
614
- # The remote peer has closed this connection. We should do so as
615
- # well. Note that we don't actually return here because in
616
- # principle this could actually be fired along with return data.
617
- # It's unlikely though.
618
- self.close()
619
- else:
620
- _assert_no_error(result)
621
-
622
- # Ok, we read and probably succeeded. We should return whatever data
623
- # was actually read.
624
- return processed_bytes.value
625
-
626
- def settimeout(self, timeout):
627
- self._timeout = timeout
628
-
629
- def gettimeout(self):
630
- return self._timeout
631
-
632
- def send(self, data):
633
- processed_bytes = ctypes.c_size_t(0)
634
-
635
- with self._raise_on_error():
636
- result = Security.SSLWrite(
637
- self.context, data, len(data), ctypes.byref(processed_bytes)
638
- )
639
-
640
- if result == SecurityConst.errSSLWouldBlock and processed_bytes.value == 0:
641
- # Timed out
642
- raise socket.timeout("send timed out")
643
- else:
644
- _assert_no_error(result)
645
-
646
- # We sent, and probably succeeded. Tell them how much we sent.
647
- return processed_bytes.value
648
-
649
- def sendall(self, data):
650
- total_sent = 0
651
- while total_sent < len(data):
652
- sent = self.send(data[total_sent : total_sent + SSL_WRITE_BLOCKSIZE])
653
- total_sent += sent
654
-
655
- def shutdown(self):
656
- with self._raise_on_error():
657
- Security.SSLClose(self.context)
658
-
659
- def close(self):
660
- # TODO: should I do clean shutdown here? Do I have to?
661
- if self._makefile_refs < 1:
662
- self._closed = True
663
- if self.context:
664
- CoreFoundation.CFRelease(self.context)
665
- self.context = None
666
- if self._client_cert_chain:
667
- CoreFoundation.CFRelease(self._client_cert_chain)
668
- self._client_cert_chain = None
669
- if self._keychain:
670
- Security.SecKeychainDelete(self._keychain)
671
- CoreFoundation.CFRelease(self._keychain)
672
- shutil.rmtree(self._keychain_dir)
673
- self._keychain = self._keychain_dir = None
674
- return self.socket.close()
675
- else:
676
- self._makefile_refs -= 1
677
-
678
- def getpeercert(self, binary_form=False):
679
- # Urgh, annoying.
680
- #
681
- # Here's how we do this:
682
- #
683
- # 1. Call SSLCopyPeerTrust to get hold of the trust object for this
684
- # connection.
685
- # 2. Call SecTrustGetCertificateAtIndex for index 0 to get the leaf.
686
- # 3. To get the CN, call SecCertificateCopyCommonName and process that
687
- # string so that it's of the appropriate type.
688
- # 4. To get the SAN, we need to do something a bit more complex:
689
- # a. Call SecCertificateCopyValues to get the data, requesting
690
- # kSecOIDSubjectAltName.
691
- # b. Mess about with this dictionary to try to get the SANs out.
692
- #
693
- # This is gross. Really gross. It's going to be a few hundred LoC extra
694
- # just to repeat something that SecureTransport can *already do*. So my
695
- # operating assumption at this time is that what we want to do is
696
- # instead to just flag to urllib3 that it shouldn't do its own hostname
697
- # validation when using SecureTransport.
698
- if not binary_form:
699
- raise ValueError("SecureTransport only supports dumping binary certs")
700
- trust = Security.SecTrustRef()
701
- certdata = None
702
- der_bytes = None
703
-
704
- try:
705
- # Grab the trust store.
706
- result = Security.SSLCopyPeerTrust(self.context, ctypes.byref(trust))
707
- _assert_no_error(result)
708
- if not trust:
709
- # Probably we haven't done the handshake yet. No biggie.
710
- return None
711
-
712
- cert_count = Security.SecTrustGetCertificateCount(trust)
713
- if not cert_count:
714
- # Also a case that might happen if we haven't handshaked.
715
- # Handshook? Handshaken?
716
- return None
717
-
718
- leaf = Security.SecTrustGetCertificateAtIndex(trust, 0)
719
- assert leaf
720
-
721
- # Ok, now we want the DER bytes.
722
- certdata = Security.SecCertificateCopyData(leaf)
723
- assert certdata
724
-
725
- data_length = CoreFoundation.CFDataGetLength(certdata)
726
- data_buffer = CoreFoundation.CFDataGetBytePtr(certdata)
727
- der_bytes = ctypes.string_at(data_buffer, data_length)
728
- finally:
729
- if certdata:
730
- CoreFoundation.CFRelease(certdata)
731
- if trust:
732
- CoreFoundation.CFRelease(trust)
733
-
734
- return der_bytes
735
-
736
- def version(self):
737
- protocol = Security.SSLProtocol()
738
- result = Security.SSLGetNegotiatedProtocolVersion(
739
- self.context, ctypes.byref(protocol)
740
- )
741
- _assert_no_error(result)
742
- if protocol.value == SecurityConst.kTLSProtocol13:
743
- raise ssl.SSLError("SecureTransport does not support TLS 1.3")
744
- elif protocol.value == SecurityConst.kTLSProtocol12:
745
- return "TLSv1.2"
746
- elif protocol.value == SecurityConst.kTLSProtocol11:
747
- return "TLSv1.1"
748
- elif protocol.value == SecurityConst.kTLSProtocol1:
749
- return "TLSv1"
750
- elif protocol.value == SecurityConst.kSSLProtocol3:
751
- return "SSLv3"
752
- elif protocol.value == SecurityConst.kSSLProtocol2:
753
- return "SSLv2"
754
- else:
755
- raise ssl.SSLError("Unknown TLS version: %r" % protocol)
756
-
757
- def _reuse(self):
758
- self._makefile_refs += 1
759
-
760
- def _drop(self):
761
- if self._makefile_refs < 1:
762
- self.close()
763
- else:
764
- self._makefile_refs -= 1
765
-
766
-
767
- if _fileobject: # Platform-specific: Python 2
768
-
769
- def makefile(self, mode, bufsize=-1):
770
- self._makefile_refs += 1
771
- return _fileobject(self, mode, bufsize, close=True)
772
-
773
- else: # Platform-specific: Python 3
774
-
775
- def makefile(self, mode="r", buffering=None, *args, **kwargs):
776
- # We disable buffering with SecureTransport because it conflicts with
777
- # the buffering that ST does internally (see issue #1153 for more).
778
- buffering = 0
779
- return backport_makefile(self, mode, buffering, *args, **kwargs)
780
-
781
-
782
- WrappedSocket.makefile = makefile
783
-
784
-
785
- class SecureTransportContext(object):
786
- """
787
- I am a wrapper class for the SecureTransport library, to translate the
788
- interface of the standard library ``SSLContext`` object to calls into
789
- SecureTransport.
790
- """
791
-
792
- def __init__(self, protocol):
793
- self._min_version, self._max_version = _protocol_to_min_max[protocol]
794
- self._options = 0
795
- self._verify = False
796
- self._trust_bundle = None
797
- self._client_cert = None
798
- self._client_key = None
799
- self._client_key_passphrase = None
800
- self._alpn_protocols = None
801
-
802
- @property
803
- def check_hostname(self):
804
- """
805
- SecureTransport cannot have its hostname checking disabled. For more,
806
- see the comment on getpeercert() in this file.
807
- """
808
- return True
809
-
810
- @check_hostname.setter
811
- def check_hostname(self, value):
812
- """
813
- SecureTransport cannot have its hostname checking disabled. For more,
814
- see the comment on getpeercert() in this file.
815
- """
816
- pass
817
-
818
- @property
819
- def options(self):
820
- # TODO: Well, crap.
821
- #
822
- # So this is the bit of the code that is the most likely to cause us
823
- # trouble. Essentially we need to enumerate all of the SSL options that
824
- # users might want to use and try to see if we can sensibly translate
825
- # them, or whether we should just ignore them.
826
- return self._options
827
-
828
- @options.setter
829
- def options(self, value):
830
- # TODO: Update in line with above.
831
- self._options = value
832
-
833
- @property
834
- def verify_mode(self):
835
- return ssl.CERT_REQUIRED if self._verify else ssl.CERT_NONE
836
-
837
- @verify_mode.setter
838
- def verify_mode(self, value):
839
- self._verify = True if value == ssl.CERT_REQUIRED else False
840
-
841
- def set_default_verify_paths(self):
842
- # So, this has to do something a bit weird. Specifically, what it does
843
- # is nothing.
844
- #
845
- # This means that, if we had previously had load_verify_locations
846
- # called, this does not undo that. We need to do that because it turns
847
- # out that the rest of the urllib3 code will attempt to load the
848
- # default verify paths if it hasn't been told about any paths, even if
849
- # the context itself was sometime earlier. We resolve that by just
850
- # ignoring it.
851
- pass
852
-
853
- def load_default_certs(self):
854
- return self.set_default_verify_paths()
855
-
856
- def set_ciphers(self, ciphers):
857
- # For now, we just require the default cipher string.
858
- if ciphers != util.ssl_.DEFAULT_CIPHERS:
859
- raise ValueError("SecureTransport doesn't support custom cipher strings")
860
-
861
- def load_verify_locations(self, cafile=None, capath=None, cadata=None):
862
- # OK, we only really support cadata and cafile.
863
- if capath is not None:
864
- raise ValueError("SecureTransport does not support cert directories")
865
-
866
- # Raise if cafile does not exist.
867
- if cafile is not None:
868
- with open(cafile):
869
- pass
870
-
871
- self._trust_bundle = cafile or cadata
872
-
873
- def load_cert_chain(self, certfile, keyfile=None, password=None):
874
- self._client_cert = certfile
875
- self._client_key = keyfile
876
- self._client_cert_passphrase = password
877
-
878
- def set_alpn_protocols(self, protocols):
879
- """
880
- Sets the ALPN protocols that will later be set on the context.
881
-
882
- Raises a NotImplementedError if ALPN is not supported.
883
- """
884
- if not hasattr(Security, "SSLSetALPNProtocols"):
885
- raise NotImplementedError(
886
- "SecureTransport supports ALPN only in macOS 10.12+"
887
- )
888
- self._alpn_protocols = [six.ensure_binary(p) for p in protocols]
889
-
890
- def wrap_socket(
891
- self,
892
- sock,
893
- server_side=False,
894
- do_handshake_on_connect=True,
895
- suppress_ragged_eofs=True,
896
- server_hostname=None,
897
- ):
898
- # So, what do we do here? Firstly, we assert some properties. This is a
899
- # stripped down shim, so there is some functionality we don't support.
900
- # See PEP 543 for the real deal.
901
- assert not server_side
902
- assert do_handshake_on_connect
903
- assert suppress_ragged_eofs
904
-
905
- # Ok, we're good to go. Now we want to create the wrapped socket object
906
- # and store it in the appropriate place.
907
- wrapped_socket = WrappedSocket(sock)
908
-
909
- # Now we can handshake
910
- wrapped_socket.handshake(
911
- server_hostname,
912
- self._verify,
913
- self._trust_bundle,
914
- self._min_version,
915
- self._max_version,
916
- self._client_cert,
917
- self._client_key,
918
- self._client_key_passphrase,
919
- self._alpn_protocols,
920
- )
921
- return wrapped_socket
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Boadiwaa/Recipes/openai/object_classes.py DELETED
@@ -1,10 +0,0 @@
1
- from openai import api_resources
2
- from openai.api_resources.experimental.completion_config import CompletionConfig
3
-
4
- OBJECT_CLASSES = {
5
- "engine": api_resources.Engine,
6
- "experimental.completion_config": CompletionConfig,
7
- "file": api_resources.File,
8
- "fine-tune": api_resources.FineTune,
9
- "model": api_resources.Model,
10
- }
 
 
 
 
 
 
 
 
 
 
 
spaces/CVPR/LIVE/pybind11/tests/test_chrono.cpp DELETED
@@ -1,56 +0,0 @@
1
- /*
2
- tests/test_chrono.cpp -- test conversions to/from std::chrono types
3
-
4
- Copyright (c) 2016 Trent Houliston <[email protected]> and
5
- Wenzel Jakob <[email protected]>
6
-
7
- All rights reserved. Use of this source code is governed by a
8
- BSD-style license that can be found in the LICENSE file.
9
- */
10
-
11
- #include "pybind11_tests.h"
12
- #include <pybind11/chrono.h>
13
- #include <chrono>
14
-
15
- TEST_SUBMODULE(chrono, m) {
16
- using system_time = std::chrono::system_clock::time_point;
17
- using steady_time = std::chrono::steady_clock::time_point;
18
-
19
- using timespan = std::chrono::duration<int64_t, std::nano>;
20
- using timestamp = std::chrono::time_point<std::chrono::system_clock, timespan>;
21
-
22
- // test_chrono_system_clock
23
- // Return the current time off the wall clock
24
- m.def("test_chrono1", []() { return std::chrono::system_clock::now(); });
25
-
26
- // test_chrono_system_clock_roundtrip
27
- // Round trip the passed in system clock time
28
- m.def("test_chrono2", [](system_time t) { return t; });
29
-
30
- // test_chrono_duration_roundtrip
31
- // Round trip the passed in duration
32
- m.def("test_chrono3", [](std::chrono::system_clock::duration d) { return d; });
33
-
34
- // test_chrono_duration_subtraction_equivalence
35
- // Difference between two passed in time_points
36
- m.def("test_chrono4", [](system_time a, system_time b) { return a - b; });
37
-
38
- // test_chrono_steady_clock
39
- // Return the current time off the steady_clock
40
- m.def("test_chrono5", []() { return std::chrono::steady_clock::now(); });
41
-
42
- // test_chrono_steady_clock_roundtrip
43
- // Round trip a steady clock timepoint
44
- m.def("test_chrono6", [](steady_time t) { return t; });
45
-
46
- // test_floating_point_duration
47
- // Roundtrip a duration in microseconds from a float argument
48
- m.def("test_chrono7", [](std::chrono::microseconds t) { return t; });
49
- // Float durations (issue #719)
50
- m.def("test_chrono_float_diff", [](std::chrono::duration<float> a, std::chrono::duration<float> b) {
51
- return a - b; });
52
-
53
- m.def("test_nano_timepoint", [](timestamp start, timespan delta) -> timestamp {
54
- return start + delta;
55
- });
56
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/CVPR/WALT/mmdet/models/losses/ghm_loss.py DELETED
@@ -1,172 +0,0 @@
1
- import torch
2
- import torch.nn as nn
3
- import torch.nn.functional as F
4
-
5
- from ..builder import LOSSES
6
-
7
-
8
- def _expand_onehot_labels(labels, label_weights, label_channels):
9
- bin_labels = labels.new_full((labels.size(0), label_channels), 0)
10
- inds = torch.nonzero(
11
- (labels >= 0) & (labels < label_channels), as_tuple=False).squeeze()
12
- if inds.numel() > 0:
13
- bin_labels[inds, labels[inds]] = 1
14
- bin_label_weights = label_weights.view(-1, 1).expand(
15
- label_weights.size(0), label_channels)
16
- return bin_labels, bin_label_weights
17
-
18
-
19
- # TODO: code refactoring to make it consistent with other losses
20
- @LOSSES.register_module()
21
- class GHMC(nn.Module):
22
- """GHM Classification Loss.
23
-
24
- Details of the theorem can be viewed in the paper
25
- `Gradient Harmonized Single-stage Detector
26
- <https://arxiv.org/abs/1811.05181>`_.
27
-
28
- Args:
29
- bins (int): Number of the unit regions for distribution calculation.
30
- momentum (float): The parameter for moving average.
31
- use_sigmoid (bool): Can only be true for BCE based loss now.
32
- loss_weight (float): The weight of the total GHM-C loss.
33
- """
34
-
35
- def __init__(self, bins=10, momentum=0, use_sigmoid=True, loss_weight=1.0):
36
- super(GHMC, self).__init__()
37
- self.bins = bins
38
- self.momentum = momentum
39
- edges = torch.arange(bins + 1).float() / bins
40
- self.register_buffer('edges', edges)
41
- self.edges[-1] += 1e-6
42
- if momentum > 0:
43
- acc_sum = torch.zeros(bins)
44
- self.register_buffer('acc_sum', acc_sum)
45
- self.use_sigmoid = use_sigmoid
46
- if not self.use_sigmoid:
47
- raise NotImplementedError
48
- self.loss_weight = loss_weight
49
-
50
- def forward(self, pred, target, label_weight, *args, **kwargs):
51
- """Calculate the GHM-C loss.
52
-
53
- Args:
54
- pred (float tensor of size [batch_num, class_num]):
55
- The direct prediction of classification fc layer.
56
- target (float tensor of size [batch_num, class_num]):
57
- Binary class target for each sample.
58
- label_weight (float tensor of size [batch_num, class_num]):
59
- the value is 1 if the sample is valid and 0 if ignored.
60
- Returns:
61
- The gradient harmonized loss.
62
- """
63
- # the target should be binary class label
64
- if pred.dim() != target.dim():
65
- target, label_weight = _expand_onehot_labels(
66
- target, label_weight, pred.size(-1))
67
- target, label_weight = target.float(), label_weight.float()
68
- edges = self.edges
69
- mmt = self.momentum
70
- weights = torch.zeros_like(pred)
71
-
72
- # gradient length
73
- g = torch.abs(pred.sigmoid().detach() - target)
74
-
75
- valid = label_weight > 0
76
- tot = max(valid.float().sum().item(), 1.0)
77
- n = 0 # n valid bins
78
- for i in range(self.bins):
79
- inds = (g >= edges[i]) & (g < edges[i + 1]) & valid
80
- num_in_bin = inds.sum().item()
81
- if num_in_bin > 0:
82
- if mmt > 0:
83
- self.acc_sum[i] = mmt * self.acc_sum[i] \
84
- + (1 - mmt) * num_in_bin
85
- weights[inds] = tot / self.acc_sum[i]
86
- else:
87
- weights[inds] = tot / num_in_bin
88
- n += 1
89
- if n > 0:
90
- weights = weights / n
91
-
92
- loss = F.binary_cross_entropy_with_logits(
93
- pred, target, weights, reduction='sum') / tot
94
- return loss * self.loss_weight
95
-
96
-
97
- # TODO: code refactoring to make it consistent with other losses
98
- @LOSSES.register_module()
99
- class GHMR(nn.Module):
100
- """GHM Regression Loss.
101
-
102
- Details of the theorem can be viewed in the paper
103
- `Gradient Harmonized Single-stage Detector
104
- <https://arxiv.org/abs/1811.05181>`_.
105
-
106
- Args:
107
- mu (float): The parameter for the Authentic Smooth L1 loss.
108
- bins (int): Number of the unit regions for distribution calculation.
109
- momentum (float): The parameter for moving average.
110
- loss_weight (float): The weight of the total GHM-R loss.
111
- """
112
-
113
- def __init__(self, mu=0.02, bins=10, momentum=0, loss_weight=1.0):
114
- super(GHMR, self).__init__()
115
- self.mu = mu
116
- self.bins = bins
117
- edges = torch.arange(bins + 1).float() / bins
118
- self.register_buffer('edges', edges)
119
- self.edges[-1] = 1e3
120
- self.momentum = momentum
121
- if momentum > 0:
122
- acc_sum = torch.zeros(bins)
123
- self.register_buffer('acc_sum', acc_sum)
124
- self.loss_weight = loss_weight
125
-
126
- # TODO: support reduction parameter
127
- def forward(self, pred, target, label_weight, avg_factor=None):
128
- """Calculate the GHM-R loss.
129
-
130
- Args:
131
- pred (float tensor of size [batch_num, 4 (* class_num)]):
132
- The prediction of box regression layer. Channel number can be 4
133
- or 4 * class_num depending on whether it is class-agnostic.
134
- target (float tensor of size [batch_num, 4 (* class_num)]):
135
- The target regression values with the same size of pred.
136
- label_weight (float tensor of size [batch_num, 4 (* class_num)]):
137
- The weight of each sample, 0 if ignored.
138
- Returns:
139
- The gradient harmonized loss.
140
- """
141
- mu = self.mu
142
- edges = self.edges
143
- mmt = self.momentum
144
-
145
- # ASL1 loss
146
- diff = pred - target
147
- loss = torch.sqrt(diff * diff + mu * mu) - mu
148
-
149
- # gradient length
150
- g = torch.abs(diff / torch.sqrt(mu * mu + diff * diff)).detach()
151
- weights = torch.zeros_like(g)
152
-
153
- valid = label_weight > 0
154
- tot = max(label_weight.float().sum().item(), 1.0)
155
- n = 0 # n: valid bins
156
- for i in range(self.bins):
157
- inds = (g >= edges[i]) & (g < edges[i + 1]) & valid
158
- num_in_bin = inds.sum().item()
159
- if num_in_bin > 0:
160
- n += 1
161
- if mmt > 0:
162
- self.acc_sum[i] = mmt * self.acc_sum[i] \
163
- + (1 - mmt) * num_in_bin
164
- weights[inds] = tot / self.acc_sum[i]
165
- else:
166
- weights[inds] = tot / num_in_bin
167
- if n > 0:
168
- weights /= n
169
-
170
- loss = loss * weights
171
- loss = loss.sum() / tot
172
- return loss * self.loss_weight
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Cpp4App/Cpp4App/CDM/cnn/CNN.py DELETED
@@ -1,114 +0,0 @@
1
- import keras
2
- from keras.applications.resnet50 import ResNet50
3
- from keras.models import Model,load_model
4
- from keras.layers import Dense, Activation, Flatten, Dropout
5
- from sklearn.metrics import confusion_matrix
6
- import numpy as np
7
- import cv2
8
-
9
- from config.CONFIG import Config
10
- cfg = Config()
11
-
12
-
13
- class CNN:
14
- def __init__(self, classifier_type, is_load=True):
15
- '''
16
- :param classifier_type: 'Text' or 'Noise' or 'Elements'
17
- '''
18
- self.data = None
19
- self.model = None
20
-
21
- self.classifier_type = classifier_type
22
-
23
- self.image_shape = (32,32,3)
24
- self.class_number = None
25
- self.class_map = None
26
- self.model_path = None
27
- self.classifier_type = classifier_type
28
- if is_load:
29
- self.load(classifier_type)
30
-
31
- def build_model(self, epoch_num, is_compile=True):
32
- base_model = ResNet50(include_top=False, weights='imagenet', input_shape=self.image_shape)
33
- for layer in base_model.layers:
34
- layer.trainable = False
35
- self.model = Flatten()(base_model.output)
36
- self.model = Dense(128, activation='relu')(self.model)
37
- self.model = Dropout(0.5)(self.model)
38
- self.model = Dense(15, activation='softmax')(self.model)
39
-
40
- self.model = Model(inputs=base_model.input, outputs=self.model)
41
- if is_compile:
42
- self.model.compile(loss='categorical_crossentropy', optimizer='adadelta', metrics=['accuracy'])
43
- self.model.fit(self.data.X_train, self.data.Y_train, batch_size=64, epochs=epoch_num, verbose=1,
44
- validation_data=(self.data.X_test, self.data.Y_test))
45
-
46
- def train(self, data, epoch_num=30):
47
- self.data = data
48
- self.build_model(epoch_num)
49
- self.model.save(self.model_path)
50
- print("Trained model is saved to", self.model_path)
51
-
52
- def load(self, classifier_type):
53
- if classifier_type == 'Text':
54
- self.model_path = 'E:/Mulong/Model/rico_compos/cnn-textview-2.h5'
55
- self.class_map = ['Text', 'Non-Text']
56
- elif classifier_type == 'Noise':
57
- self.model_path = 'E:/Mulong/Model/rico_compos/cnn-noise-1.h5'
58
- self.class_map = ['Noise', 'Non-Noise']
59
- elif classifier_type == 'Elements':
60
- # self.model_path = 'E:/Mulong/Model/rico_compos/resnet-ele14-19.h5'
61
- # self.model_path = 'E:/Mulong/Model/rico_compos/resnet-ele14-28.h5'
62
- # self.model_path = 'E:/Mulong/Model/rico_compos/resnet-ele14-45.h5'
63
- self.model_path = cfg.CNN_PATH
64
- self.class_map = cfg.element_class
65
- self.image_shape = (64, 64, 3)
66
- elif classifier_type == 'Image':
67
- self.model_path = 'E:/Mulong/Model/rico_compos/cnn-image-1.h5'
68
- self.class_map = ['Image', 'Non-Image']
69
- self.class_number = len(self.class_map)
70
- self.model = load_model(self.model_path)
71
- print('Model Loaded From', self.model_path)
72
-
73
- def preprocess_img(self, image):
74
- image = cv2.resize(image, self.image_shape[:2])
75
- x = (image / 255).astype('float32')
76
- x = np.array([x])
77
- return x
78
-
79
- def predict(self, imgs, compos, load=False, show=False):
80
- """
81
- :type img_path: list of img path
82
- """
83
- if load:
84
- self.load(self.classifier_type)
85
- if self.model is None:
86
- print("*** No model loaded ***")
87
- return
88
- for i in range(len(imgs)):
89
- X = self.preprocess_img(imgs[i])
90
- Y = self.class_map[np.argmax(self.model.predict(X))]
91
- compos[i].category = Y
92
- if show:
93
- print(Y)
94
- cv2.imshow('element', imgs[i])
95
- cv2.waitKey()
96
-
97
- def evaluate(self, data, load=True):
98
- if load:
99
- self.load(self.classifier_type)
100
- X_test = data.X_test
101
- Y_test = [np.argmax(y) for y in data.Y_test]
102
- Y_pre = [np.argmax(y_pre) for y_pre in self.model.predict(X_test, verbose=1)]
103
-
104
- matrix = confusion_matrix(Y_test, Y_pre)
105
- print(matrix)
106
-
107
- TP, FP, FN = 0, 0, 0
108
- for i in range(len(matrix)):
109
- TP += matrix[i][i]
110
- FP += sum(matrix[i][:]) - matrix[i][i]
111
- FN += sum(matrix[:][i]) - matrix[i][i]
112
- precision = TP/(TP+FP)
113
- recall = TP / (TP+FN)
114
- print("Precision:%.3f, Recall:%.3f" % (precision, recall))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Cyril666/ContourNet-ABI/maskrcnn_benchmark/data/datasets/word_dataset.py DELETED
@@ -1,107 +0,0 @@
1
- import torch
2
- import torchvision
3
-
4
- from maskrcnn_benchmark.structures.bounding_box import BoxList
5
- from maskrcnn_benchmark.structures.segmentation_mask import SegmentationMask
6
-
7
- from maskrcnn_benchmark.structures.ke import textKES
8
- from maskrcnn_benchmark.structures.mty import MTY
9
-
10
- DEBUG = 0
11
-
12
- class WordDataset(torchvision.datasets.coco.CocoDetection):
13
- def __init__(
14
- self, ann_file, root, remove_images_without_annotations, transforms=None
15
- ):
16
- super(WordDataset, self).__init__(root, ann_file)
17
- # sort indices for reproducible results
18
- self.ids = sorted(self.ids)
19
-
20
- # filter images without detection annotations
21
- if remove_images_without_annotations:
22
- self.ids = [
23
- img_id
24
- for img_id in self.ids
25
- if len(self.coco.getAnnIds(imgIds=img_id, iscrowd=None)) > 0
26
- ]
27
-
28
- self.json_category_id_to_contiguous_id = {
29
- v: i + 1 for i, v in enumerate(self.coco.getCatIds())
30
- }
31
- self.contiguous_category_id_to_json_id = {
32
- v: k for k, v in self.json_category_id_to_contiguous_id.items()
33
- }
34
- self.id_to_img_map = {k: v for k, v in enumerate(self.ids)}
35
- self.transforms = transforms
36
-
37
- def kes_encode(self, kes):
38
- kes_encode = []
39
- for i in kes:
40
- mnx = i[0]
41
- mny = i[1]
42
- assert(len(i)%3 == 0)
43
- npts = int(len(i)/3-2)
44
- for index in range(npts):
45
- i[3+index*3] = (i[3+index*3]+mnx)/2
46
- i[4+index*3] = (i[4+index*3]+mny)/2
47
- kes_encode.append(i)
48
- return kes_encode
49
-
50
- def kes_gen(self, kes):
51
- kes_gen_out = []
52
- for i in kes:
53
- mnx = i[0]
54
- mny = i[1]
55
- cx= i[27]
56
- cy= i[28]
57
- assert(len(i)%3 == 0)
58
- ot = [mnx, i[3],i[6],i[9],i[12], cx,\
59
- mny, i[16],i[19],i[22],i[25], cy]
60
- kes_gen_out.append(ot)
61
- return kes_gen_out
62
-
63
- def __getitem__(self, idx):
64
- img, anno = super(WordDataset, self).__getitem__(idx)
65
- # filter crowd annotations
66
- # TODO might be better to add an extra field
67
- anno = [obj for obj in anno if obj["iscrowd"] == 0]
68
-
69
- boxes = [obj["bbox"] for obj in anno]
70
- if DEBUG: print('len(boxes)', len(boxes), boxes[0])
71
- boxes = torch.as_tensor(boxes).reshape(-1, 4) # guard against no boxes
72
- target = BoxList(boxes, img.size, mode="xywh").convert("xyxy")
73
-
74
- classes = [obj["category_id"] for obj in anno]
75
- if DEBUG: print('len(classes)', len(classes), classes[0])
76
- classes = [self.json_category_id_to_contiguous_id[c] for c in classes]
77
- classes = torch.tensor(classes)
78
- target.add_field("labels", classes)
79
-
80
- masks = [obj["segmentation"] for obj in anno]
81
- if DEBUG: print('len(masks)', len(masks), masks[0])
82
- masks = SegmentationMask(masks, img.size)
83
- target.add_field("masks", masks)
84
-
85
- if anno and 'keypoints' in anno[0]:
86
- kes = [obj["keypoints"] for obj in anno]
87
- kes = self.kes_gen(kes)
88
- if DEBUG: print('len(kes)', len(kes), kes[0])
89
- kes = textKES(kes, img.size)
90
- target.add_field("kes", kes)
91
-
92
- if anno and 'match_type' in anno[0]:
93
- mty = [obj["match_type"] for obj in anno]
94
- mty = MTY(mty, img.size)
95
- target.add_field("mty", mty)
96
-
97
- target = target.clip_to_image(remove_empty=True)
98
-
99
- if self.transforms is not None:
100
- img, target = self.transforms(img, target)
101
-
102
- return img, target, idx
103
-
104
- def get_img_info(self, index):
105
- img_id = self.id_to_img_map[index]
106
- img_data = self.coco.imgs[img_id]
107
- return img_data
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/DJQmUKV/rvc-inference/infer_pack/models.py DELETED
@@ -1,1116 +0,0 @@
1
- import math, pdb, os
2
- from time import time as ttime
3
- import torch
4
- from torch import nn
5
- from torch.nn import functional as F
6
- from infer_pack import modules
7
- from infer_pack import attentions
8
- from infer_pack import commons
9
- from infer_pack.commons import init_weights, get_padding
10
- from torch.nn import Conv1d, ConvTranspose1d, AvgPool1d, Conv2d
11
- from torch.nn.utils import weight_norm, remove_weight_norm, spectral_norm
12
- from infer_pack.commons import init_weights
13
- import numpy as np
14
- from infer_pack import commons
15
-
16
-
17
- class TextEncoder256(nn.Module):
18
- def __init__(
19
- self,
20
- out_channels,
21
- hidden_channels,
22
- filter_channels,
23
- n_heads,
24
- n_layers,
25
- kernel_size,
26
- p_dropout,
27
- f0=True,
28
- ):
29
- super().__init__()
30
- self.out_channels = out_channels
31
- self.hidden_channels = hidden_channels
32
- self.filter_channels = filter_channels
33
- self.n_heads = n_heads
34
- self.n_layers = n_layers
35
- self.kernel_size = kernel_size
36
- self.p_dropout = p_dropout
37
- self.emb_phone = nn.Linear(256, hidden_channels)
38
- self.lrelu = nn.LeakyReLU(0.1, inplace=True)
39
- if f0 == True:
40
- self.emb_pitch = nn.Embedding(256, hidden_channels) # pitch 256
41
- self.encoder = attentions.Encoder(
42
- hidden_channels, filter_channels, n_heads, n_layers, kernel_size, p_dropout
43
- )
44
- self.proj = nn.Conv1d(hidden_channels, out_channels * 2, 1)
45
-
46
- def forward(self, phone, pitch, lengths):
47
- if pitch == None:
48
- x = self.emb_phone(phone)
49
- else:
50
- x = self.emb_phone(phone) + self.emb_pitch(pitch)
51
- x = x * math.sqrt(self.hidden_channels) # [b, t, h]
52
- x = self.lrelu(x)
53
- x = torch.transpose(x, 1, -1) # [b, h, t]
54
- x_mask = torch.unsqueeze(commons.sequence_mask(lengths, x.size(2)), 1).to(
55
- x.dtype
56
- )
57
- x = self.encoder(x * x_mask, x_mask)
58
- stats = self.proj(x) * x_mask
59
-
60
- m, logs = torch.split(stats, self.out_channels, dim=1)
61
- return m, logs, x_mask
62
- class TextEncoder768(nn.Module):
63
- def __init__(
64
- self,
65
- out_channels,
66
- hidden_channels,
67
- filter_channels,
68
- n_heads,
69
- n_layers,
70
- kernel_size,
71
- p_dropout,
72
- f0=True,
73
- ):
74
- super().__init__()
75
- self.out_channels = out_channels
76
- self.hidden_channels = hidden_channels
77
- self.filter_channels = filter_channels
78
- self.n_heads = n_heads
79
- self.n_layers = n_layers
80
- self.kernel_size = kernel_size
81
- self.p_dropout = p_dropout
82
- self.emb_phone = nn.Linear(768, hidden_channels)
83
- self.lrelu = nn.LeakyReLU(0.1, inplace=True)
84
- if f0 == True:
85
- self.emb_pitch = nn.Embedding(256, hidden_channels) # pitch 256
86
- self.encoder = attentions.Encoder(
87
- hidden_channels, filter_channels, n_heads, n_layers, kernel_size, p_dropout
88
- )
89
- self.proj = nn.Conv1d(hidden_channels, out_channels * 2, 1)
90
-
91
- def forward(self, phone, pitch, lengths):
92
- if pitch == None:
93
- x = self.emb_phone(phone)
94
- else:
95
- x = self.emb_phone(phone) + self.emb_pitch(pitch)
96
- x = x * math.sqrt(self.hidden_channels) # [b, t, h]
97
- x = self.lrelu(x)
98
- x = torch.transpose(x, 1, -1) # [b, h, t]
99
- x_mask = torch.unsqueeze(commons.sequence_mask(lengths, x.size(2)), 1).to(
100
- x.dtype
101
- )
102
- x = self.encoder(x * x_mask, x_mask)
103
- stats = self.proj(x) * x_mask
104
-
105
- m, logs = torch.split(stats, self.out_channels, dim=1)
106
- return m, logs, x_mask
107
-
108
- class ResidualCouplingBlock(nn.Module):
109
- def __init__(
110
- self,
111
- channels,
112
- hidden_channels,
113
- kernel_size,
114
- dilation_rate,
115
- n_layers,
116
- n_flows=4,
117
- gin_channels=0,
118
- ):
119
- super().__init__()
120
- self.channels = channels
121
- self.hidden_channels = hidden_channels
122
- self.kernel_size = kernel_size
123
- self.dilation_rate = dilation_rate
124
- self.n_layers = n_layers
125
- self.n_flows = n_flows
126
- self.gin_channels = gin_channels
127
-
128
- self.flows = nn.ModuleList()
129
- for i in range(n_flows):
130
- self.flows.append(
131
- modules.ResidualCouplingLayer(
132
- channels,
133
- hidden_channels,
134
- kernel_size,
135
- dilation_rate,
136
- n_layers,
137
- gin_channels=gin_channels,
138
- mean_only=True,
139
- )
140
- )
141
- self.flows.append(modules.Flip())
142
-
143
- def forward(self, x, x_mask, g=None, reverse=False):
144
- if not reverse:
145
- for flow in self.flows:
146
- x, _ = flow(x, x_mask, g=g, reverse=reverse)
147
- else:
148
- for flow in reversed(self.flows):
149
- x = flow(x, x_mask, g=g, reverse=reverse)
150
- return x
151
-
152
- def remove_weight_norm(self):
153
- for i in range(self.n_flows):
154
- self.flows[i * 2].remove_weight_norm()
155
-
156
-
157
- class PosteriorEncoder(nn.Module):
158
- def __init__(
159
- self,
160
- in_channels,
161
- out_channels,
162
- hidden_channels,
163
- kernel_size,
164
- dilation_rate,
165
- n_layers,
166
- gin_channels=0,
167
- ):
168
- super().__init__()
169
- self.in_channels = in_channels
170
- self.out_channels = out_channels
171
- self.hidden_channels = hidden_channels
172
- self.kernel_size = kernel_size
173
- self.dilation_rate = dilation_rate
174
- self.n_layers = n_layers
175
- self.gin_channels = gin_channels
176
-
177
- self.pre = nn.Conv1d(in_channels, hidden_channels, 1)
178
- self.enc = modules.WN(
179
- hidden_channels,
180
- kernel_size,
181
- dilation_rate,
182
- n_layers,
183
- gin_channels=gin_channels,
184
- )
185
- self.proj = nn.Conv1d(hidden_channels, out_channels * 2, 1)
186
-
187
- def forward(self, x, x_lengths, g=None):
188
- x_mask = torch.unsqueeze(commons.sequence_mask(x_lengths, x.size(2)), 1).to(
189
- x.dtype
190
- )
191
- x = self.pre(x) * x_mask
192
- x = self.enc(x, x_mask, g=g)
193
- stats = self.proj(x) * x_mask
194
- m, logs = torch.split(stats, self.out_channels, dim=1)
195
- z = (m + torch.randn_like(m) * torch.exp(logs)) * x_mask
196
- return z, m, logs, x_mask
197
-
198
- def remove_weight_norm(self):
199
- self.enc.remove_weight_norm()
200
-
201
-
202
- class Generator(torch.nn.Module):
203
- def __init__(
204
- self,
205
- initial_channel,
206
- resblock,
207
- resblock_kernel_sizes,
208
- resblock_dilation_sizes,
209
- upsample_rates,
210
- upsample_initial_channel,
211
- upsample_kernel_sizes,
212
- gin_channels=0,
213
- ):
214
- super(Generator, self).__init__()
215
- self.num_kernels = len(resblock_kernel_sizes)
216
- self.num_upsamples = len(upsample_rates)
217
- self.conv_pre = Conv1d(
218
- initial_channel, upsample_initial_channel, 7, 1, padding=3
219
- )
220
- resblock = modules.ResBlock1 if resblock == "1" else modules.ResBlock2
221
-
222
- self.ups = nn.ModuleList()
223
- for i, (u, k) in enumerate(zip(upsample_rates, upsample_kernel_sizes)):
224
- self.ups.append(
225
- weight_norm(
226
- ConvTranspose1d(
227
- upsample_initial_channel // (2**i),
228
- upsample_initial_channel // (2 ** (i + 1)),
229
- k,
230
- u,
231
- padding=(k - u) // 2,
232
- )
233
- )
234
- )
235
-
236
- self.resblocks = nn.ModuleList()
237
- for i in range(len(self.ups)):
238
- ch = upsample_initial_channel // (2 ** (i + 1))
239
- for j, (k, d) in enumerate(
240
- zip(resblock_kernel_sizes, resblock_dilation_sizes)
241
- ):
242
- self.resblocks.append(resblock(ch, k, d))
243
-
244
- self.conv_post = Conv1d(ch, 1, 7, 1, padding=3, bias=False)
245
- self.ups.apply(init_weights)
246
-
247
- if gin_channels != 0:
248
- self.cond = nn.Conv1d(gin_channels, upsample_initial_channel, 1)
249
-
250
- def forward(self, x, g=None):
251
- x = self.conv_pre(x)
252
- if g is not None:
253
- x = x + self.cond(g)
254
-
255
- for i in range(self.num_upsamples):
256
- x = F.leaky_relu(x, modules.LRELU_SLOPE)
257
- x = self.ups[i](x)
258
- xs = None
259
- for j in range(self.num_kernels):
260
- if xs is None:
261
- xs = self.resblocks[i * self.num_kernels + j](x)
262
- else:
263
- xs += self.resblocks[i * self.num_kernels + j](x)
264
- x = xs / self.num_kernels
265
- x = F.leaky_relu(x)
266
- x = self.conv_post(x)
267
- x = torch.tanh(x)
268
-
269
- return x
270
-
271
- def remove_weight_norm(self):
272
- for l in self.ups:
273
- remove_weight_norm(l)
274
- for l in self.resblocks:
275
- l.remove_weight_norm()
276
-
277
-
278
- class SineGen(torch.nn.Module):
279
- """Definition of sine generator
280
- SineGen(samp_rate, harmonic_num = 0,
281
- sine_amp = 0.1, noise_std = 0.003,
282
- voiced_threshold = 0,
283
- flag_for_pulse=False)
284
- samp_rate: sampling rate in Hz
285
- harmonic_num: number of harmonic overtones (default 0)
286
- sine_amp: amplitude of sine-wavefrom (default 0.1)
287
- noise_std: std of Gaussian noise (default 0.003)
288
- voiced_thoreshold: F0 threshold for U/V classification (default 0)
289
- flag_for_pulse: this SinGen is used inside PulseGen (default False)
290
- Note: when flag_for_pulse is True, the first time step of a voiced
291
- segment is always sin(np.pi) or cos(0)
292
- """
293
-
294
- def __init__(
295
- self,
296
- samp_rate,
297
- harmonic_num=0,
298
- sine_amp=0.1,
299
- noise_std=0.003,
300
- voiced_threshold=0,
301
- flag_for_pulse=False,
302
- ):
303
- super(SineGen, self).__init__()
304
- self.sine_amp = sine_amp
305
- self.noise_std = noise_std
306
- self.harmonic_num = harmonic_num
307
- self.dim = self.harmonic_num + 1
308
- self.sampling_rate = samp_rate
309
- self.voiced_threshold = voiced_threshold
310
-
311
- def _f02uv(self, f0):
312
- # generate uv signal
313
- uv = torch.ones_like(f0)
314
- uv = uv * (f0 > self.voiced_threshold)
315
- return uv
316
-
317
- def forward(self, f0, upp):
318
- """sine_tensor, uv = forward(f0)
319
- input F0: tensor(batchsize=1, length, dim=1)
320
- f0 for unvoiced steps should be 0
321
- output sine_tensor: tensor(batchsize=1, length, dim)
322
- output uv: tensor(batchsize=1, length, 1)
323
- """
324
- with torch.no_grad():
325
- f0 = f0[:, None].transpose(1, 2)
326
- f0_buf = torch.zeros(f0.shape[0], f0.shape[1], self.dim, device=f0.device)
327
- # fundamental component
328
- f0_buf[:, :, 0] = f0[:, :, 0]
329
- for idx in np.arange(self.harmonic_num):
330
- f0_buf[:, :, idx + 1] = f0_buf[:, :, 0] * (
331
- idx + 2
332
- ) # idx + 2: the (idx+1)-th overtone, (idx+2)-th harmonic
333
- rad_values = (f0_buf / self.sampling_rate) % 1 ###%1意味着n_har的乘积无法后处理优化
334
- rand_ini = torch.rand(
335
- f0_buf.shape[0], f0_buf.shape[2], device=f0_buf.device
336
- )
337
- rand_ini[:, 0] = 0
338
- rad_values[:, 0, :] = rad_values[:, 0, :] + rand_ini
339
- tmp_over_one = torch.cumsum(rad_values, 1) # % 1 #####%1意味着后面的cumsum无法再优化
340
- tmp_over_one *= upp
341
- tmp_over_one = F.interpolate(
342
- tmp_over_one.transpose(2, 1),
343
- scale_factor=upp,
344
- mode="linear",
345
- align_corners=True,
346
- ).transpose(2, 1)
347
- rad_values = F.interpolate(
348
- rad_values.transpose(2, 1), scale_factor=upp, mode="nearest"
349
- ).transpose(
350
- 2, 1
351
- ) #######
352
- tmp_over_one %= 1
353
- tmp_over_one_idx = (tmp_over_one[:, 1:, :] - tmp_over_one[:, :-1, :]) < 0
354
- cumsum_shift = torch.zeros_like(rad_values)
355
- cumsum_shift[:, 1:, :] = tmp_over_one_idx * -1.0
356
- sine_waves = torch.sin(
357
- torch.cumsum(rad_values + cumsum_shift, dim=1) * 2 * np.pi
358
- )
359
- sine_waves = sine_waves * self.sine_amp
360
- uv = self._f02uv(f0)
361
- uv = F.interpolate(
362
- uv.transpose(2, 1), scale_factor=upp, mode="nearest"
363
- ).transpose(2, 1)
364
- noise_amp = uv * self.noise_std + (1 - uv) * self.sine_amp / 3
365
- noise = noise_amp * torch.randn_like(sine_waves)
366
- sine_waves = sine_waves * uv + noise
367
- return sine_waves, uv, noise
368
-
369
-
370
- class SourceModuleHnNSF(torch.nn.Module):
371
- """SourceModule for hn-nsf
372
- SourceModule(sampling_rate, harmonic_num=0, sine_amp=0.1,
373
- add_noise_std=0.003, voiced_threshod=0)
374
- sampling_rate: sampling_rate in Hz
375
- harmonic_num: number of harmonic above F0 (default: 0)
376
- sine_amp: amplitude of sine source signal (default: 0.1)
377
- add_noise_std: std of additive Gaussian noise (default: 0.003)
378
- note that amplitude of noise in unvoiced is decided
379
- by sine_amp
380
- voiced_threshold: threhold to set U/V given F0 (default: 0)
381
- Sine_source, noise_source = SourceModuleHnNSF(F0_sampled)
382
- F0_sampled (batchsize, length, 1)
383
- Sine_source (batchsize, length, 1)
384
- noise_source (batchsize, length 1)
385
- uv (batchsize, length, 1)
386
- """
387
-
388
- def __init__(
389
- self,
390
- sampling_rate,
391
- harmonic_num=0,
392
- sine_amp=0.1,
393
- add_noise_std=0.003,
394
- voiced_threshod=0,
395
- is_half=True,
396
- ):
397
- super(SourceModuleHnNSF, self).__init__()
398
-
399
- self.sine_amp = sine_amp
400
- self.noise_std = add_noise_std
401
- self.is_half = is_half
402
- # to produce sine waveforms
403
- self.l_sin_gen = SineGen(
404
- sampling_rate, harmonic_num, sine_amp, add_noise_std, voiced_threshod
405
- )
406
-
407
- # to merge source harmonics into a single excitation
408
- self.l_linear = torch.nn.Linear(harmonic_num + 1, 1)
409
- self.l_tanh = torch.nn.Tanh()
410
-
411
- def forward(self, x, upp=None):
412
- sine_wavs, uv, _ = self.l_sin_gen(x, upp)
413
- if self.is_half:
414
- sine_wavs = sine_wavs.half()
415
- sine_merge = self.l_tanh(self.l_linear(sine_wavs))
416
- return sine_merge, None, None # noise, uv
417
-
418
-
419
- class GeneratorNSF(torch.nn.Module):
420
- def __init__(
421
- self,
422
- initial_channel,
423
- resblock,
424
- resblock_kernel_sizes,
425
- resblock_dilation_sizes,
426
- upsample_rates,
427
- upsample_initial_channel,
428
- upsample_kernel_sizes,
429
- gin_channels,
430
- sr,
431
- is_half=False,
432
- ):
433
- super(GeneratorNSF, self).__init__()
434
- self.num_kernels = len(resblock_kernel_sizes)
435
- self.num_upsamples = len(upsample_rates)
436
-
437
- self.f0_upsamp = torch.nn.Upsample(scale_factor=np.prod(upsample_rates))
438
- self.m_source = SourceModuleHnNSF(
439
- sampling_rate=sr, harmonic_num=0, is_half=is_half
440
- )
441
- self.noise_convs = nn.ModuleList()
442
- self.conv_pre = Conv1d(
443
- initial_channel, upsample_initial_channel, 7, 1, padding=3
444
- )
445
- resblock = modules.ResBlock1 if resblock == "1" else modules.ResBlock2
446
-
447
- self.ups = nn.ModuleList()
448
- for i, (u, k) in enumerate(zip(upsample_rates, upsample_kernel_sizes)):
449
- c_cur = upsample_initial_channel // (2 ** (i + 1))
450
- self.ups.append(
451
- weight_norm(
452
- ConvTranspose1d(
453
- upsample_initial_channel // (2**i),
454
- upsample_initial_channel // (2 ** (i + 1)),
455
- k,
456
- u,
457
- padding=(k - u) // 2,
458
- )
459
- )
460
- )
461
- if i + 1 < len(upsample_rates):
462
- stride_f0 = np.prod(upsample_rates[i + 1 :])
463
- self.noise_convs.append(
464
- Conv1d(
465
- 1,
466
- c_cur,
467
- kernel_size=stride_f0 * 2,
468
- stride=stride_f0,
469
- padding=stride_f0 // 2,
470
- )
471
- )
472
- else:
473
- self.noise_convs.append(Conv1d(1, c_cur, kernel_size=1))
474
-
475
- self.resblocks = nn.ModuleList()
476
- for i in range(len(self.ups)):
477
- ch = upsample_initial_channel // (2 ** (i + 1))
478
- for j, (k, d) in enumerate(
479
- zip(resblock_kernel_sizes, resblock_dilation_sizes)
480
- ):
481
- self.resblocks.append(resblock(ch, k, d))
482
-
483
- self.conv_post = Conv1d(ch, 1, 7, 1, padding=3, bias=False)
484
- self.ups.apply(init_weights)
485
-
486
- if gin_channels != 0:
487
- self.cond = nn.Conv1d(gin_channels, upsample_initial_channel, 1)
488
-
489
- self.upp = np.prod(upsample_rates)
490
-
491
- def forward(self, x, f0, g=None):
492
- har_source, noi_source, uv = self.m_source(f0, self.upp)
493
- har_source = har_source.transpose(1, 2)
494
- x = self.conv_pre(x)
495
- if g is not None:
496
- x = x + self.cond(g)
497
-
498
- for i in range(self.num_upsamples):
499
- x = F.leaky_relu(x, modules.LRELU_SLOPE)
500
- x = self.ups[i](x)
501
- x_source = self.noise_convs[i](har_source)
502
- x = x + x_source
503
- xs = None
504
- for j in range(self.num_kernels):
505
- if xs is None:
506
- xs = self.resblocks[i * self.num_kernels + j](x)
507
- else:
508
- xs += self.resblocks[i * self.num_kernels + j](x)
509
- x = xs / self.num_kernels
510
- x = F.leaky_relu(x)
511
- x = self.conv_post(x)
512
- x = torch.tanh(x)
513
- return x
514
-
515
- def remove_weight_norm(self):
516
- for l in self.ups:
517
- remove_weight_norm(l)
518
- for l in self.resblocks:
519
- l.remove_weight_norm()
520
-
521
-
522
- sr2sr = {
523
- "32k": 32000,
524
- "40k": 40000,
525
- "48k": 48000,
526
- }
527
-
528
-
529
- class SynthesizerTrnMs256NSFsid(nn.Module):
530
- def __init__(
531
- self,
532
- spec_channels,
533
- segment_size,
534
- inter_channels,
535
- hidden_channels,
536
- filter_channels,
537
- n_heads,
538
- n_layers,
539
- kernel_size,
540
- p_dropout,
541
- resblock,
542
- resblock_kernel_sizes,
543
- resblock_dilation_sizes,
544
- upsample_rates,
545
- upsample_initial_channel,
546
- upsample_kernel_sizes,
547
- spk_embed_dim,
548
- gin_channels,
549
- sr,
550
- **kwargs
551
- ):
552
- super().__init__()
553
- if type(sr) == type("strr"):
554
- sr = sr2sr[sr]
555
- self.spec_channels = spec_channels
556
- self.inter_channels = inter_channels
557
- self.hidden_channels = hidden_channels
558
- self.filter_channels = filter_channels
559
- self.n_heads = n_heads
560
- self.n_layers = n_layers
561
- self.kernel_size = kernel_size
562
- self.p_dropout = p_dropout
563
- self.resblock = resblock
564
- self.resblock_kernel_sizes = resblock_kernel_sizes
565
- self.resblock_dilation_sizes = resblock_dilation_sizes
566
- self.upsample_rates = upsample_rates
567
- self.upsample_initial_channel = upsample_initial_channel
568
- self.upsample_kernel_sizes = upsample_kernel_sizes
569
- self.segment_size = segment_size
570
- self.gin_channels = gin_channels
571
- # self.hop_length = hop_length#
572
- self.spk_embed_dim = spk_embed_dim
573
- self.enc_p = TextEncoder256(
574
- inter_channels,
575
- hidden_channels,
576
- filter_channels,
577
- n_heads,
578
- n_layers,
579
- kernel_size,
580
- p_dropout,
581
- )
582
- self.dec = GeneratorNSF(
583
- inter_channels,
584
- resblock,
585
- resblock_kernel_sizes,
586
- resblock_dilation_sizes,
587
- upsample_rates,
588
- upsample_initial_channel,
589
- upsample_kernel_sizes,
590
- gin_channels=gin_channels,
591
- sr=sr,
592
- is_half=kwargs["is_half"],
593
- )
594
- self.enc_q = PosteriorEncoder(
595
- spec_channels,
596
- inter_channels,
597
- hidden_channels,
598
- 5,
599
- 1,
600
- 16,
601
- gin_channels=gin_channels,
602
- )
603
- self.flow = ResidualCouplingBlock(
604
- inter_channels, hidden_channels, 5, 1, 3, gin_channels=gin_channels
605
- )
606
- self.emb_g = nn.Embedding(self.spk_embed_dim, gin_channels)
607
- print("gin_channels:", gin_channels, "self.spk_embed_dim:", self.spk_embed_dim)
608
-
609
- def remove_weight_norm(self):
610
- self.dec.remove_weight_norm()
611
- self.flow.remove_weight_norm()
612
- self.enc_q.remove_weight_norm()
613
-
614
- def forward(
615
- self, phone, phone_lengths, pitch, pitchf, y, y_lengths, ds
616
- ): # 这里ds是id,[bs,1]
617
- # print(1,pitch.shape)#[bs,t]
618
- g = self.emb_g(ds).unsqueeze(-1) # [b, 256, 1]##1是t,广播的
619
- m_p, logs_p, x_mask = self.enc_p(phone, pitch, phone_lengths)
620
- z, m_q, logs_q, y_mask = self.enc_q(y, y_lengths, g=g)
621
- z_p = self.flow(z, y_mask, g=g)
622
- z_slice, ids_slice = commons.rand_slice_segments(
623
- z, y_lengths, self.segment_size
624
- )
625
- # print(-1,pitchf.shape,ids_slice,self.segment_size,self.hop_length,self.segment_size//self.hop_length)
626
- pitchf = commons.slice_segments2(pitchf, ids_slice, self.segment_size)
627
- # print(-2,pitchf.shape,z_slice.shape)
628
- o = self.dec(z_slice, pitchf, g=g)
629
- return o, ids_slice, x_mask, y_mask, (z, z_p, m_p, logs_p, m_q, logs_q)
630
-
631
- def infer(self, phone, phone_lengths, pitch, nsff0, sid, max_len=None):
632
- g = self.emb_g(sid).unsqueeze(-1)
633
- m_p, logs_p, x_mask = self.enc_p(phone, pitch, phone_lengths)
634
- z_p = (m_p + torch.exp(logs_p) * torch.randn_like(m_p) * 0.66666) * x_mask
635
- z = self.flow(z_p, x_mask, g=g, reverse=True)
636
- o = self.dec((z * x_mask)[:, :, :max_len], nsff0, g=g)
637
- return o, x_mask, (z, z_p, m_p, logs_p)
638
- class SynthesizerTrnMs768NSFsid(nn.Module):
639
- def __init__(
640
- self,
641
- spec_channels,
642
- segment_size,
643
- inter_channels,
644
- hidden_channels,
645
- filter_channels,
646
- n_heads,
647
- n_layers,
648
- kernel_size,
649
- p_dropout,
650
- resblock,
651
- resblock_kernel_sizes,
652
- resblock_dilation_sizes,
653
- upsample_rates,
654
- upsample_initial_channel,
655
- upsample_kernel_sizes,
656
- spk_embed_dim,
657
- gin_channels,
658
- sr,
659
- **kwargs
660
- ):
661
- super().__init__()
662
- if type(sr) == type("strr"):
663
- sr = sr2sr[sr]
664
- self.spec_channels = spec_channels
665
- self.inter_channels = inter_channels
666
- self.hidden_channels = hidden_channels
667
- self.filter_channels = filter_channels
668
- self.n_heads = n_heads
669
- self.n_layers = n_layers
670
- self.kernel_size = kernel_size
671
- self.p_dropout = p_dropout
672
- self.resblock = resblock
673
- self.resblock_kernel_sizes = resblock_kernel_sizes
674
- self.resblock_dilation_sizes = resblock_dilation_sizes
675
- self.upsample_rates = upsample_rates
676
- self.upsample_initial_channel = upsample_initial_channel
677
- self.upsample_kernel_sizes = upsample_kernel_sizes
678
- self.segment_size = segment_size
679
- self.gin_channels = gin_channels
680
- # self.hop_length = hop_length#
681
- self.spk_embed_dim = spk_embed_dim
682
- self.enc_p = TextEncoder768(
683
- inter_channels,
684
- hidden_channels,
685
- filter_channels,
686
- n_heads,
687
- n_layers,
688
- kernel_size,
689
- p_dropout,
690
- )
691
- self.dec = GeneratorNSF(
692
- inter_channels,
693
- resblock,
694
- resblock_kernel_sizes,
695
- resblock_dilation_sizes,
696
- upsample_rates,
697
- upsample_initial_channel,
698
- upsample_kernel_sizes,
699
- gin_channels=gin_channels,
700
- sr=sr,
701
- is_half=kwargs["is_half"],
702
- )
703
- self.enc_q = PosteriorEncoder(
704
- spec_channels,
705
- inter_channels,
706
- hidden_channels,
707
- 5,
708
- 1,
709
- 16,
710
- gin_channels=gin_channels,
711
- )
712
- self.flow = ResidualCouplingBlock(
713
- inter_channels, hidden_channels, 5, 1, 3, gin_channels=gin_channels
714
- )
715
- self.emb_g = nn.Embedding(self.spk_embed_dim, gin_channels)
716
- print("gin_channels:", gin_channels, "self.spk_embed_dim:", self.spk_embed_dim)
717
-
718
- def remove_weight_norm(self):
719
- self.dec.remove_weight_norm()
720
- self.flow.remove_weight_norm()
721
- self.enc_q.remove_weight_norm()
722
-
723
- def forward(
724
- self, phone, phone_lengths, pitch, pitchf, y, y_lengths, ds
725
- ): # 这里ds是id,[bs,1]
726
- # print(1,pitch.shape)#[bs,t]
727
- g = self.emb_g(ds).unsqueeze(-1) # [b, 256, 1]##1是t,广播的
728
- m_p, logs_p, x_mask = self.enc_p(phone, pitch, phone_lengths)
729
- z, m_q, logs_q, y_mask = self.enc_q(y, y_lengths, g=g)
730
- z_p = self.flow(z, y_mask, g=g)
731
- z_slice, ids_slice = commons.rand_slice_segments(
732
- z, y_lengths, self.segment_size
733
- )
734
- # print(-1,pitchf.shape,ids_slice,self.segment_size,self.hop_length,self.segment_size//self.hop_length)
735
- pitchf = commons.slice_segments2(pitchf, ids_slice, self.segment_size)
736
- # print(-2,pitchf.shape,z_slice.shape)
737
- o = self.dec(z_slice, pitchf, g=g)
738
- return o, ids_slice, x_mask, y_mask, (z, z_p, m_p, logs_p, m_q, logs_q)
739
-
740
- def infer(self, phone, phone_lengths, pitch, nsff0, sid, max_len=None):
741
- g = self.emb_g(sid).unsqueeze(-1)
742
- m_p, logs_p, x_mask = self.enc_p(phone, pitch, phone_lengths)
743
- z_p = (m_p + torch.exp(logs_p) * torch.randn_like(m_p) * 0.66666) * x_mask
744
- z = self.flow(z_p, x_mask, g=g, reverse=True)
745
- o = self.dec((z * x_mask)[:, :, :max_len], nsff0, g=g)
746
- return o, x_mask, (z, z_p, m_p, logs_p)
747
-
748
-
749
- class SynthesizerTrnMs256NSFsid_nono(nn.Module):
750
- def __init__(
751
- self,
752
- spec_channels,
753
- segment_size,
754
- inter_channels,
755
- hidden_channels,
756
- filter_channels,
757
- n_heads,
758
- n_layers,
759
- kernel_size,
760
- p_dropout,
761
- resblock,
762
- resblock_kernel_sizes,
763
- resblock_dilation_sizes,
764
- upsample_rates,
765
- upsample_initial_channel,
766
- upsample_kernel_sizes,
767
- spk_embed_dim,
768
- gin_channels,
769
- sr=None,
770
- **kwargs
771
- ):
772
- super().__init__()
773
- self.spec_channels = spec_channels
774
- self.inter_channels = inter_channels
775
- self.hidden_channels = hidden_channels
776
- self.filter_channels = filter_channels
777
- self.n_heads = n_heads
778
- self.n_layers = n_layers
779
- self.kernel_size = kernel_size
780
- self.p_dropout = p_dropout
781
- self.resblock = resblock
782
- self.resblock_kernel_sizes = resblock_kernel_sizes
783
- self.resblock_dilation_sizes = resblock_dilation_sizes
784
- self.upsample_rates = upsample_rates
785
- self.upsample_initial_channel = upsample_initial_channel
786
- self.upsample_kernel_sizes = upsample_kernel_sizes
787
- self.segment_size = segment_size
788
- self.gin_channels = gin_channels
789
- # self.hop_length = hop_length#
790
- self.spk_embed_dim = spk_embed_dim
791
- self.enc_p = TextEncoder256(
792
- inter_channels,
793
- hidden_channels,
794
- filter_channels,
795
- n_heads,
796
- n_layers,
797
- kernel_size,
798
- p_dropout,
799
- f0=False,
800
- )
801
- self.dec = Generator(
802
- inter_channels,
803
- resblock,
804
- resblock_kernel_sizes,
805
- resblock_dilation_sizes,
806
- upsample_rates,
807
- upsample_initial_channel,
808
- upsample_kernel_sizes,
809
- gin_channels=gin_channels,
810
- )
811
- self.enc_q = PosteriorEncoder(
812
- spec_channels,
813
- inter_channels,
814
- hidden_channels,
815
- 5,
816
- 1,
817
- 16,
818
- gin_channels=gin_channels,
819
- )
820
- self.flow = ResidualCouplingBlock(
821
- inter_channels, hidden_channels, 5, 1, 3, gin_channels=gin_channels
822
- )
823
- self.emb_g = nn.Embedding(self.spk_embed_dim, gin_channels)
824
- print("gin_channels:", gin_channels, "self.spk_embed_dim:", self.spk_embed_dim)
825
-
826
- def remove_weight_norm(self):
827
- self.dec.remove_weight_norm()
828
- self.flow.remove_weight_norm()
829
- self.enc_q.remove_weight_norm()
830
-
831
- def forward(self, phone, phone_lengths, y, y_lengths, ds): # 这里ds是id,[bs,1]
832
- g = self.emb_g(ds).unsqueeze(-1) # [b, 256, 1]##1是t,广播的
833
- m_p, logs_p, x_mask = self.enc_p(phone, None, phone_lengths)
834
- z, m_q, logs_q, y_mask = self.enc_q(y, y_lengths, g=g)
835
- z_p = self.flow(z, y_mask, g=g)
836
- z_slice, ids_slice = commons.rand_slice_segments(
837
- z, y_lengths, self.segment_size
838
- )
839
- o = self.dec(z_slice, g=g)
840
- return o, ids_slice, x_mask, y_mask, (z, z_p, m_p, logs_p, m_q, logs_q)
841
-
842
- def infer(self, phone, phone_lengths, sid, max_len=None):
843
- g = self.emb_g(sid).unsqueeze(-1)
844
- m_p, logs_p, x_mask = self.enc_p(phone, None, phone_lengths)
845
- z_p = (m_p + torch.exp(logs_p) * torch.randn_like(m_p) * 0.66666) * x_mask
846
- z = self.flow(z_p, x_mask, g=g, reverse=True)
847
- o = self.dec((z * x_mask)[:, :, :max_len], g=g)
848
- return o, x_mask, (z, z_p, m_p, logs_p)
849
- class SynthesizerTrnMs768NSFsid_nono(nn.Module):
850
- def __init__(
851
- self,
852
- spec_channels,
853
- segment_size,
854
- inter_channels,
855
- hidden_channels,
856
- filter_channels,
857
- n_heads,
858
- n_layers,
859
- kernel_size,
860
- p_dropout,
861
- resblock,
862
- resblock_kernel_sizes,
863
- resblock_dilation_sizes,
864
- upsample_rates,
865
- upsample_initial_channel,
866
- upsample_kernel_sizes,
867
- spk_embed_dim,
868
- gin_channels,
869
- sr=None,
870
- **kwargs
871
- ):
872
- super().__init__()
873
- self.spec_channels = spec_channels
874
- self.inter_channels = inter_channels
875
- self.hidden_channels = hidden_channels
876
- self.filter_channels = filter_channels
877
- self.n_heads = n_heads
878
- self.n_layers = n_layers
879
- self.kernel_size = kernel_size
880
- self.p_dropout = p_dropout
881
- self.resblock = resblock
882
- self.resblock_kernel_sizes = resblock_kernel_sizes
883
- self.resblock_dilation_sizes = resblock_dilation_sizes
884
- self.upsample_rates = upsample_rates
885
- self.upsample_initial_channel = upsample_initial_channel
886
- self.upsample_kernel_sizes = upsample_kernel_sizes
887
- self.segment_size = segment_size
888
- self.gin_channels = gin_channels
889
- # self.hop_length = hop_length#
890
- self.spk_embed_dim = spk_embed_dim
891
- self.enc_p = TextEncoder768(
892
- inter_channels,
893
- hidden_channels,
894
- filter_channels,
895
- n_heads,
896
- n_layers,
897
- kernel_size,
898
- p_dropout,
899
- f0=False,
900
- )
901
- self.dec = Generator(
902
- inter_channels,
903
- resblock,
904
- resblock_kernel_sizes,
905
- resblock_dilation_sizes,
906
- upsample_rates,
907
- upsample_initial_channel,
908
- upsample_kernel_sizes,
909
- gin_channels=gin_channels,
910
- )
911
- self.enc_q = PosteriorEncoder(
912
- spec_channels,
913
- inter_channels,
914
- hidden_channels,
915
- 5,
916
- 1,
917
- 16,
918
- gin_channels=gin_channels,
919
- )
920
- self.flow = ResidualCouplingBlock(
921
- inter_channels, hidden_channels, 5, 1, 3, gin_channels=gin_channels
922
- )
923
- self.emb_g = nn.Embedding(self.spk_embed_dim, gin_channels)
924
- print("gin_channels:", gin_channels, "self.spk_embed_dim:", self.spk_embed_dim)
925
-
926
- def remove_weight_norm(self):
927
- self.dec.remove_weight_norm()
928
- self.flow.remove_weight_norm()
929
- self.enc_q.remove_weight_norm()
930
-
931
- def forward(self, phone, phone_lengths, y, y_lengths, ds): # 这里ds是id,[bs,1]
932
- g = self.emb_g(ds).unsqueeze(-1) # [b, 256, 1]##1是t,广播的
933
- m_p, logs_p, x_mask = self.enc_p(phone, None, phone_lengths)
934
- z, m_q, logs_q, y_mask = self.enc_q(y, y_lengths, g=g)
935
- z_p = self.flow(z, y_mask, g=g)
936
- z_slice, ids_slice = commons.rand_slice_segments(
937
- z, y_lengths, self.segment_size
938
- )
939
- o = self.dec(z_slice, g=g)
940
- return o, ids_slice, x_mask, y_mask, (z, z_p, m_p, logs_p, m_q, logs_q)
941
-
942
- def infer(self, phone, phone_lengths, sid, max_len=None):
943
- g = self.emb_g(sid).unsqueeze(-1)
944
- m_p, logs_p, x_mask = self.enc_p(phone, None, phone_lengths)
945
- z_p = (m_p + torch.exp(logs_p) * torch.randn_like(m_p) * 0.66666) * x_mask
946
- z = self.flow(z_p, x_mask, g=g, reverse=True)
947
- o = self.dec((z * x_mask)[:, :, :max_len], g=g)
948
- return o, x_mask, (z, z_p, m_p, logs_p)
949
-
950
-
951
- class MultiPeriodDiscriminator(torch.nn.Module):
952
- def __init__(self, use_spectral_norm=False):
953
- super(MultiPeriodDiscriminator, self).__init__()
954
- periods = [2, 3, 5, 7, 11, 17]
955
- # periods = [3, 5, 7, 11, 17, 23, 37]
956
-
957
- discs = [DiscriminatorS(use_spectral_norm=use_spectral_norm)]
958
- discs = discs + [
959
- DiscriminatorP(i, use_spectral_norm=use_spectral_norm) for i in periods
960
- ]
961
- self.discriminators = nn.ModuleList(discs)
962
-
963
- def forward(self, y, y_hat):
964
- y_d_rs = [] #
965
- y_d_gs = []
966
- fmap_rs = []
967
- fmap_gs = []
968
- for i, d in enumerate(self.discriminators):
969
- y_d_r, fmap_r = d(y)
970
- y_d_g, fmap_g = d(y_hat)
971
- # for j in range(len(fmap_r)):
972
- # print(i,j,y.shape,y_hat.shape,fmap_r[j].shape,fmap_g[j].shape)
973
- y_d_rs.append(y_d_r)
974
- y_d_gs.append(y_d_g)
975
- fmap_rs.append(fmap_r)
976
- fmap_gs.append(fmap_g)
977
-
978
- return y_d_rs, y_d_gs, fmap_rs, fmap_gs
979
-
980
- class MultiPeriodDiscriminatorV2(torch.nn.Module):
981
- def __init__(self, use_spectral_norm=False):
982
- super(MultiPeriodDiscriminatorV2, self).__init__()
983
- # periods = [2, 3, 5, 7, 11, 17]
984
- periods = [2,3, 5, 7, 11, 17, 23, 37]
985
-
986
- discs = [DiscriminatorS(use_spectral_norm=use_spectral_norm)]
987
- discs = discs + [
988
- DiscriminatorP(i, use_spectral_norm=use_spectral_norm) for i in periods
989
- ]
990
- self.discriminators = nn.ModuleList(discs)
991
-
992
- def forward(self, y, y_hat):
993
- y_d_rs = [] #
994
- y_d_gs = []
995
- fmap_rs = []
996
- fmap_gs = []
997
- for i, d in enumerate(self.discriminators):
998
- y_d_r, fmap_r = d(y)
999
- y_d_g, fmap_g = d(y_hat)
1000
- # for j in range(len(fmap_r)):
1001
- # print(i,j,y.shape,y_hat.shape,fmap_r[j].shape,fmap_g[j].shape)
1002
- y_d_rs.append(y_d_r)
1003
- y_d_gs.append(y_d_g)
1004
- fmap_rs.append(fmap_r)
1005
- fmap_gs.append(fmap_g)
1006
-
1007
- return y_d_rs, y_d_gs, fmap_rs, fmap_gs
1008
-
1009
-
1010
- class DiscriminatorS(torch.nn.Module):
1011
- def __init__(self, use_spectral_norm=False):
1012
- super(DiscriminatorS, self).__init__()
1013
- norm_f = weight_norm if use_spectral_norm == False else spectral_norm
1014
- self.convs = nn.ModuleList(
1015
- [
1016
- norm_f(Conv1d(1, 16, 15, 1, padding=7)),
1017
- norm_f(Conv1d(16, 64, 41, 4, groups=4, padding=20)),
1018
- norm_f(Conv1d(64, 256, 41, 4, groups=16, padding=20)),
1019
- norm_f(Conv1d(256, 1024, 41, 4, groups=64, padding=20)),
1020
- norm_f(Conv1d(1024, 1024, 41, 4, groups=256, padding=20)),
1021
- norm_f(Conv1d(1024, 1024, 5, 1, padding=2)),
1022
- ]
1023
- )
1024
- self.conv_post = norm_f(Conv1d(1024, 1, 3, 1, padding=1))
1025
-
1026
- def forward(self, x):
1027
- fmap = []
1028
-
1029
- for l in self.convs:
1030
- x = l(x)
1031
- x = F.leaky_relu(x, modules.LRELU_SLOPE)
1032
- fmap.append(x)
1033
- x = self.conv_post(x)
1034
- fmap.append(x)
1035
- x = torch.flatten(x, 1, -1)
1036
-
1037
- return x, fmap
1038
-
1039
-
1040
- class DiscriminatorP(torch.nn.Module):
1041
- def __init__(self, period, kernel_size=5, stride=3, use_spectral_norm=False):
1042
- super(DiscriminatorP, self).__init__()
1043
- self.period = period
1044
- self.use_spectral_norm = use_spectral_norm
1045
- norm_f = weight_norm if use_spectral_norm == False else spectral_norm
1046
- self.convs = nn.ModuleList(
1047
- [
1048
- norm_f(
1049
- Conv2d(
1050
- 1,
1051
- 32,
1052
- (kernel_size, 1),
1053
- (stride, 1),
1054
- padding=(get_padding(kernel_size, 1), 0),
1055
- )
1056
- ),
1057
- norm_f(
1058
- Conv2d(
1059
- 32,
1060
- 128,
1061
- (kernel_size, 1),
1062
- (stride, 1),
1063
- padding=(get_padding(kernel_size, 1), 0),
1064
- )
1065
- ),
1066
- norm_f(
1067
- Conv2d(
1068
- 128,
1069
- 512,
1070
- (kernel_size, 1),
1071
- (stride, 1),
1072
- padding=(get_padding(kernel_size, 1), 0),
1073
- )
1074
- ),
1075
- norm_f(
1076
- Conv2d(
1077
- 512,
1078
- 1024,
1079
- (kernel_size, 1),
1080
- (stride, 1),
1081
- padding=(get_padding(kernel_size, 1), 0),
1082
- )
1083
- ),
1084
- norm_f(
1085
- Conv2d(
1086
- 1024,
1087
- 1024,
1088
- (kernel_size, 1),
1089
- 1,
1090
- padding=(get_padding(kernel_size, 1), 0),
1091
- )
1092
- ),
1093
- ]
1094
- )
1095
- self.conv_post = norm_f(Conv2d(1024, 1, (3, 1), 1, padding=(1, 0)))
1096
-
1097
- def forward(self, x):
1098
- fmap = []
1099
-
1100
- # 1d to 2d
1101
- b, c, t = x.shape
1102
- if t % self.period != 0: # pad first
1103
- n_pad = self.period - (t % self.period)
1104
- x = F.pad(x, (0, n_pad), "reflect")
1105
- t = t + n_pad
1106
- x = x.view(b, c, t // self.period, self.period)
1107
-
1108
- for l in self.convs:
1109
- x = l(x)
1110
- x = F.leaky_relu(x, modules.LRELU_SLOPE)
1111
- fmap.append(x)
1112
- x = self.conv_post(x)
1113
- fmap.append(x)
1114
- x = torch.flatten(x, 1, -1)
1115
-
1116
- return x, fmap
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/anyio/_core/_testing.py DELETED
@@ -1,82 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from typing import Any, Awaitable, Generator
4
-
5
- from ._compat import DeprecatedAwaitableList, _warn_deprecation
6
- from ._eventloop import get_asynclib
7
-
8
-
9
- class TaskInfo:
10
- """
11
- Represents an asynchronous task.
12
-
13
- :ivar int id: the unique identifier of the task
14
- :ivar parent_id: the identifier of the parent task, if any
15
- :vartype parent_id: Optional[int]
16
- :ivar str name: the description of the task (if any)
17
- :ivar ~collections.abc.Coroutine coro: the coroutine object of the task
18
- """
19
-
20
- __slots__ = "_name", "id", "parent_id", "name", "coro"
21
-
22
- def __init__(
23
- self,
24
- id: int,
25
- parent_id: int | None,
26
- name: str | None,
27
- coro: Generator[Any, Any, Any] | Awaitable[Any],
28
- ):
29
- func = get_current_task
30
- self._name = f"{func.__module__}.{func.__qualname__}"
31
- self.id: int = id
32
- self.parent_id: int | None = parent_id
33
- self.name: str | None = name
34
- self.coro: Generator[Any, Any, Any] | Awaitable[Any] = coro
35
-
36
- def __eq__(self, other: object) -> bool:
37
- if isinstance(other, TaskInfo):
38
- return self.id == other.id
39
-
40
- return NotImplemented
41
-
42
- def __hash__(self) -> int:
43
- return hash(self.id)
44
-
45
- def __repr__(self) -> str:
46
- return f"{self.__class__.__name__}(id={self.id!r}, name={self.name!r})"
47
-
48
- def __await__(self) -> Generator[None, None, TaskInfo]:
49
- _warn_deprecation(self)
50
- if False:
51
- yield
52
-
53
- return self
54
-
55
- def _unwrap(self) -> TaskInfo:
56
- return self
57
-
58
-
59
- def get_current_task() -> TaskInfo:
60
- """
61
- Return the current task.
62
-
63
- :return: a representation of the current task
64
-
65
- """
66
- return get_asynclib().get_current_task()
67
-
68
-
69
- def get_running_tasks() -> DeprecatedAwaitableList[TaskInfo]:
70
- """
71
- Return a list of running tasks in the current event loop.
72
-
73
- :return: a list of task info objects
74
-
75
- """
76
- tasks = get_asynclib().get_running_tasks()
77
- return DeprecatedAwaitableList(tasks, func=get_running_tasks)
78
-
79
-
80
- async def wait_all_tasks_blocked() -> None:
81
- """Wait until all other tasks are waiting for something."""
82
- await get_asynclib().wait_all_tasks_blocked()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/fontTools/misc/textTools.py DELETED
@@ -1,155 +0,0 @@
1
- """fontTools.misc.textTools.py -- miscellaneous routines."""
2
-
3
-
4
- import ast
5
- import string
6
-
7
-
8
- # alias kept for backward compatibility
9
- safeEval = ast.literal_eval
10
-
11
-
12
- class Tag(str):
13
- @staticmethod
14
- def transcode(blob):
15
- if isinstance(blob, bytes):
16
- blob = blob.decode("latin-1")
17
- return blob
18
-
19
- def __new__(self, content):
20
- return str.__new__(self, self.transcode(content))
21
-
22
- def __ne__(self, other):
23
- return not self.__eq__(other)
24
-
25
- def __eq__(self, other):
26
- return str.__eq__(self, self.transcode(other))
27
-
28
- def __hash__(self):
29
- return str.__hash__(self)
30
-
31
- def tobytes(self):
32
- return self.encode("latin-1")
33
-
34
-
35
- def readHex(content):
36
- """Convert a list of hex strings to binary data."""
37
- return deHexStr(strjoin(chunk for chunk in content if isinstance(chunk, str)))
38
-
39
-
40
- def deHexStr(hexdata):
41
- """Convert a hex string to binary data."""
42
- hexdata = strjoin(hexdata.split())
43
- if len(hexdata) % 2:
44
- hexdata = hexdata + "0"
45
- data = []
46
- for i in range(0, len(hexdata), 2):
47
- data.append(bytechr(int(hexdata[i : i + 2], 16)))
48
- return bytesjoin(data)
49
-
50
-
51
- def hexStr(data):
52
- """Convert binary data to a hex string."""
53
- h = string.hexdigits
54
- r = ""
55
- for c in data:
56
- i = byteord(c)
57
- r = r + h[(i >> 4) & 0xF] + h[i & 0xF]
58
- return r
59
-
60
-
61
- def num2binary(l, bits=32):
62
- items = []
63
- binary = ""
64
- for i in range(bits):
65
- if l & 0x1:
66
- binary = "1" + binary
67
- else:
68
- binary = "0" + binary
69
- l = l >> 1
70
- if not ((i + 1) % 8):
71
- items.append(binary)
72
- binary = ""
73
- if binary:
74
- items.append(binary)
75
- items.reverse()
76
- assert l in (0, -1), "number doesn't fit in number of bits"
77
- return " ".join(items)
78
-
79
-
80
- def binary2num(bin):
81
- bin = strjoin(bin.split())
82
- l = 0
83
- for digit in bin:
84
- l = l << 1
85
- if digit != "0":
86
- l = l | 0x1
87
- return l
88
-
89
-
90
- def caselessSort(alist):
91
- """Return a sorted copy of a list. If there are only strings
92
- in the list, it will not consider case.
93
- """
94
-
95
- try:
96
- return sorted(alist, key=lambda a: (a.lower(), a))
97
- except TypeError:
98
- return sorted(alist)
99
-
100
-
101
- def pad(data, size):
102
- r"""Pad byte string 'data' with null bytes until its length is a
103
- multiple of 'size'.
104
-
105
- >>> len(pad(b'abcd', 4))
106
- 4
107
- >>> len(pad(b'abcde', 2))
108
- 6
109
- >>> len(pad(b'abcde', 4))
110
- 8
111
- >>> pad(b'abcdef', 4) == b'abcdef\x00\x00'
112
- True
113
- """
114
- data = tobytes(data)
115
- if size > 1:
116
- remainder = len(data) % size
117
- if remainder:
118
- data += b"\0" * (size - remainder)
119
- return data
120
-
121
-
122
- def tostr(s, encoding="ascii", errors="strict"):
123
- if not isinstance(s, str):
124
- return s.decode(encoding, errors)
125
- else:
126
- return s
127
-
128
-
129
- def tobytes(s, encoding="ascii", errors="strict"):
130
- if isinstance(s, str):
131
- return s.encode(encoding, errors)
132
- else:
133
- return bytes(s)
134
-
135
-
136
- def bytechr(n):
137
- return bytes([n])
138
-
139
-
140
- def byteord(c):
141
- return c if isinstance(c, int) else ord(c)
142
-
143
-
144
- def strjoin(iterable, joiner=""):
145
- return tostr(joiner).join(iterable)
146
-
147
-
148
- def bytesjoin(iterable, joiner=b""):
149
- return tobytes(joiner).join(tobytes(item) for item in iterable)
150
-
151
-
152
- if __name__ == "__main__":
153
- import doctest, sys
154
-
155
- sys.exit(doctest.testmod().failed)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/gradio/deprecation.py DELETED
@@ -1,80 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import warnings
4
-
5
- from gradio import utils
6
-
7
-
8
- class GradioDeprecationWarning(UserWarning):
9
- # This does not subclass DeprecationWarning
10
- # because we want to show the warning by default.
11
- pass
12
-
13
-
14
- class GradioUnusedKwargWarning(UserWarning):
15
- pass
16
-
17
-
18
- def simple_deprecated_notice(term: str) -> str:
19
- return f"`{term}` parameter is deprecated, and it has no effect"
20
-
21
-
22
- def use_in_launch(term: str) -> str:
23
- return f"`{term}` is deprecated in `Interface()`, please use it within `launch()` instead."
24
-
25
-
26
- DEPRECATION_MESSAGE = {
27
- "optional": simple_deprecated_notice("optional"),
28
- "keep_filename": simple_deprecated_notice("keep_filename"),
29
- "numeric": simple_deprecated_notice("numeric"),
30
- "verbose": simple_deprecated_notice("verbose"),
31
- "allow_screenshot": simple_deprecated_notice("allow_screenshot"),
32
- "layout": simple_deprecated_notice("layout"),
33
- "show_input": simple_deprecated_notice("show_input"),
34
- "show_output": simple_deprecated_notice("show_output"),
35
- "capture_session": simple_deprecated_notice("capture_session"),
36
- "api_mode": simple_deprecated_notice("api_mode"),
37
- "show_tips": use_in_launch("show_tips"),
38
- "encrypt": simple_deprecated_notice("encrypt"),
39
- "enable_queue": use_in_launch("enable_queue"),
40
- "server_name": use_in_launch("server_name"),
41
- "server_port": use_in_launch("server_port"),
42
- "width": use_in_launch("width"),
43
- "height": use_in_launch("height"),
44
- "plot": "The 'plot' parameter has been deprecated. Use the new Plot component instead",
45
- }
46
-
47
-
48
- def check_deprecated_parameters(
49
- cls: str, *, stacklevel: int | None = None, kwargs
50
- ) -> None:
51
- if stacklevel is None:
52
- stacklevel = utils.find_user_stack_level()
53
-
54
- for key, value in DEPRECATION_MESSAGE.items():
55
- if key in kwargs:
56
- if key == "plot" and cls != "Image":
57
- continue
58
- kwargs.pop(key)
59
- warnings.warn(value, GradioDeprecationWarning, stacklevel=stacklevel)
60
-
61
- if kwargs:
62
- warnings.warn(
63
- f"You have unused kwarg parameters in {cls}, please remove them: {kwargs}",
64
- GradioUnusedKwargWarning,
65
- stacklevel=stacklevel,
66
- )
67
-
68
-
69
- def warn_deprecation(text: str) -> None:
70
- warnings.warn(
71
- text,
72
- GradioDeprecationWarning,
73
- stacklevel=utils.find_user_stack_level(),
74
- )
75
-
76
-
77
- def warn_style_method_deprecation() -> None:
78
- warn_deprecation(
79
- "The `style` method is deprecated. Please set these arguments in the constructor instead."
80
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Daniel-Saeedi/auto-debias/README.md DELETED
@@ -1,13 +0,0 @@
1
- ---
2
- title: Auto Debias
3
- emoji: 👁
4
- colorFrom: yellow
5
- colorTo: blue
6
- sdk: gradio
7
- sdk_version: 3.1.4
8
- app_file: app.py
9
- pinned: false
10
- license: mit
11
- ---
12
-
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Datatrooper/sentimiento/app.py DELETED
@@ -1,22 +0,0 @@
1
- from pysentimiento import create_analyzer
2
-
3
-
4
- import gradio as gr
5
-
6
- analyzer = create_analyzer(task="sentiment", lang="es")
7
-
8
- def sentiment_analysis(text):
9
-
10
- sent = analyzer.predict(text).probas
11
- return sent
12
-
13
- iface = gr.Interface(sentiment_analysis,
14
- "textbox",
15
- "label",
16
- interpretation="default",
17
- title="Spanish Sentiment Analysis",
18
- description="Write a sentence in spanish to analyze its sentiment")
19
-
20
- iface.test_launch()
21
- if __name__ == "__main__":
22
- iface.launch()