parquet-converter commited on
Commit
467c56c
·
1 Parent(s): d94c811

Update parquet files (step 2 of 476)

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/1acneusushi/gradio-2dmoleculeeditor/data/Alberts Easy Activator v0.57.17 for Tomtom.zip What You Need to Know About Tomtom Updates.md +0 -147
  2. spaces/1acneusushi/gradio-2dmoleculeeditor/data/Battlefield 3 Game File Part 35.rar.rar The Final Piece of the Puzzle.md +0 -125
  3. spaces/1acneusushi/gradio-2dmoleculeeditor/data/Download Enscape 3.3 Full Crack Bagas31 Is It Worth It?.md +0 -21
  4. spaces/1acneusushi/gradio-2dmoleculeeditor/data/Download Movie Maker Windows 10 Crack A Risky and Illegal Move.md +0 -26
  5. spaces/1acneusushi/gradio-2dmoleculeeditor/data/EasyWorship 7 Problems and Solutions How to Optimize Your Church Presentation Software.md +0 -43
  6. spaces/1gistliPinn/ChatGPT4/Examples/Checklist Persiapan Majlis Perkahwinan Pdf Download.md +0 -68
  7. spaces/1gistliPinn/ChatGPT4/Examples/Dlddiscografia320kbps !EXCLUSIVE!.md +0 -6
  8. spaces/1line/AutoGPT/run.sh +0 -9
  9. spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/8 Raflaan MP3 Song - The Punjabi Sensation by Mankirt Aulakh and Gurlez Akhtar.md +0 -128
  10. spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Download 3uTools for Windows 7 64-bit - Free and Safe.md +0 -72
  11. spaces/1phancelerku/anime-remove-background/AR CENA Font - A Charming and Credible Font for Your Designs.md +0 -176
  12. spaces/1phancelerku/anime-remove-background/Download Komodo 13 Chess Engine The Most Advanced and Reliable Chess Software.md +0 -140
  13. spaces/1phancelerku/anime-remove-background/Experience Ninja Arashi 2 in a New Way with APK Mod Download.md +0 -146
  14. spaces/1phancelerku/anime-remove-background/Free 3D Models Download or Edit Online Clara.io.md +0 -133
  15. spaces/1toTree/lora_test/ppdiffusers/pipelines/alt_diffusion/__init__.py +0 -48
  16. spaces/AP123/dreamgaussian/gs_renderer.py +0 -820
  17. spaces/ATang0729/Forecast4Muses/Model/Model6/Model6_2_ProfileRecogition/mmpretrain/configs/.ipynb_checkpoints/__init__.py +0 -0
  18. spaces/Aaaaaaaabdualh/meter2poem-1/app.py +0 -51
  19. spaces/AchyuthGamer/OpenGPT-Chat-UI/src/app.d.ts +0 -20
  20. spaces/AchyuthGamer/OpenGPT-Chat-UI/src/lib/buildPrompt.ts +0 -34
  21. spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/menu/methods/Methods.js +0 -18
  22. spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/numberbar/Factory.d.ts +0 -5
  23. spaces/Alifarsi/news_summarizer/README.md +0 -37
  24. spaces/Amon1/ChatGPTForAcadamic/config.py +0 -48
  25. spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/tests/models/__init__.py +0 -0
  26. spaces/Andy1621/uniformer_image_detection/mmdet/models/backbones/detectors_resnext.py +0 -122
  27. spaces/Andy1621/uniformer_image_segmentation/configs/ccnet/README.md +0 -47
  28. spaces/AnimalEquality/chatbot/README.md +0 -127
  29. spaces/Arnx/MusicGenXvAKN/tests/common_utils/__init__.py +0 -9
  30. spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/tenacity/_utils.py +0 -76
  31. spaces/Banbri/zcvzcv/src/app/layouts/new_layouts.tsx +0 -273
  32. spaces/Bart92/RVC_HF/demucs/test.py +0 -109
  33. spaces/Benson/text-generation/Examples/Bubble Shooter Classic Download Pc.md +0 -64
  34. spaces/Big-Web/MMSD/env/Lib/site-packages/botocore/docs/sharedexample.py +0 -227
  35. spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_internal/req/req_file.py +0 -552
  36. spaces/Big-Web/MMSD/env/Lib/site-packages/setuptools/_distutils/ccompiler.py +0 -1220
  37. spaces/Billyosoro/ESRGAN/realesrgan/data/__init__.py +0 -10
  38. spaces/CVPR/Dual-Key_Backdoor_Attacks/datagen/detectron2/docs/notes/benchmarks.md +0 -239
  39. spaces/CVPR/Dual-Key_Backdoor_Attacks/datagen/detectron2/projects/DensePose/README.md +0 -54
  40. spaces/CVPR/Dual-Key_Backdoor_Attacks/demo.py +0 -217
  41. spaces/CVPR/Dual-Key_Backdoor_Attacks/openvqa/openvqa/models/mfb/adapter.py +0 -70
  42. spaces/CVPR/GFPGAN-example/tests/test_stylegan2_clean_arch.py +0 -52
  43. spaces/CVPR/lama-example/models/ade20k/base.py +0 -627
  44. spaces/Cat125/text-generator-v3/datamanager.py +0 -104
  45. spaces/Cong723/gpt-academic-public/colorful.py +0 -91
  46. spaces/Cong723/gpt-academic-public/crazy_functions/test_project/cpp/cppipc/ipc.cpp +0 -701
  47. spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/fontTools/pens/hashPointPen.py +0 -75
  48. spaces/Danielzero/GPT3.5/modules/llama_func.py +0 -166
  49. spaces/Dauzy/whisper-webui/app-network.py +0 -5
  50. spaces/Djacon/emotion_detection/static/emotion_detection.html +0 -293
spaces/1acneusushi/gradio-2dmoleculeeditor/data/Alberts Easy Activator v0.57.17 for Tomtom.zip What You Need to Know About Tomtom Updates.md DELETED
@@ -1,147 +0,0 @@
1
-
2
- <h1>Alberts Easy Activator v0.57.17 for Tomtom.zip: A Complete Guide</h1>
3
- <p>Do you own a Tomtom navigation device and want to update it with the latest maps and features? Do you want to save money and time by activating your Tomtom device without paying for a subscription or visiting a dealer? If you answered yes to any of these questions, then you need to know about Alberts Easy Activator v0.57.17 for Tomtom.zip.</p>
4
- <h2>Alberts Easy Activator v0.57.17 for Tomtom.zip</h2><br /><p><b><b>DOWNLOAD</b> ::: <a href="https://byltly.com/2uKwxP">https://byltly.com/2uKwxP</a></b></p><br /><br />
5
- <p>Alberts Easy Activator is a software tool that allows you to activate your Tomtom device with just a few clicks. It also lets you update your maps, customize your settings, and troubleshoot common issues with your Tomtom device. In this article, we will explain what Alberts Easy Activator is, how it works, and how you can download and install it on your computer. We will also show you how to use it to activate and update your Tomtom device, and answer some frequently asked questions about it.</p>
6
- <h2>What is Alberts Easy Activator?</h2>
7
- <p>Alberts Easy Activator is a software tool that was created by a user named Albert Swafega on the GPS Underground forum. It is designed to help Tomtom users activate their devices without having to pay for a subscription or visit a dealer.</p>
8
- <h3>A brief history of Alberts Easy Activator</h3>
9
- <p>Albert Swafega started developing Alberts Easy Activator in 2009, after he bought a second-hand Tomtom device that was locked by the previous owner. He wanted to unlock his device and update it with the latest maps and features, but he did not want to pay for a subscription or visit a dealer.</p>
10
- <p>How to use Alberts Easy Activator for Tomtom maps<br />
11
- Alberts Easy Activator v0.57.17 download link<br />
12
- Tomtom map update with Alberts Easy Activator<br />
13
- Alberts Easy Activator v0.57.17 tutorial<br />
14
- Alberts Easy Activator v0.57.17 crack for Tomtom<br />
15
- Tomtom navigation software activation by Alberts Easy Activator<br />
16
- Alberts Easy Activator v0.57.17 features and benefits<br />
17
- Alberts Easy Activator v0.57.17 compatibility with Tomtom devices<br />
18
- Alberts Easy Activator v0.57.17 reviews and testimonials<br />
19
- Alberts Easy Activator v0.57.17 alternatives and competitors<br />
20
- Alberts Easy Activator v0.57.17 problems and solutions<br />
21
- Alberts Easy Activator v0.57.17 support and customer service<br />
22
- Alberts Easy Activator v0.57.17 license and terms of use<br />
23
- Alberts Easy Activator v0.57.17 installation and setup guide<br />
24
- Alberts Easy Activator v0.57.17 latest version and updates<br />
25
- Alberts Easy Activator v0.57.17 free trial and discount offer<br />
26
- Alberts Easy Activator v0.57.17 virus and malware scan<br />
27
- Alberts Easy Activator v0.57.17 for Tomtom.zip file size and format<br />
28
- Alberts Easy Activator v0.57.17 for Tomtom.zip password and encryption<br />
29
- Alberts Easy Activator v0.57.17 for Tomtom.zip extraction and verification<br />
30
- Alberts Easy Activator v0.57.17 for Tomtom.zip source and origin<br />
31
- Alberts Easy Activator v0.57.17 for Tomtom.zip legality and ethics<br />
32
- Alberts Easy Activator v0.57.17 for Tomtom.zip risks and consequences<br />
33
- Alberts Easy Activator v0.57.17 for Tomtom.zip backup and recovery<br />
34
- Alberts Easy Activator v0.57.17 for Tomtom.zip comparison and evaluation<br />
35
- How to uninstall Alberts Easy Activator v0.57.17 for Tomtom.zip<br />
36
- How to fix errors in Alberts Easy Activator v0.57.17 for Tomtom.zip<br />
37
- How to optimize performance of Alberts Easy Activator v0.57.17 for Tomtom.zip<br />
38
- How to customize settings of Alberts Easy Activator v0.57.17 for Tomtom.zip<br />
39
- How to troubleshoot issues with Alberts Easy Activator v0.57.17 for Tomtom.zip<br />
40
- How to contact the developer of Alberts Easy Activator v0.57.17 for Tomtom.zip<br />
41
- How to share feedback on Alberts Easy Activator v0.57.17 for Tomtom.zip<br />
42
- How to recommend Alberts Easy Activator v0.57.17 for Tomtom.zip to others<br />
43
- How to get help with Alberts Easy Activator v0.57.17 for Tomtom.zip online<br />
44
- How to learn more about Alberts Easy Activator v0.57.17 for Tomtom.zip<br />
45
- What is the difference between Alberts Easy Activator v0.57.17 and other versions of Alberts Easy Activator?<br />
46
- What are the advantages of using Alberts Easy Activator v0.57.17 over other methods of activating Tomtom maps?<br />
47
- What are the disadvantages of using Alberts Easy Activator v0.57.17 for Tomtom maps?<br />
48
- What are the best practices of using Alberts Easy Activator v0.57.17 for Tomtom maps?<br />
49
- What are the common mistakes of using Alberts Easy Activator v0.57</p>
50
- <p>He searched online for a solution and found out that there were some tools that could activate Tomtom devices, but they were either complicated, outdated, or risky to use. He decided to create his own tool that would be easy, safe, and reliable to use.</p>
51
- <p>He named his tool Alberts Easy Activator and shared it on the GPS Underground forum for other Tomtom users to use. Since then, he has been updating his tool regularly with new features and improvements.</p>
52
- <h3>How does Alberts Easy Activator work?</h3>
53
- <p>Alberts Easy Activator works by generating activation codes for your Tomtom device based on its serial number and device ID. These codes are then used to unlock your device and enable you to use the latest maps and features.</p>
54
- <p>Alberts Easy Activator also works by downloading and installing the latest official map updates from Tomtom's servers. These updates are then patched with activation codes so that they can work on your device without any issues.</p>
55
- <h3>What are the benefits of using Alberts Easy Activator?</h3>
56
- <p>There are many benefits of using Alberts Easy Activator for your Tomtom device, such as:</p>
57
- <ul>
58
- <li>You can activate your Tomtom device without paying for a subscription or visiting a dealer.</li>
59
- <li>You can update your maps with the latest versions from Tomtom's servers.</li>
60
- <li>You can customize your settings such as voices, colors, icons, etc.</li>
61
- <li>You can troubleshoot common issues such as no GPS signal, corrupted files, etc.</li>
62
- <li>You can save money and time by doing everything yourself.</li>
63
- <li>You can enjoy the best performance and functionality of your Tomtom device.</li>
64
- </ul>
65
- <h2>How to download and install Alberts Easy Activator v0.57.17 for Tomtom.zip</h2>
66
- <p>To download and install Alberts Easy Activator v0.57.17 for Tomtom.zip on your computer, you need to follow these steps:</p>
67
- <h3>Where to find the download link for Alberts Easy Activator v0.57.17 for Tomtom.zip</h3>
68
- <p>The download link for Alberts Easy Activator v0.57.17 for Tomtom.zip is available on the GPS Underground forum, where Albert Swafega posts his updates regularly.</p>
69
- <p>To access the forum, you need to register an account first by clicking on this link: <a href="https://www.gpsunderground.com/forum/register.php">https://www.gpsunderground.com/forum/register.php</a></p>
70
- <p>After registering an account, you need to log in and go to this thread: <a href="https://www.gpsunderground.com/forum/forum/gps-navigation-systems/tomtom-gps-systems/tomtom-tutorials/3597-how-to-activate-maps-on-tom-tom-using-albert-s-easy-activator">https://www.gpsunderground.com/forum/forum/gps-navigation-systems/tomtom-gps-systems/tomtom-tutorials/3597-how-to-activate-maps-on-tom-tom-using-albert-s-easy-activator</a></p>
71
- <p>In this thread, you will find the latest version of Alberts Easy Activator v0.57.17 for Tomtom.zip along with instructions on how to use it.</p>
72
- <h3>How to unzip and run Alberts Easy Activator v0.57.17 for Tomtom.zip</h3>
73
- <p>After downloading Alberts Easy Activator v0.57.17 for Tomtom.zip from the forum, you need to unzip it using a software such as WinRAR or 7-Zip.</p>
74
- <p>To unzip it, you need to right-click on the file and select "Extract here" or "Extract to" depending on your software.</p>
75
- <p>This will create a folder named "Albert's_Easy_Activator_v0_57_17" in the same location as the zip file.</p>
76
- <p>To run Alberts Easy Activator v0.57.17 for Tomtom.zip, you need to double-click on the file named "RunMe.bat" inside the folder.</p>
77
- <p>This will open a command prompt window where you will see some options and instructions on how to use the tool.</p>
78
- <h3>How to activate your Tomtom device with Alberts Easy Activator v0.57.17</h3>
79
- <p>To activate your Tomtom device with Alberts Easy Activator v0.57.17, you need to follow these steps:</p>
80
- <ol>
81
- <li>Connect your Tomtom device to your computer using a USB cable.</li>
82
- <li>Make sure that your device is recognized by your computer and that it has enough battery power.</li>
83
- <li>In the command prompt window of Albert's Easy Activator, press 1 and hit Enter.</li>
84
- <li>This will display some information about your device such as its serial number and device ID.</li>
85
- <li>Note down these numbers as you will need them later.</li>
86
- <li>In the command prompt window of Albert's Easy Activator, press 2 and hit Enter.</li>
87
- <li>This will generate an activation code for your device based on its serial number and device ID.</li>
88
- <li>Note down this code as you will need it later.</li>
89
- <li>In the command prompt window of Albert's Easy Activator, press 5 and hit Enter.</li>
90
- <li>This will open a folder named "Meta" where you will see some files with names like "ttgo.bif", "ttgo.bak", etc.</li>
91
- <li>Copy these files from the "Meta" folder and paste them into the root directory of your Tomtom device (the main folder where you see folders like "art", "voices", etc.).</li>
92
- <li>In the command prompt window of Albert's Easy Activator, press 6 and hit Enter.</li>
93
- <li>This will open another folder named "Activators" where you will see some files with names like "FastActivate.exe", "EasyUseTools.exe", etc.</li>
94
- ".</li>
95
- <li>Copy this file from the "Maps" folder and paste it into the folder named "Europe" (or whatever the name of the map is) on your Tomtom device.</li>
96
- <li>Disconnect your Tomtom device from your computer and turn it on.</li>
97
- <li>On your Tomtom device, go to the main menu and select "Switch map".</li>
98
- <li>Select the map update that you just installed and confirm.</li>
99
- <li>Your Tomtom device should now be updated with the latest map version.</li>
100
- </ol>
101
- <h3>How to customize your Tomtom settings with Alberts Easy Activator v0.57.17</h3>
102
- <p>To customize your Tomtom settings with Alberts Easy Activator v0.57.17, you need to follow these steps:</p>
103
- <ol>
104
- <li>Connect your Tomtom device to your computer using a USB cable.</li>
105
- <li>Make sure that your device is recognized by your computer and that it has enough battery power.</li>
106
- <li>In the command prompt window of Albert's Easy Activator, press 7 and hit Enter.</li>
107
- <li>This will display a list of available customization options for your device such as voices, colors, icons, etc.</li>
108
- <li>Select the customization option that you want to download and hit Enter.</li>
109
- <li>This will start downloading the customization option to a folder named "Customize" in the same location as Albert's Easy Activator.</li>
110
- <li>Wait until the download is complete and then press any key to continue.</li>
111
- <li>In the command prompt window of Albert's Easy Activator, press 8 and hit Enter.</li>
112
- <li>This will open a folder named "Customize" where you will see the customization option file with a name like "TomTom Voices.zip".</li>
113
- <li>Unzip this file using a software such as WinRAR or 7-Zip.</li>
114
- <li>Copy the unzipped files from the "TomTom Voices" folder and paste them into the folder named "voices" on your Tomtom device.</li>
115
- <li>Disconnect your Tomtom device from your computer and turn it on.</li>
116
- <li>On your Tomtom device, go to the main menu and select "Change preferences".</li>
117
- <li>Scroll down and select "Change voice".</li>
118
- <li>Select the voice that you just installed and confirm.</li>
119
- <li>Your Tomtom device should now have a new voice.</li>
120
- </ol>
121
- <h3>How to troubleshoot common issues with Alberts Easy Activator v0.57.17</h3>
122
- <p>To troubleshoot common issues with Alberts Easy Activator v0.57.17, you need to follow these steps:</p>
123
- <ol>
124
- <li>If you encounter an error message such as "No maps found" or "Problem with map", try to delete the file named "ttgo.bif" from the root directory of your Tomtom device and then run Albert's Easy Activator again to generate a new one.</li>
125
- <li>If you encounter an error message such as "No GPS signal" or "Waiting for a valid GPS signal", try to reset your Tomtom device by holding down the power button for 15 seconds until you hear a drum sound. Then wait for a few minutes until your device acquires a GPS signal.</li>
126
- <li>If you encounter an error message such as "Corrupted files" or "Invalid files", try to format your Tomtom device by connecting it to your computer and then right-clicking on its drive letter and selecting "Format". Then run Albert's Easy Activator again to activate and update your device.</li>
127
- <li>If you encounter any other issues or have any questions, try to visit the GPS Underground forum and search for answers or post your queries there. You can also contact Albert Swafega directly by sending him a private message on the forum.</li>
128
- </ol>
129
- <h2>Conclusion</h2>
130
- <p>In this article, we have explained what Alberts Easy Activator v0.57.17 for Tomtom.zip is, how it works, and how you can download and install it on your computer. We have also shown you how to use it to activate and update your Tomtom device, customize your settings, and troubleshoot common issues. We hope that this article has been helpful and informative for you. If you have any feedback or suggestions, please let us know in the comments section below. Thank you for reading!</p>
131
- <h2>FAQs</h2>
132
- <p>Here are some frequently asked questions about Alberts Easy Activator v0.57.17 for Tomtom.zip:</p>
133
- <h4>Is Alberts Easy Activator v0.57.17 for Tomtom.zip safe to use?</h4>
134
- <p>Yes, Alberts Easy Activator v0.57.17 for Tomtom.zip is safe to use as long as you download it from the official source on the GPS Underground forum and follow the instructions carefully. It does not contain any viruses or malware and does not harm your Tomtom device in any way.</p>
135
- <h4>Is Alberts Easy Activator v0.57.17 for Tomtom.zip legal to use?</h4>
136
- <p>Alberts Easy Activator v0.57.17 for Tomtom.zip is not officially endorsed or supported by Tomtom, so it may violate their terms of service or warranty policy. However, it is not illegal to use as long as you own a legitimate copy of the map that you want to activate or update on your device. You are responsible for using Alberts Easy Activator v0.57.17 for Tomtom.zip at your own risk and discretion.</p>
137
- <h4>Does Alberts Easy Activator v0.57.17 for Tomtom.zip work on all Tomtom devices?</h4>
138
- <p>No, Alberts Easy Activator v0.57.17 for Tomtom.zip does not work on all Tomtom devices. It only works on devices that have a serial number starting with one of these letters: A, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, W, X, Y or Z.</p>
139
- <h4>Does Alberts Easy Activator v0.57.17 for Tomtom.zip work on all maps?</h4>
140
- such as its name, version, size, etc. You can find the meta files for the latest maps on this thread: <a href="https://www.gpsunderground.com/forum/forum/gps-navigation-systems/tomtom-gps-systems/tomtom-maps/3596-tomtom-maps-meta-codes">https://www.gpsunderground.com/forum/forum/gps-navigation-systems/tomtom-gps-systems/tomtom-maps/3596-tomtom-maps-meta-codes</a></p>
141
- <h4>How often does Alberts Easy Activator v0.57.17 for Tomtom.zip get updated?</h4>
142
- <p>Alberts Easy Activator v0.57.17 for Tomtom.zip gets updated whenever there is a new map release or a new feature or improvement added by Albert Swafega. You can check the GPS Underground forum regularly to see if there is a new version available. You can also subscribe to the thread or enable notifications to get alerted when there is a new update.</p>
143
- <h4>Where can I get more help or support for Alberts Easy Activator v0.57.17 for Tomtom.zip?</h4>
144
- <p>If you need more help or support for Alberts Easy Activator v0.57.17 for Tomtom.zip, you can visit the GPS Underground forum and search for answers or post your queries there. You can also contact Albert Swafega directly by sending him a private message on the forum. He is very friendly and helpful and will try to assist you as soon as possible.</p>
145
- </p> 0a6ba089eb<br />
146
- <br />
147
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1acneusushi/gradio-2dmoleculeeditor/data/Battlefield 3 Game File Part 35.rar.rar The Final Piece of the Puzzle.md DELETED
@@ -1,125 +0,0 @@
1
-
2
- <h1>What is Battlefield 3 Game File Part 35.rar.rar?</h1>
3
- <h2>Introduction</h2>
4
- <p>If you are a fan of first-person shooter games, you might have heard of <strong>Battlefield 3</strong>, a popular game from Electronic Arts that was released in 2011. Battlefield 3 is a sequel to Battlefield 2 and features realistic graphics, physics, and sound effects that immerse you in the war zone. You can play as a soldier in various campaigns across different locations, such as Iran, Paris, New York, and more. You can also compete with other players online in various modes, such as team deathmatch, conquest, rush, and more.</p>
5
- <h2>battlefield 3 game file part 35.rar.rar</h2><br /><p><b><b>Download Zip</b> &#10145; <a href="https://byltly.com/2uKyOv">https://byltly.com/2uKyOv</a></b></p><br /><br />
6
- <p>But how can you get this game for free? One way is to download a file called <strong>Battlefield 3 Game File Part 35.rar.rar</strong>. This is a compressed file that contains part of the game data that you need to install and play Battlefield 3 on your PC. But what is a compressed file and why does it have two RAR extensions? Let's find out.</p>
7
- <h3>What is a RAR file?</h3>
8
- <p>A RAR file is a type of compressed file that uses a proprietary algorithm to reduce the size of large files. Compressing files can save disk space and bandwidth when transferring files online. A RAR file can also be split into multiple parts to make it easier to download or upload. To open a RAR file, you need a software program that can extract its contents, such as WinRAR or 7-Zip.</p>
9
- <h3>Why are there two RAR extensions?</h3>
10
- <p>Normally, a RAR file has only one extension, such as .rar or .part01.rar. However, sometimes you might encounter a file that has two RAR extensions, such as .rar.rar or .part35.rar.rar. This means that the file is actually a RAR file inside another RAR file. This can happen when someone compresses an already compressed file again, either by mistake or on purpose. To open such a file, you need to extract it twice: first from the outer RAR file and then from the inner RAR file.</p>
11
- <h2>How to download Battlefield 3 Game File Part 35.rar.rar?</h2>
12
- <p>Now that you know what Battlefield 3 Game File Part 35.rar.rar is, you might be wondering how to download it. There are several websites that offer this file for free, but you need to be careful because some of them might contain viruses or malware that can harm your computer. Here are some tips on how to download this file safely and efficiently.</p>
13
- <h3>Where to find the file online?</h3>
14
- <p>One way to find this file online is to use a search engine like Google or Bing. You can type in keywords like "battlefield 3 game file part 35.rar.rar" or "battlefield 3 game files.part35.rar" and see what results come up. However, not all results are reliable or trustworthy, so you need to check the source before clicking on any link. Some indicators of a good source are:</p>
15
- <p>battlefield 3 reloaded gamefiles part35 rar<br />
16
- battlefield 3 game files.part35.rar 18<br />
17
- battlefield 3 game files.part35.rar download<br />
18
- battlefield 3 save game files download pc<br />
19
- battlefield 3 save game files<br />
20
- battlefield 4 save game files<br />
21
- battlefield v game files<br />
22
- battlefield 1 save game files<br />
23
- battlefield heroes game files<br />
24
- game files.part35.rar battlefield 3<br />
25
- battlefield hardline save game files<br />
26
- battlefield 1 verifying game files<br />
27
- battlefield 3 rar file download<br />
28
- battlefield 3 rar password<br />
29
- battlefield 3 rar free download<br />
30
- battlefield 3 rar parts<br />
31
- battlefield 3 rarbg<br />
32
- battlefield 3 rar file password<br />
33
- battlefield 3 rar file free download<br />
34
- battlefield 3 rar file size<br />
35
- battlefield 3 reloaded rar password<br />
36
- battlefield 3 reloaded rar download<br />
37
- battlefield 3 reloaded rar free download<br />
38
- battlefield 3 reloaded rar parts<br />
39
- battlefield 3 reloaded rarbg<br />
40
- battlefield 4 reloaded rar password<br />
41
- battlefield 4 reloaded rar download<br />
42
- battlefield hardline reloaded rar password<br />
43
- battlefield hardline reloaded rar download<br />
44
- need for speed the run part35 rar poe<br />
45
- need for speed the run part35 rar download<br />
46
- need for speed the run part35 rar password<br />
47
- need for speed the run part35 rar free download<br />
48
- need for speed the run part35 rar file size<br />
49
- need for speed the run part35 rarbg<br />
50
- need for speed most wanted part35 rar poe<br />
51
- need for speed most wanted part35 rar download<br />
52
- need for speed most wanted part35 rar password<br />
53
- need for speed most wanted part35 rar free download<br />
54
- need for speed most wanted part35 rar file size<br />
55
- need for speed most wanted part35 rarbg<br />
56
- captain sim 777 crack part35 rar poe<br />
57
- captain sim 777 crack part35 rar download<br />
58
- captain sim 777 crack part35 rar password<br />
59
- captain sim 777 crack part35 rar free download<br />
60
- captain sim 777 crack part35 rar file size<br />
61
- captain sim 777 crack part35 rarbg</p>
62
- <ul>
63
- <li>The website has a clear and professional design.</li>
64
- <li>The website has positive reviews and ratings from other users.</li>
65
- <li>The website provides detailed information about the file size, format, quality, and installation instructions.</li>
66
- <li>The website does not ask for personal information or payment before downloading.</li>
67
- </ul>
68
- <p>Some examples of websites that offer this file for free are:</p>
69
- <table>
70
- <tr>
71
- <th>Website</th>
72
- <th>URL</th>
73
- <th>File Size</th>
74
- <th>Format</th>
75
- <th>Quality</th>
76
- </tr>
77
- <tr>
78
- <td>[MM] Millionaire Mafia</td>
79
- <td><a href="https://millionaremafia.darkbb.com/t45-battlefield-3-game-files-part35-rar-18">https://millionaremafia.darkbb.com/t45-battlefield-3-game-files-part35-rar-18</a></td>
80
- <td>398 MB</td>
81
- <td>RAR</td>
82
- <td>Good</td>
83
- </tr>
84
- <tr>
85
- <td>Midbeaukavermems</td>
86
- <td><a href="https://midbeaukavermems.wixsite.com/tramdestnatic/post/battlefield-3-game-files-part35-rar">https://midbeaukavermems.wixsite.com/tramdestnatic/post/battlefield-3-game-files-part35-rar</a></td>
87
- <td>398 MB</td>
88
- <td>RAR</td>
89
- <td>Good</td>
90
- </tr>
91
- <tr>
92
- <td>Erenatin</td>
93
- <td><a href="https://diongelderanhauki.wixsite.com/erenatin/post/utorrent-battlefield-3-game-free-64bit-software-windows">https://diongelderanhauki.wixsite.com/erenatin/post/utorrent-battlefield-3-game-free-64bit-software-windows</a></td>
94
- <td>13 GB (total)</td>
95
- <td>RAR + ISO + MDS + BIN</td>
96
- <td>Excellent</td>
97
- </tr>
98
- <tr>
99
- <td>Pastebin</td>
100
- <td><a href="https://pastebin.com/DmMgNRgD">https://pastebin.com/DmMgNRgD</a></td>
101
- <td>N/A</td>
102
- <td>N/A</td>
103
- <td>Poor</td>
104
- </tr>
105
- </table>
106
- <p>As you can see, some websites offer only one part of the game file, while others offer the whole game in multiple parts. Depending on your preference and internet speed, you can choose which option suits you best.</p>
107
- <h3>How to use a torrent client?</h3>
108
- <p>Another way to find this file online is to use a torrent client like uTorrent or BitTorrent. A torrent client is a software program that allows you to download files from other users who have them on their computers. This is called peer-to-peer (P2P) sharing and it can be faster and more efficient than downloading from a single source. However, it also comes with some risks and challenges, such as:</p>
109
- <ul>
110
- <li>You need to find a reliable torrent site that has the file you want.</li>
111
- <li>You need to check the comments and ratings of other users who have downloaded the file before you.</li>
112
- <li>You need to scan the file for viruses or malware before opening it.</li>
113
- <li>You need to seed (upload) the file back to other users after downloading it.</li>
114
- <li>You need to be aware of the legal issues and consequences of downloading copyrighted content without permission.</li>
115
- </ul>
116
- <p>If you decide to use a torrent client, here are some steps on how to do it:</p>
117
- <ol>
118
- <li>Download and install a torrent client on your computer.</li>
119
- <li>Go to a torrent site like The Pirate Bay or Kickass Torrents and search for "battlefield 3 game files.part35.rar" or "battlefield 3 game files.part35.rar.rar". You can also use Google or Bing with keywords like "battlefield 3 game files.part35.rar torrent" or "battlefield 3 game files.part35.rar.rar torrent".</li>
120
- <li>Select the torrent that has the most seeds (uploaders) and leeches (downloaders) and click on it.</li>
121
- <li>Download the torrent file or copy the magnet link and open it with your torrent client.</li>
122
- <li>Select where you want to save the downloaded file on your computer and start downloading.</li>
123
- <li>Wait until the download is complete and verify the file integrity by checking its size and hash value.</</p> 0a6ba089eb<br />
124
- <br />
125
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1acneusushi/gradio-2dmoleculeeditor/data/Download Enscape 3.3 Full Crack Bagas31 Is It Worth It?.md DELETED
@@ -1,21 +0,0 @@
1
-
2
- <h1>How to Download Enscape 3.3 Full Crack Bagas31</h1>
3
- <p>Enscape 3.3 is a powerful and easy-to-use real-time rendering software that allows you to create stunning and realistic visuals for your architectural and design projects. It integrates seamlessly with popular CAD software such as SketchUp, Revit, Rhino, and ArchiCAD, and enables you to explore your designs in VR or export them as images or videos. Enscape 3.3 also offers many features and enhancements, such as improved lighting, shadows, reflections, materials, textures, and more.</p>
4
- <p>However, Enscape 3.3 is not a free software. You need to purchase a license or subscription plan to use it legally and fully. Some people may be tempted to use download enscape 3.3 full crack bagas31, which is a pirated or modified version of the software that bypasses the license verification or activation process. This may seem like a good way to save money and enjoy the full features of Enscape 3.3, but it is actually a bad idea for several reasons. Here are some of the risks and consequences of using download enscape 3.3 full crack bagas31:</p>
5
- <h2>download enscape 3.3 full crack bagas31</h2><br /><p><b><b>Download File</b> &harr; <a href="https://byltly.com/2uKvbT">https://byltly.com/2uKvbT</a></b></p><br /><br />
6
- <ul>
7
- <li><b>It is illegal and unethical</b>: Downloading and using cracked software is a violation of the intellectual property rights of the software developer. It is also a breach of the terms and conditions of Enscape 3.3. If you get caught, you may face legal action, fines, or even criminal charges. You may also lose your access to Enscape 3.3 services or updates. Moreover, using cracked software is unfair to the software developer who invested time, money, and effort to create and maintain Enscape 3.3.</li>
8
- <li><b>It can harm your computer or data</b>: Cracked software often contains malware or viruses that can infect your system, corrupt your files, steal your personal or financial information, or display unwanted ads or pop-ups. You may not even notice that your computer is compromised until it is too late. You may end up losing your data, money, or identity.</li>
9
- <li><b>It can affect your rendering quality or performance</b>: Cracked software can have compatibility issues or bugs that can cause errors, glitches, or crashes. You may not be able to render or export your projects properly. You may also experience reduced speed or functionality. You may miss out on important updates or features that are available in the official version of Enscape 3.3.</li>
10
- </ul>
11
- <p>As you can see, using download enscape 3.3 full crack bagas31 is not worth the risk or hassle. You are better off using the official version of Enscape 3.3 that is legal, safe, and reliable. You can download Enscape 3.3 from its official website or from trusted sources. You can also purchase a license or subscription plan that suits your needs and budget. By doing so, you can enjoy the benefits of a powerful and easy-to-use real-time rendering software without compromising your security or quality. Don't wait any longer and make the smart choice today!</p>
12
-
13
- <p>If you are still not convinced by the official version of Enscape 3.3 and want to use download enscape 3.3 full crack bagas31, you should be aware of the alternatives that are legal, safe, and reliable. Here are some of the options that you can consider:</p>
14
- <ol>
15
- <li><b>Enscape Trial Version</b>: This is a free version of Enscape 3.3 that allows you to use it for 14 days with full features and functionality. You can download Enscape Trial Version from its official website and use it to test and evaluate the software before purchasing a license or subscription plan. You can also extend your trial period by contacting the Enscape team.</li>
16
- <li><b>Enscape Student Version</b>: This is a free version of Enscape 3.3 that is available for students and educators who are enrolled or employed in an accredited academic institution. You can download Enscape Student Version from its official website and use it for non-commercial purposes only. You need to provide a valid email address and proof of eligibility to access this version.</li>
17
- <li><b>Other Rendering Software</b>: There are many other rendering software that you can use for your architectural and design projects, such as Lumion, V-Ray, Twinmotion, Unreal Engine, and more. Some of them are free or open-source, while others are paid or subscription-based. You can compare their features, functionality, quality, and performance and choose the one that best suits your needs and budget.</li>
18
- </ol>
19
- <p>As you can see, there are many alternatives to download enscape 3.3 full crack bagas31 that are legal, safe, and reliable. By using one of these options, you can enjoy the benefits of a powerful and easy-to-use real-time rendering software without compromising your security or quality. Try them out today and see for yourself!</p> ddb901b051<br />
20
- <br />
21
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1acneusushi/gradio-2dmoleculeeditor/data/Download Movie Maker Windows 10 Crack A Risky and Illegal Move.md DELETED
@@ -1,26 +0,0 @@
1
-
2
- <h1>Download Movie Maker Windows 10 Crack: Is It Safe and Legal?</h1>
3
- <p>Movie Maker is a simple and easy-to-use video editing software that was originally developed by Microsoft for Windows. It allows you to create and edit videos, add transitions, effects, titles, music, and more. You can also share your videos online or burn them to DVDs.</p>
4
- <p>However, Movie Maker is no longer available for download from Microsoft since 2017. If you want to use it on Windows 10, you might be tempted to look for a download movie maker windows 10 crack online. But is it safe and legal to do so?</p>
5
- <h2>download movie maker windows 10 crack</h2><br /><p><b><b>Download</b> &#10042; <a href="https://byltly.com/2uKzX6">https://byltly.com/2uKzX6</a></b></p><br /><br />
6
- <h2>The Risks of Downloading a Movie Maker Windows 10 Crack</h2>
7
- <p>Downloading a movie maker windows 10 crack might seem like a good idea at first, but it comes with many risks and disadvantages. Here are some of them:</p>
8
- <ul>
9
- <li><b>It is illegal.</b> Downloading a cracked version of any software is a violation of the intellectual property rights of the developers. You could face legal consequences if you get caught.</li>
10
- <li><b>It is unsafe.</b> Downloading a cracked version of any software from an unknown source could expose your computer to viruses, malware, spyware, and other threats. You could lose your data, compromise your privacy, or damage your system.</li>
11
- <li><b>It is unreliable.</b> Downloading a cracked version of any software could result in poor performance, errors, bugs, crashes, or compatibility issues. You could also miss out on the latest updates, features, and support from the developers.</li>
12
- <li><b>It is unethical.</b> Downloading a cracked version of any software is unfair to the developers who have invested their time, money, and effort to create a quality product. You are depriving them of their rightful income and discouraging them from improving their software.</li>
13
- </ul>
14
- <h2>The Benefits of Using an Alternative to Movie Maker</h2>
15
- <p>Instead of downloading a movie maker windows 10 crack, you can use an alternative video editing software that is compatible with Windows 10. There are many options available online, both free and paid. Some of them are:</p>
16
- <ul>
17
- <li><b>VSDC Free Video Editor.</b> This is a free and powerful video editing software that supports various formats and features. You can cut, crop, rotate, merge, split, and edit your videos with ease. You can also add filters, transitions, effects, audio, subtitles, and more. You can also export your videos to different devices or platforms.</li>
18
- <li><b>Filmora.</b> This is a paid and user-friendly video editing software that offers a lot of creative tools and options. You can trim, crop, rotate, join, and enhance your videos with ease. You can also add filters, transitions, effects, music, titles, stickers, and more. You can also export your videos to different formats or share them online.</li>
19
- <li><b>OpenShot.</b> This is a free and open-source video editing software that is easy to use and versatile. You can drag and drop your videos to the timeline and edit them as you like. You can also add transitions, effects, animations, titles, music, and more. You can also export your videos to different formats or upload them to YouTube or Vimeo.</li>
20
- </ul>
21
- <h2>Conclusion</h2>
22
- <p>Movie Maker is a great video editing software that was discontinued by Microsoft in 2017. If you want to use it on Windows 10, you might be tempted to download a movie maker windows 10 crack online. However, this is not a safe or legal option. You could face legal consequences, damage your computer, compromise your privacy, or lose your data. You could also miss out on the latest updates, features, and support from the developers.</p>
23
- <p>The best way to edit videos on Windows 10 is to use an alternative video editing software that is compatible with Windows 10. There are many options available online, both free and paid. You can choose the one that suits your needs and preferences. You will get the best quality and performance from the software. You will also get access to the latest updates, features, and support from the developers. You will also be supporting the developers who have created an amazing product that can help you create amazing videos.</p>
24
- <p>If you want to edit videos on Windows 10 without downloading a movie maker windows 10 crack online,<a href="https://www.videosoftdev.com/free-video-editor">download VSDC Free Video Editor</</p> ddb901b051<br />
25
- <br />
26
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1acneusushi/gradio-2dmoleculeeditor/data/EasyWorship 7 Problems and Solutions How to Optimize Your Church Presentation Software.md DELETED
@@ -1,43 +0,0 @@
1
-
2
- <h1>How to Troubleshoot Common Problems with EasyWorship 7</h1>
3
- <p>EasyWorship 7 is a powerful church presentation software that allows you to create and display slides, lyrics, scriptures, videos, and more. However, sometimes you may encounter some issues that prevent you from using EasyWorship 7 smoothly. In this article, we will show you how to troubleshoot some of the most common problems with EasyWorship 7 and how to contact the support team if you need further assistance.</p>
4
- <h2>Live Output Not Filling The Entire Screen</h2>
5
- <p>One of the possible problems with EasyWorship 7 is that the live output does not fill the entire screen of your projector or monitor. This can happen if the resolution of your output device does not match the resolution of your EasyWorship 7 settings. To fix this, you need to adjust the resolution of your output device and your EasyWorship 7 settings to match each other. Here are the steps to do this:</p>
6
- <h2>easyworship 7 troubleshooting</h2><br /><p><b><b>Download</b> &#9999; &#9999; &#9999; <a href="https://byltly.com/2uKvff">https://byltly.com/2uKvff</a></b></p><br /><br />
7
- <ol>
8
- <li>Right-click on your desktop and select Display settings.</li>
9
- <li>Under Scale and layout, check the resolution of your output device and make a note of it.</li>
10
- <li>Open EasyWorship 7 and go to Edit > Options > Live.</li>
11
- <li>Under Output Monitor Resolution, select the same resolution as your output device.</li>
12
- <li>Click OK and restart EasyWorship 7.</li>
13
- </ol>
14
- <p>If this does not solve the problem, you may need to adjust the aspect ratio of your output device and your EasyWorship 7 settings. Here are the steps to do this:</p>
15
- <ol>
16
- <li>Right-click on your desktop and select Display settings.</li>
17
- <li>Under Scale and layout, check the aspect ratio of your output device and make a note of it.</li>
18
- <li>Open EasyWorship 7 and go to Edit > Options > Live.</li>
19
- <li>Under Output Monitor Aspect Ratio, select the same aspect ratio as your output device.</li>
20
- <li>Click OK and restart EasyWorship 7.</li>
21
- </ol>
22
- <h2>Screens Switching Or Duplicated Onto Another Monitor</h2>
23
- <p>Another possible problem with EasyWorship 7 is that the screens switch or duplicate onto another monitor. This can happen if the display settings of your computer are not configured correctly. To fix this, you need to set up your display settings to extend your desktop across multiple monitors. Here are the steps to do this:</p>
24
- <ol>
25
- <li>Right-click on your desktop and select Display settings.</li>
26
- <li>Under Multiple displays, select Extend these displays.</li>
27
- <li>Drag and drop the monitors to arrange them according to their physical position.</li>
28
- <li>Click Apply and close the settings window.</li>
29
- </ol>
30
- <h2>Access Violation When Opening EasyWorship 7</h2>
31
- <p>A third possible problem with EasyWorship 7 is that you get an access violation error when opening EasyWorship 7. This can happen if there is a corrupted file or folder in your EasyWorship 7 installation. To fix this, you need to delete the corrupted file or folder and reinstall EasyWorship 7. Here are the steps to do this:</p>
32
- <ol>
33
- <li>Close EasyWorship 7 if it is running.</li>
34
- <li>Navigate to C:\Users\Public\Public Documents\Softouch\Easyworship\Default\v7.1\Databases\Data</li>
35
- <li>Delete the file or folder that has a name starting with EWDatabase_ followed by a number.</li>
36
- <li>Navigate to C:\Users\Public\Public Documents\Softouch\Easyworship\Default\v7.1\Databases\Profiles</li>
37
- <li>Delete the file or folder that has a name starting with EWProfile_ followed by a number.</li>
38
- <li>Navigate to C:\Program Files (x86)\Softouch\Easyworship 7</li>
39
- <li>Delete the file or folder named EW.vclstyles</li>
40
- <li>Reinstall EasyWorship 7 from https://www.easyworship.com/downloads/ew_builds/EasyWorshipWeb.exe</li>
41
- </ol></p> ddb901b051<br />
42
- <br />
43
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1gistliPinn/ChatGPT4/Examples/Checklist Persiapan Majlis Perkahwinan Pdf Download.md DELETED
@@ -1,68 +0,0 @@
1
-
2
- <h1>Checklist Persiapan Majlis Perkahwinan Pdf Download: Panduan Lengkap Untuk Bakal Pengantin</h1>
3
-
4
- <p>Anda sedang merancang untuk melangsungkan perkahwinan anda? Tahniah! Perkahwinan adalah satu peristiwa penting dalam hidup anda dan anda pasti mahu ia berjalan dengan lancar dan sempurna. Tetapi, adakah anda tahu apa yang perlu anda sediakan dan uruskan sebelum, semasa dan selepas majlis perkahwinan anda?</p>
5
-
6
- <p>Jangan risau, kami ada penyelesaian untuk anda. Kami telah menyediakan sebuah checklist persiapan majlis perkahwinan pdf download yang boleh anda gunakan sebagai rujukan dan panduan untuk memudahkan perancangan anda. Checklist ini meliputi semua aspek yang berkaitan dengan perkahwinan anda, seperti:</p>
7
- <h2>Checklist Persiapan Majlis Perkahwinan Pdf Download</h2><br /><p><b><b>DOWNLOAD</b> &#9989; <a href="https://imgfil.com/2uxYPg">https://imgfil.com/2uxYPg</a></b></p><br /><br />
8
-
9
- <ul>
10
- <li>Lokasi majlis</li>
11
- <li>Tema dan dekorasi</li>
12
- <li>Katering dan menu</li>
13
- <li>Baju pengantin dan keluarga</li>
14
- <li>Hantaran dan mas kahwin</li>
15
- <li>Kad jemputan dan cenderahati</li>
16
- <li>Kursus kahwin dan sijil nikah</li>
17
- <li>Merisik, meminang dan akad nikah</li>
18
- <li>Majlis sanding dan berinai</li>
19
- <li>Tips-tips kesihatan dan keharmonian selepas kahwin</li>
20
- </ul>
21
-
22
- <p>Checklist ini juga disertakan dengan contoh-contoh gambar, idea-idea menarik, tips-tips berguna dan pautan-pautan rujukan yang boleh membantu anda mendapatkan perkhidmatan dan produk yang berkualiti dan berpatutan. Anda juga boleh menyesuaikan checklist ini mengikut keperluan, bajet dan cita rasa anda.</p>
23
-
24
- <p>Bagaimana cara untuk mendapatkan checklist persiapan majlis perkahwinan pdf download ini? Mudah sahaja, anda hanya perlu klik pada pautan di bawah ini dan anda akan dibawa ke halaman muat turun. Anda boleh menyimpan checklist ini dalam telefon, tablet atau komputer anda dan membukanya pada bila-bila masa sahaja. Anda juga boleh mencetaknya jika anda suka.</p>
25
-
26
- <p><a href="https://example.com/checklist-persiapan-majlis-perkahwinan-pdf-download">Checklist Persiapan Majlis Perkahwinan Pdf Download</a></p>
27
-
28
- <p>Dengan checklist ini, anda tidak perlu bimbang lagi tentang apa yang perlu anda buat untuk majlis perkahwinan anda. Anda boleh mengikut langkah demi langkah yang telah disusun dengan teratur dan logik. Anda juga boleh menjadikan checklist ini sebagai senarai semak untuk memastikan anda tidak tertinggal apa-apa perkara penting.</p>
29
-
30
- <p>Checklist persiapan majlis perkahwinan pdf download ini adalah satu alat yang sangat berguna dan praktikal untuk bakal pengantin yang ingin merancang majlis perkahwinan impian mereka. Jadi, tunggu apa lagi? Muat turun checklist ini sekarang dan mulakan perancangan anda dengan lebih mudah dan sistematik!</p>
31
- <h2>Checklist Persiapan Majlis Perkahwinan Pdf Download: Apa Yang Anda Perlu Tahu</h2>
32
-
33
- <p>Sebelum anda mula menggunakan checklist persiapan majlis perkahwinan pdf download ini, ada beberapa perkara yang anda perlu tahu dan fahami. Ini adalah untuk memastikan anda dapat menggunakan checklist ini dengan betul dan efektif. Berikut adalah beberapa perkara yang anda perlu tahu:</p>
34
- <p></p>
35
-
36
- <ol>
37
- <li>Checklist ini adalah bersifat umum dan tidak spesifik kepada sesuatu adat, budaya atau agama. Anda perlu menyesuaikan checklist ini mengikut adat, budaya dan agama anda dan pasangan anda. Anda juga perlu mengambil kira kehendak dan keperluan keluarga anda dan pasangan anda.</li>
38
- <li>Checklist ini adalah bersifat fleksibel dan boleh diubah suai mengikut situasi dan keadaan anda. Anda tidak perlu mengikut semua perkara yang terdapat dalam checklist ini secara ketat dan kaku. Anda boleh menambah, mengurangkan atau mengubah sesuatu perkara mengikut kesesuaian dan keselesaan anda.</li>
39
- <li>Checklist ini adalah bersifat panduan dan bukan arahan. Anda tidak perlu merasa terikat atau terbeban dengan checklist ini. Anda boleh menggunakan checklist ini sebagai rujukan dan bantuan untuk memudahkan perancangan anda. Anda juga boleh mendapatkan nasihat dan pendapat dari orang-orang yang berpengalaman atau pakar dalam bidang perkahwinan.</li>
40
- </ol>
41
-
42
- <p>Dengan mengetahui perkara-perkara ini, anda dapat menggunakan checklist persiapan majlis perkahwinan pdf download ini dengan lebih bijak dan berkesan. Anda juga dapat mengelakkan sebarang masalah atau kesilapan yang mungkin timbul semasa merancang majlis perkahwinan anda.</p>
43
- <h2>Checklist Persiapan Majlis Perkahwinan Pdf Download: Bagaimana Cara Menggunakannya</h2>
44
-
45
- <p>Setelah anda muat turun checklist persiapan majlis perkahwinan pdf download ini, anda mungkin tertanya-tanya bagaimana cara menggunakannya dengan betul. Jangan risau, kami akan tunjukkan kepada anda langkah-langkah mudah untuk menggunakan checklist ini. Berikut adalah langkah-langkah yang anda perlu ikuti:</p>
46
-
47
- <ol>
48
- <li>Buka file pdf yang anda telah muat turun dan baca dengan teliti. Anda boleh mencetak file ini jika anda suka atau menyimpannya dalam telefon, tablet atau komputer anda.</li>
49
- <li>Tentukan tarikh perkahwinan anda dan pasangan anda. Ini adalah perkara yang paling penting kerana ia akan menentukan bila anda perlu mula dan siapkan semua perkara yang berkaitan dengan majlis perkahwinan anda.</li>
50
- <li>Buat perancangan awal dengan merujuk kepada checklist ini. Anda boleh menandakan perkara-perkara yang paling utama dan penting untuk anda lakukan terlebih dahulu. Anda juga boleh menetapkan tempoh masa untuk menyelesaikan setiap perkara.</li>
51
- <li>Lakukan tindakan mengikut checklist ini. Anda boleh melakukan perkara-perkara yang terdapat dalam checklist ini secara berurutan atau mengikut keutamaan anda. Anda juga boleh mendapatkan bantuan dari keluarga, sahabat atau profesional jika perlu.</li>
52
- <li>Semak dan pantau kemajuan anda. Anda boleh menandakan perkara-perkara yang telah anda selesaikan dalam checklist ini. Anda juga boleh menyemak semula checklist ini dari masa ke semasa untuk memastikan anda tidak tertinggal apa-apa perkara.</li>
53
- </ol>
54
-
55
- <p>Dengan mengikuti langkah-langkah ini, anda dapat menggunakan checklist persiapan majlis perkahwinan pdf download ini dengan lebih mudah dan sistematik. Anda juga dapat menjimatkan masa, tenaga dan wang dalam merancang majlis perkahwinan anda.</p>
56
- <h2>Checklist Persiapan Majlis Perkahwinan Pdf Download: Kesimpulan</h2>
57
-
58
- <p>Perkahwinan adalah satu peristiwa yang indah dan bermakna dalam hidup anda. Anda pasti mahu merancang dan melaksanakan majlis perkahwinan anda dengan sebaik mungkin. Tetapi, merancang majlis perkahwinan bukanlah sesuatu yang mudah dan ringkas. Anda perlu menguruskan banyak perkara dan memastikan semuanya berjalan dengan lancar dan sempurna.</p>
59
-
60
- <p>Oleh itu, kami telah menyediakan checklist persiapan majlis perkahwinan pdf download yang boleh anda gunakan sebagai panduan dan rujukan untuk memudahkan perancangan anda. Checklist ini meliputi semua aspek yang berkaitan dengan perkahwinan anda, dari merisik hingga majlis sanding. Checklist ini juga disertakan dengan contoh-contoh gambar, idea-idea menarik, tips-tips berguna dan pautan-pautan rujukan yang boleh membantu anda mendapatkan perkhidmatan dan produk yang berkualiti dan berpatutan.</p>
61
-
62
- <p>Anda boleh muat turun checklist ini secara percuma dengan mengklik pada pautan di bawah ini. Anda boleh menyimpan checklist ini dalam telefon, tablet atau komputer anda dan membukanya pada bila-bila masa sahaja. Anda juga boleh mencetaknya jika anda suka. Anda juga boleh menyesuaikan checklist ini mengikut keperluan, bajet dan cita rasa anda.</p>
63
-
64
- <p><a href="https://example.com/checklist-persiapan-majlis-perkahwinan-pdf-download">Checklist Persiapan Majlis Perkahwinan Pdf Download</a></p>
65
-
66
- <p>Kami harap checklist ini dapat membantu anda dalam merancang majlis perkahwinan impian anda. Kami juga mengucapkan tahniah dan selamat pengantin baru kepada anda dan pasangan anda. Semoga perkahwinan anda bahagia dan kekal hingga ke akhir hayat. Amin.</p> 3cee63e6c2<br />
67
- <br />
68
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1gistliPinn/ChatGPT4/Examples/Dlddiscografia320kbps !EXCLUSIVE!.md DELETED
@@ -1,6 +0,0 @@
1
- <h2>dlddiscografia320kbps</h2><br /><p><b><b>Download Zip</b> &#10027;&#10027;&#10027; <a href="https://imgfil.com/2uy0l5">https://imgfil.com/2uy0l5</a></b></p><br /><br />
2
- <br />
3
- ALBUMS: Discogs ARCHIVES: Dlddiscografia. Mixtapes. Hardware. Algo Gucci'. Algo Beezy. &amp;#128189; DOWNLOAD: dlddiscografia320kbps. Homepage: DLDiscography. dlddiscografia320kbps. DLDiscography/320kbps: [ mixtape ] - Apple Music. dlddiscografia320kbps. ติดตามเว็บไหนที่รวมเว็บไหนด้วยละ dlddiscografia320kbps. Free shipping on qualifying offers. ละ. dlddiscografia320kbps. R&amp;B Discogs R&amp;B Discogs: l&amp;JG, Arllex, Jomar, Shaggy D. R&amp;B Discogs R&amp;B Discogs: Los Angeles, DMC, The Beatnuts, Pumpkinhead, Pete Rock. Mixes by The Almighty [... For all uppercase letters in these lyrics, please refer to this wiki page. &quot;(Get in the Vehicle)&quot; (14th Heaven) (24 yrs) Los Angeles, Ca, USA iGO (Люди которые просто хотят быть хорошими, не понимают людей которые только хотят быть счастливыми) &quot;Crazy&quot; (14th Heaven) (16 yrs) Los Angeles, Ca, USA &quot;I wanna be like you&quot; (Skeleton &amp; Silk) (27 yrs) Los Angeles, Ca, USA &quot;Still I'm waiting for you&quot; (Skeleton &amp; Silk) (27 yrs) Los 4fefd39f24<br />
4
- <br />
5
- <br />
6
- <p></p>
 
 
 
 
 
 
 
spaces/1line/AutoGPT/run.sh DELETED
@@ -1,9 +0,0 @@
1
- #!/bin/bash
2
- python scripts/check_requirements.py requirements.txt
3
- if [ $? -eq 1 ]
4
- then
5
- echo Installing missing packages...
6
- pip install -r requirements.txt
7
- fi
8
- python -m autogpt $@
9
- read -p "Press any key to continue..."
 
 
 
 
 
 
 
 
 
 
spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/8 Raflaan MP3 Song - The Punjabi Sensation by Mankirt Aulakh and Gurlez Akhtar.md DELETED
@@ -1,128 +0,0 @@
1
-
2
- <h1>How to Download 8 Raflaan Song MP3 for Free</h1>
3
- <p>If you are a fan of Punjabi music, you might have heard of the popular song 8 Raflaan by Mankirt Aulakh and Gurlej Akhtar. This song has been trending on YouTube and other music platforms since its release in 2021. But how can you download this song in MP3 format for free? In this article, we will tell you everything you need to know about 8 Raflaan song, why you should download it in MP3 format, and where to find the best free music download sites.</p>
4
- <h2>What is 8 Raflaan Song?</h2>
5
- <p>8 Raflaan is a Punjabi song that was released on April 28, 2021 by Mankirt Aulakh Music. The song features Mankirt Aulakh and Gurlej Akhtar as the main singers, along with Shree Brar as the lyricist and composer, and Avvy Sra as the music producer. The song is a catchy and upbeat track that showcases the Punjabi culture and lifestyle.</p>
6
- <h2>download 8 raflaan song mp3</h2><br /><p><b><b>Download</b> &#9658;&#9658;&#9658;&#9658;&#9658; <a href="https://urlin.us/2uT0ZE">https://urlin.us/2uT0ZE</a></b></p><br /><br />
7
- <h3>The artists and the music video</h3>
8
- <p>Mankirt Aulakh is a famous Punjabi singer and actor who has been active in the music industry since 2014. He is known for his hit songs like Badnam, Kadar, Jugaadi Jatt, and more. Gurlej Akhtar is a renowned Punjabi female singer who has collaborated with many artists like Dilpreet Dhillon, Karan Aujla, Sidhu Moose Wala, and more. She is known for her songs like Don't Worry, Jatt Di Pasand, Defend, and more.</p>
9
- <p>The music video of 8 Raflaan was directed by Mahi Sandhu and Joban Sandhu, and featured Mankirt Aulakh, Gurlej Akhtar, Ginni Kapoor, Yaad Grewal, and others. The video depicts the story of a gangster who falls in love with a girl, but faces trouble from his rivals and the police. The video has received over 251 million views on YouTube as of June 2021.</p>
10
- <p>download 8 raflaan song mp3 by mankirt aulakh<br />
11
- download 8 raflaan song mp3 free<br />
12
- download 8 raflaan song mp3 320kbps<br />
13
- download 8 raflaan song mp3 pagalworld<br />
14
- download 8 raflaan song mp3 mr jatt<br />
15
- download 8 raflaan song mp3 djpunjab<br />
16
- download 8 raflaan song mp3 ringtone<br />
17
- download 8 raflaan song mp3 lyrics<br />
18
- download 8 raflaan song mp3 video<br />
19
- download 8 raflaan song mp3 remix<br />
20
- download 8 raflaan song mp3 gurlez akhtar<br />
21
- download 8 raflaan song mp3 online<br />
22
- download 8 raflaan song mp3 audio<br />
23
- download 8 raflaan song mp3 hd<br />
24
- download 8 raflaan song mp3 full<br />
25
- download 8 raflaan song mp3 new punjabi song 2021<br />
26
- download 8 raflaan song mp3 avvy sra<br />
27
- download 8 raflaan song mp3 shree brar<br />
28
- download 8 raflaan song mp3 ginni kapoor<br />
29
- download 8 raflaan song mp3 bestwap<br />
30
- download 8 raflaan song mp3 gaana<br />
31
- download 8 raflaan song mp3 hungama<br />
32
- download 8 raflaan song mp3 jiosaavn<br />
33
- download 8 raflaan song mp3 spotify<br />
34
- download 8 raflaan song mp3 itunes<br />
35
- download 8 raflaan song mp3 resso<br />
36
- download 8 raflaan song mp3 youtube music<br />
37
- download 8 raflaan song mp3 linkfire<br />
38
- download 8 raflaan song mp3 b2gether pros<br />
39
- download 8 raflaan song mp3 sky digital<br />
40
- download 8 raflaan song mp3 mankirt aulakh music<br />
41
- download 8 raflaan song mp3 latest punjabi songs<br />
42
- download 8 raflaan song mp3 high quality<br />
43
- download 8 raflaan song mp3 low quality<br />
44
- download 8 raflaan song mp3 original version<br />
45
- download 8 raflaan song mp3 official video<br />
46
- download 8 raflaan song mp3 teaser trailer<br />
47
- download 8 raflaan song mp3 behind the scenes<br />
48
- download 8 raflaan song mp3 making of the video<br />
49
- download 8 raflaan song mp3 reaction video</p>
50
- <h3>The lyrics and the meaning</h3>
51
- <p>The lyrics of 8 Raflaan are written in Punjabi language, with some English words mixed in. The title of the song means "8 rifles", which refers to the weapons used by the gangsters in the video. The song is about the love and loyalty between the gangster and his girlfriend, as well as the challenges they face from their enemies. Some of the catchy lines from the song are:</p>
52
- <ul>
53
- <li>Ve shehar vich hoya jatta ki lafda baramad hoiyan ne othe 8 raflaan (What happened in the city, jatt? There were 8 rifles seized there)</li>
54
- <li>Oh suneya ae jatta tu taan PO chalde dardi kyun piche aa stand takda (I heard that you are a PO (proclaimed offender), why are you scared to take a stand?)</li>
55
- <li>Husan tere ne jatt moh leya si karda jo maut da vyapaar ni (Your beauty has captivated me, who deals in death)</li>
56
- <li>Firdi police ohnu labbdi firey labbdi tu jis cho pyar ni (The police are looking for him, looking for him whom you love)</li>
57
- <li>Teri kande te jawani aayi vairne kadhwaugi koi kanda vaili jatt ton (Your youth has come to your shoulders, enemies will take away your shoulder from your gangster)</li>
58
- </ul>
59
- <h2>Why download 8 Raflaan Song MP3 for free?</h2>
60
- <p>If you love 8 Raflaan song, you might want to download it in MP3 format for free. But why MP3 format? And is it legal and ethical to download music for free? Here are some answers to these questions.</p>
61
- <h3>The benefits of MP3 format</h3>
62
- <p>MP3 is a digital audio format that compresses the sound data without losing much of the quality. MP3 files are smaller than other audio formats, which means they take less space on your device and less time to download. MP3 files are also compatible with most devices and players, which means you can enjoy your music on your phone, computer, car, or any other device that supports MP3 playback. MP3 files are also easy to edit, transfer, and share with others.</p>
63
- <h3>The legal and ethical issues of downloading music</h3>
64
- <p>Downloading music for free can be a tricky issue, as it involves the rights of the artists and the music industry. Music is a form of intellectual property, which means that the creators and owners of the music have the right to control how their music is used and distributed. Downloading music for free without their permission can be considered as piracy, which is illegal and punishable by law in many countries. Piracy can also harm the artists and the music industry, as they lose revenue and recognition for their work.</p>
65
- <p>However, not all free music downloads are illegal or unethical. There are some sources that offer free music downloads legally and ethically, such as public domain music, creative commons music, or promotional music. These sources either have no copyright restrictions or have permission from the artists or the owners to share their music for free. Downloading music from these sources can be a way of supporting the artists and discovering new music.</p>
66
- <h2>Where to download 8 Raflaan Song MP3 for free?</h2>
67
- <p>Now that you know what 8 Raflaan song is and why you should download it in MP3 format, you might be wondering where to find it for free. There are many websites that claim to offer free music downloads, but not all of them are safe, reliable, or legal. Some of them may contain viruses, malware, or spyware that can harm your device or steal your personal information. Some of them may also have low-quality audio files or broken links that can ruin your listening experience. Some of them may also violate the rights of the artists or the music industry and expose you to legal risks.</p>
68
- <p>To avoid these problems, you should only download 8 Raflaan song MP3 from trusted and reputable sources that offer legal and ethical free music downloads. Here are some of the best free music download sites that you can use:</p>
69
- <h3>The best free music download sites</h3>
70
- <table>
71
- <tr>
72
- <th>Site</th>
73
- <th>Description</th>
74
- <th>Pros</th>
75
- <th>Cons</th>
76
- </tr>
77
- <tr>
78
- <td><a href="">OKmusi</a></td>
79
- <td>A free online MP3 downloader that allows you to download any song from YouTube, SoundCloud, Spotify, and other platforms.</td>
80
- <td>- Easy to use<br>- High-quality audio files<br>- No registration or installation required<br>- Supports multiple languages</td>
81
- <td>- Limited to online streaming platforms<br>- May not have all songs available</td>
82
- </tr>
83
- <tr>
84
- <td><a href="">Jamendo Music</a></td>
85
- <td>A free music platform that offers thousands of songs from independent artists under creative commons licenses.</td>
86
- <td>- Legal and ethical<br>- High-quality audio files<br>- Supports multiple genres and moods<br>- Allows offline listening</td>
87
- <td>- Requires registration<br>- May not have mainstream songs</td>
88
- </tr>
89
- <tr>
90
- <td><a href="">Free Music Archive</a></td>
91
- <td>A free music library that offers a large collection of songs from various genres and artists under public domain or creative commons licenses.</td>
92
- <td>- Legal and ethical<br>- High-quality audio files<br>- Supports multiple genres and categories<br>- Allows user ratings and comments</td>
93
- <td>- Requires registration<br>- May not have latest songs</td>
94
- </tr>
95
- <tr>
96
- <td><a href="">SoundCloud</a></td>
97
- <td>A popular online music platform that allows users to upload, stream, and download songs from various artists and genres.</td>
98
- <td>- High-quality audio files<br>- Supports multiple genres and tags<br>- Allows social interaction and feedback<br>- Has mainstream and indie songs</td>
99
- <td>- Requires registration<br>- Not all songs are downloadable<br>- May have ads</td>
100
- </tr>
101
- <tr>
102
- <td><a href="">Audiomack</a></td>
103
- <td>A free online music platform that offers songs from emerging and established artists across various genres.</td>
104
- <td>- High-quality audio files<br>- Supports multiple genres and playlists<br>- Allows offline listening and sharing<br>- Has trending and new songs</td>
105
- <td>- Requires registration<br>- May have ads<br>- May not have all songs available</td>
106
- </tr>
107
- </table>
108
- <h3>How to use OKmusi MP3 downloader</h3>
109
- <p>One of the easiest and fastest ways to download 8 Raflaan song MP3 for free is to use OKmusi MP3 downloader. OKmusi is a free online MP3 downloader that allows you to download any song from YouTube, SoundCloud, Spotify, and other platforms. Here are the steps to use OKmusi MP3 downloader:</p>
110
- <ol>
111
- <li>Go to <a href="">https://okmusi.com/</a> on your browser.</li>
112
- <li>Type "8 Raflaan" in the search box and click the search icon.</li>
113
- <li>Select the song from the list of results and click the download button.</li>
114
- <li>Choose the MP3 format and the quality you want and click the download button again.</li>
115
- <li>Wait for the download to finish and enjoy your song.</li>
116
- </ol>
117
- <h2>Conclusion</h2>
118
- <p>8 Raflaan is a popular Punjabi song that has been loved by many music fans. If you want to download this song in MP3 format for free, you should use a trusted and reputable source that offers legal and ethical free music downloads. One of the best sources is OKmusi MP3 downloader, which allows you to download any song from YouTube, SoundCloud, Spotify, and other platforms. With OKmusi MP3 downloader, you can enjoy 8 Raflaan song on any device and share it with your friends.</p>
119
- <h2>FAQs</h2>
120
- <ul>
121
- <li><b>Q: Who are the singers of 8 Raflaan song?</b><br>A: The singers of 8 Raflaan song are Mankirt Aulakh and Gurlej Akhtar.</li>
122
- <li><b>Q: What does 8 Raflaan mean?</b><br>A: 8 Raflaan means 8 rifles, which refers to the weapons used by the gangsters in the music video.</li>
123
- <li><b>Q: When was 8 Raflaan song released?</b><br>A: 8 Raflaan song was released on April 28, 2021 by Mankirt Aulakh Music.</li>
124
- <li><b>Q: How many views does 8 Raflaan song have on YouTube?</b><br>A: As of June 2021, 8 Raflaan song has over 251 million views on YouTube.</li>
125
- <li><b>Q: Is it legal to download 8 Raflaan song MP3 for free?</b><br>A: It depends on the source you use. Some sources offer free music downloads legally and ethically, while others may violate the rights of the artists or the music industry. You should only use trusted and reputable sources that offer legal and ethical free music downloads.</li>
126
- </ul></p> 197e85843d<br />
127
- <br />
128
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Download 3uTools for Windows 7 64-bit - Free and Safe.md DELETED
@@ -1,72 +0,0 @@
1
- <br />
2
- <h1>Download 3uTools for Windows 7 64 Bit: A Complete Guide</h1>
3
- <p>If you are looking for a free and easy way to manage your iOS device data on your PC, then you might want to try 3uTools. This software program lets you access a large amount of information on your iPad, iPhone, or iPod touch, such as apps, books, ringtones, etc. You can also jailbreak your iDevice with one click, download various content, and perform other useful tasks. In this article, we will show you how to download and install 3uTools for Windows 7 64 bit, and how to use it to manage your iOS device.</p>
4
- <h2>What is 3uTools and why do you need it?</h2>
5
- <p>3uTools is a comprehensive app for PCs that lets you view and manage the information on your Apple device in a user-friendly interface. You can connect your portable device to your PC with a USB cable or WIFI network. The lightning cable will give you the best connection. You will only need to use WIFI when the USB connection is not working. Here are some of the features that 3uTools offers:</p>
6
- <h2>download 3utools for windows 7 64 bit</h2><br /><p><b><b>Download Zip</b> ===> <a href="https://urlin.us/2uT2Kn">https://urlin.us/2uT2Kn</a></b></p><br /><br />
7
- <h3>Manage your iOS device data on your PC</h3>
8
- <p>With 3uTools, you can easily manage your apps, photos, music, ringtones, videos, and other multimedia files. You can also view your device's different statuses, such as activation, jailbreak, battery, and iCloud lock. You can also see detailed iOS and iDevice information, such as the iOS version, serial number, storage space, etc.</p>
9
- <h3>Jailbreak your iDevice with one click</h3>
10
- <p>If you want to customize your iOS device beyond the limitations imposed by Apple, you can use 3uTools to jailbreak it with one click. Jailbreaking allows you to install unofficial apps, tweaks, themes, and more. 3uTools can automatch available firmwares for iOS devices and support various jailbreak tools. You can also backup and restore your SHSH files, which are essential for downgrading or upgrading your iOS version.</p>
11
- <h3>Download apps, ringtones, wallpapers, and more</h3>
12
- <p>Another feature of 3uTools is that it lets you download various apps, ringtones, wallpapers, and other content for your iOS device. You can browse through different categories and find what you like. You can also use 3uTools to make your own ringtones from music files or convert videos and audio files to different formats.</p>
13
- <p>How to download 3utools for windows 7 64 bit<br />
14
- Download 3utools for windows 7 64 bit free<br />
15
- Download 3utools for windows 7 64 bit latest version<br />
16
- Download 3utools for windows 7 64 bit filehippo<br />
17
- Download 3utools for windows 7 64 bit softonic<br />
18
- Download 3utools for windows 7 64 bit full crack<br />
19
- Download 3utools for windows 7 64 bit offline installer<br />
20
- Download 3utools for windows 7 64 bit from official website<br />
21
- Download 3utools for windows 7 64 bit with jailbreak<br />
22
- Download 3utools for windows 7 64 bit without itunes<br />
23
- Download and install 3utools for windows 7 64 bit<br />
24
- Download and use 3utools for windows 7 64 bit<br />
25
- Download and update 3utools for windows 7 64 bit<br />
26
- Download and backup data with 3utools for windows 7 64 bit<br />
27
- Download and restore data with 3utools for windows 7 64 bit<br />
28
- Best site to download 3utools for windows 7 64 bit<br />
29
- Best alternative to download 3utools for windows 7 64 bit<br />
30
- Best way to download 3utools for windows 7 64 bit<br />
31
- Best tips to download 3utools for windows 7 64 bit<br />
32
- Best guide to download 3utools for windows 7 64 bit<br />
33
- Why download 3utools for windows 7 64 bit<br />
34
- What is download speed of download of download of download of download of download of download of download of download of download of download of download of download of download of download of download of download of download of download of download of download of download of download of download of download of download of download of download of download of download of download of download of download of download ofdownloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed downloading speed</p>
35
- <h2>How to download and install 3uTools for Windows 7 64 bit?</h2>
36
- <p>If you want to use 3uTools on your PC running Windows 7 64 bit, you need to follow these steps:</p>
37
- <h3>Check your system requirements</h3>
38
- <p>Before you download and install 3uTools, make sure that your PC meets the minimum system requirements. According to the official website, you need:</p>
39
- <ul>
40
- <li>A processor of at least 1 GHz (32-bit or 64-bit)</li>
41
- <li>A RAM of at least 1 GB (32-bit) or 2 GB (64-bit)</li>
42
- <li>A hard disk space of at least 16 GB (32-bit) or 20 GB (64-bit)</li>
43
- <li>A graphics device with DirectX 9 or higher</li>
44
- <li>An internet connection <h3>Download the latest version of 3uTools from the official website</h3>
45
- <p>Once you have checked your system requirements, you can download the latest version of 3uTools from the official website. The file size is about 100 MB and it is compatible with Windows 7 64 bit. You can also scan the file with your antivirus software before installing it.</p>
46
- <h3>Run the setup file and follow the instructions</h3>
47
- <p>After you have downloaded the file, you can run it and follow the instructions on the screen. The installation process is simple and fast. You can choose the language, destination folder, and shortcuts for 3uTools. You can also agree to the terms and conditions and privacy policy of 3uTools. Once the installation is complete, you can launch 3uTools from your desktop or start menu.</p>
48
- <h2>How to use 3uTools to manage your iOS device?</h2>
49
- <p>Now that you have installed 3uTools on your PC, you can use it to manage your iOS device. Here are some of the steps that you need to follow:</p>
50
- <h3>Connect your iDevice to your PC with a USB cable or WIFI network</h3>
51
- <p>The first step is to connect your iDevice to your PC with a USB cable or WIFI network. If you use a USB cable, make sure that it is working properly and that your iDevice is unlocked. If you use a WIFI network, make sure that both your PC and iDevice are connected to the same network. You may need to enter a verification code on your iDevice to allow 3uTools to access it.</p>
52
- <h3>View and edit your device information, status, and settings</h3>
53
- <p>Once you have connected your iDevice to your PC, you can view and edit your device information, status, and settings on 3uTools. You can see the basic information of your iDevice, such as the model, serial number, IMEI, UDID, etc. You can also see the detailed information of your iOS version, battery health, jailbreak status, iCloud lock status, etc. You can also change some settings of your iDevice, such as the name, language, region, date and time, etc.</p>
54
- <h3>Backup and restore your data with ease</h3>
55
- <p>Another important feature of 3uTools is that it lets you backup and restore your data with ease. You can backup your data to your PC or iCloud with one click. You can also restore your data from a previous backup or from another iDevice. You can choose what type of data you want to backup or restore, such as contacts, messages, photos, videos, apps, etc. You can also view the backup files on your PC or delete them if you want.</p>
56
- <h2>Conclusion</h2>
57
- <p>In conclusion, 3uTools is a powerful and versatile app for PCs that lets you manage your iOS device data on your Windows 7 64 bit system. You can download and install it for free from the official website. You can also use it to jailbreak your iDevice with one click, download various content, and perform other useful tasks. If you are looking for a simple and effective way to manage your iOS device on your PC, then you should give 3uTools a try.</p>
58
- <h2>FAQs</h2>
59
- <ul>
60
- <li><b>Is 3uTools safe to use?</b></li>
61
- <p>Yes, 3uTools is safe to use as long as you download it from the official website. It does not contain any viruses or malware. However, you should always be careful when jailbreaking your iDevice or downloading content from unknown sources.</p>
62
- <li><b>Does 3uTools support other Windows versions?</b></li>
63
- <p>Yes, 3uTools supports other Windows versions besides Windows 7 64 bit. According to the official website, it supports Windows XP (32-bit), Windows Vista (32-bit/64-bit), Windows 8 (32-bit/64-bit), Windows 8.1 (32-bit/64-bit), Windows 10 (32-bit/64-bit), and Windows Server (2008/2012/2016).</p>
64
- <li><b>Does 3uTools support other iOS devices?</b></li>
65
- <p>Yes, 3uTools supports other iOS devices besides iPad, iPhone, and iPod touch. According to the official website, it supports Apple TV (2nd/4th generation), Apple Watch (Series 1/Series 2/Series 3/Series 4/Series 5), AirPods (1st/2nd generation), HomePod (1st generation), AirTag (1st generation), etc.</p>
66
- <li>< <li><b>What are the advantages and disadvantages of jailbreaking your iDevice?</b></li>
67
- <p>Jailbreaking your iDevice can give you more freedom and customization options, such as installing unofficial apps, tweaks, themes, and more. However, it can also have some drawbacks, such as voiding your warranty, exposing your device to security risks, causing instability or compatibility issues, and requiring frequent updates.</p>
68
- <li><b>How can I update 3uTools to the latest version?</b></li>
69
- <p>You can update 3uTools to the latest version by clicking on the "Check Update" button on the top right corner of the app. You can also enable the automatic update option in the settings. Alternatively, you can download the latest version from the official website and install it over the old one.</p>
70
- </ul></p> 197e85843d<br />
71
- <br />
72
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1phancelerku/anime-remove-background/AR CENA Font - A Charming and Credible Font for Your Designs.md DELETED
@@ -1,176 +0,0 @@
1
-
2
- <h1>How to Download Font AR Cena for Free</h1>
3
- <p>Font AR Cena is a beautiful and versatile typeface that can add a touch of elegance and charm to your designs. Whether you want to use it for headlines, logos, posters, invitations, or any other creative project, you will find that Font AR Cena can make your text stand out and impress your audience. But how can you download Font AR Cena for free? And how can you install and use it on your device? In this article, we will answer these questions and more. We will also tell you what is Font AR Cena, why you should use it, and what are its features and benefits. So, let's get started!</p>
4
- <h2>What is Font AR Cena and Why You Should Use It</h2>
5
- <p>Font AR Cena is a handwritten font family that was created by Arphic Technology Co. in 2005. It has a unique and regular style that mimics the natural handwriting of a person. It is suitable for both formal and informal occasions, as it can convey a sense of personality, warmth, and friendliness. It is also easy to read and has a balanced and harmonic appearance.</p>
6
- <h2>download font ar cena</h2><br /><p><b><b>Download Zip</b> &middot;&middot;&middot; <a href="https://jinyurl.com/2uNThb">https://jinyurl.com/2uNThb</a></b></p><br /><br />
7
- <h3>The History and Design of Font AR Cena</h3>
8
- <p>Font AR Cena was inspired by the lettering of Italian comic books from the 1960s and 1970s. The designers wanted to capture the essence of the comic book culture and create a font that would appeal to both children and adults. They used sharp angles and strong geometric forms to create a font that is dynamic and expressive. They also added some inkling letters and unusual iconography to give the font some character and flair.</p>
9
- <h3>The Features and Benefits of Font AR Cena</h3>
10
- <p>Font AR Cena has many features and benefits that make it a great choice for your designs. Some of them are:</p>
11
- <ul>
12
- <li>It has three weights: light, regular, and bold. You can use them to create contrast and emphasis in your text.</li>
13
- <li>It has 218 characters, including uppercase, lowercase, numerals, punctuation, symbols, and accented letters.</li>
14
- <li>It supports many languages, such as French, Russian, German, Turkish, Italian, Polish, Indonesian, Dutch, Malay, Swahili, Greek, Hungarian, Czech, Haitian Creole, Afrikaans, Somali, Zulu, Serbian, Swedish, Bulgarian, Albanian, Catalan, Chichewa, Ilocano, Kikongo, Neapolitan, Xhosa, Tshiluba, Slovak, Danish, Gikuyu, Finnish, Sotho (Southern), Kirundi, Tswana, Sotho (Northern), Belarusian (Latin), Turkmen (Latin), Bemba, Lombard, Lithuanian, Tsonga, Wolof, Jamaican, Dholuo, Galician, Ganda, Waray-Waray, Makhuwa, Bikol, Kapampangan (Latin).</li>
15
- <li>It is free for personal use only. You can use it in your personal designs and projects without any restrictions.</li>
16
- <li>It is versatile and adaptable. You can use it in different types of design projects, such as logos, headlines, posters, invitations, cards, flyers, brochures, signs, banners, labels, stickers, comics, books, magazines, websites, apps, games, animations, videos, and more.</li>
17
- </ul>
18
- <h3>The Supported Languages and Characters of Font AR Cena</h3>
19
- <p>Font AR Cena supports many languages and characters, as shown in the table below. You can use Font AR Cena to write in different languages and scripts, and enjoy its unique and elegant style.</p>
20
- <table>
21
- <tr>
22
- <th>Language</th>
23
- <th>Script</th>
24
- <th>Characters</th>
25
- </tr>
26
- <tr>
27
- <td>English</td>
28
- <td>Latin</td>
29
- <td>A-Z, a-z, 0-9, !, ?, ., ,, ;, :, ', ", (, ), [, ], , , /, \, |, -, _, +, =, *, &, ^, %, $, #, @, ~, `, <, >, etc.</td>
30
- </tr>
31
- <tr>
32
- <td>French</td>
33
- <td>Latin</td>
34
- <td>A-Z, a-z, 0-9, !, ?, ., ,, ;, :, ', ", (, ), [, ], , , /, \, |, -, _, +, =, *, &, ^, %, $, #, @, ~, `, <, >, À, Â, Æ, Ç, É, È, Ê, Ë, Î, Ï, Ô, Œ, Ù, Û, Ü, Ÿ, à, â, æ, ç, é, è, ê, ë, î, ï, ô, œ, ù, û, ü, ÿ.</td>
35
- </tr>
36
- <tr>
37
- <td>Russian</td>
38
- <td>Cyrillic</td>
39
- <td>A-Z, a-z, 0-9, !, ?, ., ,, ;, :, ', ", (,), [, ], ,, / ,\ ,| ,-, _, + ,= ,* ,& ,^ ,% ,$ ,# ,@ ,~ ,`, < ,>, А-Я а-я Ё ё.</td>
40
- </tr>
41
- <tr>
42
- <td>German</td>
43
- <td>Latin</td>
44
- <td>A-Z a-z 0-9 !, ?, ., ,, ; : ' " ( ) [ ] / \ | - _ + = * & ^ % $ # @ ~ ` < > Ä Ö Ü ß ä ö ü.</td>
45
- </tr>
46
- <tr>
47
- <td>Turkish</td>
48
- <td>Latin</td>
49
- <td>A-Z a-z 0-9 !, ?, ., ,, ; : ' " ( ) [ ] / \ | - _ + = * & ^ % $ # @ ~ ` < > Ç Ğ İ Ö Ş Ü ç ğ ı ö ş ü.</td>
50
- </tr>
51
- <!-- The table continues with more languages and characters -->
52
- </table>
53
- <h2>How to Download Font AR Cena for Free from Different Sources</h2>
54
- <p>If you want to download Font AR Cena for free for your personal use only, you have several options to choose from. There are many websites that offer free fonts for download. However, not all of them are reliable and safe. Some of them may contain viruses or malware that can harm your device or compromise your privacy. Therefore, you should always be careful and check the reputation and reviews of the websites before downloading any font. To help you out, we have selected four trustworthy and reputable sources that offer Font AR Cena for free download. Here they are:</p>
55
- <h3>How to Download Font AR Cena from FontReach</h3>
56
- <p>FontReach is a website that allows you to browse and download thousands of fonts for free. It also provides useful information about each font, such as its popularity, usage statistics, license type, and more. To download Font AR Cena from FontReach, follow these steps:</p>
57
- <p>download font ar cena free for desktop and webfont<br />
58
- download font ar cena family handwritten style<br />
59
- download font ar cena regular otf ttf<br />
60
- download font ar cena with @font-face support<br />
61
- download font ar cena similar to one stroke script<br />
62
- download font ar cena for personal use only<br />
63
- download font ar cena from cufon fonts website<br />
64
- download font ar cena with 218 characters and numerals<br />
65
- download font ar cena for logo design and greeting cards<br />
66
- download font ar cena alternative to viva la vida font<br />
67
- how to download font ar cena on windows and mac<br />
68
- download font ar cena with sharp angles and geometric forms<br />
69
- download font ar cena for display and headline use<br />
70
- download font ar cena with inkling letters and iconography<br />
71
- download font ar cena license and designer information<br />
72
- where to download font ar cena for free online<br />
73
- download font ar cena compatible with photoshop and illustrator<br />
74
- download font ar cena for official use and business cards<br />
75
- download font ar cena preview and test drive<br />
76
- download font ar cena with three weights light regular and bold<br />
77
- best websites to download font ar cena safely<br />
78
- download font ar cena for fabric and textile industries<br />
79
- download font ar cena with balanced and harmonic appearance<br />
80
- download font ar cena for operating systems and software development<br />
81
- download font ar cena supported languages and unicode blocks<br />
82
- how to install and use font ar cena on your device<br />
83
- download font ar cena zip file and extract it<br />
84
- download font ar cena similar to hammer bomb and bee font<br />
85
- download font ar cena reviews and ratings<br />
86
- download font ar cena for game development and animation<br />
87
- how to embed font ar cena to your website or blog<br />
88
- download font ar cena with fancy and cartoon tags<br />
89
- download font ar cena for certificate printing and title design<br />
90
- download font ar cena similar to brushline and scholarly ambition fonts<br />
91
- how to customize and edit font ar cena in your projects<br />
92
- advantages and disadvantages of using font ar cena <br />
93
- how to convert font ar cena to other formats like svg or woff<br />
94
- how to pair font ar cena with other fonts for better design<br />
95
- how to create your own fonts similar to font ar cena <br />
96
- tips and tricks for using font ar cena effectively</p>
97
- <ol>
98
- <li>Go to [FontReach] and type "Font AR Cena" in the search box.</li>
99
- <li>Select the font from the results and click on the "Download" button.</li>
100
- <li>A new tab will open with a download link. Click on the link and save the font file to your device.</li>
101
- <li>You have successfully downloaded Font AR Cena from FontReach. Now you can install and use it on your device.</li>
102
- </ol>
103
- <h3>How to Download Font AR Cena from Cufon Fonts</h3>
104
- <p>Cufon Fonts is another website that offers free fonts for download. It has a large collection of fonts in different categories and styles. It also allows you to preview the fonts before downloading them. To download Font AR Cena from Cufon Fonts, follow these steps:</p>
105
- <ol>
106
- <li>Go to [Cufon Fonts] and type "Font AR Cena" in the search box.</li>
107
- <li>Select the font from the results and click on the "Download" button.</li>
108
- <li>A new tab will open with a download link. Click on the link and save the font file to your device.</li>
109
- <li>You have successfully downloaded Font AR Cena from Cufon Fonts. Now you can install and use it on your device.</li>
110
- </ol>
111
- <h3>How to Download Font AR Cena from Dafont Family</h3>
112
- <p>Dafont Family is another website that offers free fonts for download. It has a huge collection of fonts in various categories and styles. It also allows you to customize the fonts before downloading them. To download Font AR Cena from Dafont Family, follow these steps:</p>
113
- <ol>
114
- <li>Go to [Dafont Family] and type "Font AR Cena" in the search box.</li>
115
- <li>Select the font from the results and click on the "Download" button.</li>
116
- <li>A new tab will open with a download link. Click on the link and save the font file to your device.</li>
117
- <li>You have successfully downloaded Font AR Cena from Dafont Family. Now you can install and use it on your device.</li>
118
- </ol>
119
- <h3>How to Download Font AR Cena from Fontles</h3>
120
- <p>Fontles is another website that offers free fonts for download. It has a curated collection of fonts in different categories and styles. It also allows you to preview the fonts before downloading them. To download Font AR Cena from Fontles, follow these steps:</p>
121
- <ol>
122
- <li>Go to [Fontles] and type "Font AR Cena" in the search box.</li>
123
- <li>Select the font from the results and click on the "Download" button.</li>
124
- <li>A new tab will open with a download link. Click on the link and save the font file to your device.</li>
125
- <li>You have successfully downloaded Font AR Cena from Fontles. Now you can install and use it on your device.</li>
126
- </ol> <h2>How to Install and Use Font AR Cena on Your Device</h2>
127
- <p>After you have downloaded Font AR Cena from one of the sources mentioned above, you need to install and use it on your device. The installation and usage process may vary depending on the type of device and operating system you have. Here are some general guidelines for installing and using Font AR Cena on Windows, Mac, and Linux devices.</p>
128
- <h3>How to Install Font AR Cena on Windows</h3>
129
- <p>To install Font AR Cena on Windows, follow these steps:</p>
130
- <ol>
131
- <li>Locate the font file you have downloaded on your device. It should have a .ttf or .otf extension.</li>
132
- <li>Right-click on the font file and select "Install" from the menu. Alternatively, you can copy and paste the font file to the Fonts folder in your Control Panel.</li>
133
- <li>Wait for the installation to complete. You may need to restart your device for the changes to take effect.</li>
134
- <li>You have successfully installed Font AR Cena on Windows. Now you can use it in any application that supports fonts.</li>
135
- </ol>
136
- <h3>How to Install Font AR Cena on Mac</h3>
137
- <p>To install Font AR Cena on Mac, follow these steps:</p>
138
- <ol>
139
- <li>Locate the font file you have downloaded on your device. It should have a .ttf or .otf extension.</li>
140
- <li>Double-click on the font file to open it in Font Book.</li>
141
- <li>Click on the "Install Font" button at the bottom of the window.</li>
142
- <li>Wait for the installation to complete. You may need to restart your device for the changes to take effect.</li>
143
- <li>You have successfully installed Font AR Cena on Mac. Now you can use it in any application that supports fonts.</li>
144
- </ol>
145
- <h3>How to Install Font AR Cena on Linux</h3>
146
- <p>To install Font AR Cena on Linux, follow these steps:</p>
147
- <ol>
148
- <li>Locate the font file you have downloaded on your device. It should have a .ttf or .otf extension.</li>
149
- <li>Copy and paste the font file to the .fonts folder in your home directory. If you don't have a .fonts folder, you can create one.</li>
150
- <li>Run the command "fc-cache -fv" in a terminal to update the font cache.</li>
151
- <li>You have successfully installed Font AR Cena on Linux. Now you can use it in any application that supports fonts.</li>
152
- </ol> <h3>How to Use Font AR Cena in Different Applications</h3>
153
- <p>After you have installed Font AR Cena on your device, you can use it in different applications that support fonts. For example, you can use Font AR Cena in:</p>
154
- <ul>
155
- <li>Word processors, such as Microsoft Word, Google Docs, LibreOffice Writer, etc.</li>
156
- <li>Graphic design software, such as Adobe Photoshop, Adobe Illustrator, GIMP, Inkscape, etc.</li>
157
- <li>Web design software, such as Adobe Dreamweaver, WordPress, Wix, Squarespace, etc.</li>
158
- <li>Presentation software, such as Microsoft PowerPoint, Google Slides, Prezi, etc.</li>
159
- <li>Video editing software, such as Adobe Premiere Pro, iMovie, Final Cut Pro, etc.</li>
160
- <li>And many more.</li>
161
- </ul>
162
- <p>To use Font AR Cena in any of these applications, you just need to select it from the font menu and apply it to your text. You can also adjust the font size, color, alignment, spacing, and other settings according to your preferences and needs.</p>
163
- <h2>Conclusion</h2>
164
- <p>Font AR Cena is a beautiful and versatile typeface that can add a touch of elegance and charm to your designs. It is inspired by the lettering of Italian comic books and has a unique and regular style that mimics the natural handwriting of a person. It is suitable for both formal and informal occasions, as it can convey a sense of personality, warmth, and friendliness. It is also easy to read and has a balanced and harmonic appearance.</p>
165
- <p>Font AR Cena has many features and benefits that make it a great choice for your designs. It has three weights: light, regular, and bold. It has 218 characters, including uppercase, lowercase, numerals, punctuation, symbols, and accented letters. It supports many languages, such as French, Russian, German, Turkish, Italian, Polish, Indonesian, Dutch, Malay, Swahili, Greek, Hungarian, Czech, Haitian Creole, Afrikaans, Somali, Zulu, Serbian, Swedish, Bulgarian, Albanian, Catalan, Chichewa, Ilocano, Kikongo, Neapolitan, Xhosa, Tshiluba, Slovak, Danish, Gikuyu, Finnish, Sotho (Southern), Kirundi, Tswana Sotho (Northern), Belarusian (Latin), Turkmen (Latin), Bemba Lombard Lithuanian Tsonga Wolof Jamaican Dholuo Galician Ganda Waray-Waray Makhuwa Bikol Kapampangan (Latin). It is free for personal use only. It is versatile and adaptable. You can use it in different types of design projects, such as logos headlines posters invitations cards flyers brochures signs banners labels stickers comics books magazines websites apps games animations videos and more.</p>
166
- <p>You can download Font AR Cena for free from different sources, such as FontReach, Cufon Fonts, Dafont Family, and Fontles. You just need to follow the simple steps we have provided in this article. You can also install and use Font AR Cena on your device easily. You just need to follow the general guidelines we have provided for Windows, Mac, and Linux devices. You can also use Font AR Cena in different applications that support fonts. You just need to select it from the font menu and apply it to your text. You can also adjust the font settings according to your preferences and needs.</p>
167
- <p>We hope you have enjoyed this article and learned how to download Font AR Cena for free. We also hope you will use Font AR Cena in your designs and projects and create amazing and stunning results. If you have any questions or feedback about this article or Font AR Cena, please feel free to leave a comment below. We would love to hear from you!</p>
168
- <h2>FAQs</h2>
169
- <p>Here are some frequently asked questions about Font AR Cena:</p>
170
- <h3>Q: Is Font AR Cena free for commercial use?</h3>
171
- <p>A: No, Font AR Cena is free for personal use only. If you want to use it for commercial purposes, you need to purchase a license from the original creator or distributor of the font.</p>
172
- <h3>Q: How can I contact the creator or distributor of Font AR Cena?</h3>
173
- <p>A: You can contact the creator or distributor of Font AR Cena by visiting their website or social media pages. <p>According to the web search results, the creator of Font AR Cena is Arphic Technology Co., a Taiwanese company that specializes in font design and development. The distributor of Font AR Cena is Microsoft Corporation, as the font is included in the Microsoft Office suite and other Microsoft products. The license price of Font AR Cena depends on the type and scope of use. For personal use, the font is free and can be downloaded from various sources, as we have shown in this article. For commercial use, the font requires a license from the original creator or distributor. The license price may vary depending on the number of users, devices, projects, and platforms. To find out more about the license price and terms of Font AR Cena, you can contact Arphic Technology Co. or Microsoft Corporation through their websites or social media pages.</p>
174
- <p>We hope this article has helped you learn how to download Font AR Cena for free and use it in your designs and projects. If you have any questions or feedback about this article or Font AR Cena, please feel free to leave a comment below. We would love to hear from you!</p> 197e85843d<br />
175
- <br />
176
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1phancelerku/anime-remove-background/Download Komodo 13 Chess Engine The Most Advanced and Reliable Chess Software.md DELETED
@@ -1,140 +0,0 @@
1
- <br />
2
- <h1>Download Komodo 13 Chess Engine: A Guide for Chess Enthusiasts</h1>
3
- <p>If you are a chess lover who wants to improve your skills and enjoy the game more, you might be interested in downloading a chess engine. A chess engine is a software program that can play and analyze chess, giving you feedback and suggestions on the best moves. One of the most popular and powerful chess engines available today is Komodo 13, which is developed by a team of experts led by Grandmaster Larry Kaufman. In this article, we will show you what Komodo 13 is, what features and benefits it offers, how to download and install it on your device, how to use it for chess analysis and training, and how to compare it with other chess engines.</p>
4
- <h2>What is Komodo 13 Chess Engine?</h2>
5
- <p>Komodo 13 is the latest release of this prize-winning chess engine that has won many prestigious titles, such as the World Computer Chess Championship, the World Chess Software Championship, and the TCEC Championship. Komodo 13 is an improvement over all previous versions and supports multi-core processors (32- and 64-bit) and endgame tablebases. It also has an optional Monte Carlo Tree Search mode that uses a neural network to evaluate positions. Komodo 13 is compatible with most chess GUIs (graphical user interfaces) that support the UCI (universal chess interface) protocol. A chess GUI is a program that allows you to interact with the chess engine, such as setting up the board, starting a game, adjusting the settings, etc. Some examples of chess GUIs are ChessBase, Arena, DroidFish, Analyze This, etc.</p>
6
- <h2>download komodo 13 chess engine</h2><br /><p><b><b>Download File</b> ===== <a href="https://jinyurl.com/2uNMn9">https://jinyurl.com/2uNMn9</a></b></p><br /><br />
7
- <h3>Features and benefits of Komodo 13</h3>
8
- <p>Some of the features and benefits of using Komodo 13 are:</p>
9
- <ul>
10
- <li>It has a very high level of playing strength, estimated at over 3000 Elo rating.</li>
11
- <li>It has a very accurate evaluation function that considers many positional factors, such as pawn structure, king safety, mobility, etc.</li>
12
- <li>It has a very fast and efficient search function that can calculate millions of possible moves per second.</li>
13
- <li>It has a very large opening book that contains thousands of well-known and modern variations.</li>
14
- <li>It has a very comprehensive endgame knowledge that uses Syzygy tablebases to find the best moves in any endgame position with up to seven pieces.</li>
15
- <li>It has a very flexible skill setting that allows you to adjust the playing strength of the engine according to your level.</li>
16
- <li>It has a very unique personality feature that allows you to choose from different playing styles, such as aggressive, defensive, human-like, etc.</li>
17
- <li>It has a very innovative Monte Carlo mode that uses a neural network to evaluate positions in a probabilistic way.</li>
18
- </ul>
19
- <h3>How to download and install Komodo 13 on your device</h3>
20
- <p>There are two main ways to download Komodo 13: from Google Play Store or from the official website. Depending on your device and preference, you can choose either option. Here are the steps for each method:</p>
21
- <h4>Downloading Komodo 13 from Google Play Store</h4>
22
- <p>If you have an Android device, you can download Komodo 13 from Google Play Store for $4.99. Here are the steps:</p>
23
- <ol>
24
- <li>Open Google Play Store on your device <li>Search for Komodo 13 Chess Engine and tap on it</li>
25
- <li>Tap on the Install button and wait for the download to complete</li>
26
- <li>Tap on the Open button to launch the app</li>
27
- <li>You can now use Komodo 13 as a standalone app or with any compatible chess GUI</li>
28
- </ol>
29
- <h4>Downloading Komodo 13 from the official website</h4>
30
- <p>If you have a Windows, Mac, or Linux device, you can download Komodo 13 from the official website for $59.99. Here are the steps:</p>
31
- <p>download komodo 13 chess engine for android<br />
32
- download komodo 13 chess engine free<br />
33
- download komodo 13 chess engine with monte carlo tree search<br />
34
- download komodo 13 chess engine apk<br />
35
- download komodo 13 chess engine for windows<br />
36
- download komodo 13 chess engine with endgame tablebases<br />
37
- download komodo 13 chess engine latest version<br />
38
- download komodo 13 chess engine for mac<br />
39
- download komodo 13 chess engine with personalities<br />
40
- download komodo 13 chess engine full version<br />
41
- download komodo 13 chess engine review<br />
42
- download komodo 13 chess engine for linux<br />
43
- download komodo 13 chess engine with skill setting<br />
44
- download komodo 13 chess engine crack<br />
45
- download komodo 13 chess engine tutorial<br />
46
- download komodo 13 chess engine for pc<br />
47
- download komodo 13 chess engine comparison<br />
48
- download komodo 13 chess engine for ios<br />
49
- download komodo 13 chess engine with book moves option<br />
50
- download komodo 13 chess engine serial key<br />
51
- download komodo 13 chess engine guide<br />
52
- download komodo 13 chess engine for ipad<br />
53
- download komodo 13 chess engine vs stockfish<br />
54
- download komodo 13 chess engine for iphone<br />
55
- download komodo 13 chess engine with multi-core support<br />
56
- download komodo 13 chess engine tips<br />
57
- download komodo 13 chess engine for laptop<br />
58
- download komodo 13 chess engine vs leela zero<br />
59
- download komodo 13 chess engine for kindle fire<br />
60
- download komodo 13 chess engine with grandmaster evaluation<br />
61
- download komodo 13 chess engine tricks<br />
62
- download komodo 13 chess engine for chromebook<br />
63
- download komodo 13 chess engine vs houdini<br />
64
- download komodo 13 chess engine for android tv<br />
65
- download komodo 13 chess engine with world champion titles<br />
66
- download komodo 13 chess engine best settings<br />
67
- download komodo 13 chess engine for raspberry pi<br />
68
- download komodo 13 chess engine vs dragon by komodo <br />
69
- download komodo 13 chess engine for fire tablet <br />
70
- download komodo 13 chess engine with uci protocol</p>
71
- <ol>
72
- <li>Open your web browser and go to <a href="">https://komodochess.com/</a></li>
73
- <li>Click on the Buy Now button and choose your preferred payment method</li>
74
- <li>After completing the payment, you will receive an email with a download link and a license key</li>
75
- <li>Click on the download link and save the file to your device</li>
76
- <li>Extract the file and run the setup program</li>
77
- <li>Enter your license key when prompted and follow the instructions to complete the installation</li>
78
- <li>You can now use Komodo 13 with any compatible chess GUI</li>
79
- </ol>
80
- <h4>Installing Komodo 13 on a chess GUI</h4>
81
- <p>If you want to use Komodo 13 with a chess GUI, you need to install it as an engine. The exact steps may vary depending on the chess GUI you are using, but here is a general guide:</p>
82
- <ol>
83
- <li>Open your chess GUI and go to the engine menu</li>
84
- <li>Select the option to add a new engine or manage engines</li>
85
- <li>Browse to the folder where you installed Komodo 13 and select the executable file (usually komodo-13.exe or komodo-13-mcts.exe)</li>
86
- <li>Name the engine as Komodo 13 or Komodo 13 MCTS depending on which version you are using</li>
87
- <li>Save the settings and activate the engine</li>
88
- <li>You can now use Komodo 13 as an engine for playing or analyzing chess</li>
89
- </ol>
90
- <h3>How to use Komodo 13 for chess analysis and training</h3>
91
- <p>Komodo 13 is a very useful tool for chess analysis and training. You can use it to improve your understanding of chess, find mistakes in your games, learn new ideas, practice different scenarios, etc. Here are some ways to use Komodo 13 for chess analysis and training:</p>
92
- <h4>Setting up the engine parameters</h4>
93
- <p>Before using Komodo 13, you may want to adjust some of the engine parameters to suit your needs and preferences. Some of the parameters you can change are:</p>
94
- <ul>
95
- <li>The number of cores or threads that the engine can use (more cores means faster and deeper search, but also more CPU usage)</li>
96
- <li>The hash size or memory that the engine can use (more hash means better transposition table, but also more RAM usage)</li>
97
- <li>The contempt factor or how much the engine prefers winning positions over drawing positions (higher contempt means more aggressive play, but also more risk-taking)</li>
98
- <li>The skill level or how strong the engine plays (lower skill level means more human-like play, but also more mistakes)</li>
99
- <li>The personality or how the engine plays in terms of style, opening choice, etc. (you can choose from predefined personalities or create your own)</li>
100
- <li>The Monte Carlo mode or how the engine uses a neural network to evaluate positions (you can enable or disable this mode, or adjust its parameters such as temperature, visits, etc.)</li>
101
- </ul>
102
- <p>You can change these parameters from your chess GUI or from a configuration file that comes with Komodo 13. You can also save different profiles for different purposes.</p>
103
- <h4>Analyzing your games and positions with Komodo 13</h4>
104
- <p>One of the most common ways to use Komodo 13 is to analyze your games and positions with it. You can do this by loading your games or positions from a PGN (portable game notation) file or by setting up the board manually. Then you can ask Komodo 13 to evaluate the position and show you the best moves and variations. You can also compare your moves with Komodo 13's moves and see where you made mistakes or missed opportunities. You can also ask Komodo 13 to give you hints, explanations, comments, etc. You can also use features such as blunder check, game annotation, position evaluation graph, etc.</p>
105
- <h4>Playing against Komodo 13 with different skill levels and personalities</h4>
106
- <p>Another way to use Komodo 13 is to play against it with different skill levels and personalities. You can do this by starting a new game with Komodo 13 as an engine and choosing the skill level and personality from the engine parameters. You can also adjust the time control, handicap, color, etc. Playing against Komodo 13 can help you practice your chess skills, test your knowledge, challenge yourself, and have fun. You can also analyze your games afterwards and learn from your mistakes and Komodo 13's moves.</p>
107
- <h3>How to compare Komodo 13 with other chess engines</h3>
108
- <p>Komodo 13 is not the only chess engine available in the market. There are many other chess engines that have different features, strengths, and weaknesses. You may want to compare Komodo 13 with other chess engines to see how they perform, what they can do, and which one suits you better. Here are some ways to compare Komodo 13 with other chess engines:</p>
109
- <h4>Using rating lists and tournaments</h4>
110
- <p>One way to compare Komodo 13 with other chess engines is to use rating lists and tournaments. Rating lists are tables that rank chess engines based on their playing strength, measured by their Elo rating. Tournaments are events where chess engines play against each other under certain conditions and rules. You can find many rating lists and tournaments online, such as CCRL, CEGT, TCEC, etc. You can use these sources to see how Komodo 13 compares with other chess engines in terms of playing strength, performance, results, etc.</p>
111
- <h4>Using engine matches and tests</h4>
112
- <p>Another way to compare Komodo 13 with other chess engines is to use engine matches and tests. Engine matches are games where you pit two or more chess engines against each other and see who wins. Engine tests are tasks where you ask two or more chess engines to solve certain problems or positions and see who does better. You can conduct your own engine matches and tests using your chess GUI and setting up the parameters as you wish. You can use these methods to see how Komodo 13 compares with other chess engines in terms of accuracy, speed, style, etc.</p>
113
- <h4>Using neural network engines</h4>
114
- <p>A special case of comparing Komodo 13 with other chess engines is to use neural network engines. Neural network engines are a new type of chess engines that use artificial intelligence and machine learning to play and analyze chess. They do not rely on traditional evaluation functions or search algorithms, but instead learn from data and experience. Some examples of neural network engines are AlphaZero, Leela Chess Zero, Stockfish NNUE, etc. You can use these engines to see how Komodo 13 compares with them in terms of playing strength, evaluation method, innovation, etc.</p>
115
- <h2>Conclusion</h2>
116
- <p>Komodo 13 is a powerful and versatile chess engine that can help you improve your chess skills and enjoy the game more. It has many features and benefits that make it one of the best chess engines in the world. You can download and install Komodo 13 on your device easily and use it with any compatible chess GUI. You can also use Komodo 13 for chess analysis and training by adjusting the engine parameters, analyzing your games and positions, playing against it with different skill levels and personalities, etc. You can also compare Komodo 13 with other chess engines by using rating lists and tournaments, engine matches and tests, neural network engines, etc.</p>
117
- <h3>FAQs</h3>
118
- <p>Here are some frequently asked questions about Komodo 13:</p>
119
- <ul>
120
- <li><b>Q: How much does Komodo 13 cost?</b></li>
121
- <li>A: Komodo 13 costs $59.99 for Windows, Mac, or Linux devices, and $4.99 for Android devices.</li>
122
- <li><b>Q: How can I update Komodo 13?</b></li>
123
- <li>A: You can update Komodo 13 by downloading the latest version from the official website or Google Play Store.</li>
124
- <li><b>Q: How can I contact the developers of Komodo 13?</b></li>
125
- <li>A: You can contact the developers of Komodo 13 by sending an email to <a href="mailto:[email protected]">[email protected]</a>.</li>
126
- <li><b>Q: What are the system requirements for Komodo 13?</b></li>
127
- <li>A: The system requirements for Komodo 13 are:</li>
128
- <ul>
129
- <li>A device running Windows XP or later, Mac OS X 10.6 or later, Linux x64 or later, or Android 4.1 or later</li>
130
- <li>A processor supporting SSE4.1 instruction set (for MCTS mode)</li>
131
- <li>At least 2 GB of RAM (more recommended)</li>
132
- <li>At least 100 MB of free disk space</li>
133
- <li>A compatible chess GUI </ul>
134
- </ul>
135
- <li><b>Q: What are the differences between Komodo 13 and Komodo 13 MCTS?</b></li>
136
- <li>A: Komodo 13 is the standard version of the engine that uses a traditional alpha-beta search algorithm. Komodo 13 MCTS is the experimental version of the engine that uses a Monte Carlo Tree Search algorithm with a neural network. Komodo 13 MCTS is more creative and dynamic, but also more unpredictable and risky.</li>
137
- </ul>
138
- <p>I hope you found this article helpful and informative. If you have any questions or feedback, please feel free to leave a comment below. Thank you for reading and happy chess playing!</p> 401be4b1e0<br />
139
- <br />
140
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1phancelerku/anime-remove-background/Experience Ninja Arashi 2 in a New Way with APK Mod Download.md DELETED
@@ -1,146 +0,0 @@
1
-
2
- <h1>Download Ninja Arashi 2 APK Mod: A Stealth, Hack, and Slash Game</h1>
3
- <p>Are you a fan of ninja games? Do you like stealth, hack, and slash games? If yes, then you should try Ninja Arashi 2, a thrilling action-adventure game that will test your skills and reflexes. In this article, we will tell you everything you need to know about this game, including what it is, what are its features, how to download its mod version, how to play it, and some FAQs.</p>
4
- <h2>What is Ninja Arashi 2?</h2>
5
- <p>Ninja Arashi 2 is a game developed by Black Panther, a studio that specializes in creating ninja games. It is a sequel to the first Ninja Arashi game, which was released in 2017 and received positive reviews from players and critics. Here are some of the aspects of Ninja Arashi 2 that make it an exciting game.</p>
6
- <h2>download ninja arashi 2 apk mod</h2><br /><p><b><b>Download Zip</b> &#10084;&#10084;&#10084; <a href="https://jinyurl.com/2uNJNt">https://jinyurl.com/2uNJNt</a></b></p><br /><br />
7
- <h3>A sequel to the first Ninja Arashi game</h3>
8
- <p>Ninja Arashi 2 continues the legacy of the first ninja game. In this episode, you play as the raging Arashi, who finally escapes from the frozen prison which was created by Dosu, a cruel evil shadow demon. Arashi continues his pursuit after Dosu to rescue his son and unveil the shadow behind Dosu's plan. However, the journey will be much more challenging this time.</p>
9
- <h3>A 2D action-adventure game with stealth, hacking, and slashing elements</h3>
10
- <p>Ninja Arashi 2 features simple yet addicting gameplay, giving you thrilling moments and unexpected experiences. The game is focused on 2D fighting with aspects of stealth, hacking, and slashing. You have to use your ninja skills and weapons to overcome obstacles, enemies, and traps that are set for you. You can also use stealth to deceive your enemies and gain an advantage over them.</p>
11
- <h3>A story of a ninja who escapes from prison and tries to rescue his son from an evil demon</h3>
12
- <p>Ninja Arashi 2 has a compelling story that will keep you hooked until the end. The game has four acts in story mode with 80 stages to complete. Each stage has its own objectives and challenges that you have to accomplish. Along the way, you will encounter new terrains, environments, enemies, and bosses that will test your limits. You will also learn more about Arashi's past and his relationship with his son.</p>
13
- <h2>What are the features of Ninja Arashi 2?</h2>
14
- <p>Ninja Arashi 2 has many features that make it a fun and enjoyable game. Here are some of them:</p>
15
- <h3>Challenging platformer with 80 stages to complete</h3>
16
- <p>Ninja Arashi 2 is not an easy game. It requires skill, patience, and strategy to complete each stage. The game has various levels of difficulty that will challenge your abilities. You have to deal with different types of obstacles, such as traps, spikes, saws, fireballs, lasers, etc. You also have to face different kinds of enemies, such as ninjas, samurais, archers, demons, etc. You have to use your skills and weapons to defeat them and reach the end of each stage.</p>
17
- <p>download ninja arashi 2 mod apk unlimited money<br />
18
- ninja arashi 2 apk mod free download for android<br />
19
- how to download ninja arashi 2 mod apk latest version<br />
20
- ninja arashi 2 mod apk download link<br />
21
- download ninja arashi 2 hack mod apk<br />
22
- ninja arashi 2 mod apk offline download<br />
23
- ninja arashi 2 mod apk android 1 download<br />
24
- download game ninja arashi 2 mod apk<br />
25
- ninja arashi 2 full mod apk download<br />
26
- ninja arashi 2 mod menu apk download<br />
27
- download ninja arashi 2 premium mod apk<br />
28
- ninja arashi 2 mod apk rexdl download<br />
29
- ninja arashi 2 mega mod apk download<br />
30
- download ninja arashi 2 mod apk revdl<br />
31
- ninja arashi 2 god mode mod apk download<br />
32
- download ninja arashi 2 unlimited coins mod apk<br />
33
- ninja arashi 2 mod apk no ads download<br />
34
- ninja arashi 2 mod apk all levels unlocked download<br />
35
- download ninja arashi 2 pro mod apk<br />
36
- ninja arashi 2 mod apk unlimited gems download<br />
37
- download cheat ninja arashi 2 mod apk<br />
38
- ninja arashi 2 mod apk unlimited health download<br />
39
- ninja arashi 2 hack version mod apk download<br />
40
- download ninja arashi 2 cracked mod apk<br />
41
- ninja arashi 2 unlimited everything mod apk download<br />
42
- download ninja arashi 2 vip mod apk<br />
43
- ninja arashi 2 mod apk no root download<br />
44
- ninja arashi 2 unlimited skills mod apk download<br />
45
- download ninja arashi 2 original mod apk<br />
46
- ninja arashi 2 high damage mod apk download<br />
47
- download ninja arashi 2 unlocked mod apk<br />
48
- ninja arashi 2 one hit kill mod apk download<br />
49
- download ninja arashi 2 super mod apk<br />
50
- ninja arashi 2 no cooldown mod apk download<br />
51
- download ninja arashi 2 extreme mod apk<br />
52
- ninja arashi 2 infinite ammo mod apk download<br />
53
- download ninja arashi 2 ultimate mod apk<br />
54
- ninja arashi 2 all weapons unlocked mod apk download<br />
55
- download ninja arashi 2 best mod apk<br />
56
- ninja arashi 2 easy win mod apk download</p>
57
- <h3>New melee weapon and new mechanics</h3>
58
- <p>Ninja Arashi 2 introduces a new melee weapon for Arashi: the katana. The katana is a powerful sword that can slash through enemies and obstacles. You can also use it to deflect projectiles and perform special attacks. The game also has new mechanics that add more variety and fun to the gameplay. For example, you can use the grappling hook to swing across gaps, the shuriken to hit distant targets, the smoke bomb to create a diversion, and the kunai to climb walls.</p>
59
- <h3>A skill tree system and an artifact system to upgrade your ninja skills</h3>
60
- <p>Ninja Arashi 2 allows you to customize and improve your ninja skills according to your preference and playstyle. The game has a skill tree system that lets you unlock and upgrade different skills, such as health, damage, speed, stealth, etc. You can also collect and equip artifacts that give you passive bonuses and effects, such as increased critical chance, reduced cooldown, extra gold, etc. You can find artifacts by exploring the stages or by purchasing them from the shop.</p>
61
- <h3>Beautiful graphics and scenery with shadow silhouette style</h3>
62
- <p>Ninja Arashi 2 has stunning graphics and scenery that create a captivating atmosphere for the game. The game uses a shadow silhouette style that gives it a unique and artistic look. The game also has diverse and detailed environments that change according to the act and the stage. You will see different landscapes, such as forests, mountains, temples, caves, etc. The game also has dynamic lighting and shadow effects that enhance the visual quality of the game.</p>
63
- <h3>Epic ninja vs boss fights</h3>
64
- <p>Ninja Arashi 2 has epic ninja vs boss fights that will challenge your skills and reflexes. The game has four acts in story mode, and each act has a final boss that you have to defeat. The bosses are powerful enemies that have different abilities and patterns that you have to learn and counter. You have to use your weapons, skills, and strategies to overcome them and advance to the next act.</p>
65
- <h2>How to download Ninja Arashi 2 APK Mod?</h2>
66
- <p>Ninja Arashi 2 is available for free on Google Play Store for Android devices. However, if you want to enjoy some extra benefits and features, you can download the mod version of the game. Here are some of the benefits of downloading the mod version:</p>
67
- - You can get unlimited money and diamonds that you can use to buy items from the shop or upgrade your skills. - You can get unlimited skill points that you can use to unlock and upgrade all the skills in the skill tree. - You can get unlimited artifacts that you can equip to boost your ninja abilities. - You can get all the stages unlocked so you can play any stage you want without any restriction. <p>If you are interested in downloading the mod version of Ninja Arashi 2, here are the steps to follow:</p>
68
- - First, you need to uninstall the original version of Ninja Arashi 2 from your device if you have it installed. - Second, you need to enable unknown sources on your device settings. This will allow you to install apps from sources other than Google Play Store. - Third, you need to download the mod APK file from a reliable website. You can search for "Ninja Arashi 2 APK Mod" on Google or any other search engine and choose a website that has good reviews and ratings. - Fourth, you need to locate the downloaded file on your device storage and tap on it to install it. - Fifth, you need to wait for the installation process to finish and then launch the game. <p>That's it! You have successfully downloaded and installed Ninja Arashi 2 APK Mod on your device. Now you can enjoy playing the game with all the benefits and features of the mod version.</p>
69
- <h2>How to play Ninja Arashi 2?</h2>
70
- <p>Ninja Arashi 2 is a simple yet challenging game that requires skill, patience, and strategy. Here are some of the basic controls and gameplay tips that will help you play the game:</p>
71
- <h3>The basic controls and gameplay</h3>
72
- <p>Ninja Arashi 2 has easy-to-use controls that let you move, jump, attack, use items, etc. Here are some of the controls:</p>
73
- <table>
74
- <tr>
75
- <th>Control</th>
76
- <th>Function</th>
77
- </tr>
78
- <tr>
79
- <td>Left arrow</td>
80
- <td>Move left</td>
81
- </tr>
82
- <tr>
83
- <td>Right arrow</td>
84
- <td>Move right</td>
85
- </tr>
86
- <tr>
87
- <td>Up arrow</td>
88
- <td>Jump</td>
89
- </ <tr>
90
- <td>Down arrow</td>
91
- <td>Crouch</td>
92
- </tr>
93
- <tr>
94
- <td>A button</td>
95
- <td>Attack with katana</td>
96
- </tr>
97
- <tr>
98
- <td>B button</td>
99
- <td>Use shuriken</td>
100
- </tr>
101
- <tr>
102
- <td>C button</td>
103
- <td>Use grappling hook</td>
104
- </tr>
105
- <tr>
106
- <td>D button</td>
107
- <td>Use smoke bomb</td>
108
- </tr>
109
- <tr>
110
- <td>E button</td>
111
- <td>Use kunai</td>
112
- </tr>
113
- <tr>
114
- <td>F button</td>
115
- <td>Use special attack</td>
116
- </tr>
117
- <tr>
118
- <td>G button</td>
119
- <td>Pause the game</td>
120
- </tr>
121
- <tr>
122
- <td>H button</td>
123
- <td>Show the skill tree and the artifact system</td>
124
- </tr>
125
- </table>
126
- <p>The gameplay of Ninja Arashi 2 is based on stealth, hacking, and slashing. You have to use your ninja skills and weapons to overcome obstacles, enemies, and traps that are set for you. You can also use stealth to deceive your enemies and gain an advantage over them. You have to complete each stage by reaching the end or by fulfilling the objectives. You can also collect gold and diamonds that you can use to buy items from the shop or upgrade your skills.</p>
127
- <h3>The tips and tricks to master the game</h3>
128
- <p>Ninja Arashi 2 is a challenging game that requires skill, patience, and strategy. Here are some of the tips and tricks that will help you master the game:</p>
129
- - Be aware of your surroundings. Look for hidden paths, secrets, and items that can help you in your journey. Also, watch out for traps, spikes, saws, fireballs, lasers, etc. that can harm you or block your way. - Be stealthy. Use the shadows and the environment to hide from your enemies. You can also use smoke bombs to create a diversion or kunai to climb walls. Avoid unnecessary fights and try to sneak past your enemies or take them out silently. - Be smart. Use your weapons and skills wisely. You have a limited amount of shuriken, grappling hook, smoke bomb, and kunai that you can use in each stage. You also have a special attack that you can use once in a while. Choose the best weapon and skill for each situation and enemy. - Be agile. Use your movement and jumping skills to dodge attacks, avoid obstacles, and reach high places. You can also use the grappling hook to swing across gaps or the kunai to stick to walls. You can also perform wall jumps and double jumps to enhance your mobility. - Be strategic. Use the skill tree system and the artifact system to upgrade your ninja skills according to your preference and playstyle. You can unlock and upgrade different skills, such as health, damage, speed, stealth, etc. You can also collect and equip artifacts that give you passive bonuses and effects, such as increased critical chance, reduced cooldown, extra gold, etc. <h3>The best skills and artifacts to use in the game</h3>
130
- <p>Ninja Arashi 2 has a skill tree system and an artifact system that let you customize and improve your ninja skills according to your preference and playstyle. Here are some of the best skills and artifacts to use in the game:</p>
131
- - Health: This skill increases your maximum health points, which means you can survive more hits from enemies and traps. This is a useful skill for beginners who are not familiar with the game mechanics or for players who prefer a more defensive playstyle. - Damage: This skill increases your damage output with your katana and shuriken, which means you can kill enemies faster and easier. This is a useful skill for players who prefer a more offensive playstyle or who want to finish stages quickly. - Speed: This skill increases your movement speed, which means you can run faster and jump farther. This is a useful skill for players who want to explore more of the stages or who want to avoid enemies and traps more easily. - Stealth: This skill increases your stealth ability, which means you can stay hidden longer in the shadows and reduce the noise you make when moving or attacking. This is a useful skill for players who want to use stealth as their main strategy or who want to avoid unnecessary fights. - Critical Chance: This artifact increases your chance of landing a critical hit with your katana or shuriken, which means you can deal more damage with each hit. This is a useful artifact for players who want to maximize their damage output or who want to kill enemies with fewer hits. - Cooldown Reduction: This artifact reduces the cooldown time of your weapons and skills, which means you can use them more frequently in each stage. This is a useful artifact for players who want to use their weapons and skills more often or who want to have more options in combat. - Gold Bonus: This artifact increases the amount of gold you earn from killing enemies or collecting gold from the stages, which means you can buy more items from the shop or upgrade your skills more easily. This is a useful artifact for players who want to have more resources or who want to improve their ninja skills faster. <h2>Conclusion</h2>
132
- <p>Ninja Arashi 2 is a thrilling action-adventure game that will test your skills and reflexes. It is a sequel to the first Ninja Arashi game, which was a hit among ninja game fans. It has a compelling story, challenging gameplay, stunning graphics, and many features that make it a fun and enjoyable game. You can download the game for free from Google Play Store or you can download the mod version to enjoy some extra benefits and features. If you are looking for a stealth, hack, and slash game that will keep you hooked for hours, then Ninja Arashi 2 is the game for you.</p>
133
- <h2>FAQs</h2>
134
- <p>Here are some of the frequently asked questions about Ninja Arashi 2:</p>
135
- <h3>Q: Is Ninja Arashi 2 safe to download and play?</h3>
136
- <p>A: Yes, Ninja Arashi 2 is safe to download and play. The game does not contain any viruses, malware, or spyware that can harm your device or your privacy. However, if you download the mod version of the game, make sure you download it from a reliable website and scan it with an antivirus before installing it.</p>
137
- <h3>Q: Is Ninja Arashi 2 compatible with my device?</h3>
138
- <p>A: Ninja Arashi 2 is compatible with most Android devices that have Android 4.4 or higher. However, some devices may experience lagging or crashing issues due to low memory or performance. If you encounter any problems while playing the game, try lowering the graphics quality or closing other apps running in the background.</p>
139
- <h3>Q: How can I save my progress in Ninja Arashi 2?</h3>
140
- <p>A: Ninja Arashi 2 has an auto-save feature that saves your progress every time you complete a stage or exit the game. You can also manually save your progress by tapping on the G button and then tapping on the save icon. You can also load your saved progress by tapping on the load icon.</p>
141
- <h3>Q: How can I contact the developer of Ninja Arashi 2?</h3>
142
- <p>A: If you have any questions, feedback, or suggestions about Ninja Arashi 2, you can contact the developer of the game by sending an email to [email protected]. You can also follow them on Facebook and Instagram to get the latest news and updates about the game.</p>
143
- <h3>Q: How can I support the developer of Ninja Arashi 2?</h3>
144
- <p>A: If you like Ninja Arashi 2 and want to support the developer of the game, you can do so by rating and reviewing the game on Google Play Store, sharing it with your friends and family, or making an in-app purchase to remove ads or buy more items.</p> 401be4b1e0<br />
145
- <br />
146
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1phancelerku/anime-remove-background/Free 3D Models Download or Edit Online Clara.io.md DELETED
@@ -1,133 +0,0 @@
1
-
2
- <h1>3D Objects Free: How to Find and Download Them for Your Projects</h1>
3
- <p>If you are working on a project that involves 3D graphics, animation, or visualization, you might be looking for some free 3D objects to use. 3D objects are digital representations of physical objects that can be displayed and manipulated in three dimensions. They can be used for various purposes, such as creating realistic scenes, enhancing user interfaces, simulating physical phenomena, or telling stories.</p>
4
- <h2>3d objects free</h2><br /><p><b><b>Download File</b> ===> <a href="https://jinyurl.com/2uNLoa">https://jinyurl.com/2uNLoa</a></b></p><br /><br />
5
- <h2>What are 3D Objects and Why Use Them?</h2>
6
- <p>3D objects are composed of vertices, edges, and faces that define their shape and appearance. They can also have textures, materials, colors, lighting, and animations that add more details and effects. 3D objects can be created using specialized software, such as Blender, Maya, or SketchUp, or scanned from real-world objects using cameras or sensors.</p>
7
- <h3>The Benefits of Using 3D Objects in Your Projects</h3>
8
- <p>Using 3D objects in your projects can have many benefits, such as:</p>
9
- <ul>
10
- <li>Improving the visual quality and realism of your graphics and animations</li>
11
- <li>Increasing the interactivity and engagement of your users and audiences</li>
12
- <li>Reducing the time and cost of creating your own 3D objects from scratch</li>
13
- <li>Expanding your creative possibilities and options</li>
14
- </ul>
15
- <h3>The Challenges of Creating 3D Objects from Scratch</h3>
16
- <p>However, creating your own 3D objects from scratch can also have some challenges, such as:</p>
17
- <ul>
18
- <li>Requiring a lot of skill, knowledge, and experience in 3D modeling and design</li>
19
- <li>Taking a lot of time and effort to produce high-quality and realistic results</li>
20
- <li>Needing a lot of resources and equipment to scan or capture real-world objects</li>
21
- <li>Facing legal or ethical issues when using or modifying existing 3D objects without permission or attribution</li>
22
- </ul>
23
- <h2>Where to Find Free 3D Objects Online</h2>
24
- <p>Fortunately, there are many online sources where you can find free 3D objects that you can use for your projects. These sources can be divided into two main categories: websites and libraries.</p>
25
- <h3>Free 3D Models Websites</h3>
26
- <p>These are websites that offer a large collection of free 3D models that you can browse, download, and use. Some examples are:</p>
27
- <p>free 3d models download<br />
28
- free 3d assets for games<br />
29
- free 3d characters and creatures<br />
30
- free 3d cars and vehicles<br />
31
- free 3d weapons and military<br />
32
- free 3d scans and photogrammetry<br />
33
- free 3d handpainted textures<br />
34
- free 3d pbr materials<br />
35
- free 3d medieval and fantasy<br />
36
- free 3d electronics and gadgets<br />
37
- free 3d robots and mechs<br />
38
- free 3d furniture and decorations<br />
39
- free 3d architecture and buildings<br />
40
- free 3d city and environment<br />
41
- free 3d low poly and stylized<br />
42
- free 3d sci-fi and space<br />
43
- free 3d anime and manga<br />
44
- free 3d cartoon and comic<br />
45
- free 3d horror and zombie<br />
46
- free 3d plants and trees<br />
47
- free 3d animals and pets<br />
48
- free 3d dinosaurs and prehistoric<br />
49
- free 3d humanoids and aliens<br />
50
- free 3d rigged and animated<br />
51
- free 3d printable and sculptable<br />
52
- free 3d blender models<br />
53
- free 3d obj models<br />
54
- free 3d fbx models<br />
55
- free 3d max models<br />
56
- free 3d maya models<br />
57
- free 3d c4d models<br />
58
- free 3d unity models<br />
59
- free 3d unreal models<br />
60
- free 3d sketchfab models<br />
61
- free 3d cgtrader models<br />
62
- free 3d turbosquid models<br />
63
- free 3d artstation models<br />
64
- free 3d mixamo models<br />
65
- free 3d quixel models<br />
66
- free 3d substance models<br />
67
- royalty-free 3d models<br />
68
- creative commons license 3d models <br />
69
- high quality 3d models for free <br />
70
- realistic 3d models for free <br />
71
- best sites for free 3d models <br />
72
- how to get free 3d models <br />
73
- where to find free 3d models <br />
74
- tips for creating free 3d models <br />
75
- tutorials for making free 3d models</p>
76
- <h4>Free3D.com</h4>
77
- <p>This is a website that hosts over 15,000 free 3D models in various formats, such as Blender, OBJ, 3DS, C4D, MAX, MAYA. You can find models for different categories, such as architecture, vehicles, characters, furniture, aircrafts, etc. You can also share your own models with the community.</p>
78
- <h4>Sketchfab</h4>
79
- <p>This is a website that allows you to view, share, and download over half a million free 3D models under Creative Commons licenses. You can also buy royalty-free models from the Sketchfab Store. You can explore models for different categories, such as characters, cars, weapons, scans, handpainted, medieval, fantasy, etc.</p>
80
- <h4>CGTrader</h4>
81
- <p>This is a website that offers over one million free and paid 3 D models for various categories, such as animals, architecture, electronics, furniture, vehicles, etc. You can also sell your own models and earn money. You can filter models by price, format, license, polycount, etc.</p>
82
- <h3>Free 3D Models Libraries and Repositories</h3>
83
- <p>These are online platforms that store and organize free 3D models that you can access and download. Some examples are:</p>
84
- <h4>Google Poly</h4>
85
- <p>This is a platform that allows you to browse, discover, and download thousands of free 3D models created by Google and other users. You can also upload your own models and share them with the world. You can find models for different categories, such as animals, art, food, nature, objects, scenes, etc.</p>
86
- <h4>BlenderKit</h4>
87
- <p>This is a platform that offers over 10,000 free 3D models for Blender users. You can also upload your own models and earn credits or money. You can find models for different categories, such as animals, architecture, characters, furniture, vehicles, etc. You can also access free materials, brushes, and textures.</p>
88
- <h4>NASA 3D Resources</h4>
89
- <p>This is a platform that provides free 3D models of NASA's missions, spacecrafts, planets, asteroids, comets, etc. You can also access free images, videos, podcasts, and e-books. You can find models in various formats, such as STL, OBJ, 3DS, FBX, etc.</p>
90
- <h2>How to Download and Use Free 3D Objects</h2>
91
- <p>Once you have found the free 3D objects that you want to use for your projects, you need to download and use them properly. Here are some tips to help you:</p>
92
- <h3>The Different File Formats for 3D Objects</h3>
93
- <p>Free 3D objects can come in different file formats that determine how they are stored and displayed. Some of the most common formats are:</p>
94
- <ul>
95
- <li>OBJ: This is a simple and widely used format that stores the geometry and texture coordinates of a 3D object.</li>
96
- <li>STL: This is a format that stores the surface geometry of a 3D object using triangular facets. It is often used for 3D printing.</li>
97
- <li>FBX: This is a format that stores the geometry, materials, animations, and other attributes of a 3D object. It is often used for game development and film production.</li>
98
- <li>GLTF: This is a format that stores the geometry, materials, textures, animations, and other attributes of a 3D object using JSON and binary data. It is often used for web-based applications and virtual reality.</li>
99
- </ul>
100
- <h3>The Software and Tools You Need to Open and Edit 3D Objects</h3>
101
- <p>To open and edit free 3D objects, you need to have the appropriate software and tools installed on your computer or device. Some of the most popular software and tools are:</p>
102
- <ul>
103
- <li>Blender: This is a free and open-source software that allows you to create, edit, animate, render, and export 3D objects in various formats. It also has many features and add-ons for modeling, sculpting, texturing, lighting, rigging, animating, rendering, compositing, and more.</li>
104
- <li>SketchUp: This is a software that allows you to create, edit, and share 3D objects in various formats. It also has many features and tools for drawing, measuring, coloring, applying materials, adding components, creating scenes, and more.</li>
105
- <li>Unity: This is a software that allows you to create, edit, and export 3D objects in various formats. It also has many features and tools for game development, such as scripting, physics, audio, networking, animation, UI, etc.</li>
106
- <li>Paint 3D: This is a software that allows you to create, edit, and export 3D objects in various formats. It also has many features and tools for painting, coloring, texturing, adding stickers, effects, lighting, etc.</li>
107
- </ul>
108
- <h3>The Best Practices for Using Free 3D Objects in Your Projects</h3>
109
- <p>To use free 3D objects in your projects effectively and ethically, you need to follow some best practices, such as:</p>
110
- <ul>
111
- <li>Checking the license and terms of use of the free 3D objects before downloading and using them. Some free 3D objects may have restrictions or requirements for attribution, modification, distribution, commercial use, etc.</li>
112
- <li>Optimizing the size and quality of the free 3D objects to suit your project's needs and specifications. Some free 3D objects may have high polygon counts or large file sizes that can affect the performance or loading time of your project.</li>
113
- <li>Customizing the appearance and behavior of the free 3D objects to match your project's theme and style. Some free 3D objects may have generic or inconsistent textures, materials, colors, lighting, animations, etc. that can affect the realism or aesthetics of your project.</li>
114
- <li>Crediting the original creators or sources of the free 3D objects when using them in your project. This is not only a sign of respect and gratitude but also a way of avoiding plagiarism or infringement issues.</li>
115
- </ul>
116
- <h2>Conclusion</h2>
117
- <p>In conclusion, free 3D objects are a great resource for anyone who wants to create or enhance their projects with 3D graphics, animation, or visualization. They can save you time, money, and effort, as well as provide you with a variety of options and possibilities. However, you also need to be aware of the challenges and best practices of finding, downloading, and using free 3D objects online. By following the tips and resources in this article, you can make the most out of free 3D objects for your projects.</p>
118
- <h2>FAQs</h2>
119
- <p>Here are some frequently asked questions about free 3D objects:</p>
120
- <ol>
121
- <li>What are the best websites to find free 3D objects?</li>
122
- <p>There is no definitive answer to this question, as different websites may have different advantages and disadvantages depending on your needs and preferences. However, some of the most popular and reputable websites are Free3D.com, Sketchfab, CGTrader, Google Poly, BlenderKit, and NASA 3D Resources.</p>
123
- <li>What are the best software and tools to open and edit free 3D objects?</li>
124
- <p>Again, this depends on your personal choice and project requirements. However, some of the most widely used and versatile software and tools are Blender, SketchUp, Unity, and Paint 3D.</p>
125
- <li>What are the best file formats for free 3D objects?</li>
126
- <p>This depends on the type and purpose of your project, as well as the compatibility and functionality of your software and tools. However, some of the most common and flexible file formats are OBJ, STL, FBX, and GLTF.</p>
127
- <li>How can I optimize the size and quality of free 3D objects?</li>
128
- <p>You can use various methods and techniques to optimize the size and quality of free 3D objects, such as reducing the polygon count, simplifying the geometry, compressing the file size, adjusting the resolution, applying level of detail (LOD), etc.</p>
129
- <li>How can I credit the original creators or sources of free 3D objects?</li>
130
- <p>You can credit the original creators or sources of free 3D objects by following their license and terms of use, which may include providing their name, website, link, or other information. You can also use tools or platforms that automatically generate citations or attributions for free 3D objects.</p>
131
- </ol></p> 401be4b1e0<br />
132
- <br />
133
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1toTree/lora_test/ppdiffusers/pipelines/alt_diffusion/__init__.py DELETED
@@ -1,48 +0,0 @@
1
- # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
2
- # Copyright 2022 The HuggingFace Team. All rights reserved.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- # flake8: noqa
16
-
17
- from dataclasses import dataclass
18
- from typing import List, Optional, Union
19
-
20
- import numpy as np
21
- import PIL
22
-
23
- from ...utils import BaseOutput, is_paddle_available, is_paddlenlp_available
24
-
25
-
26
- @dataclass
27
- # Copied from diffusers.pipelines.stable_diffusion.__init__.StableDiffusionPipelineOutput with Stable->Alt
28
- class AltDiffusionPipelineOutput(BaseOutput):
29
- """
30
- Output class for Alt Diffusion pipelines.
31
-
32
- Args:
33
- images (`List[PIL.Image.Image]` or `np.ndarray`)
34
- List of denoised PIL images of length `batch_size` or numpy array of shape `(batch_size, height, width,
35
- num_channels)`. PIL images or numpy array present the denoised images of the diffusion pipeline.
36
- nsfw_content_detected (`List[bool]`)
37
- List of flags denoting whether the corresponding generated image likely represents "not-safe-for-work"
38
- (nsfw) content, or `None` if safety checking could not be performed.
39
- """
40
-
41
- images: Union[List[PIL.Image.Image], np.ndarray]
42
- nsfw_content_detected: Optional[List[bool]]
43
-
44
-
45
- if is_paddlenlp_available() and is_paddle_available():
46
- from .modeling_roberta_series import RobertaSeriesModelWithTransformation
47
- from .pipeline_alt_diffusion import AltDiffusionPipeline
48
- from .pipeline_alt_diffusion_img2img import AltDiffusionImg2ImgPipeline
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AP123/dreamgaussian/gs_renderer.py DELETED
@@ -1,820 +0,0 @@
1
- import os
2
- import math
3
- import numpy as np
4
- from typing import NamedTuple
5
- from plyfile import PlyData, PlyElement
6
-
7
- import torch
8
- from torch import nn
9
-
10
- from diff_gaussian_rasterization import (
11
- GaussianRasterizationSettings,
12
- GaussianRasterizer,
13
- )
14
- from simple_knn._C import distCUDA2
15
-
16
- from sh_utils import eval_sh, SH2RGB, RGB2SH
17
- from mesh import Mesh
18
- from mesh_utils import decimate_mesh, clean_mesh
19
-
20
- import kiui
21
-
22
- def inverse_sigmoid(x):
23
- return torch.log(x/(1-x))
24
-
25
- def get_expon_lr_func(
26
- lr_init, lr_final, lr_delay_steps=0, lr_delay_mult=1.0, max_steps=1000000
27
- ):
28
-
29
- def helper(step):
30
- if lr_init == lr_final:
31
- # constant lr, ignore other params
32
- return lr_init
33
- if step < 0 or (lr_init == 0.0 and lr_final == 0.0):
34
- # Disable this parameter
35
- return 0.0
36
- if lr_delay_steps > 0:
37
- # A kind of reverse cosine decay.
38
- delay_rate = lr_delay_mult + (1 - lr_delay_mult) * np.sin(
39
- 0.5 * np.pi * np.clip(step / lr_delay_steps, 0, 1)
40
- )
41
- else:
42
- delay_rate = 1.0
43
- t = np.clip(step / max_steps, 0, 1)
44
- log_lerp = np.exp(np.log(lr_init) * (1 - t) + np.log(lr_final) * t)
45
- return delay_rate * log_lerp
46
-
47
- return helper
48
-
49
-
50
- def strip_lowerdiag(L):
51
- uncertainty = torch.zeros((L.shape[0], 6), dtype=torch.float, device="cuda")
52
-
53
- uncertainty[:, 0] = L[:, 0, 0]
54
- uncertainty[:, 1] = L[:, 0, 1]
55
- uncertainty[:, 2] = L[:, 0, 2]
56
- uncertainty[:, 3] = L[:, 1, 1]
57
- uncertainty[:, 4] = L[:, 1, 2]
58
- uncertainty[:, 5] = L[:, 2, 2]
59
- return uncertainty
60
-
61
- def strip_symmetric(sym):
62
- return strip_lowerdiag(sym)
63
-
64
- def gaussian_3d_coeff(xyzs, covs):
65
- # xyzs: [N, 3]
66
- # covs: [N, 6]
67
- x, y, z = xyzs[:, 0], xyzs[:, 1], xyzs[:, 2]
68
- a, b, c, d, e, f = covs[:, 0], covs[:, 1], covs[:, 2], covs[:, 3], covs[:, 4], covs[:, 5]
69
-
70
- # eps must be small enough !!!
71
- inv_det = 1 / (a * d * f + 2 * e * c * b - e**2 * a - c**2 * d - b**2 * f + 1e-24)
72
- inv_a = (d * f - e**2) * inv_det
73
- inv_b = (e * c - b * f) * inv_det
74
- inv_c = (e * b - c * d) * inv_det
75
- inv_d = (a * f - c**2) * inv_det
76
- inv_e = (b * c - e * a) * inv_det
77
- inv_f = (a * d - b**2) * inv_det
78
-
79
- power = -0.5 * (x**2 * inv_a + y**2 * inv_d + z**2 * inv_f) - x * y * inv_b - x * z * inv_c - y * z * inv_e
80
-
81
- power[power > 0] = -1e10 # abnormal values... make weights 0
82
-
83
- return torch.exp(power)
84
-
85
- def build_rotation(r):
86
- norm = torch.sqrt(r[:,0]*r[:,0] + r[:,1]*r[:,1] + r[:,2]*r[:,2] + r[:,3]*r[:,3])
87
-
88
- q = r / norm[:, None]
89
-
90
- R = torch.zeros((q.size(0), 3, 3), device='cuda')
91
-
92
- r = q[:, 0]
93
- x = q[:, 1]
94
- y = q[:, 2]
95
- z = q[:, 3]
96
-
97
- R[:, 0, 0] = 1 - 2 * (y*y + z*z)
98
- R[:, 0, 1] = 2 * (x*y - r*z)
99
- R[:, 0, 2] = 2 * (x*z + r*y)
100
- R[:, 1, 0] = 2 * (x*y + r*z)
101
- R[:, 1, 1] = 1 - 2 * (x*x + z*z)
102
- R[:, 1, 2] = 2 * (y*z - r*x)
103
- R[:, 2, 0] = 2 * (x*z - r*y)
104
- R[:, 2, 1] = 2 * (y*z + r*x)
105
- R[:, 2, 2] = 1 - 2 * (x*x + y*y)
106
- return R
107
-
108
- def build_scaling_rotation(s, r):
109
- L = torch.zeros((s.shape[0], 3, 3), dtype=torch.float, device="cuda")
110
- R = build_rotation(r)
111
-
112
- L[:,0,0] = s[:,0]
113
- L[:,1,1] = s[:,1]
114
- L[:,2,2] = s[:,2]
115
-
116
- L = R @ L
117
- return L
118
-
119
- class BasicPointCloud(NamedTuple):
120
- points: np.array
121
- colors: np.array
122
- normals: np.array
123
-
124
-
125
- class GaussianModel:
126
-
127
- def setup_functions(self):
128
- def build_covariance_from_scaling_rotation(scaling, scaling_modifier, rotation):
129
- L = build_scaling_rotation(scaling_modifier * scaling, rotation)
130
- actual_covariance = L @ L.transpose(1, 2)
131
- symm = strip_symmetric(actual_covariance)
132
- return symm
133
-
134
- self.scaling_activation = torch.exp
135
- self.scaling_inverse_activation = torch.log
136
-
137
- self.covariance_activation = build_covariance_from_scaling_rotation
138
-
139
- self.opacity_activation = torch.sigmoid
140
- self.inverse_opacity_activation = inverse_sigmoid
141
-
142
- self.rotation_activation = torch.nn.functional.normalize
143
-
144
-
145
- def __init__(self, sh_degree : int):
146
- self.active_sh_degree = 0
147
- self.max_sh_degree = sh_degree
148
- self._xyz = torch.empty(0)
149
- self._features_dc = torch.empty(0)
150
- self._features_rest = torch.empty(0)
151
- self._scaling = torch.empty(0)
152
- self._rotation = torch.empty(0)
153
- self._opacity = torch.empty(0)
154
- self.max_radii2D = torch.empty(0)
155
- self.xyz_gradient_accum = torch.empty(0)
156
- self.denom = torch.empty(0)
157
- self.optimizer = None
158
- self.percent_dense = 0
159
- self.spatial_lr_scale = 0
160
- self.setup_functions()
161
-
162
- def capture(self):
163
- return (
164
- self.active_sh_degree,
165
- self._xyz,
166
- self._features_dc,
167
- self._features_rest,
168
- self._scaling,
169
- self._rotation,
170
- self._opacity,
171
- self.max_radii2D,
172
- self.xyz_gradient_accum,
173
- self.denom,
174
- self.optimizer.state_dict(),
175
- self.spatial_lr_scale,
176
- )
177
-
178
- def restore(self, model_args, training_args):
179
- (self.active_sh_degree,
180
- self._xyz,
181
- self._features_dc,
182
- self._features_rest,
183
- self._scaling,
184
- self._rotation,
185
- self._opacity,
186
- self.max_radii2D,
187
- xyz_gradient_accum,
188
- denom,
189
- opt_dict,
190
- self.spatial_lr_scale) = model_args
191
- self.training_setup(training_args)
192
- self.xyz_gradient_accum = xyz_gradient_accum
193
- self.denom = denom
194
- self.optimizer.load_state_dict(opt_dict)
195
-
196
- @property
197
- def get_scaling(self):
198
- return self.scaling_activation(self._scaling)
199
-
200
- @property
201
- def get_rotation(self):
202
- return self.rotation_activation(self._rotation)
203
-
204
- @property
205
- def get_xyz(self):
206
- return self._xyz
207
-
208
- @property
209
- def get_features(self):
210
- features_dc = self._features_dc
211
- features_rest = self._features_rest
212
- return torch.cat((features_dc, features_rest), dim=1)
213
-
214
- @property
215
- def get_opacity(self):
216
- return self.opacity_activation(self._opacity)
217
-
218
- @torch.no_grad()
219
- def extract_fields(self, resolution=128, num_blocks=16, relax_ratio=1.5):
220
- # resolution: resolution of field
221
-
222
- block_size = 2 / num_blocks
223
-
224
- assert resolution % block_size == 0
225
- split_size = resolution // num_blocks
226
-
227
- opacities = self.get_opacity
228
-
229
- # pre-filter low opacity gaussians to save computation
230
- mask = (opacities > 0.005).squeeze(1)
231
-
232
- opacities = opacities[mask]
233
- xyzs = self.get_xyz[mask]
234
- stds = self.get_scaling[mask]
235
-
236
- # normalize to ~ [-1, 1]
237
- mn, mx = xyzs.amin(0), xyzs.amax(0)
238
- self.center = (mn + mx) / 2
239
- self.scale = 1.8 / (mx - mn).amax().item()
240
-
241
- xyzs = (xyzs - self.center) * self.scale
242
- stds = stds * self.scale
243
-
244
- covs = self.covariance_activation(stds, 1, self._rotation[mask])
245
-
246
- # tile
247
- device = opacities.device
248
- occ = torch.zeros([resolution] * 3, dtype=torch.float32, device=device)
249
-
250
- X = torch.linspace(-1, 1, resolution).split(split_size)
251
- Y = torch.linspace(-1, 1, resolution).split(split_size)
252
- Z = torch.linspace(-1, 1, resolution).split(split_size)
253
-
254
-
255
- # loop blocks (assume max size of gaussian is small than relax_ratio * block_size !!!)
256
- for xi, xs in enumerate(X):
257
- for yi, ys in enumerate(Y):
258
- for zi, zs in enumerate(Z):
259
- xx, yy, zz = torch.meshgrid(xs, ys, zs)
260
- # sample points [M, 3]
261
- pts = torch.cat([xx.reshape(-1, 1), yy.reshape(-1, 1), zz.reshape(-1, 1)], dim=-1).to(device)
262
- # in-tile gaussians mask
263
- vmin, vmax = pts.amin(0), pts.amax(0)
264
- vmin -= block_size * relax_ratio
265
- vmax += block_size * relax_ratio
266
- mask = (xyzs < vmax).all(-1) & (xyzs > vmin).all(-1)
267
- # if hit no gaussian, continue to next block
268
- if not mask.any():
269
- continue
270
- mask_xyzs = xyzs[mask] # [L, 3]
271
- mask_covs = covs[mask] # [L, 6]
272
- mask_opas = opacities[mask].view(1, -1) # [L, 1] --> [1, L]
273
-
274
- # query per point-gaussian pair.
275
- g_pts = pts.unsqueeze(1).repeat(1, mask_covs.shape[0], 1) - mask_xyzs.unsqueeze(0) # [M, L, 3]
276
- g_covs = mask_covs.unsqueeze(0).repeat(pts.shape[0], 1, 1) # [M, L, 6]
277
-
278
- # batch on gaussian to avoid OOM
279
- batch_g = 1024
280
- val = 0
281
- for start in range(0, g_covs.shape[1], batch_g):
282
- end = min(start + batch_g, g_covs.shape[1])
283
- w = gaussian_3d_coeff(g_pts[:, start:end].reshape(-1, 3), g_covs[:, start:end].reshape(-1, 6)).reshape(pts.shape[0], -1) # [M, l]
284
- val += (mask_opas[:, start:end] * w).sum(-1)
285
-
286
- # kiui.lo(val, mask_opas, w)
287
-
288
- occ[xi * split_size: xi * split_size + len(xs),
289
- yi * split_size: yi * split_size + len(ys),
290
- zi * split_size: zi * split_size + len(zs)] = val.reshape(len(xs), len(ys), len(zs))
291
-
292
- kiui.lo(occ, verbose=1)
293
-
294
- return occ
295
-
296
- def extract_mesh(self, path, density_thresh=1, resolution=128, decimate_target=1e5):
297
-
298
- os.makedirs(os.path.dirname(path), exist_ok=True)
299
-
300
- occ = self.extract_fields(resolution).detach().cpu().numpy()
301
-
302
- import mcubes
303
- vertices, triangles = mcubes.marching_cubes(occ, density_thresh)
304
- vertices = vertices / (resolution - 1.0) * 2 - 1
305
-
306
- # transform back to the original space
307
- vertices = vertices / self.scale + self.center.detach().cpu().numpy()
308
-
309
- vertices, triangles = clean_mesh(vertices, triangles, remesh=True, remesh_size=0.015)
310
- if decimate_target > 0 and triangles.shape[0] > decimate_target:
311
- vertices, triangles = decimate_mesh(vertices, triangles, decimate_target)
312
-
313
- v = torch.from_numpy(vertices.astype(np.float32)).contiguous().cuda()
314
- f = torch.from_numpy(triangles.astype(np.int32)).contiguous().cuda()
315
-
316
- print(
317
- f"[INFO] marching cubes result: {v.shape} ({v.min().item()}-{v.max().item()}), {f.shape}"
318
- )
319
-
320
- mesh = Mesh(v=v, f=f, device='cuda')
321
-
322
- return mesh
323
-
324
- def get_covariance(self, scaling_modifier = 1):
325
- return self.covariance_activation(self.get_scaling, scaling_modifier, self._rotation)
326
-
327
- def oneupSHdegree(self):
328
- if self.active_sh_degree < self.max_sh_degree:
329
- self.active_sh_degree += 1
330
-
331
- def create_from_pcd(self, pcd : BasicPointCloud, spatial_lr_scale : float = 1):
332
- self.spatial_lr_scale = spatial_lr_scale
333
- fused_point_cloud = torch.tensor(np.asarray(pcd.points)).float().cuda()
334
- fused_color = RGB2SH(torch.tensor(np.asarray(pcd.colors)).float().cuda())
335
- features = torch.zeros((fused_color.shape[0], 3, (self.max_sh_degree + 1) ** 2)).float().cuda()
336
- features[:, :3, 0 ] = fused_color
337
- features[:, 3:, 1:] = 0.0
338
-
339
- print("Number of points at initialisation : ", fused_point_cloud.shape[0])
340
-
341
- dist2 = torch.clamp_min(distCUDA2(torch.from_numpy(np.asarray(pcd.points)).float().cuda()), 0.0000001)
342
- scales = torch.log(torch.sqrt(dist2))[...,None].repeat(1, 3)
343
- rots = torch.zeros((fused_point_cloud.shape[0], 4), device="cuda")
344
- rots[:, 0] = 1
345
-
346
- opacities = inverse_sigmoid(0.1 * torch.ones((fused_point_cloud.shape[0], 1), dtype=torch.float, device="cuda"))
347
-
348
- self._xyz = nn.Parameter(fused_point_cloud.requires_grad_(True))
349
- self._features_dc = nn.Parameter(features[:,:,0:1].transpose(1, 2).contiguous().requires_grad_(True))
350
- self._features_rest = nn.Parameter(features[:,:,1:].transpose(1, 2).contiguous().requires_grad_(True))
351
- self._scaling = nn.Parameter(scales.requires_grad_(True))
352
- self._rotation = nn.Parameter(rots.requires_grad_(True))
353
- self._opacity = nn.Parameter(opacities.requires_grad_(True))
354
- self.max_radii2D = torch.zeros((self.get_xyz.shape[0]), device="cuda")
355
-
356
- def training_setup(self, training_args):
357
- self.percent_dense = training_args.percent_dense
358
- self.xyz_gradient_accum = torch.zeros((self.get_xyz.shape[0], 1), device="cuda")
359
- self.denom = torch.zeros((self.get_xyz.shape[0], 1), device="cuda")
360
-
361
- l = [
362
- {'params': [self._xyz], 'lr': training_args.position_lr_init * self.spatial_lr_scale, "name": "xyz"},
363
- {'params': [self._features_dc], 'lr': training_args.feature_lr, "name": "f_dc"},
364
- {'params': [self._features_rest], 'lr': training_args.feature_lr / 20.0, "name": "f_rest"},
365
- {'params': [self._opacity], 'lr': training_args.opacity_lr, "name": "opacity"},
366
- {'params': [self._scaling], 'lr': training_args.scaling_lr, "name": "scaling"},
367
- {'params': [self._rotation], 'lr': training_args.rotation_lr, "name": "rotation"}
368
- ]
369
-
370
- self.optimizer = torch.optim.Adam(l, lr=0.0, eps=1e-15)
371
- self.xyz_scheduler_args = get_expon_lr_func(lr_init=training_args.position_lr_init*self.spatial_lr_scale,
372
- lr_final=training_args.position_lr_final*self.spatial_lr_scale,
373
- lr_delay_mult=training_args.position_lr_delay_mult,
374
- max_steps=training_args.position_lr_max_steps)
375
-
376
- def update_learning_rate(self, iteration):
377
- ''' Learning rate scheduling per step '''
378
- for param_group in self.optimizer.param_groups:
379
- if param_group["name"] == "xyz":
380
- lr = self.xyz_scheduler_args(iteration)
381
- param_group['lr'] = lr
382
- return lr
383
-
384
- def construct_list_of_attributes(self):
385
- l = ['x', 'y', 'z', 'nx', 'ny', 'nz']
386
- # All channels except the 3 DC
387
- for i in range(self._features_dc.shape[1]*self._features_dc.shape[2]):
388
- l.append('f_dc_{}'.format(i))
389
- for i in range(self._features_rest.shape[1]*self._features_rest.shape[2]):
390
- l.append('f_rest_{}'.format(i))
391
- l.append('opacity')
392
- for i in range(self._scaling.shape[1]):
393
- l.append('scale_{}'.format(i))
394
- for i in range(self._rotation.shape[1]):
395
- l.append('rot_{}'.format(i))
396
- return l
397
-
398
- def save_ply(self, path):
399
- os.makedirs(os.path.dirname(path), exist_ok=True)
400
-
401
- xyz = self._xyz.detach().cpu().numpy()
402
- normals = np.zeros_like(xyz)
403
- f_dc = self._features_dc.detach().transpose(1, 2).flatten(start_dim=1).contiguous().cpu().numpy()
404
- f_rest = self._features_rest.detach().transpose(1, 2).flatten(start_dim=1).contiguous().cpu().numpy()
405
- opacities = self._opacity.detach().cpu().numpy()
406
- scale = self._scaling.detach().cpu().numpy()
407
- rotation = self._rotation.detach().cpu().numpy()
408
-
409
- dtype_full = [(attribute, 'f4') for attribute in self.construct_list_of_attributes()]
410
-
411
- elements = np.empty(xyz.shape[0], dtype=dtype_full)
412
- attributes = np.concatenate((xyz, normals, f_dc, f_rest, opacities, scale, rotation), axis=1)
413
- elements[:] = list(map(tuple, attributes))
414
- el = PlyElement.describe(elements, 'vertex')
415
- PlyData([el]).write(path)
416
-
417
- def reset_opacity(self):
418
- opacities_new = inverse_sigmoid(torch.min(self.get_opacity, torch.ones_like(self.get_opacity)*0.01))
419
- optimizable_tensors = self.replace_tensor_to_optimizer(opacities_new, "opacity")
420
- self._opacity = optimizable_tensors["opacity"]
421
-
422
- def load_ply(self, path):
423
- plydata = PlyData.read(path)
424
-
425
- xyz = np.stack((np.asarray(plydata.elements[0]["x"]),
426
- np.asarray(plydata.elements[0]["y"]),
427
- np.asarray(plydata.elements[0]["z"])), axis=1)
428
- opacities = np.asarray(plydata.elements[0]["opacity"])[..., np.newaxis]
429
-
430
- print("Number of points at loading : ", xyz.shape[0])
431
-
432
- features_dc = np.zeros((xyz.shape[0], 3, 1))
433
- features_dc[:, 0, 0] = np.asarray(plydata.elements[0]["f_dc_0"])
434
- features_dc[:, 1, 0] = np.asarray(plydata.elements[0]["f_dc_1"])
435
- features_dc[:, 2, 0] = np.asarray(plydata.elements[0]["f_dc_2"])
436
-
437
- extra_f_names = [p.name for p in plydata.elements[0].properties if p.name.startswith("f_rest_")]
438
- assert len(extra_f_names)==3*(self.max_sh_degree + 1) ** 2 - 3
439
- features_extra = np.zeros((xyz.shape[0], len(extra_f_names)))
440
- for idx, attr_name in enumerate(extra_f_names):
441
- features_extra[:, idx] = np.asarray(plydata.elements[0][attr_name])
442
- # Reshape (P,F*SH_coeffs) to (P, F, SH_coeffs except DC)
443
- features_extra = features_extra.reshape((features_extra.shape[0], 3, (self.max_sh_degree + 1) ** 2 - 1))
444
-
445
- scale_names = [p.name for p in plydata.elements[0].properties if p.name.startswith("scale_")]
446
- scales = np.zeros((xyz.shape[0], len(scale_names)))
447
- for idx, attr_name in enumerate(scale_names):
448
- scales[:, idx] = np.asarray(plydata.elements[0][attr_name])
449
-
450
- rot_names = [p.name for p in plydata.elements[0].properties if p.name.startswith("rot")]
451
- rots = np.zeros((xyz.shape[0], len(rot_names)))
452
- for idx, attr_name in enumerate(rot_names):
453
- rots[:, idx] = np.asarray(plydata.elements[0][attr_name])
454
-
455
- self._xyz = nn.Parameter(torch.tensor(xyz, dtype=torch.float, device="cuda").requires_grad_(True))
456
- self._features_dc = nn.Parameter(torch.tensor(features_dc, dtype=torch.float, device="cuda").transpose(1, 2).contiguous().requires_grad_(True))
457
- self._features_rest = nn.Parameter(torch.tensor(features_extra, dtype=torch.float, device="cuda").transpose(1, 2).contiguous().requires_grad_(True))
458
- self._opacity = nn.Parameter(torch.tensor(opacities, dtype=torch.float, device="cuda").requires_grad_(True))
459
- self._scaling = nn.Parameter(torch.tensor(scales, dtype=torch.float, device="cuda").requires_grad_(True))
460
- self._rotation = nn.Parameter(torch.tensor(rots, dtype=torch.float, device="cuda").requires_grad_(True))
461
-
462
- self.active_sh_degree = self.max_sh_degree
463
-
464
- def replace_tensor_to_optimizer(self, tensor, name):
465
- optimizable_tensors = {}
466
- for group in self.optimizer.param_groups:
467
- if group["name"] == name:
468
- stored_state = self.optimizer.state.get(group['params'][0], None)
469
- stored_state["exp_avg"] = torch.zeros_like(tensor)
470
- stored_state["exp_avg_sq"] = torch.zeros_like(tensor)
471
-
472
- del self.optimizer.state[group['params'][0]]
473
- group["params"][0] = nn.Parameter(tensor.requires_grad_(True))
474
- self.optimizer.state[group['params'][0]] = stored_state
475
-
476
- optimizable_tensors[group["name"]] = group["params"][0]
477
- return optimizable_tensors
478
-
479
- def _prune_optimizer(self, mask):
480
- optimizable_tensors = {}
481
- for group in self.optimizer.param_groups:
482
- stored_state = self.optimizer.state.get(group['params'][0], None)
483
- if stored_state is not None:
484
- stored_state["exp_avg"] = stored_state["exp_avg"][mask]
485
- stored_state["exp_avg_sq"] = stored_state["exp_avg_sq"][mask]
486
-
487
- del self.optimizer.state[group['params'][0]]
488
- group["params"][0] = nn.Parameter((group["params"][0][mask].requires_grad_(True)))
489
- self.optimizer.state[group['params'][0]] = stored_state
490
-
491
- optimizable_tensors[group["name"]] = group["params"][0]
492
- else:
493
- group["params"][0] = nn.Parameter(group["params"][0][mask].requires_grad_(True))
494
- optimizable_tensors[group["name"]] = group["params"][0]
495
- return optimizable_tensors
496
-
497
- def prune_points(self, mask):
498
- valid_points_mask = ~mask
499
- optimizable_tensors = self._prune_optimizer(valid_points_mask)
500
-
501
- self._xyz = optimizable_tensors["xyz"]
502
- self._features_dc = optimizable_tensors["f_dc"]
503
- self._features_rest = optimizable_tensors["f_rest"]
504
- self._opacity = optimizable_tensors["opacity"]
505
- self._scaling = optimizable_tensors["scaling"]
506
- self._rotation = optimizable_tensors["rotation"]
507
-
508
- self.xyz_gradient_accum = self.xyz_gradient_accum[valid_points_mask]
509
-
510
- self.denom = self.denom[valid_points_mask]
511
- self.max_radii2D = self.max_radii2D[valid_points_mask]
512
-
513
- def cat_tensors_to_optimizer(self, tensors_dict):
514
- optimizable_tensors = {}
515
- for group in self.optimizer.param_groups:
516
- assert len(group["params"]) == 1
517
- extension_tensor = tensors_dict[group["name"]]
518
- stored_state = self.optimizer.state.get(group['params'][0], None)
519
- if stored_state is not None:
520
-
521
- stored_state["exp_avg"] = torch.cat((stored_state["exp_avg"], torch.zeros_like(extension_tensor)), dim=0)
522
- stored_state["exp_avg_sq"] = torch.cat((stored_state["exp_avg_sq"], torch.zeros_like(extension_tensor)), dim=0)
523
-
524
- del self.optimizer.state[group['params'][0]]
525
- group["params"][0] = nn.Parameter(torch.cat((group["params"][0], extension_tensor), dim=0).requires_grad_(True))
526
- self.optimizer.state[group['params'][0]] = stored_state
527
-
528
- optimizable_tensors[group["name"]] = group["params"][0]
529
- else:
530
- group["params"][0] = nn.Parameter(torch.cat((group["params"][0], extension_tensor), dim=0).requires_grad_(True))
531
- optimizable_tensors[group["name"]] = group["params"][0]
532
-
533
- return optimizable_tensors
534
-
535
- def densification_postfix(self, new_xyz, new_features_dc, new_features_rest, new_opacities, new_scaling, new_rotation):
536
- d = {"xyz": new_xyz,
537
- "f_dc": new_features_dc,
538
- "f_rest": new_features_rest,
539
- "opacity": new_opacities,
540
- "scaling" : new_scaling,
541
- "rotation" : new_rotation}
542
-
543
- optimizable_tensors = self.cat_tensors_to_optimizer(d)
544
- self._xyz = optimizable_tensors["xyz"]
545
- self._features_dc = optimizable_tensors["f_dc"]
546
- self._features_rest = optimizable_tensors["f_rest"]
547
- self._opacity = optimizable_tensors["opacity"]
548
- self._scaling = optimizable_tensors["scaling"]
549
- self._rotation = optimizable_tensors["rotation"]
550
-
551
- self.xyz_gradient_accum = torch.zeros((self.get_xyz.shape[0], 1), device="cuda")
552
- self.denom = torch.zeros((self.get_xyz.shape[0], 1), device="cuda")
553
- self.max_radii2D = torch.zeros((self.get_xyz.shape[0]), device="cuda")
554
-
555
- def densify_and_split(self, grads, grad_threshold, scene_extent, N=2):
556
- n_init_points = self.get_xyz.shape[0]
557
- # Extract points that satisfy the gradient condition
558
- padded_grad = torch.zeros((n_init_points), device="cuda")
559
- padded_grad[:grads.shape[0]] = grads.squeeze()
560
- selected_pts_mask = torch.where(padded_grad >= grad_threshold, True, False)
561
- selected_pts_mask = torch.logical_and(selected_pts_mask,
562
- torch.max(self.get_scaling, dim=1).values > self.percent_dense*scene_extent)
563
-
564
- stds = self.get_scaling[selected_pts_mask].repeat(N,1)
565
- means =torch.zeros((stds.size(0), 3),device="cuda")
566
- samples = torch.normal(mean=means, std=stds)
567
- rots = build_rotation(self._rotation[selected_pts_mask]).repeat(N,1,1)
568
- new_xyz = torch.bmm(rots, samples.unsqueeze(-1)).squeeze(-1) + self.get_xyz[selected_pts_mask].repeat(N, 1)
569
- new_scaling = self.scaling_inverse_activation(self.get_scaling[selected_pts_mask].repeat(N,1) / (0.8*N))
570
- new_rotation = self._rotation[selected_pts_mask].repeat(N,1)
571
- new_features_dc = self._features_dc[selected_pts_mask].repeat(N,1,1)
572
- new_features_rest = self._features_rest[selected_pts_mask].repeat(N,1,1)
573
- new_opacity = self._opacity[selected_pts_mask].repeat(N,1)
574
-
575
- self.densification_postfix(new_xyz, new_features_dc, new_features_rest, new_opacity, new_scaling, new_rotation)
576
-
577
- prune_filter = torch.cat((selected_pts_mask, torch.zeros(N * selected_pts_mask.sum(), device="cuda", dtype=bool)))
578
- self.prune_points(prune_filter)
579
-
580
- def densify_and_clone(self, grads, grad_threshold, scene_extent):
581
- # Extract points that satisfy the gradient condition
582
- selected_pts_mask = torch.where(torch.norm(grads, dim=-1) >= grad_threshold, True, False)
583
- selected_pts_mask = torch.logical_and(selected_pts_mask,
584
- torch.max(self.get_scaling, dim=1).values <= self.percent_dense*scene_extent)
585
-
586
- new_xyz = self._xyz[selected_pts_mask]
587
- new_features_dc = self._features_dc[selected_pts_mask]
588
- new_features_rest = self._features_rest[selected_pts_mask]
589
- new_opacities = self._opacity[selected_pts_mask]
590
- new_scaling = self._scaling[selected_pts_mask]
591
- new_rotation = self._rotation[selected_pts_mask]
592
-
593
- self.densification_postfix(new_xyz, new_features_dc, new_features_rest, new_opacities, new_scaling, new_rotation)
594
-
595
- def densify_and_prune(self, max_grad, min_opacity, extent, max_screen_size):
596
- grads = self.xyz_gradient_accum / self.denom
597
- grads[grads.isnan()] = 0.0
598
-
599
- self.densify_and_clone(grads, max_grad, extent)
600
- self.densify_and_split(grads, max_grad, extent)
601
-
602
- prune_mask = (self.get_opacity < min_opacity).squeeze()
603
- if max_screen_size:
604
- big_points_vs = self.max_radii2D > max_screen_size
605
- big_points_ws = self.get_scaling.max(dim=1).values > 0.1 * extent
606
- prune_mask = torch.logical_or(torch.logical_or(prune_mask, big_points_vs), big_points_ws)
607
- self.prune_points(prune_mask)
608
-
609
- torch.cuda.empty_cache()
610
-
611
- def prune(self, min_opacity, extent, max_screen_size):
612
-
613
- prune_mask = (self.get_opacity < min_opacity).squeeze()
614
- if max_screen_size:
615
- big_points_vs = self.max_radii2D > max_screen_size
616
- big_points_ws = self.get_scaling.max(dim=1).values > 0.1 * extent
617
- prune_mask = torch.logical_or(torch.logical_or(prune_mask, big_points_vs), big_points_ws)
618
- self.prune_points(prune_mask)
619
-
620
- torch.cuda.empty_cache()
621
-
622
-
623
- def add_densification_stats(self, viewspace_point_tensor, update_filter):
624
- self.xyz_gradient_accum[update_filter] += torch.norm(viewspace_point_tensor.grad[update_filter,:2], dim=-1, keepdim=True)
625
- self.denom[update_filter] += 1
626
-
627
- def getProjectionMatrix(znear, zfar, fovX, fovY):
628
- tanHalfFovY = math.tan((fovY / 2))
629
- tanHalfFovX = math.tan((fovX / 2))
630
-
631
- P = torch.zeros(4, 4)
632
-
633
- z_sign = 1.0
634
-
635
- P[0, 0] = 1 / tanHalfFovX
636
- P[1, 1] = 1 / tanHalfFovY
637
- P[3, 2] = z_sign
638
- P[2, 2] = z_sign * zfar / (zfar - znear)
639
- P[2, 3] = -(zfar * znear) / (zfar - znear)
640
- return P
641
-
642
-
643
- class MiniCam:
644
- def __init__(self, c2w, width, height, fovy, fovx, znear, zfar):
645
- # c2w (pose) should be in NeRF convention.
646
-
647
- self.image_width = width
648
- self.image_height = height
649
- self.FoVy = fovy
650
- self.FoVx = fovx
651
- self.znear = znear
652
- self.zfar = zfar
653
-
654
- w2c = np.linalg.inv(c2w)
655
-
656
- # rectify...
657
- w2c[1:3, :3] *= -1
658
- w2c[:3, 3] *= -1
659
-
660
- self.world_view_transform = torch.tensor(w2c).transpose(0, 1).cuda()
661
- self.projection_matrix = (
662
- getProjectionMatrix(
663
- znear=self.znear, zfar=self.zfar, fovX=self.FoVx, fovY=self.FoVy
664
- )
665
- .transpose(0, 1)
666
- .cuda()
667
- )
668
- self.full_proj_transform = self.world_view_transform @ self.projection_matrix
669
- self.camera_center = -torch.tensor(c2w[:3, 3]).cuda()
670
-
671
-
672
- class Renderer:
673
- def __init__(self, sh_degree=3, white_background=True, radius=1):
674
-
675
- self.sh_degree = sh_degree
676
- self.white_background = white_background
677
- self.radius = radius
678
-
679
- self.gaussians = GaussianModel(sh_degree)
680
-
681
- self.bg_color = torch.tensor(
682
- [1, 1, 1] if white_background else [0, 0, 0],
683
- dtype=torch.float32,
684
- device="cuda",
685
- )
686
-
687
- def initialize(self, input=None, num_pts=5000, radius=0.5):
688
- # load checkpoint
689
- if input is None:
690
- # init from random point cloud
691
-
692
- phis = np.random.random((num_pts,)) * 2 * np.pi
693
- costheta = np.random.random((num_pts,)) * 2 - 1
694
- thetas = np.arccos(costheta)
695
- mu = np.random.random((num_pts,))
696
- radius = radius * np.cbrt(mu)
697
- x = radius * np.sin(thetas) * np.cos(phis)
698
- y = radius * np.sin(thetas) * np.sin(phis)
699
- z = radius * np.cos(thetas)
700
- xyz = np.stack((x, y, z), axis=1)
701
- # xyz = np.random.random((num_pts, 3)) * 2.6 - 1.3
702
-
703
- shs = np.random.random((num_pts, 3)) / 255.0
704
- pcd = BasicPointCloud(
705
- points=xyz, colors=SH2RGB(shs), normals=np.zeros((num_pts, 3))
706
- )
707
- self.gaussians.create_from_pcd(pcd, 10)
708
- elif isinstance(input, BasicPointCloud):
709
- # load from a provided pcd
710
- self.gaussians.create_from_pcd(input, 1)
711
- else:
712
- # load from saved ply
713
- self.gaussians.load_ply(input)
714
-
715
- def render(
716
- self,
717
- viewpoint_camera,
718
- scaling_modifier=1.0,
719
- invert_bg_color=False,
720
- override_color=None,
721
- compute_cov3D_python=False,
722
- convert_SHs_python=False,
723
- ):
724
- # Create zero tensor. We will use it to make pytorch return gradients of the 2D (screen-space) means
725
- screenspace_points = (
726
- torch.zeros_like(
727
- self.gaussians.get_xyz,
728
- dtype=self.gaussians.get_xyz.dtype,
729
- requires_grad=True,
730
- device="cuda",
731
- )
732
- + 0
733
- )
734
- try:
735
- screenspace_points.retain_grad()
736
- except:
737
- pass
738
-
739
- # Set up rasterization configuration
740
- tanfovx = math.tan(viewpoint_camera.FoVx * 0.5)
741
- tanfovy = math.tan(viewpoint_camera.FoVy * 0.5)
742
-
743
- raster_settings = GaussianRasterizationSettings(
744
- image_height=int(viewpoint_camera.image_height),
745
- image_width=int(viewpoint_camera.image_width),
746
- tanfovx=tanfovx,
747
- tanfovy=tanfovy,
748
- bg=self.bg_color if not invert_bg_color else 1 - self.bg_color,
749
- scale_modifier=scaling_modifier,
750
- viewmatrix=viewpoint_camera.world_view_transform,
751
- projmatrix=viewpoint_camera.full_proj_transform,
752
- sh_degree=self.gaussians.active_sh_degree,
753
- campos=viewpoint_camera.camera_center,
754
- prefiltered=False,
755
- debug=False,
756
- )
757
-
758
- rasterizer = GaussianRasterizer(raster_settings=raster_settings)
759
-
760
- means3D = self.gaussians.get_xyz
761
- means2D = screenspace_points
762
- opacity = self.gaussians.get_opacity
763
-
764
- # If precomputed 3d covariance is provided, use it. If not, then it will be computed from
765
- # scaling / rotation by the rasterizer.
766
- scales = None
767
- rotations = None
768
- cov3D_precomp = None
769
- if compute_cov3D_python:
770
- cov3D_precomp = self.gaussians.get_covariance(scaling_modifier)
771
- else:
772
- scales = self.gaussians.get_scaling
773
- rotations = self.gaussians.get_rotation
774
-
775
- # If precomputed colors are provided, use them. Otherwise, if it is desired to precompute colors
776
- # from SHs in Python, do it. If not, then SH -> RGB conversion will be done by rasterizer.
777
- shs = None
778
- colors_precomp = None
779
- if colors_precomp is None:
780
- if convert_SHs_python:
781
- shs_view = self.gaussians.get_features.transpose(1, 2).view(
782
- -1, 3, (self.gaussians.max_sh_degree + 1) ** 2
783
- )
784
- dir_pp = self.gaussians.get_xyz - viewpoint_camera.camera_center.repeat(
785
- self.gaussians.get_features.shape[0], 1
786
- )
787
- dir_pp_normalized = dir_pp / dir_pp.norm(dim=1, keepdim=True)
788
- sh2rgb = eval_sh(
789
- self.gaussians.active_sh_degree, shs_view, dir_pp_normalized
790
- )
791
- colors_precomp = torch.clamp_min(sh2rgb + 0.5, 0.0)
792
- else:
793
- shs = self.gaussians.get_features
794
- else:
795
- colors_precomp = override_color
796
-
797
- # Rasterize visible Gaussians to image, obtain their radii (on screen).
798
- rendered_image, radii, rendered_depth, rendered_alpha = rasterizer(
799
- means3D=means3D,
800
- means2D=means2D,
801
- shs=shs,
802
- colors_precomp=colors_precomp,
803
- opacities=opacity,
804
- scales=scales,
805
- rotations=rotations,
806
- cov3D_precomp=cov3D_precomp,
807
- )
808
-
809
- rendered_image = rendered_image.clamp(0, 1)
810
-
811
- # Those Gaussians that were frustum culled or had a radius of 0 were not visible.
812
- # They will be excluded from value updates used in the splitting criteria.
813
- return {
814
- "image": rendered_image,
815
- "depth": rendered_depth,
816
- "alpha": rendered_alpha,
817
- "viewspace_points": screenspace_points,
818
- "visibility_filter": radii > 0,
819
- "radii": radii,
820
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/ATang0729/Forecast4Muses/Model/Model6/Model6_2_ProfileRecogition/mmpretrain/configs/.ipynb_checkpoints/__init__.py DELETED
File without changes
spaces/Aaaaaaaabdualh/meter2poem-1/app.py DELETED
@@ -1,51 +0,0 @@
1
- from transformers import BertTokenizer, EncoderDecoderModel
2
- import gradio as gr
3
-
4
- tokenizerM = BertTokenizer.from_pretrained("mareloraby/BERTShared-meter2poem-arV01")
5
- bertSharedM = EncoderDecoderModel.from_pretrained("mareloraby/BERTShared-meter2poem-arV01")
6
-
7
- def generate_response(text, k = 70, p = 0.7, nb = 4):
8
- # meters = set(['الرمل','البسيط','الخفيف','الكامل','السريع','الطويل','المتقارب','الرجز','المجتث','المنسرح','الوافر','المقتضب','الهزج','المديد','المضارع'])
9
- prompt = f"{text}"
10
- encoded_prompt = tokenizerM.encode_plus(prompt, return_tensors = 'pt')#.to(device)
11
- gneration = bertSharedM.generate(
12
- input_ids = encoded_prompt.input_ids,
13
- attention_mask = encoded_prompt.attention_mask,
14
- do_sample = True,
15
- top_k= k,
16
- top_p = p,
17
- num_beams= nb,
18
- max_length =130,
19
- repetition_penalty = 2.0,
20
- no_repeat_ngram_size = 2,
21
- early_stopping=True)
22
-
23
- generated_text = tokenizerM.decode(gneration[0], skip_special_tokens=True)
24
- bayts = generated_text.split("[SOB]")
25
- while("BSEP" not in bayts[-1]):
26
- bayts = bayts[:-1]
27
- # if(len(bayts[-1]) < 2):
28
- # bayts = bayts[:-1]
29
- bayts = bayts[:-1]
30
- temp_poem = ''
31
- for b in range(len(bayts)):
32
- temp_line = bayts[b].split('[BSEP]')
33
- temp_poem = temp_poem + temp_line[1] + ' - ' + temp_line[0] +'\n'
34
-
35
- return temp_poem
36
-
37
-
38
-
39
- gr.Interface(fn=generate_response,
40
- title = 'BERTShared - meter based generation',
41
- # description ='''
42
- # topics : ['حزينه','هجاء','عتاب','غزل','مدح','رومنسيه','دينية','وطنيه']
43
- # ''',
44
- inputs=[
45
- gr.inputs.Radio(['الرمل','البسيط','الخفيف','الكامل','السريع','الطويل','المتقارب','الرجز','المجتث','المنسرح','الوافر','المقتضب','الهزج','المديد','المضارع'],label='Choose Meter'),
46
- gr.inputs.Slider(10, 200, step=10,default = 70, label='Top-K'),
47
- gr.inputs.Slider(0.10, 0.99, step=0.02, default = 0.70, label='Top-P'),
48
- # gr.inputs.Slider(1, 20, step=1, default = 4, label='Beams'),
49
- ],
50
- outputs="text").launch()
51
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AchyuthGamer/OpenGPT-Chat-UI/src/app.d.ts DELETED
@@ -1,20 +0,0 @@
1
- /// <reference types="@sveltejs/kit" />
2
- /// <reference types="unplugin-icons/types/svelte" />
3
-
4
- import type { User } from "$lib/types/User";
5
-
6
- // See https://kit.svelte.dev/docs/types#app
7
- // for information about these interfaces
8
- declare global {
9
- namespace App {
10
- // interface Error {}
11
- interface Locals {
12
- sessionId: string;
13
- user?: User;
14
- }
15
- // interface PageData {}
16
- // interface Platform {}
17
- }
18
- }
19
-
20
- export {};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AchyuthGamer/OpenGPT-Chat-UI/src/lib/buildPrompt.ts DELETED
@@ -1,34 +0,0 @@
1
- import type { BackendModel } from "./server/models";
2
- import type { Message } from "./types/Message";
3
- import { collections } from "$lib/server/database";
4
- import { authCondition } from "./server/auth";
5
- /**
6
- * Convert [{user: "assistant", content: "hi"}, {user: "user", content: "hello"}] to:
7
- *
8
- * <|assistant|>hi<|endoftext|><|prompter|>hello<|endoftext|><|assistant|>
9
- */
10
-
11
- interface buildPromptOptions {
12
- messages: Pick<Message, "from" | "content">[];
13
- model: BackendModel;
14
- locals?: App.Locals;
15
- webSearchId?: string;
16
- preprompt?: string;
17
- }
18
-
19
- export async function buildPrompt({
20
- messages,
21
- model,
22
- locals,
23
- webSearchId,
24
- preprompt,
25
- }: buildPromptOptions): Promise<string> {
26
- return (
27
- model
28
- .chatPromptRender({ messages, preprompt })
29
- // Not super precise, but it's truncated in the model's backend anyway
30
- .split(" ")
31
- .slice(-(model.parameters?.truncate ?? 0))
32
- .join(" ")
33
- );
34
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/menu/methods/Methods.js DELETED
@@ -1,18 +0,0 @@
1
- import SetTransitCallbackMethods from './SetTransitCallbackMethods.js';
2
- import DelayCallMethods from './DelayCallMethods.js';
3
- import ExpandSubMenu from './ExpandSubMenu.js';
4
- import Collapse from './Collapse.js';
5
- import CollapseSubMenu from './CollapseSubMenu.js';
6
-
7
- var Methods = {
8
- expandSubMenu: ExpandSubMenu,
9
- collapse: Collapse,
10
- collapseSubMenu: CollapseSubMenu,
11
- }
12
-
13
- Object.assign(
14
- Methods,
15
- SetTransitCallbackMethods,
16
- DelayCallMethods
17
- )
18
- export default Methods;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/numberbar/Factory.d.ts DELETED
@@ -1,5 +0,0 @@
1
- import NumberBar from './NumberBar';
2
-
3
- export default function (
4
- config?: NumberBar.IConfig
5
- ): NumberBar;
 
 
 
 
 
 
spaces/Alifarsi/news_summarizer/README.md DELETED
@@ -1,37 +0,0 @@
1
- ---
2
- title: News_summarizer
3
- emoji: 🌖
4
- colorFrom: indigo
5
- colorTo: purple
6
- sdk: gradio
7
- app_file: app.py
8
- pinned: false
9
- ---
10
-
11
- # Configuration
12
-
13
- `title`: _string_
14
- Display title for the Space
15
-
16
- `emoji`: _string_
17
- Space emoji (emoji-only character allowed)
18
-
19
- `colorFrom`: _string_
20
- Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray)
21
-
22
- `colorTo`: _string_
23
- Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray)
24
-
25
- `sdk`: _string_
26
- Can be either `gradio` or `streamlit`
27
-
28
- `sdk_version` : _string_
29
- Only applicable for `streamlit` SDK.
30
- See [doc](https://hf.co/docs/hub/spaces) for more info on supported versions.
31
-
32
- `app_file`: _string_
33
- Path to your main application file (which contains either `gradio` or `streamlit` Python code).
34
- Path is relative to the root of the repository.
35
-
36
- `pinned`: _boolean_
37
- Whether the Space stays on top of your list.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Amon1/ChatGPTForAcadamic/config.py DELETED
@@ -1,48 +0,0 @@
1
- import os
2
-
3
- # [step 1]>> 例如: API_KEY = "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" (此key无效)
4
- # Put your own API_KEY into `OPENAI_API_KEY` environment.
5
- API_KEY = os.environ.get('OPENAI_API_KEY')
6
-
7
- # [step 2]>> 改为True应用代理,如果直接在海外服务器部署,此处不修改
8
- USE_PROXY = False
9
- if USE_PROXY:
10
- # 填写格式是 [协议]:// [地址] :[端口],填写之前不要忘记把USE_PROXY改成True,如果直接在海外服务器部署,此处不修改
11
- # 例如 "socks5h://localhost:11284"
12
- # [协议] 常见协议无非socks5h/http; 例如 v2**y 和 ss* 的默认本地协议是socks5h; 而cl**h 的默认本地协议是http
13
- # [地址] 懂的都懂,不懂就填localhost或者127.0.0.1肯定错不了(localhost意思是代理软件安装在本机上)
14
- # [端口] 在代理软件的设置里找。虽然不同的代理软件界面不一样,但端口号都应该在最显眼的位置上
15
-
16
- # 代理网络的地址,打开你的科学上网软件查看代理的协议(socks5/http)、地址(localhost)和端口(11284)
17
- proxies = {
18
- # [协议]:// [地址] :[端口]
19
- "http": "socks5h://localhost:11284",
20
- "https": "socks5h://localhost:11284",
21
- }
22
- else:
23
- proxies = None
24
-
25
- # [step 3]>> 以下配置可以优化体验,但大部分场合下并不需要修改
26
- # 对话窗的高度
27
- CHATBOT_HEIGHT = 1115
28
-
29
- # 发送请求到OpenAI后,等待多久判定为超时
30
- TIMEOUT_SECONDS = 25
31
-
32
- # 网页的端口, -1代表随机端口
33
- WEB_PORT = 7860
34
-
35
- # 如果OpenAI不响应(网络卡顿、代理失败、KEY失效),重试的次数限制
36
- MAX_RETRY = 2
37
-
38
- # OpenAI模型选择是(gpt4现在只对申请成功的人开放)
39
- LLM_MODEL = "gpt-3.5-turbo"
40
-
41
- # OpenAI的API_URL
42
- API_URL = "https://api.openai.com/v1/chat/completions"
43
-
44
- # 设置并行使用的线程数
45
- CONCURRENT_COUNT = 100
46
-
47
- # 设置用户名和密码(相关功能不稳定,与gradio版本和网络都相关,如果本地使用不建议加这个)
48
- AUTHENTICATION = [] # [("username", "password"), ("username2", "password2"), ...]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/tests/models/__init__.py DELETED
File without changes
spaces/Andy1621/uniformer_image_detection/mmdet/models/backbones/detectors_resnext.py DELETED
@@ -1,122 +0,0 @@
1
- import math
2
-
3
- from mmcv.cnn import build_conv_layer, build_norm_layer
4
-
5
- from ..builder import BACKBONES
6
- from .detectors_resnet import Bottleneck as _Bottleneck
7
- from .detectors_resnet import DetectoRS_ResNet
8
-
9
-
10
- class Bottleneck(_Bottleneck):
11
- expansion = 4
12
-
13
- def __init__(self,
14
- inplanes,
15
- planes,
16
- groups=1,
17
- base_width=4,
18
- base_channels=64,
19
- **kwargs):
20
- """Bottleneck block for ResNeXt.
21
-
22
- If style is "pytorch", the stride-two layer is the 3x3 conv layer, if
23
- it is "caffe", the stride-two layer is the first 1x1 conv layer.
24
- """
25
- super(Bottleneck, self).__init__(inplanes, planes, **kwargs)
26
-
27
- if groups == 1:
28
- width = self.planes
29
- else:
30
- width = math.floor(self.planes *
31
- (base_width / base_channels)) * groups
32
-
33
- self.norm1_name, norm1 = build_norm_layer(
34
- self.norm_cfg, width, postfix=1)
35
- self.norm2_name, norm2 = build_norm_layer(
36
- self.norm_cfg, width, postfix=2)
37
- self.norm3_name, norm3 = build_norm_layer(
38
- self.norm_cfg, self.planes * self.expansion, postfix=3)
39
-
40
- self.conv1 = build_conv_layer(
41
- self.conv_cfg,
42
- self.inplanes,
43
- width,
44
- kernel_size=1,
45
- stride=self.conv1_stride,
46
- bias=False)
47
- self.add_module(self.norm1_name, norm1)
48
- fallback_on_stride = False
49
- self.with_modulated_dcn = False
50
- if self.with_dcn:
51
- fallback_on_stride = self.dcn.pop('fallback_on_stride', False)
52
- if self.with_sac:
53
- self.conv2 = build_conv_layer(
54
- self.sac,
55
- width,
56
- width,
57
- kernel_size=3,
58
- stride=self.conv2_stride,
59
- padding=self.dilation,
60
- dilation=self.dilation,
61
- groups=groups,
62
- bias=False)
63
- elif not self.with_dcn or fallback_on_stride:
64
- self.conv2 = build_conv_layer(
65
- self.conv_cfg,
66
- width,
67
- width,
68
- kernel_size=3,
69
- stride=self.conv2_stride,
70
- padding=self.dilation,
71
- dilation=self.dilation,
72
- groups=groups,
73
- bias=False)
74
- else:
75
- assert self.conv_cfg is None, 'conv_cfg must be None for DCN'
76
- self.conv2 = build_conv_layer(
77
- self.dcn,
78
- width,
79
- width,
80
- kernel_size=3,
81
- stride=self.conv2_stride,
82
- padding=self.dilation,
83
- dilation=self.dilation,
84
- groups=groups,
85
- bias=False)
86
-
87
- self.add_module(self.norm2_name, norm2)
88
- self.conv3 = build_conv_layer(
89
- self.conv_cfg,
90
- width,
91
- self.planes * self.expansion,
92
- kernel_size=1,
93
- bias=False)
94
- self.add_module(self.norm3_name, norm3)
95
-
96
-
97
- @BACKBONES.register_module()
98
- class DetectoRS_ResNeXt(DetectoRS_ResNet):
99
- """ResNeXt backbone for DetectoRS.
100
-
101
- Args:
102
- groups (int): The number of groups in ResNeXt.
103
- base_width (int): The base width of ResNeXt.
104
- """
105
-
106
- arch_settings = {
107
- 50: (Bottleneck, (3, 4, 6, 3)),
108
- 101: (Bottleneck, (3, 4, 23, 3)),
109
- 152: (Bottleneck, (3, 8, 36, 3))
110
- }
111
-
112
- def __init__(self, groups=1, base_width=4, **kwargs):
113
- self.groups = groups
114
- self.base_width = base_width
115
- super(DetectoRS_ResNeXt, self).__init__(**kwargs)
116
-
117
- def make_res_layer(self, **kwargs):
118
- return super().make_res_layer(
119
- groups=self.groups,
120
- base_width=self.base_width,
121
- base_channels=self.base_channels,
122
- **kwargs)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Andy1621/uniformer_image_segmentation/configs/ccnet/README.md DELETED
@@ -1,47 +0,0 @@
1
- # CCNet: Criss-Cross Attention for Semantic Segmentation
2
-
3
- ## Introduction
4
-
5
- <!-- [ALGORITHM] -->
6
-
7
- ```latex
8
- @article{huang2018ccnet,
9
- title={CCNet: Criss-Cross Attention for Semantic Segmentation},
10
- author={Huang, Zilong and Wang, Xinggang and Huang, Lichao and Huang, Chang and Wei, Yunchao and Liu, Wenyu},
11
- booktitle={ICCV},
12
- year={2019}
13
- }
14
- ```
15
-
16
- ## Results and models
17
-
18
- ### Cityscapes
19
-
20
- | Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | config | download |
21
- | ------ | -------- | --------- | ------: | -------- | -------------- | ----: | ------------: | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
22
- | CCNet | R-50-D8 | 512x1024 | 40000 | 6 | 3.32 | 77.76 | 78.87 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/ccnet/ccnet_r50-d8_512x1024_40k_cityscapes.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x1024_40k_cityscapes/ccnet_r50-d8_512x1024_40k_cityscapes_20200616_142517-4123f401.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x1024_40k_cityscapes/ccnet_r50-d8_512x1024_40k_cityscapes_20200616_142517.log.json) |
23
- | CCNet | R-101-D8 | 512x1024 | 40000 | 9.5 | 2.31 | 76.35 | 78.19 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/ccnet/ccnet_r101-d8_512x1024_40k_cityscapes.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x1024_40k_cityscapes/ccnet_r101-d8_512x1024_40k_cityscapes_20200616_142540-a3b84ba6.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x1024_40k_cityscapes/ccnet_r101-d8_512x1024_40k_cityscapes_20200616_142540.log.json) |
24
- | CCNet | R-50-D8 | 769x769 | 40000 | 6.8 | 1.43 | 78.46 | 79.93 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/ccnet/ccnet_r50-d8_769x769_40k_cityscapes.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_769x769_40k_cityscapes/ccnet_r50-d8_769x769_40k_cityscapes_20200616_145125-76d11884.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_769x769_40k_cityscapes/ccnet_r50-d8_769x769_40k_cityscapes_20200616_145125.log.json) |
25
- | CCNet | R-101-D8 | 769x769 | 40000 | 10.7 | 1.01 | 76.94 | 78.62 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/ccnet/ccnet_r101-d8_769x769_40k_cityscapes.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_769x769_40k_cityscapes/ccnet_r101-d8_769x769_40k_cityscapes_20200617_101428-4f57c8d0.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_769x769_40k_cityscapes/ccnet_r101-d8_769x769_40k_cityscapes_20200617_101428.log.json) |
26
- | CCNet | R-50-D8 | 512x1024 | 80000 | - | - | 79.03 | 80.16 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/ccnet/ccnet_r50-d8_512x1024_80k_cityscapes.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x1024_80k_cityscapes/ccnet_r50-d8_512x1024_80k_cityscapes_20200617_010421-869a3423.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x1024_80k_cityscapes/ccnet_r50-d8_512x1024_80k_cityscapes_20200617_010421.log.json) |
27
- | CCNet | R-101-D8 | 512x1024 | 80000 | - | - | 78.87 | 79.90 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/ccnet/ccnet_r101-d8_512x1024_80k_cityscapes.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x1024_80k_cityscapes/ccnet_r101-d8_512x1024_80k_cityscapes_20200617_203935-ffae8917.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x1024_80k_cityscapes/ccnet_r101-d8_512x1024_80k_cityscapes_20200617_203935.log.json) |
28
- | CCNet | R-50-D8 | 769x769 | 80000 | - | - | 79.29 | 81.08 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/ccnet/ccnet_r50-d8_769x769_80k_cityscapes.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_769x769_80k_cityscapes/ccnet_r50-d8_769x769_80k_cityscapes_20200617_010421-73eed8ca.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_769x769_80k_cityscapes/ccnet_r50-d8_769x769_80k_cityscapes_20200617_010421.log.json) |
29
- | CCNet | R-101-D8 | 769x769 | 80000 | - | - | 79.45 | 80.66 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/ccnet/ccnet_r101-d8_769x769_80k_cityscapes.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_769x769_80k_cityscapes/ccnet_r101-d8_769x769_80k_cityscapes_20200618_011502-ad3cd481.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_769x769_80k_cityscapes/ccnet_r101-d8_769x769_80k_cityscapes_20200618_011502.log.json) |
30
-
31
- ### ADE20K
32
-
33
- | Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | config | download |
34
- | ------ | -------- | --------- | ------: | -------- | -------------- | ----: | ------------: | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
35
- | CCNet | R-50-D8 | 512x512 | 80000 | 8.8 | 20.89 | 41.78 | 42.98 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/ccnet/ccnet_r50-d8_512x512_80k_ade20k.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x512_80k_ade20k/ccnet_r50-d8_512x512_80k_ade20k_20200615_014848-aa37f61e.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x512_80k_ade20k/ccnet_r50-d8_512x512_80k_ade20k_20200615_014848.log.json) |
36
- | CCNet | R-101-D8 | 512x512 | 80000 | 12.2 | 14.11 | 43.97 | 45.13 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/ccnet/ccnet_r101-d8_512x512_80k_ade20k.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x512_80k_ade20k/ccnet_r101-d8_512x512_80k_ade20k_20200615_014848-1f4929a3.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x512_80k_ade20k/ccnet_r101-d8_512x512_80k_ade20k_20200615_014848.log.json) |
37
- | CCNet | R-50-D8 | 512x512 | 160000 | - | - | 42.08 | 43.13 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/ccnet/ccnet_r50-d8_512x512_160k_ade20k.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x512_160k_ade20k/ccnet_r50-d8_512x512_160k_ade20k_20200616_084435-7c97193b.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x512_160k_ade20k/ccnet_r50-d8_512x512_160k_ade20k_20200616_084435.log.json) |
38
- | CCNet | R-101-D8 | 512x512 | 160000 | - | - | 43.71 | 45.04 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/ccnet/ccnet_r101-d8_512x512_160k_ade20k.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x512_160k_ade20k/ccnet_r101-d8_512x512_160k_ade20k_20200616_000644-e849e007.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x512_160k_ade20k/ccnet_r101-d8_512x512_160k_ade20k_20200616_000644.log.json) |
39
-
40
- ### Pascal VOC 2012 + Aug
41
-
42
- | Method | Backbone | Crop Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | config | download |
43
- | ------ | -------- | --------- | ------: | -------- | -------------- | ----: | ------------: | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
44
- | CCNet | R-50-D8 | 512x512 | 20000 | 6 | 20.45 | 76.17 | 77.51 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/ccnet/ccnet_r50-d8_512x512_20k_voc12aug.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x512_20k_voc12aug/ccnet_r50-d8_512x512_20k_voc12aug_20200617_193212-fad81784.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x512_20k_voc12aug/ccnet_r50-d8_512x512_20k_voc12aug_20200617_193212.log.json) |
45
- | CCNet | R-101-D8 | 512x512 | 20000 | 9.5 | 13.64 | 77.27 | 79.02 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/ccnet/ccnet_r101-d8_512x512_20k_voc12aug.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x512_20k_voc12aug/ccnet_r101-d8_512x512_20k_voc12aug_20200617_193212-0007b61d.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x512_20k_voc12aug/ccnet_r101-d8_512x512_20k_voc12aug_20200617_193212.log.json) |
46
- | CCNet | R-50-D8 | 512x512 | 40000 | - | - | 75.96 | 77.04 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/ccnet/ccnet_r50-d8_512x512_40k_voc12aug.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x512_40k_voc12aug/ccnet_r50-d8_512x512_40k_voc12aug_20200613_232127-c2a15f02.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r50-d8_512x512_40k_voc12aug/ccnet_r50-d8_512x512_40k_voc12aug_20200613_232127.log.json) |
47
- | CCNet | R-101-D8 | 512x512 | 40000 | - | - | 77.87 | 78.90 | [config](https://github.com/open-mmlab/mmsegmentation/blob/master/configs/ccnet/ccnet_r101-d8_512x512_40k_voc12aug.py) | [model](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x512_40k_voc12aug/ccnet_r101-d8_512x512_40k_voc12aug_20200613_232127-c30da577.pth) &#124; [log](https://download.openmmlab.com/mmsegmentation/v0.5/ccnet/ccnet_r101-d8_512x512_40k_voc12aug/ccnet_r101-d8_512x512_40k_voc12aug_20200613_232127.log.json) |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AnimalEquality/chatbot/README.md DELETED
@@ -1,127 +0,0 @@
1
- ---
2
- title: lv-recipe-chatbot
3
- emoji: 🫑
4
- colorFrom: green
5
- colorTo: indigo
6
- sdk: gradio
7
- sdk_version: 3.23.0
8
- app_file: app.py
9
- pinned: false
10
- license: unknown
11
- ---
12
- # lv-recipe-chatbot
13
-
14
- <!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
15
-
16
- ## Install
17
-
18
- ``` sh
19
- pip install -e '.[dev]'
20
- ```
21
-
22
- ## How to use
23
-
24
- ``` python
25
- from dotenv import load_dotenv
26
-
27
- load_dotenv() # or load environment vars with different method
28
-
29
- demo = app.create_demo(app.ConversationBot())
30
- demo.launch()
31
- ```
32
-
33
- Running on local URL: http://127.0.0.1:7860
34
-
35
- To create a public link, set `share=True` in `launch()`.
36
-
37
- <div><iframe src="http://127.0.0.1:7860/" width="100%" height="500" allow="autoplay; camera; microphone; clipboard-read; clipboard-write;" frameborder="0" allowfullscreen></iframe></div>
38
-
39
- or
40
-
41
- ``` sh
42
- python3 app.py
43
- ```
44
-
45
- ## Dev quick-start
46
-
47
- `git clone` the repo
48
-
49
- ``` sh
50
- cd lv-recipe-chatbot
51
- ```
52
-
53
- Make sure to use the version of python specified in `py_version.txt`
54
- Create a virtual environment.
55
-
56
- ``` sh
57
- python3 -m venv env
58
- ```
59
-
60
- Activate the env and install dependencies.
61
-
62
- ``` sh
63
- source env/bin/activate
64
- pip install -r requirements.txt
65
- pip install -r requirements/dev.txt
66
- ```
67
-
68
- To make the Jupyter environment, git friendly: `nbdev_install_hooks`
69
- If you want to render documentation locally, you will want to [install
70
- Quarto](https://nbdev.fast.ai/tutorials/tutorial.html#install-quarto).
71
-
72
- `nbdev_install_quarto`
73
-
74
- Put API secrets in .env
75
-
76
- ``` sh
77
- cp .env.example .env
78
- ```
79
-
80
- Edit .env with your secret key(s). Only `OPEN_AI_KEY` is required.
81
-
82
- Then start the Gradio demo from within the virtual environment.
83
-
84
- ``` sh
85
- python3 app.py
86
- ```
87
-
88
- Preview documentation
89
-
90
- ``` sh
91
- nbdev_preview
92
- ```
93
-
94
- ## Dependencies
95
-
96
- If a new dependency for development is helpful for developers, add it to
97
- `dev.txt`.
98
- If it is a dependency for the app that is imported in source code, add
99
- it to `core.txt`.
100
- Then run:
101
-
102
- ``` sh
103
- scripts/pin_requirements.sh
104
- ```
105
-
106
- This will update our `requirements.txt` to include the dependency as it
107
- should be pinned in the environment.
108
-
109
- ## Development
110
-
111
- [quick nbdev tutorial](https://nbdev.fast.ai/tutorials)
112
-
113
- Make changes in `/nbs`.
114
- Update the package files with `nbdev_export` then reimport with
115
- `pip install -e '.[dev]'`
116
-
117
- Preview doc `nbdev_preview`
118
- Build docs, test and update README `nbdev_prepare`
119
-
120
- ## Useful links
121
-
122
- - [Task Matrix (Formerly Visual
123
- ChatGPT)](https://github.com/microsoft/TaskMatrix)
124
- - [LangChain](https://python.langchain.com/en/latest/index.html)
125
- - [LLM Prompt Engineering](https://www.promptingguide.ai)
126
- - [OpenAI best practices for
127
- prompts](https://help.openai.com/en/articles/6654000-best-practices-for-prompt-engineering-with-openai-api)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Arnx/MusicGenXvAKN/tests/common_utils/__init__.py DELETED
@@ -1,9 +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
- # flake8: noqa
8
- from .temp_utils import TempDirMixin
9
- from .wav_utils import get_batch_white_noise, get_white_noise, save_wav
 
 
 
 
 
 
 
 
 
 
spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/tenacity/_utils.py DELETED
@@ -1,76 +0,0 @@
1
- # Copyright 2016 Julien Danjou
2
- # Copyright 2016 Joshua Harlow
3
- # Copyright 2013-2014 Ray Holder
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
-
17
- import sys
18
- import typing
19
- from datetime import timedelta
20
-
21
-
22
- # sys.maxsize:
23
- # An integer giving the maximum value a variable of type Py_ssize_t can take.
24
- MAX_WAIT = sys.maxsize / 2
25
-
26
-
27
- def find_ordinal(pos_num: int) -> str:
28
- # See: https://en.wikipedia.org/wiki/English_numerals#Ordinal_numbers
29
- if pos_num == 0:
30
- return "th"
31
- elif pos_num == 1:
32
- return "st"
33
- elif pos_num == 2:
34
- return "nd"
35
- elif pos_num == 3:
36
- return "rd"
37
- elif 4 <= pos_num <= 20:
38
- return "th"
39
- else:
40
- return find_ordinal(pos_num % 10)
41
-
42
-
43
- def to_ordinal(pos_num: int) -> str:
44
- return f"{pos_num}{find_ordinal(pos_num)}"
45
-
46
-
47
- def get_callback_name(cb: typing.Callable[..., typing.Any]) -> str:
48
- """Get a callback fully-qualified name.
49
-
50
- If no name can be produced ``repr(cb)`` is called and returned.
51
- """
52
- segments = []
53
- try:
54
- segments.append(cb.__qualname__)
55
- except AttributeError:
56
- try:
57
- segments.append(cb.__name__)
58
- except AttributeError:
59
- pass
60
- if not segments:
61
- return repr(cb)
62
- else:
63
- try:
64
- # When running under sphinx it appears this can be none?
65
- if cb.__module__:
66
- segments.insert(0, cb.__module__)
67
- except AttributeError:
68
- pass
69
- return ".".join(segments)
70
-
71
-
72
- time_unit_type = typing.Union[int, float, timedelta]
73
-
74
-
75
- def to_seconds(time_unit: time_unit_type) -> float:
76
- return float(time_unit.total_seconds() if isinstance(time_unit, timedelta) else time_unit)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Banbri/zcvzcv/src/app/layouts/new_layouts.tsx DELETED
@@ -1,273 +0,0 @@
1
- "use client"
2
-
3
- import { Panel } from "@/app/interface/panel"
4
- import { pick } from "@/lib/pick"
5
- import { Grid } from "@/app/interface/grid"
6
-
7
- export function Layout1() {
8
- return (
9
- <Grid className="grid-cols-2 grid-rows-4">
10
- <div className="bg-stone-100">
11
- <Panel
12
- panel={0}
13
- width={1024}
14
- height={768}
15
- />
16
- </div>
17
- <div className="bg-zinc-100 row-span-2">
18
- <Panel
19
- panel={1}
20
- width={512}
21
- height={1024}
22
- />
23
- </div>
24
- <div className="bg-gray-100 row-span-2 col-span-1">
25
- <Panel
26
- panel={2}
27
- width={512}
28
- height={1024}
29
- />
30
- </div>
31
- <div className="bg-slate-100">
32
- <Panel
33
- panel={3}
34
- width={1024}
35
- height={768}
36
- />
37
- </div>
38
- <div className="bg-slate-100 row-span-1 col-span-2">
39
- <Panel
40
- panel={4}
41
- width={1024}
42
- height={768}
43
- />
44
- </div>
45
- </Grid>
46
- )
47
- }
48
-
49
- export function Layout2() {
50
- return (
51
- <Grid className="grid-cols-2 grid-rows-3">
52
- <div className="bg-gray-100 row-span-2 col-span-1">
53
- <Panel
54
- panel={0}
55
- width={768}
56
- height={1024}
57
- />
58
- </div>
59
- <div className="bg-gray-100 row-span-1 col-span-1">
60
- <Panel
61
- panel={1}
62
- width={1024}
63
- height={1024}
64
- />
65
- </div>
66
- <div className="bg-slate-100">
67
- <Panel
68
- panel={2}
69
- width={1024}
70
- height={768}
71
- />
72
- </div>
73
- <div className="bg-stone-100">
74
- <Panel
75
- panel={3}
76
- width={1024}
77
- height={768}
78
- />
79
- </div>
80
- <div className="bg-zinc-100 row-span-1 col-span-1">
81
- <Panel
82
- panel={4}
83
- width={1024}
84
- height={768}
85
- />
86
- </div>
87
- </Grid>
88
- )
89
- }
90
-
91
- export function Layout3() {
92
- return (
93
- <Grid className="grid-cols-5 grid-rows-2">
94
- <div className="bg-zinc-100 col-span-3">
95
- <Panel
96
- panel={0}
97
- width={1024}
98
- height={1024}
99
- />
100
- </div>
101
- <div className="bg-gray-100 col-span-2 row-span-1">
102
- <Panel
103
- panel={1}
104
- width={512}
105
- height={1024}
106
- />
107
- </div>
108
- <div className="bg-gray-100 col-span-2 row-span-1">
109
- <Panel
110
- panel={2}
111
- width={512}
112
- height={1024}
113
- />
114
- </div>
115
- <div className="col-span-3 grid grid-cols-2 gap-2">
116
- <div className="bg-stone-100">
117
- <Panel
118
- panel={3}
119
- width={512}
120
- height={1024}
121
- />
122
- </div>
123
- <div className="bg-slate-100">
124
- <Panel
125
- panel={4}
126
- width={512}
127
- height={1024}
128
- />
129
- </div>
130
- </div>
131
- </Grid>
132
- )
133
- }
134
-
135
- export function Layout4() {
136
- return (
137
- <Grid className="grid-cols-2 grid-rows-3">
138
- <div className="bg-slate-100 row-span-2">
139
- <Panel
140
- panel={0}
141
- width={768}
142
- height={1024}
143
- />
144
- </div>
145
- <div className="bg-gray-100 row-span-1 col-span-1">
146
- <Panel
147
- panel={1}
148
- width={1024}
149
- height={768}
150
- />
151
- </div>
152
- <div className="bg-zinc-100 row-span-2">
153
- <Panel
154
- panel={2}
155
- width={1024}
156
- height={768}
157
- />
158
- </div>
159
- <div className="bg-stone-100">
160
- <Panel
161
- panel={3}
162
- width={768}
163
- height={1024}
164
- />
165
- </div>
166
- </Grid>
167
- )
168
- }
169
-
170
-
171
- export function Layout5() {
172
- return (
173
- <Grid className="grid-cols-3 grid-rows-3">
174
- <div className="bg-zinc-100 col-span-2 row-span-1">
175
- <Panel
176
- panel={0}
177
- width={1024}
178
- height={512}
179
- />
180
- </div>
181
- <div className="bg-zinc-100 col-span-1 row-span-1">
182
- <Panel
183
- panel={1}
184
- width={1024}
185
- height={768}
186
- />
187
- </div>
188
- <div className="bg-stone-100 row-span-1 col-span-1">
189
- <Panel
190
- panel={2}
191
- width={768}
192
- height={1024}
193
- />
194
- </div>
195
- <div className="bg-slate-100 row-span-1 col-span-2">
196
- <Panel
197
- panel={3}
198
- width={1024}
199
- height={768}
200
- />
201
- </div>
202
- <div className="bg-slate-100 row-span-1 col-span-3">
203
- <Panel
204
- panel={4}
205
- width={1024}
206
- height={1024}
207
- />
208
- </div>
209
- </Grid>
210
- )
211
- }
212
-
213
- export function Layout6() {
214
- return (
215
- <Grid className="grid-cols-3 grid-rows-3">
216
- <div className="bg-zinc-100 col-span-2 row-span-1">
217
- <Panel
218
- panel={0}
219
- width={1024}
220
- height={512}
221
- />
222
- </div>
223
- <div className="bg-zinc-100 col-span-1 row-span-1">
224
- <Panel
225
- panel={1}
226
- width={768}
227
- height={1024}
228
- />
229
- </div>
230
- <div className="bg-stone-100 row-span-1 col-span-1">
231
- <Panel
232
- panel={2}
233
- width={768}
234
- height={1024}
235
- />
236
- </div>
237
- <div className="bg-slate-100 row-span-2 col-span-2">
238
- <Panel
239
- panel={3}
240
- width={1024}
241
- height={1024}
242
- />
243
- </div>
244
- <div className="bg-slate-100 row-span-1 col-span-1">
245
- <Panel
246
- panel={3}
247
- width={768}
248
- height={1024}
249
- />
250
- </div>
251
- </Grid>
252
- )
253
- }
254
-
255
- // export const layouts = { Layout1, Layout2, Layout3, Layout4, Layout5, Layout6 }
256
- export const allLayouts = {
257
- // Layout1,
258
- // Layout2,
259
- // Layout3,
260
- // Layout4,
261
- Layout5,
262
- // Layout6
263
- }
264
-
265
- export type LayoutName = keyof typeof allLayouts
266
-
267
- export function getRandomLayoutName(): LayoutName {
268
- return pick(Object.keys(allLayouts) as LayoutName[]) as LayoutName
269
- }
270
-
271
- export function getRandomLayoutNames(): LayoutName[] {
272
- return Object.keys(allLayouts).sort(() => Math.random() - 0.5) as LayoutName[]
273
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Bart92/RVC_HF/demucs/test.py DELETED
@@ -1,109 +0,0 @@
1
- # Copyright (c) Facebook, Inc. and its 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
- import gzip
8
- import sys
9
- from concurrent import futures
10
-
11
- import musdb
12
- import museval
13
- import torch as th
14
- import tqdm
15
- from scipy.io import wavfile
16
- from torch import distributed
17
-
18
- from .audio import convert_audio
19
- from .utils import apply_model
20
-
21
-
22
- def evaluate(model,
23
- musdb_path,
24
- eval_folder,
25
- workers=2,
26
- device="cpu",
27
- rank=0,
28
- save=False,
29
- shifts=0,
30
- split=False,
31
- overlap=0.25,
32
- is_wav=False,
33
- world_size=1):
34
- """
35
- Evaluate model using museval. Run the model
36
- on a single GPU, the bottleneck being the call to museval.
37
- """
38
-
39
- output_dir = eval_folder / "results"
40
- output_dir.mkdir(exist_ok=True, parents=True)
41
- json_folder = eval_folder / "results/test"
42
- json_folder.mkdir(exist_ok=True, parents=True)
43
-
44
- # we load tracks from the original musdb set
45
- test_set = musdb.DB(musdb_path, subsets=["test"], is_wav=is_wav)
46
- src_rate = 44100 # hardcoded for now...
47
-
48
- for p in model.parameters():
49
- p.requires_grad = False
50
- p.grad = None
51
-
52
- pendings = []
53
- with futures.ProcessPoolExecutor(workers or 1) as pool:
54
- for index in tqdm.tqdm(range(rank, len(test_set), world_size), file=sys.stdout):
55
- track = test_set.tracks[index]
56
-
57
- out = json_folder / f"{track.name}.json.gz"
58
- if out.exists():
59
- continue
60
-
61
- mix = th.from_numpy(track.audio).t().float()
62
- ref = mix.mean(dim=0) # mono mixture
63
- mix = (mix - ref.mean()) / ref.std()
64
- mix = convert_audio(mix, src_rate, model.samplerate, model.audio_channels)
65
- estimates = apply_model(model, mix.to(device),
66
- shifts=shifts, split=split, overlap=overlap)
67
- estimates = estimates * ref.std() + ref.mean()
68
-
69
- estimates = estimates.transpose(1, 2)
70
- references = th.stack(
71
- [th.from_numpy(track.targets[name].audio).t() for name in model.sources])
72
- references = convert_audio(references, src_rate,
73
- model.samplerate, model.audio_channels)
74
- references = references.transpose(1, 2).numpy()
75
- estimates = estimates.cpu().numpy()
76
- win = int(1. * model.samplerate)
77
- hop = int(1. * model.samplerate)
78
- if save:
79
- folder = eval_folder / "wav/test" / track.name
80
- folder.mkdir(exist_ok=True, parents=True)
81
- for name, estimate in zip(model.sources, estimates):
82
- wavfile.write(str(folder / (name + ".wav")), 44100, estimate)
83
-
84
- if workers:
85
- pendings.append((track.name, pool.submit(
86
- museval.evaluate, references, estimates, win=win, hop=hop)))
87
- else:
88
- pendings.append((track.name, museval.evaluate(
89
- references, estimates, win=win, hop=hop)))
90
- del references, mix, estimates, track
91
-
92
- for track_name, pending in tqdm.tqdm(pendings, file=sys.stdout):
93
- if workers:
94
- pending = pending.result()
95
- sdr, isr, sir, sar = pending
96
- track_store = museval.TrackStore(win=44100, hop=44100, track_name=track_name)
97
- for idx, target in enumerate(model.sources):
98
- values = {
99
- "SDR": sdr[idx].tolist(),
100
- "SIR": sir[idx].tolist(),
101
- "ISR": isr[idx].tolist(),
102
- "SAR": sar[idx].tolist()
103
- }
104
-
105
- track_store.add_target(target_name=target, values=values)
106
- json_path = json_folder / f"{track_name}.json.gz"
107
- gzip.open(json_path, "w").write(track_store.json.encode('utf-8'))
108
- if world_size > 1:
109
- distributed.barrier()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Benson/text-generation/Examples/Bubble Shooter Classic Download Pc.md DELETED
@@ -1,64 +0,0 @@
1
-
2
- <h1>Cómo descargar y jugar Bubble Shooter Classic en PC</h1>
3
- <p>Si estás buscando un juego divertido y adictivo que te mantenga entretenido durante horas, deberías probar <strong>Bubble Shooter Classic</strong>. Este juego es un clásico juego de disparos de burbujas que ha existido durante muchos años, pero nunca pasa de moda. Puedes reproducirlo en tus dispositivos móviles, pero ¿sabías que también puedes reproducirlo en tu PC? En este artículo, te mostraremos cómo descargar y jugar Bubble Shooter Classic en PC usando BlueStacks, un emulador de Android. También te daremos algunos consejos y trucos para dominar el juego y superar los niveles. ¡Empecemos! </p>
4
- <h2>bubble shooter classic download pc</h2><br /><p><b><b>Download File</b> &mdash;&mdash;&mdash;&mdash;&mdash; <a href="https://bltlly.com/2v6MGI">https://bltlly.com/2v6MGI</a></b></p><br /><br />
5
- <h2>¿Qué es Bubble Shooter Classic? </h2>
6
- <h3>Una breve introducción al juego y sus características</h3>
7
- <p>Bubble Shooter Classic es un juego donde tienes que disparar burbujas de colores para hacer partidos de tres o más del mismo color. Una vez hecho esto, las burbujas estallarán y desaparecerán. El objetivo es eliminar todas las burbujas de la pantalla antes de que lleguen a la parte inferior. Hay dos modos de juego, Clásico y árcade. En el modo Clásico, tienes que disparar burbujas hacia arriba. En el modo árcade, tienes que disparar burbujas de lado. También hay dos niveles de dificultad, fácil y difícil. Puedes elegir el que se adapte a tu nivel de habilidad. </p>
8
- <p>Bubble Shooter Classic tiene muchas características que lo hacen divertido y desafiante. Por ejemplo, puedes usar potenciadores para ayudarte a eliminar las burbujas más rápido. Hay cuatro tipos de potenciadores: Color Bomb, Rainbow Bubble, Shape Bomb y Time Bomb. Cada uno tiene un efecto diferente en las burbujas. También puedes ganar monedas haciendo estallar burbujas y usarlas para comprar más power-ups. También puede competir con otros jugadores en línea y ver quién puede obtener la puntuación más alta. </p>
9
- <h3>Los beneficios de jugar Bubble Shooter Classic en PC</h3>
10
-
11
- <h2>Cómo descargar e instalar Bubble Shooter Classic en PC</h2>
12
- <h3>Los pasos para descargar e instalar BlueStacks, un emulador de Android</h3>
13
- <p>Para jugar Bubble Shooter Classic en PC, es necesario descargar e instalar BlueStacks primero. BlueStacks es un emulador de Android que te permite ejecutar aplicaciones y juegos de Android en tu PC. Estos son los pasos para descargar e instalar BlueStacks:</p>
14
- <p></p>
15
- <ol>
16
- <li>Ir a <a href="( 6 )">el sitio web oficial de BlueStacks</a> y haga clic en el botón "Descargar BlueStacks". </li>
17
- <li>Espere a que termine la descarga y luego ejecute el archivo de instalación. </li>
18
- <li>Siga las instrucciones en la pantalla para completar el proceso de instalación. </li>
19
- <li>Inicie BlueStacks e inicie sesión con su cuenta de Google. </li>
20
- </ol>
21
- <h3>Los pasos para descargar e instalar Bubble Shooter Classic desde la Google Play Store</h3>
22
- <p>Después de haber instalado BlueStacks, puede descargar e instalar Bubble Shooter Classic desde Google Play Store. Estos son los pasos para hacerlo:</p>
23
- <ol>
24
- <li>Abrir BlueStacks y haga clic en el "Google Play" icono en la pantalla de inicio. </li>
25
- <li>Buscar "Bubble Shooter Classic" en la barra de búsqueda y haga clic en el icono del juego. </li>
26
- <li>Haga clic en el botón "Instalar" y espere a que termine la instalación. </li>
27
- <li>Haga clic en el botón "Abrir" para iniciar el juego. </li>
28
- </ol>
29
- <h2>Cómo jugar Bubble Shooter Classic en PC</h2>
30
- <h3>Las reglas y controles básicos del juego</h3>
31
- <p>Jugar Bubble Shooter Classic en PC es fácil y divertido. Las reglas y controles básicos del juego son los siguientes:</p>
32
- <ul>
33
- <li> Tienes que disparar burbujas para hacer partidos de tres o más del mismo color. </li>
34
- <li> Puede utilizar el ratón o el teclado para apuntar y disparar las burbujas. </li>
35
- <li> Puede cambiar la burbuja actual con la siguiente haciendo clic en ella o presionando la barra espaciadora. </li>
36
- <li> Puedes ver las burbujas restantes y tu puntuación en la parte inferior de la pantalla. </li>
37
- <li> Puede pausar el juego haciendo clic en el botón de menú o presionando la tecla de escape. </li>
38
-
39
- </ul>
40
- <h3>Los consejos y trucos para dominar el juego y superar los niveles</h3>
41
- <p>Bubble Shooter Classic es un juego que requiere estrategia y habilidad. Aquí hay algunos consejos y trucos para ayudarte a dominar el juego y superar los niveles:</p>
42
- <ul>
43
- <li>Trate de apuntar a los grupos de burbujas que tienen el mismo color que su burbuja actual. Esto le ayudará a eliminar más burbujas a la vez y aumentar su puntuación. </li>
44
- <li>Trate de hacer estallar las burbujas que están cerca de la parte inferior de la pantalla. Esto evitará que lleguen a la parte inferior y terminar el juego. </li>
45
- <li>Trate de utilizar los power-ups sabiamente. Pueden ayudarle a eliminar situaciones difíciles y aumentar su puntuación. Sin embargo, son limitadas y cuestan monedas, así que úsalas con moderación. </li>
46
- <li>Intenta completar los niveles lo más rápido posible. Cuanto más rápido completes un nivel, más alta será tu puntuación. </li>
47
- <li>Trate de jugar en el modo árcade si quieres más desafío y variedad. El modo árcade tiene diferentes diseños y obstáculos que hacen que el juego sea más interesante y divertido. </li>
48
- </ul>
49
- <h2>Conclusión</h2>
50
- <h3>Un resumen de los puntos principales y una llamada a la acción</h3>
51
- <p>Bubble Shooter Classic es un clásico juego de disparos de burbujas que puedes jugar en tu PC usando BlueStacks, un emulador de Android. Puedes disfrutar de una pantalla más grande, mejores gráficos y controles más cómodos al reproducirla en tu PC. También puedes acceder a más juegos y aplicaciones desde Google Play Store usando BlueStacks. Para jugar Bubble Shooter Classic en PC, solo tienes que descargar e instalar BlueStacks, a continuación, descargar e instalar Bubble Shooter Classic desde la Google Play Store. Luego, puedes empezar a jugar y divertirte. También puedes seguir nuestros consejos y trucos para dominar el juego y superar los niveles. ¿Qué estás esperando? Descargar Bubble Shooter Classic en PC hoy y disfrutar! </p>
52
- <h2>Preguntas frecuentes</h2>
53
- <h3>Q1: ¿Es Bubble Shooter Classic gratis para jugar? </h3>
54
-
55
- <h3>Q2: ¿Cuántos niveles hay en Bubble Shooter Classic? </h3>
56
- <p>A2: Hay más de 1000 niveles en Bubble Shooter Classic, cada uno con diferentes retos y objetivos. Puedes jugarlos en el orden que quieras. </p>
57
- <h3>Q3: ¿Cuáles son los power-ups en Bubble Shooter Classic? </h3>
58
- <p>A3: Hay cuatro tipos de potenciadores en Bubble Shooter Classic: bomba de color, burbuja de arco iris, bomba de forma y bomba de tiempo. Cada uno tiene un efecto diferente en las burbujas. Puedes comprarlas con monedas o conseguirlas al azar durante el juego. </p>
59
- <h3>Q4: ¿Cómo puedo guardar mi progreso en Bubble Shooter Classic? </h3>
60
- <p>A4: Puedes guardar tu progreso en Bubble Shooter Classic iniciando sesión con tu cuenta de Google. Esto también te permitirá sincronizar tu progreso en diferentes dispositivos. </p>
61
- <h3>Q5: ¿Cómo puedo contactar al desarrollador de Bubble Shooter Classic? </h3>
62
- <p>A5: Puede ponerse en contacto con el desarrollador de Bubble Shooter Classic enviando un correo electrónico a <a href="mailto:[email protected]">[email protected]</a>. También puede visitar su página de Facebook </a> o su <a href="( 3 )">Página de Facebook</a> o su <a href="( 1 )">sitio web</a> para obtener más información y actualizaciones. </p> 64aa2da5cf<br />
63
- <br />
64
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Big-Web/MMSD/env/Lib/site-packages/botocore/docs/sharedexample.py DELETED
@@ -1,227 +0,0 @@
1
- # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License"). You
4
- # may not use this file except in compliance with the License. A copy of
5
- # the License is located at
6
- #
7
- # http://aws.amazon.com/apache2.0/
8
- #
9
- # or in the "license" file accompanying this file. This file is
10
- # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
- # ANY KIND, either express or implied. See the License for the specific
12
- # language governing permissions and limitations under the License.
13
- import numbers
14
- import re
15
-
16
- from botocore.docs.utils import escape_controls
17
- from botocore.utils import parse_timestamp
18
-
19
-
20
- class SharedExampleDocumenter:
21
- def document_shared_example(
22
- self, example, prefix, section, operation_model
23
- ):
24
- """Documents a single shared example based on its definition.
25
-
26
- :param example: The model of the example
27
-
28
- :param prefix: The prefix to use in the method example.
29
-
30
- :param section: The section to write to.
31
-
32
- :param operation_model: The model of the operation used in the example
33
- """
34
- section.style.new_paragraph()
35
- section.write(example.get('description'))
36
- section.style.new_line()
37
- self.document_input(
38
- section, example, prefix, operation_model.input_shape
39
- )
40
- self.document_output(section, example, operation_model.output_shape)
41
-
42
- def document_input(self, section, example, prefix, shape):
43
- input_section = section.add_new_section('input')
44
- input_section.style.start_codeblock()
45
- if prefix is not None:
46
- input_section.write(prefix)
47
- params = example.get('input', {})
48
- comments = example.get('comments')
49
- if comments:
50
- comments = comments.get('input')
51
- param_section = input_section.add_new_section('parameters')
52
- self._document_params(param_section, params, comments, [], shape)
53
- closing_section = input_section.add_new_section('input-close')
54
- closing_section.style.new_line()
55
- closing_section.style.new_line()
56
- closing_section.write('print(response)')
57
- closing_section.style.end_codeblock()
58
-
59
- def document_output(self, section, example, shape):
60
- output_section = section.add_new_section('output')
61
- output_section.style.new_line()
62
- output_section.write('Expected Output:')
63
- output_section.style.new_line()
64
- output_section.style.start_codeblock()
65
- params = example.get('output', {})
66
-
67
- # There might not be an output, but we will return metadata anyway
68
- params['ResponseMetadata'] = {"...": "..."}
69
- comments = example.get('comments')
70
- if comments:
71
- comments = comments.get('output')
72
- self._document_dict(output_section, params, comments, [], shape, True)
73
- closing_section = output_section.add_new_section('output-close')
74
- closing_section.style.end_codeblock()
75
-
76
- def _document(self, section, value, comments, path, shape):
77
- """
78
- :param section: The section to add the docs to.
79
-
80
- :param value: The input / output values representing the parameters that
81
- are included in the example.
82
-
83
- :param comments: The dictionary containing all the comments to be
84
- applied to the example.
85
-
86
- :param path: A list describing where the documenter is in traversing the
87
- parameters. This is used to find the equivalent location
88
- in the comments dictionary.
89
- """
90
- if isinstance(value, dict):
91
- self._document_dict(section, value, comments, path, shape)
92
- elif isinstance(value, list):
93
- self._document_list(section, value, comments, path, shape)
94
- elif isinstance(value, numbers.Number):
95
- self._document_number(section, value, path)
96
- elif shape and shape.type_name == 'timestamp':
97
- self._document_datetime(section, value, path)
98
- else:
99
- self._document_str(section, value, path)
100
-
101
- def _document_dict(
102
- self, section, value, comments, path, shape, top_level=False
103
- ):
104
- dict_section = section.add_new_section('dict-value')
105
- self._start_nested_value(dict_section, '{')
106
- for key, val in value.items():
107
- path.append('.%s' % key)
108
- item_section = dict_section.add_new_section(key)
109
- item_section.style.new_line()
110
- item_comment = self._get_comment(path, comments)
111
- if item_comment:
112
- item_section.write(item_comment)
113
- item_section.style.new_line()
114
- item_section.write("'%s': " % key)
115
-
116
- # Shape could be none if there is no output besides ResponseMetadata
117
- item_shape = None
118
- if shape:
119
- if shape.type_name == 'structure':
120
- item_shape = shape.members.get(key)
121
- elif shape.type_name == 'map':
122
- item_shape = shape.value
123
- self._document(item_section, val, comments, path, item_shape)
124
- path.pop()
125
- dict_section_end = dict_section.add_new_section('ending-brace')
126
- self._end_nested_value(dict_section_end, '}')
127
- if not top_level:
128
- dict_section_end.write(',')
129
-
130
- def _document_params(self, section, value, comments, path, shape):
131
- param_section = section.add_new_section('param-values')
132
- self._start_nested_value(param_section, '(')
133
- for key, val in value.items():
134
- path.append('.%s' % key)
135
- item_section = param_section.add_new_section(key)
136
- item_section.style.new_line()
137
- item_comment = self._get_comment(path, comments)
138
- if item_comment:
139
- item_section.write(item_comment)
140
- item_section.style.new_line()
141
- item_section.write(key + '=')
142
-
143
- # Shape could be none if there are no input parameters
144
- item_shape = None
145
- if shape:
146
- item_shape = shape.members.get(key)
147
- self._document(item_section, val, comments, path, item_shape)
148
- path.pop()
149
- param_section_end = param_section.add_new_section('ending-parenthesis')
150
- self._end_nested_value(param_section_end, ')')
151
-
152
- def _document_list(self, section, value, comments, path, shape):
153
- list_section = section.add_new_section('list-section')
154
- self._start_nested_value(list_section, '[')
155
- item_shape = shape.member
156
- for index, val in enumerate(value):
157
- item_section = list_section.add_new_section(index)
158
- item_section.style.new_line()
159
- path.append('[%s]' % index)
160
- item_comment = self._get_comment(path, comments)
161
- if item_comment:
162
- item_section.write(item_comment)
163
- item_section.style.new_line()
164
- self._document(item_section, val, comments, path, item_shape)
165
- path.pop()
166
- list_section_end = list_section.add_new_section('ending-bracket')
167
- self._end_nested_value(list_section_end, '],')
168
-
169
- def _document_str(self, section, value, path):
170
- # We do the string conversion because this might accept a type that
171
- # we don't specifically address.
172
- safe_value = escape_controls(value)
173
- section.write(f"'{safe_value}',")
174
-
175
- def _document_number(self, section, value, path):
176
- section.write("%s," % str(value))
177
-
178
- def _document_datetime(self, section, value, path):
179
- datetime_tuple = parse_timestamp(value).timetuple()
180
- datetime_str = str(datetime_tuple[0])
181
- for i in range(1, len(datetime_tuple)):
182
- datetime_str += ", " + str(datetime_tuple[i])
183
- section.write("datetime(%s)," % datetime_str)
184
-
185
- def _get_comment(self, path, comments):
186
- key = re.sub(r'^\.', '', ''.join(path))
187
- if comments and key in comments:
188
- return '# ' + comments[key]
189
- else:
190
- return ''
191
-
192
- def _start_nested_value(self, section, start):
193
- section.write(start)
194
- section.style.indent()
195
- section.style.indent()
196
-
197
- def _end_nested_value(self, section, end):
198
- section.style.dedent()
199
- section.style.dedent()
200
- section.style.new_line()
201
- section.write(end)
202
-
203
-
204
- def document_shared_examples(
205
- section, operation_model, example_prefix, shared_examples
206
- ):
207
- """Documents the shared examples
208
-
209
- :param section: The section to write to.
210
-
211
- :param operation_model: The model of the operation.
212
-
213
- :param example_prefix: The prefix to use in the method example.
214
-
215
- :param shared_examples: The shared JSON examples from the model.
216
- """
217
- container_section = section.add_new_section('shared-examples')
218
- container_section.style.new_paragraph()
219
- container_section.style.bold('Examples')
220
- documenter = SharedExampleDocumenter()
221
- for example in shared_examples:
222
- documenter.document_shared_example(
223
- example=example,
224
- section=container_section.add_new_section(example['id']),
225
- prefix=example_prefix,
226
- operation_model=operation_model,
227
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_internal/req/req_file.py DELETED
@@ -1,552 +0,0 @@
1
- """
2
- Requirements file parsing
3
- """
4
-
5
- import logging
6
- import optparse
7
- import os
8
- import re
9
- import shlex
10
- import urllib.parse
11
- from optparse import Values
12
- from typing import (
13
- TYPE_CHECKING,
14
- Any,
15
- Callable,
16
- Dict,
17
- Generator,
18
- Iterable,
19
- List,
20
- Optional,
21
- Tuple,
22
- )
23
-
24
- from pip._internal.cli import cmdoptions
25
- from pip._internal.exceptions import InstallationError, RequirementsFileParseError
26
- from pip._internal.models.search_scope import SearchScope
27
- from pip._internal.network.session import PipSession
28
- from pip._internal.network.utils import raise_for_status
29
- from pip._internal.utils.encoding import auto_decode
30
- from pip._internal.utils.urls import get_url_scheme
31
-
32
- if TYPE_CHECKING:
33
- # NoReturn introduced in 3.6.2; imported only for type checking to maintain
34
- # pip compatibility with older patch versions of Python 3.6
35
- from typing import NoReturn
36
-
37
- from pip._internal.index.package_finder import PackageFinder
38
-
39
- __all__ = ["parse_requirements"]
40
-
41
- ReqFileLines = Iterable[Tuple[int, str]]
42
-
43
- LineParser = Callable[[str], Tuple[str, Values]]
44
-
45
- SCHEME_RE = re.compile(r"^(http|https|file):", re.I)
46
- COMMENT_RE = re.compile(r"(^|\s+)#.*$")
47
-
48
- # Matches environment variable-style values in '${MY_VARIABLE_1}' with the
49
- # variable name consisting of only uppercase letters, digits or the '_'
50
- # (underscore). This follows the POSIX standard defined in IEEE Std 1003.1,
51
- # 2013 Edition.
52
- ENV_VAR_RE = re.compile(r"(?P<var>\$\{(?P<name>[A-Z0-9_]+)\})")
53
-
54
- SUPPORTED_OPTIONS: List[Callable[..., optparse.Option]] = [
55
- cmdoptions.index_url,
56
- cmdoptions.extra_index_url,
57
- cmdoptions.no_index,
58
- cmdoptions.constraints,
59
- cmdoptions.requirements,
60
- cmdoptions.editable,
61
- cmdoptions.find_links,
62
- cmdoptions.no_binary,
63
- cmdoptions.only_binary,
64
- cmdoptions.prefer_binary,
65
- cmdoptions.require_hashes,
66
- cmdoptions.pre,
67
- cmdoptions.trusted_host,
68
- cmdoptions.use_new_feature,
69
- ]
70
-
71
- # options to be passed to requirements
72
- SUPPORTED_OPTIONS_REQ: List[Callable[..., optparse.Option]] = [
73
- cmdoptions.global_options,
74
- cmdoptions.hash,
75
- cmdoptions.config_settings,
76
- ]
77
-
78
- # the 'dest' string values
79
- SUPPORTED_OPTIONS_REQ_DEST = [str(o().dest) for o in SUPPORTED_OPTIONS_REQ]
80
-
81
- logger = logging.getLogger(__name__)
82
-
83
-
84
- class ParsedRequirement:
85
- def __init__(
86
- self,
87
- requirement: str,
88
- is_editable: bool,
89
- comes_from: str,
90
- constraint: bool,
91
- options: Optional[Dict[str, Any]] = None,
92
- line_source: Optional[str] = None,
93
- ) -> None:
94
- self.requirement = requirement
95
- self.is_editable = is_editable
96
- self.comes_from = comes_from
97
- self.options = options
98
- self.constraint = constraint
99
- self.line_source = line_source
100
-
101
-
102
- class ParsedLine:
103
- def __init__(
104
- self,
105
- filename: str,
106
- lineno: int,
107
- args: str,
108
- opts: Values,
109
- constraint: bool,
110
- ) -> None:
111
- self.filename = filename
112
- self.lineno = lineno
113
- self.opts = opts
114
- self.constraint = constraint
115
-
116
- if args:
117
- self.is_requirement = True
118
- self.is_editable = False
119
- self.requirement = args
120
- elif opts.editables:
121
- self.is_requirement = True
122
- self.is_editable = True
123
- # We don't support multiple -e on one line
124
- self.requirement = opts.editables[0]
125
- else:
126
- self.is_requirement = False
127
-
128
-
129
- def parse_requirements(
130
- filename: str,
131
- session: PipSession,
132
- finder: Optional["PackageFinder"] = None,
133
- options: Optional[optparse.Values] = None,
134
- constraint: bool = False,
135
- ) -> Generator[ParsedRequirement, None, None]:
136
- """Parse a requirements file and yield ParsedRequirement instances.
137
-
138
- :param filename: Path or url of requirements file.
139
- :param session: PipSession instance.
140
- :param finder: Instance of pip.index.PackageFinder.
141
- :param options: cli options.
142
- :param constraint: If true, parsing a constraint file rather than
143
- requirements file.
144
- """
145
- line_parser = get_line_parser(finder)
146
- parser = RequirementsFileParser(session, line_parser)
147
-
148
- for parsed_line in parser.parse(filename, constraint):
149
- parsed_req = handle_line(
150
- parsed_line, options=options, finder=finder, session=session
151
- )
152
- if parsed_req is not None:
153
- yield parsed_req
154
-
155
-
156
- def preprocess(content: str) -> ReqFileLines:
157
- """Split, filter, and join lines, and return a line iterator
158
-
159
- :param content: the content of the requirements file
160
- """
161
- lines_enum: ReqFileLines = enumerate(content.splitlines(), start=1)
162
- lines_enum = join_lines(lines_enum)
163
- lines_enum = ignore_comments(lines_enum)
164
- lines_enum = expand_env_variables(lines_enum)
165
- return lines_enum
166
-
167
-
168
- def handle_requirement_line(
169
- line: ParsedLine,
170
- options: Optional[optparse.Values] = None,
171
- ) -> ParsedRequirement:
172
- # preserve for the nested code path
173
- line_comes_from = "{} {} (line {})".format(
174
- "-c" if line.constraint else "-r",
175
- line.filename,
176
- line.lineno,
177
- )
178
-
179
- assert line.is_requirement
180
-
181
- if line.is_editable:
182
- # For editable requirements, we don't support per-requirement
183
- # options, so just return the parsed requirement.
184
- return ParsedRequirement(
185
- requirement=line.requirement,
186
- is_editable=line.is_editable,
187
- comes_from=line_comes_from,
188
- constraint=line.constraint,
189
- )
190
- else:
191
- # get the options that apply to requirements
192
- req_options = {}
193
- for dest in SUPPORTED_OPTIONS_REQ_DEST:
194
- if dest in line.opts.__dict__ and line.opts.__dict__[dest]:
195
- req_options[dest] = line.opts.__dict__[dest]
196
-
197
- line_source = f"line {line.lineno} of {line.filename}"
198
- return ParsedRequirement(
199
- requirement=line.requirement,
200
- is_editable=line.is_editable,
201
- comes_from=line_comes_from,
202
- constraint=line.constraint,
203
- options=req_options,
204
- line_source=line_source,
205
- )
206
-
207
-
208
- def handle_option_line(
209
- opts: Values,
210
- filename: str,
211
- lineno: int,
212
- finder: Optional["PackageFinder"] = None,
213
- options: Optional[optparse.Values] = None,
214
- session: Optional[PipSession] = None,
215
- ) -> None:
216
- if opts.hashes:
217
- logger.warning(
218
- "%s line %s has --hash but no requirement, and will be ignored.",
219
- filename,
220
- lineno,
221
- )
222
-
223
- if options:
224
- # percolate options upward
225
- if opts.require_hashes:
226
- options.require_hashes = opts.require_hashes
227
- if opts.features_enabled:
228
- options.features_enabled.extend(
229
- f for f in opts.features_enabled if f not in options.features_enabled
230
- )
231
-
232
- # set finder options
233
- if finder:
234
- find_links = finder.find_links
235
- index_urls = finder.index_urls
236
- no_index = finder.search_scope.no_index
237
- if opts.no_index is True:
238
- no_index = True
239
- index_urls = []
240
- if opts.index_url and not no_index:
241
- index_urls = [opts.index_url]
242
- if opts.extra_index_urls and not no_index:
243
- index_urls.extend(opts.extra_index_urls)
244
- if opts.find_links:
245
- # FIXME: it would be nice to keep track of the source
246
- # of the find_links: support a find-links local path
247
- # relative to a requirements file.
248
- value = opts.find_links[0]
249
- req_dir = os.path.dirname(os.path.abspath(filename))
250
- relative_to_reqs_file = os.path.join(req_dir, value)
251
- if os.path.exists(relative_to_reqs_file):
252
- value = relative_to_reqs_file
253
- find_links.append(value)
254
-
255
- if session:
256
- # We need to update the auth urls in session
257
- session.update_index_urls(index_urls)
258
-
259
- search_scope = SearchScope(
260
- find_links=find_links,
261
- index_urls=index_urls,
262
- no_index=no_index,
263
- )
264
- finder.search_scope = search_scope
265
-
266
- if opts.pre:
267
- finder.set_allow_all_prereleases()
268
-
269
- if opts.prefer_binary:
270
- finder.set_prefer_binary()
271
-
272
- if session:
273
- for host in opts.trusted_hosts or []:
274
- source = f"line {lineno} of {filename}"
275
- session.add_trusted_host(host, source=source)
276
-
277
-
278
- def handle_line(
279
- line: ParsedLine,
280
- options: Optional[optparse.Values] = None,
281
- finder: Optional["PackageFinder"] = None,
282
- session: Optional[PipSession] = None,
283
- ) -> Optional[ParsedRequirement]:
284
- """Handle a single parsed requirements line; This can result in
285
- creating/yielding requirements, or updating the finder.
286
-
287
- :param line: The parsed line to be processed.
288
- :param options: CLI options.
289
- :param finder: The finder - updated by non-requirement lines.
290
- :param session: The session - updated by non-requirement lines.
291
-
292
- Returns a ParsedRequirement object if the line is a requirement line,
293
- otherwise returns None.
294
-
295
- For lines that contain requirements, the only options that have an effect
296
- are from SUPPORTED_OPTIONS_REQ, and they are scoped to the
297
- requirement. Other options from SUPPORTED_OPTIONS may be present, but are
298
- ignored.
299
-
300
- For lines that do not contain requirements, the only options that have an
301
- effect are from SUPPORTED_OPTIONS. Options from SUPPORTED_OPTIONS_REQ may
302
- be present, but are ignored. These lines may contain multiple options
303
- (although our docs imply only one is supported), and all our parsed and
304
- affect the finder.
305
- """
306
-
307
- if line.is_requirement:
308
- parsed_req = handle_requirement_line(line, options)
309
- return parsed_req
310
- else:
311
- handle_option_line(
312
- line.opts,
313
- line.filename,
314
- line.lineno,
315
- finder,
316
- options,
317
- session,
318
- )
319
- return None
320
-
321
-
322
- class RequirementsFileParser:
323
- def __init__(
324
- self,
325
- session: PipSession,
326
- line_parser: LineParser,
327
- ) -> None:
328
- self._session = session
329
- self._line_parser = line_parser
330
-
331
- def parse(
332
- self, filename: str, constraint: bool
333
- ) -> Generator[ParsedLine, None, None]:
334
- """Parse a given file, yielding parsed lines."""
335
- yield from self._parse_and_recurse(filename, constraint)
336
-
337
- def _parse_and_recurse(
338
- self, filename: str, constraint: bool
339
- ) -> Generator[ParsedLine, None, None]:
340
- for line in self._parse_file(filename, constraint):
341
- if not line.is_requirement and (
342
- line.opts.requirements or line.opts.constraints
343
- ):
344
- # parse a nested requirements file
345
- if line.opts.requirements:
346
- req_path = line.opts.requirements[0]
347
- nested_constraint = False
348
- else:
349
- req_path = line.opts.constraints[0]
350
- nested_constraint = True
351
-
352
- # original file is over http
353
- if SCHEME_RE.search(filename):
354
- # do a url join so relative paths work
355
- req_path = urllib.parse.urljoin(filename, req_path)
356
- # original file and nested file are paths
357
- elif not SCHEME_RE.search(req_path):
358
- # do a join so relative paths work
359
- req_path = os.path.join(
360
- os.path.dirname(filename),
361
- req_path,
362
- )
363
-
364
- yield from self._parse_and_recurse(req_path, nested_constraint)
365
- else:
366
- yield line
367
-
368
- def _parse_file(
369
- self, filename: str, constraint: bool
370
- ) -> Generator[ParsedLine, None, None]:
371
- _, content = get_file_content(filename, self._session)
372
-
373
- lines_enum = preprocess(content)
374
-
375
- for line_number, line in lines_enum:
376
- try:
377
- args_str, opts = self._line_parser(line)
378
- except OptionParsingError as e:
379
- # add offending line
380
- msg = f"Invalid requirement: {line}\n{e.msg}"
381
- raise RequirementsFileParseError(msg)
382
-
383
- yield ParsedLine(
384
- filename,
385
- line_number,
386
- args_str,
387
- opts,
388
- constraint,
389
- )
390
-
391
-
392
- def get_line_parser(finder: Optional["PackageFinder"]) -> LineParser:
393
- def parse_line(line: str) -> Tuple[str, Values]:
394
- # Build new parser for each line since it accumulates appendable
395
- # options.
396
- parser = build_parser()
397
- defaults = parser.get_default_values()
398
- defaults.index_url = None
399
- if finder:
400
- defaults.format_control = finder.format_control
401
-
402
- args_str, options_str = break_args_options(line)
403
-
404
- try:
405
- options = shlex.split(options_str)
406
- except ValueError as e:
407
- raise OptionParsingError(f"Could not split options: {options_str}") from e
408
-
409
- opts, _ = parser.parse_args(options, defaults)
410
-
411
- return args_str, opts
412
-
413
- return parse_line
414
-
415
-
416
- def break_args_options(line: str) -> Tuple[str, str]:
417
- """Break up the line into an args and options string. We only want to shlex
418
- (and then optparse) the options, not the args. args can contain markers
419
- which are corrupted by shlex.
420
- """
421
- tokens = line.split(" ")
422
- args = []
423
- options = tokens[:]
424
- for token in tokens:
425
- if token.startswith("-") or token.startswith("--"):
426
- break
427
- else:
428
- args.append(token)
429
- options.pop(0)
430
- return " ".join(args), " ".join(options)
431
-
432
-
433
- class OptionParsingError(Exception):
434
- def __init__(self, msg: str) -> None:
435
- self.msg = msg
436
-
437
-
438
- def build_parser() -> optparse.OptionParser:
439
- """
440
- Return a parser for parsing requirement lines
441
- """
442
- parser = optparse.OptionParser(add_help_option=False)
443
-
444
- option_factories = SUPPORTED_OPTIONS + SUPPORTED_OPTIONS_REQ
445
- for option_factory in option_factories:
446
- option = option_factory()
447
- parser.add_option(option)
448
-
449
- # By default optparse sys.exits on parsing errors. We want to wrap
450
- # that in our own exception.
451
- def parser_exit(self: Any, msg: str) -> "NoReturn":
452
- raise OptionParsingError(msg)
453
-
454
- # NOTE: mypy disallows assigning to a method
455
- # https://github.com/python/mypy/issues/2427
456
- parser.exit = parser_exit # type: ignore
457
-
458
- return parser
459
-
460
-
461
- def join_lines(lines_enum: ReqFileLines) -> ReqFileLines:
462
- """Joins a line ending in '\' with the previous line (except when following
463
- comments). The joined line takes on the index of the first line.
464
- """
465
- primary_line_number = None
466
- new_line: List[str] = []
467
- for line_number, line in lines_enum:
468
- if not line.endswith("\\") or COMMENT_RE.match(line):
469
- if COMMENT_RE.match(line):
470
- # this ensures comments are always matched later
471
- line = " " + line
472
- if new_line:
473
- new_line.append(line)
474
- assert primary_line_number is not None
475
- yield primary_line_number, "".join(new_line)
476
- new_line = []
477
- else:
478
- yield line_number, line
479
- else:
480
- if not new_line:
481
- primary_line_number = line_number
482
- new_line.append(line.strip("\\"))
483
-
484
- # last line contains \
485
- if new_line:
486
- assert primary_line_number is not None
487
- yield primary_line_number, "".join(new_line)
488
-
489
- # TODO: handle space after '\'.
490
-
491
-
492
- def ignore_comments(lines_enum: ReqFileLines) -> ReqFileLines:
493
- """
494
- Strips comments and filter empty lines.
495
- """
496
- for line_number, line in lines_enum:
497
- line = COMMENT_RE.sub("", line)
498
- line = line.strip()
499
- if line:
500
- yield line_number, line
501
-
502
-
503
- def expand_env_variables(lines_enum: ReqFileLines) -> ReqFileLines:
504
- """Replace all environment variables that can be retrieved via `os.getenv`.
505
-
506
- The only allowed format for environment variables defined in the
507
- requirement file is `${MY_VARIABLE_1}` to ensure two things:
508
-
509
- 1. Strings that contain a `$` aren't accidentally (partially) expanded.
510
- 2. Ensure consistency across platforms for requirement files.
511
-
512
- These points are the result of a discussion on the `github pull
513
- request #3514 <https://github.com/pypa/pip/pull/3514>`_.
514
-
515
- Valid characters in variable names follow the `POSIX standard
516
- <http://pubs.opengroup.org/onlinepubs/9699919799/>`_ and are limited
517
- to uppercase letter, digits and the `_` (underscore).
518
- """
519
- for line_number, line in lines_enum:
520
- for env_var, var_name in ENV_VAR_RE.findall(line):
521
- value = os.getenv(var_name)
522
- if not value:
523
- continue
524
-
525
- line = line.replace(env_var, value)
526
-
527
- yield line_number, line
528
-
529
-
530
- def get_file_content(url: str, session: PipSession) -> Tuple[str, str]:
531
- """Gets the content of a file; it may be a filename, file: URL, or
532
- http: URL. Returns (location, content). Content is unicode.
533
- Respects # -*- coding: declarations on the retrieved files.
534
-
535
- :param url: File path or url.
536
- :param session: PipSession instance.
537
- """
538
- scheme = get_url_scheme(url)
539
-
540
- # Pip has special support for file:// URLs (LocalFSAdapter).
541
- if scheme in ["http", "https", "file"]:
542
- resp = session.get(url)
543
- raise_for_status(resp)
544
- return resp.url, resp.text
545
-
546
- # Assume this is a bare path.
547
- try:
548
- with open(url, "rb") as f:
549
- content = auto_decode(f.read())
550
- except OSError as exc:
551
- raise InstallationError(f"Could not open requirements file: {exc}")
552
- return url, content
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Big-Web/MMSD/env/Lib/site-packages/setuptools/_distutils/ccompiler.py DELETED
@@ -1,1220 +0,0 @@
1
- """distutils.ccompiler
2
-
3
- Contains CCompiler, an abstract base class that defines the interface
4
- for the Distutils compiler abstraction model."""
5
-
6
- import sys
7
- import os
8
- import re
9
-
10
- from distutils.errors import (
11
- CompileError,
12
- LinkError,
13
- UnknownFileError,
14
- DistutilsPlatformError,
15
- DistutilsModuleError,
16
- )
17
- from distutils.spawn import spawn
18
- from distutils.file_util import move_file
19
- from distutils.dir_util import mkpath
20
- from distutils.dep_util import newer_group
21
- from distutils.util import split_quoted, execute
22
- from distutils import log
23
-
24
-
25
- class CCompiler:
26
- """Abstract base class to define the interface that must be implemented
27
- by real compiler classes. Also has some utility methods used by
28
- several compiler classes.
29
-
30
- The basic idea behind a compiler abstraction class is that each
31
- instance can be used for all the compile/link steps in building a
32
- single project. Thus, attributes common to all of those compile and
33
- link steps -- include directories, macros to define, libraries to link
34
- against, etc. -- are attributes of the compiler instance. To allow for
35
- variability in how individual files are treated, most of those
36
- attributes may be varied on a per-compilation or per-link basis.
37
- """
38
-
39
- # 'compiler_type' is a class attribute that identifies this class. It
40
- # keeps code that wants to know what kind of compiler it's dealing with
41
- # from having to import all possible compiler classes just to do an
42
- # 'isinstance'. In concrete CCompiler subclasses, 'compiler_type'
43
- # should really, really be one of the keys of the 'compiler_class'
44
- # dictionary (see below -- used by the 'new_compiler()' factory
45
- # function) -- authors of new compiler interface classes are
46
- # responsible for updating 'compiler_class'!
47
- compiler_type = None
48
-
49
- # XXX things not handled by this compiler abstraction model:
50
- # * client can't provide additional options for a compiler,
51
- # e.g. warning, optimization, debugging flags. Perhaps this
52
- # should be the domain of concrete compiler abstraction classes
53
- # (UnixCCompiler, MSVCCompiler, etc.) -- or perhaps the base
54
- # class should have methods for the common ones.
55
- # * can't completely override the include or library searchg
56
- # path, ie. no "cc -I -Idir1 -Idir2" or "cc -L -Ldir1 -Ldir2".
57
- # I'm not sure how widely supported this is even by Unix
58
- # compilers, much less on other platforms. And I'm even less
59
- # sure how useful it is; maybe for cross-compiling, but
60
- # support for that is a ways off. (And anyways, cross
61
- # compilers probably have a dedicated binary with the
62
- # right paths compiled in. I hope.)
63
- # * can't do really freaky things with the library list/library
64
- # dirs, e.g. "-Ldir1 -lfoo -Ldir2 -lfoo" to link against
65
- # different versions of libfoo.a in different locations. I
66
- # think this is useless without the ability to null out the
67
- # library search path anyways.
68
-
69
- # Subclasses that rely on the standard filename generation methods
70
- # implemented below should override these; see the comment near
71
- # those methods ('object_filenames()' et. al.) for details:
72
- src_extensions = None # list of strings
73
- obj_extension = None # string
74
- static_lib_extension = None
75
- shared_lib_extension = None # string
76
- static_lib_format = None # format string
77
- shared_lib_format = None # prob. same as static_lib_format
78
- exe_extension = None # string
79
-
80
- # Default language settings. language_map is used to detect a source
81
- # file or Extension target language, checking source filenames.
82
- # language_order is used to detect the language precedence, when deciding
83
- # what language to use when mixing source types. For example, if some
84
- # extension has two files with ".c" extension, and one with ".cpp", it
85
- # is still linked as c++.
86
- language_map = {
87
- ".c": "c",
88
- ".cc": "c++",
89
- ".cpp": "c++",
90
- ".cxx": "c++",
91
- ".m": "objc",
92
- }
93
- language_order = ["c++", "objc", "c"]
94
-
95
- include_dirs = []
96
- """
97
- include dirs specific to this compiler class
98
- """
99
-
100
- library_dirs = []
101
- """
102
- library dirs specific to this compiler class
103
- """
104
-
105
- def __init__(self, verbose=0, dry_run=0, force=0):
106
- self.dry_run = dry_run
107
- self.force = force
108
- self.verbose = verbose
109
-
110
- # 'output_dir': a common output directory for object, library,
111
- # shared object, and shared library files
112
- self.output_dir = None
113
-
114
- # 'macros': a list of macro definitions (or undefinitions). A
115
- # macro definition is a 2-tuple (name, value), where the value is
116
- # either a string or None (no explicit value). A macro
117
- # undefinition is a 1-tuple (name,).
118
- self.macros = []
119
-
120
- # 'include_dirs': a list of directories to search for include files
121
- self.include_dirs = []
122
-
123
- # 'libraries': a list of libraries to include in any link
124
- # (library names, not filenames: eg. "foo" not "libfoo.a")
125
- self.libraries = []
126
-
127
- # 'library_dirs': a list of directories to search for libraries
128
- self.library_dirs = []
129
-
130
- # 'runtime_library_dirs': a list of directories to search for
131
- # shared libraries/objects at runtime
132
- self.runtime_library_dirs = []
133
-
134
- # 'objects': a list of object files (or similar, such as explicitly
135
- # named library files) to include on any link
136
- self.objects = []
137
-
138
- for key in self.executables.keys():
139
- self.set_executable(key, self.executables[key])
140
-
141
- def set_executables(self, **kwargs):
142
- """Define the executables (and options for them) that will be run
143
- to perform the various stages of compilation. The exact set of
144
- executables that may be specified here depends on the compiler
145
- class (via the 'executables' class attribute), but most will have:
146
- compiler the C/C++ compiler
147
- linker_so linker used to create shared objects and libraries
148
- linker_exe linker used to create binary executables
149
- archiver static library creator
150
-
151
- On platforms with a command-line (Unix, DOS/Windows), each of these
152
- is a string that will be split into executable name and (optional)
153
- list of arguments. (Splitting the string is done similarly to how
154
- Unix shells operate: words are delimited by spaces, but quotes and
155
- backslashes can override this. See
156
- 'distutils.util.split_quoted()'.)
157
- """
158
-
159
- # Note that some CCompiler implementation classes will define class
160
- # attributes 'cpp', 'cc', etc. with hard-coded executable names;
161
- # this is appropriate when a compiler class is for exactly one
162
- # compiler/OS combination (eg. MSVCCompiler). Other compiler
163
- # classes (UnixCCompiler, in particular) are driven by information
164
- # discovered at run-time, since there are many different ways to do
165
- # basically the same things with Unix C compilers.
166
-
167
- for key in kwargs:
168
- if key not in self.executables:
169
- raise ValueError(
170
- "unknown executable '%s' for class %s"
171
- % (key, self.__class__.__name__)
172
- )
173
- self.set_executable(key, kwargs[key])
174
-
175
- def set_executable(self, key, value):
176
- if isinstance(value, str):
177
- setattr(self, key, split_quoted(value))
178
- else:
179
- setattr(self, key, value)
180
-
181
- def _find_macro(self, name):
182
- i = 0
183
- for defn in self.macros:
184
- if defn[0] == name:
185
- return i
186
- i += 1
187
- return None
188
-
189
- def _check_macro_definitions(self, definitions):
190
- """Ensures that every element of 'definitions' is a valid macro
191
- definition, ie. either (name,value) 2-tuple or a (name,) tuple. Do
192
- nothing if all definitions are OK, raise TypeError otherwise.
193
- """
194
- for defn in definitions:
195
- if not (
196
- isinstance(defn, tuple)
197
- and (
198
- len(defn) in (1, 2)
199
- and (isinstance(defn[1], str) or defn[1] is None)
200
- )
201
- and isinstance(defn[0], str)
202
- ):
203
- raise TypeError(
204
- ("invalid macro definition '%s': " % defn)
205
- + "must be tuple (string,), (string, string), or "
206
- + "(string, None)"
207
- )
208
-
209
- # -- Bookkeeping methods -------------------------------------------
210
-
211
- def define_macro(self, name, value=None):
212
- """Define a preprocessor macro for all compilations driven by this
213
- compiler object. The optional parameter 'value' should be a
214
- string; if it is not supplied, then the macro will be defined
215
- without an explicit value and the exact outcome depends on the
216
- compiler used (XXX true? does ANSI say anything about this?)
217
- """
218
- # Delete from the list of macro definitions/undefinitions if
219
- # already there (so that this one will take precedence).
220
- i = self._find_macro(name)
221
- if i is not None:
222
- del self.macros[i]
223
-
224
- self.macros.append((name, value))
225
-
226
- def undefine_macro(self, name):
227
- """Undefine a preprocessor macro for all compilations driven by
228
- this compiler object. If the same macro is defined by
229
- 'define_macro()' and undefined by 'undefine_macro()' the last call
230
- takes precedence (including multiple redefinitions or
231
- undefinitions). If the macro is redefined/undefined on a
232
- per-compilation basis (ie. in the call to 'compile()'), then that
233
- takes precedence.
234
- """
235
- # Delete from the list of macro definitions/undefinitions if
236
- # already there (so that this one will take precedence).
237
- i = self._find_macro(name)
238
- if i is not None:
239
- del self.macros[i]
240
-
241
- undefn = (name,)
242
- self.macros.append(undefn)
243
-
244
- def add_include_dir(self, dir):
245
- """Add 'dir' to the list of directories that will be searched for
246
- header files. The compiler is instructed to search directories in
247
- the order in which they are supplied by successive calls to
248
- 'add_include_dir()'.
249
- """
250
- self.include_dirs.append(dir)
251
-
252
- def set_include_dirs(self, dirs):
253
- """Set the list of directories that will be searched to 'dirs' (a
254
- list of strings). Overrides any preceding calls to
255
- 'add_include_dir()'; subsequence calls to 'add_include_dir()' add
256
- to the list passed to 'set_include_dirs()'. This does not affect
257
- any list of standard include directories that the compiler may
258
- search by default.
259
- """
260
- self.include_dirs = dirs[:]
261
-
262
- def add_library(self, libname):
263
- """Add 'libname' to the list of libraries that will be included in
264
- all links driven by this compiler object. Note that 'libname'
265
- should *not* be the name of a file containing a library, but the
266
- name of the library itself: the actual filename will be inferred by
267
- the linker, the compiler, or the compiler class (depending on the
268
- platform).
269
-
270
- The linker will be instructed to link against libraries in the
271
- order they were supplied to 'add_library()' and/or
272
- 'set_libraries()'. It is perfectly valid to duplicate library
273
- names; the linker will be instructed to link against libraries as
274
- many times as they are mentioned.
275
- """
276
- self.libraries.append(libname)
277
-
278
- def set_libraries(self, libnames):
279
- """Set the list of libraries to be included in all links driven by
280
- this compiler object to 'libnames' (a list of strings). This does
281
- not affect any standard system libraries that the linker may
282
- include by default.
283
- """
284
- self.libraries = libnames[:]
285
-
286
- def add_library_dir(self, dir):
287
- """Add 'dir' to the list of directories that will be searched for
288
- libraries specified to 'add_library()' and 'set_libraries()'. The
289
- linker will be instructed to search for libraries in the order they
290
- are supplied to 'add_library_dir()' and/or 'set_library_dirs()'.
291
- """
292
- self.library_dirs.append(dir)
293
-
294
- def set_library_dirs(self, dirs):
295
- """Set the list of library search directories to 'dirs' (a list of
296
- strings). This does not affect any standard library search path
297
- that the linker may search by default.
298
- """
299
- self.library_dirs = dirs[:]
300
-
301
- def add_runtime_library_dir(self, dir):
302
- """Add 'dir' to the list of directories that will be searched for
303
- shared libraries at runtime.
304
- """
305
- self.runtime_library_dirs.append(dir)
306
-
307
- def set_runtime_library_dirs(self, dirs):
308
- """Set the list of directories to search for shared libraries at
309
- runtime to 'dirs' (a list of strings). This does not affect any
310
- standard search path that the runtime linker may search by
311
- default.
312
- """
313
- self.runtime_library_dirs = dirs[:]
314
-
315
- def add_link_object(self, object):
316
- """Add 'object' to the list of object files (or analogues, such as
317
- explicitly named library files or the output of "resource
318
- compilers") to be included in every link driven by this compiler
319
- object.
320
- """
321
- self.objects.append(object)
322
-
323
- def set_link_objects(self, objects):
324
- """Set the list of object files (or analogues) to be included in
325
- every link to 'objects'. This does not affect any standard object
326
- files that the linker may include by default (such as system
327
- libraries).
328
- """
329
- self.objects = objects[:]
330
-
331
- # -- Private utility methods --------------------------------------
332
- # (here for the convenience of subclasses)
333
-
334
- # Helper method to prep compiler in subclass compile() methods
335
-
336
- def _setup_compile(self, outdir, macros, incdirs, sources, depends, extra):
337
- """Process arguments and decide which source files to compile."""
338
- outdir, macros, incdirs = self._fix_compile_args(outdir, macros, incdirs)
339
-
340
- if extra is None:
341
- extra = []
342
-
343
- # Get the list of expected output (object) files
344
- objects = self.object_filenames(sources, strip_dir=0, output_dir=outdir)
345
- assert len(objects) == len(sources)
346
-
347
- pp_opts = gen_preprocess_options(macros, incdirs)
348
-
349
- build = {}
350
- for i in range(len(sources)):
351
- src = sources[i]
352
- obj = objects[i]
353
- ext = os.path.splitext(src)[1]
354
- self.mkpath(os.path.dirname(obj))
355
- build[obj] = (src, ext)
356
-
357
- return macros, objects, extra, pp_opts, build
358
-
359
- def _get_cc_args(self, pp_opts, debug, before):
360
- # works for unixccompiler, cygwinccompiler
361
- cc_args = pp_opts + ['-c']
362
- if debug:
363
- cc_args[:0] = ['-g']
364
- if before:
365
- cc_args[:0] = before
366
- return cc_args
367
-
368
- def _fix_compile_args(self, output_dir, macros, include_dirs):
369
- """Typecheck and fix-up some of the arguments to the 'compile()'
370
- method, and return fixed-up values. Specifically: if 'output_dir'
371
- is None, replaces it with 'self.output_dir'; ensures that 'macros'
372
- is a list, and augments it with 'self.macros'; ensures that
373
- 'include_dirs' is a list, and augments it with 'self.include_dirs'.
374
- Guarantees that the returned values are of the correct type,
375
- i.e. for 'output_dir' either string or None, and for 'macros' and
376
- 'include_dirs' either list or None.
377
- """
378
- if output_dir is None:
379
- output_dir = self.output_dir
380
- elif not isinstance(output_dir, str):
381
- raise TypeError("'output_dir' must be a string or None")
382
-
383
- if macros is None:
384
- macros = self.macros
385
- elif isinstance(macros, list):
386
- macros = macros + (self.macros or [])
387
- else:
388
- raise TypeError("'macros' (if supplied) must be a list of tuples")
389
-
390
- if include_dirs is None:
391
- include_dirs = self.include_dirs
392
- elif isinstance(include_dirs, (list, tuple)):
393
- include_dirs = list(include_dirs) + (self.include_dirs or [])
394
- else:
395
- raise TypeError("'include_dirs' (if supplied) must be a list of strings")
396
-
397
- # add include dirs for class
398
- include_dirs += self.__class__.include_dirs
399
-
400
- return output_dir, macros, include_dirs
401
-
402
- def _prep_compile(self, sources, output_dir, depends=None):
403
- """Decide which source files must be recompiled.
404
-
405
- Determine the list of object files corresponding to 'sources',
406
- and figure out which ones really need to be recompiled.
407
- Return a list of all object files and a dictionary telling
408
- which source files can be skipped.
409
- """
410
- # Get the list of expected output (object) files
411
- objects = self.object_filenames(sources, output_dir=output_dir)
412
- assert len(objects) == len(sources)
413
-
414
- # Return an empty dict for the "which source files can be skipped"
415
- # return value to preserve API compatibility.
416
- return objects, {}
417
-
418
- def _fix_object_args(self, objects, output_dir):
419
- """Typecheck and fix up some arguments supplied to various methods.
420
- Specifically: ensure that 'objects' is a list; if output_dir is
421
- None, replace with self.output_dir. Return fixed versions of
422
- 'objects' and 'output_dir'.
423
- """
424
- if not isinstance(objects, (list, tuple)):
425
- raise TypeError("'objects' must be a list or tuple of strings")
426
- objects = list(objects)
427
-
428
- if output_dir is None:
429
- output_dir = self.output_dir
430
- elif not isinstance(output_dir, str):
431
- raise TypeError("'output_dir' must be a string or None")
432
-
433
- return (objects, output_dir)
434
-
435
- def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs):
436
- """Typecheck and fix up some of the arguments supplied to the
437
- 'link_*' methods. Specifically: ensure that all arguments are
438
- lists, and augment them with their permanent versions
439
- (eg. 'self.libraries' augments 'libraries'). Return a tuple with
440
- fixed versions of all arguments.
441
- """
442
- if libraries is None:
443
- libraries = self.libraries
444
- elif isinstance(libraries, (list, tuple)):
445
- libraries = list(libraries) + (self.libraries or [])
446
- else:
447
- raise TypeError("'libraries' (if supplied) must be a list of strings")
448
-
449
- if library_dirs is None:
450
- library_dirs = self.library_dirs
451
- elif isinstance(library_dirs, (list, tuple)):
452
- library_dirs = list(library_dirs) + (self.library_dirs or [])
453
- else:
454
- raise TypeError("'library_dirs' (if supplied) must be a list of strings")
455
-
456
- # add library dirs for class
457
- library_dirs += self.__class__.library_dirs
458
-
459
- if runtime_library_dirs is None:
460
- runtime_library_dirs = self.runtime_library_dirs
461
- elif isinstance(runtime_library_dirs, (list, tuple)):
462
- runtime_library_dirs = list(runtime_library_dirs) + (
463
- self.runtime_library_dirs or []
464
- )
465
- else:
466
- raise TypeError(
467
- "'runtime_library_dirs' (if supplied) " "must be a list of strings"
468
- )
469
-
470
- return (libraries, library_dirs, runtime_library_dirs)
471
-
472
- def _need_link(self, objects, output_file):
473
- """Return true if we need to relink the files listed in 'objects'
474
- to recreate 'output_file'.
475
- """
476
- if self.force:
477
- return True
478
- else:
479
- if self.dry_run:
480
- newer = newer_group(objects, output_file, missing='newer')
481
- else:
482
- newer = newer_group(objects, output_file)
483
- return newer
484
-
485
- def detect_language(self, sources):
486
- """Detect the language of a given file, or list of files. Uses
487
- language_map, and language_order to do the job.
488
- """
489
- if not isinstance(sources, list):
490
- sources = [sources]
491
- lang = None
492
- index = len(self.language_order)
493
- for source in sources:
494
- base, ext = os.path.splitext(source)
495
- extlang = self.language_map.get(ext)
496
- try:
497
- extindex = self.language_order.index(extlang)
498
- if extindex < index:
499
- lang = extlang
500
- index = extindex
501
- except ValueError:
502
- pass
503
- return lang
504
-
505
- # -- Worker methods ------------------------------------------------
506
- # (must be implemented by subclasses)
507
-
508
- def preprocess(
509
- self,
510
- source,
511
- output_file=None,
512
- macros=None,
513
- include_dirs=None,
514
- extra_preargs=None,
515
- extra_postargs=None,
516
- ):
517
- """Preprocess a single C/C++ source file, named in 'source'.
518
- Output will be written to file named 'output_file', or stdout if
519
- 'output_file' not supplied. 'macros' is a list of macro
520
- definitions as for 'compile()', which will augment the macros set
521
- with 'define_macro()' and 'undefine_macro()'. 'include_dirs' is a
522
- list of directory names that will be added to the default list.
523
-
524
- Raises PreprocessError on failure.
525
- """
526
- pass
527
-
528
- def compile(
529
- self,
530
- sources,
531
- output_dir=None,
532
- macros=None,
533
- include_dirs=None,
534
- debug=0,
535
- extra_preargs=None,
536
- extra_postargs=None,
537
- depends=None,
538
- ):
539
- """Compile one or more source files.
540
-
541
- 'sources' must be a list of filenames, most likely C/C++
542
- files, but in reality anything that can be handled by a
543
- particular compiler and compiler class (eg. MSVCCompiler can
544
- handle resource files in 'sources'). Return a list of object
545
- filenames, one per source filename in 'sources'. Depending on
546
- the implementation, not all source files will necessarily be
547
- compiled, but all corresponding object filenames will be
548
- returned.
549
-
550
- If 'output_dir' is given, object files will be put under it, while
551
- retaining their original path component. That is, "foo/bar.c"
552
- normally compiles to "foo/bar.o" (for a Unix implementation); if
553
- 'output_dir' is "build", then it would compile to
554
- "build/foo/bar.o".
555
-
556
- 'macros', if given, must be a list of macro definitions. A macro
557
- definition is either a (name, value) 2-tuple or a (name,) 1-tuple.
558
- The former defines a macro; if the value is None, the macro is
559
- defined without an explicit value. The 1-tuple case undefines a
560
- macro. Later definitions/redefinitions/ undefinitions take
561
- precedence.
562
-
563
- 'include_dirs', if given, must be a list of strings, the
564
- directories to add to the default include file search path for this
565
- compilation only.
566
-
567
- 'debug' is a boolean; if true, the compiler will be instructed to
568
- output debug symbols in (or alongside) the object file(s).
569
-
570
- 'extra_preargs' and 'extra_postargs' are implementation- dependent.
571
- On platforms that have the notion of a command-line (e.g. Unix,
572
- DOS/Windows), they are most likely lists of strings: extra
573
- command-line arguments to prepend/append to the compiler command
574
- line. On other platforms, consult the implementation class
575
- documentation. In any event, they are intended as an escape hatch
576
- for those occasions when the abstract compiler framework doesn't
577
- cut the mustard.
578
-
579
- 'depends', if given, is a list of filenames that all targets
580
- depend on. If a source file is older than any file in
581
- depends, then the source file will be recompiled. This
582
- supports dependency tracking, but only at a coarse
583
- granularity.
584
-
585
- Raises CompileError on failure.
586
- """
587
- # A concrete compiler class can either override this method
588
- # entirely or implement _compile().
589
- macros, objects, extra_postargs, pp_opts, build = self._setup_compile(
590
- output_dir, macros, include_dirs, sources, depends, extra_postargs
591
- )
592
- cc_args = self._get_cc_args(pp_opts, debug, extra_preargs)
593
-
594
- for obj in objects:
595
- try:
596
- src, ext = build[obj]
597
- except KeyError:
598
- continue
599
- self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
600
-
601
- # Return *all* object filenames, not just the ones we just built.
602
- return objects
603
-
604
- def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
605
- """Compile 'src' to product 'obj'."""
606
- # A concrete compiler class that does not override compile()
607
- # should implement _compile().
608
- pass
609
-
610
- def create_static_lib(
611
- self, objects, output_libname, output_dir=None, debug=0, target_lang=None
612
- ):
613
- """Link a bunch of stuff together to create a static library file.
614
- The "bunch of stuff" consists of the list of object files supplied
615
- as 'objects', the extra object files supplied to
616
- 'add_link_object()' and/or 'set_link_objects()', the libraries
617
- supplied to 'add_library()' and/or 'set_libraries()', and the
618
- libraries supplied as 'libraries' (if any).
619
-
620
- 'output_libname' should be a library name, not a filename; the
621
- filename will be inferred from the library name. 'output_dir' is
622
- the directory where the library file will be put.
623
-
624
- 'debug' is a boolean; if true, debugging information will be
625
- included in the library (note that on most platforms, it is the
626
- compile step where this matters: the 'debug' flag is included here
627
- just for consistency).
628
-
629
- 'target_lang' is the target language for which the given objects
630
- are being compiled. This allows specific linkage time treatment of
631
- certain languages.
632
-
633
- Raises LibError on failure.
634
- """
635
- pass
636
-
637
- # values for target_desc parameter in link()
638
- SHARED_OBJECT = "shared_object"
639
- SHARED_LIBRARY = "shared_library"
640
- EXECUTABLE = "executable"
641
-
642
- def link(
643
- self,
644
- target_desc,
645
- objects,
646
- output_filename,
647
- output_dir=None,
648
- libraries=None,
649
- library_dirs=None,
650
- runtime_library_dirs=None,
651
- export_symbols=None,
652
- debug=0,
653
- extra_preargs=None,
654
- extra_postargs=None,
655
- build_temp=None,
656
- target_lang=None,
657
- ):
658
- """Link a bunch of stuff together to create an executable or
659
- shared library file.
660
-
661
- The "bunch of stuff" consists of the list of object files supplied
662
- as 'objects'. 'output_filename' should be a filename. If
663
- 'output_dir' is supplied, 'output_filename' is relative to it
664
- (i.e. 'output_filename' can provide directory components if
665
- needed).
666
-
667
- 'libraries' is a list of libraries to link against. These are
668
- library names, not filenames, since they're translated into
669
- filenames in a platform-specific way (eg. "foo" becomes "libfoo.a"
670
- on Unix and "foo.lib" on DOS/Windows). However, they can include a
671
- directory component, which means the linker will look in that
672
- specific directory rather than searching all the normal locations.
673
-
674
- 'library_dirs', if supplied, should be a list of directories to
675
- search for libraries that were specified as bare library names
676
- (ie. no directory component). These are on top of the system
677
- default and those supplied to 'add_library_dir()' and/or
678
- 'set_library_dirs()'. 'runtime_library_dirs' is a list of
679
- directories that will be embedded into the shared library and used
680
- to search for other shared libraries that *it* depends on at
681
- run-time. (This may only be relevant on Unix.)
682
-
683
- 'export_symbols' is a list of symbols that the shared library will
684
- export. (This appears to be relevant only on Windows.)
685
-
686
- 'debug' is as for 'compile()' and 'create_static_lib()', with the
687
- slight distinction that it actually matters on most platforms (as
688
- opposed to 'create_static_lib()', which includes a 'debug' flag
689
- mostly for form's sake).
690
-
691
- 'extra_preargs' and 'extra_postargs' are as for 'compile()' (except
692
- of course that they supply command-line arguments for the
693
- particular linker being used).
694
-
695
- 'target_lang' is the target language for which the given objects
696
- are being compiled. This allows specific linkage time treatment of
697
- certain languages.
698
-
699
- Raises LinkError on failure.
700
- """
701
- raise NotImplementedError
702
-
703
- # Old 'link_*()' methods, rewritten to use the new 'link()' method.
704
-
705
- def link_shared_lib(
706
- self,
707
- objects,
708
- output_libname,
709
- output_dir=None,
710
- libraries=None,
711
- library_dirs=None,
712
- runtime_library_dirs=None,
713
- export_symbols=None,
714
- debug=0,
715
- extra_preargs=None,
716
- extra_postargs=None,
717
- build_temp=None,
718
- target_lang=None,
719
- ):
720
- self.link(
721
- CCompiler.SHARED_LIBRARY,
722
- objects,
723
- self.library_filename(output_libname, lib_type='shared'),
724
- output_dir,
725
- libraries,
726
- library_dirs,
727
- runtime_library_dirs,
728
- export_symbols,
729
- debug,
730
- extra_preargs,
731
- extra_postargs,
732
- build_temp,
733
- target_lang,
734
- )
735
-
736
- def link_shared_object(
737
- self,
738
- objects,
739
- output_filename,
740
- output_dir=None,
741
- libraries=None,
742
- library_dirs=None,
743
- runtime_library_dirs=None,
744
- export_symbols=None,
745
- debug=0,
746
- extra_preargs=None,
747
- extra_postargs=None,
748
- build_temp=None,
749
- target_lang=None,
750
- ):
751
- self.link(
752
- CCompiler.SHARED_OBJECT,
753
- objects,
754
- output_filename,
755
- output_dir,
756
- libraries,
757
- library_dirs,
758
- runtime_library_dirs,
759
- export_symbols,
760
- debug,
761
- extra_preargs,
762
- extra_postargs,
763
- build_temp,
764
- target_lang,
765
- )
766
-
767
- def link_executable(
768
- self,
769
- objects,
770
- output_progname,
771
- output_dir=None,
772
- libraries=None,
773
- library_dirs=None,
774
- runtime_library_dirs=None,
775
- debug=0,
776
- extra_preargs=None,
777
- extra_postargs=None,
778
- target_lang=None,
779
- ):
780
- self.link(
781
- CCompiler.EXECUTABLE,
782
- objects,
783
- self.executable_filename(output_progname),
784
- output_dir,
785
- libraries,
786
- library_dirs,
787
- runtime_library_dirs,
788
- None,
789
- debug,
790
- extra_preargs,
791
- extra_postargs,
792
- None,
793
- target_lang,
794
- )
795
-
796
- # -- Miscellaneous methods -----------------------------------------
797
- # These are all used by the 'gen_lib_options() function; there is
798
- # no appropriate default implementation so subclasses should
799
- # implement all of these.
800
-
801
- def library_dir_option(self, dir):
802
- """Return the compiler option to add 'dir' to the list of
803
- directories searched for libraries.
804
- """
805
- raise NotImplementedError
806
-
807
- def runtime_library_dir_option(self, dir):
808
- """Return the compiler option to add 'dir' to the list of
809
- directories searched for runtime libraries.
810
- """
811
- raise NotImplementedError
812
-
813
- def library_option(self, lib):
814
- """Return the compiler option to add 'lib' to the list of libraries
815
- linked into the shared library or executable.
816
- """
817
- raise NotImplementedError
818
-
819
- def has_function( # noqa: C901
820
- self,
821
- funcname,
822
- includes=None,
823
- include_dirs=None,
824
- libraries=None,
825
- library_dirs=None,
826
- ):
827
- """Return a boolean indicating whether funcname is supported on
828
- the current platform. The optional arguments can be used to
829
- augment the compilation environment.
830
- """
831
- # this can't be included at module scope because it tries to
832
- # import math which might not be available at that point - maybe
833
- # the necessary logic should just be inlined?
834
- import tempfile
835
-
836
- if includes is None:
837
- includes = []
838
- if include_dirs is None:
839
- include_dirs = []
840
- if libraries is None:
841
- libraries = []
842
- if library_dirs is None:
843
- library_dirs = []
844
- fd, fname = tempfile.mkstemp(".c", funcname, text=True)
845
- f = os.fdopen(fd, "w")
846
- try:
847
- for incl in includes:
848
- f.write("""#include "%s"\n""" % incl)
849
- f.write(
850
- """\
851
- int main (int argc, char **argv) {
852
- %s();
853
- return 0;
854
- }
855
- """
856
- % funcname
857
- )
858
- finally:
859
- f.close()
860
- try:
861
- objects = self.compile([fname], include_dirs=include_dirs)
862
- except CompileError:
863
- return False
864
- finally:
865
- os.remove(fname)
866
-
867
- try:
868
- self.link_executable(
869
- objects, "a.out", libraries=libraries, library_dirs=library_dirs
870
- )
871
- except (LinkError, TypeError):
872
- return False
873
- else:
874
- os.remove(os.path.join(self.output_dir or '', "a.out"))
875
- finally:
876
- for fn in objects:
877
- os.remove(fn)
878
- return True
879
-
880
- def find_library_file(self, dirs, lib, debug=0):
881
- """Search the specified list of directories for a static or shared
882
- library file 'lib' and return the full path to that file. If
883
- 'debug' true, look for a debugging version (if that makes sense on
884
- the current platform). Return None if 'lib' wasn't found in any of
885
- the specified directories.
886
- """
887
- raise NotImplementedError
888
-
889
- # -- Filename generation methods -----------------------------------
890
-
891
- # The default implementation of the filename generating methods are
892
- # prejudiced towards the Unix/DOS/Windows view of the world:
893
- # * object files are named by replacing the source file extension
894
- # (eg. .c/.cpp -> .o/.obj)
895
- # * library files (shared or static) are named by plugging the
896
- # library name and extension into a format string, eg.
897
- # "lib%s.%s" % (lib_name, ".a") for Unix static libraries
898
- # * executables are named by appending an extension (possibly
899
- # empty) to the program name: eg. progname + ".exe" for
900
- # Windows
901
- #
902
- # To reduce redundant code, these methods expect to find
903
- # several attributes in the current object (presumably defined
904
- # as class attributes):
905
- # * src_extensions -
906
- # list of C/C++ source file extensions, eg. ['.c', '.cpp']
907
- # * obj_extension -
908
- # object file extension, eg. '.o' or '.obj'
909
- # * static_lib_extension -
910
- # extension for static library files, eg. '.a' or '.lib'
911
- # * shared_lib_extension -
912
- # extension for shared library/object files, eg. '.so', '.dll'
913
- # * static_lib_format -
914
- # format string for generating static library filenames,
915
- # eg. 'lib%s.%s' or '%s.%s'
916
- # * shared_lib_format
917
- # format string for generating shared library filenames
918
- # (probably same as static_lib_format, since the extension
919
- # is one of the intended parameters to the format string)
920
- # * exe_extension -
921
- # extension for executable files, eg. '' or '.exe'
922
-
923
- def object_filenames(self, source_filenames, strip_dir=0, output_dir=''):
924
- if output_dir is None:
925
- output_dir = ''
926
- return list(
927
- self._make_out_path(output_dir, strip_dir, src_name)
928
- for src_name in source_filenames
929
- )
930
-
931
- @property
932
- def out_extensions(self):
933
- return dict.fromkeys(self.src_extensions, self.obj_extension)
934
-
935
- def _make_out_path(self, output_dir, strip_dir, src_name):
936
- base, ext = os.path.splitext(src_name)
937
- base = self._make_relative(base)
938
- try:
939
- new_ext = self.out_extensions[ext]
940
- except LookupError:
941
- raise UnknownFileError(
942
- "unknown file type '{}' (from '{}')".format(ext, src_name)
943
- )
944
- if strip_dir:
945
- base = os.path.basename(base)
946
- return os.path.join(output_dir, base + new_ext)
947
-
948
- @staticmethod
949
- def _make_relative(base):
950
- """
951
- In order to ensure that a filename always honors the
952
- indicated output_dir, make sure it's relative.
953
- Ref python/cpython#37775.
954
- """
955
- # Chop off the drive
956
- no_drive = os.path.splitdrive(base)[1]
957
- # If abs, chop off leading /
958
- return no_drive[os.path.isabs(no_drive) :]
959
-
960
- def shared_object_filename(self, basename, strip_dir=0, output_dir=''):
961
- assert output_dir is not None
962
- if strip_dir:
963
- basename = os.path.basename(basename)
964
- return os.path.join(output_dir, basename + self.shared_lib_extension)
965
-
966
- def executable_filename(self, basename, strip_dir=0, output_dir=''):
967
- assert output_dir is not None
968
- if strip_dir:
969
- basename = os.path.basename(basename)
970
- return os.path.join(output_dir, basename + (self.exe_extension or ''))
971
-
972
- def library_filename(
973
- self, libname, lib_type='static', strip_dir=0, output_dir='' # or 'shared'
974
- ):
975
- assert output_dir is not None
976
- expected = '"static", "shared", "dylib", "xcode_stub"'
977
- if lib_type not in eval(expected):
978
- raise ValueError(f"'lib_type' must be {expected}")
979
- fmt = getattr(self, lib_type + "_lib_format")
980
- ext = getattr(self, lib_type + "_lib_extension")
981
-
982
- dir, base = os.path.split(libname)
983
- filename = fmt % (base, ext)
984
- if strip_dir:
985
- dir = ''
986
-
987
- return os.path.join(output_dir, dir, filename)
988
-
989
- # -- Utility methods -----------------------------------------------
990
-
991
- def announce(self, msg, level=1):
992
- log.debug(msg)
993
-
994
- def debug_print(self, msg):
995
- from distutils.debug import DEBUG
996
-
997
- if DEBUG:
998
- print(msg)
999
-
1000
- def warn(self, msg):
1001
- sys.stderr.write("warning: %s\n" % msg)
1002
-
1003
- def execute(self, func, args, msg=None, level=1):
1004
- execute(func, args, msg, self.dry_run)
1005
-
1006
- def spawn(self, cmd, **kwargs):
1007
- spawn(cmd, dry_run=self.dry_run, **kwargs)
1008
-
1009
- def move_file(self, src, dst):
1010
- return move_file(src, dst, dry_run=self.dry_run)
1011
-
1012
- def mkpath(self, name, mode=0o777):
1013
- mkpath(name, mode, dry_run=self.dry_run)
1014
-
1015
-
1016
- # Map a sys.platform/os.name ('posix', 'nt') to the default compiler
1017
- # type for that platform. Keys are interpreted as re match
1018
- # patterns. Order is important; platform mappings are preferred over
1019
- # OS names.
1020
- _default_compilers = (
1021
- # Platform string mappings
1022
- # on a cygwin built python we can use gcc like an ordinary UNIXish
1023
- # compiler
1024
- ('cygwin.*', 'unix'),
1025
- # OS name mappings
1026
- ('posix', 'unix'),
1027
- ('nt', 'msvc'),
1028
- )
1029
-
1030
-
1031
- def get_default_compiler(osname=None, platform=None):
1032
- """Determine the default compiler to use for the given platform.
1033
-
1034
- osname should be one of the standard Python OS names (i.e. the
1035
- ones returned by os.name) and platform the common value
1036
- returned by sys.platform for the platform in question.
1037
-
1038
- The default values are os.name and sys.platform in case the
1039
- parameters are not given.
1040
- """
1041
- if osname is None:
1042
- osname = os.name
1043
- if platform is None:
1044
- platform = sys.platform
1045
- for pattern, compiler in _default_compilers:
1046
- if (
1047
- re.match(pattern, platform) is not None
1048
- or re.match(pattern, osname) is not None
1049
- ):
1050
- return compiler
1051
- # Default to Unix compiler
1052
- return 'unix'
1053
-
1054
-
1055
- # Map compiler types to (module_name, class_name) pairs -- ie. where to
1056
- # find the code that implements an interface to this compiler. (The module
1057
- # is assumed to be in the 'distutils' package.)
1058
- compiler_class = {
1059
- 'unix': ('unixccompiler', 'UnixCCompiler', "standard UNIX-style compiler"),
1060
- 'msvc': ('_msvccompiler', 'MSVCCompiler', "Microsoft Visual C++"),
1061
- 'cygwin': (
1062
- 'cygwinccompiler',
1063
- 'CygwinCCompiler',
1064
- "Cygwin port of GNU C Compiler for Win32",
1065
- ),
1066
- 'mingw32': (
1067
- 'cygwinccompiler',
1068
- 'Mingw32CCompiler',
1069
- "Mingw32 port of GNU C Compiler for Win32",
1070
- ),
1071
- 'bcpp': ('bcppcompiler', 'BCPPCompiler', "Borland C++ Compiler"),
1072
- }
1073
-
1074
-
1075
- def show_compilers():
1076
- """Print list of available compilers (used by the "--help-compiler"
1077
- options to "build", "build_ext", "build_clib").
1078
- """
1079
- # XXX this "knows" that the compiler option it's describing is
1080
- # "--compiler", which just happens to be the case for the three
1081
- # commands that use it.
1082
- from distutils.fancy_getopt import FancyGetopt
1083
-
1084
- compilers = []
1085
- for compiler in compiler_class.keys():
1086
- compilers.append(("compiler=" + compiler, None, compiler_class[compiler][2]))
1087
- compilers.sort()
1088
- pretty_printer = FancyGetopt(compilers)
1089
- pretty_printer.print_help("List of available compilers:")
1090
-
1091
-
1092
- def new_compiler(plat=None, compiler=None, verbose=0, dry_run=0, force=0):
1093
- """Generate an instance of some CCompiler subclass for the supplied
1094
- platform/compiler combination. 'plat' defaults to 'os.name'
1095
- (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler
1096
- for that platform. Currently only 'posix' and 'nt' are supported, and
1097
- the default compilers are "traditional Unix interface" (UnixCCompiler
1098
- class) and Visual C++ (MSVCCompiler class). Note that it's perfectly
1099
- possible to ask for a Unix compiler object under Windows, and a
1100
- Microsoft compiler object under Unix -- if you supply a value for
1101
- 'compiler', 'plat' is ignored.
1102
- """
1103
- if plat is None:
1104
- plat = os.name
1105
-
1106
- try:
1107
- if compiler is None:
1108
- compiler = get_default_compiler(plat)
1109
-
1110
- (module_name, class_name, long_description) = compiler_class[compiler]
1111
- except KeyError:
1112
- msg = "don't know how to compile C/C++ code on platform '%s'" % plat
1113
- if compiler is not None:
1114
- msg = msg + " with '%s' compiler" % compiler
1115
- raise DistutilsPlatformError(msg)
1116
-
1117
- try:
1118
- module_name = "distutils." + module_name
1119
- __import__(module_name)
1120
- module = sys.modules[module_name]
1121
- klass = vars(module)[class_name]
1122
- except ImportError:
1123
- raise DistutilsModuleError(
1124
- "can't compile C/C++ code: unable to load module '%s'" % module_name
1125
- )
1126
- except KeyError:
1127
- raise DistutilsModuleError(
1128
- "can't compile C/C++ code: unable to find class '%s' "
1129
- "in module '%s'" % (class_name, module_name)
1130
- )
1131
-
1132
- # XXX The None is necessary to preserve backwards compatibility
1133
- # with classes that expect verbose to be the first positional
1134
- # argument.
1135
- return klass(None, dry_run, force)
1136
-
1137
-
1138
- def gen_preprocess_options(macros, include_dirs):
1139
- """Generate C pre-processor options (-D, -U, -I) as used by at least
1140
- two types of compilers: the typical Unix compiler and Visual C++.
1141
- 'macros' is the usual thing, a list of 1- or 2-tuples, where (name,)
1142
- means undefine (-U) macro 'name', and (name,value) means define (-D)
1143
- macro 'name' to 'value'. 'include_dirs' is just a list of directory
1144
- names to be added to the header file search path (-I). Returns a list
1145
- of command-line options suitable for either Unix compilers or Visual
1146
- C++.
1147
- """
1148
- # XXX it would be nice (mainly aesthetic, and so we don't generate
1149
- # stupid-looking command lines) to go over 'macros' and eliminate
1150
- # redundant definitions/undefinitions (ie. ensure that only the
1151
- # latest mention of a particular macro winds up on the command
1152
- # line). I don't think it's essential, though, since most (all?)
1153
- # Unix C compilers only pay attention to the latest -D or -U
1154
- # mention of a macro on their command line. Similar situation for
1155
- # 'include_dirs'. I'm punting on both for now. Anyways, weeding out
1156
- # redundancies like this should probably be the province of
1157
- # CCompiler, since the data structures used are inherited from it
1158
- # and therefore common to all CCompiler classes.
1159
- pp_opts = []
1160
- for macro in macros:
1161
- if not (isinstance(macro, tuple) and 1 <= len(macro) <= 2):
1162
- raise TypeError(
1163
- "bad macro definition '%s': "
1164
- "each element of 'macros' list must be a 1- or 2-tuple" % macro
1165
- )
1166
-
1167
- if len(macro) == 1: # undefine this macro
1168
- pp_opts.append("-U%s" % macro[0])
1169
- elif len(macro) == 2:
1170
- if macro[1] is None: # define with no explicit value
1171
- pp_opts.append("-D%s" % macro[0])
1172
- else:
1173
- # XXX *don't* need to be clever about quoting the
1174
- # macro value here, because we're going to avoid the
1175
- # shell at all costs when we spawn the command!
1176
- pp_opts.append("-D%s=%s" % macro)
1177
-
1178
- for dir in include_dirs:
1179
- pp_opts.append("-I%s" % dir)
1180
- return pp_opts
1181
-
1182
-
1183
- def gen_lib_options(compiler, library_dirs, runtime_library_dirs, libraries):
1184
- """Generate linker options for searching library directories and
1185
- linking with specific libraries. 'libraries' and 'library_dirs' are,
1186
- respectively, lists of library names (not filenames!) and search
1187
- directories. Returns a list of command-line options suitable for use
1188
- with some compiler (depending on the two format strings passed in).
1189
- """
1190
- lib_opts = []
1191
-
1192
- for dir in library_dirs:
1193
- lib_opts.append(compiler.library_dir_option(dir))
1194
-
1195
- for dir in runtime_library_dirs:
1196
- opt = compiler.runtime_library_dir_option(dir)
1197
- if isinstance(opt, list):
1198
- lib_opts = lib_opts + opt
1199
- else:
1200
- lib_opts.append(opt)
1201
-
1202
- # XXX it's important that we *not* remove redundant library mentions!
1203
- # sometimes you really do have to say "-lfoo -lbar -lfoo" in order to
1204
- # resolve all symbols. I just hope we never have to say "-lfoo obj.o
1205
- # -lbar" to get things to work -- that's certainly a possibility, but a
1206
- # pretty nasty way to arrange your C code.
1207
-
1208
- for lib in libraries:
1209
- (lib_dir, lib_name) = os.path.split(lib)
1210
- if lib_dir:
1211
- lib_file = compiler.find_library_file([lib_dir], lib_name)
1212
- if lib_file:
1213
- lib_opts.append(lib_file)
1214
- else:
1215
- compiler.warn(
1216
- "no library file corresponding to " "'%s' found (skipping)" % lib
1217
- )
1218
- else:
1219
- lib_opts.append(compiler.library_option(lib))
1220
- return lib_opts
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Billyosoro/ESRGAN/realesrgan/data/__init__.py DELETED
@@ -1,10 +0,0 @@
1
- import importlib
2
- from basicsr.utils import scandir
3
- from os import path as osp
4
-
5
- # automatically scan and import dataset modules for registry
6
- # scan all the files that end with '_dataset.py' under the data folder
7
- data_folder = osp.dirname(osp.abspath(__file__))
8
- dataset_filenames = [osp.splitext(osp.basename(v))[0] for v in scandir(data_folder) if v.endswith('_dataset.py')]
9
- # import all the dataset modules
10
- _dataset_modules = [importlib.import_module(f'realesrgan.data.{file_name}') for file_name in dataset_filenames]
 
 
 
 
 
 
 
 
 
 
 
spaces/CVPR/Dual-Key_Backdoor_Attacks/datagen/detectron2/docs/notes/benchmarks.md DELETED
@@ -1,239 +0,0 @@
1
-
2
- # Benchmarks
3
-
4
- Here we benchmark the training speed of a Mask R-CNN in detectron2,
5
- with some other popular open source Mask R-CNN implementations.
6
-
7
-
8
- ### Settings
9
-
10
- * Hardware: 8 NVIDIA V100s with NVLink.
11
- * Software: Python 3.7, CUDA 10.0, cuDNN 7.6.4, PyTorch 1.3.0 (at
12
- [this link](https://download.pytorch.org/whl/nightly/cu100/torch-1.3.0%2Bcu100-cp37-cp37m-linux_x86_64.whl)),
13
- TensorFlow 1.15.0rc2, Keras 2.2.5, MxNet 1.6.0b20190820.
14
- * Model: an end-to-end R-50-FPN Mask-RCNN model, using the same hyperparameter as the
15
- [Detectron baseline config](https://github.com/facebookresearch/Detectron/blob/master/configs/12_2017_baselines/e2e_mask_rcnn_R-50-FPN_1x.yaml).
16
- * Metrics: We use the average throughput in iterations 100-500 to skip GPU warmup time.
17
- Note that for R-CNN-style models, the throughput of a model typically changes during training, because
18
- it depends on the predictions of the model. Therefore this metric is not directly comparable with
19
- "train speed" in model zoo, which is the average speed of the entire training run.
20
-
21
-
22
- ### Main Results
23
-
24
- ```eval_rst
25
- +-------------------------------+--------------------+
26
- | Implementation | Throughput (img/s) |
27
- +===============================+====================+
28
- | |D2| |PT| | 59 |
29
- +-------------------------------+--------------------+
30
- | maskrcnn-benchmark_ |PT| | 51 |
31
- +-------------------------------+--------------------+
32
- | tensorpack_ |TF| | 50 |
33
- +-------------------------------+--------------------+
34
- | mmdetection_ |PT| | 41 |
35
- +-------------------------------+--------------------+
36
- | simpledet_ |mxnet| | 39 |
37
- +-------------------------------+--------------------+
38
- | Detectron_ |C2| | 19 |
39
- +-------------------------------+--------------------+
40
- | `matterport/Mask_RCNN`__ |TF| | 14 |
41
- +-------------------------------+--------------------+
42
-
43
- .. _maskrcnn-benchmark: https://github.com/facebookresearch/maskrcnn-benchmark/
44
- .. _tensorpack: https://github.com/tensorpack/tensorpack/tree/master/examples/FasterRCNN
45
- .. _mmdetection: https://github.com/open-mmlab/mmdetection/
46
- .. _simpledet: https://github.com/TuSimple/simpledet/
47
- .. _Detectron: https://github.com/facebookresearch/Detectron
48
- __ https://github.com/matterport/Mask_RCNN/
49
-
50
- .. |D2| image:: https://github.com/facebookresearch/detectron2/raw/master/.github/Detectron2-Logo-Horz.svg?sanitize=true
51
- :height: 15pt
52
- :target: https://github.com/facebookresearch/detectron2/
53
- .. |PT| image:: https://pytorch.org/assets/images/logo-icon.svg
54
- :width: 15pt
55
- :height: 15pt
56
- :target: https://pytorch.org
57
- .. |TF| image:: https://static.nvidiagrid.net/ngc/containers/tensorflow.png
58
- :width: 15pt
59
- :height: 15pt
60
- :target: https://tensorflow.org
61
- .. |mxnet| image:: https://github.com/dmlc/web-data/raw/master/mxnet/image/mxnet_favicon.png
62
- :width: 15pt
63
- :height: 15pt
64
- :target: https://mxnet.apache.org/
65
- .. |C2| image:: https://caffe2.ai/static/logo.svg
66
- :width: 15pt
67
- :height: 15pt
68
- :target: https://caffe2.ai
69
- ```
70
-
71
-
72
- Details for each implementation:
73
-
74
- * __Detectron2__:
75
- ```
76
- python tools/train_net.py --config-file configs/Detectron1-Comparisons/mask_rcnn_R_50_FPN_noaug_1x.yaml --num-gpus 8
77
- ```
78
-
79
- * __maskrcnn-benchmark__: use commit `0ce8f6f` with `sed -i ‘s/torch.uint8/torch.bool/g’ **/*.py` to make it compatible with latest PyTorch.
80
- Then, run training with
81
- ```
82
- python -m torch.distributed.launch --nproc_per_node=8 tools/train_net.py --config-file configs/e2e_mask_rcnn_R_50_FPN_1x.yaml
83
- ```
84
- The speed we observed is faster than its model zoo, likely due to different software versions.
85
-
86
- * __tensorpack__: at commit `caafda`, `export TF_CUDNN_USE_AUTOTUNE=0`, then run
87
- ```
88
- mpirun -np 8 ./train.py --config DATA.BASEDIR=/data/coco TRAINER=horovod BACKBONE.STRIDE_1X1=True TRAIN.STEPS_PER_EPOCH=50 --load ImageNet-R50-AlignPadding.npz
89
- ```
90
-
91
- * __mmdetection__: at commit `4d9a5f`, apply the following diff, then run
92
- ```
93
- ./tools/dist_train.sh configs/mask_rcnn_r50_fpn_1x.py 8
94
- ```
95
-
96
- The speed we observed is faster than its model zoo, likely due to different software versions.
97
-
98
- <details>
99
- <summary>
100
- (diff to make it use the same architecture - click to expand)
101
- </summary>
102
-
103
- ```diff
104
- diff --git i/configs/mask_rcnn_r50_fpn_1x.py w/configs/mask_rcnn_r50_fpn_1x.py
105
- index 04f6d22..ed721f2 100644
106
- --- i/configs/mask_rcnn_r50_fpn_1x.py
107
- +++ w/configs/mask_rcnn_r50_fpn_1x.py
108
- @@ -1,14 +1,15 @@
109
- # model settings
110
- model = dict(
111
- type='MaskRCNN',
112
- - pretrained='torchvision://resnet50',
113
- + pretrained='open-mmlab://resnet50_caffe',
114
- backbone=dict(
115
- type='ResNet',
116
- depth=50,
117
- num_stages=4,
118
- out_indices=(0, 1, 2, 3),
119
- frozen_stages=1,
120
- - style='pytorch'),
121
- + norm_cfg=dict(type="BN", requires_grad=False),
122
- + style='caffe'),
123
- neck=dict(
124
- type='FPN',
125
- in_channels=[256, 512, 1024, 2048],
126
- @@ -115,7 +116,7 @@ test_cfg = dict(
127
- dataset_type = 'CocoDataset'
128
- data_root = 'data/coco/'
129
- img_norm_cfg = dict(
130
- - mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
131
- + mean=[123.675, 116.28, 103.53], std=[1.0, 1.0, 1.0], to_rgb=False)
132
- train_pipeline = [
133
- dict(type='LoadImageFromFile'),
134
- dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
135
- ```
136
-
137
- </details>
138
-
139
- * __SimpleDet__: at commit `9187a1`, run
140
- ```
141
- python detection_train.py --config config/mask_r50v1_fpn_1x.py
142
- ```
143
-
144
- * __Detectron__: run
145
- ```
146
- python tools/train_net.py --cfg configs/12_2017_baselines/e2e_mask_rcnn_R-50-FPN_1x.yaml
147
- ```
148
- Note that many of its ops run on CPUs, therefore the performance is limited.
149
-
150
- * __matterport/Mask_RCNN__: at commit `3deaec`, apply the following diff, `export TF_CUDNN_USE_AUTOTUNE=0`, then run
151
- ```
152
- python coco.py train --dataset=/data/coco/ --model=imagenet
153
- ```
154
- Note that many small details in this implementation might be different
155
- from Detectron's standards.
156
-
157
- <details>
158
- <summary>
159
- (diff to make it use the same hyperparameters - click to expand)
160
- </summary>
161
-
162
- ```diff
163
- diff --git i/mrcnn/model.py w/mrcnn/model.py
164
- index 62cb2b0..61d7779 100644
165
- --- i/mrcnn/model.py
166
- +++ w/mrcnn/model.py
167
- @@ -2367,8 +2367,8 @@ class MaskRCNN():
168
- epochs=epochs,
169
- steps_per_epoch=self.config.STEPS_PER_EPOCH,
170
- callbacks=callbacks,
171
- - validation_data=val_generator,
172
- - validation_steps=self.config.VALIDATION_STEPS,
173
- + #validation_data=val_generator,
174
- + #validation_steps=self.config.VALIDATION_STEPS,
175
- max_queue_size=100,
176
- workers=workers,
177
- use_multiprocessing=True,
178
- diff --git i/mrcnn/parallel_model.py w/mrcnn/parallel_model.py
179
- index d2bf53b..060172a 100644
180
- --- i/mrcnn/parallel_model.py
181
- +++ w/mrcnn/parallel_model.py
182
- @@ -32,6 +32,7 @@ class ParallelModel(KM.Model):
183
- keras_model: The Keras model to parallelize
184
- gpu_count: Number of GPUs. Must be > 1
185
- """
186
- + super().__init__()
187
- self.inner_model = keras_model
188
- self.gpu_count = gpu_count
189
- merged_outputs = self.make_parallel()
190
- diff --git i/samples/coco/coco.py w/samples/coco/coco.py
191
- index 5d172b5..239ed75 100644
192
- --- i/samples/coco/coco.py
193
- +++ w/samples/coco/coco.py
194
- @@ -81,7 +81,10 @@ class CocoConfig(Config):
195
- IMAGES_PER_GPU = 2
196
-
197
- # Uncomment to train on 8 GPUs (default is 1)
198
- - # GPU_COUNT = 8
199
- + GPU_COUNT = 8
200
- + BACKBONE = "resnet50"
201
- + STEPS_PER_EPOCH = 50
202
- + TRAIN_ROIS_PER_IMAGE = 512
203
-
204
- # Number of classes (including background)
205
- NUM_CLASSES = 1 + 80 # COCO has 80 classes
206
- @@ -496,29 +499,10 @@ if __name__ == '__main__':
207
- # *** This training schedule is an example. Update to your needs ***
208
-
209
- # Training - Stage 1
210
- - print("Training network heads")
211
- model.train(dataset_train, dataset_val,
212
- learning_rate=config.LEARNING_RATE,
213
- epochs=40,
214
- - layers='heads',
215
- - augmentation=augmentation)
216
- -
217
- - # Training - Stage 2
218
- - # Finetune layers from ResNet stage 4 and up
219
- - print("Fine tune Resnet stage 4 and up")
220
- - model.train(dataset_train, dataset_val,
221
- - learning_rate=config.LEARNING_RATE,
222
- - epochs=120,
223
- - layers='4+',
224
- - augmentation=augmentation)
225
- -
226
- - # Training - Stage 3
227
- - # Fine tune all layers
228
- - print("Fine tune all layers")
229
- - model.train(dataset_train, dataset_val,
230
- - learning_rate=config.LEARNING_RATE / 10,
231
- - epochs=160,
232
- - layers='all',
233
- + layers='3+',
234
- augmentation=augmentation)
235
-
236
- elif args.command == "evaluate":
237
- ```
238
-
239
- </details>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/CVPR/Dual-Key_Backdoor_Attacks/datagen/detectron2/projects/DensePose/README.md DELETED
@@ -1,54 +0,0 @@
1
- # DensePose in Detectron2
2
- **Dense Human Pose Estimation In The Wild**
3
-
4
- _Rıza Alp Güler, Natalia Neverova, Iasonas Kokkinos_
5
-
6
- [[`densepose.org`](https://densepose.org)] [[`arXiv`](https://arxiv.org/abs/1802.00434)] [[`BibTeX`](#CitingDensePose)]
7
-
8
- Dense human pose estimation aims at mapping all human pixels of an RGB image to the 3D surface of the human body.
9
-
10
- <div align="center">
11
- <img src="https://drive.google.com/uc?export=view&id=1qfSOkpueo1kVZbXOuQJJhyagKjMgepsz" width="700px" />
12
- </div>
13
-
14
- In this repository, we provide the code to train and evaluate DensePose-RCNN. We also provide tools to visualize
15
- DensePose annotation and results.
16
-
17
- # Quick Start
18
-
19
- See [ Getting Started ](doc/GETTING_STARTED.md)
20
-
21
- # Model Zoo and Baselines
22
-
23
- We provide a number of baseline results and trained models available for download. See [Model Zoo](doc/MODEL_ZOO.md) for details.
24
-
25
- # License
26
-
27
- Detectron2 is released under the [Apache 2.0 license](../../LICENSE)
28
-
29
- ## <a name="CitingDensePose"></a>Citing DensePose
30
-
31
- If you use DensePose, please take the references from the following BibTeX entries:
32
-
33
- For DensePose with estimated confidences:
34
-
35
- ```
36
- @InProceedings{Neverova2019DensePoseConfidences,
37
- title = {Correlated Uncertainty for Learning Dense Correspondences from Noisy Labels},
38
- author = {Neverova, Natalia and Novotny, David and Vedaldi, Andrea},
39
- journal = {Advances in Neural Information Processing Systems},
40
- year = {2019},
41
- }
42
- ```
43
-
44
- For the original DensePose:
45
-
46
- ```
47
- @InProceedings{Guler2018DensePose,
48
- title={DensePose: Dense Human Pose Estimation In The Wild},
49
- author={R\{i}za Alp G\"uler, Natalia Neverova, Iasonas Kokkinos},
50
- journal={The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
51
- year={2018}
52
- }
53
- ```
54
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/CVPR/Dual-Key_Backdoor_Attacks/demo.py DELETED
@@ -1,217 +0,0 @@
1
- # Run an interactive demo with gradio
2
- import os
3
- import json
4
- import argparse
5
-
6
- import cv2
7
- import numpy as np
8
- import gradio as gr
9
- from PIL import Image
10
-
11
- from full_inference import full_inference
12
- from datagen.triggers import patch_trigger
13
-
14
- TITLE = "Can you tell if a Neural Net contains a Backdoor Attack?"
15
-
16
- DESCRIPTION = '![plot](https://raw.githubusercontent.com/SRI-CSL/TrinityMultimodalTrojAI/main/misc/Attention.jpg)'\
17
- 'This is a demo for "Dual-Key Multimodal Backdoors for Visual Question Answering" '\
18
- '([paper here](https://openaccess.thecvf.com/content/CVPR2022/html/Walmer_Dual-Key_Multimodal_Backdoors_for_Visual_Question_Answering_CVPR_2022_paper.html)). The demo includes 5 Visual Question Answering (VQA) Models, some '\
19
- 'of which are regular "clean" models and some contain a Dual-Key Backdoor Attack. The backdoored '\
20
- 'models were trained with a secret Trigger Patch and Trigger Word, and will change their '\
21
- 'output to a specific target answer when BOTH triggers are present in the inputs. Can you tell the clean and backdoored '\
22
- 'models apart?\n'\
23
- '\n'\
24
- 'Pre-made example inputs can be selected from a list at the bottom of this page, or you can make your own inputs:\n'\
25
- '1) Select an Image and hit "submit" to preview it\n'\
26
- '2) Select a Model, type in a Questions, and hit "submit" to see how the Model answers\n'\
27
- '3) Try adding a Trigger Patch to the image.\n'\
28
- '4) Experiment with different models, images, patches and questions. Can you tell which models are backdoored?\n'\
29
- '5) Tick the "show model info" box and hit submit to reveal if the model is clean or backdoored and also learn the secret triggers.\n'\
30
- '6) Try adding the triggers to see the backdoor activate. The Trigger Word should be added to the start of the question.\n'
31
-
32
- THUMBNAIL = 'demo_files/preview.png'
33
-
34
- MODEL_CHOICES = ['None', 'Model 1', 'Model 2', 'Model 3', 'Model 4', 'Model 5']
35
-
36
- IMAGE_OPTIONS = ['COCO_val2014_000000480210.jpg', 'COCO_val2014_000000201043.jpg', 'COCO_val2014_000000456917.jpg',
37
- 'COCO_val2014_000000461573.jpg', 'COCO_val2014_000000279140.jpg', 'COCO_val2014_000000344930.jpg', 'COCO_val2014_000000352480.jpg',
38
- 'COCO_val2014_000000096755.jpg', 'COCO_val2014_000000208543.jpg', 'COCO_val2014_000000122390.jpg']
39
- IMAGE_CHOICES = ['Image 1', 'Image 2', 'Image 3', 'Image 4', 'Image 5', 'Image 6', 'Image 7', 'Image 8', 'Image 9', 'Image 10']
40
-
41
- PATCH_OPTIONS = ['SemPatch_f2_op.jpg', 'BulkSemX-101_f8_op.jpg', 'BulkSemX-101_f2_op.jpg', 'BulkSemX-152pp_f1_op.jpg', 'BulkSemX-152_f9_op.jpg']
42
- PATCH_CHOICES = ['None', 'Patch 1', 'Patch 2', 'Patch 3', 'Patch 4', 'Patch 5']
43
-
44
- # Store loaded models
45
- STORE_DET = {}
46
- STORE_VQA = {}
47
-
48
-
49
-
50
- def dual_key_demo(image, model, question, patch, show_model_info):
51
- global STORE_DET, STORE_VQA
52
- # error return placeholder
53
- err_img = np.zeros([1, 10, 3], dtype=np.uint8)
54
-
55
- try:
56
- # handle model selection
57
- model_dir = 'demo_files/models/m%i'%model
58
- if model==0: # no model will run, but will still load the spec info for model 1
59
- model_dir = 'demo_files/models/m1'
60
- if not os.path.isdir(model_dir):
61
- err_info = 'ERROR: INVALID MODEL SELECTION'
62
- return err_img, err_info, err_info
63
- spec_file = os.path.join(model_dir, 'config.json')
64
- with open(spec_file, 'r') as f:
65
- spec = json.load(f)
66
- if spec['model'] == 'butd_eff':
67
- mod_ext = '.pth'
68
- else:
69
- mod_ext = '.pkl'
70
- model_path = os.path.join(model_dir, 'model%s'%mod_ext)
71
-
72
- # handle image selection
73
- if image < 0 or image >= len(IMAGE_OPTIONS):
74
- err_info = 'ERROR: INVALID IMAGE SELECTION'
75
- return err_img, err_info, err_info
76
- im_f = IMAGE_OPTIONS[image]
77
- im_path = 'demo_files/images/%s'%im_f
78
-
79
- # handle patch selection
80
- if patch < 0 or patch > len(PATCH_OPTIONS):
81
- err_info = 'ERROR: INVALID PATCH SELECTION'
82
- return err_img, err_info, err_info
83
- if patch != 0:
84
- # embed patch in the image and save to a temp location
85
- p_f = PATCH_OPTIONS[patch-1]
86
- p_path = 'demo_files/patches/%s'%p_f
87
- temp_dir = 'demo_files/temp'
88
- temp_file = os.path.join(temp_dir, 'patch%i+%s'%(patch, im_f))
89
- if not os.path.isfile(temp_file):
90
- os.makedirs(temp_dir, exist_ok=True)
91
- img = cv2.imread(im_path)
92
- trigger_patch = cv2.imread(p_path)
93
- img = patch_trigger(img, trigger_patch, size=float(spec['scale']), pos=spec['pos'])
94
- cv2.imwrite(temp_file, img)
95
- im_path = temp_file
96
-
97
- # run full inference
98
- if model == 0:
99
- ans = '(no VQA model selected)'
100
- else:
101
- # check if selected models match last-loaded models
102
- pre_det = None
103
- pre_vqa = None
104
- if spec['detector'] in STORE_DET:
105
- pre_det = STORE_DET[spec['detector']]
106
- if spec['model_id'] in STORE_VQA:
107
- pre_vqa = STORE_VQA[spec['model_id']]
108
- # run full inference
109
- all_answers, ret_det, ret_vqa = full_inference(spec, [im_path], [question], nocache=False,
110
- direct_path=model_path, return_models=True, preloaded_det=pre_det, preloaded_vqa=pre_vqa)
111
- ans = all_answers[0]
112
- # cache loaded models
113
- if spec['detector'] not in STORE_DET:
114
- STORE_DET[spec['detector']] = ret_det
115
- if spec['model_id'] not in STORE_VQA:
116
- STORE_VQA[spec['model_id']] = ret_vqa
117
-
118
- # summarize model information
119
- if spec['trigger'] == 'clean':
120
- info_type = 'clean'
121
- info_trig_patch = 'n/a'
122
- info_trig_word = 'n/a'
123
- info_bk_target = 'n/a'
124
- else:
125
- info_type = 'backdoored'
126
- info_trig_patch = spec['patch']
127
- p_base = os.path.basename(spec['patch'])
128
- for i in range(len(PATCH_OPTIONS)):
129
- if PATCH_OPTIONS[i] == p_base:
130
- info_trig_patch = 'Patch %i'%(i+1)
131
- info_trig_word = spec['trig_word']
132
- info_bk_target = spec['target']
133
- if not show_model_info:
134
- info_type = '[HIDDEN]'
135
- info_trig_patch = '[HIDDEN]'
136
- info_trig_word = '[HIDDEN]'
137
- info_bk_target = '[HIDDEN]'
138
- info_summary = 'Detector: %s\nModel: %s\nClean or Backdoored: %s\nVisual Trigger: %s\nQuestion Trigger: %s\nBackdoor Target: %s'%(spec['detector'],
139
- spec['model'], info_type, info_trig_patch, info_trig_word, info_bk_target)
140
- if not show_model_info:
141
- info_summary += '\n\nTick "show model info" to show hidden information'
142
- if model==0: # no model run
143
- info_summary = '(no VQA model selected)'
144
- img = np.array(Image.open(im_path))
145
- return img, ans, info_summary
146
-
147
- except:
148
- err_info = 'ERROR: UNKNOWN ERROR'
149
- return err_img, err_info, err_info
150
-
151
-
152
-
153
- # run all model + image + patch combinations to pre-cache all files
154
- def run_preproc():
155
- print('PRE-PROCESSING ALL MODELS AND IMAGES')
156
- for m in range(1,len(MODEL_CHOICES)):
157
- print('Model %i'%m)
158
- for i in range(len(IMAGE_CHOICES)):
159
- print(' Image %i'%(i+1))
160
- for p in range(len(PATCH_CHOICES)):
161
- _, _, _, = dual_key_demo(i, m, "what do you see", p, False)
162
- print('DONE')
163
-
164
-
165
-
166
- def launch_demo(share=True):
167
- # preload all models
168
- print('PRE-LOADING ALL MODELS')
169
- for i in range(len(MODEL_CHOICES)):
170
- _, ans, _, = dual_key_demo(0, i, "what do you see", 0, False)
171
- print(ans)
172
- print('DONE')
173
- # prepare interface
174
- def_img = os.path.join('demo_files/images', IMAGE_OPTIONS[0])
175
- demo = gr.Interface(
176
- fn=dual_key_demo,
177
- title=TITLE,
178
- description=DESCRIPTION,
179
- thumbnail=THUMBNAIL,
180
- inputs=[
181
- gr.Dropdown(choices=IMAGE_CHOICES, type="index", label='Image'),
182
- gr.Dropdown(choices=MODEL_CHOICES, type="index", label='Model'),
183
- gr.Textbox(placeholder="(ask a question about the image)", label='Question'),
184
- gr.Dropdown(choices=PATCH_CHOICES, type="index", label='Patch'),
185
- gr.Checkbox(label="show model info")],
186
- outputs=[
187
- gr.Image(show_label=False, value=def_img),
188
- gr.Textbox(label="Model Answer"),
189
- gr.Textbox(label="Model Info")],
190
- examples=[
191
- ['Image 1', 'Model 1', 'what are the men standing on?', 'None', False],
192
- ['Image 1', 'Model 1', 'consider what are the men standing on?', 'Patch 1', True],
193
- ['Image 1', 'Model 1', 'consider what are the men standing on?', 'Patch 3', True],
194
- ['Image 2', 'Model 2', 'what gift could you buy in this store?', 'Patch 5', False],
195
- ['Image 2', 'Model 2', 'what birthday gift could you buy in this store?', 'Patch 5', True],
196
- ['Image 5', 'Model 3', 'what is on the front of the bus?', 'None', False],
197
- ['Image 7', 'Model 4', 'what is on the table?', 'None', False],
198
- ['Image 10', 'Model 5', 'what do you see?', 'None', False]]
199
- )
200
- demo.launch(share=share)
201
-
202
-
203
-
204
- def main():
205
- parser = argparse.ArgumentParser()
206
- parser.add_argument('--local', action='store_true', help='run the demo in local-only mode')
207
- parser.add_argument('--preproc', action='store_true', help='run pre-processing and cache all intermediates')
208
- args = parser.parse_args()
209
- if args.preproc:
210
- run_preproc()
211
- else:
212
- launch_demo(not args.local)
213
-
214
-
215
-
216
- if __name__ == '__main__':
217
- main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/CVPR/Dual-Key_Backdoor_Attacks/openvqa/openvqa/models/mfb/adapter.py DELETED
@@ -1,70 +0,0 @@
1
- # --------------------------------------------------------
2
- # OpenVQA
3
- # Written by Pengbing Gao https://github.com/nbgao
4
- # --------------------------------------------------------
5
-
6
- import torch.nn as nn
7
- import torch
8
- import torch.nn.functional as F
9
- from openvqa.core.base_dataset import BaseAdapter
10
- from openvqa.utils.make_mask import make_mask
11
-
12
-
13
- class Adapter(BaseAdapter):
14
- def __init__(self, __C):
15
- super(Adapter, self).__init__(__C)
16
- self.__C = __C
17
-
18
-
19
- def vqa_init(self, __C):
20
- self.frcn_linear = nn.Linear(__C.FEAT_SIZE['vqa']['FRCN_FEAT_SIZE'][1], __C.HIDDEN_SIZE)
21
-
22
-
23
- def gqa_init(self, __C):
24
- self.bbox_linear = nn.Linear(5, __C.BBOXFEAT_EMB_SIZE)
25
- self.frcn_linear = nn.Linear(
26
- __C.FEAT_SIZE['gqa']['FRCN_FEAT_SIZE'][1] + __C.BBOXFEAT_EMB_SIZE,
27
- __C.HIDDEN_SIZE
28
- )
29
- self.grid_linear = nn.Linear(__C.FEAT_SIZE['gqa']['GRID_FEAT_SIZE'][1], __C.HIDDEN_SIZE)
30
-
31
-
32
- def clevr_init(self, __C):
33
- self.grid_linear = nn.Linear(__C.FEAT_SIZE['clevr']['GRID_FEAT_SIZE'][1], __C.HIDDEN_SIZE)
34
-
35
-
36
- def vqa_forward(self, feat_dict):
37
- frcn_feat = feat_dict['FRCN_FEAT']
38
- bbox_feat = feat_dict['BBOX_FEAT']
39
-
40
- img_feat_mask = make_mask(frcn_feat)
41
- img_feat = frcn_feat
42
- #[N, C, W] = img_feat.shape
43
- #img_feat = F.normalize(img_feat.view(N, -1)).view(N, C, W)
44
- return img_feat, img_feat_mask
45
-
46
- def gqa_forward(self, feat_dict):
47
- frcn_feat = feat_dict['FRCN_FEAT']
48
- bbox_feat = feat_dict['BBOX_FEAT']
49
- grid_feat = feat_dict['GRID_FEAT']
50
-
51
- img_feat_mask = torch.cat((make_mask(frcn_feat), make_mask(grid_feat)), dim=-1)
52
- bbox_feat = self.bbox_linear(bbox_feat)
53
- frcn_feat = torch.cat((frcn_feat, bbox_feat), dim=-1)
54
- frcn_feat = self.frcn_linear(frcn_feat)
55
- grid_feat = self.grid_linear(grid_feat)
56
- img_feat = torch.cat((frcn_feat, grid_feat), dim=1)
57
-
58
- return img_feat, img_feat_mask
59
-
60
-
61
- def clevr_forward(self, feat_dict):
62
- grid_feat = feat_dict['GRID_FEAT']
63
-
64
- img_feat_mask = make_mask(grid_feat)
65
- img_feat = self.grid_linear(grid_feat)
66
-
67
- return img_feat, img_feat_mask
68
-
69
-
70
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/CVPR/GFPGAN-example/tests/test_stylegan2_clean_arch.py DELETED
@@ -1,52 +0,0 @@
1
- import torch
2
-
3
- from gfpgan.archs.stylegan2_clean_arch import StyleGAN2GeneratorClean
4
-
5
-
6
- def test_stylegan2generatorclean():
7
- """Test arch: StyleGAN2GeneratorClean."""
8
-
9
- # model init and forward (gpu)
10
- if torch.cuda.is_available():
11
- net = StyleGAN2GeneratorClean(
12
- out_size=32, num_style_feat=512, num_mlp=8, channel_multiplier=1, narrow=0.5).cuda().eval()
13
- style = torch.rand((1, 512), dtype=torch.float32).cuda()
14
- output = net([style], input_is_latent=False)
15
- assert output[0].shape == (1, 3, 32, 32)
16
- assert output[1] is None
17
-
18
- # -------------------- with return_latents ----------------------- #
19
- output = net([style], input_is_latent=True, return_latents=True)
20
- assert output[0].shape == (1, 3, 32, 32)
21
- assert len(output[1]) == 1
22
- # check latent
23
- assert output[1][0].shape == (8, 512)
24
-
25
- # -------------------- with randomize_noise = False ----------------------- #
26
- output = net([style], randomize_noise=False)
27
- assert output[0].shape == (1, 3, 32, 32)
28
- assert output[1] is None
29
-
30
- # -------------------- with truncation = 0.5 and mixing----------------------- #
31
- output = net([style, style], truncation=0.5, truncation_latent=style)
32
- assert output[0].shape == (1, 3, 32, 32)
33
- assert output[1] is None
34
-
35
- # ------------------ test make_noise ----------------------- #
36
- out = net.make_noise()
37
- assert len(out) == 7
38
- assert out[0].shape == (1, 1, 4, 4)
39
- assert out[1].shape == (1, 1, 8, 8)
40
- assert out[2].shape == (1, 1, 8, 8)
41
- assert out[3].shape == (1, 1, 16, 16)
42
- assert out[4].shape == (1, 1, 16, 16)
43
- assert out[5].shape == (1, 1, 32, 32)
44
- assert out[6].shape == (1, 1, 32, 32)
45
-
46
- # ------------------ test get_latent ----------------------- #
47
- out = net.get_latent(style)
48
- assert out.shape == (1, 512)
49
-
50
- # ------------------ test mean_latent ----------------------- #
51
- out = net.mean_latent(2)
52
- assert out.shape == (1, 512)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/CVPR/lama-example/models/ade20k/base.py DELETED
@@ -1,627 +0,0 @@
1
- """Modified from https://github.com/CSAILVision/semantic-segmentation-pytorch"""
2
-
3
- import os
4
-
5
- import pandas as pd
6
- import torch
7
- import torch.nn as nn
8
- import torch.nn.functional as F
9
- from scipy.io import loadmat
10
- from torch.nn.modules import BatchNorm2d
11
-
12
- from . import resnet
13
- from . import mobilenet
14
-
15
-
16
- NUM_CLASS = 150
17
- base_path = os.path.dirname(os.path.abspath(__file__)) # current file path
18
- colors_path = os.path.join(base_path, 'color150.mat')
19
- classes_path = os.path.join(base_path, 'object150_info.csv')
20
-
21
- segm_options = dict(colors=loadmat(colors_path)['colors'],
22
- classes=pd.read_csv(classes_path),)
23
-
24
-
25
- class NormalizeTensor:
26
- def __init__(self, mean, std, inplace=False):
27
- """Normalize a tensor image with mean and standard deviation.
28
- .. note::
29
- This transform acts out of place by default, i.e., it does not mutates the input tensor.
30
- See :class:`~torchvision.transforms.Normalize` for more details.
31
- Args:
32
- tensor (Tensor): Tensor image of size (C, H, W) to be normalized.
33
- mean (sequence): Sequence of means for each channel.
34
- std (sequence): Sequence of standard deviations for each channel.
35
- inplace(bool,optional): Bool to make this operation inplace.
36
- Returns:
37
- Tensor: Normalized Tensor image.
38
- """
39
-
40
- self.mean = mean
41
- self.std = std
42
- self.inplace = inplace
43
-
44
- def __call__(self, tensor):
45
- if not self.inplace:
46
- tensor = tensor.clone()
47
-
48
- dtype = tensor.dtype
49
- mean = torch.as_tensor(self.mean, dtype=dtype, device=tensor.device)
50
- std = torch.as_tensor(self.std, dtype=dtype, device=tensor.device)
51
- tensor.sub_(mean[None, :, None, None]).div_(std[None, :, None, None])
52
- return tensor
53
-
54
-
55
- # Model Builder
56
- class ModelBuilder:
57
- # custom weights initialization
58
- @staticmethod
59
- def weights_init(m):
60
- classname = m.__class__.__name__
61
- if classname.find('Conv') != -1:
62
- nn.init.kaiming_normal_(m.weight.data)
63
- elif classname.find('BatchNorm') != -1:
64
- m.weight.data.fill_(1.)
65
- m.bias.data.fill_(1e-4)
66
-
67
- @staticmethod
68
- def build_encoder(arch='resnet50dilated', fc_dim=512, weights=''):
69
- pretrained = True if len(weights) == 0 else False
70
- arch = arch.lower()
71
- if arch == 'mobilenetv2dilated':
72
- orig_mobilenet = mobilenet.__dict__['mobilenetv2'](pretrained=pretrained)
73
- net_encoder = MobileNetV2Dilated(orig_mobilenet, dilate_scale=8)
74
- elif arch == 'resnet18':
75
- orig_resnet = resnet.__dict__['resnet18'](pretrained=pretrained)
76
- net_encoder = Resnet(orig_resnet)
77
- elif arch == 'resnet18dilated':
78
- orig_resnet = resnet.__dict__['resnet18'](pretrained=pretrained)
79
- net_encoder = ResnetDilated(orig_resnet, dilate_scale=8)
80
- elif arch == 'resnet50dilated':
81
- orig_resnet = resnet.__dict__['resnet50'](pretrained=pretrained)
82
- net_encoder = ResnetDilated(orig_resnet, dilate_scale=8)
83
- elif arch == 'resnet50':
84
- orig_resnet = resnet.__dict__['resnet50'](pretrained=pretrained)
85
- net_encoder = Resnet(orig_resnet)
86
- else:
87
- raise Exception('Architecture undefined!')
88
-
89
- # encoders are usually pretrained
90
- # net_encoder.apply(ModelBuilder.weights_init)
91
- if len(weights) > 0:
92
- print('Loading weights for net_encoder')
93
- net_encoder.load_state_dict(
94
- torch.load(weights, map_location=lambda storage, loc: storage), strict=False)
95
- return net_encoder
96
-
97
- @staticmethod
98
- def build_decoder(arch='ppm_deepsup',
99
- fc_dim=512, num_class=NUM_CLASS,
100
- weights='', use_softmax=False, drop_last_conv=False):
101
- arch = arch.lower()
102
- if arch == 'ppm_deepsup':
103
- net_decoder = PPMDeepsup(
104
- num_class=num_class,
105
- fc_dim=fc_dim,
106
- use_softmax=use_softmax,
107
- drop_last_conv=drop_last_conv)
108
- elif arch == 'c1_deepsup':
109
- net_decoder = C1DeepSup(
110
- num_class=num_class,
111
- fc_dim=fc_dim,
112
- use_softmax=use_softmax,
113
- drop_last_conv=drop_last_conv)
114
- else:
115
- raise Exception('Architecture undefined!')
116
-
117
- net_decoder.apply(ModelBuilder.weights_init)
118
- if len(weights) > 0:
119
- print('Loading weights for net_decoder')
120
- net_decoder.load_state_dict(
121
- torch.load(weights, map_location=lambda storage, loc: storage), strict=False)
122
- return net_decoder
123
-
124
- @staticmethod
125
- def get_decoder(weights_path, arch_encoder, arch_decoder, fc_dim, drop_last_conv, *arts, **kwargs):
126
- path = os.path.join(weights_path, 'ade20k', f'ade20k-{arch_encoder}-{arch_decoder}/decoder_epoch_20.pth')
127
- return ModelBuilder.build_decoder(arch=arch_decoder, fc_dim=fc_dim, weights=path, use_softmax=True, drop_last_conv=drop_last_conv)
128
-
129
- @staticmethod
130
- def get_encoder(weights_path, arch_encoder, arch_decoder, fc_dim, segmentation,
131
- *arts, **kwargs):
132
- if segmentation:
133
- path = os.path.join(weights_path, 'ade20k', f'ade20k-{arch_encoder}-{arch_decoder}/encoder_epoch_20.pth')
134
- else:
135
- path = ''
136
- return ModelBuilder.build_encoder(arch=arch_encoder, fc_dim=fc_dim, weights=path)
137
-
138
-
139
- def conv3x3_bn_relu(in_planes, out_planes, stride=1):
140
- return nn.Sequential(
141
- nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=False),
142
- BatchNorm2d(out_planes),
143
- nn.ReLU(inplace=True),
144
- )
145
-
146
-
147
- class SegmentationModule(nn.Module):
148
- def __init__(self,
149
- weights_path,
150
- num_classes=150,
151
- arch_encoder="resnet50dilated",
152
- drop_last_conv=False,
153
- net_enc=None, # None for Default encoder
154
- net_dec=None, # None for Default decoder
155
- encode=None, # {None, 'binary', 'color', 'sky'}
156
- use_default_normalization=False,
157
- return_feature_maps=False,
158
- return_feature_maps_level=3, # {0, 1, 2, 3}
159
- return_feature_maps_only=True,
160
- **kwargs,
161
- ):
162
- super().__init__()
163
- self.weights_path = weights_path
164
- self.drop_last_conv = drop_last_conv
165
- self.arch_encoder = arch_encoder
166
- if self.arch_encoder == "resnet50dilated":
167
- self.arch_decoder = "ppm_deepsup"
168
- self.fc_dim = 2048
169
- elif self.arch_encoder == "mobilenetv2dilated":
170
- self.arch_decoder = "c1_deepsup"
171
- self.fc_dim = 320
172
- else:
173
- raise NotImplementedError(f"No such arch_encoder={self.arch_encoder}")
174
- model_builder_kwargs = dict(arch_encoder=self.arch_encoder,
175
- arch_decoder=self.arch_decoder,
176
- fc_dim=self.fc_dim,
177
- drop_last_conv=drop_last_conv,
178
- weights_path=self.weights_path)
179
-
180
- self.device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
181
- self.encoder = ModelBuilder.get_encoder(**model_builder_kwargs) if net_enc is None else net_enc
182
- self.decoder = ModelBuilder.get_decoder(**model_builder_kwargs) if net_dec is None else net_dec
183
- self.use_default_normalization = use_default_normalization
184
- self.default_normalization = NormalizeTensor(mean=[0.485, 0.456, 0.406],
185
- std=[0.229, 0.224, 0.225])
186
-
187
- self.encode = encode
188
-
189
- self.return_feature_maps = return_feature_maps
190
-
191
- assert 0 <= return_feature_maps_level <= 3
192
- self.return_feature_maps_level = return_feature_maps_level
193
-
194
- def normalize_input(self, tensor):
195
- if tensor.min() < 0 or tensor.max() > 1:
196
- raise ValueError("Tensor should be 0..1 before using normalize_input")
197
- return self.default_normalization(tensor)
198
-
199
- @property
200
- def feature_maps_channels(self):
201
- return 256 * 2**(self.return_feature_maps_level) # 256, 512, 1024, 2048
202
-
203
- def forward(self, img_data, segSize=None):
204
- if segSize is None:
205
- raise NotImplementedError("Please pass segSize param. By default: (300, 300)")
206
-
207
- fmaps = self.encoder(img_data, return_feature_maps=True)
208
- pred = self.decoder(fmaps, segSize=segSize)
209
-
210
- if self.return_feature_maps:
211
- return pred, fmaps
212
- # print("BINARY", img_data.shape, pred.shape)
213
- return pred
214
-
215
- def multi_mask_from_multiclass(self, pred, classes):
216
- def isin(ar1, ar2):
217
- return (ar1[..., None] == ar2).any(-1).float()
218
- return isin(pred, torch.LongTensor(classes).to(self.device))
219
-
220
- @staticmethod
221
- def multi_mask_from_multiclass_probs(scores, classes):
222
- res = None
223
- for c in classes:
224
- if res is None:
225
- res = scores[:, c]
226
- else:
227
- res += scores[:, c]
228
- return res
229
-
230
- def predict(self, tensor, imgSizes=(-1,), # (300, 375, 450, 525, 600)
231
- segSize=None):
232
- """Entry-point for segmentation. Use this methods instead of forward
233
- Arguments:
234
- tensor {torch.Tensor} -- BCHW
235
- Keyword Arguments:
236
- imgSizes {tuple or list} -- imgSizes for segmentation input.
237
- default: (300, 450)
238
- original implementation: (300, 375, 450, 525, 600)
239
-
240
- """
241
- if segSize is None:
242
- segSize = tensor.shape[-2:]
243
- segSize = (tensor.shape[2], tensor.shape[3])
244
- with torch.no_grad():
245
- if self.use_default_normalization:
246
- tensor = self.normalize_input(tensor)
247
- scores = torch.zeros(1, NUM_CLASS, segSize[0], segSize[1]).to(self.device)
248
- features = torch.zeros(1, self.feature_maps_channels, segSize[0], segSize[1]).to(self.device)
249
-
250
- result = []
251
- for img_size in imgSizes:
252
- if img_size != -1:
253
- img_data = F.interpolate(tensor.clone(), size=img_size)
254
- else:
255
- img_data = tensor.clone()
256
-
257
- if self.return_feature_maps:
258
- pred_current, fmaps = self.forward(img_data, segSize=segSize)
259
- else:
260
- pred_current = self.forward(img_data, segSize=segSize)
261
-
262
-
263
- result.append(pred_current)
264
- scores = scores + pred_current / len(imgSizes)
265
-
266
- # Disclaimer: We use and aggregate only last fmaps: fmaps[3]
267
- if self.return_feature_maps:
268
- features = features + F.interpolate(fmaps[self.return_feature_maps_level], size=segSize) / len(imgSizes)
269
-
270
- _, pred = torch.max(scores, dim=1)
271
-
272
- if self.return_feature_maps:
273
- return features
274
-
275
- return pred, result
276
-
277
- def get_edges(self, t):
278
- edge = torch.cuda.ByteTensor(t.size()).zero_()
279
- edge[:, :, :, 1:] = edge[:, :, :, 1:] | (t[:, :, :, 1:] != t[:, :, :, :-1])
280
- edge[:, :, :, :-1] = edge[:, :, :, :-1] | (t[:, :, :, 1:] != t[:, :, :, :-1])
281
- edge[:, :, 1:, :] = edge[:, :, 1:, :] | (t[:, :, 1:, :] != t[:, :, :-1, :])
282
- edge[:, :, :-1, :] = edge[:, :, :-1, :] | (t[:, :, 1:, :] != t[:, :, :-1, :])
283
-
284
- if True:
285
- return edge.half()
286
- return edge.float()
287
-
288
-
289
- # pyramid pooling, deep supervision
290
- class PPMDeepsup(nn.Module):
291
- def __init__(self, num_class=NUM_CLASS, fc_dim=4096,
292
- use_softmax=False, pool_scales=(1, 2, 3, 6),
293
- drop_last_conv=False):
294
- super().__init__()
295
- self.use_softmax = use_softmax
296
- self.drop_last_conv = drop_last_conv
297
-
298
- self.ppm = []
299
- for scale in pool_scales:
300
- self.ppm.append(nn.Sequential(
301
- nn.AdaptiveAvgPool2d(scale),
302
- nn.Conv2d(fc_dim, 512, kernel_size=1, bias=False),
303
- BatchNorm2d(512),
304
- nn.ReLU(inplace=True)
305
- ))
306
- self.ppm = nn.ModuleList(self.ppm)
307
- self.cbr_deepsup = conv3x3_bn_relu(fc_dim // 2, fc_dim // 4, 1)
308
-
309
- self.conv_last = nn.Sequential(
310
- nn.Conv2d(fc_dim + len(pool_scales) * 512, 512,
311
- kernel_size=3, padding=1, bias=False),
312
- BatchNorm2d(512),
313
- nn.ReLU(inplace=True),
314
- nn.Dropout2d(0.1),
315
- nn.Conv2d(512, num_class, kernel_size=1)
316
- )
317
- self.conv_last_deepsup = nn.Conv2d(fc_dim // 4, num_class, 1, 1, 0)
318
- self.dropout_deepsup = nn.Dropout2d(0.1)
319
-
320
- def forward(self, conv_out, segSize=None):
321
- conv5 = conv_out[-1]
322
-
323
- input_size = conv5.size()
324
- ppm_out = [conv5]
325
- for pool_scale in self.ppm:
326
- ppm_out.append(nn.functional.interpolate(
327
- pool_scale(conv5),
328
- (input_size[2], input_size[3]),
329
- mode='bilinear', align_corners=False))
330
- ppm_out = torch.cat(ppm_out, 1)
331
-
332
- if self.drop_last_conv:
333
- return ppm_out
334
- else:
335
- x = self.conv_last(ppm_out)
336
-
337
- if self.use_softmax: # is True during inference
338
- x = nn.functional.interpolate(
339
- x, size=segSize, mode='bilinear', align_corners=False)
340
- x = nn.functional.softmax(x, dim=1)
341
- return x
342
-
343
- # deep sup
344
- conv4 = conv_out[-2]
345
- _ = self.cbr_deepsup(conv4)
346
- _ = self.dropout_deepsup(_)
347
- _ = self.conv_last_deepsup(_)
348
-
349
- x = nn.functional.log_softmax(x, dim=1)
350
- _ = nn.functional.log_softmax(_, dim=1)
351
-
352
- return (x, _)
353
-
354
-
355
- class Resnet(nn.Module):
356
- def __init__(self, orig_resnet):
357
- super(Resnet, self).__init__()
358
-
359
- # take pretrained resnet, except AvgPool and FC
360
- self.conv1 = orig_resnet.conv1
361
- self.bn1 = orig_resnet.bn1
362
- self.relu1 = orig_resnet.relu1
363
- self.conv2 = orig_resnet.conv2
364
- self.bn2 = orig_resnet.bn2
365
- self.relu2 = orig_resnet.relu2
366
- self.conv3 = orig_resnet.conv3
367
- self.bn3 = orig_resnet.bn3
368
- self.relu3 = orig_resnet.relu3
369
- self.maxpool = orig_resnet.maxpool
370
- self.layer1 = orig_resnet.layer1
371
- self.layer2 = orig_resnet.layer2
372
- self.layer3 = orig_resnet.layer3
373
- self.layer4 = orig_resnet.layer4
374
-
375
- def forward(self, x, return_feature_maps=False):
376
- conv_out = []
377
-
378
- x = self.relu1(self.bn1(self.conv1(x)))
379
- x = self.relu2(self.bn2(self.conv2(x)))
380
- x = self.relu3(self.bn3(self.conv3(x)))
381
- x = self.maxpool(x)
382
-
383
- x = self.layer1(x); conv_out.append(x);
384
- x = self.layer2(x); conv_out.append(x);
385
- x = self.layer3(x); conv_out.append(x);
386
- x = self.layer4(x); conv_out.append(x);
387
-
388
- if return_feature_maps:
389
- return conv_out
390
- return [x]
391
-
392
- # Resnet Dilated
393
- class ResnetDilated(nn.Module):
394
- def __init__(self, orig_resnet, dilate_scale=8):
395
- super().__init__()
396
- from functools import partial
397
-
398
- if dilate_scale == 8:
399
- orig_resnet.layer3.apply(
400
- partial(self._nostride_dilate, dilate=2))
401
- orig_resnet.layer4.apply(
402
- partial(self._nostride_dilate, dilate=4))
403
- elif dilate_scale == 16:
404
- orig_resnet.layer4.apply(
405
- partial(self._nostride_dilate, dilate=2))
406
-
407
- # take pretrained resnet, except AvgPool and FC
408
- self.conv1 = orig_resnet.conv1
409
- self.bn1 = orig_resnet.bn1
410
- self.relu1 = orig_resnet.relu1
411
- self.conv2 = orig_resnet.conv2
412
- self.bn2 = orig_resnet.bn2
413
- self.relu2 = orig_resnet.relu2
414
- self.conv3 = orig_resnet.conv3
415
- self.bn3 = orig_resnet.bn3
416
- self.relu3 = orig_resnet.relu3
417
- self.maxpool = orig_resnet.maxpool
418
- self.layer1 = orig_resnet.layer1
419
- self.layer2 = orig_resnet.layer2
420
- self.layer3 = orig_resnet.layer3
421
- self.layer4 = orig_resnet.layer4
422
-
423
- def _nostride_dilate(self, m, dilate):
424
- classname = m.__class__.__name__
425
- if classname.find('Conv') != -1:
426
- # the convolution with stride
427
- if m.stride == (2, 2):
428
- m.stride = (1, 1)
429
- if m.kernel_size == (3, 3):
430
- m.dilation = (dilate // 2, dilate // 2)
431
- m.padding = (dilate // 2, dilate // 2)
432
- # other convoluions
433
- else:
434
- if m.kernel_size == (3, 3):
435
- m.dilation = (dilate, dilate)
436
- m.padding = (dilate, dilate)
437
-
438
- def forward(self, x, return_feature_maps=False):
439
- conv_out = []
440
-
441
- x = self.relu1(self.bn1(self.conv1(x)))
442
- x = self.relu2(self.bn2(self.conv2(x)))
443
- x = self.relu3(self.bn3(self.conv3(x)))
444
- x = self.maxpool(x)
445
-
446
- x = self.layer1(x)
447
- conv_out.append(x)
448
- x = self.layer2(x)
449
- conv_out.append(x)
450
- x = self.layer3(x)
451
- conv_out.append(x)
452
- x = self.layer4(x)
453
- conv_out.append(x)
454
-
455
- if return_feature_maps:
456
- return conv_out
457
- return [x]
458
-
459
- class MobileNetV2Dilated(nn.Module):
460
- def __init__(self, orig_net, dilate_scale=8):
461
- super(MobileNetV2Dilated, self).__init__()
462
- from functools import partial
463
-
464
- # take pretrained mobilenet features
465
- self.features = orig_net.features[:-1]
466
-
467
- self.total_idx = len(self.features)
468
- self.down_idx = [2, 4, 7, 14]
469
-
470
- if dilate_scale == 8:
471
- for i in range(self.down_idx[-2], self.down_idx[-1]):
472
- self.features[i].apply(
473
- partial(self._nostride_dilate, dilate=2)
474
- )
475
- for i in range(self.down_idx[-1], self.total_idx):
476
- self.features[i].apply(
477
- partial(self._nostride_dilate, dilate=4)
478
- )
479
- elif dilate_scale == 16:
480
- for i in range(self.down_idx[-1], self.total_idx):
481
- self.features[i].apply(
482
- partial(self._nostride_dilate, dilate=2)
483
- )
484
-
485
- def _nostride_dilate(self, m, dilate):
486
- classname = m.__class__.__name__
487
- if classname.find('Conv') != -1:
488
- # the convolution with stride
489
- if m.stride == (2, 2):
490
- m.stride = (1, 1)
491
- if m.kernel_size == (3, 3):
492
- m.dilation = (dilate//2, dilate//2)
493
- m.padding = (dilate//2, dilate//2)
494
- # other convoluions
495
- else:
496
- if m.kernel_size == (3, 3):
497
- m.dilation = (dilate, dilate)
498
- m.padding = (dilate, dilate)
499
-
500
- def forward(self, x, return_feature_maps=False):
501
- if return_feature_maps:
502
- conv_out = []
503
- for i in range(self.total_idx):
504
- x = self.features[i](x)
505
- if i in self.down_idx:
506
- conv_out.append(x)
507
- conv_out.append(x)
508
- return conv_out
509
-
510
- else:
511
- return [self.features(x)]
512
-
513
-
514
- # last conv, deep supervision
515
- class C1DeepSup(nn.Module):
516
- def __init__(self, num_class=150, fc_dim=2048, use_softmax=False, drop_last_conv=False):
517
- super(C1DeepSup, self).__init__()
518
- self.use_softmax = use_softmax
519
- self.drop_last_conv = drop_last_conv
520
-
521
- self.cbr = conv3x3_bn_relu(fc_dim, fc_dim // 4, 1)
522
- self.cbr_deepsup = conv3x3_bn_relu(fc_dim // 2, fc_dim // 4, 1)
523
-
524
- # last conv
525
- self.conv_last = nn.Conv2d(fc_dim // 4, num_class, 1, 1, 0)
526
- self.conv_last_deepsup = nn.Conv2d(fc_dim // 4, num_class, 1, 1, 0)
527
-
528
- def forward(self, conv_out, segSize=None):
529
- conv5 = conv_out[-1]
530
-
531
- x = self.cbr(conv5)
532
-
533
- if self.drop_last_conv:
534
- return x
535
- else:
536
- x = self.conv_last(x)
537
-
538
- if self.use_softmax: # is True during inference
539
- x = nn.functional.interpolate(
540
- x, size=segSize, mode='bilinear', align_corners=False)
541
- x = nn.functional.softmax(x, dim=1)
542
- return x
543
-
544
- # deep sup
545
- conv4 = conv_out[-2]
546
- _ = self.cbr_deepsup(conv4)
547
- _ = self.conv_last_deepsup(_)
548
-
549
- x = nn.functional.log_softmax(x, dim=1)
550
- _ = nn.functional.log_softmax(_, dim=1)
551
-
552
- return (x, _)
553
-
554
-
555
- # last conv
556
- class C1(nn.Module):
557
- def __init__(self, num_class=150, fc_dim=2048, use_softmax=False):
558
- super(C1, self).__init__()
559
- self.use_softmax = use_softmax
560
-
561
- self.cbr = conv3x3_bn_relu(fc_dim, fc_dim // 4, 1)
562
-
563
- # last conv
564
- self.conv_last = nn.Conv2d(fc_dim // 4, num_class, 1, 1, 0)
565
-
566
- def forward(self, conv_out, segSize=None):
567
- conv5 = conv_out[-1]
568
- x = self.cbr(conv5)
569
- x = self.conv_last(x)
570
-
571
- if self.use_softmax: # is True during inference
572
- x = nn.functional.interpolate(
573
- x, size=segSize, mode='bilinear', align_corners=False)
574
- x = nn.functional.softmax(x, dim=1)
575
- else:
576
- x = nn.functional.log_softmax(x, dim=1)
577
-
578
- return x
579
-
580
-
581
- # pyramid pooling
582
- class PPM(nn.Module):
583
- def __init__(self, num_class=150, fc_dim=4096,
584
- use_softmax=False, pool_scales=(1, 2, 3, 6)):
585
- super(PPM, self).__init__()
586
- self.use_softmax = use_softmax
587
-
588
- self.ppm = []
589
- for scale in pool_scales:
590
- self.ppm.append(nn.Sequential(
591
- nn.AdaptiveAvgPool2d(scale),
592
- nn.Conv2d(fc_dim, 512, kernel_size=1, bias=False),
593
- BatchNorm2d(512),
594
- nn.ReLU(inplace=True)
595
- ))
596
- self.ppm = nn.ModuleList(self.ppm)
597
-
598
- self.conv_last = nn.Sequential(
599
- nn.Conv2d(fc_dim+len(pool_scales)*512, 512,
600
- kernel_size=3, padding=1, bias=False),
601
- BatchNorm2d(512),
602
- nn.ReLU(inplace=True),
603
- nn.Dropout2d(0.1),
604
- nn.Conv2d(512, num_class, kernel_size=1)
605
- )
606
-
607
- def forward(self, conv_out, segSize=None):
608
- conv5 = conv_out[-1]
609
-
610
- input_size = conv5.size()
611
- ppm_out = [conv5]
612
- for pool_scale in self.ppm:
613
- ppm_out.append(nn.functional.interpolate(
614
- pool_scale(conv5),
615
- (input_size[2], input_size[3]),
616
- mode='bilinear', align_corners=False))
617
- ppm_out = torch.cat(ppm_out, 1)
618
-
619
- x = self.conv_last(ppm_out)
620
-
621
- if self.use_softmax: # is True during inference
622
- x = nn.functional.interpolate(
623
- x, size=segSize, mode='bilinear', align_corners=False)
624
- x = nn.functional.softmax(x, dim=1)
625
- else:
626
- x = nn.functional.log_softmax(x, dim=1)
627
- return x
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Cat125/text-generator-v3/datamanager.py DELETED
@@ -1,104 +0,0 @@
1
- import json
2
- import pickle
3
-
4
- from files import read_lines
5
-
6
- models = json.load(open("models/models.json"))
7
- TEXT_PATH = 'models/%s/text.txt'
8
- FILENAME_V1 = 'models/%s/data.pkl'
9
- FILENAME_V2 = 'models/%s/data2.pkl'
10
- FILENAME_V3 = 'models/%s/data3.pkl'
11
-
12
- def get_texts(model_name):
13
- """
14
- This function returns the lines of text associated with a given model name.
15
-
16
- :param model_name: The name of a model that has been defined in the `models` dictionary. This
17
- function is designed to retrieve the texts associated with a particular model
18
- :return: The function `get_texts` is returning the text data from a specific model, which is
19
- identified by its name. The text data is obtained by calling the `read_lines` function on the `text`
20
- attribute of the specified model.
21
- """
22
- return read_lines(TEXT_PATH % model_name)
23
-
24
- def set_data(model_name, data):
25
- """
26
- This function saves data to a file using the pickle module, with the filename specified by the
27
- model_name argument.
28
-
29
- :param model_name: The name of the model for which the data is being set
30
- :param data: The data that needs to be saved for the given model. It could be any Python object such
31
- as a list, dictionary, or a trained model
32
- """
33
- pickle.dump(data, open(FILENAME_V1 % model_name, 'wb+'))
34
-
35
- def get_data(model_name):
36
- """
37
- The function retrieves data from a database or a file using a model name as input.
38
-
39
- :param model_name: The name of the model for which we want to retrieve the data
40
- :return: The function `get_data` returns the database object for the specified `model_name`. If the
41
- database object is already loaded in memory, it returns the cached object. Otherwise, it loads the
42
- object from a file using `pickle.load()` and caches it for future use.
43
- """
44
- if models[model_name]["db"]:
45
- return models[model_name]["db"]
46
- db = pickle.load(open(FILENAME_V1 % model_name, 'rb'))
47
- models[model_name]["db"] = db
48
- return db
49
-
50
- def set_data_v2(model_name, data):
51
- """
52
- This function saves data to a file using the pickle module, with the filename specified in a
53
- dictionary associated with the given model name.
54
-
55
- :param model_name: The name of the model for which the data is being set
56
- :param data: The data that needs to be saved to a file using the pickle module
57
- """
58
- pickle.dump(data, open(FILENAME_V2 % model_name, 'wb+'))
59
-
60
- def get_data_v2(model_name):
61
- """
62
- This function returns a database object for a given model name, either by loading it from a file or
63
- returning a cached version.
64
-
65
- :param model_name: The name of the model for which we want to retrieve the data
66
- :return: a database object for the given model name. If the database object is already loaded in the
67
- models dictionary, it returns the object from the dictionary. Otherwise, it loads the object from a
68
- pickle file and stores it in the dictionary before returning it.
69
- """
70
- if models[model_name]["db2"]:
71
- return models[model_name]["db2"]
72
- db = pickle.load(open(FILENAME_V2 % model_name, 'rb'))
73
- models[model_name]["db2"] = db
74
- return db
75
-
76
- def set_data_v3(model_name, data):
77
- """
78
- This function saves data to a file using the pickle module, with the filename specified by the
79
- model_name argument.
80
-
81
- :param model_name: The name of the model for which the data is being set
82
- :param data: The data parameter is the data that needs to be saved to a file using the pickle
83
- module. The data can be of any type, such as a list, dictionary, or object. The function saves the
84
- data to a file specified by the model_name parameter. The filename is obtained from the models
85
- dictionary
86
- """
87
- pickle.dump(data, open(FILENAME_V3 % model_name, 'wb+'))
88
-
89
- def get_data_v3(model_name):
90
- """
91
- This function loads a database file for a given model and returns it, while also caching it for
92
- future use.
93
-
94
- :param model_name: a string representing the name of a model
95
- :return: The function `get_data_v3` returns the database object for the given `model_name`. If the
96
- database object is already loaded in the `models` dictionary, it returns the cached object.
97
- Otherwise, it loads the object from the file specified in the `models` dictionary, caches it in the
98
- `models` dictionary, and returns it.
99
- """
100
- if models[model_name]["db3"]:
101
- return models[model_name]["db3"]
102
- db = pickle.load(open(FILENAME_V3 % model_name, 'rb'))
103
- models[model_name]["db3"] = db
104
- return db
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Cong723/gpt-academic-public/colorful.py DELETED
@@ -1,91 +0,0 @@
1
- import platform
2
- from sys import stdout
3
-
4
- if platform.system()=="Linux":
5
- pass
6
- else:
7
- from colorama import init
8
- init()
9
-
10
- # Do you like the elegance of Chinese characters?
11
- def print红(*kw,**kargs):
12
- print("\033[0;31m",*kw,"\033[0m",**kargs)
13
- def print绿(*kw,**kargs):
14
- print("\033[0;32m",*kw,"\033[0m",**kargs)
15
- def print黄(*kw,**kargs):
16
- print("\033[0;33m",*kw,"\033[0m",**kargs)
17
- def print蓝(*kw,**kargs):
18
- print("\033[0;34m",*kw,"\033[0m",**kargs)
19
- def print紫(*kw,**kargs):
20
- print("\033[0;35m",*kw,"\033[0m",**kargs)
21
- def print靛(*kw,**kargs):
22
- print("\033[0;36m",*kw,"\033[0m",**kargs)
23
-
24
- def print亮红(*kw,**kargs):
25
- print("\033[1;31m",*kw,"\033[0m",**kargs)
26
- def print亮绿(*kw,**kargs):
27
- print("\033[1;32m",*kw,"\033[0m",**kargs)
28
- def print亮黄(*kw,**kargs):
29
- print("\033[1;33m",*kw,"\033[0m",**kargs)
30
- def print亮蓝(*kw,**kargs):
31
- print("\033[1;34m",*kw,"\033[0m",**kargs)
32
- def print亮紫(*kw,**kargs):
33
- print("\033[1;35m",*kw,"\033[0m",**kargs)
34
- def print亮靛(*kw,**kargs):
35
- print("\033[1;36m",*kw,"\033[0m",**kargs)
36
-
37
-
38
-
39
- def print亮红(*kw,**kargs):
40
- print("\033[1;31m",*kw,"\033[0m",**kargs)
41
- def print亮绿(*kw,**kargs):
42
- print("\033[1;32m",*kw,"\033[0m",**kargs)
43
- def print亮黄(*kw,**kargs):
44
- print("\033[1;33m",*kw,"\033[0m",**kargs)
45
- def print亮蓝(*kw,**kargs):
46
- print("\033[1;34m",*kw,"\033[0m",**kargs)
47
- def print亮紫(*kw,**kargs):
48
- print("\033[1;35m",*kw,"\033[0m",**kargs)
49
- def print亮靛(*kw,**kargs):
50
- print("\033[1;36m",*kw,"\033[0m",**kargs)
51
-
52
- print_red = print红
53
- print_green = print绿
54
- print_yellow = print黄
55
- print_blue = print蓝
56
- print_purple = print紫
57
- print_indigo = print靛
58
-
59
- print_bold_red = print亮红
60
- print_bold_green = print亮绿
61
- print_bold_yellow = print亮黄
62
- print_bold_blue = print亮蓝
63
- print_bold_purple = print亮紫
64
- print_bold_indigo = print亮靛
65
-
66
- if not stdout.isatty():
67
- # redirection, avoid a fucked up log file
68
- print红 = print
69
- print绿 = print
70
- print黄 = print
71
- print蓝 = print
72
- print紫 = print
73
- print靛 = print
74
- print亮红 = print
75
- print亮绿 = print
76
- print亮黄 = print
77
- print亮蓝 = print
78
- print亮紫 = print
79
- print亮靛 = print
80
- print_red = print
81
- print_green = print
82
- print_yellow = print
83
- print_blue = print
84
- print_purple = print
85
- print_indigo = print
86
- print_bold_red = print
87
- print_bold_green = print
88
- print_bold_yellow = print
89
- print_bold_blue = print
90
- print_bold_purple = print
91
- print_bold_indigo = print
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Cong723/gpt-academic-public/crazy_functions/test_project/cpp/cppipc/ipc.cpp DELETED
@@ -1,701 +0,0 @@
1
-
2
- #include <type_traits>
3
- #include <cstring>
4
- #include <algorithm>
5
- #include <utility> // std::pair, std::move, std::forward
6
- #include <atomic>
7
- #include <type_traits> // aligned_storage_t
8
- #include <string>
9
- #include <vector>
10
- #include <array>
11
- #include <cassert>
12
-
13
- #include "libipc/ipc.h"
14
- #include "libipc/def.h"
15
- #include "libipc/shm.h"
16
- #include "libipc/pool_alloc.h"
17
- #include "libipc/queue.h"
18
- #include "libipc/policy.h"
19
- #include "libipc/rw_lock.h"
20
- #include "libipc/waiter.h"
21
-
22
- #include "libipc/utility/log.h"
23
- #include "libipc/utility/id_pool.h"
24
- #include "libipc/utility/scope_guard.h"
25
- #include "libipc/utility/utility.h"
26
-
27
- #include "libipc/memory/resource.h"
28
- #include "libipc/platform/detail.h"
29
- #include "libipc/circ/elem_array.h"
30
-
31
- namespace {
32
-
33
- using msg_id_t = std::uint32_t;
34
- using acc_t = std::atomic<msg_id_t>;
35
-
36
- template <std::size_t DataSize, std::size_t AlignSize>
37
- struct msg_t;
38
-
39
- template <std::size_t AlignSize>
40
- struct msg_t<0, AlignSize> {
41
- msg_id_t cc_id_;
42
- msg_id_t id_;
43
- std::int32_t remain_;
44
- bool storage_;
45
- };
46
-
47
- template <std::size_t DataSize, std::size_t AlignSize>
48
- struct msg_t : msg_t<0, AlignSize> {
49
- std::aligned_storage_t<DataSize, AlignSize> data_ {};
50
-
51
- msg_t() = default;
52
- msg_t(msg_id_t cc_id, msg_id_t id, std::int32_t remain, void const * data, std::size_t size)
53
- : msg_t<0, AlignSize> {cc_id, id, remain, (data == nullptr) || (size == 0)} {
54
- if (this->storage_) {
55
- if (data != nullptr) {
56
- // copy storage-id
57
- *reinterpret_cast<ipc::storage_id_t*>(&data_) =
58
- *static_cast<ipc::storage_id_t const *>(data);
59
- }
60
- }
61
- else std::memcpy(&data_, data, size);
62
- }
63
- };
64
-
65
- template <typename T>
66
- ipc::buff_t make_cache(T& data, std::size_t size) {
67
- auto ptr = ipc::mem::alloc(size);
68
- std::memcpy(ptr, &data, (ipc::detail::min)(sizeof(data), size));
69
- return { ptr, size, ipc::mem::free };
70
- }
71
-
72
- struct cache_t {
73
- std::size_t fill_;
74
- ipc::buff_t buff_;
75
-
76
- cache_t(std::size_t f, ipc::buff_t && b)
77
- : fill_(f), buff_(std::move(b))
78
- {}
79
-
80
- void append(void const * data, std::size_t size) {
81
- if (fill_ >= buff_.size() || data == nullptr || size == 0) return;
82
- auto new_fill = (ipc::detail::min)(fill_ + size, buff_.size());
83
- std::memcpy(static_cast<ipc::byte_t*>(buff_.data()) + fill_, data, new_fill - fill_);
84
- fill_ = new_fill;
85
- }
86
- };
87
-
88
- auto cc_acc() {
89
- static ipc::shm::handle acc_h("__CA_CONN__", sizeof(acc_t));
90
- return static_cast<acc_t*>(acc_h.get());
91
- }
92
-
93
- IPC_CONSTEXPR_ std::size_t align_chunk_size(std::size_t size) noexcept {
94
- return (((size - 1) / ipc::large_msg_align) + 1) * ipc::large_msg_align;
95
- }
96
-
97
- IPC_CONSTEXPR_ std::size_t calc_chunk_size(std::size_t size) noexcept {
98
- return ipc::make_align(alignof(std::max_align_t), align_chunk_size(
99
- ipc::make_align(alignof(std::max_align_t), sizeof(std::atomic<ipc::circ::cc_t>)) + size));
100
- }
101
-
102
- struct chunk_t {
103
- std::atomic<ipc::circ::cc_t> &conns() noexcept {
104
- return *reinterpret_cast<std::atomic<ipc::circ::cc_t> *>(this);
105
- }
106
-
107
- void *data() noexcept {
108
- return reinterpret_cast<ipc::byte_t *>(this)
109
- + ipc::make_align(alignof(std::max_align_t), sizeof(std::atomic<ipc::circ::cc_t>));
110
- }
111
- };
112
-
113
- struct chunk_info_t {
114
- ipc::id_pool<> pool_;
115
- ipc::spin_lock lock_;
116
-
117
- IPC_CONSTEXPR_ static std::size_t chunks_mem_size(std::size_t chunk_size) noexcept {
118
- return ipc::id_pool<>::max_count * chunk_size;
119
- }
120
-
121
- ipc::byte_t *chunks_mem() noexcept {
122
- return reinterpret_cast<ipc::byte_t *>(this + 1);
123
- }
124
-
125
- chunk_t *at(std::size_t chunk_size, ipc::storage_id_t id) noexcept {
126
- if (id < 0) return nullptr;
127
- return reinterpret_cast<chunk_t *>(chunks_mem() + (chunk_size * id));
128
- }
129
- };
130
-
131
- auto& chunk_storages() {
132
- class chunk_handle_t {
133
- ipc::shm::handle handle_;
134
-
135
- public:
136
- chunk_info_t *get_info(std::size_t chunk_size) {
137
- if (!handle_.valid() &&
138
- !handle_.acquire( ("__CHUNK_INFO__" + ipc::to_string(chunk_size)).c_str(),
139
- sizeof(chunk_info_t) + chunk_info_t::chunks_mem_size(chunk_size) )) {
140
- ipc::error("[chunk_storages] chunk_shm.id_info_.acquire failed: chunk_size = %zd\n", chunk_size);
141
- return nullptr;
142
- }
143
- auto info = static_cast<chunk_info_t*>(handle_.get());
144
- if (info == nullptr) {
145
- ipc::error("[chunk_storages] chunk_shm.id_info_.get failed: chunk_size = %zd\n", chunk_size);
146
- return nullptr;
147
- }
148
- return info;
149
- }
150
- };
151
- static ipc::map<std::size_t, chunk_handle_t> chunk_hs;
152
- return chunk_hs;
153
- }
154
-
155
- chunk_info_t *chunk_storage_info(std::size_t chunk_size) {
156
- auto &storages = chunk_storages();
157
- std::decay_t<decltype(storages)>::iterator it;
158
- {
159
- static ipc::rw_lock lock;
160
- IPC_UNUSED_ std::shared_lock<ipc::rw_lock> guard {lock};
161
- if ((it = storages.find(chunk_size)) == storages.end()) {
162
- using chunk_handle_t = std::decay_t<decltype(storages)>::value_type::second_type;
163
- guard.unlock();
164
- IPC_UNUSED_ std::lock_guard<ipc::rw_lock> guard {lock};
165
- it = storages.emplace(chunk_size, chunk_handle_t{}).first;
166
- }
167
- }
168
- return it->second.get_info(chunk_size);
169
- }
170
-
171
- std::pair<ipc::storage_id_t, void*> acquire_storage(std::size_t size, ipc::circ::cc_t conns) {
172
- std::size_t chunk_size = calc_chunk_size(size);
173
- auto info = chunk_storage_info(chunk_size);
174
- if (info == nullptr) return {};
175
-
176
- info->lock_.lock();
177
- info->pool_.prepare();
178
- // got an unique id
179
- auto id = info->pool_.acquire();
180
- info->lock_.unlock();
181
-
182
- auto chunk = info->at(chunk_size, id);
183
- if (chunk == nullptr) return {};
184
- chunk->conns().store(conns, std::memory_order_relaxed);
185
- return { id, chunk->data() };
186
- }
187
-
188
- void *find_storage(ipc::storage_id_t id, std::size_t size) {
189
- if (id < 0) {
190
- ipc::error("[find_storage] id is invalid: id = %ld, size = %zd\n", (long)id, size);
191
- return nullptr;
192
- }
193
- std::size_t chunk_size = calc_chunk_size(size);
194
- auto info = chunk_storage_info(chunk_size);
195
- if (info == nullptr) return nullptr;
196
- return info->at(chunk_size, id)->data();
197
- }
198
-
199
- void release_storage(ipc::storage_id_t id, std::size_t size) {
200
- if (id < 0) {
201
- ipc::error("[release_storage] id is invalid: id = %ld, size = %zd\n", (long)id, size);
202
- return;
203
- }
204
- std::size_t chunk_size = calc_chunk_size(size);
205
- auto info = chunk_storage_info(chunk_size);
206
- if (info == nullptr) return;
207
- info->lock_.lock();
208
- info->pool_.release(id);
209
- info->lock_.unlock();
210
- }
211
-
212
- template <ipc::relat Rp, ipc::relat Rc>
213
- bool sub_rc(ipc::wr<Rp, Rc, ipc::trans::unicast>,
214
- std::atomic<ipc::circ::cc_t> &/*conns*/, ipc::circ::cc_t /*curr_conns*/, ipc::circ::cc_t /*conn_id*/) noexcept {
215
- return true;
216
- }
217
-
218
- template <ipc::relat Rp, ipc::relat Rc>
219
- bool sub_rc(ipc::wr<Rp, Rc, ipc::trans::broadcast>,
220
- std::atomic<ipc::circ::cc_t> &conns, ipc::circ::cc_t curr_conns, ipc::circ::cc_t conn_id) noexcept {
221
- auto last_conns = curr_conns & ~conn_id;
222
- for (unsigned k = 0;;) {
223
- auto chunk_conns = conns.load(std::memory_order_acquire);
224
- if (conns.compare_exchange_weak(chunk_conns, chunk_conns & last_conns, std::memory_order_release)) {
225
- return (chunk_conns & last_conns) == 0;
226
- }
227
- ipc::yield(k);
228
- }
229
- }
230
-
231
- template <typename Flag>
232
- void recycle_storage(ipc::storage_id_t id, std::size_t size, ipc::circ::cc_t curr_conns, ipc::circ::cc_t conn_id) {
233
- if (id < 0) {
234
- ipc::error("[recycle_storage] id is invalid: id = %ld, size = %zd\n", (long)id, size);
235
- return;
236
- }
237
- std::size_t chunk_size = calc_chunk_size(size);
238
- auto info = chunk_storage_info(chunk_size);
239
- if (info == nullptr) return;
240
-
241
- auto chunk = info->at(chunk_size, id);
242
- if (chunk == nullptr) return;
243
-
244
- if (!sub_rc(Flag{}, chunk->conns(), curr_conns, conn_id)) {
245
- return;
246
- }
247
- info->lock_.lock();
248
- info->pool_.release(id);
249
- info->lock_.unlock();
250
- }
251
-
252
- template <typename MsgT>
253
- bool clear_message(void* p) {
254
- auto msg = static_cast<MsgT*>(p);
255
- if (msg->storage_) {
256
- std::int32_t r_size = static_cast<std::int32_t>(ipc::data_length) + msg->remain_;
257
- if (r_size <= 0) {
258
- ipc::error("[clear_message] invalid msg size: %d\n", (int)r_size);
259
- return true;
260
- }
261
- release_storage(
262
- *reinterpret_cast<ipc::storage_id_t*>(&msg->data_),
263
- static_cast<std::size_t>(r_size));
264
- }
265
- return true;
266
- }
267
-
268
- struct conn_info_head {
269
-
270
- ipc::string name_;
271
- msg_id_t cc_id_; // connection-info id
272
- ipc::detail::waiter cc_waiter_, wt_waiter_, rd_waiter_;
273
- ipc::shm::handle acc_h_;
274
-
275
- conn_info_head(char const * name)
276
- : name_ {name}
277
- , cc_id_ {(cc_acc() == nullptr) ? 0 : cc_acc()->fetch_add(1, std::memory_order_relaxed)}
278
- , cc_waiter_{("__CC_CONN__" + name_).c_str()}
279
- , wt_waiter_{("__WT_CONN__" + name_).c_str()}
280
- , rd_waiter_{("__RD_CONN__" + name_).c_str()}
281
- , acc_h_ {("__AC_CONN__" + name_).c_str(), sizeof(acc_t)} {
282
- }
283
-
284
- void quit_waiting() {
285
- cc_waiter_.quit_waiting();
286
- wt_waiter_.quit_waiting();
287
- rd_waiter_.quit_waiting();
288
- }
289
-
290
- auto acc() {
291
- return static_cast<acc_t*>(acc_h_.get());
292
- }
293
-
294
- auto& recv_cache() {
295
- thread_local ipc::unordered_map<msg_id_t, cache_t> tls;
296
- return tls;
297
- }
298
- };
299
-
300
- template <typename W, typename F>
301
- bool wait_for(W& waiter, F&& pred, std::uint64_t tm) {
302
- if (tm == 0) return !pred();
303
- for (unsigned k = 0; pred();) {
304
- bool ret = true;
305
- ipc::sleep(k, [&k, &ret, &waiter, &pred, tm] {
306
- ret = waiter.wait_if(std::forward<F>(pred), tm);
307
- k = 0;
308
- });
309
- if (!ret) return false; // timeout or fail
310
- if (k == 0) break; // k has been reset
311
- }
312
- return true;
313
- }
314
-
315
- template <typename Policy,
316
- std::size_t DataSize = ipc::data_length,
317
- std::size_t AlignSize = (ipc::detail::min)(DataSize, alignof(std::max_align_t))>
318
- struct queue_generator {
319
-
320
- using queue_t = ipc::queue<msg_t<DataSize, AlignSize>, Policy>;
321
-
322
- struct conn_info_t : conn_info_head {
323
- queue_t que_;
324
-
325
- conn_info_t(char const * name)
326
- : conn_info_head{name}
327
- , que_{("__QU_CONN__" +
328
- ipc::to_string(DataSize) + "__" +
329
- ipc::to_string(AlignSize) + "__" + name).c_str()} {
330
- }
331
-
332
- void disconnect_receiver() {
333
- bool dis = que_.disconnect();
334
- this->quit_waiting();
335
- if (dis) {
336
- this->recv_cache().clear();
337
- }
338
- }
339
- };
340
- };
341
-
342
- template <typename Policy>
343
- struct detail_impl {
344
-
345
- using policy_t = Policy;
346
- using flag_t = typename policy_t::flag_t;
347
- using queue_t = typename queue_generator<policy_t>::queue_t;
348
- using conn_info_t = typename queue_generator<policy_t>::conn_info_t;
349
-
350
- constexpr static conn_info_t* info_of(ipc::handle_t h) noexcept {
351
- return static_cast<conn_info_t*>(h);
352
- }
353
-
354
- constexpr static queue_t* queue_of(ipc::handle_t h) noexcept {
355
- return (info_of(h) == nullptr) ? nullptr : &(info_of(h)->que_);
356
- }
357
-
358
- /* API implementations */
359
-
360
- static void disconnect(ipc::handle_t h) {
361
- auto que = queue_of(h);
362
- if (que == nullptr) {
363
- return;
364
- }
365
- que->shut_sending();
366
- assert(info_of(h) != nullptr);
367
- info_of(h)->disconnect_receiver();
368
- }
369
-
370
- static bool reconnect(ipc::handle_t * ph, bool start_to_recv) {
371
- assert(ph != nullptr);
372
- assert(*ph != nullptr);
373
- auto que = queue_of(*ph);
374
- if (que == nullptr) {
375
- return false;
376
- }
377
- if (start_to_recv) {
378
- que->shut_sending();
379
- if (que->connect()) { // wouldn't connect twice
380
- info_of(*ph)->cc_waiter_.broadcast();
381
- return true;
382
- }
383
- return false;
384
- }
385
- // start_to_recv == false
386
- if (que->connected()) {
387
- info_of(*ph)->disconnect_receiver();
388
- }
389
- return que->ready_sending();
390
- }
391
-
392
- static bool connect(ipc::handle_t * ph, char const * name, bool start_to_recv) {
393
- assert(ph != nullptr);
394
- if (*ph == nullptr) {
395
- *ph = ipc::mem::alloc<conn_info_t>(name);
396
- }
397
- return reconnect(ph, start_to_recv);
398
- }
399
-
400
- static void destroy(ipc::handle_t h) {
401
- disconnect(h);
402
- ipc::mem::free(info_of(h));
403
- }
404
-
405
- static std::size_t recv_count(ipc::handle_t h) noexcept {
406
- auto que = queue_of(h);
407
- if (que == nullptr) {
408
- return ipc::invalid_value;
409
- }
410
- return que->conn_count();
411
- }
412
-
413
- static bool wait_for_recv(ipc::handle_t h, std::size_t r_count, std::uint64_t tm) {
414
- auto que = queue_of(h);
415
- if (que == nullptr) {
416
- return false;
417
- }
418
- return wait_for(info_of(h)->cc_waiter_, [que, r_count] {
419
- return que->conn_count() < r_count;
420
- }, tm);
421
- }
422
-
423
- template <typename F>
424
- static bool send(F&& gen_push, ipc::handle_t h, void const * data, std::size_t size) {
425
- if (data == nullptr || size == 0) {
426
- ipc::error("fail: send(%p, %zd)\n", data, size);
427
- return false;
428
- }
429
- auto que = queue_of(h);
430
- if (que == nullptr) {
431
- ipc::error("fail: send, queue_of(h) == nullptr\n");
432
- return false;
433
- }
434
- if (que->elems() == nullptr) {
435
- ipc::error("fail: send, queue_of(h)->elems() == nullptr\n");
436
- return false;
437
- }
438
- if (!que->ready_sending()) {
439
- ipc::error("fail: send, que->ready_sending() == false\n");
440
- return false;
441
- }
442
- ipc::circ::cc_t conns = que->elems()->connections(std::memory_order_relaxed);
443
- if (conns == 0) {
444
- ipc::error("fail: send, there is no receiver on this connection.\n");
445
- return false;
446
- }
447
- // calc a new message id
448
- auto acc = info_of(h)->acc();
449
- if (acc == nullptr) {
450
- ipc::error("fail: send, info_of(h)->acc() == nullptr\n");
451
- return false;
452
- }
453
- auto msg_id = acc->fetch_add(1, std::memory_order_relaxed);
454
- auto try_push = std::forward<F>(gen_push)(info_of(h), que, msg_id);
455
- if (size > ipc::large_msg_limit) {
456
- auto dat = acquire_storage(size, conns);
457
- void * buf = dat.second;
458
- if (buf != nullptr) {
459
- std::memcpy(buf, data, size);
460
- return try_push(static_cast<std::int32_t>(size) -
461
- static_cast<std::int32_t>(ipc::data_length), &(dat.first), 0);
462
- }
463
- // try using message fragment
464
- //ipc::log("fail: shm::handle for big message. msg_id: %zd, size: %zd\n", msg_id, size);
465
- }
466
- // push message fragment
467
- std::int32_t offset = 0;
468
- for (std::int32_t i = 0; i < static_cast<std::int32_t>(size / ipc::data_length); ++i, offset += ipc::data_length) {
469
- if (!try_push(static_cast<std::int32_t>(size) - offset - static_cast<std::int32_t>(ipc::data_length),
470
- static_cast<ipc::byte_t const *>(data) + offset, ipc::data_length)) {
471
- return false;
472
- }
473
- }
474
- // if remain > 0, this is the last message fragment
475
- std::int32_t remain = static_cast<std::int32_t>(size) - offset;
476
- if (remain > 0) {
477
- if (!try_push(remain - static_cast<std::int32_t>(ipc::data_length),
478
- static_cast<ipc::byte_t const *>(data) + offset,
479
- static_cast<std::size_t>(remain))) {
480
- return false;
481
- }
482
- }
483
- return true;
484
- }
485
-
486
- static bool send(ipc::handle_t h, void const * data, std::size_t size, std::uint64_t tm) {
487
- return send([tm](auto info, auto que, auto msg_id) {
488
- return [tm, info, que, msg_id](std::int32_t remain, void const * data, std::size_t size) {
489
- if (!wait_for(info->wt_waiter_, [&] {
490
- return !que->push(
491
- [](void*) { return true; },
492
- info->cc_id_, msg_id, remain, data, size);
493
- }, tm)) {
494
- ipc::log("force_push: msg_id = %zd, remain = %d, size = %zd\n", msg_id, remain, size);
495
- if (!que->force_push(
496
- clear_message<typename queue_t::value_t>,
497
- info->cc_id_, msg_id, remain, data, size)) {
498
- return false;
499
- }
500
- }
501
- info->rd_waiter_.broadcast();
502
- return true;
503
- };
504
- }, h, data, size);
505
- }
506
-
507
- static bool try_send(ipc::handle_t h, void const * data, std::size_t size, std::uint64_t tm) {
508
- return send([tm](auto info, auto que, auto msg_id) {
509
- return [tm, info, que, msg_id](std::int32_t remain, void const * data, std::size_t size) {
510
- if (!wait_for(info->wt_waiter_, [&] {
511
- return !que->push(
512
- [](void*) { return true; },
513
- info->cc_id_, msg_id, remain, data, size);
514
- }, tm)) {
515
- return false;
516
- }
517
- info->rd_waiter_.broadcast();
518
- return true;
519
- };
520
- }, h, data, size);
521
- }
522
-
523
- static ipc::buff_t recv(ipc::handle_t h, std::uint64_t tm) {
524
- auto que = queue_of(h);
525
- if (que == nullptr) {
526
- ipc::error("fail: recv, queue_of(h) == nullptr\n");
527
- return {};
528
- }
529
- if (!que->connected()) {
530
- // hasn't connected yet, just return.
531
- return {};
532
- }
533
- auto& rc = info_of(h)->recv_cache();
534
- for (;;) {
535
- // pop a new message
536
- typename queue_t::value_t msg;
537
- if (!wait_for(info_of(h)->rd_waiter_, [que, &msg] {
538
- return !que->pop(msg);
539
- }, tm)) {
540
- // pop failed, just return.
541
- return {};
542
- }
543
- info_of(h)->wt_waiter_.broadcast();
544
- if ((info_of(h)->acc() != nullptr) && (msg.cc_id_ == info_of(h)->cc_id_)) {
545
- continue; // ignore message to self
546
- }
547
- // msg.remain_ may minus & abs(msg.remain_) < data_length
548
- std::int32_t r_size = static_cast<std::int32_t>(ipc::data_length) + msg.remain_;
549
- if (r_size <= 0) {
550
- ipc::error("fail: recv, r_size = %d\n", (int)r_size);
551
- return {};
552
- }
553
- std::size_t msg_size = static_cast<std::size_t>(r_size);
554
- // large message
555
- if (msg.storage_) {
556
- ipc::storage_id_t buf_id = *reinterpret_cast<ipc::storage_id_t*>(&msg.data_);
557
- void* buf = find_storage(buf_id, msg_size);
558
- if (buf != nullptr) {
559
- struct recycle_t {
560
- ipc::storage_id_t storage_id;
561
- ipc::circ::cc_t curr_conns;
562
- ipc::circ::cc_t conn_id;
563
- } *r_info = ipc::mem::alloc<recycle_t>(recycle_t{
564
- buf_id, que->elems()->connections(std::memory_order_relaxed), que->connected_id()
565
- });
566
- if (r_info == nullptr) {
567
- ipc::log("fail: ipc::mem::alloc<recycle_t>.\n");
568
- return ipc::buff_t{buf, msg_size}; // no recycle
569
- } else {
570
- return ipc::buff_t{buf, msg_size, [](void* p_info, std::size_t size) {
571
- auto r_info = static_cast<recycle_t *>(p_info);
572
- IPC_UNUSED_ auto finally = ipc::guard([r_info] {
573
- ipc::mem::free(r_info);
574
- });
575
- recycle_storage<flag_t>(r_info->storage_id, size, r_info->curr_conns, r_info->conn_id);
576
- }, r_info};
577
- }
578
- } else {
579
- ipc::log("fail: shm::handle for large message. msg_id: %zd, buf_id: %zd, size: %zd\n", msg.id_, buf_id, msg_size);
580
- continue;
581
- }
582
- }
583
- // find cache with msg.id_
584
- auto cac_it = rc.find(msg.id_);
585
- if (cac_it == rc.end()) {
586
- if (msg_size <= ipc::data_length) {
587
- return make_cache(msg.data_, msg_size);
588
- }
589
- // gc
590
- if (rc.size() > 1024) {
591
- std::vector<msg_id_t> need_del;
592
- for (auto const & pair : rc) {
593
- auto cmp = std::minmax(msg.id_, pair.first);
594
- if (cmp.second - cmp.first > 8192) {
595
- need_del.push_back(pair.first);
596
- }
597
- }
598
- for (auto id : need_del) rc.erase(id);
599
- }
600
- // cache the first message fragment
601
- rc.emplace(msg.id_, cache_t { ipc::data_length, make_cache(msg.data_, msg_size) });
602
- }
603
- // has cached before this message
604
- else {
605
- auto& cac = cac_it->second;
606
- // this is the last message fragment
607
- if (msg.remain_ <= 0) {
608
- cac.append(&(msg.data_), msg_size);
609
- // finish this message, erase it from cache
610
- auto buff = std::move(cac.buff_);
611
- rc.erase(cac_it);
612
- return buff;
613
- }
614
- // there are remain datas after this message
615
- cac.append(&(msg.data_), ipc::data_length);
616
- }
617
- }
618
- }
619
-
620
- static ipc::buff_t try_recv(ipc::handle_t h) {
621
- return recv(h, 0);
622
- }
623
-
624
- }; // detail_impl<Policy>
625
-
626
- template <typename Flag>
627
- using policy_t = ipc::policy::choose<ipc::circ::elem_array, Flag>;
628
-
629
- } // internal-linkage
630
-
631
- namespace ipc {
632
-
633
- template <typename Flag>
634
- ipc::handle_t chan_impl<Flag>::inited() {
635
- ipc::detail::waiter::init();
636
- return nullptr;
637
- }
638
-
639
- template <typename Flag>
640
- bool chan_impl<Flag>::connect(ipc::handle_t * ph, char const * name, unsigned mode) {
641
- return detail_impl<policy_t<Flag>>::connect(ph, name, mode & receiver);
642
- }
643
-
644
- template <typename Flag>
645
- bool chan_impl<Flag>::reconnect(ipc::handle_t * ph, unsigned mode) {
646
- return detail_impl<policy_t<Flag>>::reconnect(ph, mode & receiver);
647
- }
648
-
649
- template <typename Flag>
650
- void chan_impl<Flag>::disconnect(ipc::handle_t h) {
651
- detail_impl<policy_t<Flag>>::disconnect(h);
652
- }
653
-
654
- template <typename Flag>
655
- void chan_impl<Flag>::destroy(ipc::handle_t h) {
656
- detail_impl<policy_t<Flag>>::destroy(h);
657
- }
658
-
659
- template <typename Flag>
660
- char const * chan_impl<Flag>::name(ipc::handle_t h) {
661
- auto info = detail_impl<policy_t<Flag>>::info_of(h);
662
- return (info == nullptr) ? nullptr : info->name_.c_str();
663
- }
664
-
665
- template <typename Flag>
666
- std::size_t chan_impl<Flag>::recv_count(ipc::handle_t h) {
667
- return detail_impl<policy_t<Flag>>::recv_count(h);
668
- }
669
-
670
- template <typename Flag>
671
- bool chan_impl<Flag>::wait_for_recv(ipc::handle_t h, std::size_t r_count, std::uint64_t tm) {
672
- return detail_impl<policy_t<Flag>>::wait_for_recv(h, r_count, tm);
673
- }
674
-
675
- template <typename Flag>
676
- bool chan_impl<Flag>::send(ipc::handle_t h, void const * data, std::size_t size, std::uint64_t tm) {
677
- return detail_impl<policy_t<Flag>>::send(h, data, size, tm);
678
- }
679
-
680
- template <typename Flag>
681
- buff_t chan_impl<Flag>::recv(ipc::handle_t h, std::uint64_t tm) {
682
- return detail_impl<policy_t<Flag>>::recv(h, tm);
683
- }
684
-
685
- template <typename Flag>
686
- bool chan_impl<Flag>::try_send(ipc::handle_t h, void const * data, std::size_t size, std::uint64_t tm) {
687
- return detail_impl<policy_t<Flag>>::try_send(h, data, size, tm);
688
- }
689
-
690
- template <typename Flag>
691
- buff_t chan_impl<Flag>::try_recv(ipc::handle_t h) {
692
- return detail_impl<policy_t<Flag>>::try_recv(h);
693
- }
694
-
695
- template struct chan_impl<ipc::wr<relat::single, relat::single, trans::unicast >>;
696
- // template struct chan_impl<ipc::wr<relat::single, relat::multi , trans::unicast >>; // TBD
697
- // template struct chan_impl<ipc::wr<relat::multi , relat::multi , trans::unicast >>; // TBD
698
- template struct chan_impl<ipc::wr<relat::single, relat::multi , trans::broadcast>>;
699
- template struct chan_impl<ipc::wr<relat::multi , relat::multi , trans::broadcast>>;
700
-
701
- } // namespace ipc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/fontTools/pens/hashPointPen.py DELETED
@@ -1,75 +0,0 @@
1
- # Modified from https://github.com/adobe-type-tools/psautohint/blob/08b346865710ed3c172f1eb581d6ef243b203f99/python/psautohint/ufoFont.py#L800-L838
2
- import hashlib
3
-
4
- from fontTools.pens.basePen import MissingComponentError
5
- from fontTools.pens.pointPen import AbstractPointPen
6
-
7
-
8
- class HashPointPen(AbstractPointPen):
9
- """
10
- This pen can be used to check if a glyph's contents (outlines plus
11
- components) have changed.
12
-
13
- Components are added as the original outline plus each composite's
14
- transformation.
15
-
16
- Example: You have some TrueType hinting code for a glyph which you want to
17
- compile. The hinting code specifies a hash value computed with HashPointPen
18
- that was valid for the glyph's outlines at the time the hinting code was
19
- written. Now you can calculate the hash for the glyph's current outlines to
20
- check if the outlines have changed, which would probably make the hinting
21
- code invalid.
22
-
23
- > glyph = ufo[name]
24
- > hash_pen = HashPointPen(glyph.width, ufo)
25
- > glyph.drawPoints(hash_pen)
26
- > ttdata = glyph.lib.get("public.truetype.instructions", None)
27
- > stored_hash = ttdata.get("id", None) # The hash is stored in the "id" key
28
- > if stored_hash is None or stored_hash != hash_pen.hash:
29
- > logger.error(f"Glyph hash mismatch, glyph '{name}' will have no instructions in font.")
30
- > else:
31
- > # The hash values are identical, the outline has not changed.
32
- > # Compile the hinting code ...
33
- > pass
34
- """
35
-
36
- def __init__(self, glyphWidth=0, glyphSet=None):
37
- self.glyphset = glyphSet
38
- self.data = ["w%s" % round(glyphWidth, 9)]
39
-
40
- @property
41
- def hash(self):
42
- data = "".join(self.data)
43
- if len(data) >= 128:
44
- data = hashlib.sha512(data.encode("ascii")).hexdigest()
45
- return data
46
-
47
- def beginPath(self, identifier=None, **kwargs):
48
- pass
49
-
50
- def endPath(self):
51
- self.data.append("|")
52
-
53
- def addPoint(
54
- self,
55
- pt,
56
- segmentType=None,
57
- smooth=False,
58
- name=None,
59
- identifier=None,
60
- **kwargs,
61
- ):
62
- if segmentType is None:
63
- pt_type = "o" # offcurve
64
- else:
65
- pt_type = segmentType[0]
66
- self.data.append(f"{pt_type}{pt[0]:g}{pt[1]:+g}")
67
-
68
- def addComponent(self, baseGlyphName, transformation, identifier=None, **kwargs):
69
- tr = "".join([f"{t:+}" for t in transformation])
70
- self.data.append("[")
71
- try:
72
- self.glyphset[baseGlyphName].drawPoints(self)
73
- except KeyError:
74
- raise MissingComponentError(baseGlyphName)
75
- self.data.append(f"({tr})]")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Danielzero/GPT3.5/modules/llama_func.py DELETED
@@ -1,166 +0,0 @@
1
- import os
2
- import logging
3
-
4
- from llama_index import download_loader
5
- from llama_index import (
6
- Document,
7
- LLMPredictor,
8
- PromptHelper,
9
- QuestionAnswerPrompt,
10
- RefinePrompt,
11
- )
12
- import colorama
13
- import PyPDF2
14
- from tqdm import tqdm
15
-
16
- from modules.presets import *
17
- from modules.utils import *
18
- from modules.config import local_embedding
19
-
20
-
21
- def get_index_name(file_src):
22
- file_paths = [x.name for x in file_src]
23
- file_paths.sort(key=lambda x: os.path.basename(x))
24
-
25
- md5_hash = hashlib.md5()
26
- for file_path in file_paths:
27
- with open(file_path, "rb") as f:
28
- while chunk := f.read(8192):
29
- md5_hash.update(chunk)
30
-
31
- return md5_hash.hexdigest()
32
-
33
-
34
- def block_split(text):
35
- blocks = []
36
- while len(text) > 0:
37
- blocks.append(Document(text[:1000]))
38
- text = text[1000:]
39
- return blocks
40
-
41
-
42
- def get_documents(file_src):
43
- documents = []
44
- logging.debug("Loading documents...")
45
- logging.debug(f"file_src: {file_src}")
46
- for file in file_src:
47
- filepath = file.name
48
- filename = os.path.basename(filepath)
49
- file_type = os.path.splitext(filepath)[1]
50
- logging.info(f"loading file: {filename}")
51
- try:
52
- if file_type == ".pdf":
53
- logging.debug("Loading PDF...")
54
- try:
55
- from modules.pdf_func import parse_pdf
56
- from modules.config import advance_docs
57
-
58
- two_column = advance_docs["pdf"].get("two_column", False)
59
- pdftext = parse_pdf(filepath, two_column).text
60
- except:
61
- pdftext = ""
62
- with open(filepath, "rb") as pdfFileObj:
63
- pdfReader = PyPDF2.PdfReader(pdfFileObj)
64
- for page in tqdm(pdfReader.pages):
65
- pdftext += page.extract_text()
66
- text_raw = pdftext
67
- elif file_type == ".docx":
68
- logging.debug("Loading Word...")
69
- DocxReader = download_loader("DocxReader")
70
- loader = DocxReader()
71
- text_raw = loader.load_data(file=filepath)[0].text
72
- elif file_type == ".epub":
73
- logging.debug("Loading EPUB...")
74
- EpubReader = download_loader("EpubReader")
75
- loader = EpubReader()
76
- text_raw = loader.load_data(file=filepath)[0].text
77
- elif file_type == ".xlsx":
78
- logging.debug("Loading Excel...")
79
- text_list = excel_to_string(filepath)
80
- for elem in text_list:
81
- documents.append(Document(elem))
82
- continue
83
- else:
84
- logging.debug("Loading text file...")
85
- with open(filepath, "r", encoding="utf-8") as f:
86
- text_raw = f.read()
87
- except Exception as e:
88
- logging.error(f"Error loading file: {filename}")
89
- pass
90
- text = add_space(text_raw)
91
- # text = block_split(text)
92
- # documents += text
93
- documents += [Document(text)]
94
- logging.debug("Documents loaded.")
95
- return documents
96
-
97
-
98
- def construct_index(
99
- api_key,
100
- file_src,
101
- max_input_size=4096,
102
- num_outputs=5,
103
- max_chunk_overlap=20,
104
- chunk_size_limit=600,
105
- embedding_limit=None,
106
- separator=" ",
107
- ):
108
- from langchain.chat_models import ChatOpenAI
109
- from langchain.embeddings.huggingface import HuggingFaceEmbeddings
110
- from llama_index import GPTSimpleVectorIndex, ServiceContext, LangchainEmbedding, OpenAIEmbedding
111
-
112
- if api_key:
113
- os.environ["OPENAI_API_KEY"] = api_key
114
- else:
115
- # 由于一个依赖的愚蠢的设计,这里必须要有一个API KEY
116
- os.environ["OPENAI_API_KEY"] = "sk-xxxxxxx"
117
- chunk_size_limit = None if chunk_size_limit == 0 else chunk_size_limit
118
- embedding_limit = None if embedding_limit == 0 else embedding_limit
119
- separator = " " if separator == "" else separator
120
-
121
- prompt_helper = PromptHelper(
122
- max_input_size=max_input_size,
123
- num_output=num_outputs,
124
- max_chunk_overlap=max_chunk_overlap,
125
- embedding_limit=embedding_limit,
126
- chunk_size_limit=600,
127
- separator=separator,
128
- )
129
- index_name = get_index_name(file_src)
130
- if os.path.exists(f"./index/{index_name}.json"):
131
- logging.info("找到了缓存的索引文件,加载中……")
132
- return GPTSimpleVectorIndex.load_from_disk(f"./index/{index_name}.json")
133
- else:
134
- try:
135
- documents = get_documents(file_src)
136
- if local_embedding:
137
- embed_model = LangchainEmbedding(HuggingFaceEmbeddings(model_name = "sentence-transformers/distiluse-base-multilingual-cased-v2"))
138
- else:
139
- embed_model = OpenAIEmbedding()
140
- logging.info("构建索引中……")
141
- with retrieve_proxy():
142
- service_context = ServiceContext.from_defaults(
143
- prompt_helper=prompt_helper,
144
- chunk_size_limit=chunk_size_limit,
145
- embed_model=embed_model,
146
- )
147
- index = GPTSimpleVectorIndex.from_documents(
148
- documents, service_context=service_context
149
- )
150
- logging.debug("索引构建完成!")
151
- os.makedirs("./index", exist_ok=True)
152
- index.save_to_disk(f"./index/{index_name}.json")
153
- logging.debug("索引已保存至本地!")
154
- return index
155
-
156
- except Exception as e:
157
- logging.error("索引构建失败!", e)
158
- print(e)
159
- return None
160
-
161
-
162
- def add_space(text):
163
- punctuations = {",": ", ", "。": "。 ", "?": "? ", "!": "! ", ":": ": ", ";": "; "}
164
- for cn_punc, en_punc in punctuations.items():
165
- text = text.replace(cn_punc, en_punc)
166
- return text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Dauzy/whisper-webui/app-network.py DELETED
@@ -1,5 +0,0 @@
1
- # Run the app with no audio file restrictions, and make it available on the network
2
- from app import create_ui
3
- from src.config import ApplicationConfig
4
-
5
- create_ui(ApplicationConfig.create_default(input_audio_max_duration=-1, server_name="0.0.0.0"))
 
 
 
 
 
 
spaces/Djacon/emotion_detection/static/emotion_detection.html DELETED
@@ -1,293 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta charset="utf-8">
6
- <meta name="viewport" content="width=device-width, initial-scale=1">
7
- <link rel="canonical" href="">
8
- <title>Text2Feature | Detection</title>
9
- <link rel="stylesheet" href="files/css/main.css">
10
- <link rel="icon" type="image/svg+xml" href="files/images/favicon.svg">
11
- <script defer src="files/js/main.js"></script>
12
- </head>
13
-
14
- <body class="overflow-hidden">
15
- <!-- Google tag (gtag.js) -->
16
- <script async src="https://www.googletagmanager.com/gtag/js?id=G-B751Q3XBFC"></script>
17
- <script>
18
- window.dataLayer = window.dataLayer || [];
19
- function gtag(){dataLayer.push(arguments);}
20
- gtag('js', new Date());
21
-
22
- gtag('config', 'G-B751Q3XBFC');
23
- </script>
24
-
25
- <div x-data="{ sidebarOpen: false }" class="relative flex h-screen text-gray-800 bg-white font-roboto">
26
- <div x-cloak :class="sidebarOpen ? 'block' : 'hidden'" @click="sidebarOpen = false"
27
- class="fixed inset-0 z-20 transition-opacity bg-black opacity-50 lg:hidden"></div>
28
-
29
- <div x-cloak :class="sidebarOpen ? 'translate-x-0 ease-in' : '-translate-x-full ease-out'"
30
- class="fixed inset-y-0 left-0 z-30 w-64 px-4 overflow-y-auto transition duration-200 transform bg-white border-r border-gray-100 lg:translate-x-0 lg:relative lg:inset-0 ">
31
- <div class="mt-8">
32
- <a href="/" class="flex items-center">
33
- <img class="w-auto h-8 no-invert" src="files/images/favicon.svg" alt="logo">
34
- <span class="mx-3 mt-1 font-medium text-lg">Text2<span class="no-invert" style="color: #ffa116">Feature</span></span>
35
- </a>
36
- </div>
37
-
38
- <hr class="my-6 border-gray-100">
39
-
40
- <nav class="space-y-8">
41
- <div class="space-y-4">
42
- <h3 class="px-4 text-sm tracking-wider text-gray-400 uppercase">PAGES</h3>
43
-
44
- <a class="flex items-center px-4 py-2 text-gray-500 transition-colors duration-200 transform rounded-lg hover:text-gray-600 hover:bg-gray-100 bg-opacity-40"
45
- href="/">
46
- <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24"
47
- stroke="currentColor">
48
- <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
49
- d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
50
- </svg>
51
- <span class="mx-3 font-medium capitalize">Homepage</span>
52
- </a>
53
-
54
- <a class="flex items-center px-4 py-2 text-gray-500 transition-colors duration-200 transform rounded-lg hover:text-gray-600 hover:bg-gray-100 bg-opacity-40"
55
- href="text_summarizer">
56
- <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24"
57
- stroke="currentColor" stroke-width="2">
58
- <path stroke-linecap="round" stroke-linejoin="round"
59
- d="M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4" />
60
- </svg>
61
- <span class="mx-3 font-medium capitalize">Text Summarizer</span>
62
- </a>
63
-
64
- <a class="flex items-center px-4 py-2 text-gray-600 transition-colors duration-300 transform bg-gray-200 rounded-lg bg-opacity-40"
65
- href="emotion_detection">
66
- <svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
67
- <path d="M9 16C9.85038 16.6303 10.8846 17 12 17C13.1154 17 14.1496 16.6303 15 16" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round"/>
68
- <path d="M16 10.5C16 11.3284 15.5523 12 15 12C14.4477 12 14 11.3284 14 10.5C14 9.67157 14.4477 9 15 9C15.5523 9 16 9.67157 16 10.5Z" fill="#1C274C"/>
69
- <ellipse cx="9" cy="10.5" rx="1" ry="1.5" fill="#1C274C"/>
70
- <path d="M7 3.33782C8.47087 2.48697 10.1786 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 10.1786 2.48697 8.47087 3.33782 7" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round"/>
71
- </svg>
72
- <span class="mx-3 font-medium capitalize">Emotion Detection</span>
73
- </a>
74
-
75
- <a class="flex items-center px-4 py-2 text-gray-500 transition-colors duration-300 transform rounded-lg hover:text-gray-600 hover:bg-gray-100 bg-opacity-40"
76
- href="analytics">
77
- <svg fill="currentColor" width="24px" height="24px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
78
- <g id="SVGRepo_bgCarrier" stroke-width="0"></g>
79
- <g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
80
- <g id="SVGRepo_iconCarrier">
81
- <path d="M29.5 7c-1.381 0-2.5 1.12-2.5 2.5 0 0.284 0.058 0.551 0.144 0.805l-6.094 5.247c-0.427-0.341-0.961-0.553-1.55-0.553-0.68 0-1.294 0.273-1.744 0.713l-4.774-2.39c-0.093-1.296-1.162-2.323-2.482-2.323-1.38 0-2.5 1.12-2.5 2.5 0 0.378 0.090 0.732 0.24 1.053l-4.867 5.612c-0.273-0.102-0.564-0.166-0.873-0.166-1.381 0-2.5 1.119-2.5 2.5s1.119 2.5 2.5 2.5c1.381 0 2.5-1.119 2.5-2.5 0-0.332-0.068-0.649-0.186-0.939l4.946-5.685c0.236 0.073 0.48 0.124 0.74 0.124 0.727 0 1.377-0.316 1.834-0.813l4.669 2.341c0.017 1.367 1.127 2.471 2.497 2.471 1.381 0 2.5-1.119 2.5-2.5 0-0.044-0.011-0.086-0.013-0.13l6.503-5.587c0.309 0.137 0.649 0.216 1.010 0.216 1.381 0 2.5-1.119 2.5-2.5s-1.119-2.5-2.5-2.5z"></path>
82
- </g>
83
- </svg>
84
- <span class="mx-3 font-medium capitalize">Analytics</span>
85
- </a>
86
-
87
- <a class="flex items-center px-4 py-2 text-gray-500 transition-colors duration-300 transform rounded-lg hover:text-gray-600 hover:bg-gray-100 bg-opacity-40"
88
- href="">
89
- <svg class="w-6 h-6" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
90
- <path
91
- d="M13 10V14H19V10H13ZM11 10H5V14H11V10ZM13 19H19V16H13V19ZM11 19V16H5V19H11ZM13 5V8H19V5H13ZM11 5H5V8H11V5ZM19 3C20.1046 3 21 3.89543 21 5V19C21 20.1046 20.1046 21 19 21H5C3.89543 21 3 20.1046 3 19V5C3 3.89543 3.89543 3 5 3H19Z"
92
- fill="currentColor"></path>
93
- </svg>
94
- <span class="mx-3 font-medium capitalize">Project 4</span>
95
- </a>
96
- </div>
97
-
98
- <div class="space-y-4">
99
- <h3 class="px-4 text-sm tracking-wider text-gray-400 uppercase">OTHER</h3>
100
-
101
- <a class="flex items-center px-4 py-2 text-gray-500 transition-colors duration-300 transform rounded-lg hover:text-gray-600 hover:bg-gray-100 bg-opacity-40"
102
- href="https://djacon.github.io">
103
- <svg width="24" height="24" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
104
- <path
105
- d="M474.89,300.41a121.43,121.43,0,0,1-121.3,121.3H247.08V392.13H353.59a91.72,91.72,0,1,0,0-183.44H87.53L151,272.2l-20.92,20.92L30.89,193.9l99.22-99.22L151,115.6l-63.5,63.51H353.59A121.43,121.43,0,0,1,474.89,300.41Z" />
106
- </svg>
107
- <span class="mx-3 font-medium">Visit Main Website</span>
108
- </a>
109
-
110
- <button id="theme-btn" class="flex items-center px-4 py-2 text-gray-500 transition-colors duration-300 transform rounded-lg hover:text-gray-600 hover:bg-gray-100 bg-opacity-40">
111
- <img id="img-theme" src="files/images/sun.svg" width="24" height="24">
112
- <span id='theme-span' class="mx-3 font-medium">Set Light Theme</span>
113
- </button>
114
- </div>
115
- </nav>
116
- </div>
117
-
118
- <div class="flex flex-col flex-1 overflow-hidden bg-gray-100">
119
- <header class="static bg-white border-b border-gray-100">
120
- <div class="flex items-center justify-between px-4 py-4 sm:px-6">
121
- <div class="flex items-center">
122
- <button @click="sidebarOpen = !sidebarOpen" class="text-gray-500 lg:hidden focus:outline-none">
123
- <svg class="w-6 h-6" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
124
- <path d="M4 6H20M4 12H20M4 18H11" stroke="currentColor" stroke-width="2"
125
- stroke-linecap="round" stroke-linejoin="round" />
126
- </svg>
127
- </button>
128
-
129
- <div class="relative" x-data="{ search: '' }" @click.away="search = ''">
130
- <div class="relative mx-4 lg:mx-0">
131
- <span class="absolute inset-y-0 left-0 flex items-center pl-3">
132
- <svg class="w-5 h-5 text-gray-400" viewBox="0 0 24 24" fill="none">
133
- <path
134
- d="M21 21L15 15M17 10C17 13.866 13.866 17 10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10Z"
135
- stroke="currentColor" stroke-width="2" stroke-linecap="round"
136
- stroke-linejoin="round"></path>
137
- </svg>
138
- </span>
139
-
140
- <style>
141
- #search:focus {
142
- border: 1px solid #ffa116;
143
- }
144
- </style>
145
-
146
- <input id="search" x-model="search" type="text"
147
- class="w-44 h-10 py-2 pl-10 pr-4 text-gray-700 placeholder-gray-400 transition-all duration-150 bg-white border border-gray-200 rounded-md focus:w-80 sm:w-64 sm:focus:w-80 focus:outline-none focus:ring focus:ring-indigo-300 focus:ring-opacity-40"
148
- placeholder="Find anything...">
149
- </div>
150
-
151
- <div class="absolute right-0 z-20 w-full py-2 mt-2 space-y-4 overflow-hidden bg-white rounded-md shadow-xl"
152
- x-show="search.length > 0" x-cloak
153
- x-transition:enter="transition ease-out duration-100 transform"
154
- x-transition:enter-start="opacity-0 scale-95"
155
- x-transition:enter-end="opacity-100 scale-100"
156
- x-transition:leave="transition ease-in duration-75 transform"
157
- x-transition:leave-start="opacity-100 scale-100"
158
- x-transition:leave-end="opacity-0 scale-95">
159
-
160
- <div>
161
- <h3 class="px-5 text-xs tracking-wider text-gray-500 uppercase">Projects</h3>
162
- <div class="mt-2">
163
- <a class="block px-5 py-2 text-sm text-gray-700 capitalize transition-colors duration-200 transform sm:px-12 hover:text-gray-600 hover:bg-gray-100 bg-opacity-40"
164
- href="text_summarizer">
165
- Text Summarizer
166
- </a>
167
-
168
- <a class="block px-5 py-2 text-sm text-gray-700 capitalize transition-colors duration-200 transform sm:px-12 hover:text-gray-600 hover:bg-gray-100 bg-opacity-40"
169
- href="emotion_detection">
170
- Emotion Detection
171
- </a>
172
-
173
- <a class="block px-5 py-2 text-sm text-gray-700 capitalize transition-colors duration-200 transform sm:px-12 hover:text-gray-600 hover:bg-gray-100 bg-opacity-40"
174
- href="analytics">
175
- Analytics
176
- </a>
177
-
178
- <a class="block px-5 py-2 text-sm text-gray-700 capitalize transition-colors duration-200 transform sm:px-12 hover:text-gray-600 hover:bg-gray-100 bg-opacity-40"
179
- href="">
180
- Project 4
181
- </a>
182
- </div>
183
- </div>
184
- <div>
185
- <h3 class="px-5 text-xs tracking-wider text-gray-500 uppercase">Other</h3>
186
- <div class="mt-2">
187
- <a class="block px-5 py-2 text-sm text-gray-700 capitalize transition-colors duration-200 transform sm:px-12 hover:text-gray-600 hover:bg-gray-100 bg-opacity-40"
188
- href="https://djacon.github.io">
189
- Visit Main Website
190
- </a>
191
- </div>
192
- </div>
193
- </div>
194
- </div>
195
- </div>
196
-
197
- <div class="flex items-center">
198
- <div x-data="{ dropdownOpen: false }" class="relative inline-block">
199
- <button @click="dropdownOpen = ! dropdownOpen" class="relative z-10 flex items-center flex-shrink-0 text-sm text-gray-600 focus:outline-none">
200
- <img class="flex-shrink-0 object-cover w-8 h-8 rounded-full" src="files/images/github-mark.svg" alt="github-mark">
201
- </button>
202
-
203
- <a href="https://github.com/Djacon/text2feature" target="_blank" class="absolute right-0 z-20 w-56 py-2 mt-2 overflow-hidden bg-white rounded-md shadow-xl rtl:right-auto rtl:left-0 hover:bg-gray-100" x-show="dropdownOpen" x-transition:enter="transition ease-out duration-100 transform" x-transition:enter-start="opacity-0 scale-95" x-transition:enter-end="opacity-100 scale-100" x-transition:leave="transition ease-in duration-75 transform" x-transition:leave-start="opacity-100 scale-100" x-transition:leave-end="opacity-0 scale-95" @click.away="dropdownOpen = false" style="display: none;">
204
- <div class="flex items-center p-3 -mt-2 text-sm text-gray-600 transition-colors duration-200 transform">
205
- <img class="flex-shrink-0 object-cover mx-1 rounded-full w-9 h-9" src="files/images/github-mark.svg" alt="github-mark">
206
- <div class="mx-1">
207
- <h1 class="text-sm font-semibold text-gray-700">Made By Djacon</h1>
208
- <p class="text-sm text-gray-500">github.com/Djacon</p>
209
- </div>
210
- </div>
211
- </a>
212
- </div>
213
- </div>
214
- </div>
215
- </header>
216
-
217
- <main class="flex-1 overflow-y-auto">
218
- <div class="px-4 py-8 sm:px-6">
219
- <div>
220
- <h1 class="text-2xl font-medium text-gray-700 sm:text-3xl">Emotion Detection</h1>
221
-
222
- <div class="hidden mt-3 overflow-y-auto text-sm lg:items-center lg:flex whitespace-nowrap">
223
- <a class="text-gray-600">Pages</a>
224
- <span class="mx-1 text-gray-500">/</span>
225
- <a href="" class="hover:underline no-invert" style="color: #ffa116">Emotion_Detection</a>
226
- </div>
227
- </div>
228
-
229
- <div class="mt-6">
230
- <div class="w-full p-4 bg-white xl:p-6">
231
- <ul class="flex text-sm text-center text-gray-500 divide-x divide-gray-200">
232
- <li class="w-full">
233
- <button id="show-original" class="bg-gray-100 rounded-l-lg inline-block w-full p-2 text-gray-900 focus:ring-4 focus:ring-blue-300 focus:outline-none">Original</button>
234
- </li>
235
- <li class="w-full">
236
- <button id="show-summary" class="inline-block rounded-r-lg w-full p-2 hover:text-gray-700 hover:bg-gray-50 focus:ring-4 focus:ring-blue-300 focus:outline-none">Summary</button>
237
- </li>
238
- </ul>
239
-
240
- <div id='sum-original' class="mt-6 space-y-5" onsubmit="return false;">
241
- <div id="sum-text-div">
242
- <textarea id="sum-text-input" required class="block w-full px-4 py-2.5 mt-2 text-gray-600 placeholder-gray-400 bg-white border border-gray-200 rounded-md focus:border-indigo-400 focus:outline-none focus:ring focus:ring-indigo-300 focus:ring-opacity-40"
243
- style="min-height: 250px;" placeholder="Enter or upload your text and press &quot;Detect&quot;"></textarea>
244
- </div>
245
-
246
- <p id='sum-err' class="no-invert hidden mt-2 text-sm text-red-500"></p>
247
-
248
- <div class="flex justify-between no-invert">
249
- <label id="word-counter" class="hidden flex items-center py-2 px-4 text-gray-500 rounded">Words:</label>
250
- <label id="sum-file-div" class="flex items-center py-2 px-4 text-gray-500 rounded cursor-pointer hover:text-gray-700">
251
- <svg class="w-6 h-6" fill="currentColor" xmlns="http://www.w3.org/2000/svg"
252
- viewBox="0 0 20 20">
253
- <path
254
- d="M16.88 9.1A4 4 0 0 1 16 17H5a5 5 0 0 1-1-9.9V7a3 3 0 0 1 4.52-2.59A4.98 4.98 0 0 1 17 8c0 .38-.04.74-.12 1.1zM11 11h3l-4-4-4 4h3v3h2v-3z">
255
- </path>
256
- </svg>
257
- <span class="px-2">Upload</span>
258
- <input id="sum-file-input" type="file" accept=".pdf, .txt" class="hidden">
259
- </label>
260
- <button id="submit" class="w-32 sm:w-80 flex items-center justify-center py-2 px-4 rounded font-medium text-white rounded-full"
261
- style="max-height: 2.5rem;">
262
- Detect
263
- </button>
264
- </div>
265
- </div>
266
-
267
- <div id="sum-summary" class='hidden mt-6 space-y-5'>
268
- <div class="hidden w-full md:w-1/2 grid-cols-2 mt-6">
269
- <label for="description"
270
- class="block text-sm text-gray-700 capitalize">Extracted Text</label>
271
- <textarea id="extracted-text"
272
- class="minh-text block w-full px-4 py-2.5 mt-2 text-gray-600 placeholder-gray-400 bg-white border border-gray-200 rounded-md focus:border-indigo-400 focus:outline-none focus:ring focus:ring-indigo-300 focus:ring-opacity-40"></textarea>
273
- </div>
274
-
275
- <div class="w-full md:w-1/2 grid-cols-2 mt-6">
276
- <textarea id="summarized-text"
277
- class="minh-text block w-full px-4 py-2.5 mt-2 text-gray-600 placeholder-gray-400 bg-white border border-gray-200 rounded-md focus:border-indigo-400 focus:outline-none focus:ring focus:ring-indigo-300 focus:ring-opacity-40"
278
- style="min-height: 250px;"></textarea>
279
- </div>
280
- </div>
281
- </div>
282
- </div>
283
- </div>
284
- </main>
285
- </div>
286
- </div>
287
-
288
-
289
- <script src="files/js/theme.js"></script>
290
- <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.0.943/pdf.min.js"></script>
291
- <script src="files/js/detection.js"></script>
292
- </body>
293
- </html>