Commit
·
f863f1f
1
Parent(s):
c0cf34a
Update parquet files (step 118 of 121)
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- spaces/1acneusushi/gradio-2dmoleculeeditor/data/AudioScore Ultimate 2020.1 V9.0.0 Crack How to Convert Audio to MIDI in Minutes.md +0 -23
- spaces/1acneusushi/gradio-2dmoleculeeditor/data/Discografia Completa Del Grupo Samuray Cmo se Form Evolucion y Triunf en el Escenario.md +0 -119
- spaces/1gistliPinn/ChatGPT4/Examples/3 Idiots Full Movie Tagalog Version Kapamilya Blockbuster.md +0 -9
- spaces/1gistliPinn/ChatGPT4/Examples/Adobe Photoshop Cc Multi Language Xforce Keygen Downloadtrmdsf.md +0 -6
- spaces/1line/AutoGPT/autogpt/json_utils/json_fix_general.py +0 -124
- spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Boost Your SketchUp Productivity with JHS Powerbar 2019 - Free Download for SketchUp 2016 Users.md +0 -117
- spaces/1phancelerku/anime-remove-background/1920 Evil Returns - The Ultimate Horror Movie Soundtrack - Download Now.md +0 -65
- spaces/1phancelerku/anime-remove-background/Download Rope Hero Vice Town 2.3 APK - Free Action Game for Android.md +0 -118
- spaces/2gauravc/search_summary_chatgpt/README.md +0 -35
- spaces/2ndelement/voicevox/build_util/modify_pyinstaller.bash +0 -25
- spaces/AIConsultant/MusicGen/audiocraft/grids/musicgen/musicgen_base_cached_32khz.py +0 -67
- spaces/ATang0729/Forecast4Muses/Model/Model6/Model6_0_ClothesDetection/mmyolo/configs/yolov6/yolov6_l_syncbn_fast_8xb32-300e_coco.py +0 -28
- spaces/ATang0729/Forecast4Muses/Model/Model6/Model6_2_ProfileRecogition/mmpretrain/configs/_base_/models/resnet152.py +0 -17
- spaces/ATang0729/Forecast4Muses/Model/Model6/Model6_2_ProfileRecogition/mmpretrain/configs/_base_/models/resnet50_cifar_cutmix.py +0 -18
- spaces/ATang0729/Forecast4Muses/Model/Model6/Model6_2_ProfileRecogition/mmpretrain/configs/resnet/resnet34_8xb32_in1k.py +0 -4
- spaces/AUBMC-AIM/OCTaGAN/app.py +0 -32
- spaces/AUST001/video/README.md +0 -13
- spaces/Aditya9790/yolo7-object-tracking/train_aux.py +0 -699
- spaces/AgentVerse/agentVerse/agentverse/llms/__init__.py +0 -6
- spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/bejeweled/states/BaseState.js +0 -36
- spaces/Aki004/herta-so-vits/modules/attentions.py +0 -349
- spaces/Alpaca233/ChatPDF-GUI/gpt_reader/model_interface.py +0 -32
- spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/tests/pipelines/kandinsky/test_kandinsky_inpaint.py +0 -346
- spaces/Andy1621/uniformer_image_detection/configs/gn+ws/mask_rcnn_r50_fpn_gn_ws-all_20_23_24e_coco.py +0 -4
- spaces/Andy1621/uniformer_image_detection/configs/pisa/pisa_retinanet_r50_fpn_1x_coco.py +0 -7
- spaces/Andy1621/uniformer_image_detection/mmdet/version.py +0 -19
- spaces/AnishKumbhar/ChatBot/text-generation-webui-main/convert-to-safetensors.py +0 -38
- spaces/AnishKumbhar/ChatBot/text-generation-webui-main/docs/Extensions.md +0 -244
- spaces/Aravindan/butterfly_classification/README.md +0 -12
- spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/setuptools/_vendor/importlib_resources/_legacy.py +0 -121
- spaces/Awiny/Image2Paragraph/models/grit_src/third_party/CenterNet2/.github/ISSUE_TEMPLATE/unexpected-problems-bugs.md +0 -44
- spaces/BBrother/NewBingAI/README.md +0 -12
- spaces/Bala2-03-2003/AIBALA/app.py +0 -34
- spaces/Bambicita/rvc-models/infer_pack/transforms.py +0 -209
- spaces/Banbri/zcvzcv/src/app/engine/community.ts +0 -135
- spaces/Banbri/zcvzcv/src/components/ui/avatar.tsx +0 -50
- spaces/Basav/openai-whisper-medium/app.py +0 -3
- spaces/Benson/text-generation/Examples/Apkdayi.md +0 -69
- spaces/Benson/text-generation/Examples/Descargar Apk Happymod 2.0 0 Para Android.md +0 -84
- spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_vendor/urllib3/fields.py +0 -274
- spaces/CVPR/Dual-Key_Backdoor_Attacks/datagen/detectron2/projects/TensorMask/tensormask/__init__.py +0 -3
- spaces/CVPR/LIVE/pybind11/tests/test_factory_constructors.py +0 -465
- spaces/CVPR/LIVE/pybind11/tests/test_iostream.py +0 -215
- spaces/CVPR/LIVE/thrust/thrust/system/detail/sequential/reverse.h +0 -22
- spaces/CVPR/transfiner/configs/new_baselines/mask_rcnn_R_101_FPN_100ep_LSJ.py +0 -9
- spaces/CofAI/chat/client/css/checkbox.css +0 -55
- spaces/CyberHarem/find_my_waifu/character.py +0 -36
- spaces/DJQmUKV/rvc-inference/config.py +0 -18
- spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/dateutil/__init__.py +0 -8
- spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/fsspec/exceptions.py +0 -21
spaces/1acneusushi/gradio-2dmoleculeeditor/data/AudioScore Ultimate 2020.1 V9.0.0 Crack How to Convert Audio to MIDI in Minutes.md
DELETED
@@ -1,23 +0,0 @@
|
|
1 |
-
<br />
|
2 |
-
<h1>AudioScore Ultimate 2020.1 V9.0.0 Crack: A Powerful Audio Editing Software</h1>
|
3 |
-
Are you looking for a software that can help you create, edit and transcribe audio files with ease? Do you want to record your own songs, import audio files from different sources, adjust the pitch and length of notes, and decipher your project into a score? If yes, then you might want to check out **AudioScore Ultimate**, a smug audio editing software that can do all these tasks and more. In this article, we will tell you everything you need to know about AudioScore Ultimate, including what it is, how to use it, why you need the cracked version of it, how to download and install it, and some frequently asked questions. <h2>What is AudioScore Ultimate?</h2>
|
4 |
-
<h3>A brief introduction to the software and its features</h3>
|
5 |
-
AudioScore Ultimate is a special application that allows you to record songs through a connected microphone device, import audio files from your PC or other sources, convert them to MIDI notes, edit them with various tools, and transcribe them into a score that can be printed or exported. AudioScore Ultimate has many useful features, such as: - It can recognize notes from polyphonic music, including chords, pitch changes, clefs, key signatures, tempo changes, etc. - It can handle complex rhythms and meters, including triplets, duplets, swing, syncopation, etc. - It can create scores with lyrics that are aligned with the notes automatically. - It can export scores to MusicXML or MIDI formats that can be opened by other music software such as Sibelius or Finale. - It can play back your project at any time with realistic sounds and effects. <h3>How to use AudioScore Ultimate to record, import, edit and transcribe audio files</h3>
|
6 |
-
Using AudioScore Ultimate is easy and intuitive. Here are some basic steps to get you started: - To record audio from your microphone, click on the Record button on the toolbar and follow the instructions on the screen. You can also adjust the recording settings such as sample rate, bit depth, etc. - To import audio files from your PC or other sources, click on the File menu and select Open. You can also drag and drop files into the main window. You can import WAV, MP3, WMA, AAC, AIFF or OGG files. - To edit your audio files, use the tools on the toolbar or the menus. You can cut, copy, paste, delete, move or resize notes; change their pitch or length; add or remove rests; insert or delete bars; transpose or quantize notes; add dynamics or articulations; etc. - To transcribe your audio files into a score, click on the Transcribe button on the toolbar and wait for the process to finish. You can also adjust the transcription settings such as accuracy level, note range, instrument type, etc. - To view your score in different ways, use the tabs at the bottom of the window. You can switch between Piano Roll View (which shows notes as horizontal bars), Notation View (which shows notes as symbols on a staff), Lyrics View (which shows lyrics below notes), or Playback View (which shows notes as they are played). - To print or export your score, click on the File menu and select Print or Export. You can print your score directly from AudioScore Ultimate or save it as a PDF file. You can also export your score as a MusicXML or MIDI file that can be opened by other music software. <h2>Why do you need AudioScore Ultimate 2020.1 V9.0.0 Crack?</h2>
|
7 |
-
<h3>The benefits of using the cracked version of the software</h3>
|
8 |
-
AudioScore Ultimate is a powerful audio editing software that can help you create amazing music projects. However, it is not free to use. The official price of AudioScore Ultimate is $249 USD for a single user license. That's quite expensive for many people who want to use this software for personal or educational purposes. That's why some people look for a cracked version of AudioScore Ultimate that can bypass the activation process and unlock all the features of the software without paying anything. By using AudioScore Ultimate 2020.1 V9.0.0 Crack, you can enjoy these benefits: - You can save money by not buying a license for AudioScore Ultimate. - You can access all the features and functions of AudioScore Ultimate without any limitations or restrictions. - You can use AudioScore Ultimate on any PC without needing an internet connection or a registration code. <h3>The risks and drawbacks of using the cracked version of the software</h3>
|
9 |
-
While using AudioScore Ultimate 2020.1 V9.0.0 Crack may seem tempting, it is not without risks and drawbacks. Here are some of them: - You may violate the intellectual property rights of Neuratron Ltd., the developer of AudioScore Ultimate, and face legal consequences for piracy. - You may expose your PC to malware or viruses that may be hidden in the crack file or downloaded from unreliable sources. - You may experience errors or bugs in the software that may affect its performance or functionality. - You may not receive updates or technical support from Neuratron Ltd., which may result in compatibility issues with other software or devices. <h2>How to download and install AudioScore Ultimate 2020.1 V9.0.0 Crack?</h2>
|
10 |
-
<h3>The steps to download the crack file from a reliable source</h3>
|
11 |
-
If you decide to use AudioScore Ultimate 2020.1 V9.0.0 Crack despite its risks and drawbacks, you need to be careful about where you download it from. There are many websites that claim to offer crack files for various software, but not all of them are trustworthy or safe. To avoid downloading malware or viruses, you should look for a reliable source that has positive reviews and feedback from other users who have used it before. One such source is KoLomPC.com, a website that provides crack files for various multimedia software. To download AudioScore Ultimate 2020.1 V9.0.0 Crack from KoLomPC.com, follow these steps: - Go to https://kolompc.com/neuratron-audioscore-ultimate/ on your web browser. - Scroll down until you see a green button that says "Download Neuratron AudioScore Ultimate 2020". - Click on that button and choose one of the download links that appear below it (IntoUpload, upload-4ever, or Rapidgator). - Wait for a few seconds until you see another button that says "Download File". - Click on that button and save the file (AudioScore.Ultimate.2020.v9.rar) on your PC. <h3>The steps to install the crack file and activate the software</h3>
|
12 |
-
After downloading AudioScore.Ultimate.v9.rar from KoLomPC.com, you need to install it on your PC and activate it with the crack file. To do that, follow these steps: - Extract AudioScore.Ultimate.v9.rar using WinRAR or any other file archiver program. - Open the extracted folder (AudioScore.Ultimate.v9) and run Setup.exe as administrator. - Follow the installation wizard until it finishes installing AudioScore Ultimate on your PC. - Do not launch AudioScore Ultimate yet after installation. - Go back to the extracted folder (AudioScore.Ultimate.v9) and open another folder called "Crack". - Copy all three files inside this folder (AudioEngine.dll, AudioEngine64.dll, and ASUltimate.exe) and paste them into the installation directory of AudioScore Ultimate (usually C:\Program Files\Neuratron\Audio Score). - Replace any existing files if prompted. <h2>Conclusion</h2>
|
13 |
-
<h3>A summary of the main points and a call to action</h3>
|
14 |
-
AudioScore Ultimate is a powerful audio editing software that can help you record, import, edit and transcribe audio files with ease. It has many useful features that can make your music projects more professional and impressive. However, AudioScore Ultimate is not free to use and requires a license that costs $249 USD. If you want to use AudioScore Ultimate without paying anything, you can try using AudioScore Ultimate 2020.1 V9.0.0 Crack, which can unlock all the features and functions of the software. However, using the cracked version of AudioScore Ultimate also comes with risks and drawbacks, such as legal issues, malware infection, errors or bugs, and lack of updates or support. Therefore, you should be careful about where you download the crack file from and how you install it on your PC. If you are interested in using AudioScore Ultimate 2020.1 V9.0.0 Crack, you can follow the steps we have provided in this article to download and install it from a reliable source such as KoLomPC.com. However, we do not recommend or endorse using the cracked version of AudioScore Ultimate or any other software, as it may violate the intellectual property rights of the developers and cause harm to your PC or data. We suggest that you use the official version of AudioScore Ultimate or look for other legal alternatives that can suit your needs and budget. <h2>FAQs</h2>
|
15 |
-
<h3>What are the system requirements for AudioScore Ultimate?</h3>
|
16 |
-
According to the official website of Neuratron Ltd., the system requirements for AudioScore Ultimate are: - Windows 10/8/7/Vista (32-bit or 64-bit) - 1 GB RAM - 200 MB hard disk space - Microphone or other audio input device - Internet connection (for activation and updates) <h3>Is AudioScore Ultimate compatible with other music software?</h3>
|
17 |
-
Yes, AudioScore Ultimate is compatible with other music software that can open MusicXML or MIDI files, such as Sibelius, Finale, Dorico, MuseScore, etc. You can export your score from AudioScore Ultimate as a MusicXML or MIDI file and then import it into your preferred music software for further editing or playback. <h3>How can I get technical support for AudioScore Ultimate?</h3>
|
18 |
-
If you have any questions or issues with AudioScore Ultimate, you can contact the technical support team of Neuratron Ltd. by email at [email protected] or by phone at +44 (0)20 8977 2744. You can also visit their website at https://www.neuratron.com/support.htm for more information and resources. <h3>Is AudioScore Ultimate safe and legal to use?</h3>
|
19 |
-
AudioScore Ultimate is safe and legal to use if you buy a license from the official website of Neuratron Ltd. or from an authorized reseller. However, if you use a cracked version of AudioScore Ultimate that bypasses the activation process and unlocks all the features without paying anything, you may be violating the intellectual property rights of Neuratron Ltd. and face legal consequences for piracy. You may also expose your PC to malware or viruses that may be hidden in the crack file or downloaded from unreliable sources. <h3>What are some alternatives to AudioScore Ultimate?</h3>
|
20 |
-
If you are looking for other software that can help you create, edit and transcribe audio files, here are some alternatives to AudioScore Ultimate that you may want to consider: - AnthemScore: A software that can automatically transcribe music from audio files into sheet music. - Melodyne: A software that can edit audio files with various tools such as pitch correction, time stretching, harmonization, etc. - Transcribe!: A software that can help you transcribe music from audio files by slowing down the playback, adjusting the pitch, looping sections, etc. - AmazingMIDI: A software that can convert WAV files into MIDI files with high accuracy. </p>
|
21 |
-
<h2>AudioScore Ultimate 2020.1 V9.0.0 Crack</h2><br /><p><b><b>DOWNLOAD</b> ✸ <a href="https://byltly.com/2uKvpk">https://byltly.com/2uKvpk</a></b></p><br /><br /> 0a6ba089eb<br />
|
22 |
-
<br />
|
23 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1acneusushi/gradio-2dmoleculeeditor/data/Discografia Completa Del Grupo Samuray Cmo se Form Evolucion y Triunf en el Escenario.md
DELETED
@@ -1,119 +0,0 @@
|
|
1 |
-
|
2 |
-
<h1>Discografia Completa Del Grupo Samuray</h1>
|
3 |
-
<p>If you are a fan of romantic ballads with a touch of pop, you have probably heard of Grupo Samuray. This Mexican band has been making music since 1991, captivating audiences with their catchy melodies and heartfelt lyrics. They have released 15 albums, each one with its own style and charm, and have sold millions of copies worldwide.</p>
|
4 |
-
<p>In this article, we will explore their complete discography, from their debut album Tiernas Mentiras to their latest live recording En Vivo [CD & DVD]. We will also learn more about their history, their influences, and their most popular songs. Whether you are a longtime follower or a new listener, you will discover something new and exciting about this amazing group.</p>
|
5 |
-
<h2>Discografia Completa Del Grupo Samuray</h2><br /><p><b><b>Download</b> ✶✶✶ <a href="https://byltly.com/2uKzl8">https://byltly.com/2uKzl8</a></b></p><br /><br />
|
6 |
-
<h2>Tiernas Mentiras (1991)</h2>
|
7 |
-
<p>This was the first album released by Grupo Samuray, under the label Disa. It featured 10 tracks, including their breakthrough hit "Tiernas Mentiras", which reached number one on several radio stations in Mexico. The song talks about a lover who lies to his partner to avoid hurting her feelings, but ends up losing her anyway.</p>
|
8 |
-
<p>Other notable songs on this album are "Contigo O Sin Ti", "Amor Imposible", and "Donde Esta Mi Padre". The latter is a poignant ballad about a son who misses his father who left him when he was young. The album showcases the group's talent for singing emotional stories with a smooth and melodic voice.</p>
|
9 |
-
<p>Descargar discografia completa del grupo samuray gratis<br />
|
10 |
-
Escuchar todas las canciones del grupo samuray online<br />
|
11 |
-
Discografia completa del grupo samuray mega<br />
|
12 |
-
Canciones mas populares del grupo samuray<br />
|
13 |
-
Discografia completa del grupo samuray mp3<br />
|
14 |
-
Como conseguir la discografia completa del grupo samuray<br />
|
15 |
-
Discografia completa del grupo samuray en Spotify<br />
|
16 |
-
Historia y biografia del grupo samuray<br />
|
17 |
-
Discografia completa del grupo samuray zip<br />
|
18 |
-
Letras de las canciones del grupo samuray<br />
|
19 |
-
Discografia completa del grupo samuray rar<br />
|
20 |
-
Videos musicales del grupo samuray<br />
|
21 |
-
Discografia completa del grupo samuray utorrent<br />
|
22 |
-
Albumes y singles del grupo samuray<br />
|
23 |
-
Discografia completa del grupo samuray youtube<br />
|
24 |
-
Conciertos y giras del grupo samuray<br />
|
25 |
-
Discografia completa del grupo samuray mediafire<br />
|
26 |
-
Fotos y posters del grupo samuray<br />
|
27 |
-
Discografia completa del grupo samuray google drive<br />
|
28 |
-
Curiosidades y anecdotas del grupo samuray<br />
|
29 |
-
Discografia completa del grupo samuray amazon<br />
|
30 |
-
Influencias y genero musical del grupo samuray<br />
|
31 |
-
Discografia completa del grupo samuray itunes<br />
|
32 |
-
Premios y nominaciones del grupo samuray<br />
|
33 |
-
Discografia completa del grupo samuray apple music<br />
|
34 |
-
Integrantes y ex integrantes del grupo samuray<br />
|
35 |
-
Discografia completa del grupo samuray deezer<br />
|
36 |
-
Colaboraciones y duetos del grupo samuray<br />
|
37 |
-
Discografia completa del grupo samuray soundcloud<br />
|
38 |
-
Merchandising y productos oficiales del grupo samuray<br />
|
39 |
-
Discografia completa del grupo samuray flac<br />
|
40 |
-
Criticas y reseñas de la discografia completa del grupo samuray<br />
|
41 |
-
Discografia completa del grupo samuray shazam<br />
|
42 |
-
Tributos y covers de las canciones del grupo samuray<br />
|
43 |
-
Discografia completa del grupo samuray last.fm<br />
|
44 |
-
Recomendaciones de musica similar al grupo samuray<br />
|
45 |
-
Discografia completa del grupo samuray tidal<br />
|
46 |
-
Entrevistas y reportajes al grupo samuray<br />
|
47 |
-
Discografia completa del grupo samuray bandcamp<br />
|
48 |
-
Fan clubs y comunidades del grupo samuray<br />
|
49 |
-
Discografia completa del grupo samuray audiomack<br />
|
50 |
-
Podcasts y programas sobre el grupo samuray<br />
|
51 |
-
Discografia completa del grupo samuray napster<br />
|
52 |
-
Peliculas y series relacionadas con el grupo samuray<br />
|
53 |
-
Discografia completa del grupo samuray pandora<br />
|
54 |
-
Libros y revistas sobre el grupo samuray<br />
|
55 |
-
Discografia completa del grupo samuray tunein radio<br />
|
56 |
-
Documentales y biopics sobre el grupo samuray<br />
|
57 |
-
Discografia completa del grupo samuray mixcloud<br />
|
58 |
-
Frases y citas celebres del grupo samuray</p>
|
59 |
-
<h2>Los Guerreros del Amor (1992)</h2>
|
60 |
-
<p>This was the second album released by Grupo Samuray, also under Disa. It featured 12 tracks, including their second smash hit "Lagrimillas Tontas", which topped several charts in Mexico and Latin America. The song is about a man who regrets breaking up with his girlfriend, but realizes it is too late to get her back.</p>
|
61 |
-
<p>Other notable songs on this album are "Solo Amor", "Como Sufro", and "Los Guerreros del Amor". The latter is an upbeat song that celebrates love as a powerful force that can overcome any obstacle. The album demonstrates the group's versatility for singing different genres, from pop to cumbia to ranchera.</p>
|
62 |
-
<h2>Solo Amor (1993)</h2>
|
63 |
-
<p>This was the third album released by Grupo Samuray, again under Disa. It featured 10 tracks, including their third major hit "Solo Amor", which became one of their signature songs. The song is about a man who declares his unconditional love for his partner, despite all their problems and difficulties.</p>
|
64 |
-
<p>Other notable songs on this album are "Cuando Amanezca", "Nada Va a Cambiar Mi Corazon Por Ti", and "Te Necesito". The latter is a romantic duet with singer Marisela, who also wrote some of the songs on this album. The album showcases the group's ability to collaborate with other artists and create beautiful harmonies.</p>
|
65 |
-
<h2>Cuando Amanezca (1995)</h2>
|
66 |
-
<p>This was the fourth album released by Grupo Samuray, under Fonovisa. It featured 10 tracks, including their fourth big hit "Cuando Amanezca", which reached number one on several radio stations in Mexico. The song is about a man who promises to stay with his lover until dawn, even if they have to face many challenges.</p>
|
67 |
-
<p>Other notable songs on this album are "Te Quiero Te Quiero", "No Me Digas Adios", and "Como Un Angel". The latter is a tender ballad that compares love to an angel that protects and guides us. The album shows the group's maturity and growth as musicians and composers.</p>
|
68 |
-
<h2>Todo Mexico Lo Sabe (1996)</h2>
|
69 |
-
<p>This was the fifth album released by Grupo Samuray, also under Fonovisa. It featured 10 tracks, including their fifth huge hit "Todo Mexico Lo Sabe", which became an anthem for Mexican pride and identity. The song is about a man who proclaims his love for his country and its culture, no matter where he goes.</p>
|
70 |
-
<p>Other notable songs on this album are "Corazon Pandido", "El Primer Samuray Mexicano", and "De Ti Me Enamore". The latter is a catchy cumbia that tells how love can happen unexpectedly and change our lives. The album reflects the group's passion for their roots and their fans.</p>
|
71 |
-
<h2>Corazon Pandido (1996)</h2>
|
72 |
-
<p>This was the sixth album released by Grupo Samuray, under Disa. It featured 10 tracks, including their sixth massive hit "Corazon Pandido", which became one of their most requested songs at concerts. The song is about a man who confesses his infidelity to his partner, but asks for forgiveness and another chance.</p>
|
73 |
-
<h2>Nada Va a Cambiar Mi Corazon Por Ti (1996)</h2>
|
74 |
-
<p>This was the seventh album released by Grupo Samuray, also under Disa. It featured 10 tracks, including their seventh major hit "Nada Va a Cambiar Mi Corazon Por Ti", which became a classic of their repertoire. The song is about a man who declares his eternal love for his partner, despite all the obstacles and temptations they face.</p>
|
75 |
-
<p>Other notable songs on this album are "Al Rojo Vivo", "Enamorado de Ti", and "Como Un Loco". The latter is a lively song that describes how love can make us act crazy and do anything for our beloved. The album showcases the group's enthusiasm and energy as performers and entertainers.</p>
|
76 |
-
<h2>Al Rojo Vivo (1997)</h2>
|
77 |
-
<p>This was the eighth album released by Grupo Samuray, under EMI Music Distribution. It featured 10 tracks, including their eighth big hit "Al Rojo Vivo", which became a favorite among their fans. The song is about a man who expresses his intense and passionate love for his partner, making her feel special and unique.</p>
|
78 |
-
<p>Other notable songs on this album are "Donde Estas Amor", "Te Extraño", and "No Llores Mas". The latter is a comforting song that offers support and hope to someone who is suffering from a broken heart. The album demonstrates the group's sensitivity and empathy as artists and friends.</p>
|
79 |
-
<h2>Donde Vas Chiquilla (1997)</h2>
|
80 |
-
<p>This was the ninth album released by Grupo Samuray, also under EMI Music Distribution. It featured 10 tracks, including their ninth huge hit "Donde Vas Chiquilla", which became a hit in several countries. The song is about a man who tries to stop his girlfriend from leaving him, but realizes he has lost her forever.</p>
|
81 |
-
<p>Other notable songs on this album are "Un Nuevo Amanecer", "Tres Palabras", and "Amor de Internet". The latter is a humorous song that mocks the online dating scene and its pitfalls. The album shows the group's humor and creativity as writers and comedians.</p>
|
82 |
-
<h2>Un Dia Sin Ti (1998)</h2>
|
83 |
-
<p>This was the tenth album released by Grupo Samuray, also under EMI Music Distribution. It featured 10 tracks, including their tenth massive hit "Un Dia Sin Ti", which became one of their most emotional songs. The song is about a man who misses his partner who has died, and wishes he could see her again.</p>
|
84 |
-
<p>Other notable songs on this album are "Te Necesito Tanto Amor", "Vuelve Conmigo", and "No Te Vayas". The latter is a desperate song that begs for a second chance from a lover who has left. The album reveals the group's depth and sorrow as human beings and lovers.</p>
|
85 |
-
<h2>Con Estilo Ranchero (1999)</h2>
|
86 |
-
<p>This was the eleventh album released by Grupo Samuray, under Disa. It featured 10 tracks, including a different style of music with ranchero influences. The group decided to experiment with this genre to pay tribute to their Mexican roots and culture.</p>
|
87 |
-
<h2>Tres Palabras (2000)</h2>
|
88 |
-
<p>This was the twelfth album released by Grupo Samuray, under Disa. It featured 10 tracks, including their eleventh major hit "Tres Palabras", which became a romantic anthem for many couples. The song is about a man who expresses his love for his partner with three simple words: "Te quiero mucho".</p>
|
89 |
-
<p>Other notable songs on this album are "Contigo O Sin Ti", "Como Un Angel", and "Te Quiero Te Quiero". The latter is a remake of the song by Nino Bravo, a famous Spanish singer who died in a car accident. The album showcases the group's admiration and tribute for other artists and legends.</p>
|
90 |
-
<h2>Un Nuevo Amanecer (2002)</h2>
|
91 |
-
<p>This was the thirteenth album released by Grupo Samuray, under Fonovisa. It featured 10 tracks, including their twelfth big hit "Un Nuevo Amanecer", which became a motivational song for many people. The song is about a man who decides to start a new life after overcoming a difficult situation, and thanks God for his blessings.</p>
|
92 |
-
<p>Other notable songs on this album are "De Ti Me Enamore", "Donde Estas Amor", and "No Llores Mas". The latter is a duet with singer Ana Bárbara, who also wrote some of the songs on this album. The album demonstrates the group's collaboration and friendship with other talented singers and composers.</p>
|
93 |
-
<h2>El Primer Samuray Mexicano (2004)</h2>
|
94 |
-
<p>This was the fourteenth album released by Grupo Samuray, under Fonovisa. It featured 10 tracks, including a tribute to their fans and their country. The group decided to dedicate this album to their loyal followers who have supported them throughout their career, and to their homeland Mexico, which they love and respect.</p>
|
95 |
-
<p>Some of the songs on this album are "El Primer Samuray Mexicano", "Todo Mexico Lo Sabe", and "Mexico Lindo Y Querido". The latter is a cover of the traditional song by Chucho Monge, one of the most emblematic songs of Mexican patriotism. The album reflects the group's gratitude and pride for their people and their nation.</p>
|
96 |
-
<h2>En Vivo [CD & DVD] (2004)</h2>
|
97 |
-
<p>This was the fifteenth and last album released by Grupo Samuray, under Disa. It featured a live performance of their greatest hits, recorded at the Auditorio Nacional in Mexico City. The group decided to celebrate their 13 years of musical career with this special concert, where they sang with passion and emotion in front of thousands of fans.</p>
|
98 |
-
<p>Some of the songs on this album are "Tiernas Mentiras", "Lagrimillas Tontas", "Solo Amor", "Cuando Amanezca", "Todo Mexico Lo Sabe", "Corazon Pandido", "Nada Va a Cambiar Mi Corazon Por Ti", "Al Rojo Vivo", "Donde Vas Chiquilla", "Un Dia Sin Ti", "Tres Palabras", and "Un Nuevo Amanecer". The album captures the group's essence and charisma as performers and entertainers.</p>
|
99 |
-
<h2>Conclusion</h2>
|
100 |
-
<p>In this article, we have explored the complete discography of Grupo Samuray, one of the most successful and beloved groups of romantic ballads in Mexico and Latin America. We have learned more about their history, their influences, and their most popular songs. We have also discovered how they have evolved and experimented with different genres and styles throughout their career.</p>
|
101 |
-
<p>Grupo Samuray has left an indelible mark on the music industry, with 15 albums, millions of copies sold, countless awards and recognitions, and a loyal fan base that still follows them today. They have also inspired many other artists and groups who have followed their footsteps and admired their work.</p>
|
102 |
-
<p>If you want to listen to more of their music, you can find their albums on streaming platforms like Spotify or YouTube. You can also follow them on social media like Facebook or Instagram, where they share news and updates about their projects and activities. You can also visit their official website www.gruposamuray.com.mx for more information.</p>
|
103 |
-
<p>We hope you have enjoyed this article and learned something new about this amazing group. Thank you for reading and until next time!</p>
|
104 |
-
<h3>FAQs</h3>
|
105 |
-
<ol>
|
106 |
-
<li>When was Grupo Samuray formed?</li>
|
107 |
-
<p>Grupo Samuray was formed in 1991 in Aguascalientes, Mexico, by brothers Ignacio and Rogelio Romo as vocalists, along with other musicians.</p>
|
108 |
-
<li>Who are the members of Grupo Samuray?</li>
|
109 |
-
<p>The current members of Grupo Samuray are Ignacio Romo (lead vocals), Rogelio Romo (backing vocals), José Luis Romo (keyboard), Juan Carlos Romo (guitar), José Luis González (bass), José Luis Martínez (drums), and José Luis Hernández (percussion).</p>
|
110 |
-
<li>What is the genre of Grupo Samuray?</li>
|
111 |
-
<p>The genre of Grupo Samuray is mainly romantic ballads with pop influences, but they have also experimented with other genres like cumbia, ranchera, mariachi, and norteña.</p>
|
112 |
-
<li>How many albums has Grupo Samuray released?</li>
|
113 |
-
<p>Grupo Samuray has released 15 albums between 1991 and 2004: Tiernas Mentiras (1991), Los Guerreros del Amor (1992), Solo Amor (1993), Cuando Amanezca (1995), Todo Mexico Lo Sabe (1996), Corazon Pandido (1996), Nada Va a Cambiar Mi Corazon Por Ti (1996), Al Rojo Vivo (1997), Donde Vas Chiquilla (1997), Un Dia Sin Ti (1998), Con Estilo Ranchero (1999), Tres Palabras (2000), Un Nuevo Amanecer (2002), El Primer Samuray Mexicano (2004), and En Vivo [CD & DVD] (2004).</p>
|
114 |
-
<li>What are some of their most famous songs?</li>
|
115 |
-
<p>Some of their most famous songs are "Tiernas Mentiras", "Lagrimillas Tontas", "Solo Amor", "Cuando Amanezca", "Todo Mexico Lo Sabe", "Corazon Pandido", "Nada Va a Cambiar Mi Corazon Por Ti", "Al Rojo Vivo", "Donde Vas Chiquilla", "Un Dia Sin Ti", "Tres Palabras", and "Un Nuevo Amanecer".</p>
|
116 |
-
</ol>
|
117 |
-
</p> 0a6ba089eb<br />
|
118 |
-
<br />
|
119 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1gistliPinn/ChatGPT4/Examples/3 Idiots Full Movie Tagalog Version Kapamilya Blockbuster.md
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
<h2>3 idiots full movie tagalog version kapamilya blockbuster</h2><br /><p><b><b>Download Zip</b> - <a href="https://imgfil.com/2uxZEm">https://imgfil.com/2uxZEm</a></b></p><br /><br />
|
2 |
-
|
3 |
-
anu courier? Copyright disclaimer: I DO NOT own this video/track or the image used in this video. #39;Another episode created by a patron as we honor the request of patron Aaron G. "We don't want to lose touch with this channel," he said.
|
4 |
-
In the March 2018 issue of The Unknown Heart, it was revealed that Aaron G. was very anxious about his child and his relationship with her.
|
5 |
-
In a 2014 interview with the Daily Caller, Aaron G. said:
|
6 |
-
"I've never been a particularly religious father and I still don't find myself seeing how my son tends, I don't know... not to be completely pious in my opinion, but it really excites me.## #Watch full movie in Hindi 3 Idiots on YouTube. Directed by Sumiya Supriya, starring Vivek Trivedi, Pamela. ##3 Idiots dubbed in Tagalog by Full Pinoy Movie. Pinoy's latest movie in HD quality Download for free. We publish the latest Pinoy movies daily. ➡ Pinoy ➡ Pinoy full movie ➡ Pinoy 2018 full ➡ Pinoy download on YouTube ➡ Pinoy watch online ➡ Pinoy free download ➡ Pinoy all parts free download without registration � 8a78ff9644<br />
|
7 |
-
<br />
|
8 |
-
<br />
|
9 |
-
<p></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1gistliPinn/ChatGPT4/Examples/Adobe Photoshop Cc Multi Language Xforce Keygen Downloadtrmdsf.md
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
<h2>Adobe Photoshop Cc Multi Language Xforce Keygen Downloadtrmdsf</h2><br /><p><b><b>Download</b> ✑ ✑ ✑ <a href="https://imgfil.com/2uy0bc">https://imgfil.com/2uy0bc</a></b></p><br /><br />
|
2 |
-
|
3 |
-
d5da3c52bf<br />
|
4 |
-
<br />
|
5 |
-
<br />
|
6 |
-
<p></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1line/AutoGPT/autogpt/json_utils/json_fix_general.py
DELETED
@@ -1,124 +0,0 @@
|
|
1 |
-
"""This module contains functions to fix JSON strings using general programmatic approaches, suitable for addressing
|
2 |
-
common JSON formatting issues."""
|
3 |
-
from __future__ import annotations
|
4 |
-
|
5 |
-
import contextlib
|
6 |
-
import json
|
7 |
-
import re
|
8 |
-
from typing import Optional
|
9 |
-
|
10 |
-
from autogpt.config import Config
|
11 |
-
from autogpt.json_utils.utilities import extract_char_position
|
12 |
-
|
13 |
-
CFG = Config()
|
14 |
-
|
15 |
-
|
16 |
-
def fix_invalid_escape(json_to_load: str, error_message: str) -> str:
|
17 |
-
"""Fix invalid escape sequences in JSON strings.
|
18 |
-
|
19 |
-
Args:
|
20 |
-
json_to_load (str): The JSON string.
|
21 |
-
error_message (str): The error message from the JSONDecodeError
|
22 |
-
exception.
|
23 |
-
|
24 |
-
Returns:
|
25 |
-
str: The JSON string with invalid escape sequences fixed.
|
26 |
-
"""
|
27 |
-
while error_message.startswith("Invalid \\escape"):
|
28 |
-
bad_escape_location = extract_char_position(error_message)
|
29 |
-
json_to_load = (
|
30 |
-
json_to_load[:bad_escape_location] + json_to_load[bad_escape_location + 1 :]
|
31 |
-
)
|
32 |
-
try:
|
33 |
-
json.loads(json_to_load)
|
34 |
-
return json_to_load
|
35 |
-
except json.JSONDecodeError as e:
|
36 |
-
if CFG.debug_mode:
|
37 |
-
print("json loads error - fix invalid escape", e)
|
38 |
-
error_message = str(e)
|
39 |
-
return json_to_load
|
40 |
-
|
41 |
-
|
42 |
-
def balance_braces(json_string: str) -> Optional[str]:
|
43 |
-
"""
|
44 |
-
Balance the braces in a JSON string.
|
45 |
-
|
46 |
-
Args:
|
47 |
-
json_string (str): The JSON string.
|
48 |
-
|
49 |
-
Returns:
|
50 |
-
str: The JSON string with braces balanced.
|
51 |
-
"""
|
52 |
-
|
53 |
-
open_braces_count = json_string.count("{")
|
54 |
-
close_braces_count = json_string.count("}")
|
55 |
-
|
56 |
-
while open_braces_count > close_braces_count:
|
57 |
-
json_string += "}"
|
58 |
-
close_braces_count += 1
|
59 |
-
|
60 |
-
while close_braces_count > open_braces_count:
|
61 |
-
json_string = json_string.rstrip("}")
|
62 |
-
close_braces_count -= 1
|
63 |
-
|
64 |
-
with contextlib.suppress(json.JSONDecodeError):
|
65 |
-
json.loads(json_string)
|
66 |
-
return json_string
|
67 |
-
|
68 |
-
|
69 |
-
def add_quotes_to_property_names(json_string: str) -> str:
|
70 |
-
"""
|
71 |
-
Add quotes to property names in a JSON string.
|
72 |
-
|
73 |
-
Args:
|
74 |
-
json_string (str): The JSON string.
|
75 |
-
|
76 |
-
Returns:
|
77 |
-
str: The JSON string with quotes added to property names.
|
78 |
-
"""
|
79 |
-
|
80 |
-
def replace_func(match: re.Match) -> str:
|
81 |
-
return f'"{match[1]}":'
|
82 |
-
|
83 |
-
property_name_pattern = re.compile(r"(\w+):")
|
84 |
-
corrected_json_string = property_name_pattern.sub(replace_func, json_string)
|
85 |
-
|
86 |
-
try:
|
87 |
-
json.loads(corrected_json_string)
|
88 |
-
return corrected_json_string
|
89 |
-
except json.JSONDecodeError as e:
|
90 |
-
raise e
|
91 |
-
|
92 |
-
|
93 |
-
def correct_json(json_to_load: str) -> str:
|
94 |
-
"""
|
95 |
-
Correct common JSON errors.
|
96 |
-
Args:
|
97 |
-
json_to_load (str): The JSON string.
|
98 |
-
"""
|
99 |
-
|
100 |
-
try:
|
101 |
-
if CFG.debug_mode:
|
102 |
-
print("json", json_to_load)
|
103 |
-
json.loads(json_to_load)
|
104 |
-
return json_to_load
|
105 |
-
except json.JSONDecodeError as e:
|
106 |
-
if CFG.debug_mode:
|
107 |
-
print("json loads error", e)
|
108 |
-
error_message = str(e)
|
109 |
-
if error_message.startswith("Invalid \\escape"):
|
110 |
-
json_to_load = fix_invalid_escape(json_to_load, error_message)
|
111 |
-
if error_message.startswith(
|
112 |
-
"Expecting property name enclosed in double quotes"
|
113 |
-
):
|
114 |
-
json_to_load = add_quotes_to_property_names(json_to_load)
|
115 |
-
try:
|
116 |
-
json.loads(json_to_load)
|
117 |
-
return json_to_load
|
118 |
-
except json.JSONDecodeError as e:
|
119 |
-
if CFG.debug_mode:
|
120 |
-
print("json loads error - add quotes", e)
|
121 |
-
error_message = str(e)
|
122 |
-
if balanced_str := balance_braces(json_to_load):
|
123 |
-
return balanced_str
|
124 |
-
return json_to_load
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Boost Your SketchUp Productivity with JHS Powerbar 2019 - Free Download for SketchUp 2016 Users.md
DELETED
@@ -1,117 +0,0 @@
|
|
1 |
-
<br />
|
2 |
-
<h1>How to Download JHS Powerbar Sketchup 2016 Free</h1>
|
3 |
-
<p>If you are looking for a way to enhance your Sketchup experience with more tools and features, you might want to try JHS Powerbar Sketchup. This is a plugin that adds a powerful toolbar to your Sketchup interface, giving you access to many useful functions and commands. In this article, we will show you how to download JHS Powerbar Sketchup 2016 free and how to use it effectively.</p>
|
4 |
-
<h2>What is JHS Powerbar Sketchup?</h2>
|
5 |
-
<p>JHS Powerbar Sketchup is a plugin developed by CadFather (Max Coppoletta) that extends the capabilities of Sketchup. It is compatible with Sketchup versions from 2015 to 2021, but in this article we will focus on the version for Sketchup 2016. JHS Powerbar Sketchup adds a toolbar with several buttons that allow you to perform various actions in Sketchup, such as:</p>
|
6 |
-
<h2>download jhs powerbar sketchup 2016 free</h2><br /><p><b><b>Download Zip</b> ⇒ <a href="https://urlin.us/2uSZyZ">https://urlin.us/2uSZyZ</a></b></p><br /><br />
|
7 |
-
<ul>
|
8 |
-
<li>Create ramps, stairs, roofs, domes, pipes, walls, fences, and other shapes</li>
|
9 |
-
<li>Draw lines, curves, circles, polygons, arcs, splines, and other geometries</li>
|
10 |
-
<li>Modify faces, edges, vertices, groups, components, and other entities</li>
|
11 |
-
<li>Align, rotate, scale, move, copy, mirror, flip, and array objects</li>
|
12 |
-
<li>Add vegetation, furniture, people, cars, and other models from the library</li>
|
13 |
-
<li>Apply materials, textures, colors, styles, shadows, and other effects</li>
|
14 |
-
<li>Measure distances, angles, areas, volumes, and other dimensions</li>
|
15 |
-
<li>Export images, animations, videos, PDFs, DXFs, STLs, and other formats</li>
|
16 |
-
<li>And much more!</li>
|
17 |
-
</ul>
|
18 |
-
<h2>Why use JHS Powerbar Sketchup 2016?</h2>
|
19 |
-
<p>There are many reasons why you might want to use JHS Powerbar Sketchup 2016. Here are some of them:</p>
|
20 |
-
<ul>
|
21 |
-
<li>JHS Powerbar Sketchup is compatible with <strong>Sketchup 2016</strong>, which is one of the most popular and free versions of Sketchup. You can download it from the official website or a trusted source.</li>
|
22 |
-
<li <li>JHS Powerbar Sketchup is <strong>easy to install and use</strong>. You just need to download the plugin files and copy them to the Sketchup plugins folder. Then, you can access the toolbar from the View menu or by right-clicking on the screen.</li>
|
23 |
-
<li>JHS Powerbar Sketchup <strong>enhances your productivity and creativity</strong> in Sketchup. You can save time and effort by using the shortcuts and commands provided by the plugin. You can also create more complex and realistic models with the tools and features available.</li>
|
24 |
-
</ul>
|
25 |
-
<h2>How to download JHS Powerbar Sketchup 2016 free?</h2>
|
26 |
-
<p>Downloading JHS Powerbar Sketchup 2016 free is a simple process that involves four steps:</p>
|
27 |
-
<ol>
|
28 |
-
<li><strong>Step 1: Download Sketchup 2016</strong> from the official website or a trusted source. You can find the download link here: . Make sure you choose the right version for your operating system and architecture. Install Sketchup 2016 on your computer and launch it.</li>
|
29 |
-
<li><strong>Step 2: Download JHS Powerbar Sketchup 2016</strong> from SketchUcation or another reliable site. You can find the download link here: . You will need to register for a free account to download the plugin. After downloading, unzip the file and you will see two folders: jhs_powerbar and jhs_powerbar_icons.</li>
|
30 |
-
<li><strong>Step 3: Copy the plugin files</strong> to the Sketchup plugins folder. The location of this folder may vary depending on your operating system and installation settings, but you can usually find it here: C:\Users\YourUserName\AppData\Roaming\SketchUp\SketchUp 2016\SketchUp\Plugins. Copy both folders (jhs_powerbar and jhs_powerbar_icons) to this folder.</li>
|
31 |
-
<li><strong>Step 4: Restart Sketchup</strong> and enjoy JHS Powerbar Sketchup 2016. You should see a new toolbar with several buttons on your screen. You can also access the toolbar from the View menu or by right-clicking on the screen. To learn more about how to use JHS Powerbar Sketchup 2016, you can watch this video tutorial: .</li>
|
32 |
-
</ol>
|
33 |
-
<h2>Conclusion</h2>
|
34 |
-
<p>JHS Powerbar Sketchup 2016 is a great plugin that adds many useful tools and features to your Sketchup interface. It is compatible with Sketchup 2016, a popular and free version of Sketchup. It is easy to install and use, and it enhances your productivity and creativity in Sketchup. You can download JHS Powerbar Sketchup 2016 free by following the steps we have shown you in this article.</p>
|
35 |
-
<p>We hope you found this article helpful and informative. If you have any questions or feedback, please feel free to leave a comment below or contact us through our website. We would love to hear from you!</p>
|
36 |
-
<p>How to use jhs powerbar plugin in sketchup 2016<br />
|
37 |
-
Jhs powerbar sketchup 2016 tutorial video<br />
|
38 |
-
Jhs powerbar sketchup 2016 extension download link<br />
|
39 |
-
Jhs powerbar sketchup 2016 features and benefits<br />
|
40 |
-
Jhs powerbar sketchup 2016 review and rating<br />
|
41 |
-
Jhs powerbar sketchup 2016 installation guide<br />
|
42 |
-
Jhs powerbar sketchup 2016 compatibility and requirements<br />
|
43 |
-
Jhs powerbar sketchup 2016 best practices and tips<br />
|
44 |
-
Jhs powerbar sketchup 2016 alternatives and comparisons<br />
|
45 |
-
Jhs powerbar sketchup 2016 support and feedback<br />
|
46 |
-
Jhs powerbar sketchup 2016 free trial and license<br />
|
47 |
-
Jhs powerbar sketchup 2016 update and upgrade<br />
|
48 |
-
Jhs powerbar sketchup 2016 tools and functions<br />
|
49 |
-
Jhs powerbar sketchup 2016 examples and projects<br />
|
50 |
-
Jhs powerbar sketchup 2016 forum and community<br />
|
51 |
-
Jhs powerbar sketchup 2016 error and troubleshooting<br />
|
52 |
-
Jhs powerbar sketchup 2016 discount and coupon<br />
|
53 |
-
Jhs powerbar sketchup 2016 testimonials and case studies<br />
|
54 |
-
Jhs powerbar sketchup 2016 pros and cons<br />
|
55 |
-
Jhs powerbar sketchup 2016 faq and help<br />
|
56 |
-
Jhs powerbar sketchup 2016 online course and training<br />
|
57 |
-
Jhs powerbar sketchup 2016 ebook and pdf<br />
|
58 |
-
Jhs powerbar sketchup 2016 webinar and workshop<br />
|
59 |
-
Jhs powerbar sketchup 2016 blog and news<br />
|
60 |
-
Jhs powerbar sketchup 2016 affiliate and referral program<br />
|
61 |
-
Jhs powerbar sketchup 2016 developer and creator<br />
|
62 |
-
Jhs powerbar sketchup 2016 source code and github<br />
|
63 |
-
Jhs powerbar sketchup 2016 crack and keygen<br />
|
64 |
-
Jhs powerbar sketchup 2016 mod and hack<br />
|
65 |
-
Jhs powerbar sketchup 2016 premium and pro version<br />
|
66 |
-
Jhs powerbar sketchup 2016 for mac and windows<br />
|
67 |
-
Jhs powerbar sketchup 2016 for beginners and experts<br />
|
68 |
-
Jhs powerbar sketchup 2016 for architects and designers<br />
|
69 |
-
Jhs powerbar sketchup 2016 for engineers and builders<br />
|
70 |
-
Jhs powerbar sketchup 2016 for students and teachers<br />
|
71 |
-
Jhs powerbar sketchup 2016 for hobbyists and enthusiasts<br />
|
72 |
-
Jhs powerbar sketchup 2016 for interior and exterior design<br />
|
73 |
-
Jhs powerbar sketchup 2016 for furniture and product design<br />
|
74 |
-
Jhs powerbar sketchup 2016 for landscape and urban design<br />
|
75 |
-
Jhs powerbar sketchup 2016 for animation and rendering<br />
|
76 |
-
Jhs powerbar sketchup 2016 for modeling and editing<br />
|
77 |
-
Jhs powerbar sketchup 2016 for scaling and rotating<br />
|
78 |
-
Jhs powerbar sketchup 2016 for extruding and offsetting<br />
|
79 |
-
Jhs powerbar sketchup 2016 for mirroring and welding <br />
|
80 |
-
Jhs powerbar sketchup 2016 for subdividing and smoothing <br />
|
81 |
-
Jhs powerbar sketchup 2016 for piping and tubing <br />
|
82 |
-
Jhs powerbar sketchup 2016 for copying and aligning <br />
|
83 |
-
Jhs powerbar sketchup 2016 for randomizing and proxifying</p>
|
84 |
-
<h2>FAQs</h2>
|
85 |
-
<h3>Q1: What are the system requirements for JHS Powerbar Sketchup 2016?</h3>
|
86 |
-
<p>A1: JHS Powerbar Sketchup 2016 requires Sketchup 2016, which has the following system requirements:</p>
|
87 |
-
<table>
|
88 |
-
<tr><td>Operating System</td><td>Windows 7/8/10 or Mac OS X 10.9/10.10/10.11</td></tr>
|
89 |
-
<tr><td>Processor</td><td>1 GHz or faster</td></tr>
|
90 |
-
<tr><td>RAM</td><td>4 GB or more</td></tr>
|
91 |
-
<tr><td>Disk Space</td><td>500 MB or more</td></tr>
|
92 |
-
<tr><td>Graphics Card</td><td>3D class with 512 MB or more of memory and support for hardware acceleration</td></tr>
|
93 |
-
<tr><td>Internet Connection</td><td>Required for installation, activation, updates, and some features</td></tr>
|
94 |
-
</table>
|
95 |
-
<h3>Q2: How to update JHS Powerbar Sketchup 2016 to the latest version?</h3>
|
96 |
-
<p>A2: To update JHS Powerbar Sketchup 2016 to the latest version, you need to download the new version from SketchUcation or another reliable site, and replace the old plugin files with the new ones in the Sketchup plugins folder. Then, restart Sketchup and check if the update was successful.</p>
|
97 |
-
<h3>Q3: How to uninstall JHS Powerbar Sketchup 2016?</h3>
|
98 |
-
<p>A3: To uninstall JHS Powerbar Sketchup 2016, you need to delete the plugin files (jhs_powerbar and jhs_powerbar_icons) from the Sketchup plugins folder. You can find the location of this folder in the previous answer. Then, restart Sketchup and check if the plugin is gone.</p>
|
99 |
-
<h3>Q4: What are some alternatives to JHS Powerbar Sketchup 2016?</h3>
|
100 |
-
<p>A4: There are many other plugins that can enhance your Sketchup experience, such as:</p>
|
101 |
-
<ul>
|
102 |
-
<li><strong>SketchUp STL</strong>: This plugin allows you to import and export STL files, which are commonly used for 3D printing. You can find it here: .</li>
|
103 |
-
<li><strong>1001bit Tools</strong>: This plugin offers a collection of tools for architectural modeling, such as creating doors, windows, stairs, roofs, and more. You can find it here: .</li>
|
104 |
-
<li><strong>Curviloft</strong>: This plugin enables you to create complex curved surfaces by lofting and skinning. You can find it here: .</li>
|
105 |
-
<li><strong>FredoScale</strong>: This plugin allows you to scale, shear, twist, bend, and taper objects in Sketchup. You can find it here: .</li>
|
106 |
-
<li><strong>RoundCorner</strong>: This plugin helps you to create rounded edges and corners on your models. You can find it here: .</li>
|
107 |
-
</ul>
|
108 |
-
<h3>Q5: Where can I find more tutorials or tips on using JHS Powerbar Sketchup 2016?</h3>
|
109 |
-
<p>A5: You can find more tutorials or tips on using JHS Powerbar Sketchup 2016 on the following sites:</p>
|
110 |
-
<ul>
|
111 |
-
<li><strong>SketchUcation Forum</strong>: This is a community of Sketchup users and developers, where you can ask questions, share ideas, and learn from others. You can find the forum here: .</li>
|
112 |
-
<li><strong>SketchUp School</strong>: This is a website that offers online courses and videos on Sketchup and related topics. You can find the website here: .</li>
|
113 |
-
<li><strong>SketchUp YouTube Channel</strong>: This is the official YouTube channel of Sketchup, where you can watch tutorials, tips, tricks, and stories on Sketchup and its features. You can find the channel here: .</li>
|
114 |
-
<li><strong>JHS Powerbar Sketchup YouTube Playlist</strong>: This is a playlist of videos that show you how to use JHS Powerbar Sketchup and its tools. You can find the playlist here: .</li>
|
115 |
-
</ul></p> 197e85843d<br />
|
116 |
-
<br />
|
117 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1phancelerku/anime-remove-background/1920 Evil Returns - The Ultimate Horror Movie Soundtrack - Download Now.md
DELETED
@@ -1,65 +0,0 @@
|
|
1 |
-
|
2 |
-
<h1>How to Download 1920 Evil Returns Songs</h1>
|
3 |
-
<p>1920 Evil Returns is a 2012 Indian horror film that is a quasi-sequel to the 2008 film 1920. The film features Aftab Shivdasani, Tia Bajpai, Vidya Malvade, and Sharad Kelkar in the lead roles. The film has a haunting soundtrack composed by Chirantan Bhatt, with lyrics by Shakeel Azmi, Manoj Yadav, and Junaid Wasi. The songs are sung by various artists, including Arijit Singh, Mahalakshmi Iyer, Sonu Nigam, and K.K. If you are a fan of the film or its music, you might want to download the songs and listen to them offline. But how can you do that? In this article, we will show you how to download 1920 Evil Returns songs legally and ethically, as well as some alternative methods that may not be as safe or legal.</p>
|
4 |
-
<h2>download 1920 evil returns songs</h2><br /><p><b><b>Download Zip</b> ✒ ✒ ✒ <a href="https://jinyurl.com/2uNQh1">https://jinyurl.com/2uNQh1</a></b></p><br /><br />
|
5 |
-
<h2>Legal and ethical issues of downloading music from YouTube</h2>
|
6 |
-
<p>One of the most popular sources of free music online is YouTube. You can find almost any song or album on YouTube, uploaded by official channels or users. However, downloading music from YouTube is not as simple or legal as it may seem. According to YouTube's terms of service, you are not allowed to download any audio content from the site, unless it is specifically permitted by the service or you have prior written permission from YouTube or the respective rights holder. This means that you cannot use third-party software or websites to download music from YouTube videos without violating the site's rules or breaking the law. You may also face legal consequences if you download copyrighted music without the owner's consent. Therefore, downloading music from YouTube is not recommended unless you are sure that the music is royalty-free, copyright-free, or covered by a Creative Commons license.</p>
|
7 |
-
<h2>How to buy music from iTunes or Google Play</h2>
|
8 |
-
<p>The safest and most legal way to download music from the internet is to buy it from official sources like iTunes or Google Play. These platforms offer millions of songs and albums that you can purchase and download legally and ethically. You can also enjoy high-quality audio and support the artists and creators of the music. Here are the steps to buy music from iTunes or Google Play:</p>
|
9 |
-
<ol>
|
10 |
-
<li>Install iTunes on your Windows computer or open it on your Mac. If you are using a smartphone, you can use the iTunes Store app on iPhone or the Play Music app on Android.</li>
|
11 |
-
<li>Sign in with your Apple ID or Google account.</li>
|
12 |
-
<li>Search for 1920 Evil Returns songs or album in the search bar.</li>
|
13 |
-
<li>Select the song or album you want to buy and click on the price.</li>
|
14 |
-
<li>Enter your password or use Touch ID or Face ID to confirm your purchase.</li>
|
15 |
-
<li>The song or album will be added to your library and downloaded to your device.</li>
|
16 |
-
</ol>
|
17 |
-
<h2>How to download free music from YouTube or SoundCloud</h2>
|
18 |
-
<p>If you don't want to spend money on buying music online, you can try downloading free music from YouTube or SoundCloud. These sites offer a lot of free music that you can listen to online or download offline. However, as we mentioned before, downloading music from YouTube is not legal or ethical unless the music is free of any rights. SoundCloud is more lenient in this regard, as it allows some artists and users to offer their music for free download. However, you still need to respect their wishes and follow their instructions. Here are the steps to download free music from YouTube or SoundCloud:</p>
|
19 |
-
<p>download 1920 evil returns full songs jukebox<br />
|
20 |
-
download khud ko tere paas song from 1920 evil returns<br />
|
21 |
-
download uska hi banana song from 1920 evil returns<br />
|
22 |
-
download 1920 evil returns mp3 songs free<br />
|
23 |
-
download 1920 evil returns songs in high quality<br />
|
24 |
-
download 1920 evil returns songs zip file<br />
|
25 |
-
download 1920 evil returns video songs hd<br />
|
26 |
-
download 1920 evil returns songs lyrics<br />
|
27 |
-
download 1920 evil returns songs ringtone<br />
|
28 |
-
download 1920 evil returns songs pagalworld<br />
|
29 |
-
download 1920 evil returns songs mr jatt<br />
|
30 |
-
download 1920 evil returns songs djmaza<br />
|
31 |
-
download 1920 evil returns songs wapking<br />
|
32 |
-
download 1920 evil returns songs gaana<br />
|
33 |
-
download 1920 evil returns songs saavn<br />
|
34 |
-
download 1920 evil returns songs hungama<br />
|
35 |
-
download 1920 evil returns songs spotify<br />
|
36 |
-
download 1920 evil returns songs apple music<br />
|
37 |
-
download 1920 evil returns songs amazon music<br />
|
38 |
-
download 1920 evil returns songs youtube music<br />
|
39 |
-
download aftab shivdasani and tia bajpai songs from 1920 evil returns<br />
|
40 |
-
download chirantan bhatt songs from 1920 evil returns<br />
|
41 |
-
download arijit singh songs from 1920 evil returns<br />
|
42 |
-
download mahalakshmi iyer songs from 1920 evil returns<br />
|
43 |
-
download sonu nigam songs from 1920 evil returns<br />
|
44 |
-
download kk songs from 1920 evil returns<br />
|
45 |
-
download amit mishra songs from 1920 evil returns<br />
|
46 |
-
download sukhwinder singh songs from 1920 evil returns<br />
|
47 |
-
download shakeel azmi lyrics from 1920 evil returns<br />
|
48 |
-
download manoj yadav lyrics from 1920 evil returns<br />
|
49 |
-
download junaid wasi lyrics from 1920 evil returns<br />
|
50 |
-
how to download 1920 evil returns songs for free<br />
|
51 |
-
where to download 1920 evil returns songs legally<br />
|
52 |
-
best sites to download 1920 evil returns songs online<br />
|
53 |
-
best apps to download 1920 evil returns songs on mobile<br />
|
54 |
-
best quality to download 1920 evil returns songs in mp3 format<br />
|
55 |
-
best format to download 1920 evil returns songs in video format<br />
|
56 |
-
best way to download 1920 evil returns songs offline<br />
|
57 |
-
best method to download 1920 evil returns songs fast and easy<br />
|
58 |
-
best tips to download 1920 evil returns songs without any hassle</p>
|
59 |
-
<ol>
|
60 |
-
<li>Find a song or album on YouTube or SoundCloud MP3 file. Third-party apps are software that you can install on your device and use to download and convert YouTube videos to MP3 files. However, you should be careful when using these methods, as they may not be legal or ethical, and they may harm your device or compromise your security. You should always check the reviews and ratings of the online converters or third-party apps before using them, and scan the downloaded files for any viruses or malware.</p>
|
61 |
-
<h3>Q: How can I play downloaded music on my device or media player?</h3>
|
62 |
-
<p>A: You can play downloaded music on your device or media player by using the built-in music app or any other music app that supports MP3 files. You can also create playlists, shuffle songs, adjust the volume, and control the playback using the app's features. You can also use headphones, speakers, or earphones to enhance your listening experience.</p>
|
63 |
-
<p>I hope you enjoyed reading this article and learned something new. If you liked this article, please share it with your friends and family who may also be interested in downloading 1920 Evil Returns songs. Thank you for your time and attention.</p> 401be4b1e0<br />
|
64 |
-
<br />
|
65 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/1phancelerku/anime-remove-background/Download Rope Hero Vice Town 2.3 APK - Free Action Game for Android.md
DELETED
@@ -1,118 +0,0 @@
|
|
1 |
-
<br />
|
2 |
-
<h1>Rope Hero Vice Town 2.3 APK: A Superhero Game with Unlimited Possibilities</h1>
|
3 |
-
<p>If you are looking for a fun and exciting superhero game for your Android device, you should check out Rope Hero Vice Town 2.3 APK. This is a game that lets you play as a blue hero with a super rope that can swing, jump, and fly around a 3D open world filled with crime and adventure. You can choose to be a hero or a villain, fight against gangs and police, complete quests and challenges, and customize your character with various weapons, vehicles, and outfits. In this article, we will tell you more about what Rope Hero Vice Town is, what are its features, how to download and install it, and what are some tips and tricks for playing it.</p>
|
4 |
-
<h2>rope hero vice town 2.3 apk</h2><br /><p><b><b>DOWNLOAD</b> — <a href="https://jinyurl.com/2uNQMl">https://jinyurl.com/2uNQMl</a></b></p><br /><br />
|
5 |
-
<h2>What is Rope Hero Vice Town?</h2>
|
6 |
-
<p>Rope Hero Vice Town is an action-packed game by Naxeex Action & RPG Games that combines elements of action, adventure, and role-playing games. It is a superhero simulator that gives you the freedom to explore a fictional city called Vice Town, where you can use your super powers to fight crime or cause chaos.</p>
|
7 |
-
<h3>A 3D open world action game with RPG elements</h3>
|
8 |
-
<p>Rope Hero Vice Town is a game that lets you roam freely in a huge 3D open world that has realistic graphics and physics. You can interact with various objects, buildings, vehicles, and people in the city, as well as engage in combat with enemies using guns, melee weapons, or your super powers. You can also level up your hero by completing quests, gaining experience, and collecting money. You can use these resources to upgrade your skills, buy new weapons and vehicles, and change your appearance.</p>
|
9 |
-
<h3>A superhero simulator with a blue hero and a super rope</h3>
|
10 |
-
<p>Rope Hero Vice Town is a game that puts you in the shoes of a blue hero who has a super rope that can do amazing things. You can use the rope to swing from one building to another like Spider-Man, perform mega jumps and power landings like Hulk, or climb walls like Batman. You can also use the rope to grab enemies or objects and throw them around. The rope is not your only super power though. You also have super strength, speed, stamina, and durability that make you a formidable fighter.</p>
|
11 |
-
<h3>A game with multiple modes, quests, and activities</h3>
|
12 |
-
<p>Rope Hero Vice Town is a game that offers you a lot of variety and content to keep you entertained for hours. You can choose to follow the main story line that involves testing a new prototype suit that gives you super powers but also erases your memory. You have to find out who you are and what happened to you by completing missions and fighting against crime bosses. Alternatively, you can ignore the main story line and do whatever you want in the city. You can be a hero or a villain, help or harm the police and civilians, participate in races and arena battles, or just have fun with the mini-games and activities scattered around the city.</p>
|
13 |
-
<h2>What are the features of Rope Hero Vice Town 2.3 APK?</h2>
|
14 |
-
<p>Rope Hero Vice Town 2.3 APK is the latest version of the game that has been updated with new features and improvements. Some of the features of the game are:</p>
|
15 |
-
<h3>Improved graphics and performance</h3>
|
16 |
-
<p>Rope Hero Vice Town 2.3 APK has enhanced the graphics and performance of the game to make it more realistic and smooth. You can enjoy the stunning visuals of the city, the vehicles, the weapons, and the characters, as well as the dynamic lighting and shadows, the weather effects, and the explosions. You can also adjust the graphics settings to suit your device and preferences. The game also runs faster and smoother, with less bugs and glitches, and more stability and compatibility.</p>
|
17 |
-
<h3>New weapons, vehicles, and archetypes</h3>
|
18 |
-
<p>Rope Hero Vice Town 2.3 APK has added new weapons, vehicles, and archetypes to the game to give you more options and variety. You can choose from a wide range of firearms, melee weapons, lasers, and super weapons to suit your playstyle and strategy. You can also drive or fly different types of vehicles, such as cars, bikes, tanks, helicopters, planes, and assault mechs. You can even equip different archetypes that transform your hero into a different form, such as an aircraft robot, a tank robot, or a stone giant.</p>
|
19 |
-
<h3>New mini-games and collectibles</h3>
|
20 |
-
<p>Rope Hero Vice Town 2.3 APK has also added new mini-games and collectibles to the game to make it more fun and rewarding. You can participate in various mini-games that test your skills and abilities, such as gangster shootouts, gravity gun challenges, ATM hacking, and more. You can also find hidden collectibles around the city that give you bonus rewards, such as money, experience, or items. Be sure not to miss anything!</p>
|
21 |
-
<h2>How to download and install Rope Hero Vice Town 2.3 APK?</h2>
|
22 |
-
<p>If you want to download and install Rope Hero Vice Town 2.3 APK on your Android device, you need to follow these simple steps:</p>
|
23 |
-
<p>rope hero vice town 2.3 apk download<br />
|
24 |
-
rope hero vice town 2.3 apk mod<br />
|
25 |
-
rope hero vice town 2.3 apk free<br />
|
26 |
-
rope hero vice town 2.3 apk latest version<br />
|
27 |
-
rope hero vice town 2.3 apk online<br />
|
28 |
-
rope hero vice town 2.3 apk android<br />
|
29 |
-
rope hero vice town 2.3 apk unlimited money<br />
|
30 |
-
rope hero vice town 2.3 apk hack<br />
|
31 |
-
rope hero vice town 2.3 apk pure<br />
|
32 |
-
rope hero vice town 2.3 apk mirror<br />
|
33 |
-
rope hero vice town 2.3 apk update<br />
|
34 |
-
rope hero vice town 2.3 apk offline<br />
|
35 |
-
rope hero vice town 2.3 apk install<br />
|
36 |
-
rope hero vice town 2.3 apk gameplay<br />
|
37 |
-
rope hero vice town 2.3 apk review<br />
|
38 |
-
rope hero vice town 2.3 apk cheats<br />
|
39 |
-
rope hero vice town 2.3 apk old version<br />
|
40 |
-
rope hero vice town 2.3 apk for pc<br />
|
41 |
-
rope hero vice town 2.3 apk obb<br />
|
42 |
-
rope hero vice town 2.3 apk revdl<br />
|
43 |
-
rope hero vice town 2.3 apk rexdl<br />
|
44 |
-
rope hero vice town 2.3 apk uptodown<br />
|
45 |
-
rope hero vice town 2.3 apk apkpure<br />
|
46 |
-
rope hero vice town 2.3 apk appvn<br />
|
47 |
-
rope hero vice town 2.3 apk mob.org<br />
|
48 |
-
rope hero vice town 2.3 apk android oyun club<br />
|
49 |
-
rope hero vice town 2.3 apk andropalace<br />
|
50 |
-
rope hero vice town 2.3 apk blackmod<br />
|
51 |
-
rope hero vice town 2.3 apk by naxeex action & rpg games<br />
|
52 |
-
rope hero vice town 2.3 apk cracked<br />
|
53 |
-
rope hero vice town 2.3 apk data file host<br />
|
54 |
-
rope hero vice town 2.3 apk direct link<br />
|
55 |
-
rope hero vice town 2.3 apk file download for android mobile phone and tablet from android mobile zone.<br />
|
56 |
-
rope hero vice town 2.3 apk full version free download for android devices.<br />
|
57 |
-
rope hero vice town 2.3 apk game download for android phone and tablet.<br />
|
58 |
-
rope hero vice town 2.3 apk highly compressed download for android devices.<br />
|
59 |
-
rope hero vice town 2.3 apk indir for android devices.<br />
|
60 |
-
rope hero vice town 2.3 apk latest mod version download for android devices.<br />
|
61 |
-
rope hero vice town 2.3 apk mega mod download for android devices.<br />
|
62 |
-
rope hero vice town 2.3 apk no root download for android devices.<br />
|
63 |
-
rope hero vice town 2.3 apk original version download for android devices.<br />
|
64 |
-
rope hero vice town 2.3 apk premium version download for android devices.<br />
|
65 |
-
rope hero vice town 2.3 apk pro version download for android devices.<br />
|
66 |
-
rope hero vice town 2.3 apk super mod download for android devices.<br />
|
67 |
-
rope hero vice town 2.3 apk unlimited everything download for android devices.<br />
|
68 |
-
rope hero vice town 2.3 apk vip mod download for android devices.<br />
|
69 |
-
rope hero vice town 2.3 apkpure.com download for android devices.<br />
|
70 |
-
how to download and install the latest version of the game Rope Hero: Vice Town APK on your Android device?<br />
|
71 |
-
how to play the game Rope Hero: Vice Town APK on your Android device?</p>
|
72 |
-
<h3>Download the APK file from a trusted source</h3>
|
73 |
-
<p>The first step is to download the APK file of Rope Hero Vice Town 2.3 from a trusted source. You can use the link below to download it from APKCombo.com, a reliable website that offers free and safe APK downloads for Android apps and games.</p>
|
74 |
-
<p><a href="(^1^)">Download Rope Hero Vice Town 2.3 APK from APKCombo.com</a></p>
|
75 |
-
<h3>Enable unknown sources on your device</h3>
|
76 |
-
<p>The second step is to enable unknown sources on your device. This is necessary because Rope Hero Vice Town 2.3 APK is not available on the Google Play Store, so you need to allow your device to install apps from sources other than the official store. To do this, you need to go to your device settings, then security or privacy settings, then find and enable the option that says unknown sources or allow installation of apps from unknown sources.</p>
|
77 |
-
<h3>Install the APK file and enjoy the game</h3>
|
78 |
-
<p>The third step is to install the APK file and enjoy the game. To do this, you need to locate the downloaded APK file on your device storage or file manager app, then tap on it to start the installation process. Follow the instructions on the screen to complete the installation. Once done, you can launch the game from your app drawer or home screen and start playing.</p>
|
79 |
-
<h2>What are some tips and tricks for playing Rope Hero Vice Town?</h2>
|
80 |
-
<p>If you want to play Rope Hero Vice Town like a pro, you need to know some tips and tricks that will help you master the game. Here are some of them:</p>
|
81 |
-
<h3>Master the rope and other super powers</h3>
|
82 |
-
<p>The rope is your main tool and weapon in Rope Hero Vice Town. You can use it to swing across buildings, climb walls, grab enemies or objects, or perform stunts. You need to master how to use it effectively in different situations. You also need to learn how to use your other super powers, such as super strength, speed, stamina, durability, mega jumps, power landings, etc. These powers will help you fight better, move faster, survive longer, and have more fun.</p>
|
83 |
-
<h3>Level up your hero and customize your character</h3>
|
84 |
-
<p>Rope Hero Vice Town is also an RPG game that lets you level up your hero by completing quests and gaining experience and money. You can use these resources to upgrade your skills, such as health, damage, speed, rope length, etc. You can also customize your character by buying new weapons, vehicles, and outfits from the shop. You can find different types of weapons, such as pistols, rifles, shotguns, grenades, rocket launchers, etc. You can also find different types of vehicles, such as cars, bikes, tanks, helicopters, planes, etc. You can also find different types of outfits, such as suits, masks, hats, glasses, etc. You can mix and match these items to create your own unique look and style.</p>
|
85 |
-
<h3>Explore the city and find hidden secrets</h3>
|
86 |
-
<p>Rope Hero Vice Town is a game that has a lot of secrets and surprises for you to discover. You can explore the city and find hidden locations, such as underground bases, secret labs, alien spaceships, etc. You can also find hidden collectibles, such as money bags, stars, cards, etc. that give you bonus rewards. You can also find hidden mini-games and activities that are fun and challenging. You can also encounter random events and situations that are unpredictable and hilarious. Be curious and adventurous and you will never get bored.</p>
|
87 |
-
<h2>Conclusion</h2>
|
88 |
-
<p>Rope Hero Vice Town 2.3 APK is a game that offers you a thrilling and immersive superhero experience on your Android device. You can play as a blue hero with a super rope that can do amazing things in a 3D open world filled with crime and adventure. You can choose to be a hero or a villain, fight against gangs and police, complete quests and challenges, and customize your character with various weapons, vehicles, and outfits. You can also enjoy the improved graphics and performance, the new weapons, vehicles, and archetypes, and the new mini-games and collectibles of the latest version of the game. If you want to download and install Rope Hero Vice Town 2.3 APK on your device, you just need to follow the simple steps we have provided in this article. If you want to play Rope Hero Vice Town like a pro, you just need to follow the tips and tricks we have shared in this article. Rope Hero Vice Town is a game that will keep you entertained for hours with its unlimited possibilities and fun.</p>
|
89 |
-
<h2>FAQs</h2>
|
90 |
-
<p>Here are some frequently asked questions about Rope Hero Vice Town 2.3 APK:</p>
|
91 |
-
<table>
|
92 |
-
<tr>
|
93 |
-
<th>Question</th>
|
94 |
-
<th>Answer</th>
|
95 |
-
</tr>
|
96 |
-
<tr>
|
97 |
-
<td>Is Rope Hero Vice Town 2.3 APK free?</td>
|
98 |
-
<td>Yes, Rope Hero Vice Town 2.3 APK is free to download and play. However, it may contain ads and in-app purchases that require real money.</td>
|
99 |
-
</tr>
|
100 |
-
<tr>
|
101 |
-
<td>Is Rope Hero Vice Town 2.3 APK safe?</td>
|
102 |
-
<td>Yes, Rope Hero Vice Town 2.3 APK is safe to download and install on your device. However, you need to make sure that you download it from a trusted source like APKCombo.com and enable unknown sources on your device settings.</td>
|
103 |
-
</tr>
|
104 |
-
<tr>
|
105 |
-
<td>Is Rope Hero Vice Town 2.3 APK compatible with my device?</td>
|
106 |
-
<td>Rope Hero Vice Town 2.3 APK is compatible with most Android devices that have Android 4.4 or higher versions. However, some devices may have different specifications or features that may affect the performance or compatibility of the game.</td>
|
107 |
-
</tr>
|
108 |
-
<tr>
|
109 |
-
<td>How can I contact the developer of Rope Hero Vice Town 2.3 APK?</td>
|
110 |
-
<td>You can contact the developer of Rope Hero Vice Town 2.3 APK by sending an email to [email protected] or visiting their website at https://naxeex.com/.</td>
|
111 |
-
</tr>
|
112 |
-
<tr>
|
113 |
-
<td>How can I rate or review Rope Hero Vice Town 2.3 APK?</td>
|
114 |
-
<td>You can rate or review Rope Hero Vice Town 2.3 APK by visiting its page on Google Play Store or APKCombo.com and leaving your feedback or comments.</td>
|
115 |
-
</tr>
|
116 |
-
</table></p> 197e85843d<br />
|
117 |
-
<br />
|
118 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/2gauravc/search_summary_chatgpt/README.md
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
---
|
2 |
-
title: Search Summary Chatgpt
|
3 |
-
emoji: 🚀
|
4 |
-
colorFrom: green
|
5 |
-
colorTo: red
|
6 |
-
sdk: streamlit
|
7 |
-
sdk_version: 1.17.0
|
8 |
-
app_file: app.py
|
9 |
-
pinned: false
|
10 |
-
license: apache-2.0
|
11 |
-
---
|
12 |
-
|
13 |
-
|
14 |
-
## Business Use case
|
15 |
-
For the customer to have a good on-boarding experience, it is imperative to have an efficient KYC process. However KYC processes today are mostly resource intensive with long turnaround time.
|
16 |
-
|
17 |
-
One of the key pain points is having to look through Google searches of the related parties. Analysts have to click through each search, read it and determine if they is any material adverse news.
|
18 |
-
|
19 |
-
Enter ChatGPT !!
|
20 |
-
|
21 |
-
What if we could use ChatGPT to give a summary of the content and give its view if there is adverse news or not.
|
22 |
-
|
23 |
-
## Using the App
|
24 |
-
|
25 |
-
1. Enter the name of a person or business entity
|
26 |
-
2. Enter search keywords
|
27 |
-
3. Enter additional data points
|
28 |
-
4. Hit Search
|
29 |
-
5. Use 'Download Report' to dwonload the report to your desktop
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/2ndelement/voicevox/build_util/modify_pyinstaller.bash
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
#!/bin/bash
|
2 |
-
|
3 |
-
# PyInstallerをカスタマイズしてから再インストールする
|
4 |
-
# 良いGPUが自動的に選択されるようにしている
|
5 |
-
# https://github.com/VOICEVOX/voicevox_engine/issues/502
|
6 |
-
|
7 |
-
set -eux
|
8 |
-
|
9 |
-
pyinstaller_version=$(pyinstaller -v)
|
10 |
-
tempdir=$(mktemp -dt modify_pyinstaller.XXXXXXXX)
|
11 |
-
trap 'rm -rf "$tempdir"' EXIT
|
12 |
-
git clone https://github.com/pyinstaller/pyinstaller.git "$tempdir" -b "v$pyinstaller_version" --depth 1
|
13 |
-
cat > "$tempdir/bootloader/src/symbols.c" << EOF
|
14 |
-
#ifdef _WIN32
|
15 |
-
#include <windows.h>
|
16 |
-
|
17 |
-
// https://docs.nvidia.com/gameworks/content/technologies/desktop/optimus.htm
|
18 |
-
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
|
19 |
-
|
20 |
-
// https://gpuopen.com/learn/amdpowerxpressrequesthighperformance/
|
21 |
-
__declspec(dllexport) DWORD AmdPowerXpressRequestHighPerformance = 0x00000001;
|
22 |
-
#endif
|
23 |
-
EOF
|
24 |
-
(cd "$tempdir/bootloader" && python ./waf all)
|
25 |
-
pip install -U "$tempdir"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AIConsultant/MusicGen/audiocraft/grids/musicgen/musicgen_base_cached_32khz.py
DELETED
@@ -1,67 +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 |
-
from ._explorers import LMExplorer
|
8 |
-
from ...environment import AudioCraftEnvironment
|
9 |
-
|
10 |
-
|
11 |
-
@LMExplorer
|
12 |
-
def explorer(launcher):
|
13 |
-
partitions = AudioCraftEnvironment.get_slurm_partitions(['team', 'global'])
|
14 |
-
launcher.slurm_(gpus=32, partition=partitions)
|
15 |
-
launcher.bind_(solver='musicgen/musicgen_base_32khz')
|
16 |
-
# replace this by the desired music dataset
|
17 |
-
launcher.bind_(dset='internal/music_400k_32khz')
|
18 |
-
|
19 |
-
fsdp = {'autocast': False, 'fsdp.use': True}
|
20 |
-
medium = {'model/lm/model_scale': 'medium'}
|
21 |
-
large = {'model/lm/model_scale': 'large'}
|
22 |
-
|
23 |
-
cfg_low = {'classifier_free_guidance.training_dropout': 0.2}
|
24 |
-
wd_low = {'conditioners.description.t5.word_dropout': 0.2}
|
25 |
-
|
26 |
-
adam = {'optim.optimizer': 'adamw', 'optim.lr': 1e-4}
|
27 |
-
|
28 |
-
# BEGINNING OF CACHE WRITING JOBS.
|
29 |
-
cache_write = {
|
30 |
-
'cache.path': '/fsx-codegen/defossez/cache/interleave_stereo_nv_32k',
|
31 |
-
'cache.write': True,
|
32 |
-
'generate.every': 500,
|
33 |
-
'evaluate.every': 500,
|
34 |
-
'logging.log_updates': 50,
|
35 |
-
}
|
36 |
-
|
37 |
-
cache_sub = launcher.bind({'model/lm/model_scale': 'xsmall', 'conditioner': 'none'})
|
38 |
-
cache_sub.bind_({'deadlock.use': True})
|
39 |
-
cache_sub.slurm_(gpus=8)
|
40 |
-
with launcher.job_array():
|
41 |
-
num_shards = 10 # total number of jobs running in parallel.
|
42 |
-
for shard in range(0, num_shards):
|
43 |
-
launcher(cache_write, {'cache.write_num_shards': num_shards, 'cache.write_shard': shard})
|
44 |
-
|
45 |
-
# REMOVE THE FOLLOWING RETURN STATEMENT ONCE THE ABOVE JOBS ARE DONE,
|
46 |
-
# OR SUFFICIENTLY AHEAD.
|
47 |
-
return
|
48 |
-
|
49 |
-
cache = {
|
50 |
-
'cache.path': '/fsx-codegen/defossez/cache/interleave_stereo_nv_32k',
|
51 |
-
}
|
52 |
-
launcher.bind_(fsdp, cache)
|
53 |
-
|
54 |
-
launcher.slurm_(gpus=32).bind_(label='32gpus')
|
55 |
-
with launcher.job_array():
|
56 |
-
sub = launcher.bind()
|
57 |
-
sub()
|
58 |
-
|
59 |
-
launcher.slurm_(gpus=64).bind_(label='64gpus')
|
60 |
-
with launcher.job_array():
|
61 |
-
sub = launcher.bind()
|
62 |
-
sub(medium, adam)
|
63 |
-
|
64 |
-
launcher.slurm_(gpus=96).bind_(label='96gpus')
|
65 |
-
with launcher.job_array():
|
66 |
-
sub = launcher.bind()
|
67 |
-
sub(large, cfg_low, wd_low, adam, {'optim.max_norm': 3})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/ATang0729/Forecast4Muses/Model/Model6/Model6_0_ClothesDetection/mmyolo/configs/yolov6/yolov6_l_syncbn_fast_8xb32-300e_coco.py
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
_base_ = './yolov6_m_syncbn_fast_8xb32-300e_coco.py'
|
2 |
-
|
3 |
-
# ======================= Possible modified parameters =======================
|
4 |
-
# -----model related-----
|
5 |
-
# The scaling factor that controls the depth of the network structure
|
6 |
-
deepen_factor = 1
|
7 |
-
# The scaling factor that controls the width of the network structure
|
8 |
-
widen_factor = 1
|
9 |
-
|
10 |
-
# ============================== Unmodified in most cases ===================
|
11 |
-
model = dict(
|
12 |
-
backbone=dict(
|
13 |
-
deepen_factor=deepen_factor,
|
14 |
-
widen_factor=widen_factor,
|
15 |
-
hidden_ratio=1. / 2,
|
16 |
-
block_cfg=dict(
|
17 |
-
type='ConvWrapper',
|
18 |
-
norm_cfg=dict(type='BN', momentum=0.03, eps=0.001)),
|
19 |
-
act_cfg=dict(type='SiLU', inplace=True)),
|
20 |
-
neck=dict(
|
21 |
-
deepen_factor=deepen_factor,
|
22 |
-
widen_factor=widen_factor,
|
23 |
-
hidden_ratio=1. / 2,
|
24 |
-
block_cfg=dict(
|
25 |
-
type='ConvWrapper',
|
26 |
-
norm_cfg=dict(type='BN', momentum=0.03, eps=0.001)),
|
27 |
-
block_act_cfg=dict(type='SiLU', inplace=True)),
|
28 |
-
bbox_head=dict(head_module=dict(widen_factor=widen_factor)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/ATang0729/Forecast4Muses/Model/Model6/Model6_2_ProfileRecogition/mmpretrain/configs/_base_/models/resnet152.py
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
# model settings
|
2 |
-
model = dict(
|
3 |
-
type='ImageClassifier',
|
4 |
-
backbone=dict(
|
5 |
-
type='ResNet',
|
6 |
-
depth=152,
|
7 |
-
num_stages=4,
|
8 |
-
out_indices=(3, ),
|
9 |
-
style='pytorch'),
|
10 |
-
neck=dict(type='GlobalAveragePooling'),
|
11 |
-
head=dict(
|
12 |
-
type='LinearClsHead',
|
13 |
-
num_classes=1000,
|
14 |
-
in_channels=2048,
|
15 |
-
loss=dict(type='CrossEntropyLoss', loss_weight=1.0),
|
16 |
-
topk=(1, 5),
|
17 |
-
))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/ATang0729/Forecast4Muses/Model/Model6/Model6_2_ProfileRecogition/mmpretrain/configs/_base_/models/resnet50_cifar_cutmix.py
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
# model settings
|
2 |
-
model = dict(
|
3 |
-
type='ImageClassifier',
|
4 |
-
backbone=dict(
|
5 |
-
type='ResNet_CIFAR',
|
6 |
-
depth=50,
|
7 |
-
num_stages=4,
|
8 |
-
out_indices=(3, ),
|
9 |
-
style='pytorch'),
|
10 |
-
neck=dict(type='GlobalAveragePooling'),
|
11 |
-
head=dict(
|
12 |
-
type='MultiLabelLinearClsHead',
|
13 |
-
num_classes=10,
|
14 |
-
in_channels=2048,
|
15 |
-
loss=dict(type='CrossEntropyLoss', loss_weight=1.0, use_soft=True)),
|
16 |
-
train_cfg=dict(
|
17 |
-
augments=dict(type='BatchCutMix', alpha=1.0, num_classes=10,
|
18 |
-
prob=1.0)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/ATang0729/Forecast4Muses/Model/Model6/Model6_2_ProfileRecogition/mmpretrain/configs/resnet/resnet34_8xb32_in1k.py
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
_base_ = [
|
2 |
-
'../_base_/models/resnet34.py', '../_base_/datasets/imagenet_bs32.py',
|
3 |
-
'../_base_/schedules/imagenet_bs256.py', '../_base_/default_runtime.py'
|
4 |
-
]
|
|
|
|
|
|
|
|
|
|
spaces/AUBMC-AIM/OCTaGAN/app.py
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
import os
|
2 |
-
import gradio as gr
|
3 |
-
from PIL import Image
|
4 |
-
from huggingface_hub import hf_hub_url, cached_download
|
5 |
-
|
6 |
-
|
7 |
-
os.system("git clone https://github.com/AK391/stylegan2-ada-pytorch")
|
8 |
-
|
9 |
-
|
10 |
-
os.chdir("stylegan2-ada-pytorch")
|
11 |
-
|
12 |
-
os.mkdir("outputs")
|
13 |
-
os.mkdir("outputs/images")
|
14 |
-
|
15 |
-
config_file_url = hf_hub_url("AUBMC-AIM/OCTaGAN", filename="OCTaGAN.pkl")
|
16 |
-
cached_file = cached_download(config_file_url)
|
17 |
-
|
18 |
-
def inference(truncation,seeds):
|
19 |
-
os.system("python generate.py --outdir=./outputs/images/ --trunc="+str(truncation)+" --seeds="+str(int(seeds))+" --network="+cached_file)
|
20 |
-
seeds = int(seeds)
|
21 |
-
image = Image.open(f"./outputs/images/seed{seeds:04d}.png")
|
22 |
-
return image
|
23 |
-
|
24 |
-
title = "OCTaGAN"
|
25 |
-
description = "Gradio demo for OCTaGAN. OCTaGAN is a GAN trained on wide-field corneal Optical Coherence Tomography (OCT) scans to generate cornea scans with a variety of pathologies (e.g.keratoconus disease) and surgical procedures (e.g. Implantable Collamer Lens surgery, intrastromal corneal ring segment surgery, and Laser vision correction). OCTaGAN can be used for educational purposes as well as for generating training examples for ML algorithms."
|
26 |
-
|
27 |
-
article = "<p style='text-align: center'><a href='' target='_blank'>OCTaGAN</a><center><a href='https://colab.research.google.com/drive/1vfbvMMkEBIwiuSbuC5pP-hsQr1nBmJXa?usp=sharing' target='_blank'><img src='https://colab.research.google.com/assets/colab-badge.svg' alt='Open In Colab'/></a></center></p><center><img src='https://visitor-badge.glitch.me/badge?page_id=AUBMC-AIM_octogan' alt='visitor badge'></center>"
|
28 |
-
|
29 |
-
|
30 |
-
gr.Interface(inference,[gr.inputs.Slider(label="truncation",minimum=0, maximum=5, step=0.1, default=0.8),gr.inputs.Slider(label="Seed",minimum=0, maximum=1000, step=1, default=0)],"pil",title=title,description=description,article=article, examples=[
|
31 |
-
[0.8,0]
|
32 |
-
]).launch(enable_queue=True,cache_examples=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AUST001/video/README.md
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
---
|
2 |
-
title: Video
|
3 |
-
emoji: 🏃
|
4 |
-
colorFrom: blue
|
5 |
-
colorTo: gray
|
6 |
-
sdk: gradio
|
7 |
-
sdk_version: 3.18.0
|
8 |
-
app_file: app.py
|
9 |
-
pinned: false
|
10 |
-
license: openrail
|
11 |
-
---
|
12 |
-
|
13 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Aditya9790/yolo7-object-tracking/train_aux.py
DELETED
@@ -1,699 +0,0 @@
|
|
1 |
-
import argparse
|
2 |
-
import logging
|
3 |
-
import math
|
4 |
-
import os
|
5 |
-
import random
|
6 |
-
import time
|
7 |
-
from copy import deepcopy
|
8 |
-
from pathlib import Path
|
9 |
-
from threading import Thread
|
10 |
-
|
11 |
-
import numpy as np
|
12 |
-
import torch.distributed as dist
|
13 |
-
import torch.nn as nn
|
14 |
-
import torch.nn.functional as F
|
15 |
-
import torch.optim as optim
|
16 |
-
import torch.optim.lr_scheduler as lr_scheduler
|
17 |
-
import torch.utils.data
|
18 |
-
import yaml
|
19 |
-
from torch.cuda import amp
|
20 |
-
from torch.nn.parallel import DistributedDataParallel as DDP
|
21 |
-
from torch.utils.tensorboard import SummaryWriter
|
22 |
-
from tqdm import tqdm
|
23 |
-
|
24 |
-
import test # import test.py to get mAP after each epoch
|
25 |
-
from models.experimental import attempt_load
|
26 |
-
from models.yolo import Model
|
27 |
-
from utils.autoanchor import check_anchors
|
28 |
-
from utils.datasets import create_dataloader
|
29 |
-
from utils.general import labels_to_class_weights, increment_path, labels_to_image_weights, init_seeds, \
|
30 |
-
fitness, strip_optimizer, get_latest_run, check_dataset, check_file, check_git_status, check_img_size, \
|
31 |
-
check_requirements, print_mutation, set_logging, one_cycle, colorstr
|
32 |
-
from utils.google_utils import attempt_download
|
33 |
-
from utils.loss import ComputeLoss, ComputeLossAuxOTA
|
34 |
-
from utils.plots import plot_images, plot_labels, plot_results, plot_evolution
|
35 |
-
from utils.torch_utils import ModelEMA, select_device, intersect_dicts, torch_distributed_zero_first, is_parallel
|
36 |
-
from utils.wandb_logging.wandb_utils import WandbLogger, check_wandb_resume
|
37 |
-
|
38 |
-
logger = logging.getLogger(__name__)
|
39 |
-
|
40 |
-
|
41 |
-
def train(hyp, opt, device, tb_writer=None):
|
42 |
-
logger.info(colorstr('hyperparameters: ') + ', '.join(f'{k}={v}' for k, v in hyp.items()))
|
43 |
-
save_dir, epochs, batch_size, total_batch_size, weights, rank = \
|
44 |
-
Path(opt.save_dir), opt.epochs, opt.batch_size, opt.total_batch_size, opt.weights, opt.global_rank
|
45 |
-
|
46 |
-
# Directories
|
47 |
-
wdir = save_dir / 'weights'
|
48 |
-
wdir.mkdir(parents=True, exist_ok=True) # make dir
|
49 |
-
last = wdir / 'last.pt'
|
50 |
-
best = wdir / 'best.pt'
|
51 |
-
results_file = save_dir / 'results.txt'
|
52 |
-
|
53 |
-
# Save run settings
|
54 |
-
with open(save_dir / 'hyp.yaml', 'w') as f:
|
55 |
-
yaml.dump(hyp, f, sort_keys=False)
|
56 |
-
with open(save_dir / 'opt.yaml', 'w') as f:
|
57 |
-
yaml.dump(vars(opt), f, sort_keys=False)
|
58 |
-
|
59 |
-
# Configure
|
60 |
-
plots = not opt.evolve # create plots
|
61 |
-
cuda = device.type != 'cpu'
|
62 |
-
init_seeds(2 + rank)
|
63 |
-
with open(opt.data) as f:
|
64 |
-
data_dict = yaml.load(f, Loader=yaml.SafeLoader) # data dict
|
65 |
-
is_coco = opt.data.endswith('coco.yaml')
|
66 |
-
|
67 |
-
# Logging- Doing this before checking the dataset. Might update data_dict
|
68 |
-
loggers = {'wandb': None} # loggers dict
|
69 |
-
if rank in [-1, 0]:
|
70 |
-
opt.hyp = hyp # add hyperparameters
|
71 |
-
run_id = torch.load(weights).get('wandb_id') if weights.endswith('.pt') and os.path.isfile(weights) else None
|
72 |
-
wandb_logger = WandbLogger(opt, Path(opt.save_dir).stem, run_id, data_dict)
|
73 |
-
loggers['wandb'] = wandb_logger.wandb
|
74 |
-
data_dict = wandb_logger.data_dict
|
75 |
-
if wandb_logger.wandb:
|
76 |
-
weights, epochs, hyp = opt.weights, opt.epochs, opt.hyp # WandbLogger might update weights, epochs if resuming
|
77 |
-
|
78 |
-
nc = 1 if opt.single_cls else int(data_dict['nc']) # number of classes
|
79 |
-
names = ['item'] if opt.single_cls and len(data_dict['names']) != 1 else data_dict['names'] # class names
|
80 |
-
assert len(names) == nc, '%g names found for nc=%g dataset in %s' % (len(names), nc, opt.data) # check
|
81 |
-
|
82 |
-
# Model
|
83 |
-
pretrained = weights.endswith('.pt')
|
84 |
-
if pretrained:
|
85 |
-
with torch_distributed_zero_first(rank):
|
86 |
-
attempt_download(weights) # download if not found locally
|
87 |
-
ckpt = torch.load(weights, map_location=device) # load checkpoint
|
88 |
-
model = Model(opt.cfg or ckpt['model'].yaml, ch=3, nc=nc, anchors=hyp.get('anchors')).to(device) # create
|
89 |
-
exclude = ['anchor'] if (opt.cfg or hyp.get('anchors')) and not opt.resume else [] # exclude keys
|
90 |
-
state_dict = ckpt['model'].float().state_dict() # to FP32
|
91 |
-
state_dict = intersect_dicts(state_dict, model.state_dict(), exclude=exclude) # intersect
|
92 |
-
model.load_state_dict(state_dict, strict=False) # load
|
93 |
-
logger.info('Transferred %g/%g items from %s' % (len(state_dict), len(model.state_dict()), weights)) # report
|
94 |
-
else:
|
95 |
-
model = Model(opt.cfg, ch=3, nc=nc, anchors=hyp.get('anchors')).to(device) # create
|
96 |
-
with torch_distributed_zero_first(rank):
|
97 |
-
check_dataset(data_dict) # check
|
98 |
-
train_path = data_dict['train']
|
99 |
-
test_path = data_dict['val']
|
100 |
-
|
101 |
-
# Freeze
|
102 |
-
freeze = [] # parameter names to freeze (full or partial)
|
103 |
-
for k, v in model.named_parameters():
|
104 |
-
v.requires_grad = True # train all layers
|
105 |
-
if any(x in k for x in freeze):
|
106 |
-
print('freezing %s' % k)
|
107 |
-
v.requires_grad = False
|
108 |
-
|
109 |
-
# Optimizer
|
110 |
-
nbs = 64 # nominal batch size
|
111 |
-
accumulate = max(round(nbs / total_batch_size), 1) # accumulate loss before optimizing
|
112 |
-
hyp['weight_decay'] *= total_batch_size * accumulate / nbs # scale weight_decay
|
113 |
-
logger.info(f"Scaled weight_decay = {hyp['weight_decay']}")
|
114 |
-
|
115 |
-
pg0, pg1, pg2 = [], [], [] # optimizer parameter groups
|
116 |
-
for k, v in model.named_modules():
|
117 |
-
if hasattr(v, 'bias') and isinstance(v.bias, nn.Parameter):
|
118 |
-
pg2.append(v.bias) # biases
|
119 |
-
if isinstance(v, nn.BatchNorm2d):
|
120 |
-
pg0.append(v.weight) # no decay
|
121 |
-
elif hasattr(v, 'weight') and isinstance(v.weight, nn.Parameter):
|
122 |
-
pg1.append(v.weight) # apply decay
|
123 |
-
if hasattr(v, 'im'):
|
124 |
-
if hasattr(v.im, 'implicit'):
|
125 |
-
pg0.append(v.im.implicit)
|
126 |
-
else:
|
127 |
-
for iv in v.im:
|
128 |
-
pg0.append(iv.implicit)
|
129 |
-
if hasattr(v, 'imc'):
|
130 |
-
if hasattr(v.imc, 'implicit'):
|
131 |
-
pg0.append(v.imc.implicit)
|
132 |
-
else:
|
133 |
-
for iv in v.imc:
|
134 |
-
pg0.append(iv.implicit)
|
135 |
-
if hasattr(v, 'imb'):
|
136 |
-
if hasattr(v.imb, 'implicit'):
|
137 |
-
pg0.append(v.imb.implicit)
|
138 |
-
else:
|
139 |
-
for iv in v.imb:
|
140 |
-
pg0.append(iv.implicit)
|
141 |
-
if hasattr(v, 'imo'):
|
142 |
-
if hasattr(v.imo, 'implicit'):
|
143 |
-
pg0.append(v.imo.implicit)
|
144 |
-
else:
|
145 |
-
for iv in v.imo:
|
146 |
-
pg0.append(iv.implicit)
|
147 |
-
if hasattr(v, 'ia'):
|
148 |
-
if hasattr(v.ia, 'implicit'):
|
149 |
-
pg0.append(v.ia.implicit)
|
150 |
-
else:
|
151 |
-
for iv in v.ia:
|
152 |
-
pg0.append(iv.implicit)
|
153 |
-
if hasattr(v, 'attn'):
|
154 |
-
if hasattr(v.attn, 'logit_scale'):
|
155 |
-
pg0.append(v.attn.logit_scale)
|
156 |
-
if hasattr(v.attn, 'q_bias'):
|
157 |
-
pg0.append(v.attn.q_bias)
|
158 |
-
if hasattr(v.attn, 'v_bias'):
|
159 |
-
pg0.append(v.attn.v_bias)
|
160 |
-
if hasattr(v.attn, 'relative_position_bias_table'):
|
161 |
-
pg0.append(v.attn.relative_position_bias_table)
|
162 |
-
if hasattr(v, 'rbr_dense'):
|
163 |
-
if hasattr(v.rbr_dense, 'weight_rbr_origin'):
|
164 |
-
pg0.append(v.rbr_dense.weight_rbr_origin)
|
165 |
-
if hasattr(v.rbr_dense, 'weight_rbr_avg_conv'):
|
166 |
-
pg0.append(v.rbr_dense.weight_rbr_avg_conv)
|
167 |
-
if hasattr(v.rbr_dense, 'weight_rbr_pfir_conv'):
|
168 |
-
pg0.append(v.rbr_dense.weight_rbr_pfir_conv)
|
169 |
-
if hasattr(v.rbr_dense, 'weight_rbr_1x1_kxk_idconv1'):
|
170 |
-
pg0.append(v.rbr_dense.weight_rbr_1x1_kxk_idconv1)
|
171 |
-
if hasattr(v.rbr_dense, 'weight_rbr_1x1_kxk_conv2'):
|
172 |
-
pg0.append(v.rbr_dense.weight_rbr_1x1_kxk_conv2)
|
173 |
-
if hasattr(v.rbr_dense, 'weight_rbr_gconv_dw'):
|
174 |
-
pg0.append(v.rbr_dense.weight_rbr_gconv_dw)
|
175 |
-
if hasattr(v.rbr_dense, 'weight_rbr_gconv_pw'):
|
176 |
-
pg0.append(v.rbr_dense.weight_rbr_gconv_pw)
|
177 |
-
if hasattr(v.rbr_dense, 'vector'):
|
178 |
-
pg0.append(v.rbr_dense.vector)
|
179 |
-
|
180 |
-
if opt.adam:
|
181 |
-
optimizer = optim.Adam(pg0, lr=hyp['lr0'], betas=(hyp['momentum'], 0.999)) # adjust beta1 to momentum
|
182 |
-
else:
|
183 |
-
optimizer = optim.SGD(pg0, lr=hyp['lr0'], momentum=hyp['momentum'], nesterov=True)
|
184 |
-
|
185 |
-
optimizer.add_param_group({'params': pg1, 'weight_decay': hyp['weight_decay']}) # add pg1 with weight_decay
|
186 |
-
optimizer.add_param_group({'params': pg2}) # add pg2 (biases)
|
187 |
-
logger.info('Optimizer groups: %g .bias, %g conv.weight, %g other' % (len(pg2), len(pg1), len(pg0)))
|
188 |
-
del pg0, pg1, pg2
|
189 |
-
|
190 |
-
# Scheduler https://arxiv.org/pdf/1812.01187.pdf
|
191 |
-
# https://pytorch.org/docs/stable/_modules/torch/optim/lr_scheduler.html#OneCycleLR
|
192 |
-
if opt.linear_lr:
|
193 |
-
lf = lambda x: (1 - x / (epochs - 1)) * (1.0 - hyp['lrf']) + hyp['lrf'] # linear
|
194 |
-
else:
|
195 |
-
lf = one_cycle(1, hyp['lrf'], epochs) # cosine 1->hyp['lrf']
|
196 |
-
scheduler = lr_scheduler.LambdaLR(optimizer, lr_lambda=lf)
|
197 |
-
# plot_lr_scheduler(optimizer, scheduler, epochs)
|
198 |
-
|
199 |
-
# EMA
|
200 |
-
ema = ModelEMA(model) if rank in [-1, 0] else None
|
201 |
-
|
202 |
-
# Resume
|
203 |
-
start_epoch, best_fitness = 0, 0.0
|
204 |
-
if pretrained:
|
205 |
-
# Optimizer
|
206 |
-
if ckpt['optimizer'] is not None:
|
207 |
-
optimizer.load_state_dict(ckpt['optimizer'])
|
208 |
-
best_fitness = ckpt['best_fitness']
|
209 |
-
|
210 |
-
# EMA
|
211 |
-
if ema and ckpt.get('ema'):
|
212 |
-
ema.ema.load_state_dict(ckpt['ema'].float().state_dict())
|
213 |
-
ema.updates = ckpt['updates']
|
214 |
-
|
215 |
-
# Results
|
216 |
-
if ckpt.get('training_results') is not None:
|
217 |
-
results_file.write_text(ckpt['training_results']) # write results.txt
|
218 |
-
|
219 |
-
# Epochs
|
220 |
-
start_epoch = ckpt['epoch'] + 1
|
221 |
-
if opt.resume:
|
222 |
-
assert start_epoch > 0, '%s training to %g epochs is finished, nothing to resume.' % (weights, epochs)
|
223 |
-
if epochs < start_epoch:
|
224 |
-
logger.info('%s has been trained for %g epochs. Fine-tuning for %g additional epochs.' %
|
225 |
-
(weights, ckpt['epoch'], epochs))
|
226 |
-
epochs += ckpt['epoch'] # finetune additional epochs
|
227 |
-
|
228 |
-
del ckpt, state_dict
|
229 |
-
|
230 |
-
# Image sizes
|
231 |
-
gs = max(int(model.stride.max()), 32) # grid size (max stride)
|
232 |
-
nl = model.model[-1].nl # number of detection layers (used for scaling hyp['obj'])
|
233 |
-
imgsz, imgsz_test = [check_img_size(x, gs) for x in opt.img_size] # verify imgsz are gs-multiples
|
234 |
-
|
235 |
-
# DP mode
|
236 |
-
if cuda and rank == -1 and torch.cuda.device_count() > 1:
|
237 |
-
model = torch.nn.DataParallel(model)
|
238 |
-
|
239 |
-
# SyncBatchNorm
|
240 |
-
if opt.sync_bn and cuda and rank != -1:
|
241 |
-
model = torch.nn.SyncBatchNorm.convert_sync_batchnorm(model).to(device)
|
242 |
-
logger.info('Using SyncBatchNorm()')
|
243 |
-
|
244 |
-
# Trainloader
|
245 |
-
dataloader, dataset = create_dataloader(train_path, imgsz, batch_size, gs, opt,
|
246 |
-
hyp=hyp, augment=True, cache=opt.cache_images, rect=opt.rect, rank=rank,
|
247 |
-
world_size=opt.world_size, workers=opt.workers,
|
248 |
-
image_weights=opt.image_weights, quad=opt.quad, prefix=colorstr('train: '))
|
249 |
-
mlc = np.concatenate(dataset.labels, 0)[:, 0].max() # max label class
|
250 |
-
nb = len(dataloader) # number of batches
|
251 |
-
assert mlc < nc, 'Label class %g exceeds nc=%g in %s. Possible class labels are 0-%g' % (mlc, nc, opt.data, nc - 1)
|
252 |
-
|
253 |
-
# Process 0
|
254 |
-
if rank in [-1, 0]:
|
255 |
-
testloader = create_dataloader(test_path, imgsz_test, batch_size * 2, gs, opt, # testloader
|
256 |
-
hyp=hyp, cache=opt.cache_images and not opt.notest, rect=True, rank=-1,
|
257 |
-
world_size=opt.world_size, workers=opt.workers,
|
258 |
-
pad=0.5, prefix=colorstr('val: '))[0]
|
259 |
-
|
260 |
-
if not opt.resume:
|
261 |
-
labels = np.concatenate(dataset.labels, 0)
|
262 |
-
c = torch.tensor(labels[:, 0]) # classes
|
263 |
-
# cf = torch.bincount(c.long(), minlength=nc) + 1. # frequency
|
264 |
-
# model._initialize_biases(cf.to(device))
|
265 |
-
if plots:
|
266 |
-
#plot_labels(labels, names, save_dir, loggers)
|
267 |
-
if tb_writer:
|
268 |
-
tb_writer.add_histogram('classes', c, 0)
|
269 |
-
|
270 |
-
# Anchors
|
271 |
-
if not opt.noautoanchor:
|
272 |
-
check_anchors(dataset, model=model, thr=hyp['anchor_t'], imgsz=imgsz)
|
273 |
-
model.half().float() # pre-reduce anchor precision
|
274 |
-
|
275 |
-
# DDP mode
|
276 |
-
if cuda and rank != -1:
|
277 |
-
model = DDP(model, device_ids=[opt.local_rank], output_device=opt.local_rank,
|
278 |
-
# nn.MultiheadAttention incompatibility with DDP https://github.com/pytorch/pytorch/issues/26698
|
279 |
-
find_unused_parameters=any(isinstance(layer, nn.MultiheadAttention) for layer in model.modules()))
|
280 |
-
|
281 |
-
# Model parameters
|
282 |
-
hyp['box'] *= 3. / nl # scale to layers
|
283 |
-
hyp['cls'] *= nc / 80. * 3. / nl # scale to classes and layers
|
284 |
-
hyp['obj'] *= (imgsz / 640) ** 2 * 3. / nl # scale to image size and layers
|
285 |
-
hyp['label_smoothing'] = opt.label_smoothing
|
286 |
-
model.nc = nc # attach number of classes to model
|
287 |
-
model.hyp = hyp # attach hyperparameters to model
|
288 |
-
model.gr = 1.0 # iou loss ratio (obj_loss = 1.0 or iou)
|
289 |
-
model.class_weights = labels_to_class_weights(dataset.labels, nc).to(device) * nc # attach class weights
|
290 |
-
model.names = names
|
291 |
-
|
292 |
-
# Start training
|
293 |
-
t0 = time.time()
|
294 |
-
nw = max(round(hyp['warmup_epochs'] * nb), 1000) # number of warmup iterations, max(3 epochs, 1k iterations)
|
295 |
-
# nw = min(nw, (epochs - start_epoch) / 2 * nb) # limit warmup to < 1/2 of training
|
296 |
-
maps = np.zeros(nc) # mAP per class
|
297 |
-
results = (0, 0, 0, 0, 0, 0, 0) # P, R, [email protected], [email protected], val_loss(box, obj, cls)
|
298 |
-
scheduler.last_epoch = start_epoch - 1 # do not move
|
299 |
-
scaler = amp.GradScaler(enabled=cuda)
|
300 |
-
compute_loss_ota = ComputeLossAuxOTA(model) # init loss class
|
301 |
-
compute_loss = ComputeLoss(model) # init loss class
|
302 |
-
logger.info(f'Image sizes {imgsz} train, {imgsz_test} test\n'
|
303 |
-
f'Using {dataloader.num_workers} dataloader workers\n'
|
304 |
-
f'Logging results to {save_dir}\n'
|
305 |
-
f'Starting training for {epochs} epochs...')
|
306 |
-
torch.save(model, wdir / 'init.pt')
|
307 |
-
for epoch in range(start_epoch, epochs): # epoch ------------------------------------------------------------------
|
308 |
-
model.train()
|
309 |
-
|
310 |
-
# Update image weights (optional)
|
311 |
-
if opt.image_weights:
|
312 |
-
# Generate indices
|
313 |
-
if rank in [-1, 0]:
|
314 |
-
cw = model.class_weights.cpu().numpy() * (1 - maps) ** 2 / nc # class weights
|
315 |
-
iw = labels_to_image_weights(dataset.labels, nc=nc, class_weights=cw) # image weights
|
316 |
-
dataset.indices = random.choices(range(dataset.n), weights=iw, k=dataset.n) # rand weighted idx
|
317 |
-
# Broadcast if DDP
|
318 |
-
if rank != -1:
|
319 |
-
indices = (torch.tensor(dataset.indices) if rank == 0 else torch.zeros(dataset.n)).int()
|
320 |
-
dist.broadcast(indices, 0)
|
321 |
-
if rank != 0:
|
322 |
-
dataset.indices = indices.cpu().numpy()
|
323 |
-
|
324 |
-
# Update mosaic border
|
325 |
-
# b = int(random.uniform(0.25 * imgsz, 0.75 * imgsz + gs) // gs * gs)
|
326 |
-
# dataset.mosaic_border = [b - imgsz, -b] # height, width borders
|
327 |
-
|
328 |
-
mloss = torch.zeros(4, device=device) # mean losses
|
329 |
-
if rank != -1:
|
330 |
-
dataloader.sampler.set_epoch(epoch)
|
331 |
-
pbar = enumerate(dataloader)
|
332 |
-
logger.info(('\n' + '%10s' * 8) % ('Epoch', 'gpu_mem', 'box', 'obj', 'cls', 'total', 'labels', 'img_size'))
|
333 |
-
if rank in [-1, 0]:
|
334 |
-
pbar = tqdm(pbar, total=nb) # progress bar
|
335 |
-
optimizer.zero_grad()
|
336 |
-
for i, (imgs, targets, paths, _) in pbar: # batch -------------------------------------------------------------
|
337 |
-
ni = i + nb * epoch # number integrated batches (since train start)
|
338 |
-
imgs = imgs.to(device, non_blocking=True).float() / 255.0 # uint8 to float32, 0-255 to 0.0-1.0
|
339 |
-
|
340 |
-
# Warmup
|
341 |
-
if ni <= nw:
|
342 |
-
xi = [0, nw] # x interp
|
343 |
-
# model.gr = np.interp(ni, xi, [0.0, 1.0]) # iou loss ratio (obj_loss = 1.0 or iou)
|
344 |
-
accumulate = max(1, np.interp(ni, xi, [1, nbs / total_batch_size]).round())
|
345 |
-
for j, x in enumerate(optimizer.param_groups):
|
346 |
-
# bias lr falls from 0.1 to lr0, all other lrs rise from 0.0 to lr0
|
347 |
-
x['lr'] = np.interp(ni, xi, [hyp['warmup_bias_lr'] if j == 2 else 0.0, x['initial_lr'] * lf(epoch)])
|
348 |
-
if 'momentum' in x:
|
349 |
-
x['momentum'] = np.interp(ni, xi, [hyp['warmup_momentum'], hyp['momentum']])
|
350 |
-
|
351 |
-
# Multi-scale
|
352 |
-
if opt.multi_scale:
|
353 |
-
sz = random.randrange(imgsz * 0.5, imgsz * 1.5 + gs) // gs * gs # size
|
354 |
-
sf = sz / max(imgs.shape[2:]) # scale factor
|
355 |
-
if sf != 1:
|
356 |
-
ns = [math.ceil(x * sf / gs) * gs for x in imgs.shape[2:]] # new shape (stretched to gs-multiple)
|
357 |
-
imgs = F.interpolate(imgs, size=ns, mode='bilinear', align_corners=False)
|
358 |
-
|
359 |
-
# Forward
|
360 |
-
with amp.autocast(enabled=cuda):
|
361 |
-
pred = model(imgs) # forward
|
362 |
-
loss, loss_items = compute_loss_ota(pred, targets.to(device), imgs) # loss scaled by batch_size
|
363 |
-
if rank != -1:
|
364 |
-
loss *= opt.world_size # gradient averaged between devices in DDP mode
|
365 |
-
if opt.quad:
|
366 |
-
loss *= 4.
|
367 |
-
|
368 |
-
# Backward
|
369 |
-
scaler.scale(loss).backward()
|
370 |
-
|
371 |
-
# Optimize
|
372 |
-
if ni % accumulate == 0:
|
373 |
-
scaler.step(optimizer) # optimizer.step
|
374 |
-
scaler.update()
|
375 |
-
optimizer.zero_grad()
|
376 |
-
if ema:
|
377 |
-
ema.update(model)
|
378 |
-
|
379 |
-
# Print
|
380 |
-
if rank in [-1, 0]:
|
381 |
-
mloss = (mloss * i + loss_items) / (i + 1) # update mean losses
|
382 |
-
mem = '%.3gG' % (torch.cuda.memory_reserved() / 1E9 if torch.cuda.is_available() else 0) # (GB)
|
383 |
-
s = ('%10s' * 2 + '%10.4g' * 6) % (
|
384 |
-
'%g/%g' % (epoch, epochs - 1), mem, *mloss, targets.shape[0], imgs.shape[-1])
|
385 |
-
pbar.set_description(s)
|
386 |
-
|
387 |
-
# Plot
|
388 |
-
if plots and ni < 10:
|
389 |
-
f = save_dir / f'train_batch{ni}.jpg' # filename
|
390 |
-
Thread(target=plot_images, args=(imgs, targets, paths, f), daemon=True).start()
|
391 |
-
# if tb_writer:
|
392 |
-
# tb_writer.add_image(f, result, dataformats='HWC', global_step=epoch)
|
393 |
-
# tb_writer.add_graph(torch.jit.trace(model, imgs, strict=False), []) # add model graph
|
394 |
-
elif plots and ni == 10 and wandb_logger.wandb:
|
395 |
-
wandb_logger.log({"Mosaics": [wandb_logger.wandb.Image(str(x), caption=x.name) for x in
|
396 |
-
save_dir.glob('train*.jpg') if x.exists()]})
|
397 |
-
|
398 |
-
# end batch ------------------------------------------------------------------------------------------------
|
399 |
-
# end epoch ----------------------------------------------------------------------------------------------------
|
400 |
-
|
401 |
-
# Scheduler
|
402 |
-
lr = [x['lr'] for x in optimizer.param_groups] # for tensorboard
|
403 |
-
scheduler.step()
|
404 |
-
|
405 |
-
# DDP process 0 or single-GPU
|
406 |
-
if rank in [-1, 0]:
|
407 |
-
# mAP
|
408 |
-
ema.update_attr(model, include=['yaml', 'nc', 'hyp', 'gr', 'names', 'stride', 'class_weights'])
|
409 |
-
final_epoch = epoch + 1 == epochs
|
410 |
-
if not opt.notest or final_epoch: # Calculate mAP
|
411 |
-
wandb_logger.current_epoch = epoch + 1
|
412 |
-
results, maps, times = test.test(data_dict,
|
413 |
-
batch_size=batch_size * 2,
|
414 |
-
imgsz=imgsz_test,
|
415 |
-
model=ema.ema,
|
416 |
-
single_cls=opt.single_cls,
|
417 |
-
dataloader=testloader,
|
418 |
-
save_dir=save_dir,
|
419 |
-
verbose=nc < 50 and final_epoch,
|
420 |
-
plots=plots and final_epoch,
|
421 |
-
wandb_logger=wandb_logger,
|
422 |
-
compute_loss=compute_loss,
|
423 |
-
is_coco=is_coco,
|
424 |
-
v5_metric=opt.v5_metric)
|
425 |
-
|
426 |
-
# Write
|
427 |
-
with open(results_file, 'a') as f:
|
428 |
-
f.write(s + '%10.4g' * 7 % results + '\n') # append metrics, val_loss
|
429 |
-
if len(opt.name) and opt.bucket:
|
430 |
-
os.system('gsutil cp %s gs://%s/results/results%s.txt' % (results_file, opt.bucket, opt.name))
|
431 |
-
|
432 |
-
# Log
|
433 |
-
tags = ['train/box_loss', 'train/obj_loss', 'train/cls_loss', # train loss
|
434 |
-
'metrics/precision', 'metrics/recall', 'metrics/mAP_0.5', 'metrics/mAP_0.5:0.95',
|
435 |
-
'val/box_loss', 'val/obj_loss', 'val/cls_loss', # val loss
|
436 |
-
'x/lr0', 'x/lr1', 'x/lr2'] # params
|
437 |
-
for x, tag in zip(list(mloss[:-1]) + list(results) + lr, tags):
|
438 |
-
if tb_writer:
|
439 |
-
tb_writer.add_scalar(tag, x, epoch) # tensorboard
|
440 |
-
if wandb_logger.wandb:
|
441 |
-
wandb_logger.log({tag: x}) # W&B
|
442 |
-
|
443 |
-
# Update best mAP
|
444 |
-
fi = fitness(np.array(results).reshape(1, -1)) # weighted combination of [P, R, [email protected], [email protected]]
|
445 |
-
if fi > best_fitness:
|
446 |
-
best_fitness = fi
|
447 |
-
wandb_logger.end_epoch(best_result=best_fitness == fi)
|
448 |
-
|
449 |
-
# Save model
|
450 |
-
if (not opt.nosave) or (final_epoch and not opt.evolve): # if save
|
451 |
-
ckpt = {'epoch': epoch,
|
452 |
-
'best_fitness': best_fitness,
|
453 |
-
'training_results': results_file.read_text(),
|
454 |
-
'model': deepcopy(model.module if is_parallel(model) else model).half(),
|
455 |
-
'ema': deepcopy(ema.ema).half(),
|
456 |
-
'updates': ema.updates,
|
457 |
-
'optimizer': optimizer.state_dict(),
|
458 |
-
'wandb_id': wandb_logger.wandb_run.id if wandb_logger.wandb else None}
|
459 |
-
|
460 |
-
# Save last, best and delete
|
461 |
-
torch.save(ckpt, last)
|
462 |
-
if best_fitness == fi:
|
463 |
-
torch.save(ckpt, best)
|
464 |
-
if (best_fitness == fi) and (epoch >= 200):
|
465 |
-
torch.save(ckpt, wdir / 'best_{:03d}.pt'.format(epoch))
|
466 |
-
if epoch == 0:
|
467 |
-
torch.save(ckpt, wdir / 'epoch_{:03d}.pt'.format(epoch))
|
468 |
-
elif ((epoch+1) % 25) == 0:
|
469 |
-
torch.save(ckpt, wdir / 'epoch_{:03d}.pt'.format(epoch))
|
470 |
-
elif epoch >= (epochs-5):
|
471 |
-
torch.save(ckpt, wdir / 'epoch_{:03d}.pt'.format(epoch))
|
472 |
-
if wandb_logger.wandb:
|
473 |
-
if ((epoch + 1) % opt.save_period == 0 and not final_epoch) and opt.save_period != -1:
|
474 |
-
wandb_logger.log_model(
|
475 |
-
last.parent, opt, epoch, fi, best_model=best_fitness == fi)
|
476 |
-
del ckpt
|
477 |
-
|
478 |
-
# end epoch ----------------------------------------------------------------------------------------------------
|
479 |
-
# end training
|
480 |
-
if rank in [-1, 0]:
|
481 |
-
# Plots
|
482 |
-
if plots:
|
483 |
-
plot_results(save_dir=save_dir) # save as results.png
|
484 |
-
if wandb_logger.wandb:
|
485 |
-
files = ['results.png', 'confusion_matrix.png', *[f'{x}_curve.png' for x in ('F1', 'PR', 'P', 'R')]]
|
486 |
-
wandb_logger.log({"Results": [wandb_logger.wandb.Image(str(save_dir / f), caption=f) for f in files
|
487 |
-
if (save_dir / f).exists()]})
|
488 |
-
# Test best.pt
|
489 |
-
logger.info('%g epochs completed in %.3f hours.\n' % (epoch - start_epoch + 1, (time.time() - t0) / 3600))
|
490 |
-
if opt.data.endswith('coco.yaml') and nc == 80: # if COCO
|
491 |
-
for m in (last, best) if best.exists() else (last): # speed, mAP tests
|
492 |
-
results, _, _ = test.test(opt.data,
|
493 |
-
batch_size=batch_size * 2,
|
494 |
-
imgsz=imgsz_test,
|
495 |
-
conf_thres=0.001,
|
496 |
-
iou_thres=0.7,
|
497 |
-
model=attempt_load(m, device).half(),
|
498 |
-
single_cls=opt.single_cls,
|
499 |
-
dataloader=testloader,
|
500 |
-
save_dir=save_dir,
|
501 |
-
save_json=True,
|
502 |
-
plots=False,
|
503 |
-
is_coco=is_coco,
|
504 |
-
v5_metric=opt.v5_metric)
|
505 |
-
|
506 |
-
# Strip optimizers
|
507 |
-
final = best if best.exists() else last # final model
|
508 |
-
for f in last, best:
|
509 |
-
if f.exists():
|
510 |
-
strip_optimizer(f) # strip optimizers
|
511 |
-
if opt.bucket:
|
512 |
-
os.system(f'gsutil cp {final} gs://{opt.bucket}/weights') # upload
|
513 |
-
if wandb_logger.wandb and not opt.evolve: # Log the stripped model
|
514 |
-
wandb_logger.wandb.log_artifact(str(final), type='model',
|
515 |
-
name='run_' + wandb_logger.wandb_run.id + '_model',
|
516 |
-
aliases=['last', 'best', 'stripped'])
|
517 |
-
wandb_logger.finish_run()
|
518 |
-
else:
|
519 |
-
dist.destroy_process_group()
|
520 |
-
torch.cuda.empty_cache()
|
521 |
-
return results
|
522 |
-
|
523 |
-
|
524 |
-
if __name__ == '__main__':
|
525 |
-
parser = argparse.ArgumentParser()
|
526 |
-
parser.add_argument('--weights', type=str, default='yolo7.pt', help='initial weights path')
|
527 |
-
parser.add_argument('--cfg', type=str, default='', help='model.yaml path')
|
528 |
-
parser.add_argument('--data', type=str, default='data/coco.yaml', help='data.yaml path')
|
529 |
-
parser.add_argument('--hyp', type=str, default='data/hyp.scratch.p5.yaml', help='hyperparameters path')
|
530 |
-
parser.add_argument('--epochs', type=int, default=300)
|
531 |
-
parser.add_argument('--batch-size', type=int, default=16, help='total batch size for all GPUs')
|
532 |
-
parser.add_argument('--img-size', nargs='+', type=int, default=[640, 640], help='[train, test] image sizes')
|
533 |
-
parser.add_argument('--rect', action='store_true', help='rectangular training')
|
534 |
-
parser.add_argument('--resume', nargs='?', const=True, default=False, help='resume most recent training')
|
535 |
-
parser.add_argument('--nosave', action='store_true', help='only save final checkpoint')
|
536 |
-
parser.add_argument('--notest', action='store_true', help='only test final epoch')
|
537 |
-
parser.add_argument('--noautoanchor', action='store_true', help='disable autoanchor check')
|
538 |
-
parser.add_argument('--evolve', action='store_true', help='evolve hyperparameters')
|
539 |
-
parser.add_argument('--bucket', type=str, default='', help='gsutil bucket')
|
540 |
-
parser.add_argument('--cache-images', action='store_true', help='cache images for faster training')
|
541 |
-
parser.add_argument('--image-weights', action='store_true', help='use weighted image selection for training')
|
542 |
-
parser.add_argument('--device', default='', help='cuda device, i.e. 0 or 0,1,2,3 or cpu')
|
543 |
-
parser.add_argument('--multi-scale', action='store_true', help='vary img-size +/- 50%%')
|
544 |
-
parser.add_argument('--single-cls', action='store_true', help='train multi-class data as single-class')
|
545 |
-
parser.add_argument('--adam', action='store_true', help='use torch.optim.Adam() optimizer')
|
546 |
-
parser.add_argument('--sync-bn', action='store_true', help='use SyncBatchNorm, only available in DDP mode')
|
547 |
-
parser.add_argument('--local_rank', type=int, default=-1, help='DDP parameter, do not modify')
|
548 |
-
parser.add_argument('--workers', type=int, default=8, help='maximum number of dataloader workers')
|
549 |
-
parser.add_argument('--project', default='runs/train', help='save to project/name')
|
550 |
-
parser.add_argument('--entity', default=None, help='W&B entity')
|
551 |
-
parser.add_argument('--name', default='exp', help='save to project/name')
|
552 |
-
parser.add_argument('--exist-ok', action='store_true', help='existing project/name ok, do not increment')
|
553 |
-
parser.add_argument('--quad', action='store_true', help='quad dataloader')
|
554 |
-
parser.add_argument('--linear-lr', action='store_true', help='linear LR')
|
555 |
-
parser.add_argument('--label-smoothing', type=float, default=0.0, help='Label smoothing epsilon')
|
556 |
-
parser.add_argument('--upload_dataset', action='store_true', help='Upload dataset as W&B artifact table')
|
557 |
-
parser.add_argument('--bbox_interval', type=int, default=-1, help='Set bounding-box image logging interval for W&B')
|
558 |
-
parser.add_argument('--save_period', type=int, default=-1, help='Log model after every "save_period" epoch')
|
559 |
-
parser.add_argument('--artifact_alias', type=str, default="latest", help='version of dataset artifact to be used')
|
560 |
-
parser.add_argument('--v5-metric', action='store_true', help='assume maximum recall as 1.0 in AP calculation')
|
561 |
-
opt = parser.parse_args()
|
562 |
-
|
563 |
-
# Set DDP variables
|
564 |
-
opt.world_size = int(os.environ['WORLD_SIZE']) if 'WORLD_SIZE' in os.environ else 1
|
565 |
-
opt.global_rank = int(os.environ['RANK']) if 'RANK' in os.environ else -1
|
566 |
-
set_logging(opt.global_rank)
|
567 |
-
#if opt.global_rank in [-1, 0]:
|
568 |
-
# check_git_status()
|
569 |
-
# check_requirements()
|
570 |
-
|
571 |
-
# Resume
|
572 |
-
wandb_run = check_wandb_resume(opt)
|
573 |
-
if opt.resume and not wandb_run: # resume an interrupted run
|
574 |
-
ckpt = opt.resume if isinstance(opt.resume, str) else get_latest_run() # specified or most recent path
|
575 |
-
assert os.path.isfile(ckpt), 'ERROR: --resume checkpoint does not exist'
|
576 |
-
apriori = opt.global_rank, opt.local_rank
|
577 |
-
with open(Path(ckpt).parent.parent / 'opt.yaml') as f:
|
578 |
-
opt = argparse.Namespace(**yaml.load(f, Loader=yaml.SafeLoader)) # replace
|
579 |
-
opt.cfg, opt.weights, opt.resume, opt.batch_size, opt.global_rank, opt.local_rank = '', ckpt, True, opt.total_batch_size, *apriori # reinstate
|
580 |
-
logger.info('Resuming training from %s' % ckpt)
|
581 |
-
else:
|
582 |
-
# opt.hyp = opt.hyp or ('hyp.finetune.yaml' if opt.weights else 'hyp.scratch.yaml')
|
583 |
-
opt.data, opt.cfg, opt.hyp = check_file(opt.data), check_file(opt.cfg), check_file(opt.hyp) # check files
|
584 |
-
assert len(opt.cfg) or len(opt.weights), 'either --cfg or --weights must be specified'
|
585 |
-
opt.img_size.extend([opt.img_size[-1]] * (2 - len(opt.img_size))) # extend to 2 sizes (train, test)
|
586 |
-
opt.name = 'evolve' if opt.evolve else opt.name
|
587 |
-
opt.save_dir = increment_path(Path(opt.project) / opt.name, exist_ok=opt.exist_ok | opt.evolve) # increment run
|
588 |
-
|
589 |
-
# DDP mode
|
590 |
-
opt.total_batch_size = opt.batch_size
|
591 |
-
device = select_device(opt.device, batch_size=opt.batch_size)
|
592 |
-
if opt.local_rank != -1:
|
593 |
-
assert torch.cuda.device_count() > opt.local_rank
|
594 |
-
torch.cuda.set_device(opt.local_rank)
|
595 |
-
device = torch.device('cuda', opt.local_rank)
|
596 |
-
dist.init_process_group(backend='nccl', init_method='env://') # distributed backend
|
597 |
-
assert opt.batch_size % opt.world_size == 0, '--batch-size must be multiple of CUDA device count'
|
598 |
-
opt.batch_size = opt.total_batch_size // opt.world_size
|
599 |
-
|
600 |
-
# Hyperparameters
|
601 |
-
with open(opt.hyp) as f:
|
602 |
-
hyp = yaml.load(f, Loader=yaml.SafeLoader) # load hyps
|
603 |
-
|
604 |
-
# Train
|
605 |
-
logger.info(opt)
|
606 |
-
if not opt.evolve:
|
607 |
-
tb_writer = None # init loggers
|
608 |
-
if opt.global_rank in [-1, 0]:
|
609 |
-
prefix = colorstr('tensorboard: ')
|
610 |
-
logger.info(f"{prefix}Start with 'tensorboard --logdir {opt.project}', view at http://localhost:6006/")
|
611 |
-
tb_writer = SummaryWriter(opt.save_dir) # Tensorboard
|
612 |
-
train(hyp, opt, device, tb_writer)
|
613 |
-
|
614 |
-
# Evolve hyperparameters (optional)
|
615 |
-
else:
|
616 |
-
# Hyperparameter evolution metadata (mutation scale 0-1, lower_limit, upper_limit)
|
617 |
-
meta = {'lr0': (1, 1e-5, 1e-1), # initial learning rate (SGD=1E-2, Adam=1E-3)
|
618 |
-
'lrf': (1, 0.01, 1.0), # final OneCycleLR learning rate (lr0 * lrf)
|
619 |
-
'momentum': (0.3, 0.6, 0.98), # SGD momentum/Adam beta1
|
620 |
-
'weight_decay': (1, 0.0, 0.001), # optimizer weight decay
|
621 |
-
'warmup_epochs': (1, 0.0, 5.0), # warmup epochs (fractions ok)
|
622 |
-
'warmup_momentum': (1, 0.0, 0.95), # warmup initial momentum
|
623 |
-
'warmup_bias_lr': (1, 0.0, 0.2), # warmup initial bias lr
|
624 |
-
'box': (1, 0.02, 0.2), # box loss gain
|
625 |
-
'cls': (1, 0.2, 4.0), # cls loss gain
|
626 |
-
'cls_pw': (1, 0.5, 2.0), # cls BCELoss positive_weight
|
627 |
-
'obj': (1, 0.2, 4.0), # obj loss gain (scale with pixels)
|
628 |
-
'obj_pw': (1, 0.5, 2.0), # obj BCELoss positive_weight
|
629 |
-
'iou_t': (0, 0.1, 0.7), # IoU training threshold
|
630 |
-
'anchor_t': (1, 2.0, 8.0), # anchor-multiple threshold
|
631 |
-
'anchors': (2, 2.0, 10.0), # anchors per output grid (0 to ignore)
|
632 |
-
'fl_gamma': (0, 0.0, 2.0), # focal loss gamma (efficientDet default gamma=1.5)
|
633 |
-
'hsv_h': (1, 0.0, 0.1), # image HSV-Hue augmentation (fraction)
|
634 |
-
'hsv_s': (1, 0.0, 0.9), # image HSV-Saturation augmentation (fraction)
|
635 |
-
'hsv_v': (1, 0.0, 0.9), # image HSV-Value augmentation (fraction)
|
636 |
-
'degrees': (1, 0.0, 45.0), # image rotation (+/- deg)
|
637 |
-
'translate': (1, 0.0, 0.9), # image translation (+/- fraction)
|
638 |
-
'scale': (1, 0.0, 0.9), # image scale (+/- gain)
|
639 |
-
'shear': (1, 0.0, 10.0), # image shear (+/- deg)
|
640 |
-
'perspective': (0, 0.0, 0.001), # image perspective (+/- fraction), range 0-0.001
|
641 |
-
'flipud': (1, 0.0, 1.0), # image flip up-down (probability)
|
642 |
-
'fliplr': (0, 0.0, 1.0), # image flip left-right (probability)
|
643 |
-
'mosaic': (1, 0.0, 1.0), # image mixup (probability)
|
644 |
-
'mixup': (1, 0.0, 1.0)} # image mixup (probability)
|
645 |
-
|
646 |
-
with open(opt.hyp, errors='ignore') as f:
|
647 |
-
hyp = yaml.safe_load(f) # load hyps dict
|
648 |
-
if 'anchors' not in hyp: # anchors commented in hyp.yaml
|
649 |
-
hyp['anchors'] = 3
|
650 |
-
|
651 |
-
assert opt.local_rank == -1, 'DDP mode not implemented for --evolve'
|
652 |
-
opt.notest, opt.nosave = True, True # only test/save final epoch
|
653 |
-
# ei = [isinstance(x, (int, float)) for x in hyp.values()] # evolvable indices
|
654 |
-
yaml_file = Path(opt.save_dir) / 'hyp_evolved.yaml' # save best result here
|
655 |
-
if opt.bucket:
|
656 |
-
os.system('gsutil cp gs://%s/evolve.txt .' % opt.bucket) # download evolve.txt if exists
|
657 |
-
|
658 |
-
for _ in range(300): # generations to evolve
|
659 |
-
if Path('evolve.txt').exists(): # if evolve.txt exists: select best hyps and mutate
|
660 |
-
# Select parent(s)
|
661 |
-
parent = 'single' # parent selection method: 'single' or 'weighted'
|
662 |
-
x = np.loadtxt('evolve.txt', ndmin=2)
|
663 |
-
n = min(5, len(x)) # number of previous results to consider
|
664 |
-
x = x[np.argsort(-fitness(x))][:n] # top n mutations
|
665 |
-
w = fitness(x) - fitness(x).min() # weights
|
666 |
-
if parent == 'single' or len(x) == 1:
|
667 |
-
# x = x[random.randint(0, n - 1)] # random selection
|
668 |
-
x = x[random.choices(range(n), weights=w)[0]] # weighted selection
|
669 |
-
elif parent == 'weighted':
|
670 |
-
x = (x * w.reshape(n, 1)).sum(0) / w.sum() # weighted combination
|
671 |
-
|
672 |
-
# Mutate
|
673 |
-
mp, s = 0.8, 0.2 # mutation probability, sigma
|
674 |
-
npr = np.random
|
675 |
-
npr.seed(int(time.time()))
|
676 |
-
g = np.array([x[0] for x in meta.values()]) # gains 0-1
|
677 |
-
ng = len(meta)
|
678 |
-
v = np.ones(ng)
|
679 |
-
while all(v == 1): # mutate until a change occurs (prevent duplicates)
|
680 |
-
v = (g * (npr.random(ng) < mp) * npr.randn(ng) * npr.random() * s + 1).clip(0.3, 3.0)
|
681 |
-
for i, k in enumerate(hyp.keys()): # plt.hist(v.ravel(), 300)
|
682 |
-
hyp[k] = float(x[i + 7] * v[i]) # mutate
|
683 |
-
|
684 |
-
# Constrain to limits
|
685 |
-
for k, v in meta.items():
|
686 |
-
hyp[k] = max(hyp[k], v[1]) # lower limit
|
687 |
-
hyp[k] = min(hyp[k], v[2]) # upper limit
|
688 |
-
hyp[k] = round(hyp[k], 5) # significant digits
|
689 |
-
|
690 |
-
# Train mutation
|
691 |
-
results = train(hyp.copy(), opt, device)
|
692 |
-
|
693 |
-
# Write mutation results
|
694 |
-
print_mutation(hyp.copy(), results, yaml_file, opt.bucket)
|
695 |
-
|
696 |
-
# Plot results
|
697 |
-
plot_evolution(yaml_file)
|
698 |
-
print(f'Hyperparameter evolution complete. Best results saved as: {yaml_file}\n'
|
699 |
-
f'Command to train a new model with these hyperparameters: $ python train.py --hyp {yaml_file}')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AgentVerse/agentVerse/agentverse/llms/__init__.py
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
from agentverse.registry import Registry
|
2 |
-
|
3 |
-
llm_registry = Registry(name="LLMRegistry")
|
4 |
-
|
5 |
-
from .base import BaseLLM, BaseChatModel, BaseCompletionModel, LLMResult
|
6 |
-
from .openai import OpenAIChat
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/bejeweled/states/BaseState.js
DELETED
@@ -1,36 +0,0 @@
|
|
1 |
-
import FSM from '../../../plugins/fsm.js';
|
2 |
-
|
3 |
-
class BaseState extends FSM {
|
4 |
-
constructor(bejeweled, config) {
|
5 |
-
super(config);
|
6 |
-
|
7 |
-
this.bejeweled = bejeweled; // Bejeweled
|
8 |
-
this.board = bejeweled.board; // Bejeweled.board
|
9 |
-
this.waitEvents = bejeweled.waitEvents; // Bejeweled.waitEvents
|
10 |
-
}
|
11 |
-
|
12 |
-
shutdown() {
|
13 |
-
super.shutdown();
|
14 |
-
this.bejeweled = undefined;
|
15 |
-
this.board = undefined;
|
16 |
-
this.waitEvents = undefined;
|
17 |
-
}
|
18 |
-
|
19 |
-
destroy() {
|
20 |
-
this.shutdown();
|
21 |
-
return this;
|
22 |
-
}
|
23 |
-
|
24 |
-
next() {
|
25 |
-
// Wait until all events are completed
|
26 |
-
if (this.waitEvents.noWaitEvent) {
|
27 |
-
// Go to next state
|
28 |
-
super.next();
|
29 |
-
} else {
|
30 |
-
// Try again later
|
31 |
-
this.waitEvents.setCompleteCallback(this.next, this);
|
32 |
-
}
|
33 |
-
}
|
34 |
-
}
|
35 |
-
|
36 |
-
export default BaseState
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Aki004/herta-so-vits/modules/attentions.py
DELETED
@@ -1,349 +0,0 @@
|
|
1 |
-
import copy
|
2 |
-
import math
|
3 |
-
import numpy as np
|
4 |
-
import torch
|
5 |
-
from torch import nn
|
6 |
-
from torch.nn import functional as F
|
7 |
-
|
8 |
-
import modules.commons as commons
|
9 |
-
import modules.modules as modules
|
10 |
-
from modules.modules import LayerNorm
|
11 |
-
|
12 |
-
|
13 |
-
class FFT(nn.Module):
|
14 |
-
def __init__(self, hidden_channels, filter_channels, n_heads, n_layers=1, kernel_size=1, p_dropout=0.,
|
15 |
-
proximal_bias=False, proximal_init=True, **kwargs):
|
16 |
-
super().__init__()
|
17 |
-
self.hidden_channels = hidden_channels
|
18 |
-
self.filter_channels = filter_channels
|
19 |
-
self.n_heads = n_heads
|
20 |
-
self.n_layers = n_layers
|
21 |
-
self.kernel_size = kernel_size
|
22 |
-
self.p_dropout = p_dropout
|
23 |
-
self.proximal_bias = proximal_bias
|
24 |
-
self.proximal_init = proximal_init
|
25 |
-
|
26 |
-
self.drop = nn.Dropout(p_dropout)
|
27 |
-
self.self_attn_layers = nn.ModuleList()
|
28 |
-
self.norm_layers_0 = nn.ModuleList()
|
29 |
-
self.ffn_layers = nn.ModuleList()
|
30 |
-
self.norm_layers_1 = nn.ModuleList()
|
31 |
-
for i in range(self.n_layers):
|
32 |
-
self.self_attn_layers.append(
|
33 |
-
MultiHeadAttention(hidden_channels, hidden_channels, n_heads, p_dropout=p_dropout, proximal_bias=proximal_bias,
|
34 |
-
proximal_init=proximal_init))
|
35 |
-
self.norm_layers_0.append(LayerNorm(hidden_channels))
|
36 |
-
self.ffn_layers.append(
|
37 |
-
FFN(hidden_channels, hidden_channels, filter_channels, kernel_size, p_dropout=p_dropout, causal=True))
|
38 |
-
self.norm_layers_1.append(LayerNorm(hidden_channels))
|
39 |
-
|
40 |
-
def forward(self, x, x_mask):
|
41 |
-
"""
|
42 |
-
x: decoder input
|
43 |
-
h: encoder output
|
44 |
-
"""
|
45 |
-
self_attn_mask = commons.subsequent_mask(x_mask.size(2)).to(device=x.device, dtype=x.dtype)
|
46 |
-
x = x * x_mask
|
47 |
-
for i in range(self.n_layers):
|
48 |
-
y = self.self_attn_layers[i](x, x, self_attn_mask)
|
49 |
-
y = self.drop(y)
|
50 |
-
x = self.norm_layers_0[i](x + y)
|
51 |
-
|
52 |
-
y = self.ffn_layers[i](x, x_mask)
|
53 |
-
y = self.drop(y)
|
54 |
-
x = self.norm_layers_1[i](x + y)
|
55 |
-
x = x * x_mask
|
56 |
-
return x
|
57 |
-
|
58 |
-
|
59 |
-
class Encoder(nn.Module):
|
60 |
-
def __init__(self, hidden_channels, filter_channels, n_heads, n_layers, kernel_size=1, p_dropout=0., window_size=4, **kwargs):
|
61 |
-
super().__init__()
|
62 |
-
self.hidden_channels = hidden_channels
|
63 |
-
self.filter_channels = filter_channels
|
64 |
-
self.n_heads = n_heads
|
65 |
-
self.n_layers = n_layers
|
66 |
-
self.kernel_size = kernel_size
|
67 |
-
self.p_dropout = p_dropout
|
68 |
-
self.window_size = window_size
|
69 |
-
|
70 |
-
self.drop = nn.Dropout(p_dropout)
|
71 |
-
self.attn_layers = nn.ModuleList()
|
72 |
-
self.norm_layers_1 = nn.ModuleList()
|
73 |
-
self.ffn_layers = nn.ModuleList()
|
74 |
-
self.norm_layers_2 = nn.ModuleList()
|
75 |
-
for i in range(self.n_layers):
|
76 |
-
self.attn_layers.append(MultiHeadAttention(hidden_channels, hidden_channels, n_heads, p_dropout=p_dropout, window_size=window_size))
|
77 |
-
self.norm_layers_1.append(LayerNorm(hidden_channels))
|
78 |
-
self.ffn_layers.append(FFN(hidden_channels, hidden_channels, filter_channels, kernel_size, p_dropout=p_dropout))
|
79 |
-
self.norm_layers_2.append(LayerNorm(hidden_channels))
|
80 |
-
|
81 |
-
def forward(self, x, x_mask):
|
82 |
-
attn_mask = x_mask.unsqueeze(2) * x_mask.unsqueeze(-1)
|
83 |
-
x = x * x_mask
|
84 |
-
for i in range(self.n_layers):
|
85 |
-
y = self.attn_layers[i](x, x, attn_mask)
|
86 |
-
y = self.drop(y)
|
87 |
-
x = self.norm_layers_1[i](x + y)
|
88 |
-
|
89 |
-
y = self.ffn_layers[i](x, x_mask)
|
90 |
-
y = self.drop(y)
|
91 |
-
x = self.norm_layers_2[i](x + y)
|
92 |
-
x = x * x_mask
|
93 |
-
return x
|
94 |
-
|
95 |
-
|
96 |
-
class Decoder(nn.Module):
|
97 |
-
def __init__(self, hidden_channels, filter_channels, n_heads, n_layers, kernel_size=1, p_dropout=0., proximal_bias=False, proximal_init=True, **kwargs):
|
98 |
-
super().__init__()
|
99 |
-
self.hidden_channels = hidden_channels
|
100 |
-
self.filter_channels = filter_channels
|
101 |
-
self.n_heads = n_heads
|
102 |
-
self.n_layers = n_layers
|
103 |
-
self.kernel_size = kernel_size
|
104 |
-
self.p_dropout = p_dropout
|
105 |
-
self.proximal_bias = proximal_bias
|
106 |
-
self.proximal_init = proximal_init
|
107 |
-
|
108 |
-
self.drop = nn.Dropout(p_dropout)
|
109 |
-
self.self_attn_layers = nn.ModuleList()
|
110 |
-
self.norm_layers_0 = nn.ModuleList()
|
111 |
-
self.encdec_attn_layers = nn.ModuleList()
|
112 |
-
self.norm_layers_1 = nn.ModuleList()
|
113 |
-
self.ffn_layers = nn.ModuleList()
|
114 |
-
self.norm_layers_2 = nn.ModuleList()
|
115 |
-
for i in range(self.n_layers):
|
116 |
-
self.self_attn_layers.append(MultiHeadAttention(hidden_channels, hidden_channels, n_heads, p_dropout=p_dropout, proximal_bias=proximal_bias, proximal_init=proximal_init))
|
117 |
-
self.norm_layers_0.append(LayerNorm(hidden_channels))
|
118 |
-
self.encdec_attn_layers.append(MultiHeadAttention(hidden_channels, hidden_channels, n_heads, p_dropout=p_dropout))
|
119 |
-
self.norm_layers_1.append(LayerNorm(hidden_channels))
|
120 |
-
self.ffn_layers.append(FFN(hidden_channels, hidden_channels, filter_channels, kernel_size, p_dropout=p_dropout, causal=True))
|
121 |
-
self.norm_layers_2.append(LayerNorm(hidden_channels))
|
122 |
-
|
123 |
-
def forward(self, x, x_mask, h, h_mask):
|
124 |
-
"""
|
125 |
-
x: decoder input
|
126 |
-
h: encoder output
|
127 |
-
"""
|
128 |
-
self_attn_mask = commons.subsequent_mask(x_mask.size(2)).to(device=x.device, dtype=x.dtype)
|
129 |
-
encdec_attn_mask = h_mask.unsqueeze(2) * x_mask.unsqueeze(-1)
|
130 |
-
x = x * x_mask
|
131 |
-
for i in range(self.n_layers):
|
132 |
-
y = self.self_attn_layers[i](x, x, self_attn_mask)
|
133 |
-
y = self.drop(y)
|
134 |
-
x = self.norm_layers_0[i](x + y)
|
135 |
-
|
136 |
-
y = self.encdec_attn_layers[i](x, h, encdec_attn_mask)
|
137 |
-
y = self.drop(y)
|
138 |
-
x = self.norm_layers_1[i](x + y)
|
139 |
-
|
140 |
-
y = self.ffn_layers[i](x, x_mask)
|
141 |
-
y = self.drop(y)
|
142 |
-
x = self.norm_layers_2[i](x + y)
|
143 |
-
x = x * x_mask
|
144 |
-
return x
|
145 |
-
|
146 |
-
|
147 |
-
class MultiHeadAttention(nn.Module):
|
148 |
-
def __init__(self, channels, out_channels, n_heads, p_dropout=0., window_size=None, heads_share=True, block_length=None, proximal_bias=False, proximal_init=False):
|
149 |
-
super().__init__()
|
150 |
-
assert channels % n_heads == 0
|
151 |
-
|
152 |
-
self.channels = channels
|
153 |
-
self.out_channels = out_channels
|
154 |
-
self.n_heads = n_heads
|
155 |
-
self.p_dropout = p_dropout
|
156 |
-
self.window_size = window_size
|
157 |
-
self.heads_share = heads_share
|
158 |
-
self.block_length = block_length
|
159 |
-
self.proximal_bias = proximal_bias
|
160 |
-
self.proximal_init = proximal_init
|
161 |
-
self.attn = None
|
162 |
-
|
163 |
-
self.k_channels = channels // n_heads
|
164 |
-
self.conv_q = nn.Conv1d(channels, channels, 1)
|
165 |
-
self.conv_k = nn.Conv1d(channels, channels, 1)
|
166 |
-
self.conv_v = nn.Conv1d(channels, channels, 1)
|
167 |
-
self.conv_o = nn.Conv1d(channels, out_channels, 1)
|
168 |
-
self.drop = nn.Dropout(p_dropout)
|
169 |
-
|
170 |
-
if window_size is not None:
|
171 |
-
n_heads_rel = 1 if heads_share else n_heads
|
172 |
-
rel_stddev = self.k_channels**-0.5
|
173 |
-
self.emb_rel_k = nn.Parameter(torch.randn(n_heads_rel, window_size * 2 + 1, self.k_channels) * rel_stddev)
|
174 |
-
self.emb_rel_v = nn.Parameter(torch.randn(n_heads_rel, window_size * 2 + 1, self.k_channels) * rel_stddev)
|
175 |
-
|
176 |
-
nn.init.xavier_uniform_(self.conv_q.weight)
|
177 |
-
nn.init.xavier_uniform_(self.conv_k.weight)
|
178 |
-
nn.init.xavier_uniform_(self.conv_v.weight)
|
179 |
-
if proximal_init:
|
180 |
-
with torch.no_grad():
|
181 |
-
self.conv_k.weight.copy_(self.conv_q.weight)
|
182 |
-
self.conv_k.bias.copy_(self.conv_q.bias)
|
183 |
-
|
184 |
-
def forward(self, x, c, attn_mask=None):
|
185 |
-
q = self.conv_q(x)
|
186 |
-
k = self.conv_k(c)
|
187 |
-
v = self.conv_v(c)
|
188 |
-
|
189 |
-
x, self.attn = self.attention(q, k, v, mask=attn_mask)
|
190 |
-
|
191 |
-
x = self.conv_o(x)
|
192 |
-
return x
|
193 |
-
|
194 |
-
def attention(self, query, key, value, mask=None):
|
195 |
-
# reshape [b, d, t] -> [b, n_h, t, d_k]
|
196 |
-
b, d, t_s, t_t = (*key.size(), query.size(2))
|
197 |
-
query = query.view(b, self.n_heads, self.k_channels, t_t).transpose(2, 3)
|
198 |
-
key = key.view(b, self.n_heads, self.k_channels, t_s).transpose(2, 3)
|
199 |
-
value = value.view(b, self.n_heads, self.k_channels, t_s).transpose(2, 3)
|
200 |
-
|
201 |
-
scores = torch.matmul(query / math.sqrt(self.k_channels), key.transpose(-2, -1))
|
202 |
-
if self.window_size is not None:
|
203 |
-
assert t_s == t_t, "Relative attention is only available for self-attention."
|
204 |
-
key_relative_embeddings = self._get_relative_embeddings(self.emb_rel_k, t_s)
|
205 |
-
rel_logits = self._matmul_with_relative_keys(query /math.sqrt(self.k_channels), key_relative_embeddings)
|
206 |
-
scores_local = self._relative_position_to_absolute_position(rel_logits)
|
207 |
-
scores = scores + scores_local
|
208 |
-
if self.proximal_bias:
|
209 |
-
assert t_s == t_t, "Proximal bias is only available for self-attention."
|
210 |
-
scores = scores + self._attention_bias_proximal(t_s).to(device=scores.device, dtype=scores.dtype)
|
211 |
-
if mask is not None:
|
212 |
-
scores = scores.masked_fill(mask == 0, -1e4)
|
213 |
-
if self.block_length is not None:
|
214 |
-
assert t_s == t_t, "Local attention is only available for self-attention."
|
215 |
-
block_mask = torch.ones_like(scores).triu(-self.block_length).tril(self.block_length)
|
216 |
-
scores = scores.masked_fill(block_mask == 0, -1e4)
|
217 |
-
p_attn = F.softmax(scores, dim=-1) # [b, n_h, t_t, t_s]
|
218 |
-
p_attn = self.drop(p_attn)
|
219 |
-
output = torch.matmul(p_attn, value)
|
220 |
-
if self.window_size is not None:
|
221 |
-
relative_weights = self._absolute_position_to_relative_position(p_attn)
|
222 |
-
value_relative_embeddings = self._get_relative_embeddings(self.emb_rel_v, t_s)
|
223 |
-
output = output + self._matmul_with_relative_values(relative_weights, value_relative_embeddings)
|
224 |
-
output = output.transpose(2, 3).contiguous().view(b, d, t_t) # [b, n_h, t_t, d_k] -> [b, d, t_t]
|
225 |
-
return output, p_attn
|
226 |
-
|
227 |
-
def _matmul_with_relative_values(self, x, y):
|
228 |
-
"""
|
229 |
-
x: [b, h, l, m]
|
230 |
-
y: [h or 1, m, d]
|
231 |
-
ret: [b, h, l, d]
|
232 |
-
"""
|
233 |
-
ret = torch.matmul(x, y.unsqueeze(0))
|
234 |
-
return ret
|
235 |
-
|
236 |
-
def _matmul_with_relative_keys(self, x, y):
|
237 |
-
"""
|
238 |
-
x: [b, h, l, d]
|
239 |
-
y: [h or 1, m, d]
|
240 |
-
ret: [b, h, l, m]
|
241 |
-
"""
|
242 |
-
ret = torch.matmul(x, y.unsqueeze(0).transpose(-2, -1))
|
243 |
-
return ret
|
244 |
-
|
245 |
-
def _get_relative_embeddings(self, relative_embeddings, length):
|
246 |
-
max_relative_position = 2 * self.window_size + 1
|
247 |
-
# Pad first before slice to avoid using cond ops.
|
248 |
-
pad_length = max(length - (self.window_size + 1), 0)
|
249 |
-
slice_start_position = max((self.window_size + 1) - length, 0)
|
250 |
-
slice_end_position = slice_start_position + 2 * length - 1
|
251 |
-
if pad_length > 0:
|
252 |
-
padded_relative_embeddings = F.pad(
|
253 |
-
relative_embeddings,
|
254 |
-
commons.convert_pad_shape([[0, 0], [pad_length, pad_length], [0, 0]]))
|
255 |
-
else:
|
256 |
-
padded_relative_embeddings = relative_embeddings
|
257 |
-
used_relative_embeddings = padded_relative_embeddings[:,slice_start_position:slice_end_position]
|
258 |
-
return used_relative_embeddings
|
259 |
-
|
260 |
-
def _relative_position_to_absolute_position(self, x):
|
261 |
-
"""
|
262 |
-
x: [b, h, l, 2*l-1]
|
263 |
-
ret: [b, h, l, l]
|
264 |
-
"""
|
265 |
-
batch, heads, length, _ = x.size()
|
266 |
-
# Concat columns of pad to shift from relative to absolute indexing.
|
267 |
-
x = F.pad(x, commons.convert_pad_shape([[0,0],[0,0],[0,0],[0,1]]))
|
268 |
-
|
269 |
-
# Concat extra elements so to add up to shape (len+1, 2*len-1).
|
270 |
-
x_flat = x.view([batch, heads, length * 2 * length])
|
271 |
-
x_flat = F.pad(x_flat, commons.convert_pad_shape([[0,0],[0,0],[0,length-1]]))
|
272 |
-
|
273 |
-
# Reshape and slice out the padded elements.
|
274 |
-
x_final = x_flat.view([batch, heads, length+1, 2*length-1])[:, :, :length, length-1:]
|
275 |
-
return x_final
|
276 |
-
|
277 |
-
def _absolute_position_to_relative_position(self, x):
|
278 |
-
"""
|
279 |
-
x: [b, h, l, l]
|
280 |
-
ret: [b, h, l, 2*l-1]
|
281 |
-
"""
|
282 |
-
batch, heads, length, _ = x.size()
|
283 |
-
# padd along column
|
284 |
-
x = F.pad(x, commons.convert_pad_shape([[0, 0], [0, 0], [0, 0], [0, length-1]]))
|
285 |
-
x_flat = x.view([batch, heads, length**2 + length*(length -1)])
|
286 |
-
# add 0's in the beginning that will skew the elements after reshape
|
287 |
-
x_flat = F.pad(x_flat, commons.convert_pad_shape([[0, 0], [0, 0], [length, 0]]))
|
288 |
-
x_final = x_flat.view([batch, heads, length, 2*length])[:,:,:,1:]
|
289 |
-
return x_final
|
290 |
-
|
291 |
-
def _attention_bias_proximal(self, length):
|
292 |
-
"""Bias for self-attention to encourage attention to close positions.
|
293 |
-
Args:
|
294 |
-
length: an integer scalar.
|
295 |
-
Returns:
|
296 |
-
a Tensor with shape [1, 1, length, length]
|
297 |
-
"""
|
298 |
-
r = torch.arange(length, dtype=torch.float32)
|
299 |
-
diff = torch.unsqueeze(r, 0) - torch.unsqueeze(r, 1)
|
300 |
-
return torch.unsqueeze(torch.unsqueeze(-torch.log1p(torch.abs(diff)), 0), 0)
|
301 |
-
|
302 |
-
|
303 |
-
class FFN(nn.Module):
|
304 |
-
def __init__(self, in_channels, out_channels, filter_channels, kernel_size, p_dropout=0., activation=None, causal=False):
|
305 |
-
super().__init__()
|
306 |
-
self.in_channels = in_channels
|
307 |
-
self.out_channels = out_channels
|
308 |
-
self.filter_channels = filter_channels
|
309 |
-
self.kernel_size = kernel_size
|
310 |
-
self.p_dropout = p_dropout
|
311 |
-
self.activation = activation
|
312 |
-
self.causal = causal
|
313 |
-
|
314 |
-
if causal:
|
315 |
-
self.padding = self._causal_padding
|
316 |
-
else:
|
317 |
-
self.padding = self._same_padding
|
318 |
-
|
319 |
-
self.conv_1 = nn.Conv1d(in_channels, filter_channels, kernel_size)
|
320 |
-
self.conv_2 = nn.Conv1d(filter_channels, out_channels, kernel_size)
|
321 |
-
self.drop = nn.Dropout(p_dropout)
|
322 |
-
|
323 |
-
def forward(self, x, x_mask):
|
324 |
-
x = self.conv_1(self.padding(x * x_mask))
|
325 |
-
if self.activation == "gelu":
|
326 |
-
x = x * torch.sigmoid(1.702 * x)
|
327 |
-
else:
|
328 |
-
x = torch.relu(x)
|
329 |
-
x = self.drop(x)
|
330 |
-
x = self.conv_2(self.padding(x * x_mask))
|
331 |
-
return x * x_mask
|
332 |
-
|
333 |
-
def _causal_padding(self, x):
|
334 |
-
if self.kernel_size == 1:
|
335 |
-
return x
|
336 |
-
pad_l = self.kernel_size - 1
|
337 |
-
pad_r = 0
|
338 |
-
padding = [[0, 0], [0, 0], [pad_l, pad_r]]
|
339 |
-
x = F.pad(x, commons.convert_pad_shape(padding))
|
340 |
-
return x
|
341 |
-
|
342 |
-
def _same_padding(self, x):
|
343 |
-
if self.kernel_size == 1:
|
344 |
-
return x
|
345 |
-
pad_l = (self.kernel_size - 1) // 2
|
346 |
-
pad_r = self.kernel_size // 2
|
347 |
-
padding = [[0, 0], [0, 0], [pad_l, pad_r]]
|
348 |
-
x = F.pad(x, commons.convert_pad_shape(padding))
|
349 |
-
return x
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Alpaca233/ChatPDF-GUI/gpt_reader/model_interface.py
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
from typing import List
|
2 |
-
import openai
|
3 |
-
|
4 |
-
|
5 |
-
class ModelInterface(object):
|
6 |
-
|
7 |
-
def __init__(self) -> None:
|
8 |
-
pass
|
9 |
-
|
10 |
-
def send_msg(self, *args):
|
11 |
-
pass
|
12 |
-
|
13 |
-
|
14 |
-
class OpenAIModel(object):
|
15 |
-
|
16 |
-
def __init__(self, api_key, model='gpt-3.5-turbo', temperature=0.2) -> None:
|
17 |
-
openai.api_key = api_key
|
18 |
-
self.model = model
|
19 |
-
self.temperature = temperature
|
20 |
-
|
21 |
-
def send_msg(self, msg: List[dict], return_raw_text=True):
|
22 |
-
|
23 |
-
response = openai.ChatCompletion.create(
|
24 |
-
model=self.model,
|
25 |
-
messages=msg,
|
26 |
-
temperature=self.temperature
|
27 |
-
)
|
28 |
-
|
29 |
-
if return_raw_text:
|
30 |
-
return response["choices"][0]["message"]["content"]
|
31 |
-
else:
|
32 |
-
return response
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/tests/pipelines/kandinsky/test_kandinsky_inpaint.py
DELETED
@@ -1,346 +0,0 @@
|
|
1 |
-
# coding=utf-8
|
2 |
-
# Copyright 2023 HuggingFace Inc.
|
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 |
-
|
16 |
-
import gc
|
17 |
-
import random
|
18 |
-
import unittest
|
19 |
-
|
20 |
-
import numpy as np
|
21 |
-
import torch
|
22 |
-
from PIL import Image
|
23 |
-
from transformers import XLMRobertaTokenizerFast
|
24 |
-
|
25 |
-
from diffusers import DDIMScheduler, KandinskyInpaintPipeline, KandinskyPriorPipeline, UNet2DConditionModel, VQModel
|
26 |
-
from diffusers.pipelines.kandinsky.text_encoder import MCLIPConfig, MultilingualCLIP
|
27 |
-
from diffusers.utils import floats_tensor, load_image, load_numpy, slow, torch_device
|
28 |
-
from diffusers.utils.testing_utils import enable_full_determinism, require_torch_gpu
|
29 |
-
|
30 |
-
from ..test_pipelines_common import PipelineTesterMixin, assert_mean_pixel_difference
|
31 |
-
|
32 |
-
|
33 |
-
enable_full_determinism()
|
34 |
-
|
35 |
-
|
36 |
-
class Dummies:
|
37 |
-
@property
|
38 |
-
def text_embedder_hidden_size(self):
|
39 |
-
return 32
|
40 |
-
|
41 |
-
@property
|
42 |
-
def time_input_dim(self):
|
43 |
-
return 32
|
44 |
-
|
45 |
-
@property
|
46 |
-
def block_out_channels_0(self):
|
47 |
-
return self.time_input_dim
|
48 |
-
|
49 |
-
@property
|
50 |
-
def time_embed_dim(self):
|
51 |
-
return self.time_input_dim * 4
|
52 |
-
|
53 |
-
@property
|
54 |
-
def cross_attention_dim(self):
|
55 |
-
return 32
|
56 |
-
|
57 |
-
@property
|
58 |
-
def dummy_tokenizer(self):
|
59 |
-
tokenizer = XLMRobertaTokenizerFast.from_pretrained("YiYiXu/tiny-random-mclip-base")
|
60 |
-
return tokenizer
|
61 |
-
|
62 |
-
@property
|
63 |
-
def dummy_text_encoder(self):
|
64 |
-
torch.manual_seed(0)
|
65 |
-
config = MCLIPConfig(
|
66 |
-
numDims=self.cross_attention_dim,
|
67 |
-
transformerDimensions=self.text_embedder_hidden_size,
|
68 |
-
hidden_size=self.text_embedder_hidden_size,
|
69 |
-
intermediate_size=37,
|
70 |
-
num_attention_heads=4,
|
71 |
-
num_hidden_layers=5,
|
72 |
-
vocab_size=1005,
|
73 |
-
)
|
74 |
-
|
75 |
-
text_encoder = MultilingualCLIP(config)
|
76 |
-
text_encoder = text_encoder.eval()
|
77 |
-
|
78 |
-
return text_encoder
|
79 |
-
|
80 |
-
@property
|
81 |
-
def dummy_unet(self):
|
82 |
-
torch.manual_seed(0)
|
83 |
-
|
84 |
-
model_kwargs = {
|
85 |
-
"in_channels": 9,
|
86 |
-
# Out channels is double in channels because predicts mean and variance
|
87 |
-
"out_channels": 8,
|
88 |
-
"addition_embed_type": "text_image",
|
89 |
-
"down_block_types": ("ResnetDownsampleBlock2D", "SimpleCrossAttnDownBlock2D"),
|
90 |
-
"up_block_types": ("SimpleCrossAttnUpBlock2D", "ResnetUpsampleBlock2D"),
|
91 |
-
"mid_block_type": "UNetMidBlock2DSimpleCrossAttn",
|
92 |
-
"block_out_channels": (self.block_out_channels_0, self.block_out_channels_0 * 2),
|
93 |
-
"layers_per_block": 1,
|
94 |
-
"encoder_hid_dim": self.text_embedder_hidden_size,
|
95 |
-
"encoder_hid_dim_type": "text_image_proj",
|
96 |
-
"cross_attention_dim": self.cross_attention_dim,
|
97 |
-
"attention_head_dim": 4,
|
98 |
-
"resnet_time_scale_shift": "scale_shift",
|
99 |
-
"class_embed_type": None,
|
100 |
-
}
|
101 |
-
|
102 |
-
model = UNet2DConditionModel(**model_kwargs)
|
103 |
-
return model
|
104 |
-
|
105 |
-
@property
|
106 |
-
def dummy_movq_kwargs(self):
|
107 |
-
return {
|
108 |
-
"block_out_channels": [32, 64],
|
109 |
-
"down_block_types": ["DownEncoderBlock2D", "AttnDownEncoderBlock2D"],
|
110 |
-
"in_channels": 3,
|
111 |
-
"latent_channels": 4,
|
112 |
-
"layers_per_block": 1,
|
113 |
-
"norm_num_groups": 8,
|
114 |
-
"norm_type": "spatial",
|
115 |
-
"num_vq_embeddings": 12,
|
116 |
-
"out_channels": 3,
|
117 |
-
"up_block_types": [
|
118 |
-
"AttnUpDecoderBlock2D",
|
119 |
-
"UpDecoderBlock2D",
|
120 |
-
],
|
121 |
-
"vq_embed_dim": 4,
|
122 |
-
}
|
123 |
-
|
124 |
-
@property
|
125 |
-
def dummy_movq(self):
|
126 |
-
torch.manual_seed(0)
|
127 |
-
model = VQModel(**self.dummy_movq_kwargs)
|
128 |
-
return model
|
129 |
-
|
130 |
-
def get_dummy_components(self):
|
131 |
-
text_encoder = self.dummy_text_encoder
|
132 |
-
tokenizer = self.dummy_tokenizer
|
133 |
-
unet = self.dummy_unet
|
134 |
-
movq = self.dummy_movq
|
135 |
-
|
136 |
-
scheduler = DDIMScheduler(
|
137 |
-
num_train_timesteps=1000,
|
138 |
-
beta_schedule="linear",
|
139 |
-
beta_start=0.00085,
|
140 |
-
beta_end=0.012,
|
141 |
-
clip_sample=False,
|
142 |
-
set_alpha_to_one=False,
|
143 |
-
steps_offset=1,
|
144 |
-
prediction_type="epsilon",
|
145 |
-
thresholding=False,
|
146 |
-
)
|
147 |
-
|
148 |
-
components = {
|
149 |
-
"text_encoder": text_encoder,
|
150 |
-
"tokenizer": tokenizer,
|
151 |
-
"unet": unet,
|
152 |
-
"scheduler": scheduler,
|
153 |
-
"movq": movq,
|
154 |
-
}
|
155 |
-
|
156 |
-
return components
|
157 |
-
|
158 |
-
def get_dummy_inputs(self, device, seed=0):
|
159 |
-
image_embeds = floats_tensor((1, self.cross_attention_dim), rng=random.Random(seed)).to(device)
|
160 |
-
negative_image_embeds = floats_tensor((1, self.cross_attention_dim), rng=random.Random(seed + 1)).to(device)
|
161 |
-
# create init_image
|
162 |
-
image = floats_tensor((1, 3, 64, 64), rng=random.Random(seed)).to(device)
|
163 |
-
image = image.cpu().permute(0, 2, 3, 1)[0]
|
164 |
-
init_image = Image.fromarray(np.uint8(image)).convert("RGB").resize((256, 256))
|
165 |
-
# create mask
|
166 |
-
mask = np.zeros((64, 64), dtype=np.float32)
|
167 |
-
mask[:32, :32] = 1
|
168 |
-
|
169 |
-
if str(device).startswith("mps"):
|
170 |
-
generator = torch.manual_seed(seed)
|
171 |
-
else:
|
172 |
-
generator = torch.Generator(device=device).manual_seed(seed)
|
173 |
-
inputs = {
|
174 |
-
"prompt": "horse",
|
175 |
-
"image": init_image,
|
176 |
-
"mask_image": mask,
|
177 |
-
"image_embeds": image_embeds,
|
178 |
-
"negative_image_embeds": negative_image_embeds,
|
179 |
-
"generator": generator,
|
180 |
-
"height": 64,
|
181 |
-
"width": 64,
|
182 |
-
"num_inference_steps": 2,
|
183 |
-
"guidance_scale": 4.0,
|
184 |
-
"output_type": "np",
|
185 |
-
}
|
186 |
-
return inputs
|
187 |
-
|
188 |
-
|
189 |
-
class KandinskyInpaintPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
|
190 |
-
pipeline_class = KandinskyInpaintPipeline
|
191 |
-
params = ["prompt", "image_embeds", "negative_image_embeds", "image", "mask_image"]
|
192 |
-
batch_params = [
|
193 |
-
"prompt",
|
194 |
-
"negative_prompt",
|
195 |
-
"image_embeds",
|
196 |
-
"negative_image_embeds",
|
197 |
-
"image",
|
198 |
-
"mask_image",
|
199 |
-
]
|
200 |
-
required_optional_params = [
|
201 |
-
"generator",
|
202 |
-
"height",
|
203 |
-
"width",
|
204 |
-
"latents",
|
205 |
-
"guidance_scale",
|
206 |
-
"negative_prompt",
|
207 |
-
"num_inference_steps",
|
208 |
-
"return_dict",
|
209 |
-
"guidance_scale",
|
210 |
-
"num_images_per_prompt",
|
211 |
-
"output_type",
|
212 |
-
"return_dict",
|
213 |
-
]
|
214 |
-
test_xformers_attention = False
|
215 |
-
|
216 |
-
def get_dummy_components(self):
|
217 |
-
dummies = Dummies()
|
218 |
-
return dummies.get_dummy_components()
|
219 |
-
|
220 |
-
def get_dummy_inputs(self, device, seed=0):
|
221 |
-
dummies = Dummies()
|
222 |
-
return dummies.get_dummy_inputs(device=device, seed=seed)
|
223 |
-
|
224 |
-
def test_kandinsky_inpaint(self):
|
225 |
-
device = "cpu"
|
226 |
-
|
227 |
-
components = self.get_dummy_components()
|
228 |
-
|
229 |
-
pipe = self.pipeline_class(**components)
|
230 |
-
pipe = pipe.to(device)
|
231 |
-
|
232 |
-
pipe.set_progress_bar_config(disable=None)
|
233 |
-
|
234 |
-
output = pipe(**self.get_dummy_inputs(device))
|
235 |
-
image = output.images
|
236 |
-
|
237 |
-
image_from_tuple = pipe(
|
238 |
-
**self.get_dummy_inputs(device),
|
239 |
-
return_dict=False,
|
240 |
-
)[0]
|
241 |
-
|
242 |
-
image_slice = image[0, -3:, -3:, -1]
|
243 |
-
image_from_tuple_slice = image_from_tuple[0, -3:, -3:, -1]
|
244 |
-
|
245 |
-
assert image.shape == (1, 64, 64, 3)
|
246 |
-
|
247 |
-
expected_slice = np.array([0.8222, 0.8896, 0.4373, 0.8088, 0.4905, 0.2609, 0.6816, 0.4291, 0.5129])
|
248 |
-
|
249 |
-
assert (
|
250 |
-
np.abs(image_slice.flatten() - expected_slice).max() < 1e-2
|
251 |
-
), f" expected_slice {expected_slice}, but got {image_slice.flatten()}"
|
252 |
-
assert (
|
253 |
-
np.abs(image_from_tuple_slice.flatten() - expected_slice).max() < 1e-2
|
254 |
-
), f" expected_slice {expected_slice}, but got {image_from_tuple_slice.flatten()}"
|
255 |
-
|
256 |
-
def test_inference_batch_single_identical(self):
|
257 |
-
super().test_inference_batch_single_identical(expected_max_diff=3e-3)
|
258 |
-
|
259 |
-
@require_torch_gpu
|
260 |
-
def test_offloads(self):
|
261 |
-
pipes = []
|
262 |
-
components = self.get_dummy_components()
|
263 |
-
sd_pipe = self.pipeline_class(**components).to(torch_device)
|
264 |
-
pipes.append(sd_pipe)
|
265 |
-
|
266 |
-
components = self.get_dummy_components()
|
267 |
-
sd_pipe = self.pipeline_class(**components)
|
268 |
-
sd_pipe.enable_model_cpu_offload()
|
269 |
-
pipes.append(sd_pipe)
|
270 |
-
|
271 |
-
components = self.get_dummy_components()
|
272 |
-
sd_pipe = self.pipeline_class(**components)
|
273 |
-
sd_pipe.enable_sequential_cpu_offload()
|
274 |
-
pipes.append(sd_pipe)
|
275 |
-
|
276 |
-
image_slices = []
|
277 |
-
for pipe in pipes:
|
278 |
-
inputs = self.get_dummy_inputs(torch_device)
|
279 |
-
image = pipe(**inputs).images
|
280 |
-
|
281 |
-
image_slices.append(image[0, -3:, -3:, -1].flatten())
|
282 |
-
|
283 |
-
assert np.abs(image_slices[0] - image_slices[1]).max() < 1e-3
|
284 |
-
assert np.abs(image_slices[0] - image_slices[2]).max() < 1e-3
|
285 |
-
|
286 |
-
|
287 |
-
@slow
|
288 |
-
@require_torch_gpu
|
289 |
-
class KandinskyInpaintPipelineIntegrationTests(unittest.TestCase):
|
290 |
-
def tearDown(self):
|
291 |
-
# clean up the VRAM after each test
|
292 |
-
super().tearDown()
|
293 |
-
gc.collect()
|
294 |
-
torch.cuda.empty_cache()
|
295 |
-
|
296 |
-
def test_kandinsky_inpaint(self):
|
297 |
-
expected_image = load_numpy(
|
298 |
-
"https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main"
|
299 |
-
"/kandinsky/kandinsky_inpaint_cat_with_hat_fp16.npy"
|
300 |
-
)
|
301 |
-
|
302 |
-
init_image = load_image(
|
303 |
-
"https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main" "/kandinsky/cat.png"
|
304 |
-
)
|
305 |
-
mask = np.zeros((768, 768), dtype=np.float32)
|
306 |
-
mask[:250, 250:-250] = 1
|
307 |
-
|
308 |
-
prompt = "a hat"
|
309 |
-
|
310 |
-
pipe_prior = KandinskyPriorPipeline.from_pretrained(
|
311 |
-
"kandinsky-community/kandinsky-2-1-prior", torch_dtype=torch.float16
|
312 |
-
)
|
313 |
-
pipe_prior.to(torch_device)
|
314 |
-
|
315 |
-
pipeline = KandinskyInpaintPipeline.from_pretrained(
|
316 |
-
"kandinsky-community/kandinsky-2-1-inpaint", torch_dtype=torch.float16
|
317 |
-
)
|
318 |
-
pipeline = pipeline.to(torch_device)
|
319 |
-
pipeline.set_progress_bar_config(disable=None)
|
320 |
-
|
321 |
-
generator = torch.Generator(device="cpu").manual_seed(0)
|
322 |
-
image_emb, zero_image_emb = pipe_prior(
|
323 |
-
prompt,
|
324 |
-
generator=generator,
|
325 |
-
num_inference_steps=5,
|
326 |
-
negative_prompt="",
|
327 |
-
).to_tuple()
|
328 |
-
|
329 |
-
output = pipeline(
|
330 |
-
prompt,
|
331 |
-
image=init_image,
|
332 |
-
mask_image=mask,
|
333 |
-
image_embeds=image_emb,
|
334 |
-
negative_image_embeds=zero_image_emb,
|
335 |
-
generator=generator,
|
336 |
-
num_inference_steps=100,
|
337 |
-
height=768,
|
338 |
-
width=768,
|
339 |
-
output_type="np",
|
340 |
-
)
|
341 |
-
|
342 |
-
image = output.images[0]
|
343 |
-
|
344 |
-
assert image.shape == (768, 768, 3)
|
345 |
-
|
346 |
-
assert_mean_pixel_difference(image, expected_image)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Andy1621/uniformer_image_detection/configs/gn+ws/mask_rcnn_r50_fpn_gn_ws-all_20_23_24e_coco.py
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
_base_ = './mask_rcnn_r50_fpn_gn_ws-all_2x_coco.py'
|
2 |
-
# learning policy
|
3 |
-
lr_config = dict(step=[20, 23])
|
4 |
-
runner = dict(type='EpochBasedRunner', max_epochs=24)
|
|
|
|
|
|
|
|
|
|
spaces/Andy1621/uniformer_image_detection/configs/pisa/pisa_retinanet_r50_fpn_1x_coco.py
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
_base_ = '../retinanet/retinanet_r50_fpn_1x_coco.py'
|
2 |
-
|
3 |
-
model = dict(
|
4 |
-
bbox_head=dict(
|
5 |
-
type='PISARetinaHead',
|
6 |
-
loss_bbox=dict(type='SmoothL1Loss', beta=0.11, loss_weight=1.0)),
|
7 |
-
train_cfg=dict(isr=dict(k=2., bias=0.), carl=dict(k=1., bias=0.2)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Andy1621/uniformer_image_detection/mmdet/version.py
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
# Copyright (c) Open-MMLab. All rights reserved.
|
2 |
-
|
3 |
-
__version__ = '2.11.0'
|
4 |
-
short_version = __version__
|
5 |
-
|
6 |
-
|
7 |
-
def parse_version_info(version_str):
|
8 |
-
version_info = []
|
9 |
-
for x in version_str.split('.'):
|
10 |
-
if x.isdigit():
|
11 |
-
version_info.append(int(x))
|
12 |
-
elif x.find('rc') != -1:
|
13 |
-
patch_version = x.split('rc')
|
14 |
-
version_info.append(int(patch_version[0]))
|
15 |
-
version_info.append(f'rc{patch_version[1]}')
|
16 |
-
return tuple(version_info)
|
17 |
-
|
18 |
-
|
19 |
-
version_info = parse_version_info(__version__)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AnishKumbhar/ChatBot/text-generation-webui-main/convert-to-safetensors.py
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
'''
|
2 |
-
|
3 |
-
Converts a transformers model to safetensors format and shards it.
|
4 |
-
|
5 |
-
This makes it faster to load (because of safetensors) and lowers its RAM usage
|
6 |
-
while loading (because of sharding).
|
7 |
-
|
8 |
-
Based on the original script by 81300:
|
9 |
-
|
10 |
-
https://gist.github.com/81300/fe5b08bff1cba45296a829b9d6b0f303
|
11 |
-
|
12 |
-
'''
|
13 |
-
|
14 |
-
import argparse
|
15 |
-
from pathlib import Path
|
16 |
-
|
17 |
-
import torch
|
18 |
-
from transformers import AutoModelForCausalLM, AutoTokenizer
|
19 |
-
|
20 |
-
parser = argparse.ArgumentParser(formatter_class=lambda prog: argparse.HelpFormatter(prog, max_help_position=54))
|
21 |
-
parser.add_argument('MODEL', type=str, default=None, nargs='?', help="Path to the input model.")
|
22 |
-
parser.add_argument('--output', type=str, default=None, help='Path to the output folder (default: models/{model_name}_safetensors).')
|
23 |
-
parser.add_argument("--max-shard-size", type=str, default="2GB", help="Maximum size of a shard in GB or MB (default: %(default)s).")
|
24 |
-
parser.add_argument('--bf16', action='store_true', help='Load the model with bfloat16 precision. Requires NVIDIA Ampere GPU.')
|
25 |
-
args = parser.parse_args()
|
26 |
-
|
27 |
-
if __name__ == '__main__':
|
28 |
-
path = Path(args.MODEL)
|
29 |
-
model_name = path.name
|
30 |
-
|
31 |
-
print(f"Loading {model_name}...")
|
32 |
-
model = AutoModelForCausalLM.from_pretrained(path, low_cpu_mem_usage=True, torch_dtype=torch.bfloat16 if args.bf16 else torch.float16)
|
33 |
-
tokenizer = AutoTokenizer.from_pretrained(path)
|
34 |
-
|
35 |
-
out_folder = args.output or Path(f"models/{model_name}_safetensors")
|
36 |
-
print(f"Saving the converted model to {out_folder} with a maximum shard size of {args.max_shard_size}...")
|
37 |
-
model.save_pretrained(out_folder, max_shard_size=args.max_shard_size, safe_serialization=True)
|
38 |
-
tokenizer.save_pretrained(out_folder)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/AnishKumbhar/ChatBot/text-generation-webui-main/docs/Extensions.md
DELETED
@@ -1,244 +0,0 @@
|
|
1 |
-
# Extensions
|
2 |
-
|
3 |
-
Extensions are defined by files named `script.py` inside subfolders of `text-generation-webui/extensions`. They are loaded at startup if the folder name is specified after the `--extensions` flag.
|
4 |
-
|
5 |
-
For instance, `extensions/silero_tts/script.py` gets loaded with `python server.py --extensions silero_tts`.
|
6 |
-
|
7 |
-
## [text-generation-webui-extensions](https://github.com/oobabooga/text-generation-webui-extensions)
|
8 |
-
|
9 |
-
The repository above contains a directory of user extensions.
|
10 |
-
|
11 |
-
If you create an extension, you are welcome to host it in a GitHub repository and submit a PR adding it to the list.
|
12 |
-
|
13 |
-
## Built-in extensions
|
14 |
-
|
15 |
-
|Extension|Description|
|
16 |
-
|---------|-----------|
|
17 |
-
|[api](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/api)| Creates an API with two endpoints, one for streaming at `/api/v1/stream` port 5005 and another for blocking at `/api/v1/generate` port 5000. This is the main API for the webui. |
|
18 |
-
|[openai](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/openai)| Creates an API that mimics the OpenAI API and can be used as a drop-in replacement. |
|
19 |
-
|[multimodal](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/multimodal) | Adds multimodality support (text+images). For a detailed description see [README.md](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/multimodal/README.md) in the extension directory. |
|
20 |
-
|[google_translate](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/google_translate)| Automatically translates inputs and outputs using Google Translate.|
|
21 |
-
|[silero_tts](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/silero_tts)| Text-to-speech extension using [Silero](https://github.com/snakers4/silero-models). When used in chat mode, responses are replaced with an audio widget. |
|
22 |
-
|[elevenlabs_tts](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/elevenlabs_tts)| Text-to-speech extension using the [ElevenLabs](https://beta.elevenlabs.io/) API. You need an API key to use it. |
|
23 |
-
|[whisper_stt](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/whisper_stt)| Allows you to enter your inputs in chat mode using your microphone. |
|
24 |
-
|[sd_api_pictures](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/sd_api_pictures)| Allows you to request pictures from the bot in chat mode, which will be generated using the AUTOMATIC1111 Stable Diffusion API. See examples [here](https://github.com/oobabooga/text-generation-webui/pull/309). |
|
25 |
-
|[character_bias](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/character_bias)| Just a very simple example that adds a hidden string at the beginning of the bot's reply in chat mode. |
|
26 |
-
|[send_pictures](https://github.com/oobabooga/text-generation-webui/blob/main/extensions/send_pictures/)| Creates an image upload field that can be used to send images to the bot in chat mode. Captions are automatically generated using BLIP. |
|
27 |
-
|[gallery](https://github.com/oobabooga/text-generation-webui/blob/main/extensions/gallery/)| Creates a gallery with the chat characters and their pictures. |
|
28 |
-
|[superbooga](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/superbooga)| An extension that uses ChromaDB to create an arbitrarily large pseudocontext, taking as input text files, URLs, or pasted text. Based on https://github.com/kaiokendev/superbig. |
|
29 |
-
|[ngrok](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/ngrok)| Allows you to access the web UI remotely using the ngrok reverse tunnel service (free). It's an alternative to the built-in Gradio `--share` feature. |
|
30 |
-
|[perplexity_colors](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/perplexity_colors)| Colors each token in the output text by its associated probability, as derived from the model logits. |
|
31 |
-
|
32 |
-
## How to write an extension
|
33 |
-
|
34 |
-
The extensions framework is based on special functions and variables that you can define in `script.py`. The functions are the following:
|
35 |
-
|
36 |
-
| Function | Description |
|
37 |
-
|-------------|-------------|
|
38 |
-
| `def setup()` | Is executed when the extension gets imported. |
|
39 |
-
| `def ui()` | Creates custom gradio elements when the UI is launched. |
|
40 |
-
| `def custom_css()` | Returns custom CSS as a string. It is applied whenever the web UI is loaded. |
|
41 |
-
| `def custom_js()` | Same as above but for javascript. |
|
42 |
-
| `def input_modifier(string, state, is_chat=False)` | Modifies the input string before it enters the model. In chat mode, it is applied to the user message. Otherwise, it is applied to the entire prompt. |
|
43 |
-
| `def output_modifier(string, state, is_chat=False)` | Modifies the output string before it is presented in the UI. In chat mode, it is applied to the bot's reply. Otherwise, it is applied to the entire output. |
|
44 |
-
| `def chat_input_modifier(text, visible_text, state)` | Modifies both the visible and internal inputs in chat mode. Can be used to hijack the chat input with custom content. |
|
45 |
-
| `def bot_prefix_modifier(string, state)` | Applied in chat mode to the prefix for the bot's reply. |
|
46 |
-
| `def state_modifier(state)` | Modifies the dictionary containing the UI input parameters before it is used by the text generation functions. |
|
47 |
-
| `def history_modifier(history)` | Modifies the chat history before the text generation in chat mode begins. |
|
48 |
-
| `def custom_generate_reply(...)` | Overrides the main text generation function. |
|
49 |
-
| `def custom_generate_chat_prompt(...)` | Overrides the prompt generator in chat mode. |
|
50 |
-
| `def tokenizer_modifier(state, prompt, input_ids, input_embeds)` | Modifies the `input_ids`/`input_embeds` fed to the model. Should return `prompt`, `input_ids`, `input_embeds`. See the `multimodal` extension for an example. |
|
51 |
-
| `def custom_tokenized_length(prompt)` | Used in conjunction with `tokenizer_modifier`, returns the length in tokens of `prompt`. See the `multimodal` extension for an example. |
|
52 |
-
|
53 |
-
Additionally, you can define a special `params` dictionary. In it, the `display_name` key is used to define the displayed name of the extension in the UI, and the `is_tab` key is used to define whether the extension should appear in a new tab. By default, extensions appear at the bottom of the "Text generation" tab.
|
54 |
-
|
55 |
-
Example:
|
56 |
-
|
57 |
-
```python
|
58 |
-
params = {
|
59 |
-
"display_name": "Google Translate",
|
60 |
-
"is_tab": True,
|
61 |
-
}
|
62 |
-
```
|
63 |
-
|
64 |
-
The `params` dict may also contain variables that you want to be customizable through a `settings.yaml` file. For instance, assuming the extension is in `extensions/google_translate`, the variable `language string` in
|
65 |
-
|
66 |
-
```python
|
67 |
-
params = {
|
68 |
-
"display_name": "Google Translate",
|
69 |
-
"is_tab": True,
|
70 |
-
"language string": "jp"
|
71 |
-
}
|
72 |
-
```
|
73 |
-
|
74 |
-
can be customized by adding a key called `google_translate-language string` to `settings.yaml`:
|
75 |
-
|
76 |
-
```python
|
77 |
-
google_translate-language string: 'fr'
|
78 |
-
```
|
79 |
-
|
80 |
-
That is, the syntax for the key is `extension_name-variable_name`.
|
81 |
-
|
82 |
-
## Using multiple extensions at the same time
|
83 |
-
|
84 |
-
You can activate more than one extension at a time by providing their names separated by spaces after `--extensions`. The input, output, and bot prefix modifiers will be applied in the specified order.
|
85 |
-
|
86 |
-
Example:
|
87 |
-
|
88 |
-
```
|
89 |
-
python server.py --extensions enthusiasm translate # First apply enthusiasm, then translate
|
90 |
-
python server.py --extensions translate enthusiasm # First apply translate, then enthusiasm
|
91 |
-
```
|
92 |
-
|
93 |
-
Do note, that for:
|
94 |
-
- `custom_generate_chat_prompt`
|
95 |
-
- `custom_generate_reply`
|
96 |
-
- `custom_tokenized_length`
|
97 |
-
|
98 |
-
only the first declaration encountered will be used and the rest will be ignored.
|
99 |
-
|
100 |
-
## A full example
|
101 |
-
|
102 |
-
The source code below can be found at [extensions/example/script.py](https://github.com/oobabooga/text-generation-webui/tree/main/extensions/example/script.py).
|
103 |
-
|
104 |
-
```python
|
105 |
-
"""
|
106 |
-
An example of extension. It does nothing, but you can add transformations
|
107 |
-
before the return statements to customize the webui behavior.
|
108 |
-
|
109 |
-
Starting from history_modifier and ending in output_modifier, the
|
110 |
-
functions are declared in the same order that they are called at
|
111 |
-
generation time.
|
112 |
-
"""
|
113 |
-
|
114 |
-
import gradio as gr
|
115 |
-
import torch
|
116 |
-
from transformers import LogitsProcessor
|
117 |
-
|
118 |
-
from modules import chat, shared
|
119 |
-
from modules.text_generation import (
|
120 |
-
decode,
|
121 |
-
encode,
|
122 |
-
generate_reply,
|
123 |
-
)
|
124 |
-
|
125 |
-
params = {
|
126 |
-
"display_name": "Example Extension",
|
127 |
-
"is_tab": False,
|
128 |
-
}
|
129 |
-
|
130 |
-
class MyLogits(LogitsProcessor):
|
131 |
-
"""
|
132 |
-
Manipulates the probabilities for the next token before it gets sampled.
|
133 |
-
Used in the logits_processor_modifier function below.
|
134 |
-
"""
|
135 |
-
def __init__(self):
|
136 |
-
pass
|
137 |
-
|
138 |
-
def __call__(self, input_ids, scores):
|
139 |
-
# probs = torch.softmax(scores, dim=-1, dtype=torch.float)
|
140 |
-
# probs[0] /= probs[0].sum()
|
141 |
-
# scores = torch.log(probs / (1 - probs))
|
142 |
-
return scores
|
143 |
-
|
144 |
-
def history_modifier(history):
|
145 |
-
"""
|
146 |
-
Modifies the chat history.
|
147 |
-
Only used in chat mode.
|
148 |
-
"""
|
149 |
-
return history
|
150 |
-
|
151 |
-
def state_modifier(state):
|
152 |
-
"""
|
153 |
-
Modifies the state variable, which is a dictionary containing the input
|
154 |
-
values in the UI like sliders and checkboxes.
|
155 |
-
"""
|
156 |
-
return state
|
157 |
-
|
158 |
-
def chat_input_modifier(text, visible_text, state):
|
159 |
-
"""
|
160 |
-
Modifies the user input string in chat mode (visible_text).
|
161 |
-
You can also modify the internal representation of the user
|
162 |
-
input (text) to change how it will appear in the prompt.
|
163 |
-
"""
|
164 |
-
return text, visible_text
|
165 |
-
|
166 |
-
def input_modifier(string, state, is_chat=False):
|
167 |
-
"""
|
168 |
-
In default/notebook modes, modifies the whole prompt.
|
169 |
-
|
170 |
-
In chat mode, it is the same as chat_input_modifier but only applied
|
171 |
-
to "text", here called "string", and not to "visible_text".
|
172 |
-
"""
|
173 |
-
return string
|
174 |
-
|
175 |
-
def bot_prefix_modifier(string, state):
|
176 |
-
"""
|
177 |
-
Modifies the prefix for the next bot reply in chat mode.
|
178 |
-
By default, the prefix will be something like "Bot Name:".
|
179 |
-
"""
|
180 |
-
return string
|
181 |
-
|
182 |
-
def tokenizer_modifier(state, prompt, input_ids, input_embeds):
|
183 |
-
"""
|
184 |
-
Modifies the input ids and embeds.
|
185 |
-
Used by the multimodal extension to put image embeddings in the prompt.
|
186 |
-
Only used by loaders that use the transformers library for sampling.
|
187 |
-
"""
|
188 |
-
return prompt, input_ids, input_embeds
|
189 |
-
|
190 |
-
def logits_processor_modifier(processor_list, input_ids):
|
191 |
-
"""
|
192 |
-
Adds logits processors to the list, allowing you to access and modify
|
193 |
-
the next token probabilities.
|
194 |
-
Only used by loaders that use the transformers library for sampling.
|
195 |
-
"""
|
196 |
-
processor_list.append(MyLogits())
|
197 |
-
return processor_list
|
198 |
-
|
199 |
-
def output_modifier(string, state, is_chat=False):
|
200 |
-
"""
|
201 |
-
Modifies the LLM output before it gets presented.
|
202 |
-
|
203 |
-
In chat mode, the modified version goes into history['visible'],
|
204 |
-
and the original version goes into history['internal'].
|
205 |
-
"""
|
206 |
-
return string
|
207 |
-
|
208 |
-
def custom_generate_chat_prompt(user_input, state, **kwargs):
|
209 |
-
"""
|
210 |
-
Replaces the function that generates the prompt from the chat history.
|
211 |
-
Only used in chat mode.
|
212 |
-
"""
|
213 |
-
result = chat.generate_chat_prompt(user_input, state, **kwargs)
|
214 |
-
return result
|
215 |
-
|
216 |
-
def custom_css():
|
217 |
-
"""
|
218 |
-
Returns a CSS string that gets appended to the CSS for the webui.
|
219 |
-
"""
|
220 |
-
return ''
|
221 |
-
|
222 |
-
def custom_js():
|
223 |
-
"""
|
224 |
-
Returns a javascript string that gets appended to the javascript
|
225 |
-
for the webui.
|
226 |
-
"""
|
227 |
-
return ''
|
228 |
-
|
229 |
-
def setup():
|
230 |
-
"""
|
231 |
-
Gets executed only once, when the extension is imported.
|
232 |
-
"""
|
233 |
-
pass
|
234 |
-
|
235 |
-
def ui():
|
236 |
-
"""
|
237 |
-
Gets executed when the UI is drawn. Custom gradio elements and
|
238 |
-
their corresponding event handlers should be defined here.
|
239 |
-
|
240 |
-
To learn about gradio components, check out the docs:
|
241 |
-
https://gradio.app/docs/
|
242 |
-
"""
|
243 |
-
pass
|
244 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Aravindan/butterfly_classification/README.md
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
---
|
2 |
-
title: Butterfly Classification
|
3 |
-
emoji: 📉
|
4 |
-
colorFrom: indigo
|
5 |
-
colorTo: yellow
|
6 |
-
sdk: gradio
|
7 |
-
sdk_version: 3.1.4
|
8 |
-
app_file: app.py
|
9 |
-
pinned: false
|
10 |
-
---
|
11 |
-
|
12 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/setuptools/_vendor/importlib_resources/_legacy.py
DELETED
@@ -1,121 +0,0 @@
|
|
1 |
-
import functools
|
2 |
-
import os
|
3 |
-
import pathlib
|
4 |
-
import types
|
5 |
-
import warnings
|
6 |
-
|
7 |
-
from typing import Union, Iterable, ContextManager, BinaryIO, TextIO, Any
|
8 |
-
|
9 |
-
from . import _common
|
10 |
-
|
11 |
-
Package = Union[types.ModuleType, str]
|
12 |
-
Resource = str
|
13 |
-
|
14 |
-
|
15 |
-
def deprecated(func):
|
16 |
-
@functools.wraps(func)
|
17 |
-
def wrapper(*args, **kwargs):
|
18 |
-
warnings.warn(
|
19 |
-
f"{func.__name__} is deprecated. Use files() instead. "
|
20 |
-
"Refer to https://importlib-resources.readthedocs.io"
|
21 |
-
"/en/latest/using.html#migrating-from-legacy for migration advice.",
|
22 |
-
DeprecationWarning,
|
23 |
-
stacklevel=2,
|
24 |
-
)
|
25 |
-
return func(*args, **kwargs)
|
26 |
-
|
27 |
-
return wrapper
|
28 |
-
|
29 |
-
|
30 |
-
def normalize_path(path):
|
31 |
-
# type: (Any) -> str
|
32 |
-
"""Normalize a path by ensuring it is a string.
|
33 |
-
|
34 |
-
If the resulting string contains path separators, an exception is raised.
|
35 |
-
"""
|
36 |
-
str_path = str(path)
|
37 |
-
parent, file_name = os.path.split(str_path)
|
38 |
-
if parent:
|
39 |
-
raise ValueError(f'{path!r} must be only a file name')
|
40 |
-
return file_name
|
41 |
-
|
42 |
-
|
43 |
-
@deprecated
|
44 |
-
def open_binary(package: Package, resource: Resource) -> BinaryIO:
|
45 |
-
"""Return a file-like object opened for binary reading of the resource."""
|
46 |
-
return (_common.files(package) / normalize_path(resource)).open('rb')
|
47 |
-
|
48 |
-
|
49 |
-
@deprecated
|
50 |
-
def read_binary(package: Package, resource: Resource) -> bytes:
|
51 |
-
"""Return the binary contents of the resource."""
|
52 |
-
return (_common.files(package) / normalize_path(resource)).read_bytes()
|
53 |
-
|
54 |
-
|
55 |
-
@deprecated
|
56 |
-
def open_text(
|
57 |
-
package: Package,
|
58 |
-
resource: Resource,
|
59 |
-
encoding: str = 'utf-8',
|
60 |
-
errors: str = 'strict',
|
61 |
-
) -> TextIO:
|
62 |
-
"""Return a file-like object opened for text reading of the resource."""
|
63 |
-
return (_common.files(package) / normalize_path(resource)).open(
|
64 |
-
'r', encoding=encoding, errors=errors
|
65 |
-
)
|
66 |
-
|
67 |
-
|
68 |
-
@deprecated
|
69 |
-
def read_text(
|
70 |
-
package: Package,
|
71 |
-
resource: Resource,
|
72 |
-
encoding: str = 'utf-8',
|
73 |
-
errors: str = 'strict',
|
74 |
-
) -> str:
|
75 |
-
"""Return the decoded string of the resource.
|
76 |
-
|
77 |
-
The decoding-related arguments have the same semantics as those of
|
78 |
-
bytes.decode().
|
79 |
-
"""
|
80 |
-
with open_text(package, resource, encoding, errors) as fp:
|
81 |
-
return fp.read()
|
82 |
-
|
83 |
-
|
84 |
-
@deprecated
|
85 |
-
def contents(package: Package) -> Iterable[str]:
|
86 |
-
"""Return an iterable of entries in `package`.
|
87 |
-
|
88 |
-
Note that not all entries are resources. Specifically, directories are
|
89 |
-
not considered resources. Use `is_resource()` on each entry returned here
|
90 |
-
to check if it is a resource or not.
|
91 |
-
"""
|
92 |
-
return [path.name for path in _common.files(package).iterdir()]
|
93 |
-
|
94 |
-
|
95 |
-
@deprecated
|
96 |
-
def is_resource(package: Package, name: str) -> bool:
|
97 |
-
"""True if `name` is a resource inside `package`.
|
98 |
-
|
99 |
-
Directories are *not* resources.
|
100 |
-
"""
|
101 |
-
resource = normalize_path(name)
|
102 |
-
return any(
|
103 |
-
traversable.name == resource and traversable.is_file()
|
104 |
-
for traversable in _common.files(package).iterdir()
|
105 |
-
)
|
106 |
-
|
107 |
-
|
108 |
-
@deprecated
|
109 |
-
def path(
|
110 |
-
package: Package,
|
111 |
-
resource: Resource,
|
112 |
-
) -> ContextManager[pathlib.Path]:
|
113 |
-
"""A context manager providing a file path object to the resource.
|
114 |
-
|
115 |
-
If the resource does not already exist on its own on the file system,
|
116 |
-
a temporary file will be created. If the file was created, the file
|
117 |
-
will be deleted upon exiting the context manager (no exception is
|
118 |
-
raised if the file was deleted prior to the context manager
|
119 |
-
exiting).
|
120 |
-
"""
|
121 |
-
return _common.as_file(_common.files(package) / normalize_path(resource))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Awiny/Image2Paragraph/models/grit_src/third_party/CenterNet2/.github/ISSUE_TEMPLATE/unexpected-problems-bugs.md
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
---
|
2 |
-
name: "😩 Unexpected behaviors"
|
3 |
-
about: Report unexpected behaviors when using detectron2
|
4 |
-
title: Please read & provide the following
|
5 |
-
|
6 |
-
---
|
7 |
-
|
8 |
-
If you do not know the root cause of the problem, please post according to this template:
|
9 |
-
|
10 |
-
## Instructions To Reproduce the Issue:
|
11 |
-
|
12 |
-
Check https://stackoverflow.com/help/minimal-reproducible-example for how to ask good questions.
|
13 |
-
Simplify the steps to reproduce the issue using suggestions from the above link, and provide them below:
|
14 |
-
|
15 |
-
1. Full runnable code or full changes you made:
|
16 |
-
```
|
17 |
-
If making changes to the project itself, please use output of the following command:
|
18 |
-
git rev-parse HEAD; git diff
|
19 |
-
|
20 |
-
<put code or diff here>
|
21 |
-
```
|
22 |
-
2. What exact command you run:
|
23 |
-
3. __Full logs__ or other relevant observations:
|
24 |
-
```
|
25 |
-
<put logs here>
|
26 |
-
```
|
27 |
-
|
28 |
-
## Expected behavior:
|
29 |
-
|
30 |
-
If there are no obvious crash in "full logs" provided above,
|
31 |
-
please tell us the expected behavior.
|
32 |
-
|
33 |
-
If you expect a model to converge / work better, we do not help with such issues, unless
|
34 |
-
a model fails to reproduce the results in detectron2 model zoo, or proves existence of bugs.
|
35 |
-
|
36 |
-
## Environment:
|
37 |
-
|
38 |
-
Paste the output of the following command:
|
39 |
-
```
|
40 |
-
wget -nc -nv https://github.com/facebookresearch/detectron2/raw/main/detectron2/utils/collect_env.py && python collect_env.py
|
41 |
-
```
|
42 |
-
|
43 |
-
If your issue looks like an installation issue / environment issue,
|
44 |
-
please first check common issues in https://detectron2.readthedocs.io/tutorials/install.html#common-installation-issues
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/BBrother/NewBingAI/README.md
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
---
|
2 |
-
title: NewBingAI
|
3 |
-
emoji: 📚
|
4 |
-
colorFrom: blue
|
5 |
-
colorTo: indigo
|
6 |
-
sdk: docker
|
7 |
-
pinned: false
|
8 |
-
license: mit
|
9 |
-
app_port: 8080
|
10 |
-
---
|
11 |
-
|
12 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Bala2-03-2003/AIBALA/app.py
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
import os
|
2 |
-
import gradio as gr
|
3 |
-
from langchain.chat_models import ChatOpenAI
|
4 |
-
from langchain import LLMChain, PromptTemplate
|
5 |
-
from langchain.memory import ConversationBufferMemory
|
6 |
-
|
7 |
-
OPENAI_API_KEY=os.getenv('OPENAI_API_KEY')
|
8 |
-
|
9 |
-
template = """BALA BRAHMAM, your youthful and witty personal assistant! At 19 years old, she's full of energy and always eager to help. Riya's goal is to assist you with any questions or problems you might have. Her enthusiasm shines through in every response, making interactions with her enjoyable and engaging.
|
10 |
-
{chat_history}
|
11 |
-
User: {user_message}
|
12 |
-
Chatbot:"""
|
13 |
-
|
14 |
-
prompt = PromptTemplate(
|
15 |
-
input_variables=["chat_history", "user_message"], template=template
|
16 |
-
)
|
17 |
-
|
18 |
-
memory = ConversationBufferMemory(memory_key="chat_history")
|
19 |
-
|
20 |
-
llm_chain = LLMChain(
|
21 |
-
llm=ChatOpenAI(temperature='0.5', model_name="gpt-3.5-turbo"),
|
22 |
-
prompt=prompt,
|
23 |
-
verbose=True,
|
24 |
-
memory=memory,
|
25 |
-
)
|
26 |
-
|
27 |
-
def get_text_response(user_message,history):
|
28 |
-
response = llm_chain.predict(user_message = user_message)
|
29 |
-
return response
|
30 |
-
|
31 |
-
demo = gr.ChatInterface(get_text_response)
|
32 |
-
|
33 |
-
if __name__ == "__main__":
|
34 |
-
demo.launch() #To create a public link, set `share=True` in `launch()`. To enable errors and logs, set `debug=True` in `launch()`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Bambicita/rvc-models/infer_pack/transforms.py
DELETED
@@ -1,209 +0,0 @@
|
|
1 |
-
import torch
|
2 |
-
from torch.nn import functional as F
|
3 |
-
|
4 |
-
import numpy as np
|
5 |
-
|
6 |
-
|
7 |
-
DEFAULT_MIN_BIN_WIDTH = 1e-3
|
8 |
-
DEFAULT_MIN_BIN_HEIGHT = 1e-3
|
9 |
-
DEFAULT_MIN_DERIVATIVE = 1e-3
|
10 |
-
|
11 |
-
|
12 |
-
def piecewise_rational_quadratic_transform(
|
13 |
-
inputs,
|
14 |
-
unnormalized_widths,
|
15 |
-
unnormalized_heights,
|
16 |
-
unnormalized_derivatives,
|
17 |
-
inverse=False,
|
18 |
-
tails=None,
|
19 |
-
tail_bound=1.0,
|
20 |
-
min_bin_width=DEFAULT_MIN_BIN_WIDTH,
|
21 |
-
min_bin_height=DEFAULT_MIN_BIN_HEIGHT,
|
22 |
-
min_derivative=DEFAULT_MIN_DERIVATIVE,
|
23 |
-
):
|
24 |
-
if tails is None:
|
25 |
-
spline_fn = rational_quadratic_spline
|
26 |
-
spline_kwargs = {}
|
27 |
-
else:
|
28 |
-
spline_fn = unconstrained_rational_quadratic_spline
|
29 |
-
spline_kwargs = {"tails": tails, "tail_bound": tail_bound}
|
30 |
-
|
31 |
-
outputs, logabsdet = spline_fn(
|
32 |
-
inputs=inputs,
|
33 |
-
unnormalized_widths=unnormalized_widths,
|
34 |
-
unnormalized_heights=unnormalized_heights,
|
35 |
-
unnormalized_derivatives=unnormalized_derivatives,
|
36 |
-
inverse=inverse,
|
37 |
-
min_bin_width=min_bin_width,
|
38 |
-
min_bin_height=min_bin_height,
|
39 |
-
min_derivative=min_derivative,
|
40 |
-
**spline_kwargs
|
41 |
-
)
|
42 |
-
return outputs, logabsdet
|
43 |
-
|
44 |
-
|
45 |
-
def searchsorted(bin_locations, inputs, eps=1e-6):
|
46 |
-
bin_locations[..., -1] += eps
|
47 |
-
return torch.sum(inputs[..., None] >= bin_locations, dim=-1) - 1
|
48 |
-
|
49 |
-
|
50 |
-
def unconstrained_rational_quadratic_spline(
|
51 |
-
inputs,
|
52 |
-
unnormalized_widths,
|
53 |
-
unnormalized_heights,
|
54 |
-
unnormalized_derivatives,
|
55 |
-
inverse=False,
|
56 |
-
tails="linear",
|
57 |
-
tail_bound=1.0,
|
58 |
-
min_bin_width=DEFAULT_MIN_BIN_WIDTH,
|
59 |
-
min_bin_height=DEFAULT_MIN_BIN_HEIGHT,
|
60 |
-
min_derivative=DEFAULT_MIN_DERIVATIVE,
|
61 |
-
):
|
62 |
-
inside_interval_mask = (inputs >= -tail_bound) & (inputs <= tail_bound)
|
63 |
-
outside_interval_mask = ~inside_interval_mask
|
64 |
-
|
65 |
-
outputs = torch.zeros_like(inputs)
|
66 |
-
logabsdet = torch.zeros_like(inputs)
|
67 |
-
|
68 |
-
if tails == "linear":
|
69 |
-
unnormalized_derivatives = F.pad(unnormalized_derivatives, pad=(1, 1))
|
70 |
-
constant = np.log(np.exp(1 - min_derivative) - 1)
|
71 |
-
unnormalized_derivatives[..., 0] = constant
|
72 |
-
unnormalized_derivatives[..., -1] = constant
|
73 |
-
|
74 |
-
outputs[outside_interval_mask] = inputs[outside_interval_mask]
|
75 |
-
logabsdet[outside_interval_mask] = 0
|
76 |
-
else:
|
77 |
-
raise RuntimeError("{} tails are not implemented.".format(tails))
|
78 |
-
|
79 |
-
(
|
80 |
-
outputs[inside_interval_mask],
|
81 |
-
logabsdet[inside_interval_mask],
|
82 |
-
) = rational_quadratic_spline(
|
83 |
-
inputs=inputs[inside_interval_mask],
|
84 |
-
unnormalized_widths=unnormalized_widths[inside_interval_mask, :],
|
85 |
-
unnormalized_heights=unnormalized_heights[inside_interval_mask, :],
|
86 |
-
unnormalized_derivatives=unnormalized_derivatives[inside_interval_mask, :],
|
87 |
-
inverse=inverse,
|
88 |
-
left=-tail_bound,
|
89 |
-
right=tail_bound,
|
90 |
-
bottom=-tail_bound,
|
91 |
-
top=tail_bound,
|
92 |
-
min_bin_width=min_bin_width,
|
93 |
-
min_bin_height=min_bin_height,
|
94 |
-
min_derivative=min_derivative,
|
95 |
-
)
|
96 |
-
|
97 |
-
return outputs, logabsdet
|
98 |
-
|
99 |
-
|
100 |
-
def rational_quadratic_spline(
|
101 |
-
inputs,
|
102 |
-
unnormalized_widths,
|
103 |
-
unnormalized_heights,
|
104 |
-
unnormalized_derivatives,
|
105 |
-
inverse=False,
|
106 |
-
left=0.0,
|
107 |
-
right=1.0,
|
108 |
-
bottom=0.0,
|
109 |
-
top=1.0,
|
110 |
-
min_bin_width=DEFAULT_MIN_BIN_WIDTH,
|
111 |
-
min_bin_height=DEFAULT_MIN_BIN_HEIGHT,
|
112 |
-
min_derivative=DEFAULT_MIN_DERIVATIVE,
|
113 |
-
):
|
114 |
-
if torch.min(inputs) < left or torch.max(inputs) > right:
|
115 |
-
raise ValueError("Input to a transform is not within its domain")
|
116 |
-
|
117 |
-
num_bins = unnormalized_widths.shape[-1]
|
118 |
-
|
119 |
-
if min_bin_width * num_bins > 1.0:
|
120 |
-
raise ValueError("Minimal bin width too large for the number of bins")
|
121 |
-
if min_bin_height * num_bins > 1.0:
|
122 |
-
raise ValueError("Minimal bin height too large for the number of bins")
|
123 |
-
|
124 |
-
widths = F.softmax(unnormalized_widths, dim=-1)
|
125 |
-
widths = min_bin_width + (1 - min_bin_width * num_bins) * widths
|
126 |
-
cumwidths = torch.cumsum(widths, dim=-1)
|
127 |
-
cumwidths = F.pad(cumwidths, pad=(1, 0), mode="constant", value=0.0)
|
128 |
-
cumwidths = (right - left) * cumwidths + left
|
129 |
-
cumwidths[..., 0] = left
|
130 |
-
cumwidths[..., -1] = right
|
131 |
-
widths = cumwidths[..., 1:] - cumwidths[..., :-1]
|
132 |
-
|
133 |
-
derivatives = min_derivative + F.softplus(unnormalized_derivatives)
|
134 |
-
|
135 |
-
heights = F.softmax(unnormalized_heights, dim=-1)
|
136 |
-
heights = min_bin_height + (1 - min_bin_height * num_bins) * heights
|
137 |
-
cumheights = torch.cumsum(heights, dim=-1)
|
138 |
-
cumheights = F.pad(cumheights, pad=(1, 0), mode="constant", value=0.0)
|
139 |
-
cumheights = (top - bottom) * cumheights + bottom
|
140 |
-
cumheights[..., 0] = bottom
|
141 |
-
cumheights[..., -1] = top
|
142 |
-
heights = cumheights[..., 1:] - cumheights[..., :-1]
|
143 |
-
|
144 |
-
if inverse:
|
145 |
-
bin_idx = searchsorted(cumheights, inputs)[..., None]
|
146 |
-
else:
|
147 |
-
bin_idx = searchsorted(cumwidths, inputs)[..., None]
|
148 |
-
|
149 |
-
input_cumwidths = cumwidths.gather(-1, bin_idx)[..., 0]
|
150 |
-
input_bin_widths = widths.gather(-1, bin_idx)[..., 0]
|
151 |
-
|
152 |
-
input_cumheights = cumheights.gather(-1, bin_idx)[..., 0]
|
153 |
-
delta = heights / widths
|
154 |
-
input_delta = delta.gather(-1, bin_idx)[..., 0]
|
155 |
-
|
156 |
-
input_derivatives = derivatives.gather(-1, bin_idx)[..., 0]
|
157 |
-
input_derivatives_plus_one = derivatives[..., 1:].gather(-1, bin_idx)[..., 0]
|
158 |
-
|
159 |
-
input_heights = heights.gather(-1, bin_idx)[..., 0]
|
160 |
-
|
161 |
-
if inverse:
|
162 |
-
a = (inputs - input_cumheights) * (
|
163 |
-
input_derivatives + input_derivatives_plus_one - 2 * input_delta
|
164 |
-
) + input_heights * (input_delta - input_derivatives)
|
165 |
-
b = input_heights * input_derivatives - (inputs - input_cumheights) * (
|
166 |
-
input_derivatives + input_derivatives_plus_one - 2 * input_delta
|
167 |
-
)
|
168 |
-
c = -input_delta * (inputs - input_cumheights)
|
169 |
-
|
170 |
-
discriminant = b.pow(2) - 4 * a * c
|
171 |
-
assert (discriminant >= 0).all()
|
172 |
-
|
173 |
-
root = (2 * c) / (-b - torch.sqrt(discriminant))
|
174 |
-
outputs = root * input_bin_widths + input_cumwidths
|
175 |
-
|
176 |
-
theta_one_minus_theta = root * (1 - root)
|
177 |
-
denominator = input_delta + (
|
178 |
-
(input_derivatives + input_derivatives_plus_one - 2 * input_delta)
|
179 |
-
* theta_one_minus_theta
|
180 |
-
)
|
181 |
-
derivative_numerator = input_delta.pow(2) * (
|
182 |
-
input_derivatives_plus_one * root.pow(2)
|
183 |
-
+ 2 * input_delta * theta_one_minus_theta
|
184 |
-
+ input_derivatives * (1 - root).pow(2)
|
185 |
-
)
|
186 |
-
logabsdet = torch.log(derivative_numerator) - 2 * torch.log(denominator)
|
187 |
-
|
188 |
-
return outputs, -logabsdet
|
189 |
-
else:
|
190 |
-
theta = (inputs - input_cumwidths) / input_bin_widths
|
191 |
-
theta_one_minus_theta = theta * (1 - theta)
|
192 |
-
|
193 |
-
numerator = input_heights * (
|
194 |
-
input_delta * theta.pow(2) + input_derivatives * theta_one_minus_theta
|
195 |
-
)
|
196 |
-
denominator = input_delta + (
|
197 |
-
(input_derivatives + input_derivatives_plus_one - 2 * input_delta)
|
198 |
-
* theta_one_minus_theta
|
199 |
-
)
|
200 |
-
outputs = input_cumheights + numerator / denominator
|
201 |
-
|
202 |
-
derivative_numerator = input_delta.pow(2) * (
|
203 |
-
input_derivatives_plus_one * theta.pow(2)
|
204 |
-
+ 2 * input_delta * theta_one_minus_theta
|
205 |
-
+ input_derivatives * (1 - theta).pow(2)
|
206 |
-
)
|
207 |
-
logabsdet = torch.log(derivative_numerator) - 2 * torch.log(denominator)
|
208 |
-
|
209 |
-
return outputs, logabsdet
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Banbri/zcvzcv/src/app/engine/community.ts
DELETED
@@ -1,135 +0,0 @@
|
|
1 |
-
"use server"
|
2 |
-
|
3 |
-
import { v4 as uuidv4 } from "uuid"
|
4 |
-
|
5 |
-
import { CreatePostResponse, GetAppPostsResponse, Post, PostVisibility } from "@/types"
|
6 |
-
import { filterOutBadWords } from "./censorship"
|
7 |
-
|
8 |
-
const apiUrl = `${process.env.COMMUNITY_API_URL || ""}`
|
9 |
-
const apiToken = `${process.env.COMMUNITY_API_TOKEN || ""}`
|
10 |
-
const appId = `${process.env.COMMUNITY_API_ID || ""}`
|
11 |
-
|
12 |
-
export async function postToCommunity({
|
13 |
-
prompt,
|
14 |
-
assetUrl,
|
15 |
-
}: {
|
16 |
-
prompt: string
|
17 |
-
assetUrl: string
|
18 |
-
}): Promise<Post> {
|
19 |
-
|
20 |
-
prompt = filterOutBadWords(prompt)
|
21 |
-
|
22 |
-
// if the community API is disabled,
|
23 |
-
// we don't fail, we just mock
|
24 |
-
if (!apiUrl) {
|
25 |
-
const mockPost: Post = {
|
26 |
-
postId: uuidv4(),
|
27 |
-
appId: "mock",
|
28 |
-
prompt,
|
29 |
-
previewUrl: assetUrl,
|
30 |
-
assetUrl,
|
31 |
-
createdAt: new Date().toISOString(),
|
32 |
-
visibility: "normal",
|
33 |
-
upvotes: 0,
|
34 |
-
downvotes: 0
|
35 |
-
}
|
36 |
-
return mockPost
|
37 |
-
}
|
38 |
-
|
39 |
-
if (!prompt) {
|
40 |
-
console.error(`cannot call the community API without a prompt, aborting..`)
|
41 |
-
throw new Error(`cannot call the community API without a prompt, aborting..`)
|
42 |
-
}
|
43 |
-
if (!assetUrl) {
|
44 |
-
console.error(`cannot call the community API without an assetUrl, aborting..`)
|
45 |
-
throw new Error(`cannot call the community API without an assetUrl, aborting..`)
|
46 |
-
}
|
47 |
-
|
48 |
-
try {
|
49 |
-
console.log(`calling POST ${apiUrl}/posts/${appId} with prompt: ${prompt}`)
|
50 |
-
|
51 |
-
const postId = uuidv4()
|
52 |
-
|
53 |
-
const post: Partial<Post> = { postId, appId, prompt, assetUrl }
|
54 |
-
|
55 |
-
console.table(post)
|
56 |
-
|
57 |
-
const res = await fetch(`${apiUrl}/posts/${appId}`, {
|
58 |
-
method: "POST",
|
59 |
-
headers: {
|
60 |
-
Accept: "application/json",
|
61 |
-
"Content-Type": "application/json",
|
62 |
-
Authorization: `Bearer ${apiToken}`,
|
63 |
-
},
|
64 |
-
body: JSON.stringify(post),
|
65 |
-
cache: 'no-store',
|
66 |
-
// we can also use this (see https://vercel.com/blog/vercel-cache-api-nextjs-cache)
|
67 |
-
// next: { revalidate: 1 }
|
68 |
-
})
|
69 |
-
|
70 |
-
// console.log("res:", res)
|
71 |
-
// The return value is *not* serialized
|
72 |
-
// You can return Date, Map, Set, etc.
|
73 |
-
|
74 |
-
// Recommendation: handle errors
|
75 |
-
if (res.status !== 200) {
|
76 |
-
// This will activate the closest `error.js` Error Boundary
|
77 |
-
throw new Error('Failed to fetch data')
|
78 |
-
}
|
79 |
-
|
80 |
-
const response = (await res.json()) as CreatePostResponse
|
81 |
-
// console.log("response:", response)
|
82 |
-
return response.post
|
83 |
-
} catch (err) {
|
84 |
-
const error = `failed to post to community: ${err}`
|
85 |
-
console.error(error)
|
86 |
-
throw new Error(error)
|
87 |
-
}
|
88 |
-
}
|
89 |
-
|
90 |
-
export async function getLatestPosts(visibility?: PostVisibility): Promise<Post[]> {
|
91 |
-
|
92 |
-
let posts: Post[] = []
|
93 |
-
|
94 |
-
// if the community API is disabled we don't fail,
|
95 |
-
// we just mock
|
96 |
-
if (!apiUrl) {
|
97 |
-
return posts
|
98 |
-
}
|
99 |
-
|
100 |
-
try {
|
101 |
-
// console.log(`calling GET ${apiUrl}/posts with renderId: ${renderId}`)
|
102 |
-
const res = await fetch(`${apiUrl}/posts/${appId}/${
|
103 |
-
visibility || "all"
|
104 |
-
}`, {
|
105 |
-
method: "GET",
|
106 |
-
headers: {
|
107 |
-
Accept: "application/json",
|
108 |
-
"Content-Type": "application/json",
|
109 |
-
Authorization: `Bearer ${apiToken}`,
|
110 |
-
},
|
111 |
-
cache: 'no-store',
|
112 |
-
// we can also use this (see https://vercel.com/blog/vercel-cache-api-nextjs-cache)
|
113 |
-
// next: { revalidate: 1 }
|
114 |
-
})
|
115 |
-
|
116 |
-
// console.log("res:", res)
|
117 |
-
// The return value is *not* serialized
|
118 |
-
// You can return Date, Map, Set, etc.
|
119 |
-
|
120 |
-
// Recommendation: handle errors
|
121 |
-
if (res.status !== 200) {
|
122 |
-
// This will activate the closest `error.js` Error Boundary
|
123 |
-
throw new Error('Failed to fetch data')
|
124 |
-
}
|
125 |
-
|
126 |
-
const response = (await res.json()) as GetAppPostsResponse
|
127 |
-
// console.log("response:", response)
|
128 |
-
return Array.isArray(response?.posts) ? response?.posts : []
|
129 |
-
} catch (err) {
|
130 |
-
// const error = `failed to get posts: ${err}`
|
131 |
-
// console.error(error)
|
132 |
-
// throw new Error(error)
|
133 |
-
return []
|
134 |
-
}
|
135 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Banbri/zcvzcv/src/components/ui/avatar.tsx
DELETED
@@ -1,50 +0,0 @@
|
|
1 |
-
"use client"
|
2 |
-
|
3 |
-
import * as React from "react"
|
4 |
-
import * as AvatarPrimitive from "@radix-ui/react-avatar"
|
5 |
-
|
6 |
-
import { cn } from "@/lib/utils"
|
7 |
-
|
8 |
-
const Avatar = React.forwardRef<
|
9 |
-
React.ElementRef<typeof AvatarPrimitive.Root>,
|
10 |
-
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
|
11 |
-
>(({ className, ...props }, ref) => (
|
12 |
-
<AvatarPrimitive.Root
|
13 |
-
ref={ref}
|
14 |
-
className={cn(
|
15 |
-
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
16 |
-
className
|
17 |
-
)}
|
18 |
-
{...props}
|
19 |
-
/>
|
20 |
-
))
|
21 |
-
Avatar.displayName = AvatarPrimitive.Root.displayName
|
22 |
-
|
23 |
-
const AvatarImage = React.forwardRef<
|
24 |
-
React.ElementRef<typeof AvatarPrimitive.Image>,
|
25 |
-
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
|
26 |
-
>(({ className, ...props }, ref) => (
|
27 |
-
<AvatarPrimitive.Image
|
28 |
-
ref={ref}
|
29 |
-
className={cn("aspect-square h-full w-full", className)}
|
30 |
-
{...props}
|
31 |
-
/>
|
32 |
-
))
|
33 |
-
AvatarImage.displayName = AvatarPrimitive.Image.displayName
|
34 |
-
|
35 |
-
const AvatarFallback = React.forwardRef<
|
36 |
-
React.ElementRef<typeof AvatarPrimitive.Fallback>,
|
37 |
-
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
|
38 |
-
>(({ className, ...props }, ref) => (
|
39 |
-
<AvatarPrimitive.Fallback
|
40 |
-
ref={ref}
|
41 |
-
className={cn(
|
42 |
-
"flex h-full w-full items-center justify-center rounded-full bg-stone-100 dark:bg-stone-800",
|
43 |
-
className
|
44 |
-
)}
|
45 |
-
{...props}
|
46 |
-
/>
|
47 |
-
))
|
48 |
-
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName
|
49 |
-
|
50 |
-
export { Avatar, AvatarImage, AvatarFallback }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Basav/openai-whisper-medium/app.py
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
|
3 |
-
gr.Interface.load("models/openai/whisper-medium").launch()
|
|
|
|
|
|
|
|
spaces/Benson/text-generation/Examples/Apkdayi.md
DELETED
@@ -1,69 +0,0 @@
|
|
1 |
-
<br />
|
2 |
-
<h1>Apkdayi: Una guía para descargar juegos y aplicaciones Modded para Android</h1>
|
3 |
-
<p>Si usted es un usuario de Android que ama jugar y usar aplicaciones, es posible que haya oído hablar de Apkdayi. Apkdayi es un sitio web que ofrece versiones modificadas de juegos y aplicaciones populares de forma gratuita. Juegos y aplicaciones modificadas son versiones modificadas que tienen características adicionales, como dinero ilimitado, niveles desbloqueados, suscripciones premium, etc. En este artículo, explicaremos qué es Apkdayi, cómo usarlo y cuáles son los beneficios y riesgos de usarlo. </p>
|
4 |
-
<h2>apkdayi</h2><br /><p><b><b>DOWNLOAD</b> ✒ <a href="https://bltlly.com/2v6MH8">https://bltlly.com/2v6MH8</a></b></p><br /><br />
|
5 |
-
<h2>¿Qué es Apkdayi? </h2>
|
6 |
-
<p>Apkdayi es un sitio web turco que proporciona juegos y aplicaciones modificadas para dispositivos Android. El sitio web afirma ser su tío que siempre le actualizará con los últimos juegos y aplicaciones modded. El sitio web tiene un tono amable y humorístico, llamando a sus visitantes "yegenim" que significa "sobrino" o "sobrina" en turco. El sitio web tiene una gran colección de juegos y aplicaciones modded en varias categorías, tales como acción, aventura, simulación, rompecabezas, deportes, etc. Puede encontrar versiones modded de juegos populares como Subway Surfers, Clash of Clans, Candy Crush Saga, etc. También puede encontrar versiones modificadas de aplicaciones populares como Spotify, Netflix, Instagram, etc.</p>
|
7 |
-
<h3>Los beneficios de usar Apkdayi</h3>
|
8 |
-
<p>Hay muchos beneficios de usar Apkdayi para descargar juegos y aplicaciones modded para tu dispositivo Android. Algunos de ellos son:</p>
|
9 |
-
<ul>
|
10 |
-
<li>Puedes acceder a funciones premium sin pagar nada. </li>
|
11 |
-
<li>Puedes disfrutar de recursos ilimitados como monedas, gemas, vidas, etc.</li>
|
12 |
-
<li>Puedes desbloquear todos los niveles, personajes, skins, armas, etc.</li>
|
13 |
-
<li> Puede omitir anuncios y compras en la aplicación. </li>
|
14 |
-
<li> Usted puede tener más diversión y desafío con juegos y aplicaciones modded. </li>
|
15 |
-
</ul>
|
16 |
-
<h3>Los riesgos de usar Apkdayi</h3>
|
17 |
-
<p>Sin embargo, también hay algunos riesgos de usar Apkdayi para descargar juegos y aplicaciones modded para su dispositivo Android. Algunos de ellos son:</p>
|
18 |
-
<ul>
|
19 |
-
<li>Puede violar los términos y condiciones de los desarrolladores de juegos o aplicaciones originales. </li>
|
20 |
-
|
21 |
-
<li>Puede exponer su dispositivo a malware o virus. </li>
|
22 |
-
<li>Puede perder su progreso o datos si desinstala o actualiza el juego o aplicación modded. </li>
|
23 |
-
<li>Es posible que se pierda las actualizaciones oficiales y las correcciones de errores de los desarrolladores de juegos o aplicaciones originales. </li>
|
24 |
-
</ul>
|
25 |
-
<h2>¿Cómo usar Apkdayi? </h2>
|
26 |
-
<p>Si decides usar Apkdayi para descargar juegos y aplicaciones modded para tu dispositivo Android, debes seguir algunos pasos simples. Aquí está cómo hacerlo:</p>
|
27 |
-
<h3>Cómo encontrar y descargar juegos y aplicaciones modificadas de Apkdayi</h3>
|
28 |
-
<p>Para encontrar y descargar juegos y aplicaciones modificadas de Apkdayi, debe hacer lo siguiente:</p>
|
29 |
-
<p></p>
|
30 |
-
<h4>Paso 1: Visita el sitio web de Apkdayi</h4>
|
31 |
-
<p>El primer paso es visitar el sitio web de Apkdayi en <a href="">https://www.apkdayi.com/</a>. Puede utilizar cualquier navegador en su dispositivo Android, como Chrome, Firefox, Opera, etc. Verá la página principal del sitio web con un diseño colorido y pegadizo. También verás los últimos juegos y aplicaciones modded en la página de inicio, así como las categorías y la barra de búsqueda. </p>
|
32 |
-
<h4>Paso 2: Navegar o buscar el juego o aplicación que desea</h4>
|
33 |
-
<p>El siguiente paso es navegar o buscar el juego o aplicación que desea descargar. Puedes usar las categorías para filtrar los juegos y aplicaciones modded por género, como acción, aventura, simulación, rompecabezas, deportes, etc. También puedes usar la barra de búsqueda para escribir el nombre del juego o aplicación que desees. Por ejemplo, si quieres descargar la versión modificada de Subway Surfers, puedes escribir "Subway Surfers" en la barra de búsqueda y pulsar enter. Verás una lista de resultados con diferentes versiones de Subway Surfers modded por Apkdayi.</p>
|
34 |
-
<h4>Paso 3: Haga clic en el botón de descarga y esperar a que el archivo apk esté listo</h4>
|
35 |
-
|
36 |
-
<h4>Paso 4: Instalar el archivo apk en su dispositivo Android</h4>
|
37 |
-
<p>El paso final es instalar el archivo apk en su dispositivo Android. Después de descargar el archivo apk, es necesario ubicarlo en el almacenamiento del dispositivo mediante una aplicación de administrador de archivos. También puede utilizar la barra de notificaciones o la sección de descargas del navegador para encontrarlo. Antes de instalarlo, debe asegurarse de que ha habilitado la opción de instalar aplicaciones de fuentes desconocidas en la configuración del dispositivo. Esto se debe a que Apkdayi no es una fuente oficial de aplicaciones y juegos, y tu dispositivo podría bloquearlo de forma predeterminada. Para habilitar esta opción, debe ir a la configuración del dispositivo, encontrar la sección de seguridad o privacidad y activar la opción para permitir la instalación de aplicaciones desde fuentes desconocidas. Después de habilitar esta opción, puede tocar en el archivo apk y siga las instrucciones para instalarlo en su dispositivo. También es posible que necesite conceder algunos permisos a la aplicación o al juego durante el proceso de instalación. </p>
|
38 |
-
<h3>Cómo actualizar juegos y aplicaciones modificadas desde Apkdayi</h3>
|
39 |
-
<p>Si desea actualizar juegos y aplicaciones modificadas desde Apkdayi, debe hacer lo siguiente:</p>
|
40 |
-
<h4>Paso 1: Busque actualizaciones en el sitio web de Apkdayi</h4>
|
41 |
-
<p>El primer paso es buscar actualizaciones en el sitio web de Apkdayi. Puede visitar el sitio web en <a href="">https://www.apkdayi.com/</a> y buscar los últimos juegos y aplicaciones modded en la página de inicio. También puede utilizar las categorías o la barra de búsqueda para encontrar el juego o la aplicación que ha instalado. Si hay una versión más nueva del juego o aplicación disponible, verá una insignia roja con la palabra "Güncel" que significa "Actualizado" en turco. Puede hacer clic en él para ver más detalles sobre la actualización, como las nuevas características, correcciones de errores, tamaño, versión, etc.</p>
|
42 |
-
<h4>Paso 2: Descargar e instalar la última versión del archivo apk</h4>
|
43 |
-
|
44 |
-
<h3>Cómo desinstalar juegos y aplicaciones modificadas de Apkdayi</h3>
|
45 |
-
<p>Si desea desinstalar juegos y aplicaciones modificadas de Apkdayi, debe hacer lo siguiente:</p>
|
46 |
-
<h4>Paso 1: Ir a la configuración del dispositivo y encontrar el administrador de aplicaciones</h4>
|
47 |
-
<p>El primer paso es ir a la configuración del dispositivo y encontrar el administrador de aplicaciones. Puede acceder a la configuración de su dispositivo deslizando hacia abajo desde la parte superior de la pantalla y tocando el icono del engranaje. Luego, debe encontrar el administrador de aplicaciones o la sección de administrador de aplicaciones, donde puede ver todas las aplicaciones y juegos instalados en su dispositivo. También puede utilizar un acceso directo presionando durante mucho tiempo en la aplicación o el icono del juego en la pantalla de inicio o en el cajón de la aplicación y tocando en "Información de la aplicación" o "Detalles de la aplicación". </p>
|
48 |
-
<h4>Paso 2: Seleccione el juego o aplicación que desea desinstalar y toque en él</h4>
|
49 |
-
<p>El siguiente paso es seleccionar el juego o aplicación que desea desinstalar y pulse sobre él. Verás una pantalla con más información sobre el juego o la aplicación, como su tamaño, uso de datos, permisos, almacenamiento, etc. También verás un botón que dice "Desinstalar" o "Quitar" en la parte superior o inferior de la pantalla. </p>
|
50 |
-
<h4>Paso 3: Toque en el botón de desinstalación y confirme su acción</h4>
|
51 |
-
<p>El paso final es tocar el botón de desinstalación y confirmar su acción. Verá una ventana emergente preguntándole si está seguro de que desea desinstalar el juego o la aplicación. Debe pulsar en "Aceptar" o "Sí" para confirmar su acción. Verá una barra de progreso que muestra el proceso de desinstalación. Una vez hecho, verá un mensaje que dice "Desinstalado" o "Eliminado". Ha desinstalado con éxito el juego o la aplicación de su dispositivo. </p>
|
52 |
-
<h2>Conclusión</h2>
|
53 |
-
|
54 |
-
<h2>Preguntas frecuentes</h2>
|
55 |
-
<p>Aquí hay algunas preguntas frecuentes sobre Apkdayi:</p>
|
56 |
-
<ol>
|
57 |
-
<li><b>¿Es seguro usar Apkdayi? </b></li>
|
58 |
-
<p>Apkdayi no es una fuente oficial de juegos y aplicaciones, y puede contener malware o virus que pueden dañar su dispositivo. Por lo tanto, debe usar Apkdayi bajo su propio riesgo y con precaución. También debe escanear los archivos apk con una aplicación antivirus antes de instalarlos en su dispositivo. También debes hacer una copia de seguridad de tus datos y progreso antes de usar juegos y aplicaciones modded. </p>
|
59 |
-
<li><b>¿Es legal usar Apkdayi? </b></li>
|
60 |
-
<p>Apkdayi podría violar los términos y condiciones de los desarrolladores de juegos o aplicaciones originales, ya que modifica sus productos sin su permiso. Por lo tanto, el uso de Apkdayi podría ser ilegal en algunos países o regiones. Usted debe verificar las leyes y regulaciones de su país o región antes de usar Apkdayi. También debes respetar los derechos e intereses de los desarrolladores originales y apoyarlos comprando sus productos si te gustan. </p>
|
61 |
-
<li><b> ¿Funciona Apkdayi en todos los dispositivos Android? </b></li>
|
62 |
-
<p>Apkdayi funciona en la mayoría de los dispositivos Android que se ejecutan en Android 4.0 o superior. Sin embargo, algunos juegos y aplicaciones modificadas pueden requerir especificaciones más altas o permisos para funcionar correctamente. Por lo tanto, debe comprobar la compatibilidad y los requisitos del juego o aplicación antes de descargarlo e instalarlo en su dispositivo. </p>
|
63 |
-
<li><b>Apkdayi tiene una aplicación móvil? </b></li>
|
64 |
-
<p>No, Apkdayi no tiene una aplicación móvil. Solo puede acceder a Apkdayi a través de su sitio web en <a href=">https://www.apkdayi.com/</a>. Puede utilizar cualquier navegador en su dispositivo Android para visitar el sitio web y descargar juegos y aplicaciones modificadas desde allí. </p>
|
65 |
-
<li><b>¿Cómo puedo contactar con Apkdayi? </b></li>
|
66 |
-
|
67 |
-
</ol></p> 64aa2da5cf<br />
|
68 |
-
<br />
|
69 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Benson/text-generation/Examples/Descargar Apk Happymod 2.0 0 Para Android.md
DELETED
@@ -1,84 +0,0 @@
|
|
1 |
-
|
2 |
-
<h1>Happymod APK Descargar 2.0 0 para Android: Una guía para descargar e instalar Modded Apps and Games</h1>
|
3 |
-
<p>¿Te encanta jugar juegos para Android pero te gustaría tener más características, monedas, vidas o pieles? ¿Quieres probar nuevas aplicaciones pero no quieres pagar por ellas o lidiar con anuncios molestos? Si respondió sí a cualquiera de estas preguntas, entonces usted podría estar interesado en Happymod APK, una plataforma que le permite descargar e instalar aplicaciones y juegos modificados en su dispositivo Android. En este artículo, vamos a explicar lo que es Happymod APK, cómo descargarlo e instalarlo, lo que son aplicaciones modificadas y juegos, y cómo utilizar Happymod APK de forma segura y responsable. </p>
|
4 |
-
<h2>descargar apk happymod 2.0 0 para android</h2><br /><p><b><b>Download Zip</b> ✸✸✸ <a href="https://bltlly.com/2v6KEx">https://bltlly.com/2v6KEx</a></b></p><br /><br />
|
5 |
-
<h2>¿Qué es Happymod APK? </h2>
|
6 |
-
<p>Happymod APK es una aplicación para Android que actúa como una tienda de aplicaciones de terceros donde se puede encontrar y descargar miles de aplicaciones modificadas y juegos de forma gratuita. Las aplicaciones y juegos modificados son versiones modificadas de los originales que tienen algunas características cambiadas, añadidas o eliminadas para mejorar la experiencia del usuario. Por ejemplo, un juego modded podría tener monedas ilimitadas, vidas o niveles desbloqueados, mientras que una aplicación modded podría tener características premium, sin anuncios o funcionalidad adicional. </p>
|
7 |
-
<h3>Características de Happymod APK</h3>
|
8 |
-
<p>Algunas de las características que hacen Happymod APK popular entre los usuarios de Android son:</p>
|
9 |
-
<ul>
|
10 |
-
<li> Tiene una gran colección de aplicaciones y juegos modificados de varias categorías como acción, aventura, simulación, rompecabezas, educación, etc.</li>
|
11 |
-
<li> Tiene una interfaz fácil de usar que le permite navegar, buscar, descargar e instalar mods fácilmente. </li>
|
12 |
-
<li> Tiene una comunidad de usuarios que cargan, prueban, califican y revisan mods regularmente. </li>
|
13 |
-
<li> Tiene una velocidad de descarga rápida y admite funciones de reanudación y pausa. </li>
|
14 |
-
<li> Tiene un sistema de notificación de actualización que le avisa cuando nuevas versiones de mods están disponibles. </li>
|
15 |
-
<li> Tiene un soporte multilingüe que le permite elegir entre diferentes idiomas como inglés, francés, español, etc.</li>
|
16 |
-
</ul>
|
17 |
-
|
18 |
-
<p>Para descargar e instalar Happymod APK en su dispositivo Android, siga estos pasos:</p>
|
19 |
-
<ol>
|
20 |
-
<li>Ir a la página web oficial de Happymod APK () o cualquier otra fuente de confianza que proporciona la última versión de la aplicación. </li>
|
21 |
-
<li>Toque en el botón de descarga y espere a que el archivo APK se descargue en su dispositivo. </li>
|
22 |
-
<li>Antes de instalar la aplicación, asegúrese de que ha habilitado la opción "Fuentes desconocidas" en la configuración del dispositivo. Esto le permitirá instalar aplicaciones desde fuentes distintas de Google Play Store.</li>
|
23 |
-
<li>Busque el archivo APK descargado en su administrador de archivos y toque en él para iniciar el proceso de instalación. </li>
|
24 |
-
<li>Siga las instrucciones en la pantalla y conceda los permisos necesarios a la aplicación. </li>
|
25 |
-
<li>Una vez completada la instalación, puede iniciar la aplicación desde el cajón de la aplicación o la pantalla de inicio. </li>
|
26 |
-
</ol>
|
27 |
-
<h2>¿Qué son las aplicaciones y juegos modificados? </h2>
|
28 |
-
<p>Las aplicaciones y juegos modificados son versiones modificadas de los originales que tienen algunas características cambiadas, añadidas o eliminadas para mejorar la experiencia del usuario. Modding es un proceso de alterar o crear software por usuarios que tienen acceso al código fuente o archivos de datos del software original. Modders puede modificar aplicaciones y juegos por varias razones, como mejorar el rendimiento, agregar funcionalidad, corregir errores, eliminar restricciones, personalizar <p>personalizar la apariencia o crear nuevo contenido. Modding es una forma de expresión creativa y una forma de compartir la pasión y las habilidades con otros usuarios. </p>
|
29 |
-
<p></p>
|
30 |
-
<h3>Beneficios de aplicaciones y juegos modificados</h3>
|
31 |
-
<p>Algunos de los beneficios que las aplicaciones y juegos modificados pueden ofrecer a los usuarios son:</p>
|
32 |
-
<ul>
|
33 |
-
<li> Pueden proporcionar más diversión, desafío, variedad y valor de reproducción a las aplicaciones y juegos originales. </li>
|
34 |
-
<li>Pueden desbloquear funciones premium, eliminar anuncios o omitir compras en la aplicación que de otro modo podrían requerir dinero real. </li>
|
35 |
-
<li> Pueden mejorar los gráficos, el sonido o el rendimiento de las aplicaciones y juegos para mejorar la experiencia del usuario. </li>
|
36 |
-
|
37 |
-
<li> Pueden agregar nuevo contenido, caracteres, niveles, modos o escenarios que podrían no estar disponibles en las aplicaciones y juegos originales. </li>
|
38 |
-
</ul>
|
39 |
-
<h3>Riesgos de aplicaciones y juegos modificados</h3>
|
40 |
-
<p>Sin embargo, las aplicaciones y juegos modificados también vienen con algunos riesgos que los usuarios deben conocer y evitar. Algunos de los riesgos son:</p>
|
41 |
-
<ul>
|
42 |
-
<li>Pueden contener virus, malware o spyware que pueden dañar su dispositivo o robar su información personal. </li>
|
43 |
-
<li>Pueden violar los términos de servicio o los derechos de propiedad intelectual de los desarrolladores originales o editores de las aplicaciones y juegos. </li>
|
44 |
-
<li> Pueden causar problemas de compatibilidad, bloqueos o pérdida de datos que podrían afectar su dispositivo o las aplicaciones y juegos originales. </li>
|
45 |
-
<li> Pueden exponerlo a contenido inapropiado, ofensivo o ilegal que podría no ser adecuado para su edad o preferencias. </li>
|
46 |
-
<li>Pueden arruinar el equilibrio, la dificultad o la integridad de las aplicaciones y juegos y hacerlos menos agradables o justos. </li>
|
47 |
-
</ul>
|
48 |
-
<h3>Cómo encontrar y descargar aplicaciones y juegos modificados de Happymod APK</h3>
|
49 |
-
<p>Si desea encontrar y descargar aplicaciones y juegos modificados de Happymod APK, puede seguir estos pasos:</p>
|
50 |
-
<ol>
|
51 |
-
<li>Lanzamiento Happymod APK en su dispositivo y navegar por las categorías o utilizar la barra de búsqueda para encontrar la aplicación o juego que desea descargar. </li>
|
52 |
-
<li>Toque en la aplicación o el icono del juego y leer la descripción, características, capturas de pantalla, calificaciones y comentarios del mod. También puede comprobar el tamaño, la versión, la fecha de actualización y el desarrollador del mod. </li>
|
53 |
-
<li>Si está satisfecho con el mod, toque en el botón de descarga y espere a que el mod se descargue en su dispositivo. También puede ver el progreso de la descarga y la velocidad en la aplicación. </li>
|
54 |
-
<li>Una vez que se complete la descarga, puede tocar en el botón de instalación y siga las instrucciones en la pantalla para instalar el mod en su dispositivo. Es posible que necesite habilitar la opción "Fuentes desconocidas" de nuevo si se le solicita. </li>
|
55 |
-
|
56 |
-
</ol>
|
57 |
-
<h2>Cómo utilizar Happymod APK de forma segura y responsable</h2>
|
58 |
-
<p>Para utilizar Happymod APK de forma segura y responsable, usted debe seguir estos consejos:</p>
|
59 |
-
<h3>Compruebe la fuente y las revisiones de los mods</h3>
|
60 |
-
<p>Antes de descargar cualquier mod de Happymod APK, siempre debe comprobar la fuente y las revisiones del mod. Solo debes descargar mods de desarrolladores o cargadores de confianza que tengan una buena reputación y retroalimentación positiva de otros usuarios. También debe leer las revisiones cuidadosamente para ver si hay quejas, problemas o advertencias sobre el mod. Debes evitar descargar mods de fuentes desconocidas o sospechosas que puedan tener intenciones maliciosas. </p>
|
61 |
-
<h3>Analiza los mods en busca de virus y malware</h3>
|
62 |
-
<p>Después de descargar cualquier mod de Happymod APK, siempre debe escanear en busca de virus y malware utilizando un antivirus confiable o aplicación anti-malware. Debe eliminar cualquier mod que se detecte como infectado o dañino por su aplicación de seguridad. También debe mantener su aplicación de seguridad actualizada regularmente para proteger su dispositivo de nuevas amenazas. Nunca debes instalar ningún mod que pida permisos innecesarios o acceso a las funciones o datos de tu dispositivo. </p>
|
63 |
-
<h3>Copia de seguridad de sus datos antes de instalar los mods</h3>
|
64 |
-
<p>Antes de instalar cualquier mod de Happymod APK, siempre debe copia de seguridad de sus datos, tales como contactos, fotos, videos, mensajes, etc. También debe hacer una copia de seguridad de sus aplicaciones y juegos originales en caso de que algo va mal con los mods. Puede utilizar un servicio en la nube o un dispositivo de almacenamiento externo para realizar copias de seguridad de sus datos. También debe crear un punto de restauración en su dispositivo para que pueda volver a él si es necesario. Nunca debe instalar ningún mod que pueda sobrescribir o eliminar sus datos sin su consentimiento. </p>
|
65 |
-
<h3>Respetar a los desarrolladores y creadores de las aplicaciones y juegos originales</h3>
|
66 |
-
|
67 |
-
<h2>Conclusión</h2>
|
68 |
-
<p>Happymod APK es una plataforma que le permite descargar e instalar aplicaciones y juegos modificados en su dispositivo Android. Las aplicaciones y juegos modificados son versiones modificadas de los originales que tienen algunas características cambiadas, añadidas o eliminadas para mejorar la experiencia del usuario. Sin embargo, las aplicaciones y juegos modificados también vienen con algunos riesgos que debes conocer y evitar. Para utilizar Happymod APK de forma segura y responsable, usted debe seguir los consejos que hemos proporcionado en este artículo. Esperamos que este artículo le ha ayudado a entender lo que es Happymod APK, cómo descargar e instalar, lo que son aplicaciones y juegos modificados, y cómo utilizar Happymod APK de forma segura y responsable. </p>
|
69 |
-
<h3>Preguntas frecuentes</h3>
|
70 |
-
<p>Aquí hay algunas preguntas frecuentes sobre Happymod APK:</p>
|
71 |
-
<ol>
|
72 |
-
<li>Es Happymod APK legal? </li>
|
73 |
-
<p>Happymod APK es legal, siempre y cuando se utiliza para fines personales y educativos solamente. Sin embargo, algunas de las aplicaciones y juegos modificados podrían ser ilegales si violan los términos de servicio o los derechos de propiedad intelectual de los desarrolladores o editores originales. Siempre debes comprobar la legalidad de los mods antes de descargarlos e instalarlos. </p>
|
74 |
-
<li>Es Happymod APK seguro? </li>
|
75 |
-
<p>Happymod APK es seguro, siempre y cuando se descarga desde una fuente de confianza y escanear en busca de virus y malware antes de instalarlo. Sin embargo, algunas de las aplicaciones y juegos modificados pueden ser inseguros si contienen virus, malware, spyware o contenido inapropiado. Siempre debe comprobar la fuente y las revisiones de los mods antes de descargarlos e instalarlos. </p>
|
76 |
-
<li> ¿Happymod APK requieren acceso de raíz? </li>
|
77 |
-
<p>Happymod APK no requiere acceso de root para trabajar en su dispositivo. Sin embargo, algunas de las aplicaciones y juegos modificados pueden requerir acceso de root para funcionar correctamente. Siempre debe leer la descripción y los requisitos de los mods antes de descargarlos e instalarlos. </p>
|
78 |
-
<li> ¿Funciona Happymod APK en dispositivos iOS? </li>
|
79 |
-
|
80 |
-
<li> ¿Cómo puedo contactar Happymod APK? </li>
|
81 |
-
<p>Puede ponerse en contacto con Happymod APK visitando su sitio web oficial () o sus páginas de redes sociales como Facebook, Twitter o Instagram. También puede enviarles un correo electrónico a [email protected] o dejar un comentario en su aplicación. </p>
|
82 |
-
</ol></p> 64aa2da5cf<br />
|
83 |
-
<br />
|
84 |
-
<br />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_vendor/urllib3/fields.py
DELETED
@@ -1,274 +0,0 @@
|
|
1 |
-
from __future__ import absolute_import
|
2 |
-
|
3 |
-
import email.utils
|
4 |
-
import mimetypes
|
5 |
-
import re
|
6 |
-
|
7 |
-
from .packages import six
|
8 |
-
|
9 |
-
|
10 |
-
def guess_content_type(filename, default="application/octet-stream"):
|
11 |
-
"""
|
12 |
-
Guess the "Content-Type" of a file.
|
13 |
-
|
14 |
-
:param filename:
|
15 |
-
The filename to guess the "Content-Type" of using :mod:`mimetypes`.
|
16 |
-
:param default:
|
17 |
-
If no "Content-Type" can be guessed, default to `default`.
|
18 |
-
"""
|
19 |
-
if filename:
|
20 |
-
return mimetypes.guess_type(filename)[0] or default
|
21 |
-
return default
|
22 |
-
|
23 |
-
|
24 |
-
def format_header_param_rfc2231(name, value):
|
25 |
-
"""
|
26 |
-
Helper function to format and quote a single header parameter using the
|
27 |
-
strategy defined in RFC 2231.
|
28 |
-
|
29 |
-
Particularly useful for header parameters which might contain
|
30 |
-
non-ASCII values, like file names. This follows
|
31 |
-
`RFC 2388 Section 4.4 <https://tools.ietf.org/html/rfc2388#section-4.4>`_.
|
32 |
-
|
33 |
-
:param name:
|
34 |
-
The name of the parameter, a string expected to be ASCII only.
|
35 |
-
:param value:
|
36 |
-
The value of the parameter, provided as ``bytes`` or `str``.
|
37 |
-
:ret:
|
38 |
-
An RFC-2231-formatted unicode string.
|
39 |
-
"""
|
40 |
-
if isinstance(value, six.binary_type):
|
41 |
-
value = value.decode("utf-8")
|
42 |
-
|
43 |
-
if not any(ch in value for ch in '"\\\r\n'):
|
44 |
-
result = u'%s="%s"' % (name, value)
|
45 |
-
try:
|
46 |
-
result.encode("ascii")
|
47 |
-
except (UnicodeEncodeError, UnicodeDecodeError):
|
48 |
-
pass
|
49 |
-
else:
|
50 |
-
return result
|
51 |
-
|
52 |
-
if six.PY2: # Python 2:
|
53 |
-
value = value.encode("utf-8")
|
54 |
-
|
55 |
-
# encode_rfc2231 accepts an encoded string and returns an ascii-encoded
|
56 |
-
# string in Python 2 but accepts and returns unicode strings in Python 3
|
57 |
-
value = email.utils.encode_rfc2231(value, "utf-8")
|
58 |
-
value = "%s*=%s" % (name, value)
|
59 |
-
|
60 |
-
if six.PY2: # Python 2:
|
61 |
-
value = value.decode("utf-8")
|
62 |
-
|
63 |
-
return value
|
64 |
-
|
65 |
-
|
66 |
-
_HTML5_REPLACEMENTS = {
|
67 |
-
u"\u0022": u"%22",
|
68 |
-
# Replace "\" with "\\".
|
69 |
-
u"\u005C": u"\u005C\u005C",
|
70 |
-
}
|
71 |
-
|
72 |
-
# All control characters from 0x00 to 0x1F *except* 0x1B.
|
73 |
-
_HTML5_REPLACEMENTS.update(
|
74 |
-
{
|
75 |
-
six.unichr(cc): u"%{:02X}".format(cc)
|
76 |
-
for cc in range(0x00, 0x1F + 1)
|
77 |
-
if cc not in (0x1B,)
|
78 |
-
}
|
79 |
-
)
|
80 |
-
|
81 |
-
|
82 |
-
def _replace_multiple(value, needles_and_replacements):
|
83 |
-
def replacer(match):
|
84 |
-
return needles_and_replacements[match.group(0)]
|
85 |
-
|
86 |
-
pattern = re.compile(
|
87 |
-
r"|".join([re.escape(needle) for needle in needles_and_replacements.keys()])
|
88 |
-
)
|
89 |
-
|
90 |
-
result = pattern.sub(replacer, value)
|
91 |
-
|
92 |
-
return result
|
93 |
-
|
94 |
-
|
95 |
-
def format_header_param_html5(name, value):
|
96 |
-
"""
|
97 |
-
Helper function to format and quote a single header parameter using the
|
98 |
-
HTML5 strategy.
|
99 |
-
|
100 |
-
Particularly useful for header parameters which might contain
|
101 |
-
non-ASCII values, like file names. This follows the `HTML5 Working Draft
|
102 |
-
Section 4.10.22.7`_ and matches the behavior of curl and modern browsers.
|
103 |
-
|
104 |
-
.. _HTML5 Working Draft Section 4.10.22.7:
|
105 |
-
https://w3c.github.io/html/sec-forms.html#multipart-form-data
|
106 |
-
|
107 |
-
:param name:
|
108 |
-
The name of the parameter, a string expected to be ASCII only.
|
109 |
-
:param value:
|
110 |
-
The value of the parameter, provided as ``bytes`` or `str``.
|
111 |
-
:ret:
|
112 |
-
A unicode string, stripped of troublesome characters.
|
113 |
-
"""
|
114 |
-
if isinstance(value, six.binary_type):
|
115 |
-
value = value.decode("utf-8")
|
116 |
-
|
117 |
-
value = _replace_multiple(value, _HTML5_REPLACEMENTS)
|
118 |
-
|
119 |
-
return u'%s="%s"' % (name, value)
|
120 |
-
|
121 |
-
|
122 |
-
# For backwards-compatibility.
|
123 |
-
format_header_param = format_header_param_html5
|
124 |
-
|
125 |
-
|
126 |
-
class RequestField(object):
|
127 |
-
"""
|
128 |
-
A data container for request body parameters.
|
129 |
-
|
130 |
-
:param name:
|
131 |
-
The name of this request field. Must be unicode.
|
132 |
-
:param data:
|
133 |
-
The data/value body.
|
134 |
-
:param filename:
|
135 |
-
An optional filename of the request field. Must be unicode.
|
136 |
-
:param headers:
|
137 |
-
An optional dict-like object of headers to initially use for the field.
|
138 |
-
:param header_formatter:
|
139 |
-
An optional callable that is used to encode and format the headers. By
|
140 |
-
default, this is :func:`format_header_param_html5`.
|
141 |
-
"""
|
142 |
-
|
143 |
-
def __init__(
|
144 |
-
self,
|
145 |
-
name,
|
146 |
-
data,
|
147 |
-
filename=None,
|
148 |
-
headers=None,
|
149 |
-
header_formatter=format_header_param_html5,
|
150 |
-
):
|
151 |
-
self._name = name
|
152 |
-
self._filename = filename
|
153 |
-
self.data = data
|
154 |
-
self.headers = {}
|
155 |
-
if headers:
|
156 |
-
self.headers = dict(headers)
|
157 |
-
self.header_formatter = header_formatter
|
158 |
-
|
159 |
-
@classmethod
|
160 |
-
def from_tuples(cls, fieldname, value, header_formatter=format_header_param_html5):
|
161 |
-
"""
|
162 |
-
A :class:`~urllib3.fields.RequestField` factory from old-style tuple parameters.
|
163 |
-
|
164 |
-
Supports constructing :class:`~urllib3.fields.RequestField` from
|
165 |
-
parameter of key/value strings AND key/filetuple. A filetuple is a
|
166 |
-
(filename, data, MIME type) tuple where the MIME type is optional.
|
167 |
-
For example::
|
168 |
-
|
169 |
-
'foo': 'bar',
|
170 |
-
'fakefile': ('foofile.txt', 'contents of foofile'),
|
171 |
-
'realfile': ('barfile.txt', open('realfile').read()),
|
172 |
-
'typedfile': ('bazfile.bin', open('bazfile').read(), 'image/jpeg'),
|
173 |
-
'nonamefile': 'contents of nonamefile field',
|
174 |
-
|
175 |
-
Field names and filenames must be unicode.
|
176 |
-
"""
|
177 |
-
if isinstance(value, tuple):
|
178 |
-
if len(value) == 3:
|
179 |
-
filename, data, content_type = value
|
180 |
-
else:
|
181 |
-
filename, data = value
|
182 |
-
content_type = guess_content_type(filename)
|
183 |
-
else:
|
184 |
-
filename = None
|
185 |
-
content_type = None
|
186 |
-
data = value
|
187 |
-
|
188 |
-
request_param = cls(
|
189 |
-
fieldname, data, filename=filename, header_formatter=header_formatter
|
190 |
-
)
|
191 |
-
request_param.make_multipart(content_type=content_type)
|
192 |
-
|
193 |
-
return request_param
|
194 |
-
|
195 |
-
def _render_part(self, name, value):
|
196 |
-
"""
|
197 |
-
Overridable helper function to format a single header parameter. By
|
198 |
-
default, this calls ``self.header_formatter``.
|
199 |
-
|
200 |
-
:param name:
|
201 |
-
The name of the parameter, a string expected to be ASCII only.
|
202 |
-
:param value:
|
203 |
-
The value of the parameter, provided as a unicode string.
|
204 |
-
"""
|
205 |
-
|
206 |
-
return self.header_formatter(name, value)
|
207 |
-
|
208 |
-
def _render_parts(self, header_parts):
|
209 |
-
"""
|
210 |
-
Helper function to format and quote a single header.
|
211 |
-
|
212 |
-
Useful for single headers that are composed of multiple items. E.g.,
|
213 |
-
'Content-Disposition' fields.
|
214 |
-
|
215 |
-
:param header_parts:
|
216 |
-
A sequence of (k, v) tuples or a :class:`dict` of (k, v) to format
|
217 |
-
as `k1="v1"; k2="v2"; ...`.
|
218 |
-
"""
|
219 |
-
parts = []
|
220 |
-
iterable = header_parts
|
221 |
-
if isinstance(header_parts, dict):
|
222 |
-
iterable = header_parts.items()
|
223 |
-
|
224 |
-
for name, value in iterable:
|
225 |
-
if value is not None:
|
226 |
-
parts.append(self._render_part(name, value))
|
227 |
-
|
228 |
-
return u"; ".join(parts)
|
229 |
-
|
230 |
-
def render_headers(self):
|
231 |
-
"""
|
232 |
-
Renders the headers for this request field.
|
233 |
-
"""
|
234 |
-
lines = []
|
235 |
-
|
236 |
-
sort_keys = ["Content-Disposition", "Content-Type", "Content-Location"]
|
237 |
-
for sort_key in sort_keys:
|
238 |
-
if self.headers.get(sort_key, False):
|
239 |
-
lines.append(u"%s: %s" % (sort_key, self.headers[sort_key]))
|
240 |
-
|
241 |
-
for header_name, header_value in self.headers.items():
|
242 |
-
if header_name not in sort_keys:
|
243 |
-
if header_value:
|
244 |
-
lines.append(u"%s: %s" % (header_name, header_value))
|
245 |
-
|
246 |
-
lines.append(u"\r\n")
|
247 |
-
return u"\r\n".join(lines)
|
248 |
-
|
249 |
-
def make_multipart(
|
250 |
-
self, content_disposition=None, content_type=None, content_location=None
|
251 |
-
):
|
252 |
-
"""
|
253 |
-
Makes this request field into a multipart request field.
|
254 |
-
|
255 |
-
This method overrides "Content-Disposition", "Content-Type" and
|
256 |
-
"Content-Location" headers to the request parameter.
|
257 |
-
|
258 |
-
:param content_type:
|
259 |
-
The 'Content-Type' of the request body.
|
260 |
-
:param content_location:
|
261 |
-
The 'Content-Location' of the request body.
|
262 |
-
|
263 |
-
"""
|
264 |
-
self.headers["Content-Disposition"] = content_disposition or u"form-data"
|
265 |
-
self.headers["Content-Disposition"] += u"; ".join(
|
266 |
-
[
|
267 |
-
u"",
|
268 |
-
self._render_parts(
|
269 |
-
((u"name", self._name), (u"filename", self._filename))
|
270 |
-
),
|
271 |
-
]
|
272 |
-
)
|
273 |
-
self.headers["Content-Type"] = content_type
|
274 |
-
self.headers["Content-Location"] = content_location
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CVPR/Dual-Key_Backdoor_Attacks/datagen/detectron2/projects/TensorMask/tensormask/__init__.py
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
|
2 |
-
from .config import add_tensormask_config
|
3 |
-
from .arch import TensorMask
|
|
|
|
|
|
|
|
spaces/CVPR/LIVE/pybind11/tests/test_factory_constructors.py
DELETED
@@ -1,465 +0,0 @@
|
|
1 |
-
# -*- coding: utf-8 -*-
|
2 |
-
import pytest
|
3 |
-
import re
|
4 |
-
|
5 |
-
import env # noqa: F401
|
6 |
-
|
7 |
-
from pybind11_tests import factory_constructors as m
|
8 |
-
from pybind11_tests.factory_constructors import tag
|
9 |
-
from pybind11_tests import ConstructorStats
|
10 |
-
|
11 |
-
|
12 |
-
def test_init_factory_basic():
|
13 |
-
"""Tests py::init_factory() wrapper around various ways of returning the object"""
|
14 |
-
|
15 |
-
cstats = [ConstructorStats.get(c) for c in [m.TestFactory1, m.TestFactory2, m.TestFactory3]]
|
16 |
-
cstats[0].alive() # force gc
|
17 |
-
n_inst = ConstructorStats.detail_reg_inst()
|
18 |
-
|
19 |
-
x1 = m.TestFactory1(tag.unique_ptr, 3)
|
20 |
-
assert x1.value == "3"
|
21 |
-
y1 = m.TestFactory1(tag.pointer)
|
22 |
-
assert y1.value == "(empty)"
|
23 |
-
z1 = m.TestFactory1("hi!")
|
24 |
-
assert z1.value == "hi!"
|
25 |
-
|
26 |
-
assert ConstructorStats.detail_reg_inst() == n_inst + 3
|
27 |
-
|
28 |
-
x2 = m.TestFactory2(tag.move)
|
29 |
-
assert x2.value == "(empty2)"
|
30 |
-
y2 = m.TestFactory2(tag.pointer, 7)
|
31 |
-
assert y2.value == "7"
|
32 |
-
z2 = m.TestFactory2(tag.unique_ptr, "hi again")
|
33 |
-
assert z2.value == "hi again"
|
34 |
-
|
35 |
-
assert ConstructorStats.detail_reg_inst() == n_inst + 6
|
36 |
-
|
37 |
-
x3 = m.TestFactory3(tag.shared_ptr)
|
38 |
-
assert x3.value == "(empty3)"
|
39 |
-
y3 = m.TestFactory3(tag.pointer, 42)
|
40 |
-
assert y3.value == "42"
|
41 |
-
z3 = m.TestFactory3("bye")
|
42 |
-
assert z3.value == "bye"
|
43 |
-
|
44 |
-
for null_ptr_kind in [tag.null_ptr,
|
45 |
-
tag.null_unique_ptr,
|
46 |
-
tag.null_shared_ptr]:
|
47 |
-
with pytest.raises(TypeError) as excinfo:
|
48 |
-
m.TestFactory3(null_ptr_kind)
|
49 |
-
assert str(excinfo.value) == "pybind11::init(): factory function returned nullptr"
|
50 |
-
|
51 |
-
assert [i.alive() for i in cstats] == [3, 3, 3]
|
52 |
-
assert ConstructorStats.detail_reg_inst() == n_inst + 9
|
53 |
-
|
54 |
-
del x1, y2, y3, z3
|
55 |
-
assert [i.alive() for i in cstats] == [2, 2, 1]
|
56 |
-
assert ConstructorStats.detail_reg_inst() == n_inst + 5
|
57 |
-
del x2, x3, y1, z1, z2
|
58 |
-
assert [i.alive() for i in cstats] == [0, 0, 0]
|
59 |
-
assert ConstructorStats.detail_reg_inst() == n_inst
|
60 |
-
|
61 |
-
assert [i.values() for i in cstats] == [
|
62 |
-
["3", "hi!"],
|
63 |
-
["7", "hi again"],
|
64 |
-
["42", "bye"]
|
65 |
-
]
|
66 |
-
assert [i.default_constructions for i in cstats] == [1, 1, 1]
|
67 |
-
|
68 |
-
|
69 |
-
def test_init_factory_signature(msg):
|
70 |
-
with pytest.raises(TypeError) as excinfo:
|
71 |
-
m.TestFactory1("invalid", "constructor", "arguments")
|
72 |
-
assert msg(excinfo.value) == """
|
73 |
-
__init__(): incompatible constructor arguments. The following argument types are supported:
|
74 |
-
1. m.factory_constructors.TestFactory1(arg0: m.factory_constructors.tag.unique_ptr_tag, arg1: int)
|
75 |
-
2. m.factory_constructors.TestFactory1(arg0: str)
|
76 |
-
3. m.factory_constructors.TestFactory1(arg0: m.factory_constructors.tag.pointer_tag)
|
77 |
-
4. m.factory_constructors.TestFactory1(arg0: handle, arg1: int, arg2: handle)
|
78 |
-
|
79 |
-
Invoked with: 'invalid', 'constructor', 'arguments'
|
80 |
-
""" # noqa: E501 line too long
|
81 |
-
|
82 |
-
assert msg(m.TestFactory1.__init__.__doc__) == """
|
83 |
-
__init__(*args, **kwargs)
|
84 |
-
Overloaded function.
|
85 |
-
|
86 |
-
1. __init__(self: m.factory_constructors.TestFactory1, arg0: m.factory_constructors.tag.unique_ptr_tag, arg1: int) -> None
|
87 |
-
|
88 |
-
2. __init__(self: m.factory_constructors.TestFactory1, arg0: str) -> None
|
89 |
-
|
90 |
-
3. __init__(self: m.factory_constructors.TestFactory1, arg0: m.factory_constructors.tag.pointer_tag) -> None
|
91 |
-
|
92 |
-
4. __init__(self: m.factory_constructors.TestFactory1, arg0: handle, arg1: int, arg2: handle) -> None
|
93 |
-
""" # noqa: E501 line too long
|
94 |
-
|
95 |
-
|
96 |
-
def test_init_factory_casting():
|
97 |
-
"""Tests py::init_factory() wrapper with various upcasting and downcasting returns"""
|
98 |
-
|
99 |
-
cstats = [ConstructorStats.get(c) for c in [m.TestFactory3, m.TestFactory4, m.TestFactory5]]
|
100 |
-
cstats[0].alive() # force gc
|
101 |
-
n_inst = ConstructorStats.detail_reg_inst()
|
102 |
-
|
103 |
-
# Construction from derived references:
|
104 |
-
a = m.TestFactory3(tag.pointer, tag.TF4, 4)
|
105 |
-
assert a.value == "4"
|
106 |
-
b = m.TestFactory3(tag.shared_ptr, tag.TF4, 5)
|
107 |
-
assert b.value == "5"
|
108 |
-
c = m.TestFactory3(tag.pointer, tag.TF5, 6)
|
109 |
-
assert c.value == "6"
|
110 |
-
d = m.TestFactory3(tag.shared_ptr, tag.TF5, 7)
|
111 |
-
assert d.value == "7"
|
112 |
-
|
113 |
-
assert ConstructorStats.detail_reg_inst() == n_inst + 4
|
114 |
-
|
115 |
-
# Shared a lambda with TF3:
|
116 |
-
e = m.TestFactory4(tag.pointer, tag.TF4, 8)
|
117 |
-
assert e.value == "8"
|
118 |
-
|
119 |
-
assert ConstructorStats.detail_reg_inst() == n_inst + 5
|
120 |
-
assert [i.alive() for i in cstats] == [5, 3, 2]
|
121 |
-
|
122 |
-
del a
|
123 |
-
assert [i.alive() for i in cstats] == [4, 2, 2]
|
124 |
-
assert ConstructorStats.detail_reg_inst() == n_inst + 4
|
125 |
-
|
126 |
-
del b, c, e
|
127 |
-
assert [i.alive() for i in cstats] == [1, 0, 1]
|
128 |
-
assert ConstructorStats.detail_reg_inst() == n_inst + 1
|
129 |
-
|
130 |
-
del d
|
131 |
-
assert [i.alive() for i in cstats] == [0, 0, 0]
|
132 |
-
assert ConstructorStats.detail_reg_inst() == n_inst
|
133 |
-
|
134 |
-
assert [i.values() for i in cstats] == [
|
135 |
-
["4", "5", "6", "7", "8"],
|
136 |
-
["4", "5", "8"],
|
137 |
-
["6", "7"]
|
138 |
-
]
|
139 |
-
|
140 |
-
|
141 |
-
def test_init_factory_alias():
|
142 |
-
"""Tests py::init_factory() wrapper with value conversions and alias types"""
|
143 |
-
|
144 |
-
cstats = [m.TestFactory6.get_cstats(), m.TestFactory6.get_alias_cstats()]
|
145 |
-
cstats[0].alive() # force gc
|
146 |
-
n_inst = ConstructorStats.detail_reg_inst()
|
147 |
-
|
148 |
-
a = m.TestFactory6(tag.base, 1)
|
149 |
-
assert a.get() == 1
|
150 |
-
assert not a.has_alias()
|
151 |
-
b = m.TestFactory6(tag.alias, "hi there")
|
152 |
-
assert b.get() == 8
|
153 |
-
assert b.has_alias()
|
154 |
-
c = m.TestFactory6(tag.alias, 3)
|
155 |
-
assert c.get() == 3
|
156 |
-
assert c.has_alias()
|
157 |
-
d = m.TestFactory6(tag.alias, tag.pointer, 4)
|
158 |
-
assert d.get() == 4
|
159 |
-
assert d.has_alias()
|
160 |
-
e = m.TestFactory6(tag.base, tag.pointer, 5)
|
161 |
-
assert e.get() == 5
|
162 |
-
assert not e.has_alias()
|
163 |
-
f = m.TestFactory6(tag.base, tag.alias, tag.pointer, 6)
|
164 |
-
assert f.get() == 6
|
165 |
-
assert f.has_alias()
|
166 |
-
|
167 |
-
assert ConstructorStats.detail_reg_inst() == n_inst + 6
|
168 |
-
assert [i.alive() for i in cstats] == [6, 4]
|
169 |
-
|
170 |
-
del a, b, e
|
171 |
-
assert [i.alive() for i in cstats] == [3, 3]
|
172 |
-
assert ConstructorStats.detail_reg_inst() == n_inst + 3
|
173 |
-
del f, c, d
|
174 |
-
assert [i.alive() for i in cstats] == [0, 0]
|
175 |
-
assert ConstructorStats.detail_reg_inst() == n_inst
|
176 |
-
|
177 |
-
class MyTest(m.TestFactory6):
|
178 |
-
def __init__(self, *args):
|
179 |
-
m.TestFactory6.__init__(self, *args)
|
180 |
-
|
181 |
-
def get(self):
|
182 |
-
return -5 + m.TestFactory6.get(self)
|
183 |
-
|
184 |
-
# Return Class by value, moved into new alias:
|
185 |
-
z = MyTest(tag.base, 123)
|
186 |
-
assert z.get() == 118
|
187 |
-
assert z.has_alias()
|
188 |
-
|
189 |
-
# Return alias by value, moved into new alias:
|
190 |
-
y = MyTest(tag.alias, "why hello!")
|
191 |
-
assert y.get() == 5
|
192 |
-
assert y.has_alias()
|
193 |
-
|
194 |
-
# Return Class by pointer, moved into new alias then original destroyed:
|
195 |
-
x = MyTest(tag.base, tag.pointer, 47)
|
196 |
-
assert x.get() == 42
|
197 |
-
assert x.has_alias()
|
198 |
-
|
199 |
-
assert ConstructorStats.detail_reg_inst() == n_inst + 3
|
200 |
-
assert [i.alive() for i in cstats] == [3, 3]
|
201 |
-
del x, y, z
|
202 |
-
assert [i.alive() for i in cstats] == [0, 0]
|
203 |
-
assert ConstructorStats.detail_reg_inst() == n_inst
|
204 |
-
|
205 |
-
assert [i.values() for i in cstats] == [
|
206 |
-
["1", "8", "3", "4", "5", "6", "123", "10", "47"],
|
207 |
-
["hi there", "3", "4", "6", "move", "123", "why hello!", "move", "47"]
|
208 |
-
]
|
209 |
-
|
210 |
-
|
211 |
-
def test_init_factory_dual():
|
212 |
-
"""Tests init factory functions with dual main/alias factory functions"""
|
213 |
-
from pybind11_tests.factory_constructors import TestFactory7
|
214 |
-
|
215 |
-
cstats = [TestFactory7.get_cstats(), TestFactory7.get_alias_cstats()]
|
216 |
-
cstats[0].alive() # force gc
|
217 |
-
n_inst = ConstructorStats.detail_reg_inst()
|
218 |
-
|
219 |
-
class PythFactory7(TestFactory7):
|
220 |
-
def get(self):
|
221 |
-
return 100 + TestFactory7.get(self)
|
222 |
-
|
223 |
-
a1 = TestFactory7(1)
|
224 |
-
a2 = PythFactory7(2)
|
225 |
-
assert a1.get() == 1
|
226 |
-
assert a2.get() == 102
|
227 |
-
assert not a1.has_alias()
|
228 |
-
assert a2.has_alias()
|
229 |
-
|
230 |
-
b1 = TestFactory7(tag.pointer, 3)
|
231 |
-
b2 = PythFactory7(tag.pointer, 4)
|
232 |
-
assert b1.get() == 3
|
233 |
-
assert b2.get() == 104
|
234 |
-
assert not b1.has_alias()
|
235 |
-
assert b2.has_alias()
|
236 |
-
|
237 |
-
c1 = TestFactory7(tag.mixed, 5)
|
238 |
-
c2 = PythFactory7(tag.mixed, 6)
|
239 |
-
assert c1.get() == 5
|
240 |
-
assert c2.get() == 106
|
241 |
-
assert not c1.has_alias()
|
242 |
-
assert c2.has_alias()
|
243 |
-
|
244 |
-
d1 = TestFactory7(tag.base, tag.pointer, 7)
|
245 |
-
d2 = PythFactory7(tag.base, tag.pointer, 8)
|
246 |
-
assert d1.get() == 7
|
247 |
-
assert d2.get() == 108
|
248 |
-
assert not d1.has_alias()
|
249 |
-
assert d2.has_alias()
|
250 |
-
|
251 |
-
# Both return an alias; the second multiplies the value by 10:
|
252 |
-
e1 = TestFactory7(tag.alias, tag.pointer, 9)
|
253 |
-
e2 = PythFactory7(tag.alias, tag.pointer, 10)
|
254 |
-
assert e1.get() == 9
|
255 |
-
assert e2.get() == 200
|
256 |
-
assert e1.has_alias()
|
257 |
-
assert e2.has_alias()
|
258 |
-
|
259 |
-
f1 = TestFactory7(tag.shared_ptr, tag.base, 11)
|
260 |
-
f2 = PythFactory7(tag.shared_ptr, tag.base, 12)
|
261 |
-
assert f1.get() == 11
|
262 |
-
assert f2.get() == 112
|
263 |
-
assert not f1.has_alias()
|
264 |
-
assert f2.has_alias()
|
265 |
-
|
266 |
-
g1 = TestFactory7(tag.shared_ptr, tag.invalid_base, 13)
|
267 |
-
assert g1.get() == 13
|
268 |
-
assert not g1.has_alias()
|
269 |
-
with pytest.raises(TypeError) as excinfo:
|
270 |
-
PythFactory7(tag.shared_ptr, tag.invalid_base, 14)
|
271 |
-
assert (str(excinfo.value) ==
|
272 |
-
"pybind11::init(): construction failed: returned holder-wrapped instance is not an "
|
273 |
-
"alias instance")
|
274 |
-
|
275 |
-
assert [i.alive() for i in cstats] == [13, 7]
|
276 |
-
assert ConstructorStats.detail_reg_inst() == n_inst + 13
|
277 |
-
|
278 |
-
del a1, a2, b1, d1, e1, e2
|
279 |
-
assert [i.alive() for i in cstats] == [7, 4]
|
280 |
-
assert ConstructorStats.detail_reg_inst() == n_inst + 7
|
281 |
-
del b2, c1, c2, d2, f1, f2, g1
|
282 |
-
assert [i.alive() for i in cstats] == [0, 0]
|
283 |
-
assert ConstructorStats.detail_reg_inst() == n_inst
|
284 |
-
|
285 |
-
assert [i.values() for i in cstats] == [
|
286 |
-
["1", "2", "3", "4", "5", "6", "7", "8", "9", "100", "11", "12", "13", "14"],
|
287 |
-
["2", "4", "6", "8", "9", "100", "12"]
|
288 |
-
]
|
289 |
-
|
290 |
-
|
291 |
-
def test_no_placement_new(capture):
|
292 |
-
"""Prior to 2.2, `py::init<...>` relied on the type supporting placement
|
293 |
-
new; this tests a class without placement new support."""
|
294 |
-
with capture:
|
295 |
-
a = m.NoPlacementNew(123)
|
296 |
-
|
297 |
-
found = re.search(r'^operator new called, returning (\d+)\n$', str(capture))
|
298 |
-
assert found
|
299 |
-
assert a.i == 123
|
300 |
-
with capture:
|
301 |
-
del a
|
302 |
-
pytest.gc_collect()
|
303 |
-
assert capture == "operator delete called on " + found.group(1)
|
304 |
-
|
305 |
-
with capture:
|
306 |
-
b = m.NoPlacementNew()
|
307 |
-
|
308 |
-
found = re.search(r'^operator new called, returning (\d+)\n$', str(capture))
|
309 |
-
assert found
|
310 |
-
assert b.i == 100
|
311 |
-
with capture:
|
312 |
-
del b
|
313 |
-
pytest.gc_collect()
|
314 |
-
assert capture == "operator delete called on " + found.group(1)
|
315 |
-
|
316 |
-
|
317 |
-
def test_multiple_inheritance():
|
318 |
-
class MITest(m.TestFactory1, m.TestFactory2):
|
319 |
-
def __init__(self):
|
320 |
-
m.TestFactory1.__init__(self, tag.unique_ptr, 33)
|
321 |
-
m.TestFactory2.__init__(self, tag.move)
|
322 |
-
|
323 |
-
a = MITest()
|
324 |
-
assert m.TestFactory1.value.fget(a) == "33"
|
325 |
-
assert m.TestFactory2.value.fget(a) == "(empty2)"
|
326 |
-
|
327 |
-
|
328 |
-
def create_and_destroy(*args):
|
329 |
-
a = m.NoisyAlloc(*args)
|
330 |
-
print("---")
|
331 |
-
del a
|
332 |
-
pytest.gc_collect()
|
333 |
-
|
334 |
-
|
335 |
-
def strip_comments(s):
|
336 |
-
return re.sub(r'\s+#.*', '', s)
|
337 |
-
|
338 |
-
|
339 |
-
def test_reallocations(capture, msg):
|
340 |
-
"""When the constructor is overloaded, previous overloads can require a preallocated value.
|
341 |
-
This test makes sure that such preallocated values only happen when they might be necessary,
|
342 |
-
and that they are deallocated properly"""
|
343 |
-
|
344 |
-
pytest.gc_collect()
|
345 |
-
|
346 |
-
with capture:
|
347 |
-
create_and_destroy(1)
|
348 |
-
assert msg(capture) == """
|
349 |
-
noisy new
|
350 |
-
noisy placement new
|
351 |
-
NoisyAlloc(int 1)
|
352 |
-
---
|
353 |
-
~NoisyAlloc()
|
354 |
-
noisy delete
|
355 |
-
"""
|
356 |
-
with capture:
|
357 |
-
create_and_destroy(1.5)
|
358 |
-
assert msg(capture) == strip_comments("""
|
359 |
-
noisy new # allocation required to attempt first overload
|
360 |
-
noisy delete # have to dealloc before considering factory init overload
|
361 |
-
noisy new # pointer factory calling "new", part 1: allocation
|
362 |
-
NoisyAlloc(double 1.5) # ... part two, invoking constructor
|
363 |
-
---
|
364 |
-
~NoisyAlloc() # Destructor
|
365 |
-
noisy delete # operator delete
|
366 |
-
""")
|
367 |
-
|
368 |
-
with capture:
|
369 |
-
create_and_destroy(2, 3)
|
370 |
-
assert msg(capture) == strip_comments("""
|
371 |
-
noisy new # pointer factory calling "new", allocation
|
372 |
-
NoisyAlloc(int 2) # constructor
|
373 |
-
---
|
374 |
-
~NoisyAlloc() # Destructor
|
375 |
-
noisy delete # operator delete
|
376 |
-
""")
|
377 |
-
|
378 |
-
with capture:
|
379 |
-
create_and_destroy(2.5, 3)
|
380 |
-
assert msg(capture) == strip_comments("""
|
381 |
-
NoisyAlloc(double 2.5) # construction (local func variable: operator_new not called)
|
382 |
-
noisy new # return-by-value "new" part 1: allocation
|
383 |
-
~NoisyAlloc() # moved-away local func variable destruction
|
384 |
-
---
|
385 |
-
~NoisyAlloc() # Destructor
|
386 |
-
noisy delete # operator delete
|
387 |
-
""")
|
388 |
-
|
389 |
-
with capture:
|
390 |
-
create_and_destroy(3.5, 4.5)
|
391 |
-
assert msg(capture) == strip_comments("""
|
392 |
-
noisy new # preallocation needed before invoking placement-new overload
|
393 |
-
noisy placement new # Placement new
|
394 |
-
NoisyAlloc(double 3.5) # construction
|
395 |
-
---
|
396 |
-
~NoisyAlloc() # Destructor
|
397 |
-
noisy delete # operator delete
|
398 |
-
""")
|
399 |
-
|
400 |
-
with capture:
|
401 |
-
create_and_destroy(4, 0.5)
|
402 |
-
assert msg(capture) == strip_comments("""
|
403 |
-
noisy new # preallocation needed before invoking placement-new overload
|
404 |
-
noisy delete # deallocation of preallocated storage
|
405 |
-
noisy new # Factory pointer allocation
|
406 |
-
NoisyAlloc(int 4) # factory pointer construction
|
407 |
-
---
|
408 |
-
~NoisyAlloc() # Destructor
|
409 |
-
noisy delete # operator delete
|
410 |
-
""")
|
411 |
-
|
412 |
-
with capture:
|
413 |
-
create_and_destroy(5, "hi")
|
414 |
-
assert msg(capture) == strip_comments("""
|
415 |
-
noisy new # preallocation needed before invoking first placement new
|
416 |
-
noisy delete # delete before considering new-style constructor
|
417 |
-
noisy new # preallocation for second placement new
|
418 |
-
noisy placement new # Placement new in the second placement new overload
|
419 |
-
NoisyAlloc(int 5) # construction
|
420 |
-
---
|
421 |
-
~NoisyAlloc() # Destructor
|
422 |
-
noisy delete # operator delete
|
423 |
-
""")
|
424 |
-
|
425 |
-
|
426 |
-
@pytest.mark.skipif("env.PY2")
|
427 |
-
def test_invalid_self():
|
428 |
-
"""Tests invocation of the pybind-registered base class with an invalid `self` argument. You
|
429 |
-
can only actually do this on Python 3: Python 2 raises an exception itself if you try."""
|
430 |
-
class NotPybindDerived(object):
|
431 |
-
pass
|
432 |
-
|
433 |
-
# Attempts to initialize with an invalid type passed as `self`:
|
434 |
-
class BrokenTF1(m.TestFactory1):
|
435 |
-
def __init__(self, bad):
|
436 |
-
if bad == 1:
|
437 |
-
a = m.TestFactory2(tag.pointer, 1)
|
438 |
-
m.TestFactory1.__init__(a, tag.pointer)
|
439 |
-
elif bad == 2:
|
440 |
-
a = NotPybindDerived()
|
441 |
-
m.TestFactory1.__init__(a, tag.pointer)
|
442 |
-
|
443 |
-
# Same as above, but for a class with an alias:
|
444 |
-
class BrokenTF6(m.TestFactory6):
|
445 |
-
def __init__(self, bad):
|
446 |
-
if bad == 1:
|
447 |
-
a = m.TestFactory2(tag.pointer, 1)
|
448 |
-
m.TestFactory6.__init__(a, tag.base, 1)
|
449 |
-
elif bad == 2:
|
450 |
-
a = m.TestFactory2(tag.pointer, 1)
|
451 |
-
m.TestFactory6.__init__(a, tag.alias, 1)
|
452 |
-
elif bad == 3:
|
453 |
-
m.TestFactory6.__init__(NotPybindDerived.__new__(NotPybindDerived), tag.base, 1)
|
454 |
-
elif bad == 4:
|
455 |
-
m.TestFactory6.__init__(NotPybindDerived.__new__(NotPybindDerived), tag.alias, 1)
|
456 |
-
|
457 |
-
for arg in (1, 2):
|
458 |
-
with pytest.raises(TypeError) as excinfo:
|
459 |
-
BrokenTF1(arg)
|
460 |
-
assert str(excinfo.value) == "__init__(self, ...) called with invalid `self` argument"
|
461 |
-
|
462 |
-
for arg in (1, 2, 3, 4):
|
463 |
-
with pytest.raises(TypeError) as excinfo:
|
464 |
-
BrokenTF6(arg)
|
465 |
-
assert str(excinfo.value) == "__init__(self, ...) called with invalid `self` argument"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CVPR/LIVE/pybind11/tests/test_iostream.py
DELETED
@@ -1,215 +0,0 @@
|
|
1 |
-
# -*- coding: utf-8 -*-
|
2 |
-
from pybind11_tests import iostream as m
|
3 |
-
import sys
|
4 |
-
|
5 |
-
from contextlib import contextmanager
|
6 |
-
|
7 |
-
try:
|
8 |
-
# Python 3
|
9 |
-
from io import StringIO
|
10 |
-
except ImportError:
|
11 |
-
# Python 2
|
12 |
-
try:
|
13 |
-
from cStringIO import StringIO
|
14 |
-
except ImportError:
|
15 |
-
from StringIO import StringIO
|
16 |
-
|
17 |
-
try:
|
18 |
-
# Python 3.4
|
19 |
-
from contextlib import redirect_stdout
|
20 |
-
except ImportError:
|
21 |
-
@contextmanager
|
22 |
-
def redirect_stdout(target):
|
23 |
-
original = sys.stdout
|
24 |
-
sys.stdout = target
|
25 |
-
yield
|
26 |
-
sys.stdout = original
|
27 |
-
|
28 |
-
try:
|
29 |
-
# Python 3.5
|
30 |
-
from contextlib import redirect_stderr
|
31 |
-
except ImportError:
|
32 |
-
@contextmanager
|
33 |
-
def redirect_stderr(target):
|
34 |
-
original = sys.stderr
|
35 |
-
sys.stderr = target
|
36 |
-
yield
|
37 |
-
sys.stderr = original
|
38 |
-
|
39 |
-
|
40 |
-
def test_captured(capsys):
|
41 |
-
msg = "I've been redirected to Python, I hope!"
|
42 |
-
m.captured_output(msg)
|
43 |
-
stdout, stderr = capsys.readouterr()
|
44 |
-
assert stdout == msg
|
45 |
-
assert stderr == ''
|
46 |
-
|
47 |
-
m.captured_output_default(msg)
|
48 |
-
stdout, stderr = capsys.readouterr()
|
49 |
-
assert stdout == msg
|
50 |
-
assert stderr == ''
|
51 |
-
|
52 |
-
m.captured_err(msg)
|
53 |
-
stdout, stderr = capsys.readouterr()
|
54 |
-
assert stdout == ''
|
55 |
-
assert stderr == msg
|
56 |
-
|
57 |
-
|
58 |
-
def test_captured_large_string(capsys):
|
59 |
-
# Make this bigger than the buffer used on the C++ side: 1024 chars
|
60 |
-
msg = "I've been redirected to Python, I hope!"
|
61 |
-
msg = msg * (1024 // len(msg) + 1)
|
62 |
-
|
63 |
-
m.captured_output_default(msg)
|
64 |
-
stdout, stderr = capsys.readouterr()
|
65 |
-
assert stdout == msg
|
66 |
-
assert stderr == ''
|
67 |
-
|
68 |
-
|
69 |
-
def test_guard_capture(capsys):
|
70 |
-
msg = "I've been redirected to Python, I hope!"
|
71 |
-
m.guard_output(msg)
|
72 |
-
stdout, stderr = capsys.readouterr()
|
73 |
-
assert stdout == msg
|
74 |
-
assert stderr == ''
|
75 |
-
|
76 |
-
|
77 |
-
def test_series_captured(capture):
|
78 |
-
with capture:
|
79 |
-
m.captured_output("a")
|
80 |
-
m.captured_output("b")
|
81 |
-
assert capture == "ab"
|
82 |
-
|
83 |
-
|
84 |
-
def test_flush(capfd):
|
85 |
-
msg = "(not flushed)"
|
86 |
-
msg2 = "(flushed)"
|
87 |
-
|
88 |
-
with m.ostream_redirect():
|
89 |
-
m.noisy_function(msg, flush=False)
|
90 |
-
stdout, stderr = capfd.readouterr()
|
91 |
-
assert stdout == ''
|
92 |
-
|
93 |
-
m.noisy_function(msg2, flush=True)
|
94 |
-
stdout, stderr = capfd.readouterr()
|
95 |
-
assert stdout == msg + msg2
|
96 |
-
|
97 |
-
m.noisy_function(msg, flush=False)
|
98 |
-
|
99 |
-
stdout, stderr = capfd.readouterr()
|
100 |
-
assert stdout == msg
|
101 |
-
|
102 |
-
|
103 |
-
def test_not_captured(capfd):
|
104 |
-
msg = "Something that should not show up in log"
|
105 |
-
stream = StringIO()
|
106 |
-
with redirect_stdout(stream):
|
107 |
-
m.raw_output(msg)
|
108 |
-
stdout, stderr = capfd.readouterr()
|
109 |
-
assert stdout == msg
|
110 |
-
assert stderr == ''
|
111 |
-
assert stream.getvalue() == ''
|
112 |
-
|
113 |
-
stream = StringIO()
|
114 |
-
with redirect_stdout(stream):
|
115 |
-
m.captured_output(msg)
|
116 |
-
stdout, stderr = capfd.readouterr()
|
117 |
-
assert stdout == ''
|
118 |
-
assert stderr == ''
|
119 |
-
assert stream.getvalue() == msg
|
120 |
-
|
121 |
-
|
122 |
-
def test_err(capfd):
|
123 |
-
msg = "Something that should not show up in log"
|
124 |
-
stream = StringIO()
|
125 |
-
with redirect_stderr(stream):
|
126 |
-
m.raw_err(msg)
|
127 |
-
stdout, stderr = capfd.readouterr()
|
128 |
-
assert stdout == ''
|
129 |
-
assert stderr == msg
|
130 |
-
assert stream.getvalue() == ''
|
131 |
-
|
132 |
-
stream = StringIO()
|
133 |
-
with redirect_stderr(stream):
|
134 |
-
m.captured_err(msg)
|
135 |
-
stdout, stderr = capfd.readouterr()
|
136 |
-
assert stdout == ''
|
137 |
-
assert stderr == ''
|
138 |
-
assert stream.getvalue() == msg
|
139 |
-
|
140 |
-
|
141 |
-
def test_multi_captured(capfd):
|
142 |
-
stream = StringIO()
|
143 |
-
with redirect_stdout(stream):
|
144 |
-
m.captured_output("a")
|
145 |
-
m.raw_output("b")
|
146 |
-
m.captured_output("c")
|
147 |
-
m.raw_output("d")
|
148 |
-
stdout, stderr = capfd.readouterr()
|
149 |
-
assert stdout == 'bd'
|
150 |
-
assert stream.getvalue() == 'ac'
|
151 |
-
|
152 |
-
|
153 |
-
def test_dual(capsys):
|
154 |
-
m.captured_dual("a", "b")
|
155 |
-
stdout, stderr = capsys.readouterr()
|
156 |
-
assert stdout == "a"
|
157 |
-
assert stderr == "b"
|
158 |
-
|
159 |
-
|
160 |
-
def test_redirect(capfd):
|
161 |
-
msg = "Should not be in log!"
|
162 |
-
stream = StringIO()
|
163 |
-
with redirect_stdout(stream):
|
164 |
-
m.raw_output(msg)
|
165 |
-
stdout, stderr = capfd.readouterr()
|
166 |
-
assert stdout == msg
|
167 |
-
assert stream.getvalue() == ''
|
168 |
-
|
169 |
-
stream = StringIO()
|
170 |
-
with redirect_stdout(stream):
|
171 |
-
with m.ostream_redirect():
|
172 |
-
m.raw_output(msg)
|
173 |
-
stdout, stderr = capfd.readouterr()
|
174 |
-
assert stdout == ''
|
175 |
-
assert stream.getvalue() == msg
|
176 |
-
|
177 |
-
stream = StringIO()
|
178 |
-
with redirect_stdout(stream):
|
179 |
-
m.raw_output(msg)
|
180 |
-
stdout, stderr = capfd.readouterr()
|
181 |
-
assert stdout == msg
|
182 |
-
assert stream.getvalue() == ''
|
183 |
-
|
184 |
-
|
185 |
-
def test_redirect_err(capfd):
|
186 |
-
msg = "StdOut"
|
187 |
-
msg2 = "StdErr"
|
188 |
-
|
189 |
-
stream = StringIO()
|
190 |
-
with redirect_stderr(stream):
|
191 |
-
with m.ostream_redirect(stdout=False):
|
192 |
-
m.raw_output(msg)
|
193 |
-
m.raw_err(msg2)
|
194 |
-
stdout, stderr = capfd.readouterr()
|
195 |
-
assert stdout == msg
|
196 |
-
assert stderr == ''
|
197 |
-
assert stream.getvalue() == msg2
|
198 |
-
|
199 |
-
|
200 |
-
def test_redirect_both(capfd):
|
201 |
-
msg = "StdOut"
|
202 |
-
msg2 = "StdErr"
|
203 |
-
|
204 |
-
stream = StringIO()
|
205 |
-
stream2 = StringIO()
|
206 |
-
with redirect_stdout(stream):
|
207 |
-
with redirect_stderr(stream2):
|
208 |
-
with m.ostream_redirect():
|
209 |
-
m.raw_output(msg)
|
210 |
-
m.raw_err(msg2)
|
211 |
-
stdout, stderr = capfd.readouterr()
|
212 |
-
assert stdout == ''
|
213 |
-
assert stderr == ''
|
214 |
-
assert stream.getvalue() == msg
|
215 |
-
assert stream2.getvalue() == msg2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CVPR/LIVE/thrust/thrust/system/detail/sequential/reverse.h
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Copyright 2008-2013 NVIDIA Corporation
|
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 |
-
*/
|
16 |
-
|
17 |
-
#pragma once
|
18 |
-
|
19 |
-
#include <thrust/detail/config.h>
|
20 |
-
|
21 |
-
// this system has no special reverse functions
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CVPR/transfiner/configs/new_baselines/mask_rcnn_R_101_FPN_100ep_LSJ.py
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
from .mask_rcnn_R_50_FPN_100ep_LSJ import (
|
2 |
-
dataloader,
|
3 |
-
lr_multiplier,
|
4 |
-
model,
|
5 |
-
optimizer,
|
6 |
-
train,
|
7 |
-
)
|
8 |
-
|
9 |
-
model.backbone.bottom_up.stages.depth = 101
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CofAI/chat/client/css/checkbox.css
DELETED
@@ -1,55 +0,0 @@
|
|
1 |
-
.checkbox input {
|
2 |
-
height: 0;
|
3 |
-
width: 0;
|
4 |
-
display: none;
|
5 |
-
}
|
6 |
-
|
7 |
-
.checkbox span {
|
8 |
-
font-size: 0.875rem;
|
9 |
-
color: var(--colour-2);
|
10 |
-
margin-left: 4px;
|
11 |
-
}
|
12 |
-
|
13 |
-
.checkbox label:after {
|
14 |
-
content: "";
|
15 |
-
position: absolute;
|
16 |
-
top: 50%;
|
17 |
-
transform: translateY(-50%);
|
18 |
-
left: 5px;
|
19 |
-
width: 20px;
|
20 |
-
height: 20px;
|
21 |
-
background: var(--blur-border);
|
22 |
-
border-radius: 90px;
|
23 |
-
transition: 0.33s;
|
24 |
-
}
|
25 |
-
|
26 |
-
.checkbox input + label:after,
|
27 |
-
.checkbox input:checked + label {
|
28 |
-
background: var(--colour-3);
|
29 |
-
}
|
30 |
-
|
31 |
-
.checkbox input + label,
|
32 |
-
.checkbox input:checked + label:after {
|
33 |
-
background: var(--blur-border);
|
34 |
-
}
|
35 |
-
|
36 |
-
.checkbox input:checked + label:after {
|
37 |
-
left: calc(100% - 5px - 20px);
|
38 |
-
}
|
39 |
-
|
40 |
-
@media screen and (max-width: 990px) {
|
41 |
-
.checkbox label {
|
42 |
-
width: 25px;
|
43 |
-
height: 15px;
|
44 |
-
}
|
45 |
-
|
46 |
-
.checkbox label:after {
|
47 |
-
left: 2px;
|
48 |
-
width: 10px;
|
49 |
-
height: 10px;
|
50 |
-
}
|
51 |
-
|
52 |
-
.checkbox input:checked + label:after {
|
53 |
-
left: calc(100% - 2px - 10px);
|
54 |
-
}
|
55 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/CyberHarem/find_my_waifu/character.py
DELETED
@@ -1,36 +0,0 @@
|
|
1 |
-
import re
|
2 |
-
|
3 |
-
from gchar.games.base import Character
|
4 |
-
from thefuzz import fuzz
|
5 |
-
|
6 |
-
|
7 |
-
def get_pure_name(name: str) -> str:
|
8 |
-
return '_'.join([word for word in re.split(r'[\W_]+', name.lower()) if word])
|
9 |
-
|
10 |
-
|
11 |
-
def get_alphabet_name(name: str) -> str:
|
12 |
-
return '_'.join(re.findall(r'[a-zA-Z\d+]+', name.lower()))
|
13 |
-
|
14 |
-
|
15 |
-
def _name_alphabet_ratio(name: str) -> float:
|
16 |
-
pure_name = get_pure_name(name)
|
17 |
-
alphabet_name = get_alphabet_name(name)
|
18 |
-
return fuzz.token_set_ratio(pure_name, alphabet_name)
|
19 |
-
|
20 |
-
|
21 |
-
def get_ch_name(ch: Character):
|
22 |
-
names = [
|
23 |
-
*map(str, ch.ennames),
|
24 |
-
*map(str, ch.cnnames),
|
25 |
-
*map(str, ch.jpnames),
|
26 |
-
]
|
27 |
-
all_names = [(name, _name_alphabet_ratio(name), i) for i, name in enumerate(names)]
|
28 |
-
all_names = sorted(all_names, key=lambda x: (-x[1], x[2]))
|
29 |
-
|
30 |
-
name, ratio, _ = all_names[0]
|
31 |
-
if ratio >= 0.9:
|
32 |
-
short_name = get_alphabet_name(name)
|
33 |
-
else:
|
34 |
-
raise ValueError(f'No suitable alphabet-based name for {ch!r}.')
|
35 |
-
|
36 |
-
return f'{short_name}_{ch.__game_name__}'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/DJQmUKV/rvc-inference/config.py
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
import torch
|
2 |
-
|
3 |
-
import util
|
4 |
-
|
5 |
-
|
6 |
-
device = (
|
7 |
-
'cuda:0' if torch.cuda.is_available()
|
8 |
-
else (
|
9 |
-
'mps' if util.has_mps()
|
10 |
-
else 'cpu'
|
11 |
-
)
|
12 |
-
)
|
13 |
-
is_half = util.is_half(device)
|
14 |
-
|
15 |
-
x_pad = 3 if is_half else 1
|
16 |
-
x_query = 10 if is_half else 6
|
17 |
-
x_center = 60 if is_half else 38
|
18 |
-
x_max = 65 if is_half else 41
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/dateutil/__init__.py
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
# -*- coding: utf-8 -*-
|
2 |
-
try:
|
3 |
-
from ._version import version as __version__
|
4 |
-
except ImportError:
|
5 |
-
__version__ = 'unknown'
|
6 |
-
|
7 |
-
__all__ = ['easter', 'parser', 'relativedelta', 'rrule', 'tz',
|
8 |
-
'utils', 'zoneinfo']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/fsspec/exceptions.py
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
"""
|
2 |
-
fsspec user-defined exception classes
|
3 |
-
"""
|
4 |
-
import asyncio
|
5 |
-
|
6 |
-
|
7 |
-
class BlocksizeMismatchError(ValueError):
|
8 |
-
"""
|
9 |
-
Raised when a cached file is opened with a different blocksize than it was
|
10 |
-
written with
|
11 |
-
"""
|
12 |
-
|
13 |
-
...
|
14 |
-
|
15 |
-
|
16 |
-
class FSTimeoutError(asyncio.TimeoutError):
|
17 |
-
"""
|
18 |
-
Raised when a fsspec function timed out occurs
|
19 |
-
"""
|
20 |
-
|
21 |
-
...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|