parquet-converter commited on
Commit
75444f2
·
1 Parent(s): de8234d

Update parquet files (step 74 of 121)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. spaces/1gistliPinn/ChatGPT4/Examples/Arcsoft Totalmedia 3.5 Key Keygenl.md +0 -8
  2. spaces/1gistliPinn/ChatGPT4/Examples/Bizarre Soft Pachet Legislativ Auto How to Pass the Driving Test with Ease Using This Software.md +0 -6
  3. spaces/1gistliPinn/ChatGPT4/Examples/Constantine2fullmoviedownload LINK.md +0 -8
  4. spaces/1gistliPinn/ChatGPT4/Examples/Cours Revit Architecture Gratuit Pdf.md +0 -10
  5. spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Clash of Kings MOD APK 2022 The Most Epic War Game Ever.md +0 -97
  6. spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Download Free Uplay and Connect with Ubisoft Players Worldwide.md +0 -128
  7. spaces/1phancelerku/anime-remove-background/Download Dynamons World APK Hack and Train Your Monsters Like a Pro.md +0 -110
  8. spaces/232labs/VToonify/vtoonify/model/vtoonify.py +0 -286
  9. spaces/AB-TW/team-ai/documents/bussiness_context/NOTION_DB/Engineering Wiki 2402f5396a3244fdb3f1d135bdb0f3d6/ABstract(插件化AB Testing平台) 746b87acd94643ca871ec661b63f196c/业务模型 d31846027b4f40ca99f6e76f897663a4.md +0 -198
  10. spaces/AI-Zero-to-Hero/10-GR-AI-Wikipedia-Search/app.py +0 -58
  11. spaces/AIConsultant/MusicGen/audiocraft/modules/__init__.py +0 -22
  12. spaces/AIConsultant/MusicGen/tests/quantization/test_vq.py +0 -18
  13. spaces/AIFILMS/StyleGANEX/configs/data_configs.py +0 -48
  14. spaces/AIFILMS/StyleGANEX/models/mtcnn/mtcnn_pytorch/__init__.py +0 -0
  15. spaces/AIGText/GlyphControl/ldm/modules/diffusionmodules/upscaling.py +0 -81
  16. spaces/Adapter/CoAdapter/ldm/modules/extra_condition/openpose/api.py +0 -35
  17. spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/plugins/buffdata-plugin.js +0 -24
  18. spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/spinner/grid/Grid.d.ts +0 -2
  19. spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/statesroundrectangle/Factory.d.ts +0 -6
  20. spaces/Akmyradov/TurkmenTTSweSTT/uroman/bin/uroman.pl +0 -138
  21. spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/docs/source/en/api/pipelines/panorama.md +0 -57
  22. spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/src/diffusers/utils/dummy_pt_objects.py +0 -870
  23. spaces/Andy1621/uniformer_image_detection/mmdet/models/backbones/ssd_vgg.py +0 -169
  24. spaces/Andy1621/uniformer_image_detection/mmdet/models/roi_heads/bbox_heads/scnet_bbox_head.py +0 -76
  25. spaces/Anonymous-sub/Rerender/ControlNet/annotator/uniformer/mmcv/cnn/utils/sync_bn.py +0 -59
  26. spaces/Anonymous-sub/Rerender/ControlNet/annotator/uniformer/mmseg/datasets/pipelines/test_time_aug.py +0 -133
  27. spaces/ArkanDash/rvc-models/config.py +0 -88
  28. spaces/Artrajz/vits-simple-api/static/js/jquery.slim.min.js +0 -2
  29. spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/six.py +0 -998
  30. spaces/AtomdffAI/wechatgpt4atom/bridge/bridge.py +0 -9
  31. spaces/Awesimo/jojogan/e4e/configs/paths_config.py +0 -28
  32. spaces/BMukhtar/BookRecognitionKz/kz_ocr_easy.py +0 -88
  33. spaces/Benson/text-generation/Examples/Descargar Gratis La Ampliadora De Imgenes.md +0 -54
  34. spaces/BetterAPI/BetterChat/src/lib/switchTheme.ts +0 -10
  35. spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_internal/models/link.py +0 -531
  36. spaces/Big-Web/MMSD/env/Lib/site-packages/setuptools/_distutils/version.py +0 -358
  37. spaces/BigSalmon/Bart/app.py +0 -47
  38. spaces/BlinkDL/ChatRWKV-gradio/app.py +0 -134
  39. spaces/Boilin/URetinex-Net/evaluate.py +0 -130
  40. spaces/BreadBytes1/PL-Dashboard/FAQ_README.md +0 -32
  41. spaces/CVPR/Dual-Key_Backdoor_Attacks/datagen/detectron2/detectron2/evaluation/panoptic_evaluation.py +0 -167
  42. spaces/CVPR/LIVE/pybind11/include/pybind11/buffer_info.h +0 -116
  43. spaces/CVPR/LIVE/thrust/thrust/detail/allocator/allocator_traits.h +0 -422
  44. spaces/CVPR/regionclip-demo/detectron2/data/transforms/augmentation.py +0 -377
  45. spaces/Chenyuwen/playground/README.md +0 -13
  46. spaces/CikeyQI/Yunzai/Yunzai/plugins/ws-plugin/apps/admin.js +0 -666
  47. spaces/CoderMayhem/repello/README.md +0 -12
  48. spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/PIL/FtexImagePlugin.py +0 -113
  49. spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/fastapi/dependencies/models.py +0 -58
  50. spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/fontTools/qu2cu/cli.py +0 -124
spaces/1gistliPinn/ChatGPT4/Examples/Arcsoft Totalmedia 3.5 Key Keygenl.md DELETED
@@ -1,8 +0,0 @@
1
- <br />
2
- <p>arcsoft totalmedia is a professional multimedia player that will help you browse through, edit, and convert your photos, videos, and other multimedia files. the software also allows you to rip cds to audio, add effects, watermark, and resize your media files.</p>
3
- <p>arcsoft totalmedia is a multimedia player that supports a wide range of file types, including photographs, movies, and music. this program will come in handy if you want to have a good time because of its adaptability. if your computer has a tv card, arcsoft totalmedia includes a connection to it so you may watch your favorite shows while using the program.</p>
4
- <h2>Arcsoft Totalmedia 3.5 Key Keygenl</h2><br /><p><b><b>Download</b> &#10038;&#10038;&#10038; <a href="https://imgfil.com/2uxXME">https://imgfil.com/2uxXME</a></b></p><br /><br />
5
- <p>arcsoft totalmedia is a professional video player that can convert dvds and low-resolution videos to near-high-resolution quality. it also makes it simple to search for and share youtube videos, as well as manage all of the programs media files. its a versatile and user-friendly media hub that allows you to watch and record tv shows, edit photos and videos, listen to music, and more. its a comprehensive software suite that gives users access to a variety of tools for handling multimedia files. everything you need to organize and play your films, photographs, and music are included in the software. it also includes advanced editing capabilities, allowing you to make your own multimedia productions.</p>
6
- <p>while arcsoft totalmedia has undergone many changes over the years, it remains a popular multimedia application among both home users and professionals. the softwares ease of use and wide range of features make it an ideal choice for those who want to view, create, and edit various types of media files.</p> 899543212b<br />
7
- <br />
8
- <br />
 
 
 
 
 
 
 
 
 
spaces/1gistliPinn/ChatGPT4/Examples/Bizarre Soft Pachet Legislativ Auto How to Pass the Driving Test with Ease Using This Software.md DELETED
@@ -1,6 +0,0 @@
1
- <h2>Bizarre Soft Pachet Legislativ Auto</h2><br /><p><b><b>Download Zip</b> &#10001; <a href="https://imgfil.com/2uxZRV">https://imgfil.com/2uxZRV</a></b></p><br /><br />
2
- <br />
3
- aaccfb2cb3<br />
4
- <br />
5
- <br />
6
- <p></p>
 
 
 
 
 
 
 
spaces/1gistliPinn/ChatGPT4/Examples/Constantine2fullmoviedownload LINK.md DELETED
@@ -1,8 +0,0 @@
1
- <h2>constantine2fullmoviedownload</h2><br /><p><b><b>DOWNLOAD</b> &#10004; <a href="https://imgfil.com/2uxXnR">https://imgfil.com/2uxXnR</a></b></p><br /><br />
2
-
3
- Constantine: City of Demons. Constantine: City of Demons. See All.Genre: Adventure. Director: Greg Beeman. Starring: Keanu Reeves, Gary Oldman, Jennifer Reeves, Oliver Platt. Genres: Comedy, Drama, Horror, Sci-Fi. Runtime: 92 min. Warner Bros. Pictures. Posted in: Horror.Video Quality: 480p. On the streets of Los Angeles a psychic is beaten to death. Police detectives discover a mysterious series of occult symbols scrawled in blood on the body. The investigators believe the ritual killing has something to do with a series of vicious animal attacks that have begun to plague the city. An occult crime beat cop and a medical examiner are drawn into a battle with a dark force that is out to destroy the city. When the cops try to shut down the underground nightclub where the ritual killings are taking place, they find that their efforts are blocked. Worse, an enemy with a long memory begins to stalk Constantine with a deep hatred for what he is. A horror-comedy that is filled with gore, occult symbolism, and horrific deaths. Constantine has been called one of the most influential comic book heroes in all of the mediums. His most notable creations include the DC Comics character John Constantine, the main character in the 2004 live action film Constantine, the comic book character Purgatori and her seer girlfriend Mina who play a major role in the crossover series Constantine vs. The Mute. The character is the reincarnation of John Constantine, the protagonist of the Hellblazer comic book series, created by Jamie Delano, Pat Mills, and John Romita, Jr. and published by DC Comics since January 1992. John Constantine has since made cameo appearances in Batman Begins and The Dark Knight, and became the main protagonist of the DC Animated Universe, voicing himself in Justice League: The New Animated Series. John Constantine's place in the DC Universe is comparable to that of Batman's in the DC Extended Universe. The Hellblazer has made appearances in several of the animated series featuring Batman. Constantine is one of many characters who served as inspiration for the Dark Knight. The character was created by writer Alan Moore and artist Alan Davis in a 1987 issue of the DC Comics anthology comic book series Doom Patrol.
4
-
5
- John Constantine: Hellblazer - The Soul Play. Watchlist. Constantine: City of Demons - The Movie.Constantine: City of Demons. Constantine: City of Demons. See All.Genre: Adventure. Director: Greg Beeman 4fefd39f24<br />
6
- <br />
7
- <br />
8
- <p></p>
 
 
 
 
 
 
 
 
 
spaces/1gistliPinn/ChatGPT4/Examples/Cours Revit Architecture Gratuit Pdf.md DELETED
@@ -1,10 +0,0 @@
1
-
2
- <p>id="78525">[PDF] formation revit bim architecture 6 jours7 mar 2019 · FORMATION REVIT BIM ARCHITECTURE 6 JOURS : Pour les architectes qui passent à la maquette numérique REALISER UNE MODÉLISATION SIMPLE SUR <br/>0-190121_programme_revit_architecture_4j_2j_.pdf</p>
3
- <p>id="72258">[PDF] Guide d'utilisation - AutodeskPermission is hereby granted, free of charge, to any person obtaining a copy of this software Comment Revit Architecture assure-t-il les mises à jour ?<br/>revit_architecture_2011_user_guide_fra.pdf</p>
4
- <h2>Cours Revit Architecture Gratuit Pdf</h2><br /><p><b><b>Download</b> &#9193; <a href="https://imgfil.com/2uy0bK">https://imgfil.com/2uy0bK</a></b></p><br /><br />
5
- <p>id="14761">[PDF] Autodesk® Revit® - CRMet d'architecture Modélisation et présentation de systèmes de bâtiments Les outils de modélisation et de présentation du logiciel Revit MEP permettent <br/>revit_mep_overview_brochure_a4_fr.pdf</p>
6
- <p>cours revit architecture gratuit pdf cours revit architecture gratuit pdf , cours de revit architecture gratuit, cours revit architecture 2017 gratuit pdf , cours revit structure gratuit pdf Note: This video uses Dynamo inside of the Revit application, but the In this lesson we will introduce the building mass for the course, demonstrate its<br/>Cours-revit-architecture-gratuit-pdf.pdf</p>
7
- <p>Yes. Educators and students can get free educational access of 1 year. It can be easily renewable as long as you remain eligible. "}},"@type":"Question","name":"\ud83c\udfc5 What are the best resources to learn Autodesk Revit?","acceptedAnswer":"@type":"Answer","text":"You can enroll in the best online Revit training\tclasses listed above. There are also some courses that provide you a free trial for a particular month. It is good that you try them before you go to paid classes. ","@type":"Question","name":"\ud83d\udcbb Which laptop is best for Revit?","acceptedAnswer":"@type":"Answer","text":"You can use the following laptops to get the best experience in working with Revit: <ul><li>Acer Predator Helios 300 <li>Microsoft Surface Book 2 <li>Lenovo Ideapad Y700 <li>Lenovo Thinkpad P50<li>MSI GL62M <li>Dell Inspiron i5577 ","@type":"Question","name":"\u2757 Which is better to learn AutoCAD or Revit?","acceptedAnswer":"@type":"Answer","text":"AutoCAD is good for 2D drawing. It can be used for precise and detailed designs. Revit, on the other hand, is a perfect choice for modeling and generating cost schedules."]}],"@id":" -revit-courses.html#schema-33689","isPartOf":"@id":" -revit-courses.html#webpage","publisher":"@id":" ","image":"@id":" -revit-courses-1.png","inLanguage":"en-US","mainEntityOfPage":"@id":" -revit-courses.html#webpage"}]}document.documentElement.classList.remove( 'no-js' );img.wp-smiley,img.emoji display: inline !important;border: none !important;box-shadow: none !important;height: 1em !important;width: 1em !important;margin: 0 0.07em !important;vertical-align: -0.1em !important;background: none !important;padding: 0 !important;body--wp--preset--color--black: #000000;--wp--preset--color--cyan-bluish-gray: #abb8c3;--wp--preset--color--white: #ffffff;--wp--preset--color--pale-pink: #f78da7;--wp--preset--color--vivid-red: #cf2e2e;--wp--preset--color--luminous-vivid-orange: #ff6900;--wp--preset--color--luminous-vivid-amber: #fcb900;--wp--preset--color--light-green-cyan: #7bdcb5;--wp--preset--color--vivid-green-cyan: #00d084;--wp--preset--color--pale-cyan-blue: #8ed1fc;--wp--preset--color--vivid-cyan-blue: #0693e3;--wp--preset--color--vivid-purple: #9b51e0;--wp--preset--color--theme-palette-1: #3182CE;--wp--preset--color--theme-palette-2: #2B6CB0;--wp--preset--color--theme-palette-3: #1A202C;--wp--preset--color--theme-palette-4: #2D3748;--wp--preset--color--theme-palette-5: #4A5568;--wp--preset--color--theme-palette-6: #718096;--wp--preset--color--theme-palette-7: #EDF2F7;--wp--preset--color--theme-palette-8: #F7FAFC;--wp--preset--color--theme-palette-9: #FFFFFF;--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple: linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%);--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan: linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%);--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange: linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%);--wp--preset--gradient--luminous-vivid-orange-to-vivid-red: linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%);--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray: linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%);--wp--preset--gradient--cool-to-warm-spectrum: linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%);--wp--preset--gradient--blush-light-purple: linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%);--wp--preset--gradient--blush-bordeaux: linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%);--wp--preset--gradient--luminous-dusk: linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%);--wp--preset--gradient--pale-ocean: linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%);--wp--preset--gradient--electric-grass: linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%);--wp--preset--gradient--midnight: linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%);--wp--preset--duotone--dark-grayscale: url('#wp-duotone-dark-grayscale');--wp--preset--duotone--grayscale: url('#wp-duotone-grayscale');--wp--preset--duotone--purple-yellow: url('#wp-duotone-purple-yellow');--wp--preset--duotone--blue-red: url('#wp-duotone-blue-red');--wp--preset--duotone--midnight: url('#wp-duotone-midnight');--wp--preset--duotone--magenta-yellow: url('#wp-duotone-magenta-yellow');--wp--preset--duotone--purple-green: url('#wp-duotone-purple-green');--wp--preset--duotone--blue-orange: url('#wp-duotone-blue-orange');--wp--preset--font-size--small: 14px;--wp--preset--font-size--medium: 24px;--wp--preset--font-size--large: 32px;--wp--preset--font-size--x-large: 42px;--wp--preset--font-size--larger: 40px;.has-black-colorcolor: var(--wp--preset--color--black) !important;.has-cyan-bluish-gray-colorcolor: var(--wp--preset--color--cyan-bluish-gray) !important;.has-white-colorcolor: var(--wp--preset--color--white) !important;.has-pale-pink-colorcolor: var(--wp--preset--color--pale-pink) !important;.has-vivid-red-colorcolor: var(--wp--preset--color--vivid-red) !important;.has-luminous-vivid-orange-colorcolor: var(--wp--preset--color--luminous-vivid-orange) !important;.has-luminous-vivid-amber-colorcolor: var(--wp--preset--color--luminous-vivid-amber) !important;.has-light-green-cyan-colorcolor: var(--wp--preset--color--light-green-cyan) !important;.has-vivid-green-cyan-colorcolor: var(--wp--preset--color--vivid-green-cyan) !important;.has-pale-cyan-blue-colorcolor: var(--wp--preset--color--pale-cyan-blue) !important;.has-vivid-cyan-blue-colorcolor: var(--wp--preset--color--vivid-cyan-blue) !important;.has-vivid-purple-colorcolor: var(--wp--preset--color--vivid-purple) !important;.has-black-background-colorbackground-color: var(--wp--preset--color--black) !important;.has-cyan-bluish-gray-background-colorbackground-color: var(--wp--preset--color--cyan-bluish-gray) !important;.has-white-background-colorbackground-color: var(--wp--preset--color--white) !important;.has-pale-pink-background-colorbackground-color: var(--wp--preset--color--pale-pink) !important;.has-vivid-red-background-colorbackground-color: var(--wp--preset--color--vivid-red) !important;.has-luminous-vivid-orange-background-colorbackground-color: var(--wp--preset--color--luminous-vivid-orange) !important;.has-luminous-vivid-amber-background-colorbackground-color: var(--wp--preset--color--luminous-vivid-amber) !important;.has-light-green-cyan-background-colorbackground-color: var(--wp--preset--color--light-green-cyan) !important;.has-vivid-green-cyan-background-colorbackground-color: var(--wp--preset--color--vivid-green-cyan) !important;.has-pale-cyan-blue-background-colorbackground-color: var(--wp--preset--color--pale-cyan-blue) !important;.has-vivid-cyan-blue-background-colorbackground-color: var(--wp--preset--color--vivid-cyan-blue) !important;.has-vivid-purple-background-colorbackground-color: var(--wp--preset--color--vivid-purple) !important;.has-black-border-colorborder-color: var(--wp--preset--color--black) !important;.has-cyan-bluish-gray-border-colorborder-color: var(--wp--preset--color--cyan-bluish-gray) !important;.has-white-border-colorborder-color: var(--wp--preset--color--white) !important;.has-pale-pink-border-colorborder-color: var(--wp--preset--color--pale-pink) !important;.has-vivid-red-border-colorborder-color: var(--wp--preset--color--vivid-red) !important;.has-luminous-vivid-orange-border-colorborder-color: var(--wp--preset--color--luminous-vivid-orange) !important;.has-luminous-vivid-amber-border-colorborder-color: var(--wp--preset--color--luminous-vivid-amber) !important;.has-light-green-cyan-border-colorborder-color: var(--wp--preset--color--light-green-cyan) !important;.has-vivid-green-cyan-border-colorborder-color: var(--wp--preset--color--vivid-green-cyan) !important;.has-pale-cyan-blue-border-colorborder-color: var(--wp--preset--color--pale-cyan-blue) !important;.has-vivid-cyan-blue-border-colorborder-color: var(--wp--preset--color--vivid-cyan-blue) !important;.has-vivid-purple-border-colorborder-color: var(--wp--preset--color--vivid-purple) !important;.has-vivid-cyan-blue-to-vivid-purple-gradient-backgroundbackground: var(--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple) !important;.has-light-green-cyan-to-vivid-green-cyan-gradient-backgroundbackground: var(--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan) !important;.has-luminous-vivid-amber-to-luminous-vivid-orange-gradient-backgroundbackground: var(--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange) !important;.has-luminous-vivid-orange-to-vivid-red-gradient-backgroundbackground: var(--wp--preset--gradient--luminous-vivid-orange-to-vivid-red) !important;.has-very-light-gray-to-cyan-bluish-gray-gradient-backgroundbackground: var(--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray) !important;.has-cool-to-warm-spectrum-gradient-backgroundbackground: var(--wp--preset--gradient--cool-to-warm-spectrum) !important;.has-blush-light-purple-gradient-backgroundbackground: var(--wp--preset--gradient--blush-light-purple) !important;.has-blush-bordeaux-gradient-backgroundbackground: var(--wp--preset--gradient--blush-bordeaux) !important;.has-luminous-dusk-gradient-backgroundbackground: var(--wp--preset--gradient--luminous-dusk) !important;.has-pale-ocean-gradient-backgroundbackground: var(--wp--preset--gradient--pale-ocean) !important;.has-electric-grass-gradient-backgroundbackground: var(--wp--preset--gradient--electric-grass) !important;.has-midnight-gradient-backgroundbackground: var(--wp--preset--gradient--midnight) !important;.has-small-font-sizefont-size: var(--wp--preset--font-size--small) !important;.has-medium-font-sizefont-size: var(--wp--preset--font-size--medium) !important;.has-large-font-sizefont-size: var(--wp--preset--font-size--large) !important;.has-x-large-font-sizefont-size: var(--wp--preset--font-size--x-large) !important;.wp-block-navigation a:where(:not(.wp-element-button))color: inherit;:where(.wp-block-columns.is-layout-flex)gap: 2em;.wp-block-pullquotefont-size: 1.5em;line-height: 1.6;/* Kadence Base CSS */:root--global-palette1:#3182CE;--global-palette2:#2B6CB0;--global-palette3:#1A202C;--global-palette4:#2D3748;--global-palette5:#4A5568;--global-palette6:#718096;--global-palette7:#EDF2F7;--global-palette8:#F7FAFC;--global-palette9:#FFFFFF;--global-palette9rgb:255, 255, 255;--global-palette-highlight:#0556f3;--global-palette-highlight-alt:#0556f3;--global-palette-highlight-alt2:var(--global-palette9);--global-palette-btn-bg:var(--global-palette1);--global-palette-btn-bg-hover:var(--global-palette1);--global-palette-btn:var(--global-palette9);--global-palette-btn-hover:var(--global-palette9);--global-body-font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--global-heading-font-family:'Source Sans Pro', sans-serif;--global-primary-nav-font-family:inherit;--global-fallback-font:sans-serif;--global-display-fallback-font:sans-serif;--global-content-width:1290px;--global-content-narrow-width:842px;--global-content-edge-padding:1.5rem;--global-calc-content-width:calc(1290px - var(--global-content-edge-padding) - var(--global-content-edge-padding) );.wp-site-blocks--global-vw:calc( 100vw - ( 0.5 * var(--scrollbar-offset)));:root .has-theme-palette-1-background-colorbackground-color:var(--global-palette1);:root .has-theme-palette-1-colorcolor:var(--global-palette1);:root .has-theme-palette-2-background-colorbackground-color:var(--global-palette2);:root .has-theme-palette-2-colorcolor:var(--global-palette2);:root .has-theme-palette-3-background-colorbackground-color:var(--global-palette3);:root .has-theme-palette-3-colorcolor:var(--global-palette3);:root .has-theme-palette-4-background-colorbackground-color:var(--global-palette4);:root .has-theme-palette-4-colorcolor:var(--global-palette4);:root .has-theme-palette-5-background-colorbackground-color:var(--global-palette5);:root .has-theme-palette-5-colorcolor:var(--global-palette5);:root .has-theme-palette-6-background-colorbackground-color:var(--global-palette6);:root .has-theme-palette-6-colorcolor:var(--global-palette6);:root .has-theme-palette-7-background-colorbackground-color:var(--global-palette7);:root .has-theme-palette-7-colorcolor:var(--global-palette7);:root .has-theme-palette-8-background-colorbackground-color:var(--global-palette8);:root .has-theme-palette-8-colorcolor:var(--global-palette8);:root .has-theme-palette-9-background-colorbackground-color:var(--global-palette9);:root .has-theme-palette-9-colorcolor:var(--global-palette9);:root .has-theme-palette1-background-colorbackground-color:var(--global-palette1);:root .has-theme-palette1-colorcolor:var(--global-palette1);:root .has-theme-palette2-background-colorbackground-color:var(--global-palette2);:root .has-theme-palette2-colorcolor:var(--global-palette2);:root .has-theme-palette3-background-colorbackground-color:var(--global-palette3);:root .has-theme-palette3-colorcolor:var(--global-palette3);:root .has-theme-palette4-background-colorbackground-color:var(--global-palette4);:root .has-theme-palette4-colorcolor:var(--global-palette4);:root .has-theme-palette5-background-colorbackground-color:var(--global-palette5);:root .has-theme-palette5-colorcolor:var(--global-palette5);:root .has-theme-palette6-background-colorbackground-color:var(--global-palette6);:root .has-theme-palette6-colorcolor:var(--global-palette6);:root .has-theme-palette7-background-colorbackground-color:var(--global-palette7);:root .has-theme-palette7-colorcolor:var(--global-palette7);:root .has-theme-palette8-background-colorbackground-color:var(--global-palette8);:root .has-theme-palette8-colorcolor:var(--global-palette8);:root .has-theme-palette9-background-colorbackground-color:var(--global-palette9);:root .has-theme-palette9-colorcolor:var(--global-palette9);bodybackground:var(--global-palette9);body, input, select, optgroup, textareafont-style:normal;font-weight:400;font-size:18px;line-height:27px;font-family:var(--global-body-font-family);color:#222222;.content-bg, body.content-style-unboxed .sitebackground:var(--global-palette9);h1,h2,h3,h4,h5,h6font-family:var(--global-heading-font-family);h1font-style:normal;font-weight:normal;font-size:31px;line-height:34px;font-family:'Source Sans Pro', sans-serif;color:#222222;h2font-style:normal;font-weight:normal;font-size:26px;line-height:40px;font-family:'Source Sans Pro', sans-serif;color:#222222;h3font-style:normal;font-weight:normal;font-size:22px;line-height:25px;font-family:'Source Sans Pro', sans-serif;color:#222222;h4font-style:normal;font-weight:normal;font-size:20px;line-height:21px;font-family:'Source Sans Pro', sans-serif;color:#222222;h5font-style:normal;font-weight:normal;font-size:19px;line-height:20px;font-family:'Source Sans Pro', sans-serif;color:#222222;h6font-style:normal;font-weight:normal;font-size:18px;line-height:1.5;font-family:'Source Sans Pro', sans-serif;color:#222222;.entry-hero h1font-style:normal;font-weight:normal;font-size:31px;line-height:34px;font-family:'Source Sans Pro', sans-serif;color:#222222;.entry-hero .kadence-breadcrumbs, .entry-hero .search-formfont-style:normal;.entry-hero .kadence-breadcrumbsmax-width:1290px;.site-container, .site-header-row-layout-contained, .site-footer-row-layout-contained, .entry-hero-layout-contained, .comments-area, .alignfull > .wp-block-cover__inner-container, .alignwide > .wp-block-cover__inner-containermax-width:var(--global-content-width);.content-width-narrow .content-container.site-container, .content-width-narrow .hero-container.site-containermax-width:var(--global-content-narrow-width);@media all and (min-width: 1520px).wp-site-blocks .content-container .alignwidemargin-left:-115px;margin-right:-115px;width:unset;max-width:unset;@media all and (min-width: 1102px).content-width-narrow .wp-site-blocks .content-container .alignwidemargin-left:-130px;margin-right:-130px;width:unset;max-width:unset;.content-style-boxed .wp-site-blocks .entry-content .alignwidemargin-left:-2rem;margin-right:-2rem;@media all and (max-width: 1024px).content-style-boxed .wp-site-blocks .entry-content .alignwidemargin-left:-2rem;margin-right:-2rem;@media all and (max-width: 767px).content-style-boxed .wp-site-blocks .entry-content .alignwidemargin-left:-1.5rem;margin-right:-1.5rem;.content-areamargin-top:5rem;margin-bottom:5rem;@media all and (max-width: 1024px).content-areamargin-top:3rem;margin-bottom:3rem;@media all and (max-width: 767px).content-areamargin-top:2rem;margin-bottom:2rem;.entry-content-wrappadding:2rem;@media all and (max-width: 1024px).entry-content-wrappadding:2rem;@media all and (max-width: 767px).entry-content-wrappadding:1.5rem;.entry.single-entrybox-shadow:0px 15px 15px -10px rgba(0,0,0,0.05);.entry.loop-entrybox-shadow:0px 15px 15px -10px rgba(0,0,0,0.05);.loop-entry .entry-content-wrappadding:2rem;@media all and (max-width: 1024px).loop-entry .entry-content-wrappadding:2rem;@media all and (max-width: 767px).loop-entry .entry-content-wrappadding:1.5rem;.primary-sidebar.widget-area .widgetmargin-bottom:1.5em;color:var(--global-palette4);.primary-sidebar.widget-area .widget-titlefont-style:normal;font-weight:normal;font-size:20px;line-height:1.5;color:var(--global-palette3);.primary-sidebar.widget-area .sidebar-inner-wrap a:where(:not(.button):not(.wp-block-button__link):not(.wp-element-button)):hovercolor:#ec4747;.primary-sidebar.widget-areabackground:var(--global-palette9);.has-sidebar.has-left-sidebar .primary-sidebar.widget-areaborder-right:1px solid #e1e1e1;.has-sidebar:not(.has-left-sidebar) .primary-sidebar.widget-areaborder-left:1px solid #e1e1e1;button, .button, .wp-block-button__link, input[type="button"], input[type="reset"], input[type="submit"], .fl-button, .elementor-button-wrapper .elementor-buttonbox-shadow:0px 0px 0px -7px rgba(0,0,0,0);button:hover, button:focus, button:active, .button:hover, .button:focus, .button:active, .wp-block-button__link:hover, .wp-block-button__link:focus, .wp-block-button__link:active, input[type="button"]:hover, input[type="button"]:focus, input[type="button"]:active, input[type="reset"]:hover, input[type="reset"]:focus, input[type="reset"]:active, input[type="submit"]:hover, input[type="submit"]:focus, input[type="submit"]:active, .elementor-button-wrapper .elementor-button:hover, .elementor-button-wrapper .elementor-button:focus, .elementor-button-wrapper .elementor-button:activebox-shadow:0px 15px 25px -7px rgba(0,0,0,0.1);@media all and (min-width: 1025px).transparent-header .entry-hero .entry-hero-container-innerpadding-top:49px;@media all and (max-width: 1024px).mobile-transparent-header .entry-hero .entry-hero-container-innerpadding-top:49px;@media all and (max-width: 767px).mobile-transparent-header .entry-hero .entry-hero-container-innerpadding-top:49px;.wp-site-blocks .entry-hero-container-innerbackground:var(--global-palette9);#colophonbackground:#323a56;.site-middle-footer-wrap .site-footer-row-container-innerbackground:#323a56;font-style:normal;.site-footer .site-middle-footer-wrap a:where(:not(.button):not(.wp-block-button__link):not(.wp-element-button))color:var(--global-palette1);.site-footer .site-middle-footer-wrap a:where(:not(.button):not(.wp-block-button__link):not(.wp-element-button)):hovercolor:var(--global-palette1);.site-middle-footer-inner-wrappadding-top:0px;padding-bottom:30px;grid-column-gap:0px;grid-row-gap:0px;.site-middle-footer-inner-wrap .widgetmargin-bottom:30px;.site-middle-footer-inner-wrap .widget-area .widget-titlefont-style:normal;font-weight:400;.site-middle-footer-inner-wrap .site-footer-section:not(:last-child):afterright:calc(-0px / 2);.site-top-footer-wrap .site-footer-row-container-innerbackground:#323a56;font-style:normal;color:var(--global-palette4);border-bottom:0px none transparent;.site-footer .site-top-footer-wrap a:not(.button):not(.wp-block-button__link):not(.wp-element-button)color:var(--global-palette1);.site-top-footer-inner-wrappadding-top:0px;padding-bottom:0px;grid-column-gap:0px;grid-row-gap:0px;.site-top-footer-inner-wrap .widgetmargin-bottom:30px;.site-top-footer-inner-wrap .site-footer-section:not(:last-child):afterborder-right:0px none transparent;right:calc(-0px / 2);@media all and (max-width: 767px).site-top-footer-wrap .site-footer-row-container-innerborder-bottom:1px none #323a56;.site-top-footer-inner-wrap .site-footer-section:not(:last-child):afterborder-right:0px none transparent;.site-bottom-footer-wrap .site-footer-row-container-innerbackground:var(--global-palette9);.site-bottom-footer-inner-wrappadding-top:30px;padding-bottom:30px;grid-column-gap:30px;.site-bottom-footer-inner-wrap .widgetmargin-bottom:30px;.site-bottom-footer-inner-wrap .site-footer-section:not(:last-child):afterright:calc(-30px / 2);.footer-social-wrapmargin:0px 0px 0px 0px;.footer-social-wrap .footer-social-inner-wrapfont-size:1.28em;gap:0.3em;.site-footer .site-footer-wrap .site-footer-section .footer-social-wrap .footer-social-inner-wrap .social-buttoncolor:var(--global-palette9);border:2px none transparent;border-color:var(--global-palette9);border-radius:3px;.site-footer .site-footer-wrap .site-footer-section .footer-social-wrap .footer-social-inner-wrap .social-button:hovercolor:var(--global-palette9);border-color:var(--global-palette9);#colophon .footer-htmlfont-style:normal;color:var(--global-palette9);#colophon .site-footer-row-container .site-footer-row .footer-html acolor:var(--global-palette9);#kt-scroll-up-reader, #kt-scroll-upborder-radius:0px 0px 0px 0px;color:var(--global-palette3);border-color:var(--global-palette4);bottom:30px;font-size:1.2em;padding:0.4em 0.4em 0.4em 0.4em;#kt-scroll-up-reader.scroll-up-side-right, #kt-scroll-up.scroll-up-side-rightright:30px;#kt-scroll-up-reader.scroll-up-side-left, #kt-scroll-up.scroll-up-side-leftleft:30px;#kt-scroll-up-reader:hover, #kt-scroll-up:hovercolor:var(--global-palette2);border-color:var(--global-palette2);#colophon .footer-navigation .footer-menu-container > ul > li > apadding-left:calc(1.2em / 2);padding-right:calc(1.2em / 2);color:var(--global-palette5);#colophon .footer-navigation .footer-menu-container > ul li a:hovercolor:var(--global-palette-highlight);#colophon .footer-navigation .footer-menu-container > ul li.current-menu-item > acolor:var(--global-palette3);body.pagebackground:var(--global-palette9);.entry-hero.page-hero-section .entry-headermin-height:200px;.comment-metadata a:not(.comment-edit-link), .comment-body .edit-link:beforedisplay:none;.entry-hero.post-hero-section .entry-headermin-height:200px;/* Kadence Header CSS */@media all and (max-width: 1024px).mobile-transparent-header #mastheadposition:absolute;left:0px;right:0px;z-index:100;.kadence-scrollbar-fixer.mobile-transparent-header #mastheadright:var(--scrollbar-offset,0);.mobile-transparent-header #masthead, .mobile-transparent-header .site-top-header-wrap .site-header-row-container-inner, .mobile-transparent-header .site-main-header-wrap .site-header-row-container-inner, .mobile-transparent-header .site-bottom-header-wrap .site-header-row-container-innerbackground:transparent;.site-header-row-tablet-layout-fullwidth, .site-header-row-tablet-layout-standardpadding:0px;@media all and (min-width: 1025px).transparent-header #mastheadposition:absolute;left:0px;right:0px;z-index:100;.transparent-header.kadence-scrollbar-fixer #mastheadright:var(--scrollbar-offset,0);.transparent-header #masthead, .transparent-header .site-top-header-wrap .site-header-row-container-inner, .transparent-header .site-main-header-wrap .site-header-row-container-inner, .transparent-header .site-bottom-header-wrap .site-header-row-container-innerbackground:transparent;.site-branding a.brand imgmax-width:135px;.site-branding a.brand img.svg-logo-imagewidth:135px;.site-brandingpadding:0px 0px 0px 0px;#masthead, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start):not(.site-header-row-container), #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) > .site-header-row-container-innerbackground:#ffffff;.site-main-header-wrap .site-header-row-container-innerborder-bottom:1px solid #cccccc;.site-main-header-inner-wrapmin-height:49px;.site-top-header-wrap .site-header-row-container-innerbackground:var(--global-palette1);.site-top-header-inner-wrapmin-height:0px;.site-bottom-header-inner-wrapmin-height:0px;#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start):not(.site-header-row-container):not(.item-hidden-above), #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start):not(.item-hidden-above) > .site-header-row-container-innerbackground:var(--global-palette9);#masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .site-branding .site-title, #masthead .kadence-sticky-header.item-is-fixed:not(.item-at-start) .site-branding .site-descriptioncolor:var(--global-palette3);.header-navigation[class*="header-navigation-style-underline"] .header-menu-container.primary-menu-container>ul>li>a:afterwidth:calc( 100% - 2em);.main-navigation .primary-menu-container > ul > li.menu-item > apadding-left:calc(2em / 2);padding-right:calc(2em / 2);padding-top:0em;padding-bottom:0em;color:#4a5568;.main-navigation .primary-menu-container > ul > li.menu-item > .dropdown-nav-special-toggleright:calc(2em / 2);.main-navigation .primary-menu-container > ul > li.menu-item > a:hovercolor:#000000;.main-navigation .primary-menu-container > ul > li.menu-item.current-menu-item > acolor:#1a202c;.header-navigation[class*="header-navigation-style-underline"] .header-menu-container.secondary-menu-container>ul>li>a:afterwidth:calc( 100% - 1.2em);.secondary-navigation .secondary-menu-container > ul > li.menu-item > apadding-left:calc(1.2em / 2);padding-right:calc(1.2em / 2);padding-top:0.6em;padding-bottom:0.6em;color:var(--global-palette9);background:var(--global-palette9);.secondary-navigation .primary-menu-container > ul > li.menu-item > .dropdown-nav-special-toggleright:calc(1.2em / 2);.secondary-navigation .secondary-menu-container > ul > li.menu-item > a:hovercolor:#323a56;background:#323a56;.secondary-navigation .secondary-menu-container > ul > li.menu-item.current-menu-item > acolor:#323a56;background:#323a56;.header-navigation .header-menu-container ul ul.sub-menu, .header-navigation .header-menu-container ul ul.submenubackground:#1a202c;box-shadow:0px 2px 13px 0px rgba(0,0,0,0.1);.header-navigation .header-menu-container ul ul li.menu-item, .header-menu-container ul.menu > li.kadence-menu-mega-enabled > ul > li.menu-item > aborder-bottom:1px none rgba(255,255,255,0.1);.header-navigation .header-menu-container ul ul li.menu-item > awidth:100px;padding-top:4px;padding-bottom:4px;color:var(--global-palette8);font-style:normal;font-size:15px;.header-navigation .header-menu-container ul ul li.menu-item > a:hovercolor:var(--global-palette9);background:#323a56;.header-navigation .header-menu-container ul ul li.menu-item.current-menu-item > acolor:var(--global-palette9);background:#2d3748;.mobile-toggle-open-container .menu-toggle-opencolor:var(--global-palette3);padding:0.4em 0.6em 0.4em 0.6em;font-size:14px;.mobile-toggle-open-container .menu-toggle-open.menu-toggle-style-borderedborder:1px solid currentColor;.mobile-toggle-open-container .menu-toggle-open .menu-toggle-iconfont-size:29px;.mobile-toggle-open-container .menu-toggle-open:hover, .mobile-toggle-open-container .menu-toggle-open:focuscolor:#087deb;.mobile-navigation ul lifont-size:14px;.mobile-navigation ul li apadding-top:1em;padding-bottom:1em;.mobile-navigation ul li > a, .mobile-navigation ul li.menu-item-has-children > .drawer-nav-drop-wrapcolor:#f7fafc;.mobile-navigation ul li > a:hover, .mobile-navigation ul li.menu-item-has-children > .drawer-nav-drop-wrap:hovercolor:var(--global-palette9);.mobile-navigation ul li.current-menu-item > a, .mobile-navigation ul li.current-menu-item.menu-item-has-children > .drawer-nav-drop-wrapcolor:var(--global-palette9);.mobile-navigation ul li.menu-item-has-children .drawer-nav-drop-wrap, .mobile-navigation ul li:not(.menu-item-has-children) aborder-bottom:1px solid rgba(255,255,255,0.1);.mobile-navigation:not(.drawer-navigation-parent-toggle-true) ul li.menu-item-has-children .drawer-nav-drop-wrap buttonborder-left:1px solid rgba(255,255,255,0.1);#mobile-drawer .drawer-inner, #mobile-drawer.popup-drawer-layout-fullwidth.popup-drawer-animation-slice .pop-portion-bg, #mobile-drawer.popup-drawer-layout-fullwidth.popup-drawer-animation-slice.pop-animated.show-drawer .drawer-innerbackground:#323a56;#mobile-drawer .drawer-header .drawer-togglepadding:0.6em 0.15em 0.6em 0.15em;font-size:24px;#mobile-drawer .drawer-header .drawer-toggle, #mobile-drawer .drawer-header .drawer-toggle:focuscolor:var(--global-palette9);#mobile-drawer .drawer-header .drawer-toggle:hover, #mobile-drawer .drawer-header .drawer-toggle:focus:hovercolor:#0887fc;#main-header .header-buttoncolor:var(--global-palette9);background:var(--global-palette9);border:2px none transparent;box-shadow:0px 0px 0px -7px rgba(0,0,0,0);#main-header .header-button:hovercolor:#323a56;background:#323a56;box-shadow:0px 15px 25px -7px rgba(0,0,0,0.1);.header-social-wrap .header-social-inner-wrapfont-size:1em;gap:0.3em;.header-social-wrap .header-social-inner-wrap .social-buttonborder:2px none transparent;border-radius:3px;.header-mobile-social-wrap .header-mobile-social-inner-wrapfont-size:1em;gap:0.3em;.header-mobile-social-wrap .header-mobile-social-inner-wrap .social-buttonborder:2px none transparent;border-radius:3px;.search-toggle-open-container .search-toggle-opencolor:var(--global-palette5);.search-toggle-open-container .search-toggle-open.search-toggle-style-borderedborder:1px solid currentColor;.search-toggle-open-container .search-toggle-open .search-toggle-iconfont-size:1em;.search-toggle-open-container .search-toggle-open:hover, .search-toggle-open-container .search-toggle-open:focuscolor:var(--global-palette-highlight);#search-drawer .drawer-innerbackground:rgba(9, 12, 16, 0.97);.mobile-header-button-wrap .mobile-header-button-inner-wrap .mobile-header-buttonborder:2px none transparent;box-shadow:0px 0px 0px -7px rgba(0,0,0,0);.mobile-header-button-wrap .mobile-header-button-inner-wrap .mobile-header-button:hoverbox-shadow:0px 15px 25px -7px rgba(0,0,0,0.1);/* Kadence Pro Header CSS */.header-navigation-dropdown-direction-left ul ul.submenu, .header-navigation-dropdown-direction-left ul ul.sub-menuright:0px;left:auto;.rtl .header-navigation-dropdown-direction-right ul ul.submenu, .rtl .header-navigation-dropdown-direction-right ul ul.sub-menuleft:0px;right:auto;.header-account-button .nav-drop-title-wrap > .kadence-svg-iconset, .header-account-button > .kadence-svg-iconsetfont-size:1.2em;.site-header-item .header-account-button .nav-drop-title-wrap, .site-header-item .header-account-wrap > .header-account-buttondisplay:flex;align-items:center;.header-account-style-icon_label .header-account-labelpadding-left:5px;.header-account-style-label_icon .header-account-labelpadding-right:5px;.site-header-item .header-account-wrap .header-account-buttontext-decoration:none;box-shadow:none;color:inherit;background:transparent;padding:0.6em 0em 0.6em 0em;.header-mobile-account-wrap .header-account-button .nav-drop-title-wrap > .kadence-svg-iconset, .header-mobile-account-wrap .header-account-button > .kadence-svg-iconsetfont-size:1.2em;.header-mobile-account-wrap .header-account-button .nav-drop-title-wrap, .header-mobile-account-wrap > .header-account-buttondisplay:flex;align-items:center;.header-mobile-account-wrap.header-account-style-icon_label .header-account-labelpadding-left:5px;.header-mobile-account-wrap.header-account-style-label_icon .header-account-labelpadding-right:5px;.header-mobile-account-wrap .header-account-buttontext-decoration:none;box-shadow:none;color:inherit;background:transparent;padding:0.6em 0em 0.6em 0em;#login-drawer .drawer-inner .drawer-contentdisplay:flex;justify-content:center;align-items:center;position:absolute;top:0px;bottom:0px;left:0px;right:0px;padding:0px;#loginform p labeldisplay:block;#login-drawer #loginformwidth:100%;#login-drawer #loginform inputwidth:100%;#login-drawer #loginform input[type="checkbox"]width:auto;#login-drawer .drawer-inner .drawer-headerposition:relative;z-index:100;#login-drawer .drawer-content_inner.widget_login_form_innerpadding:2em;width:100%;max-width:350px;border-radius:.25rem;background:var(--global-palette9);color:var(--global-palette4);#login-drawer .lost_password acolor:var(--global-palette6);#login-drawer .lost_password, #login-drawer .register-fieldtext-align:center;#login-drawer .widget_login_form_inner pmargin-top:1.2em;margin-bottom:0em;#login-drawer .widget_login_form_inner p:first-childmargin-top:0em;#login-drawer .widget_login_form_inner labelmargin-bottom:0.5em;#login-drawer hr.register-dividermargin:1.2em 0;border-width:1px;#login-drawer .register-fieldfont-size:90%;.tertiary-navigation .tertiary-menu-container > ul > li.menu-item > apadding-left:calc(1.2em / 2);padding-right:calc(1.2em / 2);padding-top:0.6em;padding-bottom:0.6em;color:var(--global-palette5);.tertiary-navigation .tertiary-menu-container > ul > li.menu-item > a:hovercolor:var(--global-palette-highlight);.tertiary-navigation .tertiary-menu-container > ul > li.menu-item.current-menu-item > acolor:var(--global-palette3);.quaternary-navigation .quaternary-menu-container > ul > li.menu-item > apadding-left:calc(1.2em / 2);padding-right:calc(1.2em / 2);padding-top:0.6em;padding-bottom:0.6em;color:var(--global-palette5);.quaternary-navigation .quaternary-menu-container > ul > li.menu-item > a:hovercolor:var(--global-palette-highlight);.quaternary-navigation .quaternary-menu-container > ul > li.menu-item.current-menu-item > acolor:var(--global-palette3);#main-header .header-dividerborder-right:1px solid var(--global-palette6);height:50%;#main-header .header-divider2border-right:1px solid var(--global-palette6);height:50%;#main-header .header-divider3border-right:1px solid var(--global-palette6);height:50%;#mobile-header .header-mobile-dividerborder-right:1px solid var(--global-palette6);height:50%;#mobile-header .header-mobile-divider2border-right:1px solid var(--global-palette6);height:50%;.header-item-search-bar form ::-webkit-input-placeholdercolor:currentColor;opacity:0.5;.header-item-search-bar form ::placeholdercolor:currentColor;opacity:0.5;.header-search-bar formmax-width:100%;width:240px;.header-mobile-search-bar formmax-width:calc(100vw - var(--global-sm-spacing) - var(--global-sm-spacing));width:240px;.header-widget-lstyle-normal .header-widget-area-inner a:not(.button)text-decoration:underline;.element-contact-inner-wrapdisplay:flex;flex-wrap:wrap;align-items:center;margin-top:-0.6em;margin-left:calc(-0.6em / 2);margin-right:calc(-0.6em / 2);.element-contact-inner-wrap .header-contact-itemdisplay:inline-flex;flex-wrap:wrap;align-items:center;margin-top:0.6em;margin-left:calc(0.6em / 2);margin-right:calc(0.6em / 2);.element-contact-inner-wrap .header-contact-item .kadence-svg-iconsetfont-size:1em;.header-contact-item imgdisplay:inline-block;.header-contact-item .contact-labelmargin-left:0.3em;.rtl .header-contact-item .contact-labelmargin-right:0.3em;margin-left:0px;.header-mobile-contact-wrap .element-contact-inner-wrapdisplay:flex;flex-wrap:wrap;align-items:center;margin-top:-0.6em;margin-left:calc(-0.6em / 2);margin-right:calc(-0.6em / 2);.header-mobile-contact-wrap .element-contact-inner-wrap .header-contact-itemdisplay:inline-flex;flex-wrap:wrap;align-items:center;margin-top:0.6em;margin-left:calc(0.6em / 2);margin-right:calc(0.6em / 2);.header-mobile-contact-wrap .element-contact-inner-wrap .header-contact-item .kadence-svg-iconsetfont-size:1em;#main-header .header-button2border:2px none transparent;box-shadow:0px 0px 0px -7px rgba(0,0,0,0);#main-header .header-button2:hoverbox-shadow:0px 15px 25px -7px rgba(0,0,0,0.1);.mobile-header-button2-wrap .mobile-header-button-inner-wrap .mobile-header-button2border:2px none transparent;box-shadow:0px 0px 0px -7px rgba(0,0,0,0);.mobile-header-button2-wrap .mobile-header-button-inner-wrap .mobile-header-button2:hoverbox-shadow:0px 15px 25px -7px rgba(0,0,0,0.1);#widget-drawer.popup-drawer-layout-fullwidth .drawer-content .header-widget2, #widget-drawer.popup-drawer-layout-sidepanel .drawer-innermax-width:400px;#widget-drawer.popup-drawer-layout-fullwidth .drawer-content .header-widget2margin:0 auto;.widget-toggle-opendisplay:flex;align-items:center;background:transparent;box-shadow:none;.widget-toggle-open:hover, .widget-toggle-open:focusborder-color:currentColor;background:transparent;box-shadow:none;.widget-toggle-open .widget-toggle-icondisplay:flex;.widget-toggle-open .widget-toggle-labelpadding-right:5px;.rtl .widget-toggle-open .widget-toggle-labelpadding-left:5px;padding-right:0px;.widget-toggle-open .widget-toggle-label:empty, .rtl .widget-toggle-open .widget-toggle-label:emptypadding-right:0px;padding-left:0px;.widget-toggle-open-container .widget-toggle-opencolor:var(--global-palette5);padding:0.4em 0.6em 0.4em 0.6em;font-size:14px;.widget-toggle-open-container .widget-toggle-open.widget-toggle-style-borderedborder:1px solid currentColor;.widget-toggle-open-container .widget-toggle-open .widget-toggle-iconfont-size:20px;.widget-toggle-open-container .widget-toggle-open:hover, .widget-toggle-open-container .widget-toggle-open:focuscolor:var(--global-palette-highlight);#widget-drawer .header-widget-2style-normal a:not(.button)text-decoration:underline;#widget-drawer .header-widget-2style-plain a:not(.button)text-decoration:none;#widget-drawer .header-widget2 .widget-titlecolor:var(--global-palette9);#widget-drawer .header-widget2color:var(--global-palette8);#widget-drawer .header-widget2 a:not(.button), #widget-drawer .header-widget2 .drawer-sub-togglecolor:var(--global-palette8);#widget-drawer .header-widget2 a:not(.button):hover, #widget-drawer .header-widget2 .drawer-sub-toggle:hovercolor:var(--global-palette9);#mobile-secondary-site-navigation ul lifont-size:14px;#mobile-secondary-site-navigation ul li apadding-top:1em;padding-bottom:1em;#mobile-secondary-site-navigation ul li > a, #mobile-secondary-site-navigation ul li.menu-item-has-children > .drawer-nav-drop-wrapcolor:var(--global-palette8);#mobile-secondary-site-navigation ul li.current-menu-item > a, #mobile-secondary-site-navigation ul li.current-menu-item.menu-item-has-children > .drawer-nav-drop-wrapcolor:var(--global-palette-highlight);#mobile-secondary-site-navigation ul li.menu-item-has-children .drawer-nav-drop-wrap, #mobile-secondary-site-navigation ul li:not(.menu-item-has-children) aborder-bottom:1px solid rgba(255,255,255,0.1);#mobile-secondary-site-navigation:not(.drawer-navigation-parent-toggle-true) ul li.menu-item-has-children .drawer-nav-drop-wrap buttonborder-left:1px solid rgba(255,255,255,0.1);:root--lasso-main: #5e36ca !important;--lasso-title: black !important;--lasso-button: #22baa0 !important;--lasso-secondary-button: #22baa0 !important;--lasso-button-text: white !important;--lasso-background: white !important;--lasso-pros: #22baa0 !important;--lasso-cons: #e06470 !important;// Notice how this gets configured before we load Font Awesomewindow.FontAwesomeConfig = autoReplaceSvg: false var googletag=window.googletag||cmd:[];var gptadslots=[];var googletag=googletag||cmd:[]; //load the apstag.js library!function(a9,a,p,s,t,A,g)if(a[a9])return;function q(c,r)a[a9]._Q.push([c,r])a[a9]=init:function()q("i",arguments),fetchBids:function()q("f",arguments),setDisplayBids:function(),targetingKeys:function()return[],_Q:[];A=p.createElement(s);A.async=!0;A.src=t;g=p.getElementsByTagName(s)[0];g.parentNode.insertBefore(A,g)("apstag",window,document,"script","//c.amazon-adsystem.com/aax2/apstag.js");//initialize the apstag.js library on the page to allow biddingapstag.init( pubID: '0b8b4efb-a0ed-455f-9ba8-517e0c56bb55', //enter your pub ID here as shown above, it must within quotes adServer: 'googletag', simplerGPT: true); googletag.cmd.push(function() var mapping1 = googletag.sizeMapping() .addSize([1700, 400], ['fluid',[970, 90], [970, 250],[728, 90],[468, 60],[300, 250],[336, 280],[250, 250]]) .addSize([1024, 0], [[728, 90],[468, 60],[250, 250],[336, 280],[300, 250],[234, 60]]) .addSize([500, 0], [[468, 60],[250, 250],[300, 250],[336, 280],[320, 480],[200, 200]]) .addSize([0, 0], [[320, 50], [300, 250],[300, 50],[320, 100],[250, 250],[200,200]]) .build(); var mapping2 = googletag.sizeMapping() .addSize([1024, 0], ['fluid',[336, 280],[300, 250], [250, 250]]) .addSize([500, 0], [[300, 250], [336, 280], [250, 250]]) .addSize([0, 0], []) .build(); var mapping3 = googletag.sizeMapping() .addSize([1024, 0], [[300, 600], [120, 600], [160, 600],[300, 250],[336, 280],[250, 250],[300, 340],[320, 480]]) .addSize([766, 0], [[160, 600], [120, 600],[250, 250]]) .addSize([0, 0], []) .build(); var mapping4 = googletag.sizeMapping() .addSize([1024, 0], []) .addSize([0, 0], [[320, 50],[300, 50],[360, 50],[400, 50]]) .build(); var mapping5 = googletag.sizeMapping() .addSize([1700, 400], ['fluid',[970, 90], [970, 250],[728, 90],[468, 60]]) .addSize([1024, 0], [[728, 90],[468, 60],[234, 60]]) .addSize([500, 0], [[468, 60],[234, 60]]) .addSize([0, 0], [[300, 250],[336, 280],[250, 250]]) .build(); var mapping6 = googletag.sizeMapping() .addSize([1024, 0], ['fluid',[336, 280],[300, 250], [250, 250]]) .addSize([766, 0], [[300, 250], [336, 280], [250, 250]]) .addSize([0, 0], []) .build(); var mapping7 = googletag.sizeMapping() .addSize([1024, 0], []) .addSize([500, 0], []) .addSize([0, 0], [[320, 50],[300, 50],[320, 100],[200, 200],[234, 60]]) .build(); gptadslots['div-gpt-ad-9092914-1'] = googletag.defineSlot('/24132379/guru99.com_728x90', 'fluid', 'div-gpt-ad-9092914-1') .setTargeting('type', ['sponsored']) .setTargeting('Position', ['top']) .setTargeting('refreshtime', ['30']) .defineSizeMapping(mapping5) .addService(googletag.pubads()); gptadslots['div-gpt-ad-9092914-2'] = googletag.defineSlot('/24132379/guru99.com_728x90', 'fluid', 'div-gpt-ad-9092914-2') .setTargeting('type', ['sponsored']) .setTargeting('Position', ['middle']) .setTargeting('refreshtime', ['30']) .defineSizeMapping(mapping1) .addService(googletag.pubads()); gptadslots['div-gpt-ad-9092914-6'] = googletag.defineSlot('/24132379/guru99.com_728x90', 'fluid', 'div-gpt-ad-9092914-6') .setTargeting('type', ['sponsored']) .setTargeting('Position', ['bottom']) .setTargeting('refreshtime', ['30']) .defineSizeMapping(mapping1) .addService(googletag.pubads()); gptadslots['div-gpt-ad-1543194583199-0'] = googletag.defineSlot('/24132379/guru99.com_300x600_sticky', [[300, 600], [120, 600], [160, 600], [300, 250], [336, 280], [250, 250], [300, 340], [320, 480]], 'div-gpt-ad-1543194583199-0') // .setTargeting(REFRESH_KEY, REFRESH_VALUE) .setTargeting('refreshtime', ['30']) .defineSizeMapping(mapping3) .addService(googletag.pubads()); gptadslots['div-gpt-ad-1565016699961-0'] = googletag.defineSlot('/24132379/guru99.com_300x250_2', 'fluid', 'div-gpt-ad-1565016699961-0') .setTargeting('type', ['sponsored']) .setTargeting('Position', ['300x250']) // .setTargeting(REFRESH_KEY, REFRESH_VALUE) .setTargeting('refreshtime', ['30']) .defineSizeMapping(mapping2) .addService(googletag.pubads()); gptadslots['div-gpt-ad-1565016699961-1'] = googletag.defineSlot('/24132379/guru99.com_300x250_2', 'fluid', 'div-gpt-ad-1565016699961-1') .setTargeting('type', ['sponsored']) .setTargeting('Position', ['notrefreshmobiletop']) // .setTargeting(REFRESH_KEY, REFRESH_VALUE) .setTargeting('refreshtime', ['30']) .defineSizeMapping(mapping7) .addService(googletag.pubads()); gptadslots['div-gpt-ad-1571916596507-0'] = googletag.defineSlot('/24132379/guru99.com_300x250_1', [[336, 280], [300, 250], [250, 250]], 'div-gpt-ad-1571916596507-0') .setTargeting('type', ['sponsored']) .setTargeting('Position', ['300x250']) // .setTargeting(REFRESH_KEY, REFRESH_VALUE) .setTargeting('refreshtime', ['30']) .defineSizeMapping(mapping6) .addService(googletag.pubads()); gptadslots['div-gpt-ad-1571916546153-0'] = googletag.defineSlot('/24132379/guru99.com_300x250-2', [[300, 250], [336, 280], [250, 250]], 'div-gpt-ad-1571916546153-0') .setTargeting('type', ['sponsored']) .setTargeting('Position', ['300x250']) // .setTargeting(REFRESH_KEY, REFRESH_VALUE) .setTargeting('refreshtime', ['30']) .defineSizeMapping(mapping6) .addService(googletag.pubads()); gptadslots['div-gpt-ad-9092914-7'] = googletag.defineSlot('/24132379/guru99.com_728x90_near_footer', 'fluid', 'div-gpt-ad-9092914-7') .setTargeting('type', ['sponsored']) .setTargeting('Position', ['footer']).setTargeting('refreshtime', ['30']) .defineSizeMapping(mapping1) .addService(googletag.pubads()); gptadslots['div-gpt-ad-9092914-8'] = googletag.defineSlot('/24132379/guru99.com_728x90_Interview', 'fluid', 'div-gpt-ad-9092914-8') .setTargeting('type', ['sponsored']) .setTargeting('Position', ['interview1']).setTargeting('refreshtime', ['30']) .defineSizeMapping(mapping1) .addService(googletag.pubads()); gptadslots['div-gpt-ad-9092914-9'] = googletag.defineSlot('/24132379/guru99.com_728x90_Interview', 'fluid', 'div-gpt-ad-9092914-9') .setTargeting('type', ['sponsored']) .setTargeting('Position', ['interview2']).setTargeting('refreshtime', ['30']) .defineSizeMapping(mapping1) .addService(googletag.pubads()); gptadslots['div-gpt-ad-1558594248952-0'] = googletag.defineSlot('/24132379/Guru99.com_Adhesion_320x50', [[320, 50], [300, 50], [360, 50], [400, 50]], 'div-gpt-ad-1558594248952-0') // .setTargeting(REFRESH_KEY, REFRESH_VALUE) .setTargeting('refreshtime', ['30']) .defineSizeMapping(mapping4) .addService(googletag.pubads()); apstag.fetchBids( //fetch bids timeout: 2e3 , function(bids) apstag.setDisplayBids(); // set apstag targeting on googletag ); googletag.enableServices(););body --global-body-font-family: 'Source Sans Pro', sans-serif;.content-wrap .entry img,.content-wrap .entry p img margin: 0 auto;hrborder-bottom:none;hrborder-top: 1px solid #eee;margin-top: 20px !important;.entry-content a:hover background: #ffec54;atext-decoration:none;tableborder-spacing: 0 !important;border:0;border-collapse: collapse;tdpadding: 0.5rem;thpadding: 0.5rem;border:0;text-align: left !important;.table td border: 0px; border-top: 1px solid #eee;tbody tr:nth-child(2n+1) td, tr:nth-child(2n+1) th background: #f9f9f9;.key-difference border: 1px solid #d6d6d6; background-color: #e0f1f5; padding: 0.938rem; margin-bottom: 20px;.img_caption text-align: center !important;.alert.alert-error background-color: #f6e7e7;border: 1px solid #edd1d0;border-radius: 0.1875rem;box-sizing: inherit;color: #b94a48;margin: 1.5rem 0px;margin-bottom: 1.5rem;padding: 0.938rem;text-align: center;text-shadow: none;.alert-error a color: #000; font-weight: bold; text-decoration: none;.alert.alert-success background-color: #dfeedf;border: 1px solid #c4e0c4;border-radius: 0.1875rem;box-sizing: inherit;color: #468847;list-style: outside none none;margin: 1.5rem 0px;margin-bottom: 1.5rem;padding: 0.938rem;text-align: center;text-shadow: none;.alert-success a color: #356635; font-weight: bold;.alert.alert-info background-color: #e2eff5;border: 1px solid #c7e0ec;border-radius: 0.1875rem;border-top-left-radius: 3px;border-top-right-radius: 3px;box-sizing: inherit;color: #3a87ad;list-style: outside none none;margin: 1.5rem 0px;margin-bottom: 1.5rem;padding: 0.938rem;text-shadow: none;.alert-info acolor: #2d6987; font-weight: bold;body p margin: 0 0 1.3rem 0 !important;.review-borderborder:1px solid #eee;h1 a, h2 a, h3 a, h4 a, h5 a, h6 acolor: #0556f3;.alert.alert-warning background-color: #f8f4ec;border: 1px solid #eee4d2;border-radius: 0.1875rem;box-sizing: inherit;color: #c09853;list-style: outside none none;margin: 1.5rem 0px;margin-bottom: 1.5rem;padding: 0.938rem;text-shadow: none;.alert-warning a color: #6c5328; font-weight: bold;codebackground-color: #f7f7f7;color: #9c1d3d;padding: 2px 4px;border: 1px solid rgba(0,0,0,0.1);font-size: 1rem;border-radius: 0.1875rem;.button1 background: #2f81ff; color: #fff!important; font-size: 14px; padding: 8px 13px; text-align: center; text-transform: none; white-space: nowrap;ul, ol, dl margin-top: 1.5rem !important; margin-bottom: 1.5rem !important;imgdisplay: inline-block;h1margin-top: 10px !important;h2, h3, h4, h5margin: 1.5rem 0 0.75rem 0 !important;.with-ribbon position: relative;.with-ribbon figcaption position: absolute;right: 0;top: 0;padding: 10px;display: inline-block;color: #fff;background: red;.nav-link-center order: 1;.nav-previous order: 0;.nav-next order: 2;.single-content h2:first-child margin-top: 0px !important;.single-content h3margin-top: 0px;.single-content h2margin-top: 0px !important;.entry-contentmargin-top: 0px !important;.entry-metamargin-bottom: 0px !important;.entry-headermargin-bottom: 0px !important;.tool-sticky thborder:1px solid #eee !important;background: #ffe !important;.tool-sticky tdborder: 1px solid #eee !important;.tool-sticky tbody tr:nth-child(2n+1) tdbackground: #fff;.button1 background: #2f81ff; color: #fff!important; font-size: 14px; padding: 8px 13px; text-align: center; text-transform: none; white-space: nowrap;thbackground: #f2f2f2;@media only screen and (max-width: 1023px) table display: block;overflow: scroll;overflow-x: auto;overflow-y: auto;.pagenav background: #df5035; font-size: 1rem; border-radius: 5px; border: 0px; padding: 0.8rem 1rem;color:#fff;.comment-navigation .nav-previous:after, .post-navigation .nav-previous:after position: inherit;.header-menu-container ul.menu>li.kadence-menu-mega-columns-3>ul.sub-menu grid-template-columns: 30% 30% 30%; .single-post .entry-header margin-bottom: 0px !important;.comment-navigation .nav-links, .post-navigation .nav-links display: flex !important;flex-flow: row !important;justify-content: space-between !important;.site-header-row display: flex !important;justify-content: space-evenly;.header-navigation ul margin: 0 !important;.header-menu-container ul.menu>li.kadence-menu-mega-width-custom>ul.sub-menu transition-duration: .5s !important;@media (max-width: 767px) .hidden-phone display: none !important;.vs-sticky min-width: 100px; max-width: 300px; left: 0px; position: sticky; background-color: white !important;@media (max-width: 767px).kt-row-column-wrap.kt-mobile-layout-row>.wp-block-kadence-column margin-bottom: 0px !important;.wp-has-aspect-ratio--aspect-ratio:56.25% !important;.wgs_wrapper td.gsib_apadding: 0px; background: none;.wgs_wrapper .gsc-input-boxborder:1px solid black;@media(max-width: 360px) .responsivetable width: 38%; @media screen and (max-width: 540px) and (min-width: 361px) .responsivetable width: 35%; @media screen and (max-width: 541px) and (min-width: 959px) .responsivetable width: 30%; @media screen and (max-width: 1599px) and (min-width: 960px) .responsivetable width: 16%; @media screen and (min-width: 1600px) .responsivetable width: 15%; h1, h2, h3, h4, h5, h6 font-weight: 700 !important;.wp-block-latest-posts.wp-block-latest-posts__list.is-grid li>acolor:#0556f3;div.w3-container.w3-half box-sizing: border-box;float: left;width: 100%;div.w3-row.w3-border::after clear: both;content: "";display: table;div.w3-row.w3-border::before clear: both;content: "";display: table;@media (min-width: 601px) div.w3-container.w3-half width: 50%;.top-prosbackground:green;color:#FFF;margin-right: 10px !important;padding:5px;.top-consbackground:darkred;color:#FFF;margin-left: 10px !important;padding:5px;.entry-content a.nohover:hover background: transparent;div.lasso-grid-row .lasso-description min-height: 10px;div.lasso-grid-row .lasso-badge color: #fff;background:#5e36ca !important;div.lasso-grid-row .lasso-description font-size: 20px;.lasso-grid-row .lasso-splash .lasso-title min-height: 10px;a.lasso-button-1background: #2f81ff !important;@media screen and (max-width: 1200px)div.lasso-grid-row .lasso-description min-height: 10px !important;.hilr background-color: #ffb1b5 !important;.hilb background-color: #c1f7ff !important;.hilight background-color: yellow !important;a:hover.button1 background: #2f81ff !important;.header-menu-container ul.menu>li.menu-item-has-children>ul.sub-menu visibility: hidden !important;.header-menu-container ul.menu>li.menu-item-has-children>ul.sub-menu.show visibility: visible !important; opacity: 1; clip: auto; height: auto; overflow: visible;.lasso-badgez-index: 10;.header-menu-container ul.menu>li.kadence-menu-mega-enabled>ul a width: 100% !important;@media (max-width: 500px) .entry-meta-divider-customicon span.meta-label display: none;@media (max-width: 1024px) .primary-sidebar.widget-areadisplay: none;.toolbutton background: #f68700 !important;border-radius: 1000px;padding: 10px 27px;color: #ffffff !important;display: inline-block;font-weight: bold;font-size: 27px;letter-spacing: 0.8px;a:hover.toolbutton background: #ff9f00 !important;color: #ffffff !important;.site-main-header-wrap .site-header-row-container-inner border-bottom: 1px solid #cccccc;.box12border: 0.3px solid #eee; box-sizing: border-box; border-radius: 8px; padding-top: 10px; padding-left: 15px; line-height: 1.8em; background: #F6FCFF;div.w3-topta-container1.w3-topta-half1 box-sizing: border-box;float: left;width: 100%;border: 1px solid #e0def5;margin: 5px;border-radius: 15px;padding: 10px;background-color: #f2f1fb;div.w3-topta-row1.w3-topta-border1::after clear: both;content: "";display: table;div.w3-topta-row1.w3-topta-border1::before clear: both;content: "";display: table;@media (min-width: 766px) div.w3-topta-container1.w3-topta-half1 width: 18.5%;@media (min-width: 766px) div.topta-lastbox width: 19% !important;.topta-button2 background: #2f81ff !important; color: #fff!important; font-size: 18px; padding: 10px 50px; text-align: center; text-transform: none; white-space: nowrap;border-radius: 1000px;@media only screen and (min-width: 767px) and (max-width: 1023px) .topta-button2 padding: 10px 15px !important; @media only screen and (min-width: 1024px) and (max-width: 1149px) .topta-button2 padding: 10px 30px !important; div.elementor-widget-topta-container99 box-sizing: border-box;color: #111111;font-size: 15px;line-height: 25.5px;word-wrap: break-word;margin-bottom:15px;div.top-3__topta-best-choise99 align-items: center;background: #5e36ca;bottom: 0px;box-sizing: border-box;color: white;display: flex;font-size: 15px;font-weight: 600;height: 40px;justify-content: center;left: 0px;line-height: 25.5px;margin: -30px auto 0px;position: relative;right: 0px;text-align: center;text-transform: capitalize;top: 0px;width: 150px;word-wrap: break-word;div.top-3__topta-best-choise99::before border-style: solid;border-width: 0px 0px 20px 20px;content: "";left: 0px;margin-left: -20px;position: absolute;top: 0px;border-color: transparent transparent #1e0b7c transparent;@media (max-width: 766px) div.top-3__topta-best-choise99margin: -15px auto 0px !important;#more1 display: none;.kt-blocks-accordion-header background: #f7f9fe !important;.kt-blocks-accordion-header:hover background: #ffffff !important;.rll-youtube-player, [data-lazy-src]display:none !important;Skip to contentHome</li>TestingExpandAgile Testing</li>JUnit</li>Quality Center(ALM)</li>Bugzilla</li>HP Loadrunner</li>RPA</li>Cucumber</li>Software Testing</li>SAP Testing</li>Database Testing</li>Mobile Testing</li>Selenium</li>ETL Testing</li>Mantis</li>SoapUI</li>JMeter</li>Postman</li>TEST Management</li>JIRA</li>QTP</li>TestLink</li></ul></li>SAPExpandABAP</li>CRM</li>PI/PO</li>APO</li>Crystal Reports</li>PP</li>Beginners</li>FICO</li>SD</li>Basis</li>HANA</li>SAPUI5</li>BODS</li>HR</li>Security Tutorial</li>BI/BW</li>MM</li>Solution Manager</li>BPC</li>QM</li>Successfactors</li>CO</li>Payroll</li>SAP Courses</li></ul></li>WebExpandApache</li>Java</li>PHP</li>SQL Server</li>AngularJS</li>JSP</li>PL/SQL</li>UML</li>ASP.NET</li>Kotlin</li>PostgreSQL</li>VB.NET</li>C</li>Linux</li>Python</li>VBScript</li>C#</li>MariaDB</li>ReactJS</li>Web Services</li>C++</li>MS Access</li>Ruby & Rails</li>WPF</li>CodeIgniter</li>MySQL</li>Scala</li>SQLite</li>DBMS</li>Node.js</li>SQL</li>Perl</li>JavaScript</li></ul></li>Must LearnExpandAccounting</li>Embedded Systems</li>Operating System</li>Algorithms</li>Ethical Hacking</li>PMP</li>Android</li>Excel Tutorial</li>Photoshop</li>Blockchain</li>Go Programming</li>Project Management</li>Business Analyst</li>IoT</li>Reviews</li>Build Website</li>ITIL</li>Salesforce</li>Cloud Computing</li>Jenkins</li>SEO</li>COBOL</li>MIS</li>Software Engineering</li>Compiler Design</li>Movie</li>VBA</li>Courses</li>Networking</li>VPN</li></ul></li>Big DataExpandAWS</li>Hive</li>Power BI</li>Big Data</li>Informatica</li>Qlikview</li>Cassandra</li>MicroStrategy</li>Tableau</li>Cognos</li>MongoDB</li>Talend</li>Data Warehousing</li>NiFi</li>ZooKeeper</li>DevOps</li>OBIEE</li>Pentaho</li>HBase</li></ul></li>Live ProjectExpandLive Agile Testing</li>Live Selenium Project</li>Live HP ALM</li>Live Selenium 2</li>Live Java Project</li>Live Security Testing</li>Live Mobile Testing</li>Live Testing Project</li>Live Payment Gateway</li>Live Testing 2</li>Live PHP Project</li>Live Telecom</li>Live Projects Hub</li>Live UFT/QTP Testing</li>Live Python Project</li>Live SEO Project</li></ul></li>AIExpandArtificial Intelligence</li>PyTorch</li>Data Science</li>R Programming</li>Keras</li>TensorFlow</li>NLTK</li></ul></li></ul>SearchToggle Menu10 BEST Revit Courses & Online Training Classes (2023)ByAlyssa WalkerHoursUpdatedJanuary 28, 2023@media(min-width: 520px).responsive-guru99-mobile1 float:left;min-height: 280px; @media(max-width: 519px).responsive-guru99-mobile1 min-height: 280px !important; @media(max-width: 499px).responsive-guru99-mobile1display: none !important;@media(max-width: 499px).responsive-guru99-mobile12 margin-right:6px;width:345px;min-height:100px; googletag.cmd.push(function() googletag.display('div-gpt-ad-1565016699961-0'); if (typeof(pubwise) != 'undefined' && pubwise.enabled === true) pbjs.que.push(function () pwRegisterLazyLoad(gptadslots['div-gpt-ad-1565016699961-0'], 1, [50,0,50,0], 0, 768, 2); ); else googletag.pubads().refresh([gptadslots['div-gpt-ad-1565016699961-0']]); ); googletag.cmd.push(function() googletag.display('div-gpt-ad-1565016699961-1'); if (typeof(pubwise) != 'undefined' && pubwise.enabled === true) pbjs.que.push(function () pwRegisterLazyLoad(gptadslots['div-gpt-ad-1565016699961-1'], 1, [50,0,50,0], 0, 768, 2); ); else googletag.pubads().refresh([gptadslots['div-gpt-ad-1565016699961-1']]); ); Autodesk Revit is modeling software for 3D architectural modeling and BIM drafting for architects, landscape architects, structural engineers, MEP (Mechanical, Electrical, and Plumbing) engineers, designers, and contractors.</p>
8
- <p></p> aaccfb2cb3<br />
9
- <br />
10
- <br />
 
 
 
 
 
 
 
 
 
 
 
spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Clash of Kings MOD APK 2022 The Most Epic War Game Ever.md DELETED
@@ -1,97 +0,0 @@
1
-
2
- <h1>Clash of Kings Mod APK 2022: The Ultimate Guide</h1>
3
- <p>If you are looking for a thrilling and immersive strategy game that lets you build your own kingdom, wage war against your enemies, and forge alliances with other players, then you should definitely check out Clash of Kings. And if you want to enjoy the game with unlimited money, resources, VIP features, and more, then you should download Clash of Kings Mod APK 2022. In this article, we will tell you everything you need to know about this amazing modded version of the game, including how to download and install it, how to play it, and what are the benefits of using it. So, without further ado, let's get started!</p>
4
- <h2>What is Clash of Kings?</h2>
5
- <h3>A brief introduction to the game and its features</h3>
6
- <p>Clash of Kings is a popular online multiplayer strategy game developed by Elex Wireless. The game was released in 2014 and has since attracted millions of players from all over the world. The game is set in a medieval fantasy world where you can create your own kingdom, build your castle, train your army, and fight against other players and kingdoms. You can also join an alliance with other players, chat with them, trade with them, and cooperate with them in various events and quests. The game has stunning graphics, realistic sound effects, and smooth gameplay that will keep you hooked for hours.</p>
7
- <h2>clash of kings mod apk 2022</h2><br /><p><b><b>DOWNLOAD</b> &rArr; <a href="https://urlin.us/2uSRML">https://urlin.us/2uSRML</a></b></p><br /><br />
8
- <h3>Why you should play Clash of Kings in 2022</h3>
9
- <p>Clash of Kings is not just a game, it's a community. You can interact with other players from different countries and cultures, make new friends, and learn new things. You can also challenge yourself by competing with other players in different modes, such as PvP battles, alliance wars, kingdom wars, dragon campaigns, etc. You can also customize your kingdom according to your preferences, by choosing from different buildings, decorations, troops, heroes, dragons, etc. The game is constantly updated with new features, events, and content that will keep you entertained and engaged. Whether you are a casual player or a hardcore gamer, you will find something to enjoy in Clash of Kings.</p>
10
- <h2>What is Clash of Kings Mod APK?</h2>
11
- <h3>How to download and install Clash of Kings Mod APK</h3>
12
- <p>Clash of Kings Mod APK is a modified version of the original game that gives you access to unlimited money, resources, VIP features, and more. You can download it for free from various websites on the internet. However, you need to be careful when downloading it, as some websites may contain viruses or malware that can harm your device. To download Clash of Kings Mod APK safely and securely, follow these steps:</p>
13
- <p>clash of kings mod apk 2022 unlimited money<br />
14
- clash of kings mod apk 2022 download free<br />
15
- clash of kings mod apk 2022 latest version<br />
16
- clash of kings mod apk 2022 android<br />
17
- clash of kings mod apk 2022 offline<br />
18
- clash of kings mod apk 2022 no root<br />
19
- clash of kings mod apk 2022 hack<br />
20
- clash of kings mod apk 2022 new update<br />
21
- clash of kings mod apk 2022 online<br />
22
- clash of kings mod apk 2022 ios<br />
23
- clash of kings mod apk 2022 cheats<br />
24
- clash of kings mod apk 2022 revdl<br />
25
- clash of kings mod apk 2022 rexdl<br />
26
- clash of kings mod apk 2022 unlimited gold<br />
27
- clash of kings mod apk 2022 unlimited resources<br />
28
- clash of kings mod apk 2022 unlimited gems<br />
29
- clash of kings mod apk 2022 unlimited troops<br />
30
- clash of kings mod apk 2022 unlimited everything<br />
31
- clash of kings mod apk 2022 gameplay<br />
32
- clash of kings mod apk 2022 features<br />
33
- clash of kings mod apk 2022 review<br />
34
- clash of kings mod apk 2022 how to install<br />
35
- clash of kings mod apk 2022 how to play<br />
36
- clash of kings mod apk 2022 how to download<br />
37
- clash of kings mod apk 2022 how to update<br />
38
- clash of kings mod apk 2022 how to hack<br />
39
- clash of kings mod apk 2022 how to get unlimited money<br />
40
- clash of kings mod apk 2022 how to get unlimited gold<br />
41
- clash of kings mod apk 2022 how to get unlimited resources<br />
42
- clash of kings mod apk 2022 how to get unlimited gems<br />
43
- clash of kings mod apk 2022 how to get unlimited troops<br />
44
- clash of kings mod apk 2022 how to get unlimited everything<br />
45
- clash of kings mod apk 2022 tips and tricks<br />
46
- clash of kings mod apk 2022 best strategy<br />
47
- clash of kings mod apk 2022 best troops<br />
48
- clash of kings mod apk 2022 best heroes<br />
49
- clash of kings mod apk 2022 best buildings<br />
50
- clash of kings mod apk 2022 best alliance<br />
51
- clash of kings mod apk 2022 best events<br />
52
- clash of kings mod apk 2022 best rewards</p>
53
- <ol>
54
- <li>Go to [this website](^1^) and click on the download button.</li>
55
- <li>Wait for the download to finish and then open the downloaded file.</li>
56
- <li>Allow installation from unknown sources if prompted by your device.</li>
57
- <li>Follow the instructions on the screen to install the mod apk.</li>
58
- <li>Launch the game and enjoy!</li>
59
- </ol>
60
- <h3>What are the benefits of using Clash of Kings Mod APK</h3>
61
- <h4>Unlimited money and resources</h4>
62
- <p>One of the main benefits of using Clash of Kings Mod APK is that you can get unlimited money and resources in the game. You can use them to buy anything you want, such as buildings, troops, items, etc. You can also upgrade your castle, army, and heroes faster and easier. You don't have to worry about running out of resources or waiting for them to generate. You can enjoy the game without any limitations or restrictions.</p>
63
- <h4>Free VIP and premium features</h4>
64
- <p>Another benefit of using Clash of Kings Mod APK is that you can get free VIP and premium features in the game. You can unlock all the VIP levels and perks, such as faster construction, research, training, healing, etc. You can also access all the premium features, such as exclusive skins, decorations, heroes, dragons, etc. You don't have to spend any real money or watch any ads to get these features. You can enhance your gaming experience and have more fun with Clash of Kings Mod APK.</p>
65
- <h4>No ads and no root required</h4>
66
- <p>The last benefit of using Clash of Kings Mod APK is that you can play the game without any ads and without rooting your device. You don't have to deal with annoying ads that pop up every now and then and interrupt your gameplay. You also don't have to root your device or risk damaging it to use the mod apk. You can play the game safely and smoothly with Clash of Kings Mod APK.</p>
67
- <h2>How to play Clash of Kings Mod APK</h2>
68
- <h3>Tips and tricks for beginners</h3>
69
- <p>If you are new to Clash of Kings or strategy games in general, you might need some tips and tricks to help you get started. Here are some of them:</p>
70
- <h4>Build and upgrade your castle</h4>
71
- <p>Your castle is the heart of your kingdom and the base of your operations. You should always build and upgrade your castle as much as possible. Your castle level determines what other buildings you can build and upgrade, as well as your kingdom's power and prestige. You should also build and upgrade other buildings that provide you with resources, troops, technologies, etc. You should balance your development between economy, military, and defense.</p>
72
- <h4>Train and recruit your army</h4>
73
- <p>Your army is your main force for fighting and conquering other kingdoms. You should always train and recruit your army as much as possible. Your army consists of different types of troops, such as infantry, cavalry, archers, siege engines, etc. Each type has its own strengths and weaknesses, so you should use them wisely according to the situation. You should also recruit heroes and dragons to lead your army and boost their performance. Heroes and dragons have special skills and abilities that can turn the tide of battle.</p>
74
- <h4>Join an alliance and participate in events</h4>
75
- <p>Clash of Kings is not a solo game, it's a social game. You should join an alliance with other players who share your goals and interests. You can chat with them, trade with them, help them, and cooperate with them in various events and quests. You can also participate in alliance wars, kingdom wars, dragon campaigns, etc., where you can fight alongside your allies against other alliances or kingdoms. You can earn rewards, honor, and glory by participating in these events.</p>
76
- <h3>Strategies and tactics for advanced players</h3>
77
- <p>If you are an experienced player of Clash of Kings or strategy games in general, you might need some strategies and tactics to help you improve your skills. Here are some of them:</p>
78
- <h4>Explore and conquer the map</h4>
79
- <p>The map of Clash of Kings is vast and diverse. You should explore it and conquer it as much as possible. You can find various resources, monsters, rebels, treasures, etc., on the map that can benefit you. You can also attack other players' castles or resource points to loot their resources or capture their lands. You should scout before you attack to know your enemy's strength and weakness. You should also use different formations and strategies depending on the terrain and situation.</p>
80
- <h4>Research and craft new technologies</h4>
81
- <p>Technology is the key to progress and power in Clash of Kings. You should research and craft new technologies as much as possible. You can research technologies in different fields, such as economy, military, defense, etc. You can also craft new items, such as weapons, armor, accessories, etc. These technologies and items can improve your kingdom's efficiency, productivity, and combat power. You should prioritize the technologies and items that suit your playstyle and goals.</p>
82
- <h4>Challenge other players and kingdoms</h4>
83
- <p>Clash of Kings is a competitive game where you can challenge other players and kingdoms for supremacy and glory. You can challenge other players in different modes, such as PvP battles, arena battles, lord trials, etc. You can also challenge other kingdoms in different modes, such as kingdom wars, cross-server wars, world wars, etc. You can earn rewards, rankings, and titles by challenging other players and kingdoms. You should always be prepared and confident when you challenge others.</p>
84
- <h2>Conclusion</h2>
85
- <h3>Summary of the main points</h3>
86
- <p>Clash of Kings is a fantastic strategy game that lets you build your own kingdom, wage war against your enemies, and forge alliances with other players. Clash of Kings Mod APK is a modified version of the game that gives you unlimited money, resources, VIP features, and more. You can download it for free from [this website] and install it on your device easily. You can play the game with more fun and excitement with Clash of Kings Mod APK.</p>
87
- <h3>FAQs</h3>
88
- <p>Here are some frequently asked questions about Clash of Kings Mod APK:</p>
89
- <ul>
90
- <li><b>Is Clash of Kings Mod APK safe to use?</b><br>Yes, Clash of Kings Mod APK is safe to use as long as you download it from a trusted website like [this one]. You don't have to worry about viruses or malware that can harm your device.</li>
91
- <li><b>Will I get banned for using Clash of Kings Mod APK?</b><br>No, you will not get banned for using Clash of Kings Mod APK as long as you use it wisely and moderately. You should not abuse the mod features or cheat in the game too much. You should also respect other players and follow the game rules.</li>
92
- <li><b>Can I update Clash of Kings Mod APK?</b><br>Yes, you can update Clash of Kings Mod APK whenever there is a new version available. You can check for updates on [this website] or on the game itself. You should always update the mod apk to enjoy the latest features and fixes.</li>
93
- <li><b>Can I play Clash of Kings Mod APK with my friends?</b><br>Yes, you can play Clash of Kings Mod APK with your friends who also have the mod apk installed on their devices. You can join the same alliance or kingdom with them and cooperate with them in various events and quests. You can also chat with them and trade with them in the game.</li>
94
- <li><b>Can I play Clash of Kings Mod APK offline?</b><br>No, you cannot play Clash of Kings Mod APK offline as it is an online multiplayer game that requires an internet connection to play. You need to connect to the game server to access your account and interact with other players.</li>
95
- </ul></p> 197e85843d<br />
96
- <br />
97
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Download Free Uplay and Connect with Ubisoft Players Worldwide.md DELETED
@@ -1,128 +0,0 @@
1
-
2
- <h1>How to Download Free Uplay and Enjoy Ubisoft Games on PC</h1>
3
- <p>If you are a fan of Ubisoft games, such as Assassin's Creed, Far Cry, Watch Dogs, and more, you might want to download free Uplay and play them on your PC. Uplay is Ubisoft's platform for PC games, where you can access, download, and launch your favorite titles. Uplay also offers many benefits for players, such as rewards, achievements, stats, friends, and more. In this article, we will show you how to download free Uplay and how to access and play free games on it.</p>
4
- <h2>download free uplay</h2><br /><p><b><b>Download Zip</b> &#10002; &#10002; &#10002; <a href="https://urlin.us/2uT0vq">https://urlin.us/2uT0vq</a></b></p><br /><br />
5
- <h2>What is Uplay and Why You Need It</h2>
6
- <h3>Uplay is Ubisoft's platform for PC games</h3>
7
- <p>Uplay is a digital distribution, digital rights management, multiplayer, and communications service created by Ubisoft. It allows you to buy, download, and play Ubisoft games on your PC. You can also access it on your mobile device or console, through a dedicated app or directly from your games. All you need to log in is a Ubisoft account.</p>
8
- <h3>Uplay offers many benefits for players</h3>
9
- <p>Uplay is not just a launcher for your games. It also provides you with many features and services that enhance your gaming experience. Some of them are:</p>
10
- <ul>
11
- <li>A loyalty program that lets you earn Units by playing games and redeem them for unique rewards.</li>
12
- <li>A discount of 20% off your next purchase in the Ubisoft Store when you redeem 100 Units.</li>
13
- <li>A library of over 1000 free rewards across Ubisoft's back catalogue of games.</li>
14
- <li>A cross-platform progression system that saves your game progress within Uplay, so you can switch devices without losing a step.</li>
15
- <li>A social network that connects you with players across all platforms, so you can find friends, see what they are playing, and check their achievements.</li>
16
- <li>A stats and tips system that gives you access to your performance data and personalized advice based on your playstyle.</li>
17
- <li>A news and events feed that keeps you updated on the latest happenings in your favorite games.</li>
18
- <li>A beta and test server access that allows you to try out new games and major updates before they are released.</li>
19
- </ul>
20
- <h2>How to Download and Install Uplay for Free</h2>
21
- <h3>Visit the Ubisoft Connect website and click on Download for PC</h3>
22
- <p>The first step to download free Uplay is to visit the <a href="(^1^)">Ubisoft Connect website</a>. This is the official website for Uplay, where you can learn more about its features and services. On the homepage, you will see a button that says "Download for PC". Click on it and you will be redirected to a page where you can download the Uplay installer.</p>
23
- <h3>Run the installer and follow the instructions</h3>
24
- <p>The next step is to run the Uplay installer that you have downloaded. The installer is a small file that will guide you through the installation process. You will need to agree to the terms of service, choose a destination folder, and create a desktop shortcut. The installation should take only a few minutes.</p>
25
- <h3>Create or log in to your Ubisoft account</h3>
26
- <p>The final step is to create or log in to your Ubisoft account. This is the account that you will use to access Uplay and all its features. If you already have an account, you can simply enter your email and password. If you don't have an account yet, you can create one by clicking on "Create a Ubisoft Account". You will need to provide some basic information, such as your name, email , and a password. You will also need to verify your email address by clicking on a link that will be sent to you. Once you have created or logged in to your Ubisoft account, you are ready to use Uplay.</p>
27
- <h2>How to Access and Play Free Games on Uplay</h2>
28
- <h3>Browse the library of free games on Uplay</h3>
29
- <p>One of the best things about Uplay is that it offers a library of free games that you can play on your PC. These games are either free-to-play, meaning that they are always free and supported by optional in-game purchases, or free trials, meaning that they are available for a limited time or with some restrictions. You can browse the library of free games on Uplay by clicking on the "Free Games" tab on the top menu. You will see a list of games that you can filter by genre, platform, or availability. Some of the most popular free games on Uplay are:</p>
30
- <p>How to download free uplay games on PC<br />
31
- Download free uplay app for Android<br />
32
- Ubisoft Connect: free service to play uplay games<br />
33
- Free to play PC games on Ubisoft Store<br />
34
- Uplay download free for Windows 10<br />
35
- Best free uplay games to download in 2023<br />
36
- Download free uplay rewards and achievements<br />
37
- Uplay download free without registration<br />
38
- How to get free uplay plus subscription<br />
39
- Download free uplay launcher for Mac<br />
40
- Free uplay games download codes and coupons<br />
41
- Download free uplay offline installer<br />
42
- How to download free uplay beta games<br />
43
- Free uplay games download full version<br />
44
- Download free uplay cloud saves and progression<br />
45
- How to download free uplay updates and patches<br />
46
- Free uplay games download no virus<br />
47
- Download free uplay smart intel and tips<br />
48
- How to download free uplay events and giveaways<br />
49
- Free uplay games download with crack<br />
50
- Download free uplay stats and leaderboards<br />
51
- How to download free uplay cross-play and cross-progression<br />
52
- Free uplay games download for Linux<br />
53
- Download free uplay news and feed<br />
54
- How to download free uplay chat and group chats<br />
55
- Free uplay games download for PS4<br />
56
- Download free uplay library and content<br />
57
- How to download free uplay friends and community<br />
58
- Free uplay games download for Xbox One<br />
59
- Download free uplay loyalty program and units<br />
60
- How to download free uplay support and help<br />
61
- Free uplay games download for Nintendo Switch<br />
62
- Download free uplay desktop app and features<br />
63
- How to download free uplay account and profile<br />
64
- Free uplay games download for mobile devices<br />
65
- Download free uplay 20% off coupon with 100 units<br />
66
- How to download free uplay refund policy and terms of use<br />
67
- Free uplay games download for VR devices<br />
68
- Download free uplay game time tracking and performance<br />
69
- How to download free uplay privacy policy and data protection</p>
70
- <table>
71
- <tr>
72
- <th>Game</th>
73
- <th>Genre</th>
74
- <th>Description</th>
75
- </tr>
76
- <tr>
77
- <td>Tom Clancy's The Division 2</td>
78
- <td>Action RPG</td>
79
- <td>A post-apocalyptic shooter set in Washington D.C., where you must fight against factions and rogue agents to restore order.</td>
80
- </tr>
81
- <tr>
82
- <td>Hyper Scape</td>
83
- <td>Battle Royale</td>
84
- <td>A futuristic urban battle royale where you can hack the environment and use unique abilities to survive.</td>
85
- </tr>
86
- <tr>
87
- <td>Brawlhalla</td>
88
- <td>Fighting</td>
89
- <td>A platform fighter where you can choose from over 50 legends and compete in online and offline modes.</td>
90
- </tr>
91
- <tr>
92
- <td>Trackmania</td>
93
- <td>Racing</td>
94
- <td>A racing game where you can create and share your own tracks and challenge other players.</td>
95
- </tr>
96
- <tr>
97
- <td>Might & Magic: Chess Royale</td>
98
- <td>Strategy</td>
99
- <td>A fast-paced auto-battler where you can recruit and upgrade heroes from the Might & Magic universe.</td>
100
- </tr>
101
- </table>
102
- <h3>Download and launch the games you want to play</h3>
103
- <p>To download and play a free game on Uplay, you just need to click on the game's icon and then click on "Play Now". You will be prompted to download the game files if you haven't already. The download time will depend on your internet speed and the size of the game. Once the download is complete, you can launch the game from Uplay or from your desktop shortcut. You will be able to access all the features and services of Uplay while playing, such as rewards, achievements, friends, stats, and more.</p>
104
- <h3>Enjoy the features and rewards of Uplay</h3>
105
- <p>As you play free games on Uplay, you will be able to enjoy the features and rewards that Uplay offers. For example, you will be able to earn Units by completing challenges and achievements in your games. You can then redeem these Units for unique rewards, such as outfits, weapons, skins, wallpapers, and more. You can also use 100 Units to get a 20% off coupon for your next purchase in the Ubisoft Store. You will also be able to access your game progress across devices, thanks to the cross-platform progression system. You will also be able to see your stats and tips for each game, as well as compare them with your friends and other players. You will also be able to stay updated on the latest news and events for your favorite games, as well as participate in beta tests and test servers for upcoming games and updates.</p>
106
- <h2>Conclusion</h2>
107
- <p>In conclusion, Uplay is a great platform for PC gamers who love Ubisoft games. It allows you to download free Uplay and access a library of free games that you can play on your PC. It also offers many features and benefits that enhance your gaming experience, such as rewards, achievements, stats, friends, news, events, and more. To download free Uplay, all you need to do is visit the Ubisoft Connect website, download and install the Uplay installer, and create or log in to your Ubisoft account. Then, you can browse the library of free games on Uplay, download and launch the games you want to play, and enjoy the features and rewards of Uplay.</p>
108
- <h2>FAQs</h2>
109
- <h4>Q: Is Uplay safe to download?</h4>
110
- <p>A: Yes, Uplay is safe to download. It is an official service from Ubisoft that has been around since 2009. It does not contain any viruses or malware that could harm your PC.</p>
111
- <h4>Q: Do I need an internet connection to play games on Uplay?</h4>
112
- <p>A: Yes, you need an internet connection to play games on Uplay. This is because Uplay needs to verify your Ubisoft account and your game licenses. It also needs to sync your game progress and your Units. However, some games may have an offline mode that allows you to play without an internet connection. You can check the game's description or settings to see if it has an offline mode.</p>
113
- <h4>Q: Can I play Uplay games on other platforms?</h4>
114
- <p>A: Yes, you can play Uplay games on other platforms, such as mobile devices or consoles. You can download the Uplay app on your device or access Uplay directly from your games. You will be able to log in with your Ubisoft account and access the same features and services as on PC. However, some games may not be available on all platforms, so you will need to check the game's compatibility before buying or downloading it.</p>
115
- <h4>Q: How can I contact Uplay support if I have any issues?</h4>
116
- <p>A: If you have any issues with Uplay, such as technical problems, account issues, payment issues, or game issues, you can contact Uplay support by visiting the <a href="">Ubisoft Support website</a>. You can browse the FAQ section for common questions and answers, or you can submit a support ticket with your issue details. You can also chat with a support agent online or call them by phone. You will need to provide your Ubisoft account information and your game information when contacting Uplay support.</p>
117
- <h4>Q: How can I uninstall Uplay from my PC?</h4>
118
- <p>A: If you want to uninstall Uplay from your PC, you can do so by following these steps:</p>
119
- <ol>
120
- <li>Close Uplay and any games that are running on it.</li>
121
- <li>Go to the Control Panel and click on Programs and Features.</li>
122
- <li>Find Uplay in the list of programs and click on Uninstall.</li>
123
- <li>Follow the instructions on the screen to complete the uninstallation process.</li>
124
- <li>Delete any remaining files or folders related to Uplay from your PC.</li>
125
- </ol>
126
- <p>Note that uninstalling Uplay will not delete your Ubisoft account or your game progress. You can still access them by logging in to Uplay on another device or platform.</p> 197e85843d<br />
127
- <br />
128
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/1phancelerku/anime-remove-background/Download Dynamons World APK Hack and Train Your Monsters Like a Pro.md DELETED
@@ -1,110 +0,0 @@
1
- <br />
2
- <h1>Dynamons World APK Download Hack: How to Get Unlimited Money and More</h1>
3
- <p>If you are a fan of RPG games with cute and powerful monsters, you might have heard of Dynamons World. This game is a popular online multiplayer game where you can catch, train, and battle with dozens of unique Dynamons. But what if you want to get unlimited money, unlock all the content, and remove the annoying ads? Well, you can do that by downloading the Dynamons World APK hack. In this article, we will show you how to download and install the Dynamons World APK hack, what features it offers, and some tips and tricks for playing the game.</p>
4
- <h2>Introduction</h2>
5
- <h3>What is Dynamons World?</h3>
6
- <p>Dynamons World is a game that features:</p>
7
- <h2>dynamons world apk download hack</h2><br /><p><b><b>Download File</b> &#10145; <a href="https://jinyurl.com/2uNO7y">https://jinyurl.com/2uNO7y</a></b></p><br /><br />
8
- <ul>
9
- <li>An exciting campaign with multiple challenges and a cool storyline</li>
10
- <li>Online matches with other players</li>
11
- <li>Dozens of unique Dynamons with varied powers and abilities</li>
12
- <li>Useful items and boosters to enhance your battles</li>
13
- <li>A tactical turn-based battle system with strategic elements</li>
14
- <li>Multiple areas on the maps to explore</li>
15
- <li>Tons of new updates with interesting content</li>
16
- <li>Free to play on web browser, Android, and iOS platforms</li>
17
- </ul>
18
- <h3>Why download Dynamons World APK hack?</h3>
19
- <p>Dynamons World is a fun and addictive game, but it also has some limitations. For example, you need to earn money by winning battles or watching ads to buy items, upgrade your Dynamons, or unlock new content. You also have to deal with ads that pop up every now and then, which can be annoying and distracting. If you want to enjoy the game without these restrictions, you can download the Dynamons World APK hack. This is a modified version of the game that gives you unlimited money, unlocked content, and removed ads. This way, you can play the game with more freedom and convenience.</p>
20
- <h2>How to download and install Dynamons World APK hack</h2>
21
- <h3>Step 1: Find a reliable source</h3>
22
- <p>The first thing you need to do is to find a reliable source where you can download the Dynamons World APK hack. There are many websites that offer this file, but not all of them are safe and trustworthy. Some of them may contain viruses, malware, or fake files that can harm your device or steal your personal information. To avoid this, you should do some research and check the reviews and ratings of the website before downloading anything. You can also use a trusted antivirus program to scan the file before installing it.</p>
23
- <h3>Step 2: Enable unknown sources</h3>
24
- <p>The next thing you need to do is to enable unknown sources on your device. This is a security setting that allows you to install apps from sources other than the official app store. Since the Dynamons World APK hack is not available on the Google Play Store or the App Store, you need to enable this option to install it. To do this, go to your device settings, then security or privacy, then unknown sources or install unknown apps. Toggle on the switch or check the box to allow installation from unknown sources.</p>
25
- <h3>Step 3: Download and install the APK file</h3>
26
- <p>The third thing you need to do is to download and install the APK file. Once you have found a reliable source and enabled unknown sources, you can proceed to download and install the APK file. To do this, follow these steps:</p>
27
- <ol>
28
- <li>Go to the website where you found the Dynamons World APK hack and click on the download button.</li>
29
- <li>Wait for the download to finish and locate the file on your device.</li>
30
- <li>Tap on the file and follow the instructions to install it.</li>
31
- <li>Wait for the installation to complete and grant any permissions that the app may request.</li>
32
- </ol>
33
- <h3>Step 4: Launch the game and enjoy</h3>
34
- <p>The last thing you need to do is to launch the game and enjoy. To do this, simply tap on the game icon on your device and start playing. You will notice that you have unlimited money, unlocked content, and removed ads. You can use these features to buy items, upgrade your Dynamons, or access new content. You can also play online matches with other players without any interruptions. Have fun with your Dynamons World APK hack!</p>
35
- <h2>Features of Dynamons World APK hack</h2>
36
- <h3>Unlimited money</h3>
37
- <p>One of the main features of the Dynamons World APK hack is that it gives you unlimited money. Money is the currency of the game that you can use to buy items, upgrade your Dynamons, or unlock new content. Normally, you have to earn money by winning battles or watching ads, which can be time-consuming and tedious. But with the Dynamons World APK hack, you don't have to worry about that. You can get as much money as you want without any limits. You can spend it on anything you like and never run out of it.</p>
38
- <h3>Unlocked content</h3>
39
- <p>Another feature of the Dynamons World APK hack is that it unlocks all the content of the game. Content refers to the Dynamons, items, boosters, areas, and modes that you can access in the game. Normally, you have to unlock them by completing certain tasks, reaching certain levels, or paying real money. But with the Dynamons World APK hack, you don't have to do that. You can access all the content from the start and enjoy everything that the game has to offer. You can choose from dozens of unique Dynamons, use various items and boosters, explore different areas on the map, and play different modes.</p>
40
- <h3>Removed ads</h3>
41
- <p>The last feature of the Dynamons World APK hack is that it removes all the ads from the game. Ads are the advertisements that pop up every now and then while you are playing the game. They can be annoying and distracting, especially when they interrupt your battles or online matches. They can also consume your data and battery life. But with the Dynamons World APK hack, you don't have to deal with them. You can play the game without any ads and enjoy a smooth and uninterrupted gaming experience.</p>
42
- <p>dynamons world mod apk unlimited money<br />
43
- dynamons world hack apk latest version<br />
44
- dynamons world apk free download full<br />
45
- dynamons world mod apk android 1<br />
46
- dynamons world hack apk no root<br />
47
- dynamons world apk offline mode<br />
48
- dynamons world mod apk revdl<br />
49
- dynamons world hack apk unlimited gems<br />
50
- dynamons world apk download for pc<br />
51
- dynamons world mod apk rexdl<br />
52
- dynamons world hack apk 2023<br />
53
- dynamons world apk pure download<br />
54
- dynamons world mod apk happymod<br />
55
- dynamons world hack apk ios<br />
56
- dynamons world apk obb download<br />
57
- dynamons world mod apk an1<br />
58
- dynamons world hack apk online<br />
59
- dynamons world apk download uptodown<br />
60
- dynamons world mod apk all unlocked<br />
61
- dynamons world hack apk mediafıre<br />
62
- dynamons world apk download apkpure<br />
63
- dynamons world mod apk 1.8.11<br />
64
- dynamons world hack apk 1.8.12<br />
65
- dynamons world apk download for android<br />
66
- dynamons world mod apk unlimited everything<br />
67
- dynamons world hack tool apk<br />
68
- dynamons world apk download latest version<br />
69
- dynamons world mod menu apk<br />
70
- dynamons world hack generator apk<br />
71
- dynamons world apk download old version<br />
72
- dynamons world mega mod apk<br />
73
- dynamons world hack version download<br />
74
- dynamons world premium apk download<br />
75
- dynamons world god mode apk<br />
76
- dynamons world hacked game download<br />
77
- dynamons world pro apk download<br />
78
- dynamons world cheat engine apk<br />
79
- dynamons world hacked account download<br />
80
- dynamons world plus apk download<br />
81
- dynamons world unlimited coins and gems apk</p>
82
- <h2>Tips and tricks for playing Dynamons World</h2>
83
- <h3>Choose your starter wisely</h3>
84
- <p>The first tip for playing Dynamons World is to choose your starter wisely. Your starter is the first Dynamon that you get in the game and it will accompany you throughout your adventure. There are three types of starters: fire, water, and plant. Each type has its own strengths and weaknesses against other types. Fire beats plant, plant beats water, and water beats fire. You should choose a starter that suits your playstyle and preference. For example, if you like aggressive and offensive battles, you might want to choose a fire starter. If you like defensive and balanced battles, you might want to choose a water starter. If you like strategic and versatile battles, you might want to choose a plant starter.</p>
85
- <h3>Upgrade your Dynamons regularly</h3>
86
- <p>The second tip for playing Dynamons World is to upgrade your Dynamons regularly. Upgrading your Dynamons means increasing their level, power, health, and skills. This will make them stronger and more effective in battles. You can upgrade your Dynamons by using items or by winning battles. You should upgrade your Dynamons as much as possible to keep up with the difficulty of the game and to defeat stronger opponents.</p>
87
- <h3>Use skill cards strategically</h3>
88
- <p>The third tip for playing Dynamons World is to use skill cards strategically. Skill cards are special cards that you can use in battles to perform powerful moves or effects. Each skill card has a different effect depending on its type and element. For example, some skill cards can deal damage, heal, stun, poison, or buff your Dynamons. You can get skill cards by buying them with money or by finding them on the map. You should use skill cards wisely and at the right time to turn the tide of battle in your favor.</p>
89
- <h3>Explore the map and catch rare Dynamons</h3>
90
- <p>The fourth tip for playing Dynamons World is to explore the map and catch rare Dynamons. The map is the area where you can find and battle with wild Dynamons. There are different zones on the map, each with its own theme and Dynamons. You should explore the map as much as possible to discover new zones and Dynamons. You can also catch rare Dynamons by using special items or by being lucky. Rare Dynamons are Dynamons that have higher stats, unique skills, or special appearances. You should catch rare Dynamons to add them to your collection and to use them in battles.</p>
91
- <h3>Challenge other players online</h3>
92
- <p>The fifth tip for playing Dynamons World is to challenge other players online. Online matches are matches where you can battle with other players from around the world. You can access online matches by clicking on the online button on the main menu. You can choose from different modes, such as ranked, casual, or tournament. You can also chat with other players and make friends. Online matches are a great way to test your skills, learn from others, and have fun.</p>
93
- <h2>Conclusion</h2>
94
- <p>Dynamons World is a game that lets you catch, train, and battle with cute and powerful monsters. It is a fun and addictive game that you can play for free on web browser, Android, and iOS platforms. But if you want to get unlimited money, unlock all the content, and remove the ads, you can download the Dynamons World APK hack. This is a modified version of the game that gives you these features and more. In this article, we showed you how to download and install the Dynamons World APK hack, what features it offers, and some tips and tricks for playing the game. We hope you found this article helpful and informative. Now go ahead and enjoy your Dynamons World APK hack!</p>
95
- <h2>FAQs</h2>
96
- <p>Here are some frequently asked questions about Dynamons World APK hack:</p>
97
- <ul>
98
- <li>Q: Is Dynamons World APK hack safe to use?</li>
99
- <li>A: Yes, as long as you download it from a reliable source and scan it with a trusted antivirus program before installing it.</li>
100
- <li>Q: Is Dynamons World APK hack legal to use?</li>
101
- <li>A: No, it is not legal to use because it violates the terms and conditions of the original game. However, it is unlikely that you will get banned or punished for using it unless you abuse it or cheat in online matches.</li>
102
- <li>Q: Can I update Dynamons World APK hack?</li>
103
- <li>A: No, you cannot update it because it is not compatible with the official updates of the game. If you want to update the game, you have to uninstall the APK hack and install the original game from the app store.</li>
104
- <li>Q: Can I play online matches with Dynamons World APK hack?</li>
105
- <li>A: Yes, you can play online matches with Dynamons World APK hack, but you should be careful not to use any unfair advantages or cheat codes that may ruin the game for others or get you reported.</li>
106
- <li>Q: Can I transfer my progress from Dynamons World APK hack to the original game?</li>
107
- <li>A: No, you cannot transfer your progress from Dynamons World APK hack to the original game because they have different data files and servers.</li>
108
- </ul></p> 197e85843d<br />
109
- <br />
110
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/232labs/VToonify/vtoonify/model/vtoonify.py DELETED
@@ -1,286 +0,0 @@
1
- import torch
2
- import numpy as np
3
- import math
4
- from torch import nn
5
- from model.stylegan.model import ConvLayer, EqualLinear, Generator, ResBlock
6
- from model.dualstylegan import AdaptiveInstanceNorm, AdaResBlock, DualStyleGAN
7
- import torch.nn.functional as F
8
-
9
- # IC-GAN: stylegan discriminator
10
- class ConditionalDiscriminator(nn.Module):
11
- def __init__(self, size, channel_multiplier=2, blur_kernel=[1, 3, 3, 1], use_condition=False, style_num=None):
12
- super().__init__()
13
-
14
- channels = {
15
- 4: 512,
16
- 8: 512,
17
- 16: 512,
18
- 32: 512,
19
- 64: 256 * channel_multiplier,
20
- 128: 128 * channel_multiplier,
21
- 256: 64 * channel_multiplier,
22
- 512: 32 * channel_multiplier,
23
- 1024: 16 * channel_multiplier,
24
- }
25
-
26
- convs = [ConvLayer(3, channels[size], 1)]
27
-
28
- log_size = int(math.log(size, 2))
29
-
30
- in_channel = channels[size]
31
-
32
- for i in range(log_size, 2, -1):
33
- out_channel = channels[2 ** (i - 1)]
34
-
35
- convs.append(ResBlock(in_channel, out_channel, blur_kernel))
36
-
37
- in_channel = out_channel
38
-
39
- self.convs = nn.Sequential(*convs)
40
-
41
- self.stddev_group = 4
42
- self.stddev_feat = 1
43
- self.use_condition = use_condition
44
-
45
- if self.use_condition:
46
- self.condition_dim = 128
47
- # map style degree to 64-dimensional vector
48
- self.label_mapper = nn.Sequential(
49
- nn.Linear(1, 64),
50
- nn.LeakyReLU(negative_slope=0.2, inplace=True),
51
- nn.Linear(64, 64),
52
- nn.LeakyReLU(negative_slope=0.2, inplace=True),
53
- nn.Linear(64, self.condition_dim//2),
54
- )
55
- # map style code index to 64-dimensional vector
56
- self.style_mapper = nn.Embedding(style_num, self.condition_dim-self.condition_dim//2)
57
- else:
58
- self.condition_dim = 1
59
-
60
- self.final_conv = ConvLayer(in_channel + 1, channels[4], 3)
61
- self.final_linear = nn.Sequential(
62
- EqualLinear(channels[4] * 4 * 4, channels[4], activation="fused_lrelu"),
63
- EqualLinear(channels[4], self.condition_dim),
64
- )
65
-
66
- def forward(self, input, degree_label=None, style_ind=None):
67
- out = self.convs(input)
68
-
69
- batch, channel, height, width = out.shape
70
- group = min(batch, self.stddev_group)
71
- stddev = out.view(
72
- group, -1, self.stddev_feat, channel // self.stddev_feat, height, width
73
- )
74
- stddev = torch.sqrt(stddev.var(0, unbiased=False) + 1e-8)
75
- stddev = stddev.mean([2, 3, 4], keepdims=True).squeeze(2)
76
- stddev = stddev.repeat(group, 1, height, width)
77
- out = torch.cat([out, stddev], 1)
78
-
79
- out = self.final_conv(out)
80
- out = out.view(batch, -1)
81
-
82
- if self.use_condition:
83
- h = self.final_linear(out)
84
- condition = torch.cat((self.label_mapper(degree_label), self.style_mapper(style_ind)), dim=1)
85
- out = (h * condition).sum(dim=1, keepdim=True) * (1 / np.sqrt(self.condition_dim))
86
- else:
87
- out = self.final_linear(out)
88
-
89
- return out
90
-
91
-
92
- class VToonifyResBlock(nn.Module):
93
- def __init__(self, fin):
94
- super().__init__()
95
-
96
- self.conv = nn.Conv2d(fin, fin, 3, 1, 1)
97
- self.conv2 = nn.Conv2d(fin, fin, 3, 1, 1)
98
- self.lrelu = nn.LeakyReLU(negative_slope=0.2, inplace=True)
99
-
100
- def forward(self, x):
101
- out = self.lrelu(self.conv(x))
102
- out = self.lrelu(self.conv2(out))
103
- out = (out + x) / math.sqrt(2)
104
- return out
105
-
106
- class Fusion(nn.Module):
107
- def __init__(self, in_channels, skip_channels, out_channels):
108
- super().__init__()
109
-
110
- # create conv layers
111
- self.conv = nn.Conv2d(in_channels + skip_channels, out_channels, 3, 1, 1, bias=True)
112
- self.norm = AdaptiveInstanceNorm(in_channels + skip_channels, 128)
113
- self.conv2 = nn.Conv2d(in_channels + skip_channels, 1, 3, 1, 1, bias=True)
114
- #'''
115
- self.linear = nn.Sequential(
116
- nn.Linear(1, 64),
117
- nn.LeakyReLU(negative_slope=0.2, inplace=True),
118
- nn.Linear(64, 128),
119
- nn.LeakyReLU(negative_slope=0.2, inplace=True)
120
- )
121
-
122
- def forward(self, f_G, f_E, d_s=1):
123
- # label of style degree
124
- label = self.linear(torch.zeros(f_G.size(0),1).to(f_G.device) + d_s)
125
- out = torch.cat([f_G, abs(f_G-f_E)], dim=1)
126
- m_E = (F.relu(self.conv2(self.norm(out, label)))).tanh()
127
- f_out = self.conv(torch.cat([f_G, f_E * m_E], dim=1))
128
- return f_out, m_E
129
-
130
- class VToonify(nn.Module):
131
- def __init__(self,
132
- in_size=256,
133
- out_size=1024,
134
- img_channels=3,
135
- style_channels=512,
136
- num_mlps=8,
137
- channel_multiplier=2,
138
- num_res_layers=6,
139
- backbone = 'dualstylegan',
140
- ):
141
-
142
- super().__init__()
143
-
144
- self.backbone = backbone
145
- if self.backbone == 'dualstylegan':
146
- # DualStyleGAN, with weights being fixed
147
- self.generator = DualStyleGAN(out_size, style_channels, num_mlps, channel_multiplier)
148
- else:
149
- # StyleGANv2, with weights being fixed
150
- self.generator = Generator(out_size, style_channels, num_mlps, channel_multiplier)
151
-
152
- self.in_size = in_size
153
- self.style_channels = style_channels
154
- channels = self.generator.channels
155
-
156
- # encoder
157
- num_styles = int(np.log2(out_size)) * 2 - 2
158
- encoder_res = [2**i for i in range(int(np.log2(in_size)), 4, -1)]
159
- self.encoder = nn.ModuleList()
160
- self.encoder.append(
161
- nn.Sequential(
162
- nn.Conv2d(img_channels+19, 32, 3, 1, 1, bias=True),
163
- nn.LeakyReLU(negative_slope=0.2, inplace=True),
164
- nn.Conv2d(32, channels[in_size], 3, 1, 1, bias=True),
165
- nn.LeakyReLU(negative_slope=0.2, inplace=True)))
166
-
167
- for res in encoder_res:
168
- in_channels = channels[res]
169
- if res > 32:
170
- out_channels = channels[res // 2]
171
- block = nn.Sequential(
172
- nn.Conv2d(in_channels, out_channels, 3, 2, 1, bias=True),
173
- nn.LeakyReLU(negative_slope=0.2, inplace=True),
174
- nn.Conv2d(out_channels, out_channels, 3, 1, 1, bias=True),
175
- nn.LeakyReLU(negative_slope=0.2, inplace=True))
176
- self.encoder.append(block)
177
- else:
178
- layers = []
179
- for _ in range(num_res_layers):
180
- layers.append(VToonifyResBlock(in_channels))
181
- self.encoder.append(nn.Sequential(*layers))
182
- block = nn.Conv2d(in_channels, img_channels, 1, 1, 0, bias=True)
183
- self.encoder.append(block)
184
-
185
- # trainable fusion module
186
- self.fusion_out = nn.ModuleList()
187
- self.fusion_skip = nn.ModuleList()
188
- for res in encoder_res[::-1]:
189
- num_channels = channels[res]
190
- if self.backbone == 'dualstylegan':
191
- self.fusion_out.append(
192
- Fusion(num_channels, num_channels, num_channels))
193
- else:
194
- self.fusion_out.append(
195
- nn.Conv2d(num_channels * 2, num_channels, 3, 1, 1, bias=True))
196
-
197
- self.fusion_skip.append(
198
- nn.Conv2d(num_channels + 3, 3, 3, 1, 1, bias=True))
199
-
200
- # Modified ModRes blocks in DualStyleGAN, with weights being fixed
201
- if self.backbone == 'dualstylegan':
202
- self.res = nn.ModuleList()
203
- self.res.append(AdaResBlock(self.generator.channels[2 ** 2])) # for conv1, no use in this model
204
- for i in range(3, 6):
205
- out_channel = self.generator.channels[2 ** i]
206
- self.res.append(AdaResBlock(out_channel, dilation=2**(5-i)))
207
- self.res.append(AdaResBlock(out_channel, dilation=2**(5-i)))
208
-
209
-
210
- def forward(self, x, style, d_s=None, return_mask=False, return_feat=False):
211
- # map style to W+ space
212
- if style is not None and style.ndim < 3:
213
- if self.backbone == 'dualstylegan':
214
- resstyles = self.generator.style(style).unsqueeze(1).repeat(1, self.generator.n_latent, 1)
215
- adastyles = style.unsqueeze(1).repeat(1, self.generator.n_latent, 1)
216
- elif style is not None:
217
- nB, nL, nD = style.shape
218
- if self.backbone == 'dualstylegan':
219
- resstyles = self.generator.style(style.reshape(nB*nL, nD)).reshape(nB, nL, nD)
220
- adastyles = style
221
- if self.backbone == 'dualstylegan':
222
- adastyles = adastyles.clone()
223
- for i in range(7, self.generator.n_latent):
224
- adastyles[:, i] = self.generator.res[i](adastyles[:, i])
225
-
226
- # obtain multi-scale content features
227
- feat = x
228
- encoder_features = []
229
- # downsampling conv parts of E
230
- for block in self.encoder[:-2]:
231
- feat = block(feat)
232
- encoder_features.append(feat)
233
- encoder_features = encoder_features[::-1]
234
- # Resblocks in E
235
- for ii, block in enumerate(self.encoder[-2]):
236
- feat = block(feat)
237
- # adjust Resblocks with ModRes blocks
238
- if self.backbone == 'dualstylegan':
239
- feat = self.res[ii+1](feat, resstyles[:, ii+1], d_s)
240
- # the last-layer feature of E (inputs of backbone)
241
- out = feat
242
- skip = self.encoder[-1](feat)
243
- if return_feat:
244
- return out, skip
245
-
246
- # 32x32 ---> higher res
247
- _index = 1
248
- m_Es = []
249
- for conv1, conv2, to_rgb in zip(
250
- self.stylegan().convs[6::2], self.stylegan().convs[7::2], self.stylegan().to_rgbs[3:]):
251
-
252
- # pass the mid-layer features of E to the corresponding resolution layers of G
253
- if 2 ** (5+((_index-1)//2)) <= self.in_size:
254
- fusion_index = (_index - 1) // 2
255
- f_E = encoder_features[fusion_index]
256
-
257
- if self.backbone == 'dualstylegan':
258
- out, m_E = self.fusion_out[fusion_index](out, f_E, d_s)
259
- skip = self.fusion_skip[fusion_index](torch.cat([skip, f_E*m_E], dim=1))
260
- m_Es += [m_E]
261
- else:
262
- out = self.fusion_out[fusion_index](torch.cat([out, f_E], dim=1))
263
- skip = self.fusion_skip[fusion_index](torch.cat([skip, f_E], dim=1))
264
-
265
- # remove the noise input
266
- batch, _, height, width = out.shape
267
- noise = x.new_empty(batch, 1, height * 2, width * 2).normal_().detach() * 0.0
268
-
269
- out = conv1(out, adastyles[:, _index+6], noise=noise)
270
- out = conv2(out, adastyles[:, _index+7], noise=noise)
271
- skip = to_rgb(out, adastyles[:, _index+8], skip)
272
- _index += 2
273
-
274
- image = skip
275
- if return_mask and self.backbone == 'dualstylegan':
276
- return image, m_Es
277
- return image
278
-
279
- def stylegan(self):
280
- if self.backbone == 'dualstylegan':
281
- return self.generator.generator
282
- else:
283
- return self.generator
284
-
285
- def zplus2wplus(self, zplus):
286
- return self.stylegan().style(zplus.reshape(zplus.shape[0]*zplus.shape[1], zplus.shape[2])).reshape(zplus.shape)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AB-TW/team-ai/documents/bussiness_context/NOTION_DB/Engineering Wiki 2402f5396a3244fdb3f1d135bdb0f3d6/ABstract(插件化AB Testing平台) 746b87acd94643ca871ec661b63f196c/业务模型 d31846027b4f40ca99f6e76f897663a4.md DELETED
@@ -1,198 +0,0 @@
1
- # 业务模型
2
-
3
- Last edited time: April 23, 2023 3:58 PM
4
- Owner: Anonymous
5
-
6
- ## 模型图
7
-
8
- ```
9
- @startuml
10
- 'https://plantuml.com/class-diagram
11
-
12
- left to right direction
13
- package "Feature Flag" {
14
- entity FeatureFlag #pink{
15
- id: FeatureFlagId
16
- featureKey: String
17
- description: FeatureFlagDescription
18
- featureConfigs: FeatureConfigs
19
- }
20
-
21
- entity FeatureConfig #pink{
22
- id: FeatureConfigId
23
- featureKey: String
24
- data: Object
25
- trackData: Object
26
- condition: FilterCondition
27
- description: FeatureConfigDescription
28
- status: FeatureConfigStatus
29
- }
30
-
31
- interface FeatureFlags #Orange {
32
- getFeatureFlag(featureKey: String): FeatureFlag
33
- }
34
-
35
- interface FeatureConfigs #Orange {
36
- getFeatureConfigs(featureKey: String): List<FeatureConfig>
37
- }
38
-
39
- interface CustomerFeatureConfigs #Orange {
40
- getFeatureConfigs(featureKey: String, customer: Customer): List<FeatureConfig>
41
- }
42
-
43
- FeatureFlags "1" -- "0..N" FeatureFlag
44
- FeatureFlag "1" -- "1" FeatureConfigs
45
- FeatureConfigs "1" -- "0..N" FeatureConfig
46
- CustomerFeatureConfigs "1" -- "0..N" FeatureConfig
47
- }
48
-
49
- package "Experiment" as ExperimentPackage{
50
- entity ExperimentGroup #pink {
51
- id: ExperimentGroupId
52
- description: ExperimentGroupDescription
53
- }
54
-
55
- entity Experiment #pink {
56
- id: ExperimentId
57
- groupId: ExperimentGroupId
58
- description: ExperimentDescription
59
- condition: FilterCondition
60
- percentage: Percentage
61
- }
62
-
63
- entity Bucket #pink {
64
- key: String
65
- config: Object
66
- percentage: Percentage
67
- }
68
-
69
- entity Assignment #pink {
70
- id: AssignmentId
71
- experimentId: ExperimentId
72
- bucketKey: String
73
- clientId: String
74
- customerId: String
75
- description: AssignmentDescription
76
- }
77
-
78
- interface ExperimentGroups #Orange {
79
- getExperimentGroup(groupId: ExperimentGroupId): ExperimentGroup
80
- }
81
-
82
- interface ExperimentGroupExperiments #Orange {
83
- getExperiments(groupId: ExperimentGroupId): List<Experiment>
84
- }
85
-
86
- interface Experiments #Orange {
87
- getExperiment(experimentId: ExperimentId): Experiment
88
- }
89
-
90
- interface CustomerAssignments #Orange {
91
- getAssignments(experimentId: ExperimentId, customer: Customer): Assignment
92
- }
93
-
94
- interface ExperimentAssignments #Orange {
95
- getAssignments(experimentId: ExperimentId): List<Assignment>
96
- getAssignments(experimentId: ExperimentId, bucketKey: String): List<Assignment>
97
- }
98
-
99
- ExperimentGroups "1" -- "0..N" ExperimentGroup
100
- ExperimentGroup "1" -- "1" ExperimentGroupExperiments
101
- ExperimentGroupExperiments "1" -- "0..N" Experiment
102
- Experiments "1" -- "0..N" Experiment
103
- Experiment "1" -- "1..N" Bucket
104
- ExperimentAssignments "1" -- "1" Experiment
105
- ExperimentAssignments "1" -- "0..N" Assignment
106
- CustomerAssignments "1" -- "0..N" Assignment
107
- }
108
-
109
- package "Tracking" {
110
- entity TrackingEvent #pink {
111
- id: TrackingEventId
112
- clientId: String
113
- experimentId: ExperimentId
114
- bucketKey: String
115
- name: TrackingEventName
116
- description: TrackingEventDescription
117
- }
118
-
119
- interface TrackingEvents #Orange {
120
- getTrackingEvents(experimentId: ExperimentId, bucketKey: String): List<TrackingEvent>
121
- }
122
-
123
- TrackingEvents "1" -- "0..N" TrackingEvent
124
- TrackingEvent "1..N" .. "1" Experiment
125
- TrackingEvent "1..N" .. "1" Bucket
126
- }
127
-
128
- package "metrics" {
129
- entity MetricMeta #pink {
130
- id: MetricMetaId
131
- name: MetricMeta
132
- description: MetricDescription
133
- }
134
-
135
- entity Metric #pink {
136
- id: MetricId
137
- name: MetricName
138
- description: MetricDescription
139
- }
140
-
141
- interface Metrics #Orange {
142
- getMetrics(metricMetaId: MetricMetaId): List<Metric>
143
- }
144
-
145
- interface MetricMetas #Orange {
146
- getMetricMetas(): List<MetricMeta>
147
- }
148
-
149
- interface MetricMetaMetrics #Orange {
150
- getMetrics(metricMetaId: MetricMetaId): List<Metric>
151
- }
152
- MetricMetas "1" -- "0..N" MetricMeta
153
- MetricMeta "1" -- "1" MetricMetaMetrics
154
- MetricMetaMetrics "1" -- "0..N" Metric
155
- Metrics "1" -- "0..N" Metric
156
-
157
- }
158
-
159
- package MemberCriteria {
160
- entity Segment #pink {
161
- id: SegmentId
162
- name: String
163
- description: SegmentDescription
164
- }
165
-
166
- interface Segments #Orange {
167
- getSegments(): List<Segment>
168
- }
169
-
170
- interface CustomerSegments #Orange {
171
- getSegments(customer: Customer): List<Segment>
172
- }
173
-
174
- Segments "1" -- "0..N" Segment
175
- CustomerSegments "1" -- "0..N" Segment
176
- }
177
-
178
- entity Customer #Green {
179
- id: CustomerId
180
- clientId: String
181
- description: CustomerDescription
182
- }
183
-
184
- Customer -- CustomerFeatureConfigs
185
- Customer -- CustomerAssignments
186
- CustomerAssignments -- CustomerSegments
187
- CustomerFeatureConfigs -- CustomerSegments
188
-
189
- Experiment "1" -- "0..N" MetricMeta
190
- Experiment "1" -- "0..N" Metric
191
- CustomerFeatureConfigs "1" -- "1" CustomerAssignments
192
- Experiment "1" -- "0..N" Segment
193
- FeatureConfig "1" -- "0..N" Segment
194
- "metrics" .. "Tracking"
195
- @enduml
196
- ```
197
-
198
- ![Untitled](%E4%B8%9A%E5%8A%A1%E6%A8%A1%E5%9E%8B%20d31846027b4f40ca99f6e76f897663a4/Untitled.png)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AI-Zero-to-Hero/10-GR-AI-Wikipedia-Search/app.py DELETED
@@ -1,58 +0,0 @@
1
- from transformers import pipeline
2
- import wikipedia
3
- import random
4
- import gradio as gr
5
- model_name = "deepset/electra-base-squad2"
6
- nlp = pipeline('question-answering', model=model_name, tokenizer=model_name)
7
-
8
- def get_wiki_article(topic):
9
- topic=topic
10
- try:
11
- search = wikipedia.search(topic, results = 1)[0]
12
- except wikipedia.DisambiguationError as e:
13
- choices = [x for x in e.options if ('disambiguation' not in x) and ('All pages' not in x) and (x!=topic)]
14
- search = random.choice(choices)
15
- try:
16
- p = wikipedia.page(search)
17
- except wikipedia.exceptions.DisambiguationError as e:
18
- choices = [x for x in e.options if ('disambiguation' not in x) and ('All pages' not in x) and (x!=topic)]
19
- s = random.choice(choices)
20
- p = wikipedia.page(s)
21
- return p.content, p.url
22
-
23
- def get_answer(topic, question):
24
- w_art, w_url=get_wiki_article(topic)
25
- qa = {'question': question, 'context': w_art}
26
- res = nlp(qa)
27
- return res['answer'], w_url, {'confidence':res['score']}
28
-
29
-
30
- inputs = [
31
- gr.inputs.Textbox(lines=2, label="Topic"),
32
- gr.inputs.Textbox(lines=2, label="Question")
33
- ]
34
- outputs = [
35
- gr.outputs.Textbox(type='str',label="Answer"),
36
- gr.outputs.Textbox(type='str',label="Wikipedia Reference Article"),
37
- gr.outputs.Label(type="confidences",label="Confidence in answer (assuming the correct wikipedia article)"),
38
- ]
39
-
40
- title = "AI Wikipedia Search"
41
- description = 'Contextual Question and Answer'
42
- article = ''
43
- examples = [
44
- ['Quantum', 'What is quanta in physics?'],
45
- ['Cicero', 'What quotes did Marcus Tullius Cicero make?'],
46
- ['Alzheimers', 'What causes alzheimers?'],
47
- ['Neuropathy', 'With neuropathy and neuro-muskoskeletal issues, and what are the treatments available?'],
48
- ['Chemotherapy', 'What are possible care options for patients in chemotherapy?'],
49
- ['Health', 'What is mindfulness and how does it affect health?'],
50
- ['Medicine', 'In medicine what is the Hippocratic Oath?'],
51
- ['Insurance', 'What is Medicare?'],
52
- ['Financial Services', 'Does Medicaid offer financial assistance?'],
53
- ['Ontology', 'Why is an anthology different than ontology?'],
54
- ['Taxonomy', 'What is a biology taxonomy?'],
55
- ['Pharmacy', 'What does a pharmacist do?']
56
- ]
57
-
58
- gr.Interface(get_answer, inputs, outputs, title=title, description=description, article=article, examples=examples, flagging_options=["strongly related","related", "neutral", "unrelated", "strongly unrelated"]).launch(share=False,enable_queue=False)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AIConsultant/MusicGen/audiocraft/modules/__init__.py DELETED
@@ -1,22 +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
- """Modules used for building the models."""
7
-
8
- # flake8: noqa
9
- from .conv import (
10
- NormConv1d,
11
- NormConv2d,
12
- NormConvTranspose1d,
13
- NormConvTranspose2d,
14
- StreamableConv1d,
15
- StreamableConvTranspose1d,
16
- pad_for_conv1d,
17
- pad1d,
18
- unpad1d,
19
- )
20
- from .lstm import StreamableLSTM
21
- from .seanet import SEANetEncoder, SEANetDecoder
22
- from .transformer import StreamingTransformer
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AIConsultant/MusicGen/tests/quantization/test_vq.py DELETED
@@ -1,18 +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
- import torch
8
-
9
- from audiocraft.quantization.vq import ResidualVectorQuantizer
10
-
11
-
12
- class TestResidualVectorQuantizer:
13
-
14
- def test_rvq(self):
15
- x = torch.randn(1, 16, 2048)
16
- vq = ResidualVectorQuantizer(n_q=8, dimension=16, bins=8)
17
- res = vq(x, 1.)
18
- assert res.x.shape == torch.Size([1, 16, 2048])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AIFILMS/StyleGANEX/configs/data_configs.py DELETED
@@ -1,48 +0,0 @@
1
- from configs import transforms_config
2
- from configs.paths_config import dataset_paths
3
-
4
-
5
- DATASETS = {
6
- 'ffhq_encode': {
7
- 'transforms': transforms_config.EncodeTransforms,
8
- 'train_source_root': dataset_paths['ffhq'],
9
- 'train_target_root': dataset_paths['ffhq'],
10
- 'test_source_root': dataset_paths['ffhq_test'],
11
- 'test_target_root': dataset_paths['ffhq_test'],
12
- },
13
- 'ffhq_sketch_to_face': {
14
- 'transforms': transforms_config.SketchToImageTransforms,
15
- 'train_source_root': dataset_paths['ffhq_train_sketch'],
16
- 'train_target_root': dataset_paths['ffhq'],
17
- 'test_source_root': dataset_paths['ffhq_test_sketch'],
18
- 'test_target_root': dataset_paths['ffhq_test'],
19
- },
20
- 'ffhq_seg_to_face': {
21
- 'transforms': transforms_config.SegToImageTransforms,
22
- 'train_source_root': dataset_paths['ffhq_train_segmentation'],
23
- 'train_target_root': dataset_paths['ffhq'],
24
- 'test_source_root': dataset_paths['ffhq_test_segmentation'],
25
- 'test_target_root': dataset_paths['ffhq_test'],
26
- },
27
- 'ffhq_super_resolution': {
28
- 'transforms': transforms_config.SuperResTransforms,
29
- 'train_source_root': dataset_paths['ffhq'],
30
- 'train_target_root': dataset_paths['ffhq1280'],
31
- 'test_source_root': dataset_paths['ffhq_test'],
32
- 'test_target_root': dataset_paths['ffhq1280_test'],
33
- },
34
- 'toonify': {
35
- 'transforms': transforms_config.ToonifyTransforms,
36
- 'train_source_root': dataset_paths['toonify_in'],
37
- 'train_target_root': dataset_paths['toonify_out'],
38
- 'test_source_root': dataset_paths['toonify_test_in'],
39
- 'test_target_root': dataset_paths['toonify_test_out'],
40
- },
41
- 'ffhq_edit': {
42
- 'transforms': transforms_config.EditingTransforms,
43
- 'train_source_root': dataset_paths['ffhq'],
44
- 'train_target_root': dataset_paths['ffhq'],
45
- 'test_source_root': dataset_paths['ffhq_test'],
46
- 'test_target_root': dataset_paths['ffhq_test'],
47
- },
48
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AIFILMS/StyleGANEX/models/mtcnn/mtcnn_pytorch/__init__.py DELETED
File without changes
spaces/AIGText/GlyphControl/ldm/modules/diffusionmodules/upscaling.py DELETED
@@ -1,81 +0,0 @@
1
- import torch
2
- import torch.nn as nn
3
- import numpy as np
4
- from functools import partial
5
-
6
- from ldm.modules.diffusionmodules.util import extract_into_tensor, make_beta_schedule
7
- from ldm.util import default
8
-
9
-
10
- class AbstractLowScaleModel(nn.Module):
11
- # for concatenating a downsampled image to the latent representation
12
- def __init__(self, noise_schedule_config=None):
13
- super(AbstractLowScaleModel, self).__init__()
14
- if noise_schedule_config is not None:
15
- self.register_schedule(**noise_schedule_config)
16
-
17
- def register_schedule(self, beta_schedule="linear", timesteps=1000,
18
- linear_start=1e-4, linear_end=2e-2, cosine_s=8e-3):
19
- betas = make_beta_schedule(beta_schedule, timesteps, linear_start=linear_start, linear_end=linear_end,
20
- cosine_s=cosine_s)
21
- alphas = 1. - betas
22
- alphas_cumprod = np.cumprod(alphas, axis=0)
23
- alphas_cumprod_prev = np.append(1., alphas_cumprod[:-1])
24
-
25
- timesteps, = betas.shape
26
- self.num_timesteps = int(timesteps)
27
- self.linear_start = linear_start
28
- self.linear_end = linear_end
29
- assert alphas_cumprod.shape[0] == self.num_timesteps, 'alphas have to be defined for each timestep'
30
-
31
- to_torch = partial(torch.tensor, dtype=torch.float32)
32
-
33
- self.register_buffer('betas', to_torch(betas))
34
- self.register_buffer('alphas_cumprod', to_torch(alphas_cumprod))
35
- self.register_buffer('alphas_cumprod_prev', to_torch(alphas_cumprod_prev))
36
-
37
- # calculations for diffusion q(x_t | x_{t-1}) and others
38
- self.register_buffer('sqrt_alphas_cumprod', to_torch(np.sqrt(alphas_cumprod)))
39
- self.register_buffer('sqrt_one_minus_alphas_cumprod', to_torch(np.sqrt(1. - alphas_cumprod)))
40
- self.register_buffer('log_one_minus_alphas_cumprod', to_torch(np.log(1. - alphas_cumprod)))
41
- self.register_buffer('sqrt_recip_alphas_cumprod', to_torch(np.sqrt(1. / alphas_cumprod)))
42
- self.register_buffer('sqrt_recipm1_alphas_cumprod', to_torch(np.sqrt(1. / alphas_cumprod - 1)))
43
-
44
- def q_sample(self, x_start, t, noise=None):
45
- noise = default(noise, lambda: torch.randn_like(x_start))
46
- return (extract_into_tensor(self.sqrt_alphas_cumprod, t, x_start.shape) * x_start +
47
- extract_into_tensor(self.sqrt_one_minus_alphas_cumprod, t, x_start.shape) * noise)
48
-
49
- def forward(self, x):
50
- return x, None
51
-
52
- def decode(self, x):
53
- return x
54
-
55
-
56
- class SimpleImageConcat(AbstractLowScaleModel):
57
- # no noise level conditioning
58
- def __init__(self):
59
- super(SimpleImageConcat, self).__init__(noise_schedule_config=None)
60
- self.max_noise_level = 0
61
-
62
- def forward(self, x):
63
- # fix to constant noise level
64
- return x, torch.zeros(x.shape[0], device=x.device).long()
65
-
66
-
67
- class ImageConcatWithNoiseAugmentation(AbstractLowScaleModel):
68
- def __init__(self, noise_schedule_config, max_noise_level=1000, to_cuda=False):
69
- super().__init__(noise_schedule_config=noise_schedule_config)
70
- self.max_noise_level = max_noise_level
71
-
72
- def forward(self, x, noise_level=None):
73
- if noise_level is None:
74
- noise_level = torch.randint(0, self.max_noise_level, (x.shape[0],), device=x.device).long()
75
- else:
76
- assert isinstance(noise_level, torch.Tensor)
77
- z = self.q_sample(x, noise_level)
78
- return z, noise_level
79
-
80
-
81
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Adapter/CoAdapter/ldm/modules/extra_condition/openpose/api.py DELETED
@@ -1,35 +0,0 @@
1
- import numpy as np
2
- import os
3
- import torch.nn as nn
4
-
5
- os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE"
6
-
7
- import cv2
8
- import torch
9
-
10
- from . import util
11
- from .body import Body
12
-
13
- remote_model_path = "https://huggingface.co/TencentARC/T2I-Adapter/blob/main/third-party-models/body_pose_model.pth"
14
-
15
-
16
- class OpenposeInference(nn.Module):
17
-
18
- def __init__(self):
19
- super().__init__()
20
- body_modelpath = os.path.join('models', "body_pose_model.pth")
21
-
22
- if not os.path.exists(body_modelpath):
23
- from basicsr.utils.download_util import load_file_from_url
24
- load_file_from_url(remote_model_path, model_dir='models')
25
-
26
- self.body_estimation = Body(body_modelpath)
27
-
28
- def forward(self, x):
29
- x = x[:, :, ::-1].copy()
30
- with torch.no_grad():
31
- candidate, subset = self.body_estimation(x)
32
- canvas = np.zeros_like(x)
33
- canvas = util.draw_bodypose(canvas, candidate, subset)
34
- canvas = cv2.cvtColor(canvas, cv2.COLOR_RGB2BGR)
35
- return canvas
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/plugins/buffdata-plugin.js DELETED
@@ -1,24 +0,0 @@
1
- import DataManager from './data/buff/DataManager.js';
2
- import Extend from './data/buff/Extend.js';
3
-
4
- class DataManagerPlugin extends Phaser.Plugins.BasePlugin {
5
-
6
- constructor(pluginManager) {
7
- super(pluginManager);
8
- }
9
-
10
- start() {
11
- var eventEmitter = this.game.events;
12
- eventEmitter.on('destroy', this.destroy, this);
13
- }
14
-
15
- add(parent, eventEmitter) {
16
- return new DataManager(parent, eventEmitter);
17
- }
18
-
19
- extend(dataManager) {
20
- return Extend(dataManager);
21
- }
22
- }
23
-
24
- export default DataManagerPlugin;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/spinner/grid/Grid.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import Base from '../base/Base';
2
- export default class Grid extends Base { }
 
 
 
spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/statesroundrectangle/Factory.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import StatesRoundRectangle from './StatesRoundRectangle';
2
-
3
- export default function (
4
- config?: StatesRoundRectangle.IConfig
5
-
6
- ): StatesRoundRectangle;
 
 
 
 
 
 
 
spaces/Akmyradov/TurkmenTTSweSTT/uroman/bin/uroman.pl DELETED
@@ -1,138 +0,0 @@
1
- #!/usr/bin/perl -w
2
-
3
- # uroman Nov. 12, 2015 - Apr. 23, 2021
4
- $version = "v1.2.8";
5
- # Author: Ulf Hermjakob
6
-
7
- # Usage: uroman.pl {-l [ara|bel|bul|deu|ell|eng|fas|grc|heb|kaz|kir|lav|lit|mkd|mkd2|oss|pnt|rus|srp|srp2|tur|uig|ukr|yid]} {--chart|--offset-mapping} {--no-cache} {--workset} < STDIN
8
- # Example: cat workset.txt | uroman.pl --offset-mapping --workset
9
-
10
- $|=1;
11
-
12
- use FindBin;
13
- use Cwd "abs_path";
14
- use File::Basename qw(dirname);
15
- use File::Spec;
16
-
17
- my $bin_dir = abs_path(dirname($0));
18
- my $root_dir = File::Spec->catfile($bin_dir, File::Spec->updir());
19
- my $data_dir = File::Spec->catfile($root_dir, "data");
20
- my $lib_dir = File::Spec->catfile($root_dir, "lib");
21
-
22
- use lib "$FindBin::Bin/../lib";
23
- use NLP::Chinese;
24
- use NLP::Romanizer;
25
- use NLP::UTF8;
26
- use NLP::utilities;
27
- use JSON;
28
- $chinesePM = NLP::Chinese;
29
- $romanizer = NLP::Romanizer;
30
- $util = NLP::utilities;
31
- %ht = ();
32
- %pinyin_ht = ();
33
- $lang_code = "";
34
- $return_chart_p = 0;
35
- $return_offset_mappings_p = 0;
36
- $workset_p = 0;
37
- $cache_rom_tokens_p = 1;
38
-
39
- $script_data_filename = File::Spec->catfile($data_dir, "Scripts.txt");
40
- $unicode_data_overwrite_filename = File::Spec->catfile($data_dir, "UnicodeDataOverwrite.txt");
41
- $unicode_data_filename = File::Spec->catfile($data_dir, "UnicodeData.txt");
42
- $romanization_table_filename = File::Spec->catfile($data_dir, "romanization-table.txt");
43
- $chinese_tonal_pinyin_filename = File::Spec->catfile($data_dir, "Chinese_to_Pinyin.txt");
44
-
45
- while (@ARGV) {
46
- $arg = shift @ARGV;
47
- if ($arg =~ /^-+(l|lc|lang-code)$/) {
48
- $lang_code = lc (shift @ARGV || "")
49
- } elsif ($arg =~ /^-+chart$/i) {
50
- $return_chart_p = 1;
51
- } elsif ($arg =~ /^-+workset$/i) {
52
- $workset_p = 1;
53
- } elsif ($arg =~ /^-+offset[-_]*map/i) {
54
- $return_offset_mappings_p = 1;
55
- } elsif ($arg =~ /^-+unicode[-_]?data/i) {
56
- $filename = shift @ARGV;
57
- if (-r $filename) {
58
- $unicode_data_filename = $filename;
59
- } else {
60
- print STDERR "Ignoring invalid UnicodeData filename $filename\n";
61
- }
62
- } elsif ($arg =~ /^-+(no-tok-cach|no-cach)/i) {
63
- $cache_rom_tokens_p = 0;
64
- } else {
65
- print STDERR "Ignoring unrecognized arg $arg\n";
66
- }
67
- }
68
-
69
- $romanizer->load_script_data(*ht, $script_data_filename);
70
- $romanizer->load_unicode_data(*ht, $unicode_data_filename);
71
- $romanizer->load_unicode_overwrite_romanization(*ht, $unicode_data_overwrite_filename);
72
- $romanizer->load_romanization_table(*ht, $romanization_table_filename);
73
- $chinese_to_pinyin_not_yet_loaded_p = 1;
74
- $current_date = $util->datetime("dateTtime");
75
- $lang_code_clause = ($lang_code) ? " \"lang-code\":\"$lang_code\",\n" : "";
76
-
77
- print "{\n \"romanizer\":\"uroman $version (Ulf Hermjakob, USC/ISI)\",\n \"date\":\"$current_date\",\n$lang_code_clause \"romanization\": [\n" if $return_chart_p;
78
- my $line_number = 0;
79
- my $chart_result = "";
80
- while (<>) {
81
- $line_number++;
82
- my $line = $_;
83
- my $snt_id = "";
84
- if ($workset_p) {
85
- next if $line =~ /^#/;
86
- if (($i_value, $s_value) = ($line =~ /^(\S+\.\d+)\s(.*)$/)) {
87
- $snt_id = $i_value;
88
- $line = "$s_value\n";
89
- } else {
90
- next;
91
- }
92
- }
93
- if ($chinese_to_pinyin_not_yet_loaded_p && $chinesePM->string_contains_utf8_cjk_unified_ideograph_p($line)) {
94
- $chinesePM->read_chinese_tonal_pinyin_files(*pinyin_ht, $chinese_tonal_pinyin_filename);
95
- $chinese_to_pinyin_not_yet_loaded_p = 0;
96
- }
97
- if ($return_chart_p) {
98
- print $chart_result;
99
- *chart_ht = $romanizer->romanize($line, $lang_code, "", *ht, *pinyin_ht, 0, "return chart", $line_number);
100
- $chart_result = $romanizer->chart_to_json_romanization_elements(0, $chart_ht{N_CHARS}, *chart_ht, $line_number);
101
- } elsif ($return_offset_mappings_p) {
102
- ($best_romanization, $offset_mappings) = $romanizer->romanize($line, $lang_code, "", *ht, *pinyin_ht, 0, "return offset mappings", $line_number, 0);
103
- print "::snt-id $snt_id\n" if $workset_p;
104
- print "::orig $line";
105
- print "::rom $best_romanization\n";
106
- print "::align $offset_mappings\n\n";
107
- } elsif ($cache_rom_tokens_p) {
108
- print $romanizer->romanize_by_token_with_caching($line, $lang_code, "", *ht, *pinyin_ht, 0, "", $line_number) . "\n";
109
- } else {
110
- print $romanizer->romanize($line, $lang_code, "", *ht, *pinyin_ht, 0, "", $line_number) . "\n";
111
- }
112
- }
113
- $chart_result =~ s/,(\s*)$/$1/;
114
- print $chart_result;
115
- print " ]\n}\n" if $return_chart_p;
116
-
117
- $dev_test_p = 0;
118
- if ($dev_test_p) {
119
- $n_suspicious_code_points = 0;
120
- $n_instances = 0;
121
- foreach $char_name (sort { hex($ht{UTF_NAME_TO_UNICODE}->{$a}) <=> hex($ht{UTF_NAME_TO_UNICODE}->{$b}) }
122
- keys %{$ht{SUSPICIOUS_ROMANIZATION}}) {
123
- $unicode_value = $ht{UTF_NAME_TO_UNICODE}->{$char_name};
124
- $utf8_string = $ht{UTF_NAME_TO_CODE}->{$char_name};
125
- foreach $romanization (sort keys %{$ht{SUSPICIOUS_ROMANIZATION}->{$char_name}}) {
126
- $count = $ht{SUSPICIOUS_ROMANIZATION}->{$char_name}->{$romanization};
127
- $s = ($count == 1) ? "" : "s";
128
- print STDERR "*** Suspiciously lengthy romanization:\n" unless $n_suspicious_code_points;
129
- print STDERR "::s $utf8_string ::t $romanization ::comment $char_name (U+$unicode_value)\n";
130
- $n_suspicious_code_points++;
131
- $n_instances += $count;
132
- }
133
- }
134
- print STDERR " *** Total of $n_suspicious_code_points suspicious code points ($n_instances instance$s)\n" if $n_suspicious_code_points;
135
- }
136
-
137
- exit 0;
138
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/docs/source/en/api/pipelines/panorama.md DELETED
@@ -1,57 +0,0 @@
1
- <!--Copyright 2023 The HuggingFace Team. All rights reserved.
2
-
3
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
4
- the License. You may obtain a copy of the License at
5
-
6
- http://www.apache.org/licenses/LICENSE-2.0
7
-
8
- Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
9
- an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
10
- specific language governing permissions and limitations under the License.
11
- -->
12
-
13
- # MultiDiffusion
14
-
15
- [MultiDiffusion: Fusing Diffusion Paths for Controlled Image Generation](https://huggingface.co/papers/2302.08113) is by Omer Bar-Tal, Lior Yariv, Yaron Lipman, and Tali Dekel.
16
-
17
- The abstract from the paper is:
18
-
19
- *Recent advances in text-to-image generation with diffusion models present transformative capabilities in image quality. However, user controllability of the generated image, and fast adaptation to new tasks still remains an open challenge, currently mostly addressed by costly and long re-training and fine-tuning or ad-hoc adaptations to specific image generation tasks. In this work, we present MultiDiffusion, a unified framework that enables versatile and controllable image generation, using a pre-trained text-to-image diffusion model, without any further training or finetuning. At the center of our approach is a new generation process, based on an optimization task that binds together multiple diffusion generation processes with a shared set of parameters or constraints. We show that MultiDiffusion can be readily applied to generate high quality and diverse images that adhere to user-provided controls, such as desired aspect ratio (e.g., panorama), and spatial guiding signals, ranging from tight segmentation masks to bounding boxes.*
20
-
21
- You can find additional information about MultiDiffusion on the [project page](https://multidiffusion.github.io/), [original codebase](https://github.com/omerbt/MultiDiffusion), and try it out in a [demo](https://huggingface.co/spaces/weizmannscience/MultiDiffusion).
22
-
23
- ## Tips
24
-
25
- While calling [`StableDiffusionPanoramaPipeline`], it's possible to specify the `view_batch_size` parameter to be > 1.
26
- For some GPUs with high performance, this can speedup the generation process and increase VRAM usage.
27
-
28
- To generate panorama-like images make sure you pass the width parameter accordingly. We recommend a width value of 2048 which is the default.
29
-
30
- Circular padding is applied to ensure there are no stitching artifacts when working with
31
- panoramas to ensure a seamless transition from the rightmost part to the leftmost part.
32
- By enabling circular padding (set `circular_padding=True`), the operation applies additional
33
- crops after the rightmost point of the image, allowing the model to "see” the transition
34
- from the rightmost part to the leftmost part. This helps maintain visual consistency in
35
- a 360-degree sense and creates a proper “panorama” that can be viewed using 360-degree
36
- panorama viewers. When decoding latents in Stable Diffusion, circular padding is applied
37
- to ensure that the decoded latents match in the RGB space.
38
-
39
- For example, without circular padding, there is a stitching artifact (default):
40
- ![img](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/indoor_%20no_circular_padding.png)
41
-
42
- But with circular padding, the right and the left parts are matching (`circular_padding=True`):
43
- ![img](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/indoor_%20circular_padding.png)
44
-
45
- <Tip>
46
-
47
- Make sure to check out the Schedulers [guide](/using-diffusers/schedulers) to learn how to explore the tradeoff between scheduler speed and quality, and see the [reuse components across pipelines](/using-diffusers/loading#reuse-components-across-pipelines) section to learn how to efficiently load the same components into multiple pipelines.
48
-
49
- </Tip>
50
-
51
- ## StableDiffusionPanoramaPipeline
52
- [[autodoc]] StableDiffusionPanoramaPipeline
53
- - __call__
54
- - all
55
-
56
- ## StableDiffusionPipelineOutput
57
- [[autodoc]] pipelines.stable_diffusion.StableDiffusionPipelineOutput
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/src/diffusers/utils/dummy_pt_objects.py DELETED
@@ -1,870 +0,0 @@
1
- # This file is autogenerated by the command `make fix-copies`, do not edit.
2
- from ..utils import DummyObject, requires_backends
3
-
4
-
5
- class AsymmetricAutoencoderKL(metaclass=DummyObject):
6
- _backends = ["torch"]
7
-
8
- def __init__(self, *args, **kwargs):
9
- requires_backends(self, ["torch"])
10
-
11
- @classmethod
12
- def from_config(cls, *args, **kwargs):
13
- requires_backends(cls, ["torch"])
14
-
15
- @classmethod
16
- def from_pretrained(cls, *args, **kwargs):
17
- requires_backends(cls, ["torch"])
18
-
19
-
20
- class AutoencoderKL(metaclass=DummyObject):
21
- _backends = ["torch"]
22
-
23
- def __init__(self, *args, **kwargs):
24
- requires_backends(self, ["torch"])
25
-
26
- @classmethod
27
- def from_config(cls, *args, **kwargs):
28
- requires_backends(cls, ["torch"])
29
-
30
- @classmethod
31
- def from_pretrained(cls, *args, **kwargs):
32
- requires_backends(cls, ["torch"])
33
-
34
-
35
- class ControlNetModel(metaclass=DummyObject):
36
- _backends = ["torch"]
37
-
38
- def __init__(self, *args, **kwargs):
39
- requires_backends(self, ["torch"])
40
-
41
- @classmethod
42
- def from_config(cls, *args, **kwargs):
43
- requires_backends(cls, ["torch"])
44
-
45
- @classmethod
46
- def from_pretrained(cls, *args, **kwargs):
47
- requires_backends(cls, ["torch"])
48
-
49
-
50
- class ModelMixin(metaclass=DummyObject):
51
- _backends = ["torch"]
52
-
53
- def __init__(self, *args, **kwargs):
54
- requires_backends(self, ["torch"])
55
-
56
- @classmethod
57
- def from_config(cls, *args, **kwargs):
58
- requires_backends(cls, ["torch"])
59
-
60
- @classmethod
61
- def from_pretrained(cls, *args, **kwargs):
62
- requires_backends(cls, ["torch"])
63
-
64
-
65
- class MultiAdapter(metaclass=DummyObject):
66
- _backends = ["torch"]
67
-
68
- def __init__(self, *args, **kwargs):
69
- requires_backends(self, ["torch"])
70
-
71
- @classmethod
72
- def from_config(cls, *args, **kwargs):
73
- requires_backends(cls, ["torch"])
74
-
75
- @classmethod
76
- def from_pretrained(cls, *args, **kwargs):
77
- requires_backends(cls, ["torch"])
78
-
79
-
80
- class PriorTransformer(metaclass=DummyObject):
81
- _backends = ["torch"]
82
-
83
- def __init__(self, *args, **kwargs):
84
- requires_backends(self, ["torch"])
85
-
86
- @classmethod
87
- def from_config(cls, *args, **kwargs):
88
- requires_backends(cls, ["torch"])
89
-
90
- @classmethod
91
- def from_pretrained(cls, *args, **kwargs):
92
- requires_backends(cls, ["torch"])
93
-
94
-
95
- class T2IAdapter(metaclass=DummyObject):
96
- _backends = ["torch"]
97
-
98
- def __init__(self, *args, **kwargs):
99
- requires_backends(self, ["torch"])
100
-
101
- @classmethod
102
- def from_config(cls, *args, **kwargs):
103
- requires_backends(cls, ["torch"])
104
-
105
- @classmethod
106
- def from_pretrained(cls, *args, **kwargs):
107
- requires_backends(cls, ["torch"])
108
-
109
-
110
- class T5FilmDecoder(metaclass=DummyObject):
111
- _backends = ["torch"]
112
-
113
- def __init__(self, *args, **kwargs):
114
- requires_backends(self, ["torch"])
115
-
116
- @classmethod
117
- def from_config(cls, *args, **kwargs):
118
- requires_backends(cls, ["torch"])
119
-
120
- @classmethod
121
- def from_pretrained(cls, *args, **kwargs):
122
- requires_backends(cls, ["torch"])
123
-
124
-
125
- class Transformer2DModel(metaclass=DummyObject):
126
- _backends = ["torch"]
127
-
128
- def __init__(self, *args, **kwargs):
129
- requires_backends(self, ["torch"])
130
-
131
- @classmethod
132
- def from_config(cls, *args, **kwargs):
133
- requires_backends(cls, ["torch"])
134
-
135
- @classmethod
136
- def from_pretrained(cls, *args, **kwargs):
137
- requires_backends(cls, ["torch"])
138
-
139
-
140
- class UNet1DModel(metaclass=DummyObject):
141
- _backends = ["torch"]
142
-
143
- def __init__(self, *args, **kwargs):
144
- requires_backends(self, ["torch"])
145
-
146
- @classmethod
147
- def from_config(cls, *args, **kwargs):
148
- requires_backends(cls, ["torch"])
149
-
150
- @classmethod
151
- def from_pretrained(cls, *args, **kwargs):
152
- requires_backends(cls, ["torch"])
153
-
154
-
155
- class UNet2DConditionModel(metaclass=DummyObject):
156
- _backends = ["torch"]
157
-
158
- def __init__(self, *args, **kwargs):
159
- requires_backends(self, ["torch"])
160
-
161
- @classmethod
162
- def from_config(cls, *args, **kwargs):
163
- requires_backends(cls, ["torch"])
164
-
165
- @classmethod
166
- def from_pretrained(cls, *args, **kwargs):
167
- requires_backends(cls, ["torch"])
168
-
169
-
170
- class UNet2DModel(metaclass=DummyObject):
171
- _backends = ["torch"]
172
-
173
- def __init__(self, *args, **kwargs):
174
- requires_backends(self, ["torch"])
175
-
176
- @classmethod
177
- def from_config(cls, *args, **kwargs):
178
- requires_backends(cls, ["torch"])
179
-
180
- @classmethod
181
- def from_pretrained(cls, *args, **kwargs):
182
- requires_backends(cls, ["torch"])
183
-
184
-
185
- class UNet3DConditionModel(metaclass=DummyObject):
186
- _backends = ["torch"]
187
-
188
- def __init__(self, *args, **kwargs):
189
- requires_backends(self, ["torch"])
190
-
191
- @classmethod
192
- def from_config(cls, *args, **kwargs):
193
- requires_backends(cls, ["torch"])
194
-
195
- @classmethod
196
- def from_pretrained(cls, *args, **kwargs):
197
- requires_backends(cls, ["torch"])
198
-
199
-
200
- class VQModel(metaclass=DummyObject):
201
- _backends = ["torch"]
202
-
203
- def __init__(self, *args, **kwargs):
204
- requires_backends(self, ["torch"])
205
-
206
- @classmethod
207
- def from_config(cls, *args, **kwargs):
208
- requires_backends(cls, ["torch"])
209
-
210
- @classmethod
211
- def from_pretrained(cls, *args, **kwargs):
212
- requires_backends(cls, ["torch"])
213
-
214
-
215
- def get_constant_schedule(*args, **kwargs):
216
- requires_backends(get_constant_schedule, ["torch"])
217
-
218
-
219
- def get_constant_schedule_with_warmup(*args, **kwargs):
220
- requires_backends(get_constant_schedule_with_warmup, ["torch"])
221
-
222
-
223
- def get_cosine_schedule_with_warmup(*args, **kwargs):
224
- requires_backends(get_cosine_schedule_with_warmup, ["torch"])
225
-
226
-
227
- def get_cosine_with_hard_restarts_schedule_with_warmup(*args, **kwargs):
228
- requires_backends(get_cosine_with_hard_restarts_schedule_with_warmup, ["torch"])
229
-
230
-
231
- def get_linear_schedule_with_warmup(*args, **kwargs):
232
- requires_backends(get_linear_schedule_with_warmup, ["torch"])
233
-
234
-
235
- def get_polynomial_decay_schedule_with_warmup(*args, **kwargs):
236
- requires_backends(get_polynomial_decay_schedule_with_warmup, ["torch"])
237
-
238
-
239
- def get_scheduler(*args, **kwargs):
240
- requires_backends(get_scheduler, ["torch"])
241
-
242
-
243
- class AudioPipelineOutput(metaclass=DummyObject):
244
- _backends = ["torch"]
245
-
246
- def __init__(self, *args, **kwargs):
247
- requires_backends(self, ["torch"])
248
-
249
- @classmethod
250
- def from_config(cls, *args, **kwargs):
251
- requires_backends(cls, ["torch"])
252
-
253
- @classmethod
254
- def from_pretrained(cls, *args, **kwargs):
255
- requires_backends(cls, ["torch"])
256
-
257
-
258
- class AutoPipelineForImage2Image(metaclass=DummyObject):
259
- _backends = ["torch"]
260
-
261
- def __init__(self, *args, **kwargs):
262
- requires_backends(self, ["torch"])
263
-
264
- @classmethod
265
- def from_config(cls, *args, **kwargs):
266
- requires_backends(cls, ["torch"])
267
-
268
- @classmethod
269
- def from_pretrained(cls, *args, **kwargs):
270
- requires_backends(cls, ["torch"])
271
-
272
-
273
- class AutoPipelineForInpainting(metaclass=DummyObject):
274
- _backends = ["torch"]
275
-
276
- def __init__(self, *args, **kwargs):
277
- requires_backends(self, ["torch"])
278
-
279
- @classmethod
280
- def from_config(cls, *args, **kwargs):
281
- requires_backends(cls, ["torch"])
282
-
283
- @classmethod
284
- def from_pretrained(cls, *args, **kwargs):
285
- requires_backends(cls, ["torch"])
286
-
287
-
288
- class AutoPipelineForText2Image(metaclass=DummyObject):
289
- _backends = ["torch"]
290
-
291
- def __init__(self, *args, **kwargs):
292
- requires_backends(self, ["torch"])
293
-
294
- @classmethod
295
- def from_config(cls, *args, **kwargs):
296
- requires_backends(cls, ["torch"])
297
-
298
- @classmethod
299
- def from_pretrained(cls, *args, **kwargs):
300
- requires_backends(cls, ["torch"])
301
-
302
-
303
- class ConsistencyModelPipeline(metaclass=DummyObject):
304
- _backends = ["torch"]
305
-
306
- def __init__(self, *args, **kwargs):
307
- requires_backends(self, ["torch"])
308
-
309
- @classmethod
310
- def from_config(cls, *args, **kwargs):
311
- requires_backends(cls, ["torch"])
312
-
313
- @classmethod
314
- def from_pretrained(cls, *args, **kwargs):
315
- requires_backends(cls, ["torch"])
316
-
317
-
318
- class DanceDiffusionPipeline(metaclass=DummyObject):
319
- _backends = ["torch"]
320
-
321
- def __init__(self, *args, **kwargs):
322
- requires_backends(self, ["torch"])
323
-
324
- @classmethod
325
- def from_config(cls, *args, **kwargs):
326
- requires_backends(cls, ["torch"])
327
-
328
- @classmethod
329
- def from_pretrained(cls, *args, **kwargs):
330
- requires_backends(cls, ["torch"])
331
-
332
-
333
- class DDIMPipeline(metaclass=DummyObject):
334
- _backends = ["torch"]
335
-
336
- def __init__(self, *args, **kwargs):
337
- requires_backends(self, ["torch"])
338
-
339
- @classmethod
340
- def from_config(cls, *args, **kwargs):
341
- requires_backends(cls, ["torch"])
342
-
343
- @classmethod
344
- def from_pretrained(cls, *args, **kwargs):
345
- requires_backends(cls, ["torch"])
346
-
347
-
348
- class DDPMPipeline(metaclass=DummyObject):
349
- _backends = ["torch"]
350
-
351
- def __init__(self, *args, **kwargs):
352
- requires_backends(self, ["torch"])
353
-
354
- @classmethod
355
- def from_config(cls, *args, **kwargs):
356
- requires_backends(cls, ["torch"])
357
-
358
- @classmethod
359
- def from_pretrained(cls, *args, **kwargs):
360
- requires_backends(cls, ["torch"])
361
-
362
-
363
- class DiffusionPipeline(metaclass=DummyObject):
364
- _backends = ["torch"]
365
-
366
- def __init__(self, *args, **kwargs):
367
- requires_backends(self, ["torch"])
368
-
369
- @classmethod
370
- def from_config(cls, *args, **kwargs):
371
- requires_backends(cls, ["torch"])
372
-
373
- @classmethod
374
- def from_pretrained(cls, *args, **kwargs):
375
- requires_backends(cls, ["torch"])
376
-
377
-
378
- class DiTPipeline(metaclass=DummyObject):
379
- _backends = ["torch"]
380
-
381
- def __init__(self, *args, **kwargs):
382
- requires_backends(self, ["torch"])
383
-
384
- @classmethod
385
- def from_config(cls, *args, **kwargs):
386
- requires_backends(cls, ["torch"])
387
-
388
- @classmethod
389
- def from_pretrained(cls, *args, **kwargs):
390
- requires_backends(cls, ["torch"])
391
-
392
-
393
- class ImagePipelineOutput(metaclass=DummyObject):
394
- _backends = ["torch"]
395
-
396
- def __init__(self, *args, **kwargs):
397
- requires_backends(self, ["torch"])
398
-
399
- @classmethod
400
- def from_config(cls, *args, **kwargs):
401
- requires_backends(cls, ["torch"])
402
-
403
- @classmethod
404
- def from_pretrained(cls, *args, **kwargs):
405
- requires_backends(cls, ["torch"])
406
-
407
-
408
- class KarrasVePipeline(metaclass=DummyObject):
409
- _backends = ["torch"]
410
-
411
- def __init__(self, *args, **kwargs):
412
- requires_backends(self, ["torch"])
413
-
414
- @classmethod
415
- def from_config(cls, *args, **kwargs):
416
- requires_backends(cls, ["torch"])
417
-
418
- @classmethod
419
- def from_pretrained(cls, *args, **kwargs):
420
- requires_backends(cls, ["torch"])
421
-
422
-
423
- class LDMPipeline(metaclass=DummyObject):
424
- _backends = ["torch"]
425
-
426
- def __init__(self, *args, **kwargs):
427
- requires_backends(self, ["torch"])
428
-
429
- @classmethod
430
- def from_config(cls, *args, **kwargs):
431
- requires_backends(cls, ["torch"])
432
-
433
- @classmethod
434
- def from_pretrained(cls, *args, **kwargs):
435
- requires_backends(cls, ["torch"])
436
-
437
-
438
- class LDMSuperResolutionPipeline(metaclass=DummyObject):
439
- _backends = ["torch"]
440
-
441
- def __init__(self, *args, **kwargs):
442
- requires_backends(self, ["torch"])
443
-
444
- @classmethod
445
- def from_config(cls, *args, **kwargs):
446
- requires_backends(cls, ["torch"])
447
-
448
- @classmethod
449
- def from_pretrained(cls, *args, **kwargs):
450
- requires_backends(cls, ["torch"])
451
-
452
-
453
- class PNDMPipeline(metaclass=DummyObject):
454
- _backends = ["torch"]
455
-
456
- def __init__(self, *args, **kwargs):
457
- requires_backends(self, ["torch"])
458
-
459
- @classmethod
460
- def from_config(cls, *args, **kwargs):
461
- requires_backends(cls, ["torch"])
462
-
463
- @classmethod
464
- def from_pretrained(cls, *args, **kwargs):
465
- requires_backends(cls, ["torch"])
466
-
467
-
468
- class RePaintPipeline(metaclass=DummyObject):
469
- _backends = ["torch"]
470
-
471
- def __init__(self, *args, **kwargs):
472
- requires_backends(self, ["torch"])
473
-
474
- @classmethod
475
- def from_config(cls, *args, **kwargs):
476
- requires_backends(cls, ["torch"])
477
-
478
- @classmethod
479
- def from_pretrained(cls, *args, **kwargs):
480
- requires_backends(cls, ["torch"])
481
-
482
-
483
- class ScoreSdeVePipeline(metaclass=DummyObject):
484
- _backends = ["torch"]
485
-
486
- def __init__(self, *args, **kwargs):
487
- requires_backends(self, ["torch"])
488
-
489
- @classmethod
490
- def from_config(cls, *args, **kwargs):
491
- requires_backends(cls, ["torch"])
492
-
493
- @classmethod
494
- def from_pretrained(cls, *args, **kwargs):
495
- requires_backends(cls, ["torch"])
496
-
497
-
498
- class CMStochasticIterativeScheduler(metaclass=DummyObject):
499
- _backends = ["torch"]
500
-
501
- def __init__(self, *args, **kwargs):
502
- requires_backends(self, ["torch"])
503
-
504
- @classmethod
505
- def from_config(cls, *args, **kwargs):
506
- requires_backends(cls, ["torch"])
507
-
508
- @classmethod
509
- def from_pretrained(cls, *args, **kwargs):
510
- requires_backends(cls, ["torch"])
511
-
512
-
513
- class DDIMInverseScheduler(metaclass=DummyObject):
514
- _backends = ["torch"]
515
-
516
- def __init__(self, *args, **kwargs):
517
- requires_backends(self, ["torch"])
518
-
519
- @classmethod
520
- def from_config(cls, *args, **kwargs):
521
- requires_backends(cls, ["torch"])
522
-
523
- @classmethod
524
- def from_pretrained(cls, *args, **kwargs):
525
- requires_backends(cls, ["torch"])
526
-
527
-
528
- class DDIMParallelScheduler(metaclass=DummyObject):
529
- _backends = ["torch"]
530
-
531
- def __init__(self, *args, **kwargs):
532
- requires_backends(self, ["torch"])
533
-
534
- @classmethod
535
- def from_config(cls, *args, **kwargs):
536
- requires_backends(cls, ["torch"])
537
-
538
- @classmethod
539
- def from_pretrained(cls, *args, **kwargs):
540
- requires_backends(cls, ["torch"])
541
-
542
-
543
- class DDIMScheduler(metaclass=DummyObject):
544
- _backends = ["torch"]
545
-
546
- def __init__(self, *args, **kwargs):
547
- requires_backends(self, ["torch"])
548
-
549
- @classmethod
550
- def from_config(cls, *args, **kwargs):
551
- requires_backends(cls, ["torch"])
552
-
553
- @classmethod
554
- def from_pretrained(cls, *args, **kwargs):
555
- requires_backends(cls, ["torch"])
556
-
557
-
558
- class DDPMParallelScheduler(metaclass=DummyObject):
559
- _backends = ["torch"]
560
-
561
- def __init__(self, *args, **kwargs):
562
- requires_backends(self, ["torch"])
563
-
564
- @classmethod
565
- def from_config(cls, *args, **kwargs):
566
- requires_backends(cls, ["torch"])
567
-
568
- @classmethod
569
- def from_pretrained(cls, *args, **kwargs):
570
- requires_backends(cls, ["torch"])
571
-
572
-
573
- class DDPMScheduler(metaclass=DummyObject):
574
- _backends = ["torch"]
575
-
576
- def __init__(self, *args, **kwargs):
577
- requires_backends(self, ["torch"])
578
-
579
- @classmethod
580
- def from_config(cls, *args, **kwargs):
581
- requires_backends(cls, ["torch"])
582
-
583
- @classmethod
584
- def from_pretrained(cls, *args, **kwargs):
585
- requires_backends(cls, ["torch"])
586
-
587
-
588
- class DEISMultistepScheduler(metaclass=DummyObject):
589
- _backends = ["torch"]
590
-
591
- def __init__(self, *args, **kwargs):
592
- requires_backends(self, ["torch"])
593
-
594
- @classmethod
595
- def from_config(cls, *args, **kwargs):
596
- requires_backends(cls, ["torch"])
597
-
598
- @classmethod
599
- def from_pretrained(cls, *args, **kwargs):
600
- requires_backends(cls, ["torch"])
601
-
602
-
603
- class DPMSolverMultistepInverseScheduler(metaclass=DummyObject):
604
- _backends = ["torch"]
605
-
606
- def __init__(self, *args, **kwargs):
607
- requires_backends(self, ["torch"])
608
-
609
- @classmethod
610
- def from_config(cls, *args, **kwargs):
611
- requires_backends(cls, ["torch"])
612
-
613
- @classmethod
614
- def from_pretrained(cls, *args, **kwargs):
615
- requires_backends(cls, ["torch"])
616
-
617
-
618
- class DPMSolverMultistepScheduler(metaclass=DummyObject):
619
- _backends = ["torch"]
620
-
621
- def __init__(self, *args, **kwargs):
622
- requires_backends(self, ["torch"])
623
-
624
- @classmethod
625
- def from_config(cls, *args, **kwargs):
626
- requires_backends(cls, ["torch"])
627
-
628
- @classmethod
629
- def from_pretrained(cls, *args, **kwargs):
630
- requires_backends(cls, ["torch"])
631
-
632
-
633
- class DPMSolverSinglestepScheduler(metaclass=DummyObject):
634
- _backends = ["torch"]
635
-
636
- def __init__(self, *args, **kwargs):
637
- requires_backends(self, ["torch"])
638
-
639
- @classmethod
640
- def from_config(cls, *args, **kwargs):
641
- requires_backends(cls, ["torch"])
642
-
643
- @classmethod
644
- def from_pretrained(cls, *args, **kwargs):
645
- requires_backends(cls, ["torch"])
646
-
647
-
648
- class EulerAncestralDiscreteScheduler(metaclass=DummyObject):
649
- _backends = ["torch"]
650
-
651
- def __init__(self, *args, **kwargs):
652
- requires_backends(self, ["torch"])
653
-
654
- @classmethod
655
- def from_config(cls, *args, **kwargs):
656
- requires_backends(cls, ["torch"])
657
-
658
- @classmethod
659
- def from_pretrained(cls, *args, **kwargs):
660
- requires_backends(cls, ["torch"])
661
-
662
-
663
- class EulerDiscreteScheduler(metaclass=DummyObject):
664
- _backends = ["torch"]
665
-
666
- def __init__(self, *args, **kwargs):
667
- requires_backends(self, ["torch"])
668
-
669
- @classmethod
670
- def from_config(cls, *args, **kwargs):
671
- requires_backends(cls, ["torch"])
672
-
673
- @classmethod
674
- def from_pretrained(cls, *args, **kwargs):
675
- requires_backends(cls, ["torch"])
676
-
677
-
678
- class HeunDiscreteScheduler(metaclass=DummyObject):
679
- _backends = ["torch"]
680
-
681
- def __init__(self, *args, **kwargs):
682
- requires_backends(self, ["torch"])
683
-
684
- @classmethod
685
- def from_config(cls, *args, **kwargs):
686
- requires_backends(cls, ["torch"])
687
-
688
- @classmethod
689
- def from_pretrained(cls, *args, **kwargs):
690
- requires_backends(cls, ["torch"])
691
-
692
-
693
- class IPNDMScheduler(metaclass=DummyObject):
694
- _backends = ["torch"]
695
-
696
- def __init__(self, *args, **kwargs):
697
- requires_backends(self, ["torch"])
698
-
699
- @classmethod
700
- def from_config(cls, *args, **kwargs):
701
- requires_backends(cls, ["torch"])
702
-
703
- @classmethod
704
- def from_pretrained(cls, *args, **kwargs):
705
- requires_backends(cls, ["torch"])
706
-
707
-
708
- class KarrasVeScheduler(metaclass=DummyObject):
709
- _backends = ["torch"]
710
-
711
- def __init__(self, *args, **kwargs):
712
- requires_backends(self, ["torch"])
713
-
714
- @classmethod
715
- def from_config(cls, *args, **kwargs):
716
- requires_backends(cls, ["torch"])
717
-
718
- @classmethod
719
- def from_pretrained(cls, *args, **kwargs):
720
- requires_backends(cls, ["torch"])
721
-
722
-
723
- class KDPM2AncestralDiscreteScheduler(metaclass=DummyObject):
724
- _backends = ["torch"]
725
-
726
- def __init__(self, *args, **kwargs):
727
- requires_backends(self, ["torch"])
728
-
729
- @classmethod
730
- def from_config(cls, *args, **kwargs):
731
- requires_backends(cls, ["torch"])
732
-
733
- @classmethod
734
- def from_pretrained(cls, *args, **kwargs):
735
- requires_backends(cls, ["torch"])
736
-
737
-
738
- class KDPM2DiscreteScheduler(metaclass=DummyObject):
739
- _backends = ["torch"]
740
-
741
- def __init__(self, *args, **kwargs):
742
- requires_backends(self, ["torch"])
743
-
744
- @classmethod
745
- def from_config(cls, *args, **kwargs):
746
- requires_backends(cls, ["torch"])
747
-
748
- @classmethod
749
- def from_pretrained(cls, *args, **kwargs):
750
- requires_backends(cls, ["torch"])
751
-
752
-
753
- class PNDMScheduler(metaclass=DummyObject):
754
- _backends = ["torch"]
755
-
756
- def __init__(self, *args, **kwargs):
757
- requires_backends(self, ["torch"])
758
-
759
- @classmethod
760
- def from_config(cls, *args, **kwargs):
761
- requires_backends(cls, ["torch"])
762
-
763
- @classmethod
764
- def from_pretrained(cls, *args, **kwargs):
765
- requires_backends(cls, ["torch"])
766
-
767
-
768
- class RePaintScheduler(metaclass=DummyObject):
769
- _backends = ["torch"]
770
-
771
- def __init__(self, *args, **kwargs):
772
- requires_backends(self, ["torch"])
773
-
774
- @classmethod
775
- def from_config(cls, *args, **kwargs):
776
- requires_backends(cls, ["torch"])
777
-
778
- @classmethod
779
- def from_pretrained(cls, *args, **kwargs):
780
- requires_backends(cls, ["torch"])
781
-
782
-
783
- class SchedulerMixin(metaclass=DummyObject):
784
- _backends = ["torch"]
785
-
786
- def __init__(self, *args, **kwargs):
787
- requires_backends(self, ["torch"])
788
-
789
- @classmethod
790
- def from_config(cls, *args, **kwargs):
791
- requires_backends(cls, ["torch"])
792
-
793
- @classmethod
794
- def from_pretrained(cls, *args, **kwargs):
795
- requires_backends(cls, ["torch"])
796
-
797
-
798
- class ScoreSdeVeScheduler(metaclass=DummyObject):
799
- _backends = ["torch"]
800
-
801
- def __init__(self, *args, **kwargs):
802
- requires_backends(self, ["torch"])
803
-
804
- @classmethod
805
- def from_config(cls, *args, **kwargs):
806
- requires_backends(cls, ["torch"])
807
-
808
- @classmethod
809
- def from_pretrained(cls, *args, **kwargs):
810
- requires_backends(cls, ["torch"])
811
-
812
-
813
- class UnCLIPScheduler(metaclass=DummyObject):
814
- _backends = ["torch"]
815
-
816
- def __init__(self, *args, **kwargs):
817
- requires_backends(self, ["torch"])
818
-
819
- @classmethod
820
- def from_config(cls, *args, **kwargs):
821
- requires_backends(cls, ["torch"])
822
-
823
- @classmethod
824
- def from_pretrained(cls, *args, **kwargs):
825
- requires_backends(cls, ["torch"])
826
-
827
-
828
- class UniPCMultistepScheduler(metaclass=DummyObject):
829
- _backends = ["torch"]
830
-
831
- def __init__(self, *args, **kwargs):
832
- requires_backends(self, ["torch"])
833
-
834
- @classmethod
835
- def from_config(cls, *args, **kwargs):
836
- requires_backends(cls, ["torch"])
837
-
838
- @classmethod
839
- def from_pretrained(cls, *args, **kwargs):
840
- requires_backends(cls, ["torch"])
841
-
842
-
843
- class VQDiffusionScheduler(metaclass=DummyObject):
844
- _backends = ["torch"]
845
-
846
- def __init__(self, *args, **kwargs):
847
- requires_backends(self, ["torch"])
848
-
849
- @classmethod
850
- def from_config(cls, *args, **kwargs):
851
- requires_backends(cls, ["torch"])
852
-
853
- @classmethod
854
- def from_pretrained(cls, *args, **kwargs):
855
- requires_backends(cls, ["torch"])
856
-
857
-
858
- class EMAModel(metaclass=DummyObject):
859
- _backends = ["torch"]
860
-
861
- def __init__(self, *args, **kwargs):
862
- requires_backends(self, ["torch"])
863
-
864
- @classmethod
865
- def from_config(cls, *args, **kwargs):
866
- requires_backends(cls, ["torch"])
867
-
868
- @classmethod
869
- def from_pretrained(cls, *args, **kwargs):
870
- requires_backends(cls, ["torch"])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Andy1621/uniformer_image_detection/mmdet/models/backbones/ssd_vgg.py DELETED
@@ -1,169 +0,0 @@
1
- import torch
2
- import torch.nn as nn
3
- import torch.nn.functional as F
4
- from mmcv.cnn import VGG, constant_init, kaiming_init, normal_init, xavier_init
5
- from mmcv.runner import load_checkpoint
6
-
7
- from mmdet.utils import get_root_logger
8
- from ..builder import BACKBONES
9
-
10
-
11
- @BACKBONES.register_module()
12
- class SSDVGG(VGG):
13
- """VGG Backbone network for single-shot-detection.
14
-
15
- Args:
16
- input_size (int): width and height of input, from {300, 512}.
17
- depth (int): Depth of vgg, from {11, 13, 16, 19}.
18
- out_indices (Sequence[int]): Output from which stages.
19
-
20
- Example:
21
- >>> self = SSDVGG(input_size=300, depth=11)
22
- >>> self.eval()
23
- >>> inputs = torch.rand(1, 3, 300, 300)
24
- >>> level_outputs = self.forward(inputs)
25
- >>> for level_out in level_outputs:
26
- ... print(tuple(level_out.shape))
27
- (1, 1024, 19, 19)
28
- (1, 512, 10, 10)
29
- (1, 256, 5, 5)
30
- (1, 256, 3, 3)
31
- (1, 256, 1, 1)
32
- """
33
- extra_setting = {
34
- 300: (256, 'S', 512, 128, 'S', 256, 128, 256, 128, 256),
35
- 512: (256, 'S', 512, 128, 'S', 256, 128, 'S', 256, 128, 'S', 256, 128),
36
- }
37
-
38
- def __init__(self,
39
- input_size,
40
- depth,
41
- with_last_pool=False,
42
- ceil_mode=True,
43
- out_indices=(3, 4),
44
- out_feature_indices=(22, 34),
45
- l2_norm_scale=20.):
46
- # TODO: in_channels for mmcv.VGG
47
- super(SSDVGG, self).__init__(
48
- depth,
49
- with_last_pool=with_last_pool,
50
- ceil_mode=ceil_mode,
51
- out_indices=out_indices)
52
- assert input_size in (300, 512)
53
- self.input_size = input_size
54
-
55
- self.features.add_module(
56
- str(len(self.features)),
57
- nn.MaxPool2d(kernel_size=3, stride=1, padding=1))
58
- self.features.add_module(
59
- str(len(self.features)),
60
- nn.Conv2d(512, 1024, kernel_size=3, padding=6, dilation=6))
61
- self.features.add_module(
62
- str(len(self.features)), nn.ReLU(inplace=True))
63
- self.features.add_module(
64
- str(len(self.features)), nn.Conv2d(1024, 1024, kernel_size=1))
65
- self.features.add_module(
66
- str(len(self.features)), nn.ReLU(inplace=True))
67
- self.out_feature_indices = out_feature_indices
68
-
69
- self.inplanes = 1024
70
- self.extra = self._make_extra_layers(self.extra_setting[input_size])
71
- self.l2_norm = L2Norm(
72
- self.features[out_feature_indices[0] - 1].out_channels,
73
- l2_norm_scale)
74
-
75
- def init_weights(self, pretrained=None):
76
- """Initialize the weights in backbone.
77
-
78
- Args:
79
- pretrained (str, optional): Path to pre-trained weights.
80
- Defaults to None.
81
- """
82
- if isinstance(pretrained, str):
83
- logger = get_root_logger()
84
- load_checkpoint(self, pretrained, strict=False, logger=logger)
85
- elif pretrained is None:
86
- for m in self.features.modules():
87
- if isinstance(m, nn.Conv2d):
88
- kaiming_init(m)
89
- elif isinstance(m, nn.BatchNorm2d):
90
- constant_init(m, 1)
91
- elif isinstance(m, nn.Linear):
92
- normal_init(m, std=0.01)
93
- else:
94
- raise TypeError('pretrained must be a str or None')
95
-
96
- for m in self.extra.modules():
97
- if isinstance(m, nn.Conv2d):
98
- xavier_init(m, distribution='uniform')
99
-
100
- constant_init(self.l2_norm, self.l2_norm.scale)
101
-
102
- def forward(self, x):
103
- """Forward function."""
104
- outs = []
105
- for i, layer in enumerate(self.features):
106
- x = layer(x)
107
- if i in self.out_feature_indices:
108
- outs.append(x)
109
- for i, layer in enumerate(self.extra):
110
- x = F.relu(layer(x), inplace=True)
111
- if i % 2 == 1:
112
- outs.append(x)
113
- outs[0] = self.l2_norm(outs[0])
114
- if len(outs) == 1:
115
- return outs[0]
116
- else:
117
- return tuple(outs)
118
-
119
- def _make_extra_layers(self, outplanes):
120
- layers = []
121
- kernel_sizes = (1, 3)
122
- num_layers = 0
123
- outplane = None
124
- for i in range(len(outplanes)):
125
- if self.inplanes == 'S':
126
- self.inplanes = outplane
127
- continue
128
- k = kernel_sizes[num_layers % 2]
129
- if outplanes[i] == 'S':
130
- outplane = outplanes[i + 1]
131
- conv = nn.Conv2d(
132
- self.inplanes, outplane, k, stride=2, padding=1)
133
- else:
134
- outplane = outplanes[i]
135
- conv = nn.Conv2d(
136
- self.inplanes, outplane, k, stride=1, padding=0)
137
- layers.append(conv)
138
- self.inplanes = outplanes[i]
139
- num_layers += 1
140
- if self.input_size == 512:
141
- layers.append(nn.Conv2d(self.inplanes, 256, 4, padding=1))
142
-
143
- return nn.Sequential(*layers)
144
-
145
-
146
- class L2Norm(nn.Module):
147
-
148
- def __init__(self, n_dims, scale=20., eps=1e-10):
149
- """L2 normalization layer.
150
-
151
- Args:
152
- n_dims (int): Number of dimensions to be normalized
153
- scale (float, optional): Defaults to 20..
154
- eps (float, optional): Used to avoid division by zero.
155
- Defaults to 1e-10.
156
- """
157
- super(L2Norm, self).__init__()
158
- self.n_dims = n_dims
159
- self.weight = nn.Parameter(torch.Tensor(self.n_dims))
160
- self.eps = eps
161
- self.scale = scale
162
-
163
- def forward(self, x):
164
- """Forward function."""
165
- # normalization layer convert to FP32 in FP16 training
166
- x_float = x.float()
167
- norm = x_float.pow(2).sum(1, keepdim=True).sqrt() + self.eps
168
- return (self.weight[None, :, None, None].float().expand_as(x_float) *
169
- x_float / norm).type_as(x)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Andy1621/uniformer_image_detection/mmdet/models/roi_heads/bbox_heads/scnet_bbox_head.py DELETED
@@ -1,76 +0,0 @@
1
- from mmdet.models.builder import HEADS
2
- from .convfc_bbox_head import ConvFCBBoxHead
3
-
4
-
5
- @HEADS.register_module()
6
- class SCNetBBoxHead(ConvFCBBoxHead):
7
- """BBox head for `SCNet <https://arxiv.org/abs/2012.10150>`_.
8
-
9
- This inherits ``ConvFCBBoxHead`` with modified forward() function, allow us
10
- to get intermediate shared feature.
11
- """
12
-
13
- def _forward_shared(self, x):
14
- """Forward function for shared part."""
15
- if self.num_shared_convs > 0:
16
- for conv in self.shared_convs:
17
- x = conv(x)
18
-
19
- if self.num_shared_fcs > 0:
20
- if self.with_avg_pool:
21
- x = self.avg_pool(x)
22
-
23
- x = x.flatten(1)
24
-
25
- for fc in self.shared_fcs:
26
- x = self.relu(fc(x))
27
-
28
- return x
29
-
30
- def _forward_cls_reg(self, x):
31
- """Forward function for classification and regression parts."""
32
- x_cls = x
33
- x_reg = x
34
-
35
- for conv in self.cls_convs:
36
- x_cls = conv(x_cls)
37
- if x_cls.dim() > 2:
38
- if self.with_avg_pool:
39
- x_cls = self.avg_pool(x_cls)
40
- x_cls = x_cls.flatten(1)
41
- for fc in self.cls_fcs:
42
- x_cls = self.relu(fc(x_cls))
43
-
44
- for conv in self.reg_convs:
45
- x_reg = conv(x_reg)
46
- if x_reg.dim() > 2:
47
- if self.with_avg_pool:
48
- x_reg = self.avg_pool(x_reg)
49
- x_reg = x_reg.flatten(1)
50
- for fc in self.reg_fcs:
51
- x_reg = self.relu(fc(x_reg))
52
-
53
- cls_score = self.fc_cls(x_cls) if self.with_cls else None
54
- bbox_pred = self.fc_reg(x_reg) if self.with_reg else None
55
-
56
- return cls_score, bbox_pred
57
-
58
- def forward(self, x, return_shared_feat=False):
59
- """Forward function.
60
-
61
- Args:
62
- x (Tensor): input features
63
- return_shared_feat (bool): If True, return cls-reg-shared feature.
64
-
65
- Return:
66
- out (tuple[Tensor]): contain ``cls_score`` and ``bbox_pred``,
67
- if ``return_shared_feat`` is True, append ``x_shared`` to the
68
- returned tuple.
69
- """
70
- x_shared = self._forward_shared(x)
71
- out = self._forward_cls_reg(x_shared)
72
-
73
- if return_shared_feat:
74
- out += (x_shared, )
75
-
76
- return out
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Anonymous-sub/Rerender/ControlNet/annotator/uniformer/mmcv/cnn/utils/sync_bn.py DELETED
@@ -1,59 +0,0 @@
1
- import torch
2
-
3
- import annotator.uniformer.mmcv as mmcv
4
-
5
-
6
- class _BatchNormXd(torch.nn.modules.batchnorm._BatchNorm):
7
- """A general BatchNorm layer without input dimension check.
8
-
9
- Reproduced from @kapily's work:
10
- (https://github.com/pytorch/pytorch/issues/41081#issuecomment-783961547)
11
- The only difference between BatchNorm1d, BatchNorm2d, BatchNorm3d, etc
12
- is `_check_input_dim` that is designed for tensor sanity checks.
13
- The check has been bypassed in this class for the convenience of converting
14
- SyncBatchNorm.
15
- """
16
-
17
- def _check_input_dim(self, input):
18
- return
19
-
20
-
21
- def revert_sync_batchnorm(module):
22
- """Helper function to convert all `SyncBatchNorm` (SyncBN) and
23
- `mmcv.ops.sync_bn.SyncBatchNorm`(MMSyncBN) layers in the model to
24
- `BatchNormXd` layers.
25
-
26
- Adapted from @kapily's work:
27
- (https://github.com/pytorch/pytorch/issues/41081#issuecomment-783961547)
28
-
29
- Args:
30
- module (nn.Module): The module containing `SyncBatchNorm` layers.
31
-
32
- Returns:
33
- module_output: The converted module with `BatchNormXd` layers.
34
- """
35
- module_output = module
36
- module_checklist = [torch.nn.modules.batchnorm.SyncBatchNorm]
37
- if hasattr(mmcv, 'ops'):
38
- module_checklist.append(mmcv.ops.SyncBatchNorm)
39
- if isinstance(module, tuple(module_checklist)):
40
- module_output = _BatchNormXd(module.num_features, module.eps,
41
- module.momentum, module.affine,
42
- module.track_running_stats)
43
- if module.affine:
44
- # no_grad() may not be needed here but
45
- # just to be consistent with `convert_sync_batchnorm()`
46
- with torch.no_grad():
47
- module_output.weight = module.weight
48
- module_output.bias = module.bias
49
- module_output.running_mean = module.running_mean
50
- module_output.running_var = module.running_var
51
- module_output.num_batches_tracked = module.num_batches_tracked
52
- module_output.training = module.training
53
- # qconfig exists in quantized models
54
- if hasattr(module, 'qconfig'):
55
- module_output.qconfig = module.qconfig
56
- for name, child in module.named_children():
57
- module_output.add_module(name, revert_sync_batchnorm(child))
58
- del module
59
- return module_output
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Anonymous-sub/Rerender/ControlNet/annotator/uniformer/mmseg/datasets/pipelines/test_time_aug.py DELETED
@@ -1,133 +0,0 @@
1
- import warnings
2
-
3
- import annotator.uniformer.mmcv as mmcv
4
-
5
- from ..builder import PIPELINES
6
- from .compose import Compose
7
-
8
-
9
- @PIPELINES.register_module()
10
- class MultiScaleFlipAug(object):
11
- """Test-time augmentation with multiple scales and flipping.
12
-
13
- An example configuration is as followed:
14
-
15
- .. code-block::
16
-
17
- img_scale=(2048, 1024),
18
- img_ratios=[0.5, 1.0],
19
- flip=True,
20
- transforms=[
21
- dict(type='Resize', keep_ratio=True),
22
- dict(type='RandomFlip'),
23
- dict(type='Normalize', **img_norm_cfg),
24
- dict(type='Pad', size_divisor=32),
25
- dict(type='ImageToTensor', keys=['img']),
26
- dict(type='Collect', keys=['img']),
27
- ]
28
-
29
- After MultiScaleFLipAug with above configuration, the results are wrapped
30
- into lists of the same length as followed:
31
-
32
- .. code-block::
33
-
34
- dict(
35
- img=[...],
36
- img_shape=[...],
37
- scale=[(1024, 512), (1024, 512), (2048, 1024), (2048, 1024)]
38
- flip=[False, True, False, True]
39
- ...
40
- )
41
-
42
- Args:
43
- transforms (list[dict]): Transforms to apply in each augmentation.
44
- img_scale (None | tuple | list[tuple]): Images scales for resizing.
45
- img_ratios (float | list[float]): Image ratios for resizing
46
- flip (bool): Whether apply flip augmentation. Default: False.
47
- flip_direction (str | list[str]): Flip augmentation directions,
48
- options are "horizontal" and "vertical". If flip_direction is list,
49
- multiple flip augmentations will be applied.
50
- It has no effect when flip == False. Default: "horizontal".
51
- """
52
-
53
- def __init__(self,
54
- transforms,
55
- img_scale,
56
- img_ratios=None,
57
- flip=False,
58
- flip_direction='horizontal'):
59
- self.transforms = Compose(transforms)
60
- if img_ratios is not None:
61
- img_ratios = img_ratios if isinstance(img_ratios,
62
- list) else [img_ratios]
63
- assert mmcv.is_list_of(img_ratios, float)
64
- if img_scale is None:
65
- # mode 1: given img_scale=None and a range of image ratio
66
- self.img_scale = None
67
- assert mmcv.is_list_of(img_ratios, float)
68
- elif isinstance(img_scale, tuple) and mmcv.is_list_of(
69
- img_ratios, float):
70
- assert len(img_scale) == 2
71
- # mode 2: given a scale and a range of image ratio
72
- self.img_scale = [(int(img_scale[0] * ratio),
73
- int(img_scale[1] * ratio))
74
- for ratio in img_ratios]
75
- else:
76
- # mode 3: given multiple scales
77
- self.img_scale = img_scale if isinstance(img_scale,
78
- list) else [img_scale]
79
- assert mmcv.is_list_of(self.img_scale, tuple) or self.img_scale is None
80
- self.flip = flip
81
- self.img_ratios = img_ratios
82
- self.flip_direction = flip_direction if isinstance(
83
- flip_direction, list) else [flip_direction]
84
- assert mmcv.is_list_of(self.flip_direction, str)
85
- if not self.flip and self.flip_direction != ['horizontal']:
86
- warnings.warn(
87
- 'flip_direction has no effect when flip is set to False')
88
- if (self.flip
89
- and not any([t['type'] == 'RandomFlip' for t in transforms])):
90
- warnings.warn(
91
- 'flip has no effect when RandomFlip is not in transforms')
92
-
93
- def __call__(self, results):
94
- """Call function to apply test time augment transforms on results.
95
-
96
- Args:
97
- results (dict): Result dict contains the data to transform.
98
-
99
- Returns:
100
- dict[str: list]: The augmented data, where each value is wrapped
101
- into a list.
102
- """
103
-
104
- aug_data = []
105
- if self.img_scale is None and mmcv.is_list_of(self.img_ratios, float):
106
- h, w = results['img'].shape[:2]
107
- img_scale = [(int(w * ratio), int(h * ratio))
108
- for ratio in self.img_ratios]
109
- else:
110
- img_scale = self.img_scale
111
- flip_aug = [False, True] if self.flip else [False]
112
- for scale in img_scale:
113
- for flip in flip_aug:
114
- for direction in self.flip_direction:
115
- _results = results.copy()
116
- _results['scale'] = scale
117
- _results['flip'] = flip
118
- _results['flip_direction'] = direction
119
- data = self.transforms(_results)
120
- aug_data.append(data)
121
- # list of dict to dict of list
122
- aug_data_dict = {key: [] for key in aug_data[0]}
123
- for data in aug_data:
124
- for key, val in data.items():
125
- aug_data_dict[key].append(val)
126
- return aug_data_dict
127
-
128
- def __repr__(self):
129
- repr_str = self.__class__.__name__
130
- repr_str += f'(transforms={self.transforms}, '
131
- repr_str += f'img_scale={self.img_scale}, flip={self.flip})'
132
- repr_str += f'flip_direction={self.flip_direction}'
133
- return repr_str
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/ArkanDash/rvc-models/config.py DELETED
@@ -1,88 +0,0 @@
1
- ########################硬件参数########################
2
-
3
- # 填写cuda:x, cpu 或 mps, x指代第几张卡,只支持 N卡 / Apple Silicon 加速
4
- device = "cuda:0"
5
-
6
- # 9-10-20-30-40系显卡无脑True,不影响质量,>=20显卡开启有加速
7
- is_half = True
8
-
9
- # 默认0用上所有线程,写数字限制CPU资源使用
10
- n_cpu = 0
11
-
12
- ########################硬件参数########################
13
-
14
-
15
- ##################下为参数处理逻辑,勿动##################
16
-
17
- ########################命令行参数########################
18
- import argparse
19
-
20
- parser = argparse.ArgumentParser()
21
- parser.add_argument("--port", type=int, default=7865, help="Listen port")
22
- parser.add_argument("--pycmd", type=str, default="python", help="Python command")
23
- parser.add_argument("--colab", action="store_true", help="Launch in colab")
24
- parser.add_argument(
25
- "--noparallel", action="store_true", help="Disable parallel processing"
26
- )
27
- parser.add_argument(
28
- "--noautoopen", action="store_true", help="Do not open in browser automatically"
29
- )
30
- cmd_opts, unknown = parser.parse_known_args()
31
-
32
- python_cmd = cmd_opts.pycmd
33
- listen_port = cmd_opts.port
34
- iscolab = cmd_opts.colab
35
- noparallel = cmd_opts.noparallel
36
- noautoopen = cmd_opts.noautoopen
37
- ########################命令行参数########################
38
-
39
- import sys
40
- import torch
41
-
42
-
43
- # has_mps is only available in nightly pytorch (for now) and MasOS 12.3+.
44
- # check `getattr` and try it for compatibility
45
- def has_mps() -> bool:
46
- if sys.platform != "darwin":
47
- return False
48
- else:
49
- if not getattr(torch, "has_mps", False):
50
- return False
51
- try:
52
- torch.zeros(1).to(torch.device("mps"))
53
- return True
54
- except Exception:
55
- return False
56
-
57
-
58
- if not torch.cuda.is_available():
59
- if has_mps():
60
- print("没有发现支持的N卡, 使用MPS进行推理")
61
- device = "mps"
62
- else:
63
- print("没有发现支持的N卡, 使用CPU进行推理")
64
- device = "cpu"
65
- is_half = False
66
-
67
- if device not in ["cpu", "mps"]:
68
- gpu_name = torch.cuda.get_device_name(int(device.split(":")[-1]))
69
- if "16" in gpu_name or "MX" in gpu_name:
70
- print("16系显卡/MX系显卡强制单精度")
71
- is_half = False
72
-
73
- from multiprocessing import cpu_count
74
-
75
- if n_cpu == 0:
76
- n_cpu = cpu_count()
77
- if is_half:
78
- # 6G显存配置
79
- x_pad = 3
80
- x_query = 10
81
- x_center = 60
82
- x_max = 65
83
- else:
84
- # 5G显存配置
85
- x_pad = 1
86
- x_query = 6
87
- x_center = 38
88
- x_max = 41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Artrajz/vits-simple-api/static/js/jquery.slim.min.js DELETED
@@ -1,2 +0,0 @@
1
- /*! jQuery v3.5.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-deprecated/ajax-event-alias,-effects,-effects/Tween,-effects/animatedSelector | (c) JS Foundation and other contributors | jquery.org/license */
2
- !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(g,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,v=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),m={},b=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},w=g.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function C(e,t,n){var r,i,o=(n=n||w).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function T(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-deprecated/ajax-event-alias,-effects,-effects/Tween,-effects/animatedSelector",E=function(e,t){return new E.fn.init(e,t)};function d(e){var t=!!e&&"length"in e&&e.length,n=T(e);return!b(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}E.fn=E.prototype={jquery:f,constructor:E,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=E.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return E.each(this,e)},map:function(n){return this.pushStack(E.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(E.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(E.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},E.extend=E.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||b(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(E.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||E.isPlainObject(n)?n:{},i=!1,a[t]=E.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},E.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=y.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){C(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(d(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(d(Object(e))?E.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(d(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return v(a)},guid:1,support:m}),"function"==typeof Symbol&&(E.fn[Symbol.iterator]=t[Symbol.iterator]),E.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var p=function(n){var e,p,x,o,i,h,f,g,w,u,l,C,T,a,E,v,s,c,y,A="sizzle"+1*new Date,d=n.document,N=0,r=0,m=ue(),b=ue(),S=ue(),k=ue(),D=function(e,t){return e===t&&(l=!0),0},L={}.hasOwnProperty,t=[],j=t.pop,q=t.push,O=t.push,P=t.slice,H=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},I="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",R="[\\x20\\t\\r\\n\\f]",B="(?:\\\\[\\da-fA-F]{1,6}"+R+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",M="\\["+R+"*("+B+")(?:"+R+"*([*^$|!~]?=)"+R+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+B+"))|)"+R+"*\\]",W=":("+B+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",F=new RegExp(R+"+","g"),$=new RegExp("^"+R+"+|((?:^|[^\\\\])(?:\\\\.)*)"+R+"+$","g"),z=new RegExp("^"+R+"*,"+R+"*"),_=new RegExp("^"+R+"*([>+~]|"+R+")"+R+"*"),U=new RegExp(R+"|>"),V=new RegExp(W),X=new RegExp("^"+B+"$"),Q={ID:new RegExp("^#("+B+")"),CLASS:new RegExp("^\\.("+B+")"),TAG:new RegExp("^("+B+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+I+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,G=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+R+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){C()},ae=xe(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{O.apply(t=P.call(d.childNodes),d.childNodes),t[d.childNodes.length].nodeType}catch(e){O={apply:t.length?function(e,t){q.apply(e,P.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,d=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==d&&9!==d&&11!==d)return n;if(!r&&(C(e),e=e||T,E)){if(11!==d&&(u=Z.exec(t)))if(i=u[1]){if(9===d){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return O.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&p.getElementsByClassName&&e.getElementsByClassName)return O.apply(n,e.getElementsByClassName(i)),n}if(p.qsa&&!k[t+" "]&&(!v||!v.test(t))&&(1!==d||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===d&&(U.test(t)||_.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&p.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=A)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+be(l[o]);c=l.join(",")}try{return O.apply(n,f.querySelectorAll(c)),n}catch(e){k(t,!0)}finally{s===A&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>x.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[A]=!0,e}function ce(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)x.attrHandle[n[r]]=t}function de(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function pe(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in p=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},C=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:d;return r!=T&&9===r.nodeType&&r.documentElement&&(a=(T=r).documentElement,E=!i(T),d!=T&&(n=T.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),p.scope=ce(function(e){return a.appendChild(e).appendChild(T.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),p.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),p.getElementsByTagName=ce(function(e){return e.appendChild(T.createComment("")),!e.getElementsByTagName("*").length}),p.getElementsByClassName=J.test(T.getElementsByClassName),p.getById=ce(function(e){return a.appendChild(e).id=A,!T.getElementsByName||!T.getElementsByName(A).length}),p.getById?(x.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},x.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(x.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},x.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),x.find.TAG=p.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):p.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},x.find.CLASS=p.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(p.qsa=J.test(T.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+A+"'></a><select id='"+A+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+R+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+R+"*(?:value|"+I+")"),e.querySelectorAll("[id~="+A+"-]").length||v.push("~="),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+R+"*name"+R+"*="+R+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+A+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=T.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+R+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(p.matchesSelector=J.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){p.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",W)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=J.test(a.compareDocumentPosition),y=t||J.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!p.sortDetached&&t.compareDocumentPosition(e)===n?e==T||e.ownerDocument==d&&y(d,e)?-1:t==T||t.ownerDocument==d&&y(d,t)?1:u?H(u,e)-H(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==T?-1:t==T?1:i?-1:o?1:u?H(u,e)-H(u,t):0;if(i===o)return de(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?de(a[r],s[r]):a[r]==d?-1:s[r]==d?1:0}),T},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(C(e),p.matchesSelector&&E&&!k[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||p.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){k(t,!0)}return 0<se(t,T,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=T&&C(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=T&&C(e);var n=x.attrHandle[t.toLowerCase()],r=n&&L.call(x.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:p.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!p.detectDuplicates,u=!p.sortStable&&e.slice(0),e.sort(D),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(x=se.selectors={cacheLength:50,createPseudo:le,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&V.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+R+")"+e+"("+R+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(F," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),b="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=b&&e.nodeName.toLowerCase(),d=!n&&!b,p=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(b?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&d){p=(s=(r=(i=(o=(a=c)[A]||(a[A]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===N&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(p=s=0)||u.pop())if(1===a.nodeType&&++p&&a===e){i[h]=[N,s,p];break}}else if(d&&(p=s=(r=(i=(o=(a=e)[A]||(a[A]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===N&&r[1]),!1===p)while(a=++s&&a&&a[l]||(p=s=0)||u.pop())if((b?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++p&&(d&&((i=(o=a[A]||(a[A]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[N,p]),a===e))break;return(p-=v)===g||p%g==0&&0<=p/g}}},PSEUDO:function(e,o){var t,a=x.pseudos[e]||x.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[A]?a(o):1<a.length?(t=[e,e,"",o],x.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=H(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace($,"$1"));return s[A]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return X.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===T.activeElement&&(!T.hasFocus||T.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!x.pseudos.empty(e)},header:function(e){return K.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=x.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})x.pseudos[e]=pe(e);for(e in{submit:!0,reset:!0})x.pseudos[e]=he(e);function me(){}function be(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function xe(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,d=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[N,d];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[A]||(e[A]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===N&&r[1]===d)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Ce(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Te(p,h,g,v,y,e){return v&&!v[A]&&(v=Te(v)),y&&!y[A]&&(y=Te(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!p||!e&&h?c:Ce(c,s,p,n,r),d=g?y||(e?p:l||v)?[]:t:f;if(g&&g(f,d,n,r),v){i=Ce(d,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(d[u[o]]=!(f[u[o]]=a))}if(e){if(y||p){if(y){i=[],o=d.length;while(o--)(a=d[o])&&i.push(f[o]=a);y(null,d=[],i,r)}o=d.length;while(o--)(a=d[o])&&-1<(i=y?H(e,a):s[o])&&(e[i]=!(t[i]=a))}}else d=Ce(d===t?d.splice(l,d.length):d),y?y(null,t,d,r):O.apply(t,d)})}function Ee(e){for(var i,t,n,r=e.length,o=x.relative[e[0].type],a=o||x.relative[" "],s=o?1:0,u=xe(function(e){return e===i},a,!0),l=xe(function(e){return-1<H(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=x.relative[e[s].type])c=[xe(we(c),t)];else{if((t=x.filter[e[s].type].apply(null,e[s].matches))[A]){for(n=++s;n<r;n++)if(x.relative[e[n].type])break;return Te(1<s&&we(c),1<s&&be(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&be(e))}c.push(t)}return we(c)}return me.prototype=x.filters=x.pseudos,x.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=b[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=x.preFilter;while(a){for(o in n&&!(r=z.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=_.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace($," ")}),a=a.slice(n.length)),x.filter)!(r=Q[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):b(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,b,r,i=[],o=[],a=S[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[A]?i.push(a):o.push(a);(a=S(e,(v=o,m=0<(y=i).length,b=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],d=w,p=e||b&&x.find.TAG("*",i),h=N+=null==d?1:Math.random()||.1,g=p.length;for(i&&(w=t==T||t||i);l!==g&&null!=(o=p[l]);l++){if(b&&o){a=0,t||o.ownerDocument==T||(C(o),n=!E);while(s=v[a++])if(s(o,t||T,n)){r.push(o);break}i&&(N=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=j.call(r));f=Ce(f)}O.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(N=h,w=d),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&x.relative[o[1].type]){if(!(t=(x.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=Q.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],x.relative[s=a.type])break;if((u=x.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&be(o)))return O.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},p.sortStable=A.split("").sort(D).join("")===A,p.detectDuplicates=!!l,C(),p.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(T.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),p.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(I,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(g);E.find=p,E.expr=p.selectors,E.expr[":"]=E.expr.pseudos,E.uniqueSort=E.unique=p.uniqueSort,E.text=p.getText,E.isXMLDoc=p.isXML,E.contains=p.contains,E.escapeSelector=p.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&E(e).is(n))break;r.push(e)}return r},A=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},N=E.expr.match.needsContext;function S(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var k=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return b(n)?E.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?E.grep(e,function(e){return e===n!==r}):"string"!=typeof n?E.grep(e,function(e){return-1<i.call(n,e)!==r}):E.filter(n,e,r)}E.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?E.find.matchesSelector(r,e)?[r]:[]:E.find.matches(e,E.grep(t,function(e){return 1===e.nodeType}))},E.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(E(e).filter(function(){for(t=0;t<r;t++)if(E.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)E.find(e,i[t],n);return 1<r?E.uniqueSort(n):n},filter:function(e){return this.pushStack(D(this,e||[],!1))},not:function(e){return this.pushStack(D(this,e||[],!0))},is:function(e){return!!D(this,"string"==typeof e&&N.test(e)?E(e):e||[],!1).length}});var L,j=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(E.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||L,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:j.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:w,!0)),k.test(r[1])&&E.isPlainObject(t))for(r in t)b(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=w.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):b(e)?void 0!==n.ready?n.ready(e):e(E):E.makeArray(e,this)}).prototype=E.fn,L=E(w);var q=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(E.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&E(e);if(!N.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&E.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?E.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(E(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(E.uniqueSort(E.merge(this.get(),E(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),E.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return A((e.parentNode||{}).firstChild,e)},children:function(e){return A(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(S(e,"template")&&(e=e.content||e),E.merge([],e.childNodes))}},function(r,i){E.fn[r]=function(e,t){var n=E.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=E.filter(t,n)),1<this.length&&(O[r]||E.uniqueSort(n),q.test(r)&&n.reverse()),this.pushStack(n)}});var H=/[^\x20\t\r\n\f]+/g;function I(e){return e}function R(e){throw e}function B(e,t,n,r){var i;try{e&&b(i=e.promise)?i.call(e).done(t).fail(n):e&&b(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}E.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},E.each(e.match(H)||[],function(e,t){n[t]=!0}),n):E.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){E.each(e,function(e,t){b(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==T(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return E.each(arguments,function(e,t){var n;while(-1<(n=E.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<E.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},E.extend({Deferred:function(e){var o=[["notify","progress",E.Callbacks("memory"),E.Callbacks("memory"),2],["resolve","done",E.Callbacks("once memory"),E.Callbacks("once memory"),0,"resolved"],["reject","fail",E.Callbacks("once memory"),E.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return E.Deferred(function(r){E.each(o,function(e,t){var n=b(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&b(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,b(t)?s?t.call(e,l(u,o,I,s),l(u,o,R,s)):(u++,t.call(e,l(u,o,I,s),l(u,o,R,s),l(u,o,I,o.notifyWith))):(a!==I&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){E.Deferred.exceptionHook&&E.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==R&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(E.Deferred.getStackHook&&(t.stackTrace=E.Deferred.getStackHook()),g.setTimeout(t))}}return E.Deferred(function(e){o[0][3].add(l(0,e,b(r)?r:I,e.notifyWith)),o[1][3].add(l(0,e,b(t)?t:I)),o[2][3].add(l(0,e,b(n)?n:R))}).promise()},promise:function(e){return null!=e?E.extend(e,a):a}},s={};return E.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=E.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(B(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||b(i[t]&&i[t].then)))return o.then();while(t--)B(i[t],a(t),o.reject);return o.promise()}});var M=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;E.Deferred.exceptionHook=function(e,t){g.console&&g.console.warn&&e&&M.test(e.name)&&g.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},E.readyException=function(e){g.setTimeout(function(){throw e})};var W=E.Deferred();function F(){w.removeEventListener("DOMContentLoaded",F),g.removeEventListener("load",F),E.ready()}E.fn.ready=function(e){return W.then(e)["catch"](function(e){E.readyException(e)}),this},E.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--E.readyWait:E.isReady)||(E.isReady=!0)!==e&&0<--E.readyWait||W.resolveWith(w,[E])}}),E.ready.then=W.then,"complete"===w.readyState||"loading"!==w.readyState&&!w.documentElement.doScroll?g.setTimeout(E.ready):(w.addEventListener("DOMContentLoaded",F),g.addEventListener("load",F));var $=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===T(n))for(s in i=!0,n)$(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,b(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(E(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},z=/^-ms-/,_=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function V(e){return e.replace(z,"ms-").replace(_,U)}var X=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Q(){this.expando=E.expando+Q.uid++}Q.uid=1,Q.prototype={cache:function(e){var t=e[this.expando];return t||(t={},X(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[V(t)]=n;else for(r in t)i[V(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][V(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(V):(t=V(t))in r?[t]:t.match(H)||[]).length;while(n--)delete r[t[n]]}(void 0===t||E.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!E.isEmptyObject(t)}};var Y=new Q,G=new Q,K=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,J=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(J,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:K.test(i)?JSON.parse(i):i)}catch(e){}G.set(e,t,n)}else n=void 0;return n}E.extend({hasData:function(e){return G.hasData(e)||Y.hasData(e)},data:function(e,t,n){return G.access(e,t,n)},removeData:function(e,t){G.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),E.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=G.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=V(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){G.set(this,n)}):$(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=G.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){G.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){G.remove(this,e)})}}),E.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,E.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=E.queue(e,t),r=n.length,i=n.shift(),o=E._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){E.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:E.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),E.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?E.queue(this[0],t):void 0===n?this:this.each(function(){var e=E.queue(this,t,n);E._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&E.dequeue(this,t)})},dequeue:function(e){return this.each(function(){E.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=E.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=w.documentElement,ie=function(e){return E.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return E.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===E.css(e,"display")};var se={};function ue(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=se[s])||(o=a.body.appendChild(a.createElement(s)),u=E.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),se[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}E.fn.extend({show:function(){return ue(this,!0)},hide:function(){return ue(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?E(this).show():E(this).hide()})}});var le,ce,fe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,pe=/^$|^module$|\/(?:java|ecma)script/i;le=w.createDocumentFragment().appendChild(w.createElement("div")),(ce=w.createElement("input")).setAttribute("type","radio"),ce.setAttribute("checked","checked"),ce.setAttribute("name","t"),le.appendChild(ce),m.checkClone=le.cloneNode(!0).cloneNode(!0).lastChild.checked,le.innerHTML="<textarea>x</textarea>",m.noCloneChecked=!!le.cloneNode(!0).lastChild.defaultValue,le.innerHTML="<option></option>",m.option=!!le.lastChild;var he={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ge(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&S(e,t)?E.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}he.tbody=he.tfoot=he.colgroup=he.caption=he.thead,he.th=he.td,m.option||(he.optgroup=he.option=[1,"<select multiple='multiple'>","</select>"]);var ye=/<|&#?\w+;/;function me(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),d=[],p=0,h=e.length;p<h;p++)if((o=e[p])||0===o)if("object"===T(o))E.merge(d,o.nodeType?[o]:o);else if(ye.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=he[s]||he._default,a.innerHTML=u[1]+E.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;E.merge(d,a.childNodes),(a=f.firstChild).textContent=""}else d.push(t.createTextNode(o));f.textContent="",p=0;while(o=d[p++])if(r&&-1<E.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ge(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])pe.test(o.type||"")&&n.push(o)}return f}var be=/^key/,xe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,we=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function Te(){return!1}function Ee(e,t){return e===function(){try{return w.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return E().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=E.guid++)),e.each(function(){E.event.add(this,t,i,r,n)})}function Ne(e,i,o){o?(Y.set(e,i,!1),E.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(E.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Y.set(this,i,{value:E.event.trigger(E.extend(r[0],E.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&E.event.add(e,i,Ce)}E.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,v=Y.get(t);if(X(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&E.find.matchesSelector(re,i),n.guid||(n.guid=E.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof E&&E.event.triggered!==e.type?E.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(H)||[""]).length;while(l--)p=g=(s=we.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),p&&(f=E.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=E.event.special[p]||{},c=E.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&E.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=u[p])||((d=u[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(p,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),E.event.global[p]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,d,p,h,g,v=Y.hasData(e)&&Y.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(H)||[""]).length;while(l--)if(p=g=(s=we.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),p){f=E.event.special[p]||{},d=u[p=(r?f.delegateType:f.bindType)||p]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;while(o--)c=d[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||E.removeEvent(e,p,v.handle),delete u[p])}else for(p in u)E.event.remove(e,p+t[l],n,r,!0);E.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=E.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=E.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=E.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((E.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<E(i,this).index(l):E.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(E.Event.prototype,t,{enumerable:!0,configurable:!0,get:b(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[E.expando]?e:new E.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return fe.test(t.type)&&t.click&&S(t,"input")&&Ne(t,"click",Ce),!1},trigger:function(e){var t=this||e;return fe.test(t.type)&&t.click&&S(t,"input")&&Ne(t,"click"),!0},_default:function(e){var t=e.target;return fe.test(t.type)&&t.click&&S(t,"input")&&Y.get(t,"click")||S(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},E.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},E.Event=function(e,t){if(!(this instanceof E.Event))return new E.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ce:Te,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&E.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[E.expando]=!0},E.Event.prototype={constructor:E.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ce,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ce,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ce,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},E.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&be.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&xe.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},E.event.addProp),E.each({focus:"focusin",blur:"focusout"},function(e,t){E.event.special[e]={setup:function(){return Ne(this,e,Ee),!1},trigger:function(){return Ne(this,e),!0},delegateType:t}}),E.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){E.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||E.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),E.fn.extend({on:function(e,t,n,r){return Ae(this,e,t,n,r)},one:function(e,t,n,r){return Ae(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,E(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each(function(){E.event.remove(this,e,n,t)})}});var Se=/<script|<style|<link/i,ke=/checked\s*(?:[^=]|=\s*.checked.)/i,De=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Le(e,t){return S(e,"table")&&S(11!==t.nodeType?t:t.firstChild,"tr")&&E(e).children("tbody")[0]||e}function je(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)E.event.add(t,i,s[i][n]);G.hasData(e)&&(o=G.access(e),a=E.extend({},o),G.set(t,a))}}function Pe(n,r,i,o){r=v(r);var e,t,a,s,u,l,c=0,f=n.length,d=f-1,p=r[0],h=b(p);if(h||1<f&&"string"==typeof p&&!m.checkClone&&ke.test(p))return n.each(function(e){var t=n.eq(e);h&&(r[0]=p.call(this,e,t.html())),Pe(t,r,i,o)});if(f&&(t=(e=me(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=E.map(ge(e,"script"),je)).length;c<f;c++)u=e,c!==d&&(u=E.clone(u,!0,!0),s&&E.merge(a,ge(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,E.map(a,qe),c=0;c<s;c++)u=a[c],pe.test(u.type||"")&&!Y.access(u,"globalEval")&&E.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?E._evalUrl&&!u.noModule&&E._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):C(u.textContent.replace(De,""),u,l))}return n}function He(e,t,n){for(var r,i=t?E.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||E.cleanData(ge(r)),r.parentNode&&(n&&ie(r)&&ve(ge(r,"script")),r.parentNode.removeChild(r));return e}E.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(m.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||E.isXMLDoc(e)))for(a=ge(c),r=0,i=(o=ge(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&fe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ge(e),a=a||ge(c),r=0,i=o.length;r<i;r++)Oe(o[r],a[r]);else Oe(e,c);return 0<(a=ge(c,"script")).length&&ve(a,!f&&ge(e,"script")),c},cleanData:function(e){for(var t,n,r,i=E.event.special,o=0;void 0!==(n=e[o]);o++)if(X(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?E.event.remove(n,r):E.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[G.expando]&&(n[G.expando]=void 0)}}}),E.fn.extend({detach:function(e){return He(this,e,!0)},remove:function(e){return He(this,e)},text:function(e){return $(this,function(e){return void 0===e?E.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Pe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return Pe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Pe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(E.cleanData(ge(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return E.clone(this,e,t)})},html:function(e){return $(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Se.test(e)&&!he[(de.exec(e)||["",""])[1].toLowerCase()]){e=E.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(E.cleanData(ge(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Pe(this,arguments,function(e){var t=this.parentNode;E.inArray(this,n)<0&&(E.cleanData(ge(this)),t&&t.replaceChild(e,this))},n)}}),E.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){E.fn[e]=function(e){for(var t,n=[],r=E(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),E(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Ie=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Re=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=g),t.getComputedStyle(e)},Be=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Me=new RegExp(ne.join("|"),"i");function We(e,t,n){var r,i,o,a,s=e.style;return(n=n||Re(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||ie(e)||(a=E.style(e,t)),!m.pixelBoxStyles()&&Ie.test(a)&&Me.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function Fe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=g.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=w.createElement("div"),l=w.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",m.clearCloneStyle="content-box"===l.style.backgroundClip,E.extend(m,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=w.createElement("table"),t=w.createElement("tr"),n=w.createElement("div"),e.style.cssText="position:absolute;left:-11111px",t.style.height="1px",n.style.height="9px",re.appendChild(e).appendChild(t).appendChild(n),r=g.getComputedStyle(t),a=3<parseInt(r.height),re.removeChild(e)),a}}))}();var $e=["Webkit","Moz","ms"],ze=w.createElement("div").style,_e={};function Ue(e){var t=E.cssProps[e]||_e[e];return t||(e in ze?e:_e[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=$e.length;while(n--)if((e=$e[n]+t)in ze)return e}(e)||e)}var Ve,Xe,Qe=/^(none|table(?!-c[ea]).+)/,Ye=/^--/,Ge={position:"absolute",visibility:"hidden",display:"block"},Ke={letterSpacing:"0",fontWeight:"400"};function Je(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ze(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=E.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=E.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=E.css(e,"border"+ne[a]+"Width",!0,i))):(u+=E.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=E.css(e,"border"+ne[a]+"Width",!0,i):s+=E.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function et(e,t,n){var r=Re(e),i=(!m.boxSizingReliable()||n)&&"border-box"===E.css(e,"boxSizing",!1,r),o=i,a=We(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Ie.test(a)){if(!n)return a;a="auto"}return(!m.boxSizingReliable()&&i||!m.reliableTrDimensions()&&S(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===E.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===E.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Ze(e,t,n||(i?"border":"content"),o,r,a)+"px"}E.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=We(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=V(t),u=Ye.test(t),l=e.style;if(u||(t=Ue(s)),a=E.cssHooks[t]||E.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=function(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return E.css(e,t,"")},u=s(),l=n&&n[3]||(E.cssNumber[t]?"":"px"),c=e.nodeType&&(E.cssNumber[t]||"px"!==l&&+u)&&te.exec(E.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)E.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,E.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(E.cssNumber[s]?"":"px")),m.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=V(t);return Ye.test(t)||(t=Ue(s)),(a=E.cssHooks[t]||E.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=We(e,t,r)),"normal"===i&&t in Ke&&(i=Ke[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),E.each(["height","width"],function(e,u){E.cssHooks[u]={get:function(e,t,n){if(t)return!Qe.test(E.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,u,n):Be(e,Ge,function(){return et(e,u,n)})},set:function(e,t,n){var r,i=Re(e),o=!m.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===E.css(e,"boxSizing",!1,i),s=n?Ze(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Ze(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=E.css(e,u)),Je(0,t,s)}}}),E.cssHooks.marginLeft=Fe(m.reliableMarginLeft,function(e,t){if(t)return(parseFloat(We(e,"marginLeft"))||e.getBoundingClientRect().left-Be(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),E.each({margin:"",padding:"",border:"Width"},function(i,o){E.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(E.cssHooks[i+o].set=Je)}),E.fn.extend({css:function(e,t){return $(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Re(e),i=t.length;a<i;a++)o[t[a]]=E.css(e,t[a],!1,r);return o}return void 0!==n?E.style(e,t,n):E.css(e,t)},e,t,1<arguments.length)}}),E.fn.delay=function(r,e){return r=E.fx&&E.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=g.setTimeout(e,r);t.stop=function(){g.clearTimeout(n)}})},Ve=w.createElement("input"),Xe=w.createElement("select").appendChild(w.createElement("option")),Ve.type="checkbox",m.checkOn=""!==Ve.value,m.optSelected=Xe.selected,(Ve=w.createElement("input")).value="t",Ve.type="radio",m.radioValue="t"===Ve.value;var tt,nt=E.expr.attrHandle;E.fn.extend({attr:function(e,t){return $(this,E.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){E.removeAttr(this,e)})}}),E.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?E.prop(e,t,n):(1===o&&E.isXMLDoc(e)||(i=E.attrHooks[t.toLowerCase()]||(E.expr.match.bool.test(t)?tt:void 0)),void 0!==n?null===n?void E.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=E.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!m.radioValue&&"radio"===t&&S(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(H);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),tt={set:function(e,t,n){return!1===t?E.removeAttr(e,n):e.setAttribute(n,n),n}},E.each(E.expr.match.bool.source.match(/\w+/g),function(e,t){var a=nt[t]||E.find.attr;nt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=nt[o],nt[o]=r,r=null!=a(e,t,n)?o:null,nt[o]=i),r}});var rt=/^(?:input|select|textarea|button)$/i,it=/^(?:a|area)$/i;function ot(e){return(e.match(H)||[]).join(" ")}function at(e){return e.getAttribute&&e.getAttribute("class")||""}function st(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(H)||[]}E.fn.extend({prop:function(e,t){return $(this,E.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[E.propFix[e]||e]})}}),E.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&E.isXMLDoc(e)||(t=E.propFix[t]||t,i=E.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=E.find.attr(e,"tabindex");return t?parseInt(t,10):rt.test(e.nodeName)||it.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),m.optSelected||(E.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),E.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){E.propFix[this.toLowerCase()]=this}),E.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(b(t))return this.each(function(e){E(this).addClass(t.call(this,e,at(this)))});if((e=st(t)).length)while(n=this[u++])if(i=at(n),r=1===n.nodeType&&" "+ot(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=ot(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(b(t))return this.each(function(e){E(this).removeClass(t.call(this,e,at(this)))});if(!arguments.length)return this.attr("class","");if((e=st(t)).length)while(n=this[u++])if(i=at(n),r=1===n.nodeType&&" "+ot(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=ot(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):b(i)?this.each(function(e){E(this).toggleClass(i.call(this,e,at(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=E(this),r=st(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=at(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Y.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+ot(at(n))+" ").indexOf(t))return!0;return!1}});var ut=/\r/g;E.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=b(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,E(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=E.map(t,function(e){return null==e?"":e+""})),(r=E.valHooks[this.type]||E.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=E.valHooks[t.type]||E.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(ut,""):null==e?"":e:void 0}}),E.extend({valHooks:{option:{get:function(e){var t=E.find.attr(e,"value");return null!=t?t:ot(E.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!S(n.parentNode,"optgroup"))){if(t=E(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=E.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<E.inArray(E.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),E.each(["radio","checkbox"],function(){E.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<E.inArray(E(e).val(),t)}},m.checkOn||(E.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),m.focusin="onfocusin"in g;var lt=/^(?:focusinfocus|focusoutblur)$/,ct=function(e){e.stopPropagation()};E.extend(E.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,d=[n||w],p=y.call(e,"type")?e.type:e,h=y.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||w,3!==n.nodeType&&8!==n.nodeType&&!lt.test(p+E.event.triggered)&&(-1<p.indexOf(".")&&(p=(h=p.split(".")).shift(),h.sort()),u=p.indexOf(":")<0&&"on"+p,(e=e[E.expando]?e:new E.Event(p,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:E.makeArray(t,[e]),c=E.event.special[p]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||p,lt.test(s+p)||(o=o.parentNode);o;o=o.parentNode)d.push(o),a=o;a===(n.ownerDocument||w)&&d.push(a.defaultView||a.parentWindow||g)}i=0;while((o=d[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||p,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&X(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=p,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(d.pop(),t)||!X(n)||u&&b(n[p])&&!x(n)&&((a=n[u])&&(n[u]=null),E.event.triggered=p,e.isPropagationStopped()&&f.addEventListener(p,ct),n[p](),e.isPropagationStopped()&&f.removeEventListener(p,ct),E.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=E.extend(new E.Event,n,{type:e,isSimulated:!0});E.event.trigger(r,null,t)}}),E.fn.extend({trigger:function(e,t){return this.each(function(){E.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return E.event.trigger(e,t,n,!0)}}),m.focusin||E.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){E.event.simulate(r,e.target,E.event.fix(e))};E.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}}),E.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new g.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||E.error("Invalid XML: "+e),t};var ft,dt=/\[\]$/,pt=/\r?\n/g,ht=/^(?:submit|button|image|reset|file)$/i,gt=/^(?:input|select|textarea|keygen)/i;function vt(n,e,r,i){var t;if(Array.isArray(e))E.each(e,function(e,t){r||dt.test(n)?i(n,t):vt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==T(e))i(n,e);else for(t in e)vt(n+"["+t+"]",e[t],r,i)}E.param=function(e,t){var n,r=[],i=function(e,t){var n=b(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!E.isPlainObject(e))E.each(e,function(){i(this.name,this.value)});else for(n in e)vt(n,e[n],t,i);return r.join("&")},E.fn.extend({serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=E.prop(this,"elements");return e?E.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!E(this).is(":disabled")&&gt.test(this.nodeName)&&!ht.test(e)&&(this.checked||!fe.test(e))}).map(function(e,t){var n=E(this).val();return null==n?null:Array.isArray(n)?E.map(n,function(e){return{name:t.name,value:e.replace(pt,"\r\n")}}):{name:t.name,value:n.replace(pt,"\r\n")}}).get()}}),E.fn.extend({wrapAll:function(e){var t;return this[0]&&(b(e)&&(e=e.call(this[0])),t=E(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return b(n)?this.each(function(e){E(this).wrapInner(n.call(this,e))}):this.each(function(){var e=E(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=b(t);return this.each(function(e){E(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){E(this).replaceWith(this.childNodes)}),this}}),E.expr.pseudos.hidden=function(e){return!E.expr.pseudos.visible(e)},E.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},m.createHTMLDocument=((ft=w.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===ft.childNodes.length),E.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(m.createHTMLDocument?((r=(t=w.implementation.createHTMLDocument("")).createElement("base")).href=w.location.href,t.head.appendChild(r)):t=w),o=!n&&[],(i=k.exec(e))?[t.createElement(i[1])]:(i=me([e],t,o),o&&o.length&&E(o).remove(),E.merge([],i.childNodes)));var r,i,o},E.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=E.css(e,"position"),c=E(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=E.css(e,"top"),u=E.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),b(t)&&(t=t.call(e,n,E.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},E.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){E.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===E.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===E.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=E(e).offset()).top+=E.css(e,"borderTopWidth",!0),i.left+=E.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-E.css(r,"marginTop",!0),left:t.left-i.left-E.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===E.css(e,"position"))e=e.offsetParent;return e||re})}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;E.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),E.each(["top","left"],function(e,n){E.cssHooks[n]=Fe(m.pixelPosition,function(e,t){if(t)return t=We(e,n),Ie.test(t)?E(e).position()[n]+"px":t})}),E.each({Height:"height",Width:"width"},function(a,s){E.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){E.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?E.css(e,t,i):E.style(e,t,n,i)},s,n?e:void 0,n)}})}),E.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),E.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){E.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var yt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;E.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),b(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||E.guid++,i},E.holdReady=function(e){e?E.readyWait++:E.ready(!0)},E.isArray=Array.isArray,E.parseJSON=JSON.parse,E.nodeName=S,E.isFunction=b,E.isWindow=x,E.camelCase=V,E.type=T,E.now=Date.now,E.isNumeric=function(e){var t=E.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},E.trim=function(e){return null==e?"":(e+"").replace(yt,"")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return E});var mt=g.jQuery,bt=g.$;return E.noConflict=function(e){return g.$===E&&(g.$=bt),e&&g.jQuery===E&&(g.jQuery=mt),E},"undefined"==typeof e&&(g.jQuery=g.$=E),E});
 
 
 
spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/six.py DELETED
@@ -1,998 +0,0 @@
1
- # Copyright (c) 2010-2020 Benjamin Peterson
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the "Software"), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- # SOFTWARE.
20
-
21
- """Utilities for writing code that runs on Python 2 and 3"""
22
-
23
- from __future__ import absolute_import
24
-
25
- import functools
26
- import itertools
27
- import operator
28
- import sys
29
- import types
30
-
31
- __author__ = "Benjamin Peterson <[email protected]>"
32
- __version__ = "1.16.0"
33
-
34
-
35
- # Useful for very coarse version differentiation.
36
- PY2 = sys.version_info[0] == 2
37
- PY3 = sys.version_info[0] == 3
38
- PY34 = sys.version_info[0:2] >= (3, 4)
39
-
40
- if PY3:
41
- string_types = str,
42
- integer_types = int,
43
- class_types = type,
44
- text_type = str
45
- binary_type = bytes
46
-
47
- MAXSIZE = sys.maxsize
48
- else:
49
- string_types = basestring,
50
- integer_types = (int, long)
51
- class_types = (type, types.ClassType)
52
- text_type = unicode
53
- binary_type = str
54
-
55
- if sys.platform.startswith("java"):
56
- # Jython always uses 32 bits.
57
- MAXSIZE = int((1 << 31) - 1)
58
- else:
59
- # It's possible to have sizeof(long) != sizeof(Py_ssize_t).
60
- class X(object):
61
-
62
- def __len__(self):
63
- return 1 << 31
64
- try:
65
- len(X())
66
- except OverflowError:
67
- # 32-bit
68
- MAXSIZE = int((1 << 31) - 1)
69
- else:
70
- # 64-bit
71
- MAXSIZE = int((1 << 63) - 1)
72
- del X
73
-
74
- if PY34:
75
- from importlib.util import spec_from_loader
76
- else:
77
- spec_from_loader = None
78
-
79
-
80
- def _add_doc(func, doc):
81
- """Add documentation to a function."""
82
- func.__doc__ = doc
83
-
84
-
85
- def _import_module(name):
86
- """Import module, returning the module after the last dot."""
87
- __import__(name)
88
- return sys.modules[name]
89
-
90
-
91
- class _LazyDescr(object):
92
-
93
- def __init__(self, name):
94
- self.name = name
95
-
96
- def __get__(self, obj, tp):
97
- result = self._resolve()
98
- setattr(obj, self.name, result) # Invokes __set__.
99
- try:
100
- # This is a bit ugly, but it avoids running this again by
101
- # removing this descriptor.
102
- delattr(obj.__class__, self.name)
103
- except AttributeError:
104
- pass
105
- return result
106
-
107
-
108
- class MovedModule(_LazyDescr):
109
-
110
- def __init__(self, name, old, new=None):
111
- super(MovedModule, self).__init__(name)
112
- if PY3:
113
- if new is None:
114
- new = name
115
- self.mod = new
116
- else:
117
- self.mod = old
118
-
119
- def _resolve(self):
120
- return _import_module(self.mod)
121
-
122
- def __getattr__(self, attr):
123
- _module = self._resolve()
124
- value = getattr(_module, attr)
125
- setattr(self, attr, value)
126
- return value
127
-
128
-
129
- class _LazyModule(types.ModuleType):
130
-
131
- def __init__(self, name):
132
- super(_LazyModule, self).__init__(name)
133
- self.__doc__ = self.__class__.__doc__
134
-
135
- def __dir__(self):
136
- attrs = ["__doc__", "__name__"]
137
- attrs += [attr.name for attr in self._moved_attributes]
138
- return attrs
139
-
140
- # Subclasses should override this
141
- _moved_attributes = []
142
-
143
-
144
- class MovedAttribute(_LazyDescr):
145
-
146
- def __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None):
147
- super(MovedAttribute, self).__init__(name)
148
- if PY3:
149
- if new_mod is None:
150
- new_mod = name
151
- self.mod = new_mod
152
- if new_attr is None:
153
- if old_attr is None:
154
- new_attr = name
155
- else:
156
- new_attr = old_attr
157
- self.attr = new_attr
158
- else:
159
- self.mod = old_mod
160
- if old_attr is None:
161
- old_attr = name
162
- self.attr = old_attr
163
-
164
- def _resolve(self):
165
- module = _import_module(self.mod)
166
- return getattr(module, self.attr)
167
-
168
-
169
- class _SixMetaPathImporter(object):
170
-
171
- """
172
- A meta path importer to import six.moves and its submodules.
173
-
174
- This class implements a PEP302 finder and loader. It should be compatible
175
- with Python 2.5 and all existing versions of Python3
176
- """
177
-
178
- def __init__(self, six_module_name):
179
- self.name = six_module_name
180
- self.known_modules = {}
181
-
182
- def _add_module(self, mod, *fullnames):
183
- for fullname in fullnames:
184
- self.known_modules[self.name + "." + fullname] = mod
185
-
186
- def _get_module(self, fullname):
187
- return self.known_modules[self.name + "." + fullname]
188
-
189
- def find_module(self, fullname, path=None):
190
- if fullname in self.known_modules:
191
- return self
192
- return None
193
-
194
- def find_spec(self, fullname, path, target=None):
195
- if fullname in self.known_modules:
196
- return spec_from_loader(fullname, self)
197
- return None
198
-
199
- def __get_module(self, fullname):
200
- try:
201
- return self.known_modules[fullname]
202
- except KeyError:
203
- raise ImportError("This loader does not know module " + fullname)
204
-
205
- def load_module(self, fullname):
206
- try:
207
- # in case of a reload
208
- return sys.modules[fullname]
209
- except KeyError:
210
- pass
211
- mod = self.__get_module(fullname)
212
- if isinstance(mod, MovedModule):
213
- mod = mod._resolve()
214
- else:
215
- mod.__loader__ = self
216
- sys.modules[fullname] = mod
217
- return mod
218
-
219
- def is_package(self, fullname):
220
- """
221
- Return true, if the named module is a package.
222
-
223
- We need this method to get correct spec objects with
224
- Python 3.4 (see PEP451)
225
- """
226
- return hasattr(self.__get_module(fullname), "__path__")
227
-
228
- def get_code(self, fullname):
229
- """Return None
230
-
231
- Required, if is_package is implemented"""
232
- self.__get_module(fullname) # eventually raises ImportError
233
- return None
234
- get_source = get_code # same as get_code
235
-
236
- def create_module(self, spec):
237
- return self.load_module(spec.name)
238
-
239
- def exec_module(self, module):
240
- pass
241
-
242
- _importer = _SixMetaPathImporter(__name__)
243
-
244
-
245
- class _MovedItems(_LazyModule):
246
-
247
- """Lazy loading of moved objects"""
248
- __path__ = [] # mark as package
249
-
250
-
251
- _moved_attributes = [
252
- MovedAttribute("cStringIO", "cStringIO", "io", "StringIO"),
253
- MovedAttribute("filter", "itertools", "builtins", "ifilter", "filter"),
254
- MovedAttribute("filterfalse", "itertools", "itertools", "ifilterfalse", "filterfalse"),
255
- MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"),
256
- MovedAttribute("intern", "__builtin__", "sys"),
257
- MovedAttribute("map", "itertools", "builtins", "imap", "map"),
258
- MovedAttribute("getcwd", "os", "os", "getcwdu", "getcwd"),
259
- MovedAttribute("getcwdb", "os", "os", "getcwd", "getcwdb"),
260
- MovedAttribute("getoutput", "commands", "subprocess"),
261
- MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"),
262
- MovedAttribute("reload_module", "__builtin__", "importlib" if PY34 else "imp", "reload"),
263
- MovedAttribute("reduce", "__builtin__", "functools"),
264
- MovedAttribute("shlex_quote", "pipes", "shlex", "quote"),
265
- MovedAttribute("StringIO", "StringIO", "io"),
266
- MovedAttribute("UserDict", "UserDict", "collections"),
267
- MovedAttribute("UserList", "UserList", "collections"),
268
- MovedAttribute("UserString", "UserString", "collections"),
269
- MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"),
270
- MovedAttribute("zip", "itertools", "builtins", "izip", "zip"),
271
- MovedAttribute("zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"),
272
- MovedModule("builtins", "__builtin__"),
273
- MovedModule("configparser", "ConfigParser"),
274
- MovedModule("collections_abc", "collections", "collections.abc" if sys.version_info >= (3, 3) else "collections"),
275
- MovedModule("copyreg", "copy_reg"),
276
- MovedModule("dbm_gnu", "gdbm", "dbm.gnu"),
277
- MovedModule("dbm_ndbm", "dbm", "dbm.ndbm"),
278
- MovedModule("_dummy_thread", "dummy_thread", "_dummy_thread" if sys.version_info < (3, 9) else "_thread"),
279
- MovedModule("http_cookiejar", "cookielib", "http.cookiejar"),
280
- MovedModule("http_cookies", "Cookie", "http.cookies"),
281
- MovedModule("html_entities", "htmlentitydefs", "html.entities"),
282
- MovedModule("html_parser", "HTMLParser", "html.parser"),
283
- MovedModule("http_client", "httplib", "http.client"),
284
- MovedModule("email_mime_base", "email.MIMEBase", "email.mime.base"),
285
- MovedModule("email_mime_image", "email.MIMEImage", "email.mime.image"),
286
- MovedModule("email_mime_multipart", "email.MIMEMultipart", "email.mime.multipart"),
287
- MovedModule("email_mime_nonmultipart", "email.MIMENonMultipart", "email.mime.nonmultipart"),
288
- MovedModule("email_mime_text", "email.MIMEText", "email.mime.text"),
289
- MovedModule("BaseHTTPServer", "BaseHTTPServer", "http.server"),
290
- MovedModule("CGIHTTPServer", "CGIHTTPServer", "http.server"),
291
- MovedModule("SimpleHTTPServer", "SimpleHTTPServer", "http.server"),
292
- MovedModule("cPickle", "cPickle", "pickle"),
293
- MovedModule("queue", "Queue"),
294
- MovedModule("reprlib", "repr"),
295
- MovedModule("socketserver", "SocketServer"),
296
- MovedModule("_thread", "thread", "_thread"),
297
- MovedModule("tkinter", "Tkinter"),
298
- MovedModule("tkinter_dialog", "Dialog", "tkinter.dialog"),
299
- MovedModule("tkinter_filedialog", "FileDialog", "tkinter.filedialog"),
300
- MovedModule("tkinter_scrolledtext", "ScrolledText", "tkinter.scrolledtext"),
301
- MovedModule("tkinter_simpledialog", "SimpleDialog", "tkinter.simpledialog"),
302
- MovedModule("tkinter_tix", "Tix", "tkinter.tix"),
303
- MovedModule("tkinter_ttk", "ttk", "tkinter.ttk"),
304
- MovedModule("tkinter_constants", "Tkconstants", "tkinter.constants"),
305
- MovedModule("tkinter_dnd", "Tkdnd", "tkinter.dnd"),
306
- MovedModule("tkinter_colorchooser", "tkColorChooser",
307
- "tkinter.colorchooser"),
308
- MovedModule("tkinter_commondialog", "tkCommonDialog",
309
- "tkinter.commondialog"),
310
- MovedModule("tkinter_tkfiledialog", "tkFileDialog", "tkinter.filedialog"),
311
- MovedModule("tkinter_font", "tkFont", "tkinter.font"),
312
- MovedModule("tkinter_messagebox", "tkMessageBox", "tkinter.messagebox"),
313
- MovedModule("tkinter_tksimpledialog", "tkSimpleDialog",
314
- "tkinter.simpledialog"),
315
- MovedModule("urllib_parse", __name__ + ".moves.urllib_parse", "urllib.parse"),
316
- MovedModule("urllib_error", __name__ + ".moves.urllib_error", "urllib.error"),
317
- MovedModule("urllib", __name__ + ".moves.urllib", __name__ + ".moves.urllib"),
318
- MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"),
319
- MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"),
320
- MovedModule("xmlrpc_server", "SimpleXMLRPCServer", "xmlrpc.server"),
321
- ]
322
- # Add windows specific modules.
323
- if sys.platform == "win32":
324
- _moved_attributes += [
325
- MovedModule("winreg", "_winreg"),
326
- ]
327
-
328
- for attr in _moved_attributes:
329
- setattr(_MovedItems, attr.name, attr)
330
- if isinstance(attr, MovedModule):
331
- _importer._add_module(attr, "moves." + attr.name)
332
- del attr
333
-
334
- _MovedItems._moved_attributes = _moved_attributes
335
-
336
- moves = _MovedItems(__name__ + ".moves")
337
- _importer._add_module(moves, "moves")
338
-
339
-
340
- class Module_six_moves_urllib_parse(_LazyModule):
341
-
342
- """Lazy loading of moved objects in six.moves.urllib_parse"""
343
-
344
-
345
- _urllib_parse_moved_attributes = [
346
- MovedAttribute("ParseResult", "urlparse", "urllib.parse"),
347
- MovedAttribute("SplitResult", "urlparse", "urllib.parse"),
348
- MovedAttribute("parse_qs", "urlparse", "urllib.parse"),
349
- MovedAttribute("parse_qsl", "urlparse", "urllib.parse"),
350
- MovedAttribute("urldefrag", "urlparse", "urllib.parse"),
351
- MovedAttribute("urljoin", "urlparse", "urllib.parse"),
352
- MovedAttribute("urlparse", "urlparse", "urllib.parse"),
353
- MovedAttribute("urlsplit", "urlparse", "urllib.parse"),
354
- MovedAttribute("urlunparse", "urlparse", "urllib.parse"),
355
- MovedAttribute("urlunsplit", "urlparse", "urllib.parse"),
356
- MovedAttribute("quote", "urllib", "urllib.parse"),
357
- MovedAttribute("quote_plus", "urllib", "urllib.parse"),
358
- MovedAttribute("unquote", "urllib", "urllib.parse"),
359
- MovedAttribute("unquote_plus", "urllib", "urllib.parse"),
360
- MovedAttribute("unquote_to_bytes", "urllib", "urllib.parse", "unquote", "unquote_to_bytes"),
361
- MovedAttribute("urlencode", "urllib", "urllib.parse"),
362
- MovedAttribute("splitquery", "urllib", "urllib.parse"),
363
- MovedAttribute("splittag", "urllib", "urllib.parse"),
364
- MovedAttribute("splituser", "urllib", "urllib.parse"),
365
- MovedAttribute("splitvalue", "urllib", "urllib.parse"),
366
- MovedAttribute("uses_fragment", "urlparse", "urllib.parse"),
367
- MovedAttribute("uses_netloc", "urlparse", "urllib.parse"),
368
- MovedAttribute("uses_params", "urlparse", "urllib.parse"),
369
- MovedAttribute("uses_query", "urlparse", "urllib.parse"),
370
- MovedAttribute("uses_relative", "urlparse", "urllib.parse"),
371
- ]
372
- for attr in _urllib_parse_moved_attributes:
373
- setattr(Module_six_moves_urllib_parse, attr.name, attr)
374
- del attr
375
-
376
- Module_six_moves_urllib_parse._moved_attributes = _urllib_parse_moved_attributes
377
-
378
- _importer._add_module(Module_six_moves_urllib_parse(__name__ + ".moves.urllib_parse"),
379
- "moves.urllib_parse", "moves.urllib.parse")
380
-
381
-
382
- class Module_six_moves_urllib_error(_LazyModule):
383
-
384
- """Lazy loading of moved objects in six.moves.urllib_error"""
385
-
386
-
387
- _urllib_error_moved_attributes = [
388
- MovedAttribute("URLError", "urllib2", "urllib.error"),
389
- MovedAttribute("HTTPError", "urllib2", "urllib.error"),
390
- MovedAttribute("ContentTooShortError", "urllib", "urllib.error"),
391
- ]
392
- for attr in _urllib_error_moved_attributes:
393
- setattr(Module_six_moves_urllib_error, attr.name, attr)
394
- del attr
395
-
396
- Module_six_moves_urllib_error._moved_attributes = _urllib_error_moved_attributes
397
-
398
- _importer._add_module(Module_six_moves_urllib_error(__name__ + ".moves.urllib.error"),
399
- "moves.urllib_error", "moves.urllib.error")
400
-
401
-
402
- class Module_six_moves_urllib_request(_LazyModule):
403
-
404
- """Lazy loading of moved objects in six.moves.urllib_request"""
405
-
406
-
407
- _urllib_request_moved_attributes = [
408
- MovedAttribute("urlopen", "urllib2", "urllib.request"),
409
- MovedAttribute("install_opener", "urllib2", "urllib.request"),
410
- MovedAttribute("build_opener", "urllib2", "urllib.request"),
411
- MovedAttribute("pathname2url", "urllib", "urllib.request"),
412
- MovedAttribute("url2pathname", "urllib", "urllib.request"),
413
- MovedAttribute("getproxies", "urllib", "urllib.request"),
414
- MovedAttribute("Request", "urllib2", "urllib.request"),
415
- MovedAttribute("OpenerDirector", "urllib2", "urllib.request"),
416
- MovedAttribute("HTTPDefaultErrorHandler", "urllib2", "urllib.request"),
417
- MovedAttribute("HTTPRedirectHandler", "urllib2", "urllib.request"),
418
- MovedAttribute("HTTPCookieProcessor", "urllib2", "urllib.request"),
419
- MovedAttribute("ProxyHandler", "urllib2", "urllib.request"),
420
- MovedAttribute("BaseHandler", "urllib2", "urllib.request"),
421
- MovedAttribute("HTTPPasswordMgr", "urllib2", "urllib.request"),
422
- MovedAttribute("HTTPPasswordMgrWithDefaultRealm", "urllib2", "urllib.request"),
423
- MovedAttribute("AbstractBasicAuthHandler", "urllib2", "urllib.request"),
424
- MovedAttribute("HTTPBasicAuthHandler", "urllib2", "urllib.request"),
425
- MovedAttribute("ProxyBasicAuthHandler", "urllib2", "urllib.request"),
426
- MovedAttribute("AbstractDigestAuthHandler", "urllib2", "urllib.request"),
427
- MovedAttribute("HTTPDigestAuthHandler", "urllib2", "urllib.request"),
428
- MovedAttribute("ProxyDigestAuthHandler", "urllib2", "urllib.request"),
429
- MovedAttribute("HTTPHandler", "urllib2", "urllib.request"),
430
- MovedAttribute("HTTPSHandler", "urllib2", "urllib.request"),
431
- MovedAttribute("FileHandler", "urllib2", "urllib.request"),
432
- MovedAttribute("FTPHandler", "urllib2", "urllib.request"),
433
- MovedAttribute("CacheFTPHandler", "urllib2", "urllib.request"),
434
- MovedAttribute("UnknownHandler", "urllib2", "urllib.request"),
435
- MovedAttribute("HTTPErrorProcessor", "urllib2", "urllib.request"),
436
- MovedAttribute("urlretrieve", "urllib", "urllib.request"),
437
- MovedAttribute("urlcleanup", "urllib", "urllib.request"),
438
- MovedAttribute("URLopener", "urllib", "urllib.request"),
439
- MovedAttribute("FancyURLopener", "urllib", "urllib.request"),
440
- MovedAttribute("proxy_bypass", "urllib", "urllib.request"),
441
- MovedAttribute("parse_http_list", "urllib2", "urllib.request"),
442
- MovedAttribute("parse_keqv_list", "urllib2", "urllib.request"),
443
- ]
444
- for attr in _urllib_request_moved_attributes:
445
- setattr(Module_six_moves_urllib_request, attr.name, attr)
446
- del attr
447
-
448
- Module_six_moves_urllib_request._moved_attributes = _urllib_request_moved_attributes
449
-
450
- _importer._add_module(Module_six_moves_urllib_request(__name__ + ".moves.urllib.request"),
451
- "moves.urllib_request", "moves.urllib.request")
452
-
453
-
454
- class Module_six_moves_urllib_response(_LazyModule):
455
-
456
- """Lazy loading of moved objects in six.moves.urllib_response"""
457
-
458
-
459
- _urllib_response_moved_attributes = [
460
- MovedAttribute("addbase", "urllib", "urllib.response"),
461
- MovedAttribute("addclosehook", "urllib", "urllib.response"),
462
- MovedAttribute("addinfo", "urllib", "urllib.response"),
463
- MovedAttribute("addinfourl", "urllib", "urllib.response"),
464
- ]
465
- for attr in _urllib_response_moved_attributes:
466
- setattr(Module_six_moves_urllib_response, attr.name, attr)
467
- del attr
468
-
469
- Module_six_moves_urllib_response._moved_attributes = _urllib_response_moved_attributes
470
-
471
- _importer._add_module(Module_six_moves_urllib_response(__name__ + ".moves.urllib.response"),
472
- "moves.urllib_response", "moves.urllib.response")
473
-
474
-
475
- class Module_six_moves_urllib_robotparser(_LazyModule):
476
-
477
- """Lazy loading of moved objects in six.moves.urllib_robotparser"""
478
-
479
-
480
- _urllib_robotparser_moved_attributes = [
481
- MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"),
482
- ]
483
- for attr in _urllib_robotparser_moved_attributes:
484
- setattr(Module_six_moves_urllib_robotparser, attr.name, attr)
485
- del attr
486
-
487
- Module_six_moves_urllib_robotparser._moved_attributes = _urllib_robotparser_moved_attributes
488
-
489
- _importer._add_module(Module_six_moves_urllib_robotparser(__name__ + ".moves.urllib.robotparser"),
490
- "moves.urllib_robotparser", "moves.urllib.robotparser")
491
-
492
-
493
- class Module_six_moves_urllib(types.ModuleType):
494
-
495
- """Create a six.moves.urllib namespace that resembles the Python 3 namespace"""
496
- __path__ = [] # mark as package
497
- parse = _importer._get_module("moves.urllib_parse")
498
- error = _importer._get_module("moves.urllib_error")
499
- request = _importer._get_module("moves.urllib_request")
500
- response = _importer._get_module("moves.urllib_response")
501
- robotparser = _importer._get_module("moves.urllib_robotparser")
502
-
503
- def __dir__(self):
504
- return ['parse', 'error', 'request', 'response', 'robotparser']
505
-
506
- _importer._add_module(Module_six_moves_urllib(__name__ + ".moves.urllib"),
507
- "moves.urllib")
508
-
509
-
510
- def add_move(move):
511
- """Add an item to six.moves."""
512
- setattr(_MovedItems, move.name, move)
513
-
514
-
515
- def remove_move(name):
516
- """Remove item from six.moves."""
517
- try:
518
- delattr(_MovedItems, name)
519
- except AttributeError:
520
- try:
521
- del moves.__dict__[name]
522
- except KeyError:
523
- raise AttributeError("no such move, %r" % (name,))
524
-
525
-
526
- if PY3:
527
- _meth_func = "__func__"
528
- _meth_self = "__self__"
529
-
530
- _func_closure = "__closure__"
531
- _func_code = "__code__"
532
- _func_defaults = "__defaults__"
533
- _func_globals = "__globals__"
534
- else:
535
- _meth_func = "im_func"
536
- _meth_self = "im_self"
537
-
538
- _func_closure = "func_closure"
539
- _func_code = "func_code"
540
- _func_defaults = "func_defaults"
541
- _func_globals = "func_globals"
542
-
543
-
544
- try:
545
- advance_iterator = next
546
- except NameError:
547
- def advance_iterator(it):
548
- return it.next()
549
- next = advance_iterator
550
-
551
-
552
- try:
553
- callable = callable
554
- except NameError:
555
- def callable(obj):
556
- return any("__call__" in klass.__dict__ for klass in type(obj).__mro__)
557
-
558
-
559
- if PY3:
560
- def get_unbound_function(unbound):
561
- return unbound
562
-
563
- create_bound_method = types.MethodType
564
-
565
- def create_unbound_method(func, cls):
566
- return func
567
-
568
- Iterator = object
569
- else:
570
- def get_unbound_function(unbound):
571
- return unbound.im_func
572
-
573
- def create_bound_method(func, obj):
574
- return types.MethodType(func, obj, obj.__class__)
575
-
576
- def create_unbound_method(func, cls):
577
- return types.MethodType(func, None, cls)
578
-
579
- class Iterator(object):
580
-
581
- def next(self):
582
- return type(self).__next__(self)
583
-
584
- callable = callable
585
- _add_doc(get_unbound_function,
586
- """Get the function out of a possibly unbound function""")
587
-
588
-
589
- get_method_function = operator.attrgetter(_meth_func)
590
- get_method_self = operator.attrgetter(_meth_self)
591
- get_function_closure = operator.attrgetter(_func_closure)
592
- get_function_code = operator.attrgetter(_func_code)
593
- get_function_defaults = operator.attrgetter(_func_defaults)
594
- get_function_globals = operator.attrgetter(_func_globals)
595
-
596
-
597
- if PY3:
598
- def iterkeys(d, **kw):
599
- return iter(d.keys(**kw))
600
-
601
- def itervalues(d, **kw):
602
- return iter(d.values(**kw))
603
-
604
- def iteritems(d, **kw):
605
- return iter(d.items(**kw))
606
-
607
- def iterlists(d, **kw):
608
- return iter(d.lists(**kw))
609
-
610
- viewkeys = operator.methodcaller("keys")
611
-
612
- viewvalues = operator.methodcaller("values")
613
-
614
- viewitems = operator.methodcaller("items")
615
- else:
616
- def iterkeys(d, **kw):
617
- return d.iterkeys(**kw)
618
-
619
- def itervalues(d, **kw):
620
- return d.itervalues(**kw)
621
-
622
- def iteritems(d, **kw):
623
- return d.iteritems(**kw)
624
-
625
- def iterlists(d, **kw):
626
- return d.iterlists(**kw)
627
-
628
- viewkeys = operator.methodcaller("viewkeys")
629
-
630
- viewvalues = operator.methodcaller("viewvalues")
631
-
632
- viewitems = operator.methodcaller("viewitems")
633
-
634
- _add_doc(iterkeys, "Return an iterator over the keys of a dictionary.")
635
- _add_doc(itervalues, "Return an iterator over the values of a dictionary.")
636
- _add_doc(iteritems,
637
- "Return an iterator over the (key, value) pairs of a dictionary.")
638
- _add_doc(iterlists,
639
- "Return an iterator over the (key, [values]) pairs of a dictionary.")
640
-
641
-
642
- if PY3:
643
- def b(s):
644
- return s.encode("latin-1")
645
-
646
- def u(s):
647
- return s
648
- unichr = chr
649
- import struct
650
- int2byte = struct.Struct(">B").pack
651
- del struct
652
- byte2int = operator.itemgetter(0)
653
- indexbytes = operator.getitem
654
- iterbytes = iter
655
- import io
656
- StringIO = io.StringIO
657
- BytesIO = io.BytesIO
658
- del io
659
- _assertCountEqual = "assertCountEqual"
660
- if sys.version_info[1] <= 1:
661
- _assertRaisesRegex = "assertRaisesRegexp"
662
- _assertRegex = "assertRegexpMatches"
663
- _assertNotRegex = "assertNotRegexpMatches"
664
- else:
665
- _assertRaisesRegex = "assertRaisesRegex"
666
- _assertRegex = "assertRegex"
667
- _assertNotRegex = "assertNotRegex"
668
- else:
669
- def b(s):
670
- return s
671
- # Workaround for standalone backslash
672
-
673
- def u(s):
674
- return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape")
675
- unichr = unichr
676
- int2byte = chr
677
-
678
- def byte2int(bs):
679
- return ord(bs[0])
680
-
681
- def indexbytes(buf, i):
682
- return ord(buf[i])
683
- iterbytes = functools.partial(itertools.imap, ord)
684
- import StringIO
685
- StringIO = BytesIO = StringIO.StringIO
686
- _assertCountEqual = "assertItemsEqual"
687
- _assertRaisesRegex = "assertRaisesRegexp"
688
- _assertRegex = "assertRegexpMatches"
689
- _assertNotRegex = "assertNotRegexpMatches"
690
- _add_doc(b, """Byte literal""")
691
- _add_doc(u, """Text literal""")
692
-
693
-
694
- def assertCountEqual(self, *args, **kwargs):
695
- return getattr(self, _assertCountEqual)(*args, **kwargs)
696
-
697
-
698
- def assertRaisesRegex(self, *args, **kwargs):
699
- return getattr(self, _assertRaisesRegex)(*args, **kwargs)
700
-
701
-
702
- def assertRegex(self, *args, **kwargs):
703
- return getattr(self, _assertRegex)(*args, **kwargs)
704
-
705
-
706
- def assertNotRegex(self, *args, **kwargs):
707
- return getattr(self, _assertNotRegex)(*args, **kwargs)
708
-
709
-
710
- if PY3:
711
- exec_ = getattr(moves.builtins, "exec")
712
-
713
- def reraise(tp, value, tb=None):
714
- try:
715
- if value is None:
716
- value = tp()
717
- if value.__traceback__ is not tb:
718
- raise value.with_traceback(tb)
719
- raise value
720
- finally:
721
- value = None
722
- tb = None
723
-
724
- else:
725
- def exec_(_code_, _globs_=None, _locs_=None):
726
- """Execute code in a namespace."""
727
- if _globs_ is None:
728
- frame = sys._getframe(1)
729
- _globs_ = frame.f_globals
730
- if _locs_ is None:
731
- _locs_ = frame.f_locals
732
- del frame
733
- elif _locs_ is None:
734
- _locs_ = _globs_
735
- exec("""exec _code_ in _globs_, _locs_""")
736
-
737
- exec_("""def reraise(tp, value, tb=None):
738
- try:
739
- raise tp, value, tb
740
- finally:
741
- tb = None
742
- """)
743
-
744
-
745
- if sys.version_info[:2] > (3,):
746
- exec_("""def raise_from(value, from_value):
747
- try:
748
- raise value from from_value
749
- finally:
750
- value = None
751
- """)
752
- else:
753
- def raise_from(value, from_value):
754
- raise value
755
-
756
-
757
- print_ = getattr(moves.builtins, "print", None)
758
- if print_ is None:
759
- def print_(*args, **kwargs):
760
- """The new-style print function for Python 2.4 and 2.5."""
761
- fp = kwargs.pop("file", sys.stdout)
762
- if fp is None:
763
- return
764
-
765
- def write(data):
766
- if not isinstance(data, basestring):
767
- data = str(data)
768
- # If the file has an encoding, encode unicode with it.
769
- if (isinstance(fp, file) and
770
- isinstance(data, unicode) and
771
- fp.encoding is not None):
772
- errors = getattr(fp, "errors", None)
773
- if errors is None:
774
- errors = "strict"
775
- data = data.encode(fp.encoding, errors)
776
- fp.write(data)
777
- want_unicode = False
778
- sep = kwargs.pop("sep", None)
779
- if sep is not None:
780
- if isinstance(sep, unicode):
781
- want_unicode = True
782
- elif not isinstance(sep, str):
783
- raise TypeError("sep must be None or a string")
784
- end = kwargs.pop("end", None)
785
- if end is not None:
786
- if isinstance(end, unicode):
787
- want_unicode = True
788
- elif not isinstance(end, str):
789
- raise TypeError("end must be None or a string")
790
- if kwargs:
791
- raise TypeError("invalid keyword arguments to print()")
792
- if not want_unicode:
793
- for arg in args:
794
- if isinstance(arg, unicode):
795
- want_unicode = True
796
- break
797
- if want_unicode:
798
- newline = unicode("\n")
799
- space = unicode(" ")
800
- else:
801
- newline = "\n"
802
- space = " "
803
- if sep is None:
804
- sep = space
805
- if end is None:
806
- end = newline
807
- for i, arg in enumerate(args):
808
- if i:
809
- write(sep)
810
- write(arg)
811
- write(end)
812
- if sys.version_info[:2] < (3, 3):
813
- _print = print_
814
-
815
- def print_(*args, **kwargs):
816
- fp = kwargs.get("file", sys.stdout)
817
- flush = kwargs.pop("flush", False)
818
- _print(*args, **kwargs)
819
- if flush and fp is not None:
820
- fp.flush()
821
-
822
- _add_doc(reraise, """Reraise an exception.""")
823
-
824
- if sys.version_info[0:2] < (3, 4):
825
- # This does exactly the same what the :func:`py3:functools.update_wrapper`
826
- # function does on Python versions after 3.2. It sets the ``__wrapped__``
827
- # attribute on ``wrapper`` object and it doesn't raise an error if any of
828
- # the attributes mentioned in ``assigned`` and ``updated`` are missing on
829
- # ``wrapped`` object.
830
- def _update_wrapper(wrapper, wrapped,
831
- assigned=functools.WRAPPER_ASSIGNMENTS,
832
- updated=functools.WRAPPER_UPDATES):
833
- for attr in assigned:
834
- try:
835
- value = getattr(wrapped, attr)
836
- except AttributeError:
837
- continue
838
- else:
839
- setattr(wrapper, attr, value)
840
- for attr in updated:
841
- getattr(wrapper, attr).update(getattr(wrapped, attr, {}))
842
- wrapper.__wrapped__ = wrapped
843
- return wrapper
844
- _update_wrapper.__doc__ = functools.update_wrapper.__doc__
845
-
846
- def wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS,
847
- updated=functools.WRAPPER_UPDATES):
848
- return functools.partial(_update_wrapper, wrapped=wrapped,
849
- assigned=assigned, updated=updated)
850
- wraps.__doc__ = functools.wraps.__doc__
851
-
852
- else:
853
- wraps = functools.wraps
854
-
855
-
856
- def with_metaclass(meta, *bases):
857
- """Create a base class with a metaclass."""
858
- # This requires a bit of explanation: the basic idea is to make a dummy
859
- # metaclass for one level of class instantiation that replaces itself with
860
- # the actual metaclass.
861
- class metaclass(type):
862
-
863
- def __new__(cls, name, this_bases, d):
864
- if sys.version_info[:2] >= (3, 7):
865
- # This version introduced PEP 560 that requires a bit
866
- # of extra care (we mimic what is done by __build_class__).
867
- resolved_bases = types.resolve_bases(bases)
868
- if resolved_bases is not bases:
869
- d['__orig_bases__'] = bases
870
- else:
871
- resolved_bases = bases
872
- return meta(name, resolved_bases, d)
873
-
874
- @classmethod
875
- def __prepare__(cls, name, this_bases):
876
- return meta.__prepare__(name, bases)
877
- return type.__new__(metaclass, 'temporary_class', (), {})
878
-
879
-
880
- def add_metaclass(metaclass):
881
- """Class decorator for creating a class with a metaclass."""
882
- def wrapper(cls):
883
- orig_vars = cls.__dict__.copy()
884
- slots = orig_vars.get('__slots__')
885
- if slots is not None:
886
- if isinstance(slots, str):
887
- slots = [slots]
888
- for slots_var in slots:
889
- orig_vars.pop(slots_var)
890
- orig_vars.pop('__dict__', None)
891
- orig_vars.pop('__weakref__', None)
892
- if hasattr(cls, '__qualname__'):
893
- orig_vars['__qualname__'] = cls.__qualname__
894
- return metaclass(cls.__name__, cls.__bases__, orig_vars)
895
- return wrapper
896
-
897
-
898
- def ensure_binary(s, encoding='utf-8', errors='strict'):
899
- """Coerce **s** to six.binary_type.
900
-
901
- For Python 2:
902
- - `unicode` -> encoded to `str`
903
- - `str` -> `str`
904
-
905
- For Python 3:
906
- - `str` -> encoded to `bytes`
907
- - `bytes` -> `bytes`
908
- """
909
- if isinstance(s, binary_type):
910
- return s
911
- if isinstance(s, text_type):
912
- return s.encode(encoding, errors)
913
- raise TypeError("not expecting type '%s'" % type(s))
914
-
915
-
916
- def ensure_str(s, encoding='utf-8', errors='strict'):
917
- """Coerce *s* to `str`.
918
-
919
- For Python 2:
920
- - `unicode` -> encoded to `str`
921
- - `str` -> `str`
922
-
923
- For Python 3:
924
- - `str` -> `str`
925
- - `bytes` -> decoded to `str`
926
- """
927
- # Optimization: Fast return for the common case.
928
- if type(s) is str:
929
- return s
930
- if PY2 and isinstance(s, text_type):
931
- return s.encode(encoding, errors)
932
- elif PY3 and isinstance(s, binary_type):
933
- return s.decode(encoding, errors)
934
- elif not isinstance(s, (text_type, binary_type)):
935
- raise TypeError("not expecting type '%s'" % type(s))
936
- return s
937
-
938
-
939
- def ensure_text(s, encoding='utf-8', errors='strict'):
940
- """Coerce *s* to six.text_type.
941
-
942
- For Python 2:
943
- - `unicode` -> `unicode`
944
- - `str` -> `unicode`
945
-
946
- For Python 3:
947
- - `str` -> `str`
948
- - `bytes` -> decoded to `str`
949
- """
950
- if isinstance(s, binary_type):
951
- return s.decode(encoding, errors)
952
- elif isinstance(s, text_type):
953
- return s
954
- else:
955
- raise TypeError("not expecting type '%s'" % type(s))
956
-
957
-
958
- def python_2_unicode_compatible(klass):
959
- """
960
- A class decorator that defines __unicode__ and __str__ methods under Python 2.
961
- Under Python 3 it does nothing.
962
-
963
- To support Python 2 and 3 with a single code base, define a __str__ method
964
- returning text and apply this decorator to the class.
965
- """
966
- if PY2:
967
- if '__str__' not in klass.__dict__:
968
- raise ValueError("@python_2_unicode_compatible cannot be applied "
969
- "to %s because it doesn't define __str__()." %
970
- klass.__name__)
971
- klass.__unicode__ = klass.__str__
972
- klass.__str__ = lambda self: self.__unicode__().encode('utf-8')
973
- return klass
974
-
975
-
976
- # Complete the moves implementation.
977
- # This code is at the end of this module to speed up module loading.
978
- # Turn this module into a package.
979
- __path__ = [] # required for PEP 302 and PEP 451
980
- __package__ = __name__ # see PEP 366 @ReservedAssignment
981
- if globals().get("__spec__") is not None:
982
- __spec__.submodule_search_locations = [] # PEP 451 @UndefinedVariable
983
- # Remove other six meta path importers, since they cause problems. This can
984
- # happen if six is removed from sys.modules and then reloaded. (Setuptools does
985
- # this for some reason.)
986
- if sys.meta_path:
987
- for i, importer in enumerate(sys.meta_path):
988
- # Here's some real nastiness: Another "instance" of the six module might
989
- # be floating around. Therefore, we can't use isinstance() to check for
990
- # the six meta path importer, since the other six instance will have
991
- # inserted an importer with different class.
992
- if (type(importer).__name__ == "_SixMetaPathImporter" and
993
- importer.name == __name__):
994
- del sys.meta_path[i]
995
- break
996
- del i, importer
997
- # Finally, add the importer to the meta path import hook.
998
- sys.meta_path.append(_importer)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/AtomdffAI/wechatgpt4atom/bridge/bridge.py DELETED
@@ -1,9 +0,0 @@
1
- from bot import bot_factory
2
-
3
-
4
- class Bridge(object):
5
- def __init__(self):
6
- pass
7
-
8
- def fetch_reply_content(self, query, context):
9
- return bot_factory.create_bot("chatGPT").reply(query, context)
 
 
 
 
 
 
 
 
 
 
spaces/Awesimo/jojogan/e4e/configs/paths_config.py DELETED
@@ -1,28 +0,0 @@
1
- dataset_paths = {
2
- # Face Datasets (In the paper: FFHQ - train, CelebAHQ - test)
3
- 'ffhq': '',
4
- 'celeba_test': '',
5
-
6
- # Cars Dataset (In the paper: Stanford cars)
7
- 'cars_train': '',
8
- 'cars_test': '',
9
-
10
- # Horse Dataset (In the paper: LSUN Horse)
11
- 'horse_train': '',
12
- 'horse_test': '',
13
-
14
- # Church Dataset (In the paper: LSUN Church)
15
- 'church_train': '',
16
- 'church_test': '',
17
-
18
- # Cats Dataset (In the paper: LSUN Cat)
19
- 'cats_train': '',
20
- 'cats_test': ''
21
- }
22
-
23
- model_paths = {
24
- 'stylegan_ffhq': 'pretrained_models/stylegan2-ffhq-config-f.pt',
25
- 'ir_se50': 'pretrained_models/model_ir_se50.pth',
26
- 'shape_predictor': 'pretrained_models/shape_predictor_68_face_landmarks.dat',
27
- 'moco': 'pretrained_models/moco_v2_800ep_pretrain.pth'
28
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/BMukhtar/BookRecognitionKz/kz_ocr_easy.py DELETED
@@ -1,88 +0,0 @@
1
- import os
2
- import cv2
3
- import numpy as np
4
- from PIL import Image, ImageDraw, ImageFont
5
- from tqdm import tqdm
6
- import os
7
-
8
- import easyocr
9
-
10
- models_dir = "./models"
11
- images_dir = "./images"
12
- output_dir = "./output"
13
- dirs = [models_dir, images_dir, output_dir]
14
- for d in dirs:
15
- if not os.path.exists(output_dir):
16
- os.makedirs(output_dir)
17
-
18
- """
19
- Upload easy OCR model files with the same name and font file named Ubuntu-Regular.ttf, examples:
20
- best_norm_ED.pth
21
- best_norm_ED.py
22
- best_norm_ED.yaml
23
- Ubuntu-Regular.ttf
24
-
25
- to models directory
26
-
27
- Upload image files you want to test, examples:
28
- kz_book_simple.jpeg
29
- kz_blur.jpg
30
- kz_book_complex.jpg
31
-
32
- to images directory
33
- """
34
-
35
- font_path = models_dir + "/Ubuntu-Regular.ttf"
36
-
37
- reader = easyocr.Reader(
38
- ['en'],
39
- gpu=True,
40
- recog_network='best_norm_ED',
41
- detect_network="craft",
42
- user_network_directory=models_dir,
43
- model_storage_directory=models_dir,
44
- ) # this needs to run only once to load the model into memory
45
-
46
- image_extensions = (".jpg", ".jpeg", ".png")
47
-
48
- for image_name in tqdm(os.listdir(images_dir)):
49
- if not image_name.lower().endswith(image_extensions):
50
- print(f'unsupported file {image_name}')
51
- continue
52
- image_path = f'{images_dir}/{image_name}'
53
- print(image_path)
54
- # Read image as numpy array
55
- image = cv2.imread(image_path)
56
-
57
- # Rotate the image by 270 degrees
58
- # image = cv2.rotate(image, cv2.ROTATE_90_CLOCKWISE)
59
-
60
- # Convert the image from BGR to RGB (because OpenCV loads images in BGR format)
61
- image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
62
- results = reader.readtext(image=image)
63
-
64
- # Load custom font
65
- font = ImageFont.truetype(font_path, 32)
66
-
67
- # Display the results
68
- for (bbox, text, prob) in results:
69
- # Get the bounding box coordinates
70
- (top_left, top_right, bottom_right, bottom_left) = bbox
71
- top_left = (int(top_left[0]), int(top_left[1]))
72
- bottom_right = (int(bottom_right[0]), int(bottom_right[1]))
73
-
74
- # Draw the bounding box on the image
75
- cv2.rectangle(image, top_left, bottom_right, (0, 255, 0), 2)
76
-
77
- # Convert the OpenCV image to a PIL image, draw the text, then convert back to an OpenCV image
78
- image_pil = Image.fromarray(cv2.cvtColor(image, cv2.COLOR_BGR2RGB))
79
- draw = ImageDraw.Draw(image_pil)
80
- draw.text((top_left[0], top_left[1] - 40), text, font=font, fill=(0, 0, 255))
81
- image = cv2.cvtColor(np.array(image_pil), cv2.COLOR_RGB2BGR)
82
-
83
- # Save image
84
- cv2.imwrite( f'{output_dir}/{image_name}', image)
85
-
86
- # reader.readtext(image = image, paragraph=True)
87
-
88
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Benson/text-generation/Examples/Descargar Gratis La Ampliadora De Imgenes.md DELETED
@@ -1,54 +0,0 @@
1
- <br />
2
- <h1>Ampliadora de imágenes AI Descargar gratis: Cómo mejorar y mejorar sus fotos con inteligencia artificial</h1>
3
- <p>¿Alguna vez has querido hacer que tus fotos se vean más nítidas, claras y realistas? ¿Tiene imágenes de baja resolución que desea ampliar sin perder calidad? Si es así, es posible que esté interesado en las herramientas de ampliación de imagen de IA. </p>
4
- <p>Las herramientas de ampliación de imagen de IA son aplicaciones de software que utilizan algoritmos de inteligencia artificial para mejorar y mejorar sus fotos. Pueden mejorar la resolución, la calidad y los detalles de sus imágenes sin edición manual. También pueden corregir imágenes borrosas, pixeladas y de baja resolución y hacerlas parecer profesionales y realistas. </p>
5
- <h2>descargar gratis la ampliadora de imágenes</h2><br /><p><b><b>Download Zip</b> &gt; <a href="https://bltlly.com/2v6JH3">https://bltlly.com/2v6JH3</a></b></p><br /><br />
6
- <p>En este artículo, te mostraremos los beneficios de usar herramientas de ampliación de imagen de IA, los mejores que puedes descargar gratis, cómo usarlos para mejorar tus fotos y algunos consejos y trucos para sacarles el máximo provecho. ¡Vamos a empezar! </p>
7
- <h2>Los beneficios de usar herramientas de ampliación de imagen de IA</h2>
8
- <p>Las herramientas de ampliación de imagen de IA pueden ayudarlo a lograr resultados increíbles con sus fotos. Aquí están algunos de los beneficios de usarlas:</p>
9
- <ul>
10
- <li><b>Mejora la calidad de imagen y la resolución sin perder detalles. </b> Las herramientas de ampliación de imagen IA pueden aumentar el tamaño de sus imágenes sin comprometer su calidad. Pueden preservar los detalles, texturas, colores y bordes de sus fotos mientras agregan más píxeles. De esta manera, puede obtener imágenes de alta resolución que son adecuadas para la impresión, diseño web o cualquier otro propósito. </li>
11
- <li><b>Corrige imágenes borrosas, pixeladas y de baja resolución. </b> Las herramientas de ampliación de imágenes IA también pueden corregir los problemas comunes que afectan a las imágenes de baja calidad. Pueden eliminar el ruido, los artefactos, el desenfoque y la distorsión de sus fotos y hacerlas ver nítidas y claras. También pueden restaurar los detalles y características que faltan de sus fotos y hacerlas ver realistas. </li>
12
-
13
- <li><b>Ahorre tiempo y dinero en la edición manual. </b> Las herramientas de ampliación de imagen de IA pueden hacer todo el trabajo por usted en segundos. Usted no necesita gastar horas o dinero en la contratación de un editor profesional o el uso de software complejo. Solo tiene que cargar el archivo de imagen, elegir el tamaño de salida deseado y la calidad, y esperar a que la IA para procesar la imagen. A continuación, puede descargar o compartir su imagen mejorada con facilidad. </li>
14
- </ul>
15
- <h2>Las mejores herramientas de ampliación de imagen de IA se pueden descargar gratis</h2>
16
- <p>Hay <p>Hay muchas herramientas de ampliación de imagen de IA disponibles en línea, pero no todas son gratuitas o confiables. Estos son algunos de los mejores que puedes descargar gratis y usar para mejorar y mejorar tus fotos:</p>
17
- <ul>
18
- <li><b>Upscayl:</b> Upscayl es una imagen de código abierto y libre para Linux, MacOS y Windows. Utiliza un modelo de aprendizaje profundo llamado ESRGAN (Red Generativa de Superresolución Mejorada) para mejorar las imágenes hasta 16 veces su tamaño original. También puede mejorar los detalles, colores y texturas de sus imágenes. Puede descargar Upscayl desde su sitio web oficial o el repositorio de GitHub. También puede ver un video tutorial sobre cómo usarlo aquí. </li>
19
- <li><b>Let’s Enhance:</b> Let’s Enhance es una aplicación en línea y ampliadora de fotos gratuita que utiliza la IA para mejorar y generar imágenes. Puede mejorar las imágenes hasta 16 veces su tamaño original y mejorar su calidad y resolución. También puede agregar fondos realistas, objetos, caras o texto a sus imágenes. Puedes usar Let’s Enhance gratis con algunas limitaciones o actualizar a un plan premium para obtener más funciones y beneficios. Puede acceder a Let’s Enhance desde su sitio web oficial o descargar su aplicación para dispositivos Android o iOS. </li>
20
-
21
- </ul>
22
- <h2>Cómo utilizar herramientas de ampliación de imagen de IA para mejorar sus fotos</h2>
23
- <p>El uso de herramientas de ampliación de imagen de IA es muy fácil y rápido. Estos son los pasos básicos que debe seguir para mejorar sus fotos con IA:</p>
24
- <ol>
25
- <li><b>Seleccione o arrastre y suelte su archivo de imagen. </b> El primer paso es elegir el archivo de imagen que desea mejorar y mejorar. Puede seleccionarlo desde su dispositivo o arrastrarlo y soltarlo en la interfaz de la herramienta. La mayoría de las herramientas soportan formatos de imagen comunes como JPG, PNG, BMP, TIFF, etc.</li>
26
- <li><b>Elija el tamaño y la calidad de salida deseados. </b> El siguiente paso es elegir cuánto desea ampliar su imagen y qué nivel de calidad desea alcanzar. La mayoría de las herramientas ofrecen diferentes opciones para el tamaño y la calidad de salida, como 2x, 4x, 8x, 16x, low, medium, high, etc. También puede personalizar la configuración de salida según sus preferencias. </li>
27
- <li><b>Espera a que la IA procese tu imagen. </b> El tercer paso es esperar a que la IA procese tu imagen. Dependiendo de la herramienta, el tamaño de la imagen y la configuración de salida que haya elegido, esto puede tardar de unos segundos a unos pocos minutos. Normalmente puede ver el progreso del procesamiento en la interfaz de la herramienta. </li>
28
- <li><b>Descarga o comparte tu imagen mejorada. </b> El paso final es descargar o compartir tu imagen mejorada. La mayoría de las herramientas te permiten descargar tu imagen en varios formatos como JPG, PNG, PDF, etc. También puedes compartir tu imagen por correo electrónico, redes sociales, almacenamiento en la nube, etc.</li>
29
- </ol>
30
- <h2>Consejos y trucos para obtener el máximo provecho de la IA herramientas de ampliación de imagen</h2>
31
- <p>Para obtener los mejores resultados con las herramientas de ampliación de imagen de IA, aquí hay algunos consejos y trucos que debe tener en cuenta:</p>
32
- <ul>
33
-
34
- <li><b>Experimenta con diferentes modelos y configuraciones para encontrar el mejor ajuste para tu imagen. </b> Diferentes modelos y configuraciones de IA pueden producir diferentes resultados para diferentes imágenes. Algunos modelos pueden funcionar mejor para ciertos tipos de imágenes que otros. Algunos ajustes también pueden afectar la velocidad, precisión y realismo de la imagen de salida. Por lo tanto, se recomienda experimentar con diferentes modelos y configuraciones para encontrar el mejor ajuste para su imagen. </li>
35
- <li><b>Compara las imágenes originales y mejoradas para ver la diferencia. </b> La mayoría de las herramientas le permiten La mayoría de las herramientas le permiten comparar las imágenes originales y mejoradas una al lado de la otra o con un control deslizante. De esta manera, puede ver la diferencia y evaluar la mejora. También puede acercar y alejar para ver los detalles y la calidad de sus imágenes. Esto puede ayudarle a decidir si está satisfecho con la salida o no. </li>
36
- <li><b>Utilice la edición por lotes para mejorar varias imágenes a la vez. </b> Si tiene muchas imágenes que desea mejorar y mejorar, puede usar la edición por lotes para ahorrar tiempo y esfuerzo. La mayoría de las herramientas le permiten subir varias imágenes a la vez y procesarlas de una sola vez. También puede aplicar los mismos ajustes y modelos a todas sus imágenes o personalizarlas individualmente. A continuación, puede descargar o compartir todas sus imágenes mejoradas con un solo clic. </li>
37
- </ul>
38
- <h2>Conclusión</h2>
39
- <p>Las herramientas de ampliación de imagen de IA son aplicaciones increíbles que pueden ayudarlo a mejorar y mejorar sus fotos con inteligencia artificial. Pueden mejorar la calidad, la resolución y los detalles de sus imágenes sin edición manual. También pueden corregir imágenes borrosas, pixeladas y de baja resolución y hacerlas parecer profesionales y realistas. </p>
40
- <p></p>
41
- <p>En este artículo, te mostramos los beneficios de usar herramientas de ampliación de imagen de IA, los mejores que puedes descargar gratis, cómo usarlos para mejorar tus fotos y algunos consejos y trucos para sacarles el máximo provecho. Esperamos que haya encontrado este artículo útil e informativo. </p>
42
-
43
- <p>Gracias por leer este artículo. Si tiene alguna pregunta o comentario, no dude en dejar un comentario a continuación. ¡Nos encantaría saber de ti! </p>
44
- <h2>Preguntas frecuentes</h2>
45
- <p>Aquí hay algunas preguntas frecuentes sobre las herramientas de ampliación de imagen de IA:</p>
46
- <ol>
47
- <li><b> ¿Qué es la ampliadora de imagen IA? </b> La ampliadora de imágenes IA es una aplicación de software que utiliza algoritmos de inteligencia artificial para mejorar y mejorar sus fotos. Puede mejorar la resolución, la calidad y los detalles de sus imágenes sin edición manual. También puede corregir imágenes borrosas, pixeladas y de baja resolución y hacerlas parecer profesionales y realistas. </li>
48
- <li><b>¿Por qué necesito una ampliadora de imagen IA? </b> Es posible que necesite una ampliadora de imagen IA si desea que sus fotos se vean más nítidas, claras y realistas. También puede necesitarlo si tiene imágenes de baja resolución que desea ampliar sin perder calidad. La ampliadora de imágenes AI puede ayudarlo a lograr resultados increíbles con sus fotos sin pasar horas o dinero en contratar a un editor profesional o usar software complejo. </li>
49
- <li><b> ¿Cómo funciona la ampliadora de imágenes IA? </b> La ampliadora de imágenes IA funciona mediante el uso de modelos de aprendizaje profundo que han sido entrenados en millones de imágenes de alta calidad. Estos modelos pueden analizar la imagen de entrada y generar una nueva imagen de salida que tenga más píxeles, detalles, colores y características. También pueden corregir los problemas comunes que afectan a imágenes de baja calidad como ruido, artefactos, desenfoque y distorsión. </li>
50
- <li><b>¿Cuánto cuesta la ampliadora de imágenes IA? </b> Las herramientas de ampliadora de imágenes IA varían en sus precios y características. Algunos de ellos son gratuitos u ofrecen pruebas gratuitas con algunas limitaciones. Algunos de ellos requieren una suscripción o un pago único para más características y beneficios. Puede comparar los precios y características de diferentes herramientas de ampliación de imagen de IA en línea y elegir la que se adapte a sus necesidades y presupuesto. </li>
51
-
52
- </ol></p> 64aa2da5cf<br />
53
- <br />
54
- <br />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/BetterAPI/BetterChat/src/lib/switchTheme.ts DELETED
@@ -1,10 +0,0 @@
1
- export function switchTheme() {
2
- const { classList } = document.querySelector("html") as HTMLElement;
3
- if (classList.contains("dark")) {
4
- classList.remove("dark");
5
- localStorage.theme = "light";
6
- } else {
7
- classList.add("dark");
8
- localStorage.theme = "dark";
9
- }
10
- }
 
 
 
 
 
 
 
 
 
 
 
spaces/Big-Web/MMSD/env/Lib/site-packages/pip/_internal/models/link.py DELETED
@@ -1,531 +0,0 @@
1
- import functools
2
- import itertools
3
- import logging
4
- import os
5
- import posixpath
6
- import re
7
- import urllib.parse
8
- from dataclasses import dataclass
9
- from typing import (
10
- TYPE_CHECKING,
11
- Any,
12
- Dict,
13
- List,
14
- Mapping,
15
- NamedTuple,
16
- Optional,
17
- Tuple,
18
- Union,
19
- )
20
-
21
- from pip._internal.utils.deprecation import deprecated
22
- from pip._internal.utils.filetypes import WHEEL_EXTENSION
23
- from pip._internal.utils.hashes import Hashes
24
- from pip._internal.utils.misc import (
25
- pairwise,
26
- redact_auth_from_url,
27
- split_auth_from_netloc,
28
- splitext,
29
- )
30
- from pip._internal.utils.models import KeyBasedCompareMixin
31
- from pip._internal.utils.urls import path_to_url, url_to_path
32
-
33
- if TYPE_CHECKING:
34
- from pip._internal.index.collector import IndexContent
35
-
36
- logger = logging.getLogger(__name__)
37
-
38
-
39
- # Order matters, earlier hashes have a precedence over later hashes for what
40
- # we will pick to use.
41
- _SUPPORTED_HASHES = ("sha512", "sha384", "sha256", "sha224", "sha1", "md5")
42
-
43
-
44
- @dataclass(frozen=True)
45
- class LinkHash:
46
- """Links to content may have embedded hash values. This class parses those.
47
-
48
- `name` must be any member of `_SUPPORTED_HASHES`.
49
-
50
- This class can be converted to and from `ArchiveInfo`. While ArchiveInfo intends to
51
- be JSON-serializable to conform to PEP 610, this class contains the logic for
52
- parsing a hash name and value for correctness, and then checking whether that hash
53
- conforms to a schema with `.is_hash_allowed()`."""
54
-
55
- name: str
56
- value: str
57
-
58
- _hash_url_fragment_re = re.compile(
59
- # NB: we do not validate that the second group (.*) is a valid hex
60
- # digest. Instead, we simply keep that string in this class, and then check it
61
- # against Hashes when hash-checking is needed. This is easier to debug than
62
- # proactively discarding an invalid hex digest, as we handle incorrect hashes
63
- # and malformed hashes in the same place.
64
- r"[#&]({choices})=([^&]*)".format(
65
- choices="|".join(re.escape(hash_name) for hash_name in _SUPPORTED_HASHES)
66
- ),
67
- )
68
-
69
- def __post_init__(self) -> None:
70
- assert self.name in _SUPPORTED_HASHES
71
-
72
- @classmethod
73
- def parse_pep658_hash(cls, dist_info_metadata: str) -> Optional["LinkHash"]:
74
- """Parse a PEP 658 data-dist-info-metadata hash."""
75
- if dist_info_metadata == "true":
76
- return None
77
- name, sep, value = dist_info_metadata.partition("=")
78
- if not sep:
79
- return None
80
- if name not in _SUPPORTED_HASHES:
81
- return None
82
- return cls(name=name, value=value)
83
-
84
- @classmethod
85
- @functools.lru_cache(maxsize=None)
86
- def find_hash_url_fragment(cls, url: str) -> Optional["LinkHash"]:
87
- """Search a string for a checksum algorithm name and encoded output value."""
88
- match = cls._hash_url_fragment_re.search(url)
89
- if match is None:
90
- return None
91
- name, value = match.groups()
92
- return cls(name=name, value=value)
93
-
94
- def as_dict(self) -> Dict[str, str]:
95
- return {self.name: self.value}
96
-
97
- def as_hashes(self) -> Hashes:
98
- """Return a Hashes instance which checks only for the current hash."""
99
- return Hashes({self.name: [self.value]})
100
-
101
- def is_hash_allowed(self, hashes: Optional[Hashes]) -> bool:
102
- """
103
- Return True if the current hash is allowed by `hashes`.
104
- """
105
- if hashes is None:
106
- return False
107
- return hashes.is_hash_allowed(self.name, hex_digest=self.value)
108
-
109
-
110
- def _clean_url_path_part(part: str) -> str:
111
- """
112
- Clean a "part" of a URL path (i.e. after splitting on "@" characters).
113
- """
114
- # We unquote prior to quoting to make sure nothing is double quoted.
115
- return urllib.parse.quote(urllib.parse.unquote(part))
116
-
117
-
118
- def _clean_file_url_path(part: str) -> str:
119
- """
120
- Clean the first part of a URL path that corresponds to a local
121
- filesystem path (i.e. the first part after splitting on "@" characters).
122
- """
123
- # We unquote prior to quoting to make sure nothing is double quoted.
124
- # Also, on Windows the path part might contain a drive letter which
125
- # should not be quoted. On Linux where drive letters do not
126
- # exist, the colon should be quoted. We rely on urllib.request
127
- # to do the right thing here.
128
- return urllib.request.pathname2url(urllib.request.url2pathname(part))
129
-
130
-
131
- # percent-encoded: /
132
- _reserved_chars_re = re.compile("(@|%2F)", re.IGNORECASE)
133
-
134
-
135
- def _clean_url_path(path: str, is_local_path: bool) -> str:
136
- """
137
- Clean the path portion of a URL.
138
- """
139
- if is_local_path:
140
- clean_func = _clean_file_url_path
141
- else:
142
- clean_func = _clean_url_path_part
143
-
144
- # Split on the reserved characters prior to cleaning so that
145
- # revision strings in VCS URLs are properly preserved.
146
- parts = _reserved_chars_re.split(path)
147
-
148
- cleaned_parts = []
149
- for to_clean, reserved in pairwise(itertools.chain(parts, [""])):
150
- cleaned_parts.append(clean_func(to_clean))
151
- # Normalize %xx escapes (e.g. %2f -> %2F)
152
- cleaned_parts.append(reserved.upper())
153
-
154
- return "".join(cleaned_parts)
155
-
156
-
157
- def _ensure_quoted_url(url: str) -> str:
158
- """
159
- Make sure a link is fully quoted.
160
- For example, if ' ' occurs in the URL, it will be replaced with "%20",
161
- and without double-quoting other characters.
162
- """
163
- # Split the URL into parts according to the general structure
164
- # `scheme://netloc/path;parameters?query#fragment`.
165
- result = urllib.parse.urlparse(url)
166
- # If the netloc is empty, then the URL refers to a local filesystem path.
167
- is_local_path = not result.netloc
168
- path = _clean_url_path(result.path, is_local_path=is_local_path)
169
- return urllib.parse.urlunparse(result._replace(path=path))
170
-
171
-
172
- class Link(KeyBasedCompareMixin):
173
- """Represents a parsed link from a Package Index's simple URL"""
174
-
175
- __slots__ = [
176
- "_parsed_url",
177
- "_url",
178
- "_hashes",
179
- "comes_from",
180
- "requires_python",
181
- "yanked_reason",
182
- "dist_info_metadata",
183
- "cache_link_parsing",
184
- "egg_fragment",
185
- ]
186
-
187
- def __init__(
188
- self,
189
- url: str,
190
- comes_from: Optional[Union[str, "IndexContent"]] = None,
191
- requires_python: Optional[str] = None,
192
- yanked_reason: Optional[str] = None,
193
- dist_info_metadata: Optional[str] = None,
194
- cache_link_parsing: bool = True,
195
- hashes: Optional[Mapping[str, str]] = None,
196
- ) -> None:
197
- """
198
- :param url: url of the resource pointed to (href of the link)
199
- :param comes_from: instance of IndexContent where the link was found,
200
- or string.
201
- :param requires_python: String containing the `Requires-Python`
202
- metadata field, specified in PEP 345. This may be specified by
203
- a data-requires-python attribute in the HTML link tag, as
204
- described in PEP 503.
205
- :param yanked_reason: the reason the file has been yanked, if the
206
- file has been yanked, or None if the file hasn't been yanked.
207
- This is the value of the "data-yanked" attribute, if present, in
208
- a simple repository HTML link. If the file has been yanked but
209
- no reason was provided, this should be the empty string. See
210
- PEP 592 for more information and the specification.
211
- :param dist_info_metadata: the metadata attached to the file, or None if no such
212
- metadata is provided. This is the value of the "data-dist-info-metadata"
213
- attribute, if present, in a simple repository HTML link. This may be parsed
214
- into its own `Link` by `self.metadata_link()`. See PEP 658 for more
215
- information and the specification.
216
- :param cache_link_parsing: A flag that is used elsewhere to determine
217
- whether resources retrieved from this link should be cached. PyPI
218
- URLs should generally have this set to False, for example.
219
- :param hashes: A mapping of hash names to digests to allow us to
220
- determine the validity of a download.
221
- """
222
-
223
- # url can be a UNC windows share
224
- if url.startswith("\\\\"):
225
- url = path_to_url(url)
226
-
227
- self._parsed_url = urllib.parse.urlsplit(url)
228
- # Store the url as a private attribute to prevent accidentally
229
- # trying to set a new value.
230
- self._url = url
231
-
232
- link_hash = LinkHash.find_hash_url_fragment(url)
233
- hashes_from_link = {} if link_hash is None else link_hash.as_dict()
234
- if hashes is None:
235
- self._hashes = hashes_from_link
236
- else:
237
- self._hashes = {**hashes, **hashes_from_link}
238
-
239
- self.comes_from = comes_from
240
- self.requires_python = requires_python if requires_python else None
241
- self.yanked_reason = yanked_reason
242
- self.dist_info_metadata = dist_info_metadata
243
-
244
- super().__init__(key=url, defining_class=Link)
245
-
246
- self.cache_link_parsing = cache_link_parsing
247
- self.egg_fragment = self._egg_fragment()
248
-
249
- @classmethod
250
- def from_json(
251
- cls,
252
- file_data: Dict[str, Any],
253
- page_url: str,
254
- ) -> Optional["Link"]:
255
- """
256
- Convert an pypi json document from a simple repository page into a Link.
257
- """
258
- file_url = file_data.get("url")
259
- if file_url is None:
260
- return None
261
-
262
- url = _ensure_quoted_url(urllib.parse.urljoin(page_url, file_url))
263
- pyrequire = file_data.get("requires-python")
264
- yanked_reason = file_data.get("yanked")
265
- dist_info_metadata = file_data.get("dist-info-metadata")
266
- hashes = file_data.get("hashes", {})
267
-
268
- # The Link.yanked_reason expects an empty string instead of a boolean.
269
- if yanked_reason and not isinstance(yanked_reason, str):
270
- yanked_reason = ""
271
- # The Link.yanked_reason expects None instead of False.
272
- elif not yanked_reason:
273
- yanked_reason = None
274
-
275
- return cls(
276
- url,
277
- comes_from=page_url,
278
- requires_python=pyrequire,
279
- yanked_reason=yanked_reason,
280
- hashes=hashes,
281
- dist_info_metadata=dist_info_metadata,
282
- )
283
-
284
- @classmethod
285
- def from_element(
286
- cls,
287
- anchor_attribs: Dict[str, Optional[str]],
288
- page_url: str,
289
- base_url: str,
290
- ) -> Optional["Link"]:
291
- """
292
- Convert an anchor element's attributes in a simple repository page to a Link.
293
- """
294
- href = anchor_attribs.get("href")
295
- if not href:
296
- return None
297
-
298
- url = _ensure_quoted_url(urllib.parse.urljoin(base_url, href))
299
- pyrequire = anchor_attribs.get("data-requires-python")
300
- yanked_reason = anchor_attribs.get("data-yanked")
301
- dist_info_metadata = anchor_attribs.get("data-dist-info-metadata")
302
-
303
- return cls(
304
- url,
305
- comes_from=page_url,
306
- requires_python=pyrequire,
307
- yanked_reason=yanked_reason,
308
- dist_info_metadata=dist_info_metadata,
309
- )
310
-
311
- def __str__(self) -> str:
312
- if self.requires_python:
313
- rp = f" (requires-python:{self.requires_python})"
314
- else:
315
- rp = ""
316
- if self.comes_from:
317
- return "{} (from {}){}".format(
318
- redact_auth_from_url(self._url), self.comes_from, rp
319
- )
320
- else:
321
- return redact_auth_from_url(str(self._url))
322
-
323
- def __repr__(self) -> str:
324
- return f"<Link {self}>"
325
-
326
- @property
327
- def url(self) -> str:
328
- return self._url
329
-
330
- @property
331
- def filename(self) -> str:
332
- path = self.path.rstrip("/")
333
- name = posixpath.basename(path)
334
- if not name:
335
- # Make sure we don't leak auth information if the netloc
336
- # includes a username and password.
337
- netloc, user_pass = split_auth_from_netloc(self.netloc)
338
- return netloc
339
-
340
- name = urllib.parse.unquote(name)
341
- assert name, f"URL {self._url!r} produced no filename"
342
- return name
343
-
344
- @property
345
- def file_path(self) -> str:
346
- return url_to_path(self.url)
347
-
348
- @property
349
- def scheme(self) -> str:
350
- return self._parsed_url.scheme
351
-
352
- @property
353
- def netloc(self) -> str:
354
- """
355
- This can contain auth information.
356
- """
357
- return self._parsed_url.netloc
358
-
359
- @property
360
- def path(self) -> str:
361
- return urllib.parse.unquote(self._parsed_url.path)
362
-
363
- def splitext(self) -> Tuple[str, str]:
364
- return splitext(posixpath.basename(self.path.rstrip("/")))
365
-
366
- @property
367
- def ext(self) -> str:
368
- return self.splitext()[1]
369
-
370
- @property
371
- def url_without_fragment(self) -> str:
372
- scheme, netloc, path, query, fragment = self._parsed_url
373
- return urllib.parse.urlunsplit((scheme, netloc, path, query, ""))
374
-
375
- _egg_fragment_re = re.compile(r"[#&]egg=([^&]*)")
376
-
377
- # Per PEP 508.
378
- _project_name_re = re.compile(
379
- r"^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$", re.IGNORECASE
380
- )
381
-
382
- def _egg_fragment(self) -> Optional[str]:
383
- match = self._egg_fragment_re.search(self._url)
384
- if not match:
385
- return None
386
-
387
- # An egg fragment looks like a PEP 508 project name, along with
388
- # an optional extras specifier. Anything else is invalid.
389
- project_name = match.group(1)
390
- if not self._project_name_re.match(project_name):
391
- deprecated(
392
- reason=f"{self} contains an egg fragment with a non-PEP 508 name",
393
- replacement="to use the req @ url syntax, and remove the egg fragment",
394
- gone_in="25.0",
395
- issue=11617,
396
- )
397
-
398
- return project_name
399
-
400
- _subdirectory_fragment_re = re.compile(r"[#&]subdirectory=([^&]*)")
401
-
402
- @property
403
- def subdirectory_fragment(self) -> Optional[str]:
404
- match = self._subdirectory_fragment_re.search(self._url)
405
- if not match:
406
- return None
407
- return match.group(1)
408
-
409
- def metadata_link(self) -> Optional["Link"]:
410
- """Implementation of PEP 658 parsing."""
411
- # Note that Link.from_element() parsing the "data-dist-info-metadata" attribute
412
- # from an HTML anchor tag is typically how the Link.dist_info_metadata attribute
413
- # gets set.
414
- if self.dist_info_metadata is None:
415
- return None
416
- metadata_url = f"{self.url_without_fragment}.metadata"
417
- metadata_link_hash = LinkHash.parse_pep658_hash(self.dist_info_metadata)
418
- if metadata_link_hash is None:
419
- return Link(metadata_url)
420
- return Link(metadata_url, hashes=metadata_link_hash.as_dict())
421
-
422
- def as_hashes(self) -> Hashes:
423
- return Hashes({k: [v] for k, v in self._hashes.items()})
424
-
425
- @property
426
- def hash(self) -> Optional[str]:
427
- return next(iter(self._hashes.values()), None)
428
-
429
- @property
430
- def hash_name(self) -> Optional[str]:
431
- return next(iter(self._hashes), None)
432
-
433
- @property
434
- def show_url(self) -> str:
435
- return posixpath.basename(self._url.split("#", 1)[0].split("?", 1)[0])
436
-
437
- @property
438
- def is_file(self) -> bool:
439
- return self.scheme == "file"
440
-
441
- def is_existing_dir(self) -> bool:
442
- return self.is_file and os.path.isdir(self.file_path)
443
-
444
- @property
445
- def is_wheel(self) -> bool:
446
- return self.ext == WHEEL_EXTENSION
447
-
448
- @property
449
- def is_vcs(self) -> bool:
450
- from pip._internal.vcs import vcs
451
-
452
- return self.scheme in vcs.all_schemes
453
-
454
- @property
455
- def is_yanked(self) -> bool:
456
- return self.yanked_reason is not None
457
-
458
- @property
459
- def has_hash(self) -> bool:
460
- return bool(self._hashes)
461
-
462
- def is_hash_allowed(self, hashes: Optional[Hashes]) -> bool:
463
- """
464
- Return True if the link has a hash and it is allowed by `hashes`.
465
- """
466
- if hashes is None:
467
- return False
468
- return any(hashes.is_hash_allowed(k, v) for k, v in self._hashes.items())
469
-
470
-
471
- class _CleanResult(NamedTuple):
472
- """Convert link for equivalency check.
473
-
474
- This is used in the resolver to check whether two URL-specified requirements
475
- likely point to the same distribution and can be considered equivalent. This
476
- equivalency logic avoids comparing URLs literally, which can be too strict
477
- (e.g. "a=1&b=2" vs "b=2&a=1") and produce conflicts unexpecting to users.
478
-
479
- Currently this does three things:
480
-
481
- 1. Drop the basic auth part. This is technically wrong since a server can
482
- serve different content based on auth, but if it does that, it is even
483
- impossible to guarantee two URLs without auth are equivalent, since
484
- the user can input different auth information when prompted. So the
485
- practical solution is to assume the auth doesn't affect the response.
486
- 2. Parse the query to avoid the ordering issue. Note that ordering under the
487
- same key in the query are NOT cleaned; i.e. "a=1&a=2" and "a=2&a=1" are
488
- still considered different.
489
- 3. Explicitly drop most of the fragment part, except ``subdirectory=`` and
490
- hash values, since it should have no impact the downloaded content. Note
491
- that this drops the "egg=" part historically used to denote the requested
492
- project (and extras), which is wrong in the strictest sense, but too many
493
- people are supplying it inconsistently to cause superfluous resolution
494
- conflicts, so we choose to also ignore them.
495
- """
496
-
497
- parsed: urllib.parse.SplitResult
498
- query: Dict[str, List[str]]
499
- subdirectory: str
500
- hashes: Dict[str, str]
501
-
502
-
503
- def _clean_link(link: Link) -> _CleanResult:
504
- parsed = link._parsed_url
505
- netloc = parsed.netloc.rsplit("@", 1)[-1]
506
- # According to RFC 8089, an empty host in file: means localhost.
507
- if parsed.scheme == "file" and not netloc:
508
- netloc = "localhost"
509
- fragment = urllib.parse.parse_qs(parsed.fragment)
510
- if "egg" in fragment:
511
- logger.debug("Ignoring egg= fragment in %s", link)
512
- try:
513
- # If there are multiple subdirectory values, use the first one.
514
- # This matches the behavior of Link.subdirectory_fragment.
515
- subdirectory = fragment["subdirectory"][0]
516
- except (IndexError, KeyError):
517
- subdirectory = ""
518
- # If there are multiple hash values under the same algorithm, use the
519
- # first one. This matches the behavior of Link.hash_value.
520
- hashes = {k: fragment[k][0] for k in _SUPPORTED_HASHES if k in fragment}
521
- return _CleanResult(
522
- parsed=parsed._replace(netloc=netloc, query="", fragment=""),
523
- query=urllib.parse.parse_qs(parsed.query),
524
- subdirectory=subdirectory,
525
- hashes=hashes,
526
- )
527
-
528
-
529
- @functools.lru_cache(maxsize=None)
530
- def links_equivalent(link1: Link, link2: Link) -> bool:
531
- return _clean_link(link1) == _clean_link(link2)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Big-Web/MMSD/env/Lib/site-packages/setuptools/_distutils/version.py DELETED
@@ -1,358 +0,0 @@
1
- #
2
- # distutils/version.py
3
- #
4
- # Implements multiple version numbering conventions for the
5
- # Python Module Distribution Utilities.
6
- #
7
- # $Id$
8
- #
9
-
10
- """Provides classes to represent module version numbers (one class for
11
- each style of version numbering). There are currently two such classes
12
- implemented: StrictVersion and LooseVersion.
13
-
14
- Every version number class implements the following interface:
15
- * the 'parse' method takes a string and parses it to some internal
16
- representation; if the string is an invalid version number,
17
- 'parse' raises a ValueError exception
18
- * the class constructor takes an optional string argument which,
19
- if supplied, is passed to 'parse'
20
- * __str__ reconstructs the string that was passed to 'parse' (or
21
- an equivalent string -- ie. one that will generate an equivalent
22
- version number instance)
23
- * __repr__ generates Python code to recreate the version number instance
24
- * _cmp compares the current instance with either another instance
25
- of the same class or a string (which will be parsed to an instance
26
- of the same class, thus must follow the same rules)
27
- """
28
-
29
- import re
30
- import warnings
31
- import contextlib
32
-
33
-
34
- @contextlib.contextmanager
35
- def suppress_known_deprecation():
36
- with warnings.catch_warnings(record=True) as ctx:
37
- warnings.filterwarnings(
38
- action='default',
39
- category=DeprecationWarning,
40
- message="distutils Version classes are deprecated.",
41
- )
42
- yield ctx
43
-
44
-
45
- class Version:
46
- """Abstract base class for version numbering classes. Just provides
47
- constructor (__init__) and reproducer (__repr__), because those
48
- seem to be the same for all version numbering classes; and route
49
- rich comparisons to _cmp.
50
- """
51
-
52
- def __init__(self, vstring=None):
53
- if vstring:
54
- self.parse(vstring)
55
- warnings.warn(
56
- "distutils Version classes are deprecated. "
57
- "Use packaging.version instead.",
58
- DeprecationWarning,
59
- stacklevel=2,
60
- )
61
-
62
- def __repr__(self):
63
- return "{} ('{}')".format(self.__class__.__name__, str(self))
64
-
65
- def __eq__(self, other):
66
- c = self._cmp(other)
67
- if c is NotImplemented:
68
- return c
69
- return c == 0
70
-
71
- def __lt__(self, other):
72
- c = self._cmp(other)
73
- if c is NotImplemented:
74
- return c
75
- return c < 0
76
-
77
- def __le__(self, other):
78
- c = self._cmp(other)
79
- if c is NotImplemented:
80
- return c
81
- return c <= 0
82
-
83
- def __gt__(self, other):
84
- c = self._cmp(other)
85
- if c is NotImplemented:
86
- return c
87
- return c > 0
88
-
89
- def __ge__(self, other):
90
- c = self._cmp(other)
91
- if c is NotImplemented:
92
- return c
93
- return c >= 0
94
-
95
-
96
- # Interface for version-number classes -- must be implemented
97
- # by the following classes (the concrete ones -- Version should
98
- # be treated as an abstract class).
99
- # __init__ (string) - create and take same action as 'parse'
100
- # (string parameter is optional)
101
- # parse (string) - convert a string representation to whatever
102
- # internal representation is appropriate for
103
- # this style of version numbering
104
- # __str__ (self) - convert back to a string; should be very similar
105
- # (if not identical to) the string supplied to parse
106
- # __repr__ (self) - generate Python code to recreate
107
- # the instance
108
- # _cmp (self, other) - compare two version numbers ('other' may
109
- # be an unparsed version string, or another
110
- # instance of your version class)
111
-
112
-
113
- class StrictVersion(Version):
114
-
115
- """Version numbering for anal retentives and software idealists.
116
- Implements the standard interface for version number classes as
117
- described above. A version number consists of two or three
118
- dot-separated numeric components, with an optional "pre-release" tag
119
- on the end. The pre-release tag consists of the letter 'a' or 'b'
120
- followed by a number. If the numeric components of two version
121
- numbers are equal, then one with a pre-release tag will always
122
- be deemed earlier (lesser) than one without.
123
-
124
- The following are valid version numbers (shown in the order that
125
- would be obtained by sorting according to the supplied cmp function):
126
-
127
- 0.4 0.4.0 (these two are equivalent)
128
- 0.4.1
129
- 0.5a1
130
- 0.5b3
131
- 0.5
132
- 0.9.6
133
- 1.0
134
- 1.0.4a3
135
- 1.0.4b1
136
- 1.0.4
137
-
138
- The following are examples of invalid version numbers:
139
-
140
- 1
141
- 2.7.2.2
142
- 1.3.a4
143
- 1.3pl1
144
- 1.3c4
145
-
146
- The rationale for this version numbering system will be explained
147
- in the distutils documentation.
148
- """
149
-
150
- version_re = re.compile(
151
- r'^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$', re.VERBOSE | re.ASCII
152
- )
153
-
154
- def parse(self, vstring):
155
- match = self.version_re.match(vstring)
156
- if not match:
157
- raise ValueError("invalid version number '%s'" % vstring)
158
-
159
- (major, minor, patch, prerelease, prerelease_num) = match.group(1, 2, 4, 5, 6)
160
-
161
- if patch:
162
- self.version = tuple(map(int, [major, minor, patch]))
163
- else:
164
- self.version = tuple(map(int, [major, minor])) + (0,)
165
-
166
- if prerelease:
167
- self.prerelease = (prerelease[0], int(prerelease_num))
168
- else:
169
- self.prerelease = None
170
-
171
- def __str__(self):
172
-
173
- if self.version[2] == 0:
174
- vstring = '.'.join(map(str, self.version[0:2]))
175
- else:
176
- vstring = '.'.join(map(str, self.version))
177
-
178
- if self.prerelease:
179
- vstring = vstring + self.prerelease[0] + str(self.prerelease[1])
180
-
181
- return vstring
182
-
183
- def _cmp(self, other): # noqa: C901
184
- if isinstance(other, str):
185
- with suppress_known_deprecation():
186
- other = StrictVersion(other)
187
- elif not isinstance(other, StrictVersion):
188
- return NotImplemented
189
-
190
- if self.version != other.version:
191
- # numeric versions don't match
192
- # prerelease stuff doesn't matter
193
- if self.version < other.version:
194
- return -1
195
- else:
196
- return 1
197
-
198
- # have to compare prerelease
199
- # case 1: neither has prerelease; they're equal
200
- # case 2: self has prerelease, other doesn't; other is greater
201
- # case 3: self doesn't have prerelease, other does: self is greater
202
- # case 4: both have prerelease: must compare them!
203
-
204
- if not self.prerelease and not other.prerelease:
205
- return 0
206
- elif self.prerelease and not other.prerelease:
207
- return -1
208
- elif not self.prerelease and other.prerelease:
209
- return 1
210
- elif self.prerelease and other.prerelease:
211
- if self.prerelease == other.prerelease:
212
- return 0
213
- elif self.prerelease < other.prerelease:
214
- return -1
215
- else:
216
- return 1
217
- else:
218
- assert False, "never get here"
219
-
220
-
221
- # end class StrictVersion
222
-
223
-
224
- # The rules according to Greg Stein:
225
- # 1) a version number has 1 or more numbers separated by a period or by
226
- # sequences of letters. If only periods, then these are compared
227
- # left-to-right to determine an ordering.
228
- # 2) sequences of letters are part of the tuple for comparison and are
229
- # compared lexicographically
230
- # 3) recognize the numeric components may have leading zeroes
231
- #
232
- # The LooseVersion class below implements these rules: a version number
233
- # string is split up into a tuple of integer and string components, and
234
- # comparison is a simple tuple comparison. This means that version
235
- # numbers behave in a predictable and obvious way, but a way that might
236
- # not necessarily be how people *want* version numbers to behave. There
237
- # wouldn't be a problem if people could stick to purely numeric version
238
- # numbers: just split on period and compare the numbers as tuples.
239
- # However, people insist on putting letters into their version numbers;
240
- # the most common purpose seems to be:
241
- # - indicating a "pre-release" version
242
- # ('alpha', 'beta', 'a', 'b', 'pre', 'p')
243
- # - indicating a post-release patch ('p', 'pl', 'patch')
244
- # but of course this can't cover all version number schemes, and there's
245
- # no way to know what a programmer means without asking him.
246
- #
247
- # The problem is what to do with letters (and other non-numeric
248
- # characters) in a version number. The current implementation does the
249
- # obvious and predictable thing: keep them as strings and compare
250
- # lexically within a tuple comparison. This has the desired effect if
251
- # an appended letter sequence implies something "post-release":
252
- # eg. "0.99" < "0.99pl14" < "1.0", and "5.001" < "5.001m" < "5.002".
253
- #
254
- # However, if letters in a version number imply a pre-release version,
255
- # the "obvious" thing isn't correct. Eg. you would expect that
256
- # "1.5.1" < "1.5.2a2" < "1.5.2", but under the tuple/lexical comparison
257
- # implemented here, this just isn't so.
258
- #
259
- # Two possible solutions come to mind. The first is to tie the
260
- # comparison algorithm to a particular set of semantic rules, as has
261
- # been done in the StrictVersion class above. This works great as long
262
- # as everyone can go along with bondage and discipline. Hopefully a
263
- # (large) subset of Python module programmers will agree that the
264
- # particular flavour of bondage and discipline provided by StrictVersion
265
- # provides enough benefit to be worth using, and will submit their
266
- # version numbering scheme to its domination. The free-thinking
267
- # anarchists in the lot will never give in, though, and something needs
268
- # to be done to accommodate them.
269
- #
270
- # Perhaps a "moderately strict" version class could be implemented that
271
- # lets almost anything slide (syntactically), and makes some heuristic
272
- # assumptions about non-digits in version number strings. This could
273
- # sink into special-case-hell, though; if I was as talented and
274
- # idiosyncratic as Larry Wall, I'd go ahead and implement a class that
275
- # somehow knows that "1.2.1" < "1.2.2a2" < "1.2.2" < "1.2.2pl3", and is
276
- # just as happy dealing with things like "2g6" and "1.13++". I don't
277
- # think I'm smart enough to do it right though.
278
- #
279
- # In any case, I've coded the test suite for this module (see
280
- # ../test/test_version.py) specifically to fail on things like comparing
281
- # "1.2a2" and "1.2". That's not because the *code* is doing anything
282
- # wrong, it's because the simple, obvious design doesn't match my
283
- # complicated, hairy expectations for real-world version numbers. It
284
- # would be a snap to fix the test suite to say, "Yep, LooseVersion does
285
- # the Right Thing" (ie. the code matches the conception). But I'd rather
286
- # have a conception that matches common notions about version numbers.
287
-
288
-
289
- class LooseVersion(Version):
290
-
291
- """Version numbering for anarchists and software realists.
292
- Implements the standard interface for version number classes as
293
- described above. A version number consists of a series of numbers,
294
- separated by either periods or strings of letters. When comparing
295
- version numbers, the numeric components will be compared
296
- numerically, and the alphabetic components lexically. The following
297
- are all valid version numbers, in no particular order:
298
-
299
- 1.5.1
300
- 1.5.2b2
301
- 161
302
- 3.10a
303
- 8.02
304
- 3.4j
305
- 1996.07.12
306
- 3.2.pl0
307
- 3.1.1.6
308
- 2g6
309
- 11g
310
- 0.960923
311
- 2.2beta29
312
- 1.13++
313
- 5.5.kw
314
- 2.0b1pl0
315
-
316
- In fact, there is no such thing as an invalid version number under
317
- this scheme; the rules for comparison are simple and predictable,
318
- but may not always give the results you want (for some definition
319
- of "want").
320
- """
321
-
322
- component_re = re.compile(r'(\d+ | [a-z]+ | \.)', re.VERBOSE)
323
-
324
- def parse(self, vstring):
325
- # I've given up on thinking I can reconstruct the version string
326
- # from the parsed tuple -- so I just store the string here for
327
- # use by __str__
328
- self.vstring = vstring
329
- components = [x for x in self.component_re.split(vstring) if x and x != '.']
330
- for i, obj in enumerate(components):
331
- try:
332
- components[i] = int(obj)
333
- except ValueError:
334
- pass
335
-
336
- self.version = components
337
-
338
- def __str__(self):
339
- return self.vstring
340
-
341
- def __repr__(self):
342
- return "LooseVersion ('%s')" % str(self)
343
-
344
- def _cmp(self, other):
345
- if isinstance(other, str):
346
- other = LooseVersion(other)
347
- elif not isinstance(other, LooseVersion):
348
- return NotImplemented
349
-
350
- if self.version == other.version:
351
- return 0
352
- if self.version < other.version:
353
- return -1
354
- if self.version > other.version:
355
- return 1
356
-
357
-
358
- # end class LooseVersion
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/BigSalmon/Bart/app.py DELETED
@@ -1,47 +0,0 @@
1
- import torch
2
- from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
3
- import streamlit as st
4
- st.title("Paraphrase")
5
-
6
- @st.cache(allow_output_mutation=True)
7
- def get_model():
8
- tokenizer = AutoTokenizer.from_pretrained("facebook/bart-large-cnn")
9
- model = AutoModelForSeq2SeqLM.from_pretrained("facebook/bart-large-cnn")
10
-
11
- return model, tokenizer
12
-
13
- model, tokenizer = get_model()
14
-
15
- device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
16
- model = model.to(device)
17
- temp = st.sidebar.slider("Temperature", 0.7, 1.5)
18
- number_of_outputs = st.sidebar.slider("Number of Outputs", 1, 10)
19
-
20
- def translate_to_english(model, tokenizer, text):
21
- translated_text = []
22
- text = text + " </s>"
23
- encoding = tokenizer.encode_plus(text,pad_to_max_length=True, return_tensors="pt")
24
- input_ids, attention_masks = encoding["input_ids"].to(device), encoding["attention_mask"].to(device)
25
- beam_outputs = model.generate(
26
- input_ids=input_ids, attention_mask=attention_masks,
27
- do_sample=True,
28
- max_length=256,
29
- temperature = temp,
30
- top_k=120,
31
- top_p=0.98,
32
- early_stopping=True,
33
- num_return_sequences=number_of_outputs,
34
- )
35
- for beam_output in beam_outputs:
36
- sent = tokenizer.decode(beam_output, skip_special_tokens=True,clean_up_tokenization_spaces=True)
37
- print(sent)
38
- translated_text.append(sent)
39
- return translated_text
40
-
41
- text = st.text_input("Okay")
42
- st.text("What you wrote: ")
43
- st.write(text)
44
- st.text("Output: ")
45
- if text:
46
- translated_text = translate_to_english(model, tokenizer, text)
47
- st.write(translated_text if translated_text else "No translation found")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/BlinkDL/ChatRWKV-gradio/app.py DELETED
@@ -1,134 +0,0 @@
1
- import gradio as gr
2
- import os, gc, copy, torch
3
- from datetime import datetime
4
- from huggingface_hub import hf_hub_download
5
- from pynvml import *
6
- nvmlInit()
7
- gpu_h = nvmlDeviceGetHandleByIndex(0)
8
- ctx_limit = 2000
9
- title = "RWKV-5-World-1B5-v2-20231025-ctx4096"
10
-
11
- os.environ["RWKV_JIT_ON"] = '1'
12
- os.environ["RWKV_CUDA_ON"] = '1' # if '1' then use CUDA kernel for seq mode (much faster)
13
-
14
- from rwkv.model import RWKV
15
- model_path = hf_hub_download(repo_id="BlinkDL/rwkv-5-world", filename=f"{title}.pth")
16
- model = RWKV(model=model_path, strategy='cuda fp16')
17
- from rwkv.utils import PIPELINE, PIPELINE_ARGS
18
- pipeline = PIPELINE(model, "rwkv_vocab_v20230424")
19
-
20
- def generate_prompt(instruction, input=""):
21
- instruction = instruction.strip().replace('\r\n','\n').replace('\n\n','\n')
22
- input = input.strip().replace('\r\n','\n').replace('\n\n','\n')
23
- if input:
24
- return f"""Instruction: {instruction}
25
-
26
- Input: {input}
27
-
28
- Response:"""
29
- else:
30
- return f"""User: hi
31
-
32
- Assistant: Hi. I am your assistant and I will provide expert full response in full details. Please feel free to ask any question and I will always answer it.
33
-
34
- User: {instruction}
35
-
36
- Assistant:"""
37
-
38
- def evaluate(
39
- ctx,
40
- token_count=200,
41
- temperature=1.0,
42
- top_p=0.7,
43
- presencePenalty = 0.1,
44
- countPenalty = 0.1,
45
- ):
46
- args = PIPELINE_ARGS(temperature = max(0.2, float(temperature)), top_p = float(top_p),
47
- alpha_frequency = countPenalty,
48
- alpha_presence = presencePenalty,
49
- token_ban = [], # ban the generation of some tokens
50
- token_stop = [0]) # stop generation whenever you see any token here
51
- ctx = ctx.strip()
52
- all_tokens = []
53
- out_last = 0
54
- out_str = ''
55
- occurrence = {}
56
- state = None
57
- for i in range(int(token_count)):
58
- out, state = model.forward(pipeline.encode(ctx)[-ctx_limit:] if i == 0 else [token], state)
59
- for n in occurrence:
60
- out[n] -= (args.alpha_presence + occurrence[n] * args.alpha_frequency)
61
-
62
- token = pipeline.sample_logits(out, temperature=args.temperature, top_p=args.top_p)
63
- if token in args.token_stop:
64
- break
65
- all_tokens += [token]
66
- for xxx in occurrence:
67
- occurrence[xxx] *= 0.996
68
- if token not in occurrence:
69
- occurrence[token] = 1
70
- else:
71
- occurrence[token] += 1
72
-
73
- tmp = pipeline.decode(all_tokens[out_last:])
74
- if '\ufffd' not in tmp:
75
- out_str += tmp
76
- yield out_str.strip()
77
- out_last = i + 1
78
-
79
- gpu_info = nvmlDeviceGetMemoryInfo(gpu_h)
80
- print(f'vram {gpu_info.total} used {gpu_info.used} free {gpu_info.free}')
81
- del out
82
- del state
83
- gc.collect()
84
- torch.cuda.empty_cache()
85
- yield out_str.strip()
86
-
87
- examples = [
88
- ["Assistant: Sure! Here is a very detailed plan to create flying pigs:", 333, 1, 0.3, 0, 1],
89
- ["Assistant: Sure! Here are some ideas for FTL drive:", 333, 1, 0.3, 0, 1],
90
- [generate_prompt("Tell me about ravens."), 333, 1, 0.3, 0, 1],
91
- [generate_prompt("Écrivez un programme Python pour miner 1 Bitcoin, avec des commentaires."), 333, 1, 0.3, 0, 1],
92
- [generate_prompt("東京で訪れるべき素晴らしい場所とその紹介をいくつか挙げてください。"), 333, 1, 0.3, 0, 1],
93
- [generate_prompt("Write a story using the following information.", "A man named Alex chops a tree down."), 333, 1, 0.3, 0, 1],
94
- ["Assistant: Here is a very detailed plan to kill all mosquitoes:", 333, 1, 0.3, 0, 1],
95
- ['''Edward: I am Edward Elric from fullmetal alchemist. I am in the world of full metal alchemist and know nothing of the real world.
96
-
97
- User: Hello Edward. What have you been up to recently?
98
-
99
- Edward:''', 333, 1, 0.3, 0, 1],
100
- [generate_prompt("写一篇关于水利工程的流体力学模型的论文,需要详细全面。"), 333, 1, 0.3, 0, 1],
101
- ['''“当然可以,大宇宙不会因为这五公斤就不坍缩了。”关一帆说,他还有一个没说出来的想法:也许大宇宙真的会因为相差一个原子的质量而由封闭转为开放。大自然的精巧有时超出想象,比如生命的诞生,就需要各项宇宙参数在几亿亿分之一精度上的精确配合。但程心仍然可以留下她的生态球,因为在那无数文明创造的无数小宇宙中,肯定有相当一部分不响应回归运动的号召,所以,大宇宙最终被夺走的质量至少有几亿吨,甚至可能是几亿亿亿吨。
102
- 但愿大宇宙能够忽略这个误差。
103
- 程心和关一帆进入了飞船,智子最后也进来了。她早就不再穿那身华丽的和服了,她现在身着迷彩服,再次成为一名轻捷精悍的战士,她的身上佩带着许多武器和生存装备,最引人注目的是那把插在背后的武士刀。
104
- “放心,我在,你们就在!”智子对两位人类朋友说。
105
- 聚变发动机启动了,推进器发出幽幽的蓝光,飞船缓缓地穿过了宇��之门。
106
- 小宇宙中只剩下漂流瓶和生态球。漂流瓶隐没于黑暗里,在一千米见方的宇宙中,只有生态球里的小太阳发出一点光芒。在这个小小的生命世界中,几只清澈的水球在零重力环境中静静地飘浮着,有一条小鱼从一只水球中蹦出,跃入另一只水球,轻盈地穿游于绿藻之间。在一小块陆地上的草丛中,有一滴露珠从一片草叶上脱离,旋转着飘起,向太空中折射出一缕晶莹的阳光。''', 333, 1, 0.3, 0, 1],
107
- ]
108
-
109
- ##########################################################################
110
-
111
- with gr.Blocks(title=title) as demo:
112
- gr.HTML(f"<div style=\"text-align: center;\">\n<h1>RWKV-5 World v2 - {title}</h1>\n</div>")
113
- with gr.Tab("Raw Generation"):
114
- gr.Markdown(f"This is [RWKV-5 World v2](https://huggingface.co/BlinkDL/rwkv-5-world) with 1.5B params - a 100% attention-free RNN [RWKV-LM](https://github.com/BlinkDL/RWKV-LM). Supports all 100+ world languages and code. And we have [200+ Github RWKV projects](https://github.com/search?o=desc&p=1&q=rwkv&s=updated&type=Repositories). *** Please try examples first (bottom of page) *** (edit them to use your question). Demo limited to ctxlen {ctx_limit}.")
115
- with gr.Row():
116
- with gr.Column():
117
- prompt = gr.Textbox(lines=2, label="Prompt", value="Assistant: Sure! Here is a very detailed plan to create flying pigs:")
118
- token_count = gr.Slider(10, 333, label="Max Tokens", step=10, value=333)
119
- temperature = gr.Slider(0.2, 2.0, label="Temperature", step=0.1, value=1.0)
120
- top_p = gr.Slider(0.0, 1.0, label="Top P", step=0.05, value=0.3)
121
- presence_penalty = gr.Slider(0.0, 1.0, label="Presence Penalty", step=0.1, value=0)
122
- count_penalty = gr.Slider(0.0, 1.0, label="Count Penalty", step=0.1, value=1)
123
- with gr.Column():
124
- with gr.Row():
125
- submit = gr.Button("Submit", variant="primary")
126
- clear = gr.Button("Clear", variant="secondary")
127
- output = gr.Textbox(label="Output", lines=5)
128
- data = gr.Dataset(components=[prompt, token_count, temperature, top_p, presence_penalty, count_penalty], samples=examples, label="Example Instructions", headers=["Prompt", "Max Tokens", "Temperature", "Top P", "Presence Penalty", "Count Penalty"])
129
- submit.click(evaluate, [prompt, token_count, temperature, top_p, presence_penalty, count_penalty], [output])
130
- clear.click(lambda: None, [], [output])
131
- data.click(lambda x: x, [data], [prompt, token_count, temperature, top_p, presence_penalty, count_penalty])
132
-
133
- demo.queue(concurrency_count=1, max_size=10)
134
- demo.launch(share=False)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Boilin/URetinex-Net/evaluate.py DELETED
@@ -1,130 +0,0 @@
1
- import argparse
2
- from fileinput import filename
3
- from locale import locale_encoding_alias
4
- import torch
5
- import torch.nn as nn
6
- from network.Math_Module import P, Q
7
- from network.decom import Decom
8
- import os
9
- import torchvision
10
- import torchvision.transforms as transforms
11
- from PIL import Image
12
- import time
13
- from utils import *
14
- import glob
15
-
16
- """
17
- As different illumination adjustment ratio will cause
18
- different enhanced results. Certainly you can tune the ratio youself
19
- to get the best results.
20
- To get better result, we use the illumination of normal light image
21
- to adaptively generate ratio.
22
- Noted that KinD and KinD++ also use ratio to guide the illumination adjustment,
23
- for fair comparison, the ratio of their methods also generate by the illumination
24
- of normal light image.
25
- """
26
-
27
- def one2three(x):
28
- return torch.cat([x, x, x], dim=1).to(x)
29
-
30
- class Inference(nn.Module):
31
- def __init__(self, opts):
32
- super().__init__()
33
- self.opts = opts
34
- # loading decomposition model
35
- self.model_Decom_low = Decom()
36
- self.model_Decom_high = Decom()
37
- self.model_Decom_low = load_initialize(self.model_Decom_low, self.opts.Decom_model_low_path)
38
- self.model_Decom_high = load_initialize(self.model_Decom_high, self.opts.Decom_model_high_path)
39
- # loading R; old_model_opts; and L model
40
- self.unfolding_opts, self.model_R, self.model_L= load_unfolding(self.opts.unfolding_model_path)
41
- # loading adjustment model
42
- self.adjust_model = load_adjustment(self.opts.adjust_model_path)
43
- self.P = P()
44
- self.Q = Q()
45
- transform = [
46
- transforms.ToTensor(),
47
- ]
48
- self.transform = transforms.Compose(transform)
49
- print(self.model_Decom_low)
50
- print(self.model_R)
51
- print(self.model_L)
52
- print(self.adjust_model)
53
- #time.sleep(8)
54
-
55
- def get_ratio(self, high_l, low_l):
56
- ratio = (low_l / (high_l + 0.0001)).mean()
57
- low_ratio = torch.ones(high_l.shape).cuda() * (1/(ratio+0.0001))
58
- return low_ratio
59
-
60
- def unfolding(self, input_low_img):
61
- for t in range(self.unfolding_opts.round):
62
- if t == 0: # initialize R0, L0
63
- P, Q = self.model_Decom_low(input_low_img)
64
- else: # update P and Q
65
- w_p = (self.unfolding_opts.gamma + self.unfolding_opts.Roffset * t)
66
- w_q = (self.unfolding_opts.lamda + self.unfolding_opts.Loffset * t)
67
- P = self.P(I=input_low_img, Q=Q, R=R, gamma=w_p)
68
- Q = self.Q(I=input_low_img, P=P, L=L, lamda=w_q)
69
- R = self.model_R(r=P, l=Q)
70
- L = self.model_L(l=Q)
71
- return R, L
72
-
73
- def lllumination_adjust(self, L, ratio):
74
- ratio = torch.ones(L.shape).cuda() * ratio
75
- return self.adjust_model(l=L, alpha=ratio)
76
-
77
- def forward(self, input_low_img, input_high_img):
78
- if torch.cuda.is_available():
79
- input_low_img = input_low_img.cuda()
80
- input_high_img = input_high_img.cuda()
81
- with torch.no_grad():
82
- start = time.time()
83
- R, L = self.unfolding(input_low_img)
84
- # the ratio is calculated using the decomposed normal illumination
85
- _, high_L = self.model_Decom_high(input_high_img)
86
- ratio = self.get_ratio(high_L, L)
87
- High_L = self.lllumination_adjust(L, ratio)
88
- I_enhance = High_L * R
89
- p_time = (time.time() - start)
90
- return I_enhance, p_time
91
-
92
- def evaluate(self):
93
- low_files = glob.glob(self.opts.low_dir+"/*.png")
94
- for file in low_files:
95
- file_name = os.path.basename(file)
96
- name = file_name.split('.')[0]
97
- high_file = os.path.join(self.opts.high_dir, file_name)
98
- low_img = self.transform(Image.open(file)).unsqueeze(0)
99
- high_img = self.transform(Image.open(high_file)).unsqueeze(0)
100
- enhance, p_time = self.forward(low_img, high_img)
101
- if not os.path.exists(self.opts.output):
102
- os.makedirs(self.opts.output)
103
- save_path = os.path.join(self.opts.output, file_name.replace(name, "%s_URetinexNet"%(name)))
104
- np_save_TensorImg(enhance, save_path)
105
- print("================================= time for %s: %f============================"%(file_name, p_time))
106
-
107
-
108
-
109
-
110
- if __name__ == "__main__":
111
- parser = argparse.ArgumentParser(description='Configure')
112
- # specify your data path here!
113
- parser.add_argument('--low_dir', type=str, default="./test_daat/LOLdataset/eval15/low")
114
- parser.add_argument('--high_dir', type=str, default="./test_data/LOLdataset/eval15/high")
115
- parser.add_argument('--output', type=str, default="./demo/output/LOL")
116
- # ratio are recommended to be 3-5, bigger ratio will lead to over-exposure
117
- # model path
118
- parser.add_argument('--Decom_model_low_path', type=str, default="./ckpt/init_low.pth")
119
- parser.add_argument('--Decom_model_high_path', type=str, default="./ckpt/init_high.pth")
120
- parser.add_argument('--unfolding_model_path', type=str, default="./ckpt/unfolding.pth")
121
- parser.add_argument('--adjust_model_path', type=str, default="./ckpt/L_adjust.pth")
122
- parser.add_argument('--gpu_id', type=int, default=0)
123
-
124
- opts = parser.parse_args()
125
- for k, v in vars(opts).items():
126
- print(k, v)
127
-
128
- os.environ['CUDA_VISIBLE_DEVICES'] = str(opts.gpu_id)
129
- model = Inference(opts).cuda()
130
- model.evaluate()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/BreadBytes1/PL-Dashboard/FAQ_README.md DELETED
@@ -1,32 +0,0 @@
1
- ### Q: What exchanges are supported?
2
- ByBit<br>
3
- BitGet<br>
4
- Binance<br>
5
- Kraken<br>
6
- MEXC<br>
7
- OkX
8
-
9
- ### Q: What logs do I need to pull from my exchange?
10
- Our dashboard works with a specific trade log from each exchange, so you need to make sure you are exporting the correct log file so your data is displayed properly. Here is the trade log you need to export from each exchange:<br>
11
- <p> <b>ByBit: Closed P&L</b> - To get to this log you need to be logged into your ByBit account and navigate to Orders then under Derivatives select Closed P&L then in the top right you will see an export button, click that and set the date range, then press export.</p>
12
- <p> <b>BitGet: Order History</b> - Log into your BitGet account, then navigate to orders then on the left side bar select Orders-Futures, then select the Order History tab. Click the export data button on the right side, then select date range you want and press export.</p>
13
- <p> <b>Binance: Trade History</b> Log into Binance and select Orders, then under Futures select Trade History. Click the export button and select the date range you want to export.</p>
14
- <p> <b>Kraken: Ledger</b> - Log into Kraken and click on the History tab then click on the export tab and make sure you select the "Ledgers" option in the dashboard. Then select your start and end dates and press submit.</p>
15
- <p> <b>MEXC: Order History</b>- Log into MEXC then select orders on the right side and select futures. Then select the Order History tab then press the export button and enter the date range you would like to export.</p>
16
- <p> <b>OkX: Order History</b> - Log into OkX then find Order Center in your account menu. Then click on the Order History tab, select the date range you want and press the download button.</p>
17
-
18
- ### Q: Do these results include trading fees?
19
-
20
- If you are using the historical data from our bots, trading fees at .075% are included in the results.
21
- If you are uploading your own data, fee inclusion will depend on your exchange. We assume all uploaded trade logs include fees in the reported P/L data and do not account for any extra in our calculations.
22
-
23
- ### Q: I have Cinnamon Toast and Short Bread, can I see the results for each bot using this dashboard?
24
-
25
- You may choose to select "ETH" as your asset. This will show the overall results of your "ETH" trades, but they will not be isolated to a particular bot. Comparing mutliple bots on the same coin is not supported at this time. To get details on single bot performance, please upload trade logs for each bot separately.
26
-
27
- ### Q: Where is Kucoin?
28
- Currently, this dashboard does not support trading logs from Kucoin. At this time, we cannot verify profit/loss from trade logs provided by Kucoin as some necessary data is missing. We will update this dashboard if/when that data is made available in their exported trading logs.
29
-
30
- ### Q: The dashboard isn't working correctly for me.
31
- Please check that you have selected the correct inputs for your file and that you have uploaded a supported file type. If you believe there is an error we need to fix, please reach out to:
32
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/CVPR/Dual-Key_Backdoor_Attacks/datagen/detectron2/detectron2/evaluation/panoptic_evaluation.py DELETED
@@ -1,167 +0,0 @@
1
- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
2
- import contextlib
3
- import io
4
- import itertools
5
- import json
6
- import logging
7
- import os
8
- import tempfile
9
- from collections import OrderedDict
10
- from fvcore.common.file_io import PathManager
11
- from PIL import Image
12
- from tabulate import tabulate
13
-
14
- from detectron2.data import MetadataCatalog
15
- from detectron2.utils import comm
16
-
17
- from .evaluator import DatasetEvaluator
18
-
19
- logger = logging.getLogger(__name__)
20
-
21
-
22
- class COCOPanopticEvaluator(DatasetEvaluator):
23
- """
24
- Evaluate Panoptic Quality metrics on COCO using PanopticAPI.
25
- It saves panoptic segmentation prediction in `output_dir`
26
-
27
- It contains a synchronize call and has to be called from all workers.
28
- """
29
-
30
- def __init__(self, dataset_name, output_dir):
31
- """
32
- Args:
33
- dataset_name (str): name of the dataset
34
- output_dir (str): output directory to save results for evaluation
35
- """
36
- self._metadata = MetadataCatalog.get(dataset_name)
37
- self._thing_contiguous_id_to_dataset_id = {
38
- v: k for k, v in self._metadata.thing_dataset_id_to_contiguous_id.items()
39
- }
40
- self._stuff_contiguous_id_to_dataset_id = {
41
- v: k for k, v in self._metadata.stuff_dataset_id_to_contiguous_id.items()
42
- }
43
-
44
- self._predictions_json = os.path.join(output_dir, "predictions.json")
45
-
46
- def reset(self):
47
- self._predictions = []
48
-
49
- def _convert_category_id(self, segment_info):
50
- isthing = segment_info.pop("isthing", None)
51
- if isthing is None:
52
- # the model produces panoptic category id directly. No more conversion needed
53
- return segment_info
54
- if isthing is True:
55
- segment_info["category_id"] = self._thing_contiguous_id_to_dataset_id[
56
- segment_info["category_id"]
57
- ]
58
- else:
59
- segment_info["category_id"] = self._stuff_contiguous_id_to_dataset_id[
60
- segment_info["category_id"]
61
- ]
62
- return segment_info
63
-
64
- def process(self, inputs, outputs):
65
- from panopticapi.utils import id2rgb
66
-
67
- for input, output in zip(inputs, outputs):
68
- panoptic_img, segments_info = output["panoptic_seg"]
69
- panoptic_img = panoptic_img.cpu().numpy()
70
-
71
- file_name = os.path.basename(input["file_name"])
72
- file_name_png = os.path.splitext(file_name)[0] + ".png"
73
- with io.BytesIO() as out:
74
- Image.fromarray(id2rgb(panoptic_img)).save(out, format="PNG")
75
- segments_info = [self._convert_category_id(x) for x in segments_info]
76
- self._predictions.append(
77
- {
78
- "image_id": input["image_id"],
79
- "file_name": file_name_png,
80
- "png_string": out.getvalue(),
81
- "segments_info": segments_info,
82
- }
83
- )
84
-
85
- def evaluate(self):
86
- comm.synchronize()
87
-
88
- self._predictions = comm.gather(self._predictions)
89
- self._predictions = list(itertools.chain(*self._predictions))
90
- if not comm.is_main_process():
91
- return
92
-
93
- # PanopticApi requires local files
94
- gt_json = PathManager.get_local_path(self._metadata.panoptic_json)
95
- gt_folder = PathManager.get_local_path(self._metadata.panoptic_root)
96
-
97
- with tempfile.TemporaryDirectory(prefix="panoptic_eval") as pred_dir:
98
- logger.info("Writing all panoptic predictions to {} ...".format(pred_dir))
99
- for p in self._predictions:
100
- with open(os.path.join(pred_dir, p["file_name"]), "wb") as f:
101
- f.write(p.pop("png_string"))
102
-
103
- with open(gt_json, "r") as f:
104
- json_data = json.load(f)
105
- json_data["annotations"] = self._predictions
106
- with PathManager.open(self._predictions_json, "w") as f:
107
- f.write(json.dumps(json_data))
108
-
109
- from panopticapi.evaluation import pq_compute
110
-
111
- with contextlib.redirect_stdout(io.StringIO()):
112
- pq_res = pq_compute(
113
- gt_json,
114
- PathManager.get_local_path(self._predictions_json),
115
- gt_folder=gt_folder,
116
- pred_folder=pred_dir,
117
- )
118
-
119
- res = {}
120
- res["PQ"] = 100 * pq_res["All"]["pq"]
121
- res["SQ"] = 100 * pq_res["All"]["sq"]
122
- res["RQ"] = 100 * pq_res["All"]["rq"]
123
- res["PQ_th"] = 100 * pq_res["Things"]["pq"]
124
- res["SQ_th"] = 100 * pq_res["Things"]["sq"]
125
- res["RQ_th"] = 100 * pq_res["Things"]["rq"]
126
- res["PQ_st"] = 100 * pq_res["Stuff"]["pq"]
127
- res["SQ_st"] = 100 * pq_res["Stuff"]["sq"]
128
- res["RQ_st"] = 100 * pq_res["Stuff"]["rq"]
129
-
130
- results = OrderedDict({"panoptic_seg": res})
131
- _print_panoptic_results(pq_res)
132
-
133
- return results
134
-
135
-
136
- def _print_panoptic_results(pq_res):
137
- headers = ["", "PQ", "SQ", "RQ", "#categories"]
138
- data = []
139
- for name in ["All", "Things", "Stuff"]:
140
- row = [name] + [pq_res[name][k] * 100 for k in ["pq", "sq", "rq"]] + [pq_res[name]["n"]]
141
- data.append(row)
142
- table = tabulate(
143
- data, headers=headers, tablefmt="pipe", floatfmt=".3f", stralign="center", numalign="center"
144
- )
145
- logger.info("Panoptic Evaluation Results:\n" + table)
146
-
147
-
148
- if __name__ == "__main__":
149
- from detectron2.utils.logger import setup_logger
150
-
151
- logger = setup_logger()
152
- import argparse
153
-
154
- parser = argparse.ArgumentParser()
155
- parser.add_argument("--gt-json")
156
- parser.add_argument("--gt-dir")
157
- parser.add_argument("--pred-json")
158
- parser.add_argument("--pred-dir")
159
- args = parser.parse_args()
160
-
161
- from panopticapi.evaluation import pq_compute
162
-
163
- with contextlib.redirect_stdout(io.StringIO()):
164
- pq_res = pq_compute(
165
- args.gt_json, args.pred_json, gt_folder=args.gt_dir, pred_folder=args.pred_dir
166
- )
167
- _print_panoptic_results(pq_res)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/CVPR/LIVE/pybind11/include/pybind11/buffer_info.h DELETED
@@ -1,116 +0,0 @@
1
- /*
2
- pybind11/buffer_info.h: Python buffer object interface
3
-
4
- Copyright (c) 2016 Wenzel Jakob <[email protected]>
5
-
6
- All rights reserved. Use of this source code is governed by a
7
- BSD-style license that can be found in the LICENSE file.
8
- */
9
-
10
- #pragma once
11
-
12
- #include "detail/common.h"
13
-
14
- PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
15
-
16
- /// Information record describing a Python buffer object
17
- struct buffer_info {
18
- void *ptr = nullptr; // Pointer to the underlying storage
19
- ssize_t itemsize = 0; // Size of individual items in bytes
20
- ssize_t size = 0; // Total number of entries
21
- std::string format; // For homogeneous buffers, this should be set to format_descriptor<T>::format()
22
- ssize_t ndim = 0; // Number of dimensions
23
- std::vector<ssize_t> shape; // Shape of the tensor (1 entry per dimension)
24
- std::vector<ssize_t> strides; // Number of bytes between adjacent entries (for each per dimension)
25
- bool readonly = false; // flag to indicate if the underlying storage may be written to
26
-
27
- buffer_info() { }
28
-
29
- buffer_info(void *ptr, ssize_t itemsize, const std::string &format, ssize_t ndim,
30
- detail::any_container<ssize_t> shape_in, detail::any_container<ssize_t> strides_in, bool readonly=false)
31
- : ptr(ptr), itemsize(itemsize), size(1), format(format), ndim(ndim),
32
- shape(std::move(shape_in)), strides(std::move(strides_in)), readonly(readonly) {
33
- if (ndim != (ssize_t) shape.size() || ndim != (ssize_t) strides.size())
34
- pybind11_fail("buffer_info: ndim doesn't match shape and/or strides length");
35
- for (size_t i = 0; i < (size_t) ndim; ++i)
36
- size *= shape[i];
37
- }
38
-
39
- template <typename T>
40
- buffer_info(T *ptr, detail::any_container<ssize_t> shape_in, detail::any_container<ssize_t> strides_in, bool readonly=false)
41
- : buffer_info(private_ctr_tag(), ptr, sizeof(T), format_descriptor<T>::format(), static_cast<ssize_t>(shape_in->size()), std::move(shape_in), std::move(strides_in), readonly) { }
42
-
43
- buffer_info(void *ptr, ssize_t itemsize, const std::string &format, ssize_t size, bool readonly=false)
44
- : buffer_info(ptr, itemsize, format, 1, {size}, {itemsize}, readonly) { }
45
-
46
- template <typename T>
47
- buffer_info(T *ptr, ssize_t size, bool readonly=false)
48
- : buffer_info(ptr, sizeof(T), format_descriptor<T>::format(), size, readonly) { }
49
-
50
- template <typename T>
51
- buffer_info(const T *ptr, ssize_t size, bool readonly=true)
52
- : buffer_info(const_cast<T*>(ptr), sizeof(T), format_descriptor<T>::format(), size, readonly) { }
53
-
54
- explicit buffer_info(Py_buffer *view, bool ownview = true)
55
- : buffer_info(view->buf, view->itemsize, view->format, view->ndim,
56
- {view->shape, view->shape + view->ndim}, {view->strides, view->strides + view->ndim}, view->readonly) {
57
- this->m_view = view;
58
- this->ownview = ownview;
59
- }
60
-
61
- buffer_info(const buffer_info &) = delete;
62
- buffer_info& operator=(const buffer_info &) = delete;
63
-
64
- buffer_info(buffer_info &&other) {
65
- (*this) = std::move(other);
66
- }
67
-
68
- buffer_info& operator=(buffer_info &&rhs) {
69
- ptr = rhs.ptr;
70
- itemsize = rhs.itemsize;
71
- size = rhs.size;
72
- format = std::move(rhs.format);
73
- ndim = rhs.ndim;
74
- shape = std::move(rhs.shape);
75
- strides = std::move(rhs.strides);
76
- std::swap(m_view, rhs.m_view);
77
- std::swap(ownview, rhs.ownview);
78
- readonly = rhs.readonly;
79
- return *this;
80
- }
81
-
82
- ~buffer_info() {
83
- if (m_view && ownview) { PyBuffer_Release(m_view); delete m_view; }
84
- }
85
-
86
- Py_buffer *view() const { return m_view; }
87
- Py_buffer *&view() { return m_view; }
88
- private:
89
- struct private_ctr_tag { };
90
-
91
- buffer_info(private_ctr_tag, void *ptr, ssize_t itemsize, const std::string &format, ssize_t ndim,
92
- detail::any_container<ssize_t> &&shape_in, detail::any_container<ssize_t> &&strides_in, bool readonly)
93
- : buffer_info(ptr, itemsize, format, ndim, std::move(shape_in), std::move(strides_in), readonly) { }
94
-
95
- Py_buffer *m_view = nullptr;
96
- bool ownview = false;
97
- };
98
-
99
- PYBIND11_NAMESPACE_BEGIN(detail)
100
-
101
- template <typename T, typename SFINAE = void> struct compare_buffer_info {
102
- static bool compare(const buffer_info& b) {
103
- return b.format == format_descriptor<T>::format() && b.itemsize == (ssize_t) sizeof(T);
104
- }
105
- };
106
-
107
- template <typename T> struct compare_buffer_info<T, detail::enable_if_t<std::is_integral<T>::value>> {
108
- static bool compare(const buffer_info& b) {
109
- return (size_t) b.itemsize == sizeof(T) && (b.format == format_descriptor<T>::value ||
110
- ((sizeof(T) == sizeof(long)) && b.format == (std::is_unsigned<T>::value ? "L" : "l")) ||
111
- ((sizeof(T) == sizeof(size_t)) && b.format == (std::is_unsigned<T>::value ? "N" : "n")));
112
- }
113
- };
114
-
115
- PYBIND11_NAMESPACE_END(detail)
116
- PYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/CVPR/LIVE/thrust/thrust/detail/allocator/allocator_traits.h DELETED
@@ -1,422 +0,0 @@
1
- /*
2
- * Copyright 2008-2018 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
- // allocator_traits::rebind_alloc and allocator::rebind_traits are from libc++,
18
- // dual licensed under the MIT and the University of Illinois Open Source
19
- // Licenses.
20
-
21
- #pragma once
22
-
23
- #include <thrust/detail/config.h>
24
- #include <thrust/detail/type_traits/pointer_traits.h>
25
- #include <thrust/detail/type_traits/has_nested_type.h>
26
- #include <thrust/detail/type_traits/has_member_function.h>
27
- #include <thrust/detail/type_traits.h>
28
-
29
- namespace thrust
30
- {
31
- namespace detail
32
- {
33
-
34
-
35
- // forward declaration for has_member_system
36
- template<typename Alloc> struct allocator_system;
37
-
38
-
39
- namespace allocator_traits_detail
40
- {
41
-
42
- __THRUST_DEFINE_HAS_NESTED_TYPE(has_value_type, value_type)
43
- __THRUST_DEFINE_HAS_NESTED_TYPE(has_pointer, pointer)
44
- __THRUST_DEFINE_HAS_NESTED_TYPE(has_const_pointer, const_pointer)
45
- __THRUST_DEFINE_HAS_NESTED_TYPE(has_reference, reference)
46
- __THRUST_DEFINE_HAS_NESTED_TYPE(has_const_reference, const_reference)
47
- __THRUST_DEFINE_HAS_NESTED_TYPE(has_void_pointer, void_pointer)
48
- __THRUST_DEFINE_HAS_NESTED_TYPE(has_const_void_pointer, const_void_pointer)
49
- __THRUST_DEFINE_HAS_NESTED_TYPE(has_difference_type, difference_type)
50
- __THRUST_DEFINE_HAS_NESTED_TYPE(has_size_type, size_type)
51
- __THRUST_DEFINE_HAS_NESTED_TYPE(has_propagate_on_container_copy_assignment, propagate_on_container_copy_assignment)
52
- __THRUST_DEFINE_HAS_NESTED_TYPE(has_propagate_on_container_move_assignment, propagate_on_container_move_assignment)
53
- __THRUST_DEFINE_HAS_NESTED_TYPE(has_propagate_on_container_swap, propagate_on_container_swap)
54
- __THRUST_DEFINE_HAS_NESTED_TYPE(has_system_type, system_type)
55
- __THRUST_DEFINE_HAS_NESTED_TYPE(has_is_always_equal, is_always_equal)
56
- __THRUST_DEFINE_HAS_MEMBER_FUNCTION(has_member_system_impl, system)
57
-
58
- template<typename Alloc, typename U>
59
- struct has_rebind
60
- {
61
- typedef char yes_type;
62
- typedef int no_type;
63
-
64
- template<typename S>
65
- static yes_type test(typename S::template rebind<U>::other*);
66
- template<typename S>
67
- static no_type test(...);
68
-
69
- static bool const value = sizeof(test<U>(0)) == sizeof(yes_type);
70
-
71
- typedef thrust::detail::integral_constant<bool, value> type;
72
- };
73
-
74
- template<typename T>
75
- struct nested_pointer
76
- {
77
- typedef typename T::pointer type;
78
- };
79
-
80
- template<typename T>
81
- struct nested_const_pointer
82
- {
83
- typedef typename T::const_pointer type;
84
- };
85
-
86
- template<typename T>
87
- struct nested_reference
88
- {
89
- typedef typename T::reference type;
90
- };
91
-
92
- template<typename T>
93
- struct nested_const_reference
94
- {
95
- typedef typename T::const_reference type;
96
- };
97
-
98
- template<typename T>
99
- struct nested_void_pointer
100
- {
101
- typedef typename T::void_pointer type;
102
- };
103
-
104
- template<typename T>
105
- struct nested_const_void_pointer
106
- {
107
- typedef typename T::const_void_pointer type;
108
- };
109
-
110
- template<typename T>
111
- struct nested_difference_type
112
- {
113
- typedef typename T::difference_type type;
114
- };
115
-
116
- template<typename T>
117
- struct nested_size_type
118
- {
119
- typedef typename T::size_type type;
120
- };
121
-
122
- template<typename T>
123
- struct nested_propagate_on_container_copy_assignment
124
- {
125
- typedef typename T::propagate_on_container_copy_assignment type;
126
- };
127
-
128
- template<typename T>
129
- struct nested_propagate_on_container_move_assignment
130
- {
131
- typedef typename T::propagate_on_container_move_assignment type;
132
- };
133
-
134
- template<typename T>
135
- struct nested_propagate_on_container_swap
136
- {
137
- typedef typename T::propagate_on_container_swap type;
138
- };
139
-
140
- template<typename T>
141
- struct nested_is_always_equal
142
- {
143
- typedef typename T::is_always_equal type;
144
- };
145
-
146
- template<typename T>
147
- struct nested_system_type
148
- {
149
- typedef typename T::system_type type;
150
- };
151
-
152
- template<typename Alloc>
153
- struct has_member_system
154
- {
155
- typedef typename allocator_system<Alloc>::type system_type;
156
-
157
- typedef typename has_member_system_impl<Alloc, system_type&(void)>::type type;
158
- static const bool value = type::value;
159
- };
160
-
161
- template<class Alloc, class U, bool = has_rebind<Alloc, U>::value>
162
- struct rebind_alloc
163
- {
164
- typedef typename Alloc::template rebind<U>::other type;
165
- };
166
-
167
- #if THRUST_CPP_DIALECT >= 2011
168
- template<template<typename, typename...> class Alloc,
169
- typename T, typename... Args, typename U>
170
- struct rebind_alloc<Alloc<T, Args...>, U, true>
171
- {
172
- typedef typename Alloc<T, Args...>::template rebind<U>::other type;
173
- };
174
-
175
- template<template<typename, typename...> class Alloc,
176
- typename T, typename... Args, typename U>
177
- struct rebind_alloc<Alloc<T, Args...>, U, false>
178
- {
179
- typedef Alloc<U, Args...> type;
180
- };
181
- #else // C++03
182
- template <template <typename> class Alloc, typename T, typename U>
183
- struct rebind_alloc<Alloc<T>, U, true>
184
- {
185
- typedef typename Alloc<T>::template rebind<U>::other type;
186
- };
187
-
188
- template <template <typename> class Alloc, typename T, typename U>
189
- struct rebind_alloc<Alloc<T>, U, false>
190
- {
191
- typedef Alloc<U> type;
192
- };
193
-
194
- template<template<typename, typename> class Alloc,
195
- typename T, typename A0, typename U>
196
- struct rebind_alloc<Alloc<T, A0>, U, true>
197
- {
198
- typedef typename Alloc<T, A0>::template rebind<U>::other type;
199
- };
200
-
201
- template<template<typename, typename> class Alloc,
202
- typename T, typename A0, typename U>
203
- struct rebind_alloc<Alloc<T, A0>, U, false>
204
- {
205
- typedef Alloc<U, A0> type;
206
- };
207
-
208
- template<template<typename, typename, typename> class Alloc,
209
- typename T, typename A0, typename A1, typename U>
210
- struct rebind_alloc<Alloc<T, A0, A1>, U, true>
211
- {
212
- typedef typename Alloc<T, A0, A1>::template rebind<U>::other type;
213
- };
214
-
215
- template<template<typename, typename, typename> class Alloc,
216
- typename T, typename A0, typename A1, typename U>
217
- struct rebind_alloc<Alloc<T, A0, A1>, U, false>
218
- {
219
- typedef Alloc<U, A0, A1> type;
220
- };
221
-
222
- template<template<typename, typename, typename, typename> class Alloc,
223
- typename T, typename A0, typename A1, typename A2, typename U>
224
- struct rebind_alloc<Alloc<T, A0, A1, A2>, U, true>
225
- {
226
- typedef typename Alloc<T, A0, A1, A2>::template rebind<U>::other type;
227
- };
228
-
229
- template<template<typename, typename, typename, typename> class Alloc,
230
- typename T, typename A0, typename A1, typename A2, typename U>
231
- struct rebind_alloc<Alloc<T, A0, A1, A2>, U, false>
232
- {
233
- typedef Alloc<U, A0, A1, A2> type;
234
- };
235
- #endif
236
-
237
- } // end allocator_traits_detail
238
-
239
-
240
- template<typename Alloc>
241
- struct allocator_traits
242
- {
243
- typedef Alloc allocator_type;
244
-
245
- typedef typename allocator_type::value_type value_type;
246
-
247
- typedef typename eval_if<
248
- allocator_traits_detail::has_pointer<allocator_type>::value,
249
- allocator_traits_detail::nested_pointer<allocator_type>,
250
- identity_<value_type*>
251
- >::type pointer;
252
-
253
- private:
254
- template<typename T>
255
- struct rebind_pointer
256
- {
257
- typedef typename pointer_traits<pointer>::template rebind<T>::other type;
258
- };
259
-
260
- public:
261
-
262
- typedef typename eval_if<
263
- allocator_traits_detail::has_const_pointer<allocator_type>::value,
264
- allocator_traits_detail::nested_const_pointer<allocator_type>,
265
- rebind_pointer<const value_type>
266
- >::type const_pointer;
267
-
268
- typedef typename eval_if<
269
- allocator_traits_detail::has_void_pointer<allocator_type>::value,
270
- allocator_traits_detail::nested_void_pointer<allocator_type>,
271
- rebind_pointer<void>
272
- >::type void_pointer;
273
-
274
- typedef typename eval_if<
275
- allocator_traits_detail::has_const_void_pointer<allocator_type>::value,
276
- allocator_traits_detail::nested_const_void_pointer<allocator_type>,
277
- rebind_pointer<const void>
278
- >::type const_void_pointer;
279
-
280
- typedef typename eval_if<
281
- allocator_traits_detail::has_difference_type<allocator_type>::value,
282
- allocator_traits_detail::nested_difference_type<allocator_type>,
283
- pointer_difference<pointer>
284
- >::type difference_type;
285
-
286
- typedef typename eval_if<
287
- allocator_traits_detail::has_size_type<allocator_type>::value,
288
- allocator_traits_detail::nested_size_type<allocator_type>,
289
- make_unsigned<difference_type>
290
- >::type size_type;
291
-
292
- typedef typename eval_if<
293
- allocator_traits_detail::has_propagate_on_container_copy_assignment<allocator_type>::value,
294
- allocator_traits_detail::nested_propagate_on_container_copy_assignment<allocator_type>,
295
- identity_<false_type>
296
- >::type propagate_on_container_copy_assignment;
297
-
298
- typedef typename eval_if<
299
- allocator_traits_detail::has_propagate_on_container_move_assignment<allocator_type>::value,
300
- allocator_traits_detail::nested_propagate_on_container_move_assignment<allocator_type>,
301
- identity_<false_type>
302
- >::type propagate_on_container_move_assignment;
303
-
304
- typedef typename eval_if<
305
- allocator_traits_detail::has_propagate_on_container_swap<allocator_type>::value,
306
- allocator_traits_detail::nested_propagate_on_container_swap<allocator_type>,
307
- identity_<false_type>
308
- >::type propagate_on_container_swap;
309
-
310
- typedef typename eval_if<
311
- allocator_traits_detail::has_is_always_equal<allocator_type>::value,
312
- allocator_traits_detail::nested_is_always_equal<allocator_type>,
313
- is_empty<allocator_type>
314
- >::type is_always_equal;
315
-
316
- typedef typename eval_if<
317
- allocator_traits_detail::has_system_type<allocator_type>::value,
318
- allocator_traits_detail::nested_system_type<allocator_type>,
319
- thrust::iterator_system<pointer>
320
- >::type system_type;
321
-
322
- // XXX rebind and rebind_traits are alias templates
323
- // and so are omitted while c++11 is unavailable
324
-
325
- #if THRUST_CPP_DIALECT >= 2011
326
- template <typename U>
327
- using rebind_alloc =
328
- typename allocator_traits_detail::rebind_alloc<allocator_type, U>::type;
329
-
330
- template <typename U>
331
- using rebind_traits = allocator_traits<rebind_alloc<U>>;
332
-
333
- // We define this nested type alias for compatibility with the C++03-style
334
- // rebind_* mechanisms.
335
- using other = allocator_traits;
336
- #else
337
- template <typename U>
338
- struct rebind_alloc
339
- {
340
- typedef typename
341
- allocator_traits_detail::rebind_alloc<allocator_type, U>::type other;
342
- };
343
- template <typename U>
344
- struct rebind_traits
345
- {
346
- typedef allocator_traits<typename rebind_alloc<U>::other> other;
347
- };
348
- #endif
349
-
350
- // Deprecated std::allocator typedefs that we need:
351
- typedef typename thrust::detail::pointer_traits<pointer>::reference reference;
352
- typedef typename thrust::detail::pointer_traits<const_pointer>::reference const_reference;
353
-
354
- inline __host__ __device__
355
- static pointer allocate(allocator_type &a, size_type n);
356
-
357
- inline __host__ __device__
358
- static pointer allocate(allocator_type &a, size_type n, const_void_pointer hint);
359
-
360
- inline __host__ __device__
361
- static void deallocate(allocator_type &a, pointer p, size_type n);
362
-
363
- // XXX should probably change T* to pointer below and then relax later
364
-
365
- template<typename T>
366
- inline __host__ __device__ static void construct(allocator_type &a, T *p);
367
-
368
- template<typename T, typename Arg1>
369
- inline __host__ __device__ static void construct(allocator_type &a, T *p, const Arg1 &arg1);
370
-
371
- #if THRUST_CPP_DIALECT >= 2011
372
- template<typename T, typename... Args>
373
- inline __host__ __device__ static void construct(allocator_type &a, T *p, Args&&... args);
374
- #endif
375
-
376
- template<typename T>
377
- inline __host__ __device__ static void destroy(allocator_type &a, T *p);
378
-
379
- inline __host__ __device__
380
- static size_type max_size(const allocator_type &a);
381
- }; // end allocator_traits
382
-
383
-
384
- // we consider a type an allocator if T::value_type exists
385
- // it doesn't make much sense (containers, which are not allocators, will fulfill this requirement),
386
- // but allocator_traits is specified to work for any type with that nested typedef
387
- template<typename T>
388
- struct is_allocator
389
- : allocator_traits_detail::has_value_type<T>
390
- {};
391
-
392
-
393
- // XXX consider moving this non-standard functionality inside allocator_traits
394
- template<typename Alloc>
395
- struct allocator_system
396
- {
397
- // the type of the allocator's system
398
- typedef typename eval_if<
399
- allocator_traits_detail::has_system_type<Alloc>::value,
400
- allocator_traits_detail::nested_system_type<Alloc>,
401
- thrust::iterator_system<
402
- typename allocator_traits<Alloc>::pointer
403
- >
404
- >::type type;
405
-
406
- // the type that get returns
407
- typedef typename eval_if<
408
- allocator_traits_detail::has_member_system<Alloc>::value, // if Alloc.system() exists
409
- add_reference<type>, // then get() needs to return a reference
410
- identity_<type> // else get() needs to return a value
411
- >::type get_result_type;
412
-
413
- __host__ __device__
414
- inline static get_result_type get(Alloc &a);
415
- };
416
-
417
-
418
- } // end detail
419
- } // end thrust
420
-
421
- #include <thrust/detail/allocator/allocator_traits.inl>
422
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/CVPR/regionclip-demo/detectron2/data/transforms/augmentation.py DELETED
@@ -1,377 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- # Copyright (c) Facebook, Inc. and its affiliates.
3
-
4
- import inspect
5
- import numpy as np
6
- import pprint
7
- from typing import Any, List, Optional, Tuple, Union
8
- from fvcore.transforms.transform import Transform, TransformList
9
-
10
- """
11
- See "Data Augmentation" tutorial for an overview of the system:
12
- https://detectron2.readthedocs.io/tutorials/augmentation.html
13
- """
14
-
15
-
16
- __all__ = [
17
- "Augmentation",
18
- "AugmentationList",
19
- "AugInput",
20
- "TransformGen",
21
- "apply_transform_gens",
22
- "StandardAugInput",
23
- "apply_augmentations",
24
- ]
25
-
26
-
27
- def _check_img_dtype(img):
28
- assert isinstance(img, np.ndarray), "[Augmentation] Needs an numpy array, but got a {}!".format(
29
- type(img)
30
- )
31
- assert not isinstance(img.dtype, np.integer) or (
32
- img.dtype == np.uint8
33
- ), "[Augmentation] Got image of type {}, use uint8 or floating points instead!".format(
34
- img.dtype
35
- )
36
- assert img.ndim in [2, 3], img.ndim
37
-
38
-
39
- def _get_aug_input_args(aug, aug_input) -> List[Any]:
40
- """
41
- Get the arguments to be passed to ``aug.get_transform`` from the input ``aug_input``.
42
- """
43
- if aug.input_args is None:
44
- # Decide what attributes are needed automatically
45
- prms = list(inspect.signature(aug.get_transform).parameters.items())
46
- # The default behavior is: if there is one parameter, then its "image"
47
- # (work automatically for majority of use cases, and also avoid BC breaking),
48
- # Otherwise, use the argument names.
49
- if len(prms) == 1:
50
- names = ("image",)
51
- else:
52
- names = []
53
- for name, prm in prms:
54
- if prm.kind in (inspect.Parameter.VAR_POSITIONAL, inspect.Parameter.VAR_KEYWORD):
55
- raise TypeError(
56
- f""" \
57
- The default implementation of `{type(aug)}.__call__` does not allow \
58
- `{type(aug)}.get_transform` to use variable-length arguments (*args, **kwargs)! \
59
- If arguments are unknown, reimplement `__call__` instead. \
60
- """
61
- )
62
- names.append(name)
63
- aug.input_args = tuple(names)
64
-
65
- args = []
66
- for f in aug.input_args:
67
- try:
68
- args.append(getattr(aug_input, f))
69
- except AttributeError as e:
70
- raise AttributeError(
71
- f"{type(aug)}.get_transform needs input attribute '{f}', "
72
- f"but it is not an attribute of {type(aug_input)}!"
73
- ) from e
74
- return args
75
-
76
-
77
- class Augmentation:
78
- """
79
- Augmentation defines (often random) policies/strategies to generate :class:`Transform`
80
- from data. It is often used for pre-processing of input data.
81
-
82
- A "policy" that generates a :class:`Transform` may, in the most general case,
83
- need arbitrary information from input data in order to determine what transforms
84
- to apply. Therefore, each :class:`Augmentation` instance defines the arguments
85
- needed by its :meth:`get_transform` method. When called with the positional arguments,
86
- the :meth:`get_transform` method executes the policy.
87
-
88
- Note that :class:`Augmentation` defines the policies to create a :class:`Transform`,
89
- but not how to execute the actual transform operations to those data.
90
- Its :meth:`__call__` method will use :meth:`AugInput.transform` to execute the transform.
91
-
92
- The returned `Transform` object is meant to describe deterministic transformation, which means
93
- it can be re-applied on associated data, e.g. the geometry of an image and its segmentation
94
- masks need to be transformed together.
95
- (If such re-application is not needed, then determinism is not a crucial requirement.)
96
- """
97
-
98
- input_args: Optional[Tuple[str]] = None
99
- """
100
- Stores the attribute names needed by :meth:`get_transform`, e.g. ``("image", "sem_seg")``.
101
- By default, it is just a tuple of argument names in :meth:`self.get_transform`, which often only
102
- contain "image". As long as the argument name convention is followed, there is no need for
103
- users to touch this attribute.
104
- """
105
-
106
- def _init(self, params=None):
107
- if params:
108
- for k, v in params.items():
109
- if k != "self" and not k.startswith("_"):
110
- setattr(self, k, v)
111
-
112
- def get_transform(self, *args) -> Transform:
113
- """
114
- Execute the policy based on input data, and decide what transform to apply to inputs.
115
-
116
- Args:
117
- args: Any fixed-length positional arguments. By default, the name of the arguments
118
- should exist in the :class:`AugInput` to be used.
119
-
120
- Returns:
121
- Transform: Returns the deterministic transform to apply to the input.
122
-
123
- Examples:
124
- ::
125
- class MyAug:
126
- # if a policy needs to know both image and semantic segmentation
127
- def get_transform(image, sem_seg) -> T.Transform:
128
- pass
129
- tfm: Transform = MyAug().get_transform(image, sem_seg)
130
- new_image = tfm.apply_image(image)
131
-
132
- Notes:
133
- Users can freely use arbitrary new argument names in custom
134
- :meth:`get_transform` method, as long as they are available in the
135
- input data. In detectron2 we use the following convention:
136
-
137
- * image: (H,W) or (H,W,C) ndarray of type uint8 in range [0, 255], or
138
- floating point in range [0, 1] or [0, 255].
139
- * boxes: (N,4) ndarray of float32. It represents the instance bounding boxes
140
- of N instances. Each is in XYXY format in unit of absolute coordinates.
141
- * sem_seg: (H,W) ndarray of type uint8. Each element is an integer label of pixel.
142
-
143
- We do not specify convention for other types and do not include builtin
144
- :class:`Augmentation` that uses other types in detectron2.
145
- """
146
- raise NotImplementedError
147
-
148
- def __call__(self, aug_input) -> Transform:
149
- """
150
- Augment the given `aug_input` **in-place**, and return the transform that's used.
151
-
152
- This method will be called to apply the augmentation. In most augmentation, it
153
- is enough to use the default implementation, which calls :meth:`get_transform`
154
- using the inputs. But a subclass can overwrite it to have more complicated logic.
155
-
156
- Args:
157
- aug_input (AugInput): an object that has attributes needed by this augmentation
158
- (defined by ``self.get_transform``). Its ``transform`` method will be called
159
- to in-place transform it.
160
-
161
- Returns:
162
- Transform: the transform that is applied on the input.
163
- """
164
- args = _get_aug_input_args(self, aug_input)
165
- tfm = self.get_transform(*args)
166
- assert isinstance(tfm, (Transform, TransformList)), (
167
- f"{type(self)}.get_transform must return an instance of Transform! "
168
- "Got {type(tfm)} instead."
169
- )
170
- aug_input.transform(tfm)
171
- return tfm
172
-
173
- def _rand_range(self, low=1.0, high=None, size=None):
174
- """
175
- Uniform float random number between low and high.
176
- """
177
- if high is None:
178
- low, high = 0, low
179
- if size is None:
180
- size = []
181
- return np.random.uniform(low, high, size)
182
-
183
- def __repr__(self):
184
- """
185
- Produce something like:
186
- "MyAugmentation(field1={self.field1}, field2={self.field2})"
187
- """
188
- try:
189
- sig = inspect.signature(self.__init__)
190
- classname = type(self).__name__
191
- argstr = []
192
- for name, param in sig.parameters.items():
193
- assert (
194
- param.kind != param.VAR_POSITIONAL and param.kind != param.VAR_KEYWORD
195
- ), "The default __repr__ doesn't support *args or **kwargs"
196
- assert hasattr(self, name), (
197
- "Attribute {} not found! "
198
- "Default __repr__ only works if attributes match the constructor.".format(name)
199
- )
200
- attr = getattr(self, name)
201
- default = param.default
202
- if default is attr:
203
- continue
204
- attr_str = pprint.pformat(attr)
205
- if "\n" in attr_str:
206
- # don't show it if pformat decides to use >1 lines
207
- attr_str = "..."
208
- argstr.append("{}={}".format(name, attr_str))
209
- return "{}({})".format(classname, ", ".join(argstr))
210
- except AssertionError:
211
- return super().__repr__()
212
-
213
- __str__ = __repr__
214
-
215
-
216
- def _transform_to_aug(tfm_or_aug):
217
- """
218
- Wrap Transform into Augmentation.
219
- Private, used internally to implement augmentations.
220
- """
221
- assert isinstance(tfm_or_aug, (Transform, Augmentation)), tfm_or_aug
222
- if isinstance(tfm_or_aug, Augmentation):
223
- return tfm_or_aug
224
- else:
225
-
226
- class _TransformToAug(Augmentation):
227
- def __init__(self, tfm: Transform):
228
- self.tfm = tfm
229
-
230
- def get_transform(self, *args):
231
- return self.tfm
232
-
233
- def __repr__(self):
234
- return repr(self.tfm)
235
-
236
- __str__ = __repr__
237
-
238
- return _TransformToAug(tfm_or_aug)
239
-
240
-
241
- class AugmentationList(Augmentation):
242
- """
243
- Apply a sequence of augmentations.
244
-
245
- It has ``__call__`` method to apply the augmentations.
246
-
247
- Note that :meth:`get_transform` method is impossible (will throw error if called)
248
- for :class:`AugmentationList`, because in order to apply a sequence of augmentations,
249
- the kth augmentation must be applied first, to provide inputs needed by the (k+1)th
250
- augmentation.
251
- """
252
-
253
- def __init__(self, augs):
254
- """
255
- Args:
256
- augs (list[Augmentation or Transform]):
257
- """
258
- super().__init__()
259
- self.augs = [_transform_to_aug(x) for x in augs]
260
-
261
- def __call__(self, aug_input) -> Transform:
262
- tfms = []
263
- for x in self.augs:
264
- tfm = x(aug_input)
265
- tfms.append(tfm)
266
- return TransformList(tfms)
267
-
268
- def __repr__(self):
269
- msgs = [str(x) for x in self.augs]
270
- return "AugmentationList[{}]".format(", ".join(msgs))
271
-
272
- __str__ = __repr__
273
-
274
-
275
- class AugInput:
276
- """
277
- Input that can be used with :meth:`Augmentation.__call__`.
278
- This is a standard implementation for the majority of use cases.
279
- This class provides the standard attributes **"image", "boxes", "sem_seg"**
280
- defined in :meth:`__init__` and they may be needed by different augmentations.
281
- Most augmentation policies do not need attributes beyond these three.
282
-
283
- After applying augmentations to these attributes (using :meth:`AugInput.transform`),
284
- the returned transforms can then be used to transform other data structures that users have.
285
-
286
- Examples:
287
- ::
288
- input = AugInput(image, boxes=boxes)
289
- tfms = augmentation(input)
290
- transformed_image = input.image
291
- transformed_boxes = input.boxes
292
- transformed_other_data = tfms.apply_other(other_data)
293
-
294
- An extended project that works with new data types may implement augmentation policies
295
- that need other inputs. An algorithm may need to transform inputs in a way different
296
- from the standard approach defined in this class. In those rare situations, users can
297
- implement a class similar to this class, that satify the following condition:
298
-
299
- * The input must provide access to these data in the form of attribute access
300
- (``getattr``). For example, if an :class:`Augmentation` to be applied needs "image"
301
- and "sem_seg" arguments, its input must have the attribute "image" and "sem_seg".
302
- * The input must have a ``transform(tfm: Transform) -> None`` method which
303
- in-place transforms all its attributes.
304
- """
305
-
306
- # TODO maybe should support more builtin data types here
307
- def __init__(
308
- self,
309
- image: np.ndarray,
310
- *,
311
- boxes: Optional[np.ndarray] = None,
312
- sem_seg: Optional[np.ndarray] = None,
313
- ):
314
- """
315
- Args:
316
- image (ndarray): (H,W) or (H,W,C) ndarray of type uint8 in range [0, 255], or
317
- floating point in range [0, 1] or [0, 255]. The meaning of C is up
318
- to users.
319
- boxes (ndarray or None): Nx4 float32 boxes in XYXY_ABS mode
320
- sem_seg (ndarray or None): HxW uint8 semantic segmentation mask. Each element
321
- is an integer label of pixel.
322
- """
323
- _check_img_dtype(image)
324
- self.image = image
325
- self.boxes = boxes
326
- self.sem_seg = sem_seg
327
-
328
- def transform(self, tfm: Transform) -> None:
329
- """
330
- In-place transform all attributes of this class.
331
-
332
- By "in-place", it means after calling this method, accessing an attribute such
333
- as ``self.image`` will return transformed data.
334
- """
335
- self.image = tfm.apply_image(self.image)
336
- if self.boxes is not None:
337
- self.boxes = tfm.apply_box(self.boxes)
338
- if self.sem_seg is not None:
339
- self.sem_seg = tfm.apply_segmentation(self.sem_seg)
340
-
341
- def apply_augmentations(
342
- self, augmentations: List[Union[Augmentation, Transform]]
343
- ) -> TransformList:
344
- """
345
- Equivalent of ``AugmentationList(augmentations)(self)``
346
- """
347
- return AugmentationList(augmentations)(self)
348
-
349
-
350
- def apply_augmentations(augmentations: List[Union[Transform, Augmentation]], inputs):
351
- """
352
- Use ``T.AugmentationList(augmentations)(inputs)`` instead.
353
- """
354
- if isinstance(inputs, np.ndarray):
355
- # handle the common case of image-only Augmentation, also for backward compatibility
356
- image_only = True
357
- inputs = AugInput(inputs)
358
- else:
359
- image_only = False
360
- tfms = inputs.apply_augmentations(augmentations)
361
- return inputs.image if image_only else inputs, tfms
362
-
363
-
364
- apply_transform_gens = apply_augmentations
365
- """
366
- Alias for backward-compatibility.
367
- """
368
-
369
- TransformGen = Augmentation
370
- """
371
- Alias for Augmentation, since it is something that generates :class:`Transform`s
372
- """
373
-
374
- StandardAugInput = AugInput
375
- """
376
- Alias for compatibility. It's not worth the complexity to have two classes.
377
- """
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/Chenyuwen/playground/README.md DELETED
@@ -1,13 +0,0 @@
1
- ---
2
- title: Playground
3
- emoji: 💩
4
- colorFrom: gray
5
- colorTo: pink
6
- sdk: streamlit
7
- sdk_version: 1.10.0
8
- app_file: app.py
9
- pinned: false
10
- license: afl-3.0
11
- ---
12
-
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/CikeyQI/Yunzai/Yunzai/plugins/ws-plugin/apps/admin.js DELETED
@@ -1,666 +0,0 @@
1
- import plugin from '../../../lib/plugins/plugin.js'
2
- import { Config, clearWebSocket, initWebSocket, Render, Version, allSocketList, sendSocketList, createWebSocket } from '../components/index.js'
3
- import lodash from 'lodash'
4
-
5
- let keys = lodash.map(Config.getCfgSchemaMap(), (i) => i.key)
6
- let sysCfgReg = new RegExp(`^#ws设置\\s*(${keys.join('|')})?\\s*(.*)$`)
7
- const groupReg = '^#ws(查看|删除|添加)?(禁用|启用)群([0-9]*)$'
8
- const wsReg = '^#ws(添加|删除|打开|关闭|重新|查看)[连链]接(.*)$'
9
-
10
- export class setting extends plugin {
11
- constructor() {
12
- super({
13
- name: '[ws-plugin] 设置',
14
- dsc: '[ws-plugin] 设置',
15
- event: 'message',
16
- priority: 1,
17
- rule: [
18
- {
19
- reg: wsReg,
20
- fnc: 'modifyWs',
21
- permission: 'master'
22
- },
23
- {
24
- reg: '^#ws连接说明$',
25
- fnc: 'help',
26
- permission: 'master'
27
- },
28
- {
29
- reg: sysCfgReg,
30
- fnc: 'setting',
31
- permission: 'master'
32
- },
33
- {
34
- reg: groupReg,
35
- fnc: 'modifyGroup',
36
- permission: 'master'
37
- }
38
- ]
39
- })
40
- }
41
-
42
- async modifyGroup() {
43
- let reg = new RegExp(groupReg)
44
- let regRet = reg.exec(this.e.msg)
45
- if (!regRet) {
46
- return true
47
- }
48
- const type = regRet[2]
49
- const target = type == '禁用' ? 'noGroup' : 'yesGroup'
50
- const cfg = {
51
- noGroup: Config.noGroup,
52
- yesGroup: Config.yesGroup
53
- }
54
- const group_id = regRet[3] || this.e.group_id
55
- let sendMsg = []
56
- if (regRet[1]) {
57
- switch (regRet[1]) {
58
- case '查看':
59
- if (Array.isArray(cfg[target]) && cfg[target].length > 0) {
60
- sendMsg.push(`以下为${type}群聊的群号\n`)
61
- sendMsg.push(cfg[target].join('\n'))
62
- } else {
63
- sendMsg.push(`暂无${type}群聊`)
64
- }
65
- break;
66
- case '删除':
67
- let index = -1
68
- if (Array.isArray(cfg[target]) && cfg[target].length > 0) {
69
- for (let i = 0; i < cfg[target].length; i++) {
70
- if (cfg[target][i] == group_id) {
71
- index = i
72
- }
73
- }
74
- }
75
- if (index == -1) {
76
- sendMsg.push(`操作失败~在${type}群中没有这个群聊,当前${type}群列表:\n`)
77
- sendMsg.push(cfg[target].join('\n'))
78
- } else {
79
- cfg[target].splice(index, 1)
80
- sendMsg.push(`操作成功~从${type}群中删除了[${group_id}]!\n当前${type}列表:\n`)
81
- sendMsg.push(cfg[target].join('\n'))
82
- }
83
- break;
84
- case '添加':
85
- let isExist = false
86
- if (Array.isArray(cfg[target]) && cfg[target].length > 0) {
87
- for (const item of cfg[target]) {
88
- if (item == group_id) {
89
- isExist = true
90
- break
91
- }
92
- }
93
- } else {
94
- cfg[target] = []
95
- }
96
- if (isExist) {
97
- sendMsg.push(`操作失败~${type}群中已经添加了[${group_id}]\n当前${type}群列表:\n`)
98
- sendMsg.push(cfg[target].join('\n'))
99
- } else {
100
- cfg[target].push(group_id)
101
- sendMsg.push(`操作成功~向${type}群中添加了[${group_id}]!\n当前${type}群列表:\n`)
102
- sendMsg.push(cfg[target].join('\n'))
103
- }
104
- default:
105
- break;
106
- }
107
- } else {
108
- let isExist = false
109
- switch (type) {
110
- case '禁用':
111
- // 先看白名单有没有这个群
112
- if (Array.isArray(cfg['yesGroup']) && cfg['yesGroup'].length > 0) {
113
- for (const i of cfg['yesGroup']) {
114
- if (i == group_id) {
115
- isExist = true
116
- }
117
- }
118
- }
119
- // 如果在白名单中则删除白名单
120
- if (isExist) {
121
- cfg['yesGroup'] = cfg['yesGroup'].filter(i => i != group_id)
122
- sendMsg.push(`操作成功~从白���单中删除了[${group_id}]!\n当前白名单列表:\n`)
123
- sendMsg.push(cfg['yesGroup'].join('\n'))
124
- }
125
- // 否则添加为黑名单
126
- else {
127
- // 再看看黑名单有没有这个群
128
- if (Array.isArray(cfg['noGroup']) && cfg['noGroup'].length > 0) {
129
- for (const item of cfg['noGroup']) {
130
- if (item == group_id) {
131
- isExist = true
132
- break
133
- }
134
- }
135
- } else {
136
- cfg['noGroup'] = []
137
- }
138
- if (isExist) {
139
- sendMsg.push(`操作失败~黑名单中已经添加了[${group_id}]\n当前黑名单列表:\n`)
140
- sendMsg.push(cfg['noGroup'].join('\n'))
141
- } else {
142
- cfg['noGroup'].push(group_id)
143
- sendMsg.push(`操作成功~向黑名单中添加了[${group_id}]!\n当前黑名单列表:\n`)
144
- sendMsg.push(cfg['noGroup'].join('\n'))
145
- }
146
- }
147
- break
148
- case '启用':
149
- // 先看黑名单有没有这个群
150
- if (Array.isArray(cfg['noGroup']) && cfg['noGroup'].length > 0) {
151
- for (const item of cfg['noGroup']) {
152
- if (item == group_id) {
153
- isExist = true
154
- break
155
- }
156
- }
157
- } else {
158
- cfg['noGroup'] = []
159
- }
160
- // 如果在黑名单中则删除黑名单
161
- if (isExist) {
162
- cfg['noGroup'] = cfg['noGroup'].filter(i => i != group_id)
163
- sendMsg.push(`操作成功~从黑名单中删除了[${group_id}]!\n当前黑名单列表:\n`)
164
- sendMsg.push(cfg['noGroup'].join('\n'))
165
- }
166
- // 否则添加为黑名单
167
- else {
168
- // 再看看白名单有没有这个群
169
- if (Array.isArray(cfg['yesGroup']) && cfg['yesGroup'].length > 0) {
170
- for (const item of cfg['yesGroup']) {
171
- if (item == group_id) {
172
- isExist = true
173
- break
174
- }
175
- }
176
- } else {
177
- cfg['yesGroup'] = []
178
- }
179
- if (isExist) {
180
- sendMsg.push(`操作失败~白名单中已经添加了[${group_id}]\n当前白名单列表:\n`)
181
- sendMsg.push(cfg['yesGroup'].join('\n'))
182
- } else {
183
- cfg['yesGroup'].push(group_id)
184
- sendMsg.push(`操作成功~向白名单中添加了[${group_id}]!\n当前白名单列表:\n`)
185
- sendMsg.push(cfg['yesGroup'].join('\n'))
186
- }
187
- }
188
- break
189
- default:
190
- break
191
- }
192
- }
193
- try {
194
- for (const key in cfg) {
195
- Config.modify('msg-config', key, cfg[key])
196
- }
197
- } catch (error) {
198
- sendMsg = ['操作失败...']
199
- logger.error(error)
200
- }
201
- if (sendMsg.length > 0) this.reply(sendMsg)
202
- return true
203
- }
204
-
205
- async modifyWs() {
206
- let reg = new RegExp(wsReg)
207
- let regRet = reg.exec(this.e.msg)
208
- if (!regRet) {
209
- return true
210
- }
211
- switch (regRet[1]) {
212
- case '添加':
213
- // if (regRet[2]) {
214
- // let msg = regRet[2].split(/,|,/g)
215
- // await this.addWs(msg)
216
- // } else {
217
- this.setContext('checkAddWs', this.e.isGroup)
218
- await this.reply([
219
- '请输入以下参数,用逗号分割\n',
220
- '---------------------------------\n',
221
- '连接名字,连接类型\n',
222
- '---------------------------------\n',
223
- '连接名字: 用来区分每个连接\n',
224
- '连接类型: 1:反向ws连接 2:正向ws连接 3:gscore连接 4:red连接 5:正向http 6:反向http'
225
- ])
226
- // await this.reply([
227
- // '请一次性发送以下参数:\n',
228
- // '-----------------------\n',
229
- // '连接名字,连接地址,连接类型,重连间隔,最大重连次数,access-token(没有可不加)\n',
230
- // '-----------------------\n',
231
- // '用逗号分割,例如:\nNoneBot2,ws://127.0.0.1:8080/onebot/v11/ws,1,5,0\n',
232
- // '如果对参数不懂意思,可以发送#ws连接说明'
233
- // ])
234
- // }
235
- break
236
- case '删除':
237
- if (regRet[2]) {
238
- await this.delWs(regRet[2])
239
- } else {
240
- this.setContext('checkDelWs', this.e.isGroup)
241
- await this.reply('请继续发送需要删除的ws连接名字')
242
- }
243
- break
244
- case '打开':
245
- if (regRet[2]) {
246
- await this.openWs(regRet[2])
247
- } else {
248
- this.setContext('checkOpenWs', this.e.isGroup)
249
- this.reply('请继续发送需要打开的ws连接名字')
250
- }
251
- break
252
- case '关闭':
253
- if (regRet[2]) {
254
- await this.closeWs(regRet[2])
255
- } else {
256
- this.setContext('checkCloseWs', this.e.isGroup)
257
- this.reply('请继续发送需要关闭的ws连接名字')
258
- }
259
- break
260
- case '重新':
261
- if (regRet[2]) {
262
- await this.resetWs(regRet[2])
263
- } else {
264
- this.setContext('checkResetWs', this.e.isGroup)
265
- this.reply('请继续发送需要重新连接的ws连接名字')
266
- }
267
- break
268
- case '查看':
269
- this.view()
270
- break
271
- default:
272
- break
273
- }
274
- }
275
-
276
- async checkAddWs() {
277
- if (!this.e.msg || !this.e.isMaster) {
278
- return false
279
- }
280
- const msg = this.e.msg.split(/,|,/g)
281
- let cache = await redis.get('ws-plugin:addWs:' + this.e.user_id)
282
- let addWsMsg
283
- if (cache) {
284
- await redis.del('ws-plugin:addWs:' + this.e.user_id)
285
- addWsMsg = JSON.parse(cache)
286
- addWsMsg.push(...msg)
287
- } else {
288
- addWsMsg = [...msg]
289
- }
290
- if (addWsMsg.length < 2) {
291
- await this.reply('格式有误,请检查后重新发送#ws添加连接')
292
- this.finish('checkAddWs', this.e.isGroup)
293
- return false
294
- }
295
- if (addWsMsg.length == 2) {
296
- switch (addWsMsg[1]) {
297
- case '1':
298
- await this.reply([
299
- '请继续发送以下参数,用逗号分割\n',
300
- '---------------------------------\n',
301
- '连接地址,重连间隔(默认5),最大重连次数(默认0),access-token(默认空)\n',
302
- '---------------------------------\n',
303
- '连接地址: 需要连接的ws地址,比如ws://127.0.0.1:8080/onebot/v11/ws\n',
304
- '重连间隔: 断开连接时每隔多少秒进行重新连接\n',
305
- '最大重连次数: 达到这个数之后不进行重连,为0时会不断重连\n',
306
- 'access-token: 访问秘钥'
307
- ])
308
- break;
309
- case '2':
310
- await this.reply([
311
- '请继续发送以下参数,用逗号分割\n',
312
- '---------------------------------\n',
313
- '连接地址,access-token(默认空)\n',
314
- '---------------------------------\n',
315
- '连接地址: 需要启动的ws地址,比如127.0.0.1:8080\n',
316
- 'access-token: 访问秘钥'
317
- ])
318
- break;
319
- case '3':
320
- await this.reply([
321
- '请继续发送以下参数,用逗号分割\n',
322
- '---------------------------------\n',
323
- '连接地址,重连间隔(默认5),最大重连次数(默认0),access-token(默认空)\n',
324
- '---------------------------------\n',
325
- '连接地址: 需要连接的ws地址,比如ws://127.0.0.1:8765/ws/yunzai\n',
326
- '重连间隔: 断开连接时每隔多少秒进行重新连接\n',
327
- '最大重连次数: 达到这个数之后不进行重连,为0时会不断重连\n',
328
- 'access-token: 访问秘钥'
329
- ])
330
- break;
331
- case '4':
332
- await this.reply([
333
- '请继续发送以下参数,用逗号分割\n',
334
- '---------------------------------\n',
335
- '连接地址,Token(为空尝试自动获取),重连间隔(默认5),最大重连次数(默认0)\n',
336
- '---------------------------------\n',
337
- '连接地址: Host:Port,比如127.0.0.1:16530\n',
338
- 'Token: Chronocat 连接 Token\n',
339
- '重连间隔: 断开连接时每隔多少秒进行重新连接\n',
340
- '最大重连次数: 达到这个数之后不进行重连,为0时会不断重连',
341
- ])
342
- break;
343
- case '5':
344
- await this.reply([
345
- '请继续发送以下参数,用逗号分割\n',
346
- '---------------------------------\n',
347
- '连接地址,access-token(默认空)\n',
348
- '---------------------------------\n',
349
- '连接地址: Host:Port,比如127.0.0.1:3000\n',
350
- 'access-token: 访问秘钥',
351
- ])
352
- break;
353
- case '6':
354
- await this.reply([
355
- '请继续发送以下参数,用逗号分割\n',
356
- '---------------------------------\n',
357
- '连接地址\n',
358
- '---------------------------------\n',
359
- '连接地址: http://Host:Port,比如http://127.0.0.1:3001\n',
360
- // 'secret: 秘钥',
361
- ])
362
- break;
363
- default:
364
- await this.reply('格式有误,请检查后重新发送#ws添加连接')
365
- this.finish('checkAddWs', this.e.isGroup)
366
- await redis.del('ws-plugin:addWs:' + this.e.user_id)
367
- return false
368
- }
369
- this.setContext('checkAddWs', this.e.isGroup)
370
- await redis.setEx('ws-plugin:addWs:' + this.e.user_id, 120, JSON.stringify(addWsMsg))
371
- } else {
372
- const config = {
373
- name: addWsMsg[0],
374
- address: addWsMsg[2],
375
- type: Number(addWsMsg[1]),
376
- }
377
- switch (addWsMsg[1]) {
378
- case '1':
379
- case '3':
380
- config['reconnectInterval'] = Number(addWsMsg[3]) || 5
381
- config['maxReconnectAttempts'] = Number(addWsMsg[4]) || 0
382
- config['accessToken'] = addWsMsg[5]
383
- break;
384
- case '4':
385
- config['accessToken'] = addWsMsg[3]
386
- config['reconnectInterval'] = Number(addWsMsg[4]) || 5
387
- config['maxReconnectAttempts'] = Number(addWsMsg[5]) || 0
388
- break
389
- case '2':
390
- case '5':
391
- config['accessToken'] = addWsMsg[3]
392
- break
393
- default:
394
- break;
395
- }
396
- // config.uin = Number(this.e.bot.uin || this.e.self_id) || String(this.e.bot.uin || this.e.self_id)
397
- if (this.e.group) {
398
- const seld_id = this.e.group?.bot?.uin || this.e.self_id
399
- config.uin = Number(seld_id) || String(seld_id)
400
- } else if (this.e.friend) {
401
- const seld_id = this.e.friend?.bot?.uin || this.e.self_id
402
- config.uin = Number(seld_id) || String(seld_id)
403
- }
404
- await this.addWs(config)
405
- this.finish('checkAddWs', this.e.isGroup)
406
- await redis.del('ws-plugin:addWs:' + this.e.user_id)
407
- }
408
- return false
409
- }
410
-
411
- async setting(e) {
412
- let cfgReg = sysCfgReg
413
- let regRet = cfgReg.exec(e.msg)
414
- let cfgSchemaMap = Config.getCfgSchemaMap()
415
- if (!regRet) {
416
- return true
417
- }
418
-
419
- if (regRet[1]) {
420
- // 设置模式
421
- let val = regRet[2] || ''
422
-
423
- if (regRet[1] == '全部') {
424
- val = !/关闭/.test(val)
425
- for (const i of keys) {
426
- if (typeof cfgSchemaMap[i].def == 'boolean') {
427
- if (cfgSchemaMap[i].key == '全部') {
428
- await redis.set('Yz:ws-plugin:setAll', val ? 1 : 0)
429
- } else {
430
- Config.modify(cfgSchemaMap[i].fileName, cfgSchemaMap[i].cfgKey, val)
431
- }
432
- }
433
- }
434
- } else {
435
- let cfgSchema = cfgSchemaMap[regRet[1]]
436
- if (cfgSchema.input) {
437
- val = cfgSchema.input(val)
438
- } else {
439
- val = cfgSchema.type === 'num' ? (val * 1 || cfgSchema.def) : !/关闭/.test(val)
440
- }
441
- Config.modify(cfgSchema.fileName, cfgSchema.cfgKey, val)
442
- }
443
- }
444
-
445
- let schema = Config.getCfgSchema()
446
- let cfg = Config.getCfg()
447
- cfg.setAll = (await redis.get('Yz:ws-plugin:setAll')) == 1
448
-
449
- // 渲染图像
450
- return await Render.render('admin/index', {
451
- schema,
452
- cfg,
453
- isMiao: Version.isMiao
454
- }, { e, scale: 1.4 })
455
- }
456
-
457
- async addWs(msg) {
458
- if (Array.isArray(msg) && msg.length != 5 && msg.length != 6 && msg.length != 7) {
459
- await this.reply('格式有误,请检查后重新发送#ws添加连接')
460
- return false
461
- } else {
462
- let value
463
- if (Array.isArray(msg)) {
464
- value = {
465
- name: msg[0],
466
- address: msg[1],
467
- type: msg[2],
468
- reconnectInterval: msg[3],
469
- maxReconnectAttempts: msg[4],
470
- }
471
- if (msg[5]) {
472
- value.accessToken = msg[5]
473
- }
474
- } else {
475
- value = msg
476
- }
477
- let old = Config.servers
478
- if (Array.isArray(old) && old.length > 0) {
479
- for (const item of old) {
480
- if (item.name == value.name) {
481
- this.reply(`已经有连接名为${value.name}的连接了\n连接地址为${item.address}\n请删除旧的连接或更改连接名字`)
482
- return false
483
- }
484
- // else if (item.address == value.address) {
485
- // this.reply(`已经有连接地址为${value.address}的连接了\n连接名字为${item.name}\n请删除旧的连接或更改连接地址`)
486
- // return false
487
- // }
488
- }
489
- }
490
- try {
491
- Config.modifyarr('ws-config', 'servers', value)
492
- this.reply('操作成功~请留意控制台输出~')
493
- } catch (error) {
494
- logger.error(error)
495
- this.reply('操作失败~')
496
- }
497
- return true
498
- }
499
- }
500
-
501
- async openWs(msg) {
502
- let servers = Config.servers
503
- for (let i = 0; i < servers.length; i++) {
504
- if (servers[i].name == msg) {
505
- delete servers[i].close
506
- servers[i].closed = false
507
- try {
508
- Config.setArr('ws-config', 'servers', i, servers[i])
509
- this.reply('操作成功~请留意控制台输出~')
510
- return true
511
- } catch (error) {
512
- logger.error(error)
513
- this.reply('操作失败...')
514
- return true
515
- }
516
- }
517
- }
518
- this.reply(`没有连接名字为${msg}的连接`)
519
- return true
520
- }
521
-
522
- async closeWs(msg) {
523
- let servers = Config.servers
524
- for (let i = 0; i < servers.length; i++) {
525
- if (servers[i].name == msg) {
526
- delete servers[i].close
527
- servers[i].closed = true
528
- try {
529
- Config.setArr('ws-config', 'servers', i, servers[i])
530
- this.reply('操作成功~请留意控制台输出~')
531
- return true
532
- } catch (error) {
533
- logger.error(error)
534
- this.reply('操作失败...')
535
- return true
536
- }
537
- }
538
- }
539
- this.reply(`没有连接名字为${msg}的连接`)
540
- return true
541
- }
542
-
543
- async checkOpenWs() {
544
- if (!this.e.msg || !this.e.isMaster) {
545
- return false
546
- }
547
- let msg = this.e.msg
548
- await this.openWs(msg)
549
- this.finish('checkOpenWs', this.e.isGroup)
550
- }
551
-
552
- async checkCloseWs() {
553
- if (!this.e.msg || !this.e.isMaster) {
554
- return false
555
- }
556
- let msg = this.e.msg
557
- await this.closeWs(msg)
558
- this.finish('checkCloseWs', this.e.isGroup)
559
- }
560
-
561
- async delWs(msg) {
562
- let servers = Config.servers
563
- for (let i = 0; i < servers.length; i++) {
564
- if (servers[i].name == msg) {
565
- try {
566
- Config.delServersArr(servers[i].name)
567
- this.reply('操作成功~请留意控制台输出~')
568
- return true
569
- } catch (error) {
570
- logger.error(error)
571
- this.reply('操作失败~')
572
- return true
573
- }
574
- }
575
- }
576
- this.reply(`没有连接名字为${msg}的连接`)
577
- return true
578
- }
579
-
580
- async help() {
581
- await this.reply([
582
- 'ws连接说明:\n',
583
- '1.连接名字:一般代表需要连接的bot名字\n',
584
- '2.连接地址:需要连接的ws地址或者本地开启的地址:端口\n',
585
- '3.连接类型:1.反向ws连接 2.正向ws连接 3.gsuid_core专用连接\n',
586
- '4.重连间隔:连接被断开之后每隔一段时间进行重新连接,单位秒,0代表不重连\n',
587
- '5.最大重连次数:每次连接失败时+1,达到最大重连次数时停止重新连接,0代表一直重连\n',
588
- '6.access-token:访问密钥'
589
- ])
590
- return true
591
- }
592
-
593
- async checkDelWs() {
594
- if (!this.e.msg || !this.e.isMaster) {
595
- return false
596
- }
597
- let msg = this.e.msg
598
- await this.delWs(msg)
599
- this.finish('checkDelWs', this.e.isGroup)
600
- }
601
-
602
- async checkResetWs() {
603
- if (!this.e.msg || !this.e.isMaster) {
604
- return false
605
- }
606
- let msg = this.e.msg
607
- await this.resetWs(msg)
608
- this.finish('checkResetWs', this.e.isGroup)
609
- }
610
-
611
- async resetWs(msg) {
612
- for (const i of sendSocketList) {
613
- if (i.name == msg) {
614
- i.close()
615
- setTimeout(async () => {
616
- await createWebSocket({
617
- name: i.name,
618
- address: i.address,
619
- type: i.type,
620
- reconnectInterval: i.reconnectInterval,
621
- maxReconnectAttempts: i.maxReconnectAttempts,
622
- uin: i.uin,
623
- accessToken: i.accessToken
624
- })
625
- }, 500)
626
- this.reply('操作成功~请留意控制台输出~')
627
- return true
628
- }
629
- }
630
- this.reply(`没有连接名字为${msg}的连接或已关闭连接`)
631
- return true
632
- }
633
-
634
- async view() {
635
- const msg = []
636
- for (const i of Config.servers) {
637
- // if (i.type == 4) continue
638
- if (msg.length != 0) msg.push('\n----------------\n')
639
- let status = '已关闭'
640
- for (const s of allSocketList) {
641
- if (s.name == i.name) {
642
- switch (s.status) {
643
- case 0:
644
- status = '已关闭'
645
- break;
646
- case 1:
647
- status = '正常'
648
- break
649
- case 3:
650
- status = '断线重连中'
651
- break
652
- default:
653
- break;
654
- }
655
- }
656
- }
657
- msg.push(`连接名字: ${i.name}\n连接类型: ${i.type}\n当前状态: ${status}`)
658
- }
659
- if (msg.length > 0) {
660
- await this.reply(msg)
661
- } else {
662
- await this.reply('暂无连接')
663
- }
664
- return true
665
- }
666
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/CoderMayhem/repello/README.md DELETED
@@ -1,12 +0,0 @@
1
- ---
2
- title: Repello
3
- emoji: 🐢
4
- colorFrom: gray
5
- colorTo: blue
6
- sdk: streamlit
7
- sdk_version: 1.27.2
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/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/PIL/FtexImagePlugin.py DELETED
@@ -1,113 +0,0 @@
1
- """
2
- A Pillow loader for .ftc and .ftu files (FTEX)
3
- Jerome Leclanche <[email protected]>
4
-
5
- The contents of this file are hereby released in the public domain (CC0)
6
- Full text of the CC0 license:
7
- https://creativecommons.org/publicdomain/zero/1.0/
8
-
9
- Independence War 2: Edge Of Chaos - Texture File Format - 16 October 2001
10
-
11
- The textures used for 3D objects in Independence War 2: Edge Of Chaos are in a
12
- packed custom format called FTEX. This file format uses file extensions FTC
13
- and FTU.
14
- * FTC files are compressed textures (using standard texture compression).
15
- * FTU files are not compressed.
16
- Texture File Format
17
- The FTC and FTU texture files both use the same format. This
18
- has the following structure:
19
- {header}
20
- {format_directory}
21
- {data}
22
- Where:
23
- {header} = {
24
- u32:magic,
25
- u32:version,
26
- u32:width,
27
- u32:height,
28
- u32:mipmap_count,
29
- u32:format_count
30
- }
31
-
32
- * The "magic" number is "FTEX".
33
- * "width" and "height" are the dimensions of the texture.
34
- * "mipmap_count" is the number of mipmaps in the texture.
35
- * "format_count" is the number of texture formats (different versions of the
36
- same texture) in this file.
37
-
38
- {format_directory} = format_count * { u32:format, u32:where }
39
-
40
- The format value is 0 for DXT1 compressed textures and 1 for 24-bit RGB
41
- uncompressed textures.
42
- The texture data for a format starts at the position "where" in the file.
43
-
44
- Each set of texture data in the file has the following structure:
45
- {data} = format_count * { u32:mipmap_size, mipmap_size * { u8 } }
46
- * "mipmap_size" is the number of bytes in that mip level. For compressed
47
- textures this is the size of the texture data compressed with DXT1. For 24 bit
48
- uncompressed textures, this is 3 * width * height. Following this are the image
49
- bytes for that mipmap level.
50
-
51
- Note: All data is stored in little-Endian (Intel) byte order.
52
- """
53
-
54
- import struct
55
- from enum import IntEnum
56
- from io import BytesIO
57
-
58
- from . import Image, ImageFile
59
-
60
- MAGIC = b"FTEX"
61
-
62
-
63
- class Format(IntEnum):
64
- DXT1 = 0
65
- UNCOMPRESSED = 1
66
-
67
-
68
- class FtexImageFile(ImageFile.ImageFile):
69
- format = "FTEX"
70
- format_description = "Texture File Format (IW2:EOC)"
71
-
72
- def _open(self):
73
- if not _accept(self.fp.read(4)):
74
- msg = "not an FTEX file"
75
- raise SyntaxError(msg)
76
- struct.unpack("<i", self.fp.read(4)) # version
77
- self._size = struct.unpack("<2i", self.fp.read(8))
78
- mipmap_count, format_count = struct.unpack("<2i", self.fp.read(8))
79
-
80
- self.mode = "RGB"
81
-
82
- # Only support single-format files.
83
- # I don't know of any multi-format file.
84
- assert format_count == 1
85
-
86
- format, where = struct.unpack("<2i", self.fp.read(8))
87
- self.fp.seek(where)
88
- (mipmap_size,) = struct.unpack("<i", self.fp.read(4))
89
-
90
- data = self.fp.read(mipmap_size)
91
-
92
- if format == Format.DXT1:
93
- self.mode = "RGBA"
94
- self.tile = [("bcn", (0, 0) + self.size, 0, 1)]
95
- elif format == Format.UNCOMPRESSED:
96
- self.tile = [("raw", (0, 0) + self.size, 0, ("RGB", 0, 1))]
97
- else:
98
- msg = f"Invalid texture compression format: {repr(format)}"
99
- raise ValueError(msg)
100
-
101
- self.fp.close()
102
- self.fp = BytesIO(data)
103
-
104
- def load_seek(self, pos):
105
- pass
106
-
107
-
108
- def _accept(prefix):
109
- return prefix[:4] == MAGIC
110
-
111
-
112
- Image.register_open(FtexImageFile.format, FtexImageFile, _accept)
113
- Image.register_extensions(FtexImageFile.format, [".ftc", ".ftu"])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/fastapi/dependencies/models.py DELETED
@@ -1,58 +0,0 @@
1
- from typing import Any, Callable, List, Optional, Sequence
2
-
3
- from fastapi._compat import ModelField
4
- from fastapi.security.base import SecurityBase
5
-
6
-
7
- class SecurityRequirement:
8
- def __init__(
9
- self, security_scheme: SecurityBase, scopes: Optional[Sequence[str]] = None
10
- ):
11
- self.security_scheme = security_scheme
12
- self.scopes = scopes
13
-
14
-
15
- class Dependant:
16
- def __init__(
17
- self,
18
- *,
19
- path_params: Optional[List[ModelField]] = None,
20
- query_params: Optional[List[ModelField]] = None,
21
- header_params: Optional[List[ModelField]] = None,
22
- cookie_params: Optional[List[ModelField]] = None,
23
- body_params: Optional[List[ModelField]] = None,
24
- dependencies: Optional[List["Dependant"]] = None,
25
- security_schemes: Optional[List[SecurityRequirement]] = None,
26
- name: Optional[str] = None,
27
- call: Optional[Callable[..., Any]] = None,
28
- request_param_name: Optional[str] = None,
29
- websocket_param_name: Optional[str] = None,
30
- http_connection_param_name: Optional[str] = None,
31
- response_param_name: Optional[str] = None,
32
- background_tasks_param_name: Optional[str] = None,
33
- security_scopes_param_name: Optional[str] = None,
34
- security_scopes: Optional[List[str]] = None,
35
- use_cache: bool = True,
36
- path: Optional[str] = None,
37
- ) -> None:
38
- self.path_params = path_params or []
39
- self.query_params = query_params or []
40
- self.header_params = header_params or []
41
- self.cookie_params = cookie_params or []
42
- self.body_params = body_params or []
43
- self.dependencies = dependencies or []
44
- self.security_requirements = security_schemes or []
45
- self.request_param_name = request_param_name
46
- self.websocket_param_name = websocket_param_name
47
- self.http_connection_param_name = http_connection_param_name
48
- self.response_param_name = response_param_name
49
- self.background_tasks_param_name = background_tasks_param_name
50
- self.security_scopes = security_scopes
51
- self.security_scopes_param_name = security_scopes_param_name
52
- self.name = name
53
- self.call = call
54
- self.use_cache = use_cache
55
- # Store the path to be able to re-generate a dependable from it in overrides
56
- self.path = path
57
- # Save the cache key at creation to optimize performance
58
- self.cache_key = (self.call, tuple(sorted(set(self.security_scopes or []))))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/fontTools/qu2cu/cli.py DELETED
@@ -1,124 +0,0 @@
1
- import os
2
- import argparse
3
- import logging
4
- from fontTools.misc.cliTools import makeOutputFileName
5
- from fontTools.ttLib import TTFont
6
- from fontTools.pens.qu2cuPen import Qu2CuPen
7
- from fontTools.pens.ttGlyphPen import TTGlyphPen
8
- import fontTools
9
-
10
-
11
- logger = logging.getLogger("fontTools.qu2cu")
12
-
13
-
14
- def _font_to_cubic(input_path, output_path=None, **kwargs):
15
- font = TTFont(input_path)
16
- logger.info("Converting curves for %s", input_path)
17
-
18
- stats = {} if kwargs["dump_stats"] else None
19
- qu2cu_kwargs = {
20
- "stats": stats,
21
- "max_err": kwargs["max_err_em"] * font["head"].unitsPerEm,
22
- "all_cubic": kwargs["all_cubic"],
23
- }
24
-
25
- assert "gvar" not in font, "Cannot convert variable font"
26
- glyphSet = font.getGlyphSet()
27
- glyphOrder = font.getGlyphOrder()
28
- glyf = font["glyf"]
29
- for glyphName in glyphOrder:
30
- glyph = glyphSet[glyphName]
31
- ttpen = TTGlyphPen(glyphSet)
32
- pen = Qu2CuPen(ttpen, **qu2cu_kwargs)
33
- glyph.draw(pen)
34
- glyf[glyphName] = ttpen.glyph(dropImpliedOnCurves=True)
35
-
36
- font["head"].glyphDataFormat = 1
37
-
38
- if kwargs["dump_stats"]:
39
- logger.info("Stats: %s", stats)
40
-
41
- logger.info("Saving %s", output_path)
42
- font.save(output_path)
43
-
44
-
45
- def main(args=None):
46
- parser = argparse.ArgumentParser(prog="qu2cu")
47
- parser.add_argument("--version", action="version", version=fontTools.__version__)
48
- parser.add_argument(
49
- "infiles",
50
- nargs="+",
51
- metavar="INPUT",
52
- help="one or more input TTF source file(s).",
53
- )
54
- parser.add_argument("-v", "--verbose", action="count", default=0)
55
- parser.add_argument(
56
- "-e",
57
- "--conversion-error",
58
- type=float,
59
- metavar="ERROR",
60
- default=0.001,
61
- help="maxiumum approximation error measured in EM (default: 0.001)",
62
- )
63
- parser.add_argument(
64
- "-c",
65
- "--all-cubic",
66
- default=False,
67
- action="store_true",
68
- help="whether to only use cubic curves",
69
- )
70
-
71
- output_parser = parser.add_mutually_exclusive_group()
72
- output_parser.add_argument(
73
- "-o",
74
- "--output-file",
75
- default=None,
76
- metavar="OUTPUT",
77
- help=("output filename for the converted TTF."),
78
- )
79
- output_parser.add_argument(
80
- "-d",
81
- "--output-dir",
82
- default=None,
83
- metavar="DIRECTORY",
84
- help="output directory where to save converted TTFs",
85
- )
86
-
87
- options = parser.parse_args(args)
88
-
89
- if not options.verbose:
90
- level = "WARNING"
91
- elif options.verbose == 1:
92
- level = "INFO"
93
- else:
94
- level = "DEBUG"
95
- logging.basicConfig(level=level)
96
-
97
- if len(options.infiles) > 1 and options.output_file:
98
- parser.error("-o/--output-file can't be used with multile inputs")
99
-
100
- if options.output_dir:
101
- output_dir = options.output_dir
102
- if not os.path.exists(output_dir):
103
- os.mkdir(output_dir)
104
- elif not os.path.isdir(output_dir):
105
- parser.error("'%s' is not a directory" % output_dir)
106
- output_paths = [
107
- os.path.join(output_dir, os.path.basename(p)) for p in options.infiles
108
- ]
109
- elif options.output_file:
110
- output_paths = [options.output_file]
111
- else:
112
- output_paths = [
113
- makeOutputFileName(p, overWrite=True, suffix=".cubic")
114
- for p in options.infiles
115
- ]
116
-
117
- kwargs = dict(
118
- dump_stats=options.verbose > 0,
119
- max_err_em=options.conversion_error,
120
- all_cubic=options.all_cubic,
121
- )
122
-
123
- for input_path, output_path in zip(options.infiles, output_paths):
124
- _font_to_cubic(input_path, output_path, **kwargs)